/*
 * 肌なやみチェック スタイル
 * - すべて .sg-* / .pt-* / .me-* と、このコンポーネントの root([data-skin-guide].sg-root)に限定。
 *   body・button・h2・main などの共通要素やサイト全体の固定バーは変更しない(回答中だけ固定バーを隠す既存ルールを除く)。
 * - ブランド色: 美容=当院HPのローズ #B1768C(文字・ボタンは読みやすさのため同系統の #985B75 / hover #7E465F)、
 *             一般診療=当院HPのブラウン #B19676(ボタンは #846A4E)。本文 #423B3B、補助 #72676A、罫線 #E8DCE1。
 * - 見出し: Shippori Mincho B1 / 本文: Noto Sans JP / 英字の補助見出し: DM Sans(いずれも当院HPや画面側で読み込み済みのものを再利用。ここでは読み込まない)。
 * - 小さな角丸と細い罫線を基本にし、強い影・グラデーションの多用・大きなイラストは使わない。
 * - 背景写真は images/rose-light.png。プラグインの assets/images/ から相対パスで参照する。
 */
.sg-root, .sg-entry, .sg-fallback {
  --sg-bg: #FAF7F8;
  --sg-surface: #FFFFFF;
  --sg-text: #423B3B;
  --sg-muted: #72676A;
  --sg-primary: #985B75;
  --sg-primary-hover: #7E465F;
  --sg-accent: #B1768C;
  --sg-accent-2: #AC6D84;
  --sg-line: #E8DCE1;
  --sg-tint: #F9F1F4;
  --sg-wash: #F6EDF1;
  --sg-gen: #846A4E;
  --sg-gen-hover: #6F573E;
  --sg-brown: #B19676;
  --sg-alert-bg: #FFF7E8;
  --sg-alert-line: #B7791F;
  --sg-danger: #9A2F2F;
  --sg-focus: #255F9A;
  --sg-radius: 4px;
  --sg-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --sg-font-head: "Shippori Mincho B1", "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sg-font-en: "DM Sans", "Noto Sans JP", sans-serif;
  font-family: var(--sg-font);
  color: var(--sg-text);
  font-size: 16px;
  line-height: 1.85;
  box-sizing: border-box;
}
.sg-root *, .sg-root *::before, .sg-root *::after, .sg-entry *, .sg-entry *::before, .sg-entry *::after, .sg-fallback *, .sg-fallback *::before, .sg-fallback *::after { box-sizing: border-box; }
.sg-root img { max-width: 100%; }
.sg-root figure { margin: 0; }

.sg-root { max-width: none; margin: 0; padding: 0; scroll-margin-top: 20px; background: #fff; }
.sg-stage > * { animation: sg-rise .35s ease both; }
@keyframes sg-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sg-live, .sg-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 見出し・文章 */
.sg-root .sg-h, .sg-root .sg-h3, .sg-root .sg-legend { font-family: var(--sg-font-head); font-weight: 500; color: var(--sg-text); }
.sg-root .sg-h { font-size: 33px; line-height: 1.5; margin: 0 0 20px; letter-spacing: .04em; }
.sg-root .sg-h3 { font-size: 25px; line-height: 1.6; margin: 0 0 22px; letter-spacing: .04em; }
.sg-root h4 { font-size: 18px; margin: 0 0 12px; font-weight: 600; color: var(--sg-text); }
.sg-root p { margin: 0 0 18px; }
.sg-eyebrow, .me-eyebrow { font-family: var(--sg-font-en); font-size: 13px; color: var(--sg-primary); letter-spacing: .13em; }
.me-eyebrow { font-size: 14px; line-height: 1.5; letter-spacing: .12em; font-weight: 500; }
.sg-lead { font-size: 16px; color: #51474C; }
.sg-lead-sm { font-weight: 600; }
.sg-small { font-size: 14px; color: var(--sg-muted); line-height: 1.8; }
.sg-link, .sg-linkbtn { color: var(--sg-primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sg-link:hover, .sg-linkbtn:hover { color: var(--sg-primary-hover); }
.sg-linkbtn { background: none; border: 0; padding: 5px 8px; margin-left: 10px; font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.sg-points { margin: 14px 0; padding-left: 1.4em; }
.sg-points li { margin-bottom: 8px; }

/* ボタン */
.sg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.sg-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 15px 26px; border-radius: 1px; border: 1px solid var(--sg-primary); font: inherit; font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.sg-btn-primary { background: var(--sg-primary); color: #fff; box-shadow: 0 6px 18px rgba(152, 91, 117, .08); }
.sg-btn-primary:hover { background: var(--sg-primary-hover); border-color: var(--sg-primary-hover); }
.sg-btn-ghost { background: #fff; color: var(--sg-primary); }
.sg-btn-ghost:hover { background: var(--sg-tint); }
.sg-btn:focus-visible { outline-color: #386A94; }
/* 一般診療(ブラウン)は美容予約(ローズ)と見分ける */
.sg-precheck .sg-btn-primary, .sg-consult-general .sg-btn-primary { background: var(--sg-gen); border-color: var(--sg-gen); box-shadow: none; }
.sg-precheck .sg-btn-primary:hover, .sg-consult-general .sg-btn-primary:hover { background: var(--sg-gen-hover); border-color: var(--sg-gen-hover); }
.sg-precheck .sg-btn-ghost, .sg-consult-general .sg-btn-ghost { color: var(--sg-gen); border-color: var(--sg-gen); }

/* ───────── 入口 ───────── */
.sg-screen-start { max-width: none; }
.pt-hero { position: relative; isolation: isolate; min-height: 590px; overflow: hidden; border-top: 1px solid #F3EBEE; background: #F8F3F3; }
.pt-hero-image { position: absolute; z-index: -2; inset: 0; overflow: hidden; margin: 0; }
.pt-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pt-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 255, 255, .52) 0%, rgba(255, 255, 255, .25) 38%, rgba(255, 255, 255, 0) 66%); }
.pt-hero-inner { width: min(1180px, 100%); margin: 0 auto; padding: 52px 34px 48px; }
.pt-hero .me-eyebrow { margin-bottom: 13px; font-size: 14px; }
.sg-root .pt-title { font-size: 48px; line-height: 1.5; letter-spacing: .08em; color: #8C596D; margin: 0 0 25px; }
.pt-hero-message { font-family: var(--sg-font-head); font-size: 29px; line-height: 1.8; color: var(--sg-text); font-weight: 500; letter-spacing: .06em; }
.pt-hero-message span { display: block; }
.pt-hero-lead { font-size: 16px; line-height: 2.05; max-width: 28em; }
.sg-actions-start { margin-top: 26px; }
.sg-actions-start .sg-btn { min-width: 330px; min-height: 60px; }
.sg-root .me-meta { font-size: 13px; color: #675B60; margin: 16px 0 12px; letter-spacing: .02em; }
.sg-root .me-boundary { font-size: 12px; line-height: 1.9; color: #6D6166; max-width: 36em; margin-bottom: 0; }
.pt-how { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); padding: 35px 26px 38px; gap: 34px; border-bottom: 1px solid var(--sg-line); }
.pt-how > div { border-left: 2px solid #D4B8C4; padding-left: 24px; }
.sg-root .pt-how h3 { font-size: 18px; font-weight: 500; letter-spacing: .03em; margin: 0 0 8px; }
.pt-how p { font-size: 14px; color: var(--sg-muted); margin: 0; }
.pt-clinic-story { max-width: 1160px; margin: 64px auto 52px; padding: 0 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 58px; align-items: center; }
.pt-clinic-story figure { position: relative; }
.pt-clinic-story img { display: block; width: 100%; height: 385px; object-fit: cover; object-position: 48% 40%; }
.sg-root .pt-story-copy h3 { font-family: var(--sg-font-head); font-size: 28px; line-height: 1.8; font-weight: 500; margin: 0 0 20px; }
.pt-story-copy > p { font-size: 16px; line-height: 2; }
.pt-story-copy .sg-actions { margin: 24px 0 14px; }
.pt-story-copy .sg-btn { font-size: 15px; }
.pt-doctor-link { font-size: 14px; }
.pt-bottom-notes { max-width: 1108px; padding: 0 26px; margin: 0 auto; }
.me-privacy { font-size: 14px; padding: 16px 0; color: var(--sg-muted); }
.me-privacy summary { min-height: 40px; cursor: pointer; color: var(--sg-text); }
.me-contact { font-size: 14px; line-height: 2; padding-top: 20px; color: var(--sg-muted); }

/* ───────── 質問: 写真の背景に、不透明に近い白いパネル ───────── */
.sg-root[data-sg-screen="q"] { background: linear-gradient(90deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .282)), url("images/rose-light.png") center top / cover no-repeat #F8F3F3; background-attachment: fixed; }
.sg-screen-q { max-width: 100%; margin: 0; padding: 42px 24px 60px; min-height: 60vh; }
.sg-question { position: relative; max-width: 900px; margin: 0 auto; background: rgba(255, 255, 255, .93); padding: 34px 42px 0; border: 1px solid #E4D7DD; border-radius: 9px; box-shadow: 0 14px 40px rgba(106, 67, 80, .06); }
.me-question-kicker { color: var(--sg-primary); font-size: 14px; letter-spacing: .06em; margin-bottom: 20px !important; }
.sg-stages { display: flex; list-style: none; gap: 10px; margin: 0 0 30px; padding: 0; font-size: 14px; color: var(--sg-muted); }
.sg-stage-item { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; line-height: 1.5; }
.sg-stage-item::before { content: ""; flex: 0 0 100%; height: 2px; margin-bottom: 6px; background: #EADDE3; }
.sg-stage-item.is-current::before, .sg-stage-item.is-done::before { background: var(--sg-accent); }
.sg-stage-item.is-current { color: var(--sg-primary); font-weight: 600; }
.sg-stage-n { font-family: var(--sg-font-en); font-size: 13px; }
.sg-substep { font-size: 14px; color: var(--sg-muted); margin: 0 0 12px; }
.sg-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sg-root .sg-legend { display: block; font-size: 28px; line-height: 1.8; letter-spacing: .035em; padding: 0; margin: 0 0 16px; }
.sg-hint { color: var(--sg-muted); font-size: 16px; line-height: 1.95; margin: 0; max-width: 46em; }
.sg-options { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 28px; }
.sg-option { position: relative; display: flex; align-items: center; gap: 20px; min-height: 78px; padding: 18px 22px; background: #fff; border: 1px solid #DDD2D7; border-radius: 3px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.sg-options-grid .sg-option { min-height: 99px; }
.sg-option:hover { background: #FCF8FA; border-color: var(--sg-accent); }
/* 選択状態は色だけに頼らず、ローズの枠・淡い背景・左の太い線・チェックで示す */
.sg-option.is-checked { background: #F8EEF2; border-color: var(--sg-accent); box-shadow: inset 3px 0 var(--sg-accent); }
.sg-option.is-disabled { opacity: .55; cursor: not-allowed; background: #F5F1F3; }
.sg-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sg-opt-icon { display: none; } /* 症状の大きなイラストは置かない */
.sg-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sg-opt-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sg-opt-label { font-size: 16px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.sg-opt-hint { font-size: 14px; line-height: 1.7; color: var(--sg-muted); overflow-wrap: anywhere; }
.sg-mark { flex: none; width: 22px; height: 22px; border: 1px solid #B9A8B0; background: #fff; display: grid; place-items: center; }
.sg-input[type=radio] ~ .sg-mark { border-radius: 50%; }
.sg-input[type=checkbox] ~ .sg-mark { border-radius: 3px; }
.sg-mark .sg-icon { width: 16px; height: 16px; stroke: #fff; opacity: 0; }
.sg-option.is-checked .sg-mark { background: var(--sg-primary); border-color: var(--sg-primary); }
.sg-option.is-checked .sg-mark .sg-icon { opacity: 1; }
.sg-input:focus-visible ~ .sg-mark { outline: 3px solid var(--sg-focus); outline-offset: 2px; }
.sg-option:has(.sg-input:focus-visible) { outline: 3px solid var(--sg-focus); outline-offset: 3px; }
.sg-count { margin: 18px 0 0 !important; font-size: 14px; color: var(--sg-muted); }
.sg-error { margin: 20px 0 0 !important; padding: 12px 16px; border-left: 3px solid var(--sg-danger); background: #FCEEED; color: var(--sg-danger); font-weight: 600; font-size: 15px; }
/* 操作バー: 回答中の主操作。パネルの下端に貼り付き、端末の安全領域に重ならない */
.sg-actionbar { position: sticky; bottom: 0; margin: 28px 0 0; padding: 20px 0; background: rgba(255, 255, 255, .97); border-top: 1px solid #EADFE4; z-index: 5; }
.sg-actionbar .sg-actions { margin-top: 0; justify-content: space-between; flex-wrap: nowrap; }
.sg-actionbar .sg-btn-primary { min-width: 210px; }
.sg-actionbar .sg-btn-ghost { border-color: transparent; background: #fff; padding-left: 0; color: var(--sg-muted); }

/* ───────── 結果 ───────── */
.sg-screen-result { max-width: 1050px; margin: 0 auto; padding: 30px 24px 0; }
.sg-result { padding: 0; }
.sg-review { font-size: 13px; line-height: 1.8; background: #FAF6F8; border-left: 2px solid var(--sg-accent); color: var(--sg-muted); padding: 12px 16px; margin-bottom: 24px; }
.sg-review strong { color: var(--sg-text); font-weight: 500; }
.sg-result-hero { position: relative; isolation: isolate; overflow: hidden; padding: 42px 38px 38px; margin-bottom: 34px; border: 1px solid #EFE4E9; background: #F8F3F3; }
.sg-result-hero-img { position: absolute; z-index: -2; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sg-result-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 255, 255, .95) 5%, rgba(255, 255, 255, .88) 52%, rgba(255, 255, 255, .27)); }
.sg-result-hero .sg-h { font-size: 33px; letter-spacing: .04em; margin: 0 0 20px; }
.sg-result-hero .sg-lead { max-width: 37em; margin-bottom: 0; }
.pt-result-booking { display: grid; grid-template-columns: 1fr auto; gap: 12px 26px; align-items: center; padding: 30px 34px; margin-bottom: 30px; background: #FAF3F6; border: 1px solid #E5CED9; }
.sg-root .pt-result-booking h3 { font-family: var(--sg-font-head); font-size: 24px; font-weight: 500; margin: 0 0 8px; }
.pt-result-booking p { font-size: 15px; margin: 0; line-height: 1.9; }
.pt-result-booking .sg-btn { font-size: 15px; min-width: 260px; }
.sg-sec { padding: 32px 0; margin: 0; border-top: 1px solid var(--sg-line); }
.sg-summary { margin: 0; background: var(--sg-bg); border: 1px solid var(--sg-line); padding: 4px 24px; }
.sg-row { display: grid; grid-template-columns: 190px 1fr; gap: 4px 12px; padding: 13px 0; border-bottom: 1px solid var(--sg-line); font-size: 16px; line-height: 1.9; }
.sg-row:last-child { border-bottom: 0; }
.sg-row dt { font-size: 14px; font-weight: 500; color: var(--sg-muted); }
.sg-row dd { margin: 0; overflow-wrap: anywhere; }
.sg-summary .sg-row dd { font-weight: 500; }
.sg-precheck { background: #FAF6F0; border-left: 3px solid var(--sg-brown); padding: 24px 26px; border-radius: 2px; margin-bottom: 16px; }
.sg-precheck h4 { font-size: 18px; }
.sg-precheck p { font-size: 16px; }
.sg-precheck p:last-child, .sg-note p:last-child { margin-bottom: 0; }
.sg-precheck-cta { margin-top: 20px; }
.sg-precheck-cta .sg-cta-lead { margin: 0 0 8px; font-weight: 600; color: var(--sg-text); }
.sg-cta-list { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.sg-cta-item { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.sg-precheck-cta.is-multi .sg-cta-item { flex: 1 1 280px; padding: 14px 16px; background: rgba(255, 255, 255, .75); border: 1px solid var(--sg-line); border-radius: 3px; }
.sg-precheck-cta.is-multi .sg-cta-item .sg-btn { width: 100%; }
.sg-precheck-cta .sg-btn { max-width: 100%; white-space: normal; text-wrap: balance; }
.sg-cta-note { margin: 12px 0 18px !important; font-size: 13px !important; color: var(--sg-muted); }
.sg-precheck-cta.is-multi .sg-cta-note { margin-bottom: 0 !important; }
.sg-note { background: var(--sg-bg); border-left: 2px solid #D4B8C4; padding: 20px 24px; margin-bottom: 16px; }

/* 施術カード: PCは左に写真(約32%)、右に名称と短い説明。スマホは写真を上 */
.sg-items { display: grid; gap: 30px; }
.sg-item { border: 1px solid #E5D8DF; border-radius: 5px; background: #fff; padding: 0; overflow: hidden; }
.sg-item.is-info { border-style: dashed; }
.sg-item.is-held { background: var(--sg-bg); padding: 24px; }
.sg-item-head { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; align-items: stretch; background: #FBF8F9; border-bottom: 1px solid #EEE5E9; }
.sg-item-head.has-art { grid-template-columns: 32% 1fr; }
.sg-item-headtext { padding: 28px 30px; align-self: center; min-width: 0; grid-column: 1; grid-row: 1; }
.sg-item-head.has-art .sg-item-headtext { grid-column: 2; }
.sg-item-art { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; width: 100%; min-height: 222px; background: #F6F0F3; overflow: hidden; --sg-art-h: 196px; }
/* 写真枠: 白い面・同じ高さにそろえる。機器・製品は contain(全体を見せる)、施術写真は cover、crop は元画像の一部だけを表示 */
.sg-item-art .sg-art-frame { flex: 1 1 var(--sg-art-h); min-height: var(--sg-art-h); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #EEE5E9; }
.sg-item-art .sg-art-frame .sg-art-img { display: block; width: 100%; height: 100%; min-height: 0; }
.sg-item-art .sg-art-frame.is-cover .sg-art-img { object-fit: cover; }
.sg-item-art .sg-art-frame.is-contain { padding: 12px; }
.sg-item-art .sg-art-frame.is-contain .sg-art-img { object-fit: contain; }
.sg-item-art .sg-art-frame.is-crop { padding: 8px; }
.sg-item-art .sg-crop { position: relative; overflow: hidden; flex: none; height: auto; width: min(100%, calc((var(--sg-art-h) - 16px) * var(--sg-crop-r, 1))); }
.sg-item-art .sg-crop .sg-art-img { position: absolute; width: auto; height: auto; max-width: none; }
.sg-item-art.is-svg { align-items: center; justify-content: center; }
.sg-item-art .sg-art-svg { width: 100%; height: 196px; flex: 1 1 196px; min-height: 0; }
.sg-root .sg-item-title { font-family: var(--sg-font-head); font-size: 27px; line-height: 1.7; font-weight: 500; letter-spacing: .04em; margin: 0 0 12px; color: var(--sg-text); }
.sg-item-sub { display: block; margin-top: 4px; font-family: var(--sg-font); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--sg-muted); }
.sg-root .sg-item-one { font-size: 16px; line-height: 1.9; color: #6A5C62; font-weight: 400; margin: 0; }
.sg-root .sg-item-reasons { padding: 18px 28px 0; margin: 0; font-size: 13px; color: #7A6870; }
.sg-item > .sg-dl { margin: 6px 28px 0; }
.sg-dl .sg-row { grid-template-columns: 190px 1fr; padding: 14px 0; }
.sg-risk dd { font-weight: 400; }
.sg-root .sg-item-link { padding: 0 28px 24px; margin: 18px 0 0; font-size: 14px; }
.sg-tag { display: inline-block; font-size: 13px; color: var(--sg-primary); border: 1px solid #D4B8C4; padding: 2px 10px; border-radius: 2px; margin-bottom: 10px; }
.sg-device { margin: 18px 28px; padding: 18px; border: 1px solid var(--sg-alert-line); background: var(--sg-alert-bg); border-radius: 3px; }
.sg-root .sg-device-title { font-size: 15px; margin: 0 0 6px; }
.sg-device-kind { font-weight: 600; margin-bottom: 4px; }
.sg-device .sg-dl { margin-top: 4px; }
.sg-camp { padding: 0 28px; font-size: 16px; font-weight: 500; color: var(--sg-primary); }
.sg-review-note { margin: 0; padding: 12px 28px 20px; font-size: 13px; color: var(--sg-muted); }
.sg-review-note summary { cursor: pointer; min-height: 36px; }

/* 予約・お問い合わせ: 美容=ローズ、一般診療=ブラウン */
.sg-consult { padding: 28px; margin-bottom: 18px; background: #fff; border: 1px solid #E4D6DD; border-radius: 4px; }
.sg-consult p { font-size: 16px; }
.sg-consult .sg-actions { margin-top: 20px; }
.sg-consult .sg-small { font-size: 14px; }
.sg-consult-beauty { background: #FBF5F8; border-top: 3px solid var(--sg-accent); }
.sg-root .sg-consult-beauty h4 { font-family: var(--sg-font-head); font-size: 25px; }
.sg-footnotes { font-size: 14px; line-height: 2; color: var(--sg-muted); }
.sg-footnotes ul { margin: 0; padding-left: 1.3em; }
.sg-footnotes li { margin-bottom: 9px; }

/* コピー */
.sg-copy { margin-top: 20px; padding: 24px; background: var(--sg-bg); border: 1px solid var(--sg-line); }
.sg-textarea { width: 100%; font: inherit; font-size: 15px; line-height: 1.9; padding: 16px; border: 1px solid #A89AA1; border-radius: 2px; background: #fff; color: var(--sg-text); resize: vertical; }
.sg-check { display: flex; align-items: center; gap: 10px; margin: 8px 0; min-height: 44px; font-size: 14px; }
.sg-check input { width: 22px; height: 22px; accent-color: var(--sg-primary); }

/* レビュー用の表示(本番では出ない) */
.sg-review-note { font-family: var(--sg-font); }

/* フォーカス */
.sg-root :focus-visible, .sg-entry :focus-visible { outline: 3px solid var(--sg-focus); outline-offset: 3px; }
.sg-root [tabindex="-1"]:focus { outline: none; }

/* 画面幅ごと */
@media (min-width: 1600px) { .pt-hero-inner { max-width: 1280px; } .pt-hero { min-height: 620px; } }
@media (min-width: 640px) { .sg-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .pt-hero-inner { padding-left: 40px; }
  .sg-root .pt-title { font-size: 43px; }
  .pt-hero-img { object-position: 56% center; }
  .pt-hero::before { background: linear-gradient(90deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .51) 44%, rgba(255, 255, 255, 0) 80%); }
  .pt-hero-lead { max-width: 27em; }
  .pt-clinic-story { gap: 32px; }
  .pt-clinic-story img { height: 360px; }
  .sg-root .pt-story-copy h3 { font-size: 24px; }
  .pt-result-booking { grid-template-columns: 1fr; }
  .pt-result-booking .sg-btn { margin-top: 8px; }
  .sg-item-headtext { padding: 24px; }
  .sg-root .sg-item-title { font-size: 25px; }
}
/* スマホ(既存テーマの sp-block と同じ 768px 未満は、下部固定バーに隠れないよう余白を確保) */
@media (max-width: 767px) {
  .sg-stage.sg-screen-start, .sg-stage.sg-screen-result { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .pt-hero { min-height: 600px; }
  .pt-hero-img { object-position: 68% center; }
  .pt-hero::before { background: linear-gradient(90deg, rgba(255, 255, 255, .93), rgba(255, 255, 255, .76) 45%, rgba(255, 255, 255, .208)); }
  .pt-hero-inner { padding: 40px 24px 54px; }
  .pt-hero .me-eyebrow { font-size: 12px; letter-spacing: .11em; }
  .sg-root .pt-title { font-size: 34px; letter-spacing: .055em; margin-bottom: 24px; white-space: nowrap; }
  .pt-hero-message { font-size: 23px; line-height: 1.9; letter-spacing: .04em; margin-bottom: 20px !important; }
  .pt-hero-lead { max-width: 25em; line-height: 2; }
  .sg-actions-start { margin-top: 28px; }
  .sg-actions-start .sg-btn { width: 100%; min-width: 0; padding: 16px 12px; min-height: 58px; }
  .sg-root .me-boundary { font-size: 12px; max-width: 25em; }
  .pt-how { display: block; padding: 28px 24px; }
  .pt-how > div { padding-left: 18px; margin-bottom: 20px; }
  .pt-how > div:last-child { margin-bottom: 0; }
  .sg-root .pt-how h3 { font-size: 17px; }
  .pt-clinic-story { display: block; margin: 36px auto 28px; padding: 0 24px; }
  .pt-clinic-story img { height: auto; aspect-ratio: 1.5; }
  .pt-story-copy { padding-top: 26px; }
  .sg-root .pt-story-copy h3 { font-size: 24px; line-height: 1.85; }
  .pt-story-copy .sg-btn { width: 100%; }
  .pt-bottom-notes { padding: 0 24px; }

  .sg-screen-q { padding: 22px 14px 36px; }
  .sg-question { padding: 24px 20px 0; border-radius: 7px; }
  .me-question-kicker { font-size: 13px; }
  .sg-stages { font-size: 12px; gap: 7px; margin-bottom: 26px; }
  .sg-stage-n { display: none; }
  .sg-stage-item { white-space: nowrap; gap: 0; }
  .sg-root .sg-legend { font-size: 23px; line-height: 1.85; letter-spacing: .025em; margin-bottom: 12px; }
  .sg-hint { font-size: 15px; }
  .sg-options { margin-top: 24px; }
  .sg-options-grid { grid-template-columns: 1fr; }
  .sg-option, .sg-options-grid .sg-option { min-height: 76px; padding: 17px 16px; gap: 14px; }
  .sg-actionbar { padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); margin-top: 24px; }
  .sg-actionbar .sg-btn { padding: 12px 18px; min-height: 50px; }
  .sg-actionbar .sg-btn-primary { min-width: 155px; }

  .sg-screen-result { padding: 22px 18px 0; }
  .sg-result-hero { padding: 28px 22px; margin-bottom: 28px; }
  .sg-result-hero .sg-h { font-size: 27px; line-height: 1.75; }
  .sg-root .sg-h3 { font-size: 23px; }
  .sg-summary { padding: 3px 18px; }
  .sg-row, .sg-dl .sg-row, .sg-summary .sg-row { grid-template-columns: 1fr; gap: 5px; }
  .sg-summary .sg-row { padding: 14px 0; }
  .sg-item-head, .sg-item-head.has-art { grid-template-columns: 1fr; }
  .sg-item-art { grid-row: 1; min-height: 0; }
  .sg-item-art { --sg-art-h: 200px; }
  .sg-item-art .sg-art-frame { flex: none; height: var(--sg-art-h); min-height: 0; }
  .sg-item-art .sg-art-svg { height: 180px; min-height: 0; flex: none; }
  .sg-item-headtext, .sg-item-head.has-art .sg-item-headtext { grid-column: 1; grid-row: 2; padding: 24px 22px; }
  .sg-item-head:not(.has-art) .sg-item-headtext { grid-row: 1; }
  .sg-root .sg-item-title { font-size: 25px; }
  .sg-root .sg-item-reasons { padding: 18px 22px 0; }
  .sg-item > .sg-dl { margin: 7px 22px 0; }
  .sg-root .sg-item-link { padding: 0 22px 24px; }
  .sg-result-hero .sg-lead { line-height: 1.95; }
  .sg-camp { padding: 0 22px; }
  .sg-device { margin: 16px 20px; }
  .sg-review-note { padding: 12px 22px 20px; }
  .sg-precheck { padding: 22px 20px; }
  .sg-precheck .sg-btn { font-size: 15px; padding: 15px 10px; }
  .sg-consult { padding: 24px 20px; }
  .sg-consult .sg-btn { font-size: 15px; }
  .sg-consult .sg-actions { display: grid; }
  .sg-root .sg-consult-beauty h4 { font-size: 23px; }
  .pt-result-booking { display: block; padding: 25px 22px; margin-bottom: 26px; }
  .sg-root .pt-result-booking h3 { font-size: 23px; line-height: 1.8; }
  .pt-result-booking .sg-btn { margin-top: 20px; width: 100%; min-width: 0; }
  .sg-copy { padding: 20px; }
}
@media (max-width: 370px) {
  .pt-hero-inner { padding-left: 20px; padding-right: 20px; }
  .sg-root .pt-title { font-size: 30px; }
  .sg-question { padding-left: 16px; padding-right: 16px; }
  .sg-actionbar .sg-btn-primary { min-width: 140px; }
}

/*
 * 回答中だけ、既存の固定UI(公開サイトのDOMで確認したクラス名)を隠して、操作が重ならないようにする。
 *  .fixed-link.sp-block  : 画面下の「一般診療予約／美容カウンセリング予約」バー
 *  .fixed-banner.sp-block: 右下の美容予約フロート
 * このページ(body.sg-page)の回答中(body.sg-answering)に限る。サイト全体の予約UIは変更しない。
 * ステージング環境で、クラス名が現行と同じか必ず確認すること。
 */
body.sg-page.sg-answering .fixed-link.sp-block,
body.sg-page.sg-answering .fixed-banner.sp-block { display: none !important; }

/* ───────── 入口の案内枠(トップ・診療案内・悩み別ページ用) ───────── */
.sg-entry { margin: 32px auto; max-width: 960px; padding: 0 20px; }
.sg-entry__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; background: var(--sg-bg); border: 1px solid var(--sg-line); border-left: 3px solid var(--sg-accent); border-radius: 2px; }
.sg-entry__title { font-family: var(--sg-font-head); font-weight: 500; font-size: 22px; line-height: 1.6; margin: 0 0 6px; color: var(--sg-text); letter-spacing: .04em; }
.sg-entry__text { margin: 0 0 6px; }
.sg-entry__note { margin: 0; font-size: 14px; color: var(--sg-muted); line-height: 1.8; }
.sg-entry__btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 28px; border-radius: 1px; background: var(--sg-primary); color: #fff !important; border: 1px solid var(--sg-primary); font-weight: 500; font-size: 16px; text-decoration: none !important; text-align: center; }
.sg-entry__btn:hover { background: var(--sg-primary-hover); }
.sg-entry--compact { margin: 20px auto; }
.sg-entry--compact .sg-entry__inner { padding: 18px 22px; }
.sg-entry--compact .sg-entry__title { font-size: 18px; }
@media (max-width: 767px) {
  .sg-entry { padding: 0 16px; margin: 24px auto; }
  .sg-entry__inner { flex-direction: column; align-items: stretch; padding: 20px 18px; gap: 14px; }
  .sg-entry__btn { width: 100%; }
}

/* ───────── 初期HTMLのフォールバック(JavaScript無効・読み込み失敗時に、そのまま予約・お問い合わせ先を使える) ───────── */
.sg-fallback { max-width: 720px; margin: 0 auto; padding: 24px 20px; background: var(--sg-bg); }
.sg-fallback .sg-fb-card { background: #fff; border: 1px solid var(--sg-line); border-radius: 3px; padding: 24px 20px; }
.sg-fallback h2 { font-family: var(--sg-font-head); font-weight: 500; font-size: 24px; line-height: 1.6; margin: 0 0 12px; }
.sg-fallback p, .sg-fallback ul { margin: 0 0 12px; }
.sg-fallback ul { padding-left: 1.2em; }
.sg-fallback a { color: var(--sg-primary); text-decoration: underline; text-underline-offset: 3px; }
.sg-fallback :focus-visible { outline: 3px solid var(--sg-focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sg-root *, .sg-entry * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print { .sg-actionbar { position: static; } .sg-root[data-sg-screen="q"] { background: none; } }
