:root {
  --plum: #5f294b;
  --plum-dark: #3f1732;
  --rose: #c96f89;
  --rose-soft: #f7e7ec;
  --cream: #fbf7f3;
  --paper: #fffdfb;
  --ink: #30252c;
  --muted: #7b6d75;
  --line: #eadde2;
  --gold: #b88a3b;
  --shadow: 0 24px 80px rgba(58, 28, 45, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
#hosei-floating-diagnosis { display: none !important; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.85), transparent 32%),
    linear-gradient(135deg, #f4e4e9 0%, #f8f1ed 48%, #ead9df 100%);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(380px, .92fr) minmax(460px, 1.08fr); }
.story-panel {
  min-height: 100svh;
  padding: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  overflow: hidden;
  isolation: isolate;
}
.story-panel::before,
.story-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(95,41,75,.13);
  border-radius: 50%;
  z-index: -1;
}
.story-panel::before { width: 460px; height: 680px; right: -250px; top: 8%; transform: rotate(18deg); }
.story-panel::after { width: 280px; height: 420px; left: -180px; bottom: -80px; transform: rotate(-24deg); }
.site-mark { color: var(--plum); text-decoration: none; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 24px; letter-spacing: .08em; }
.site-mark span, .app-brand span { color: var(--rose); }
.story-copy { margin: auto 0; max-width: 580px; }
.kicker { margin: 0 0 20px; color: var(--rose); font-size: 12px; font-weight: 700; letter-spacing: .25em; }
.story-copy h1 { margin: 0; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(44px, 5vw, 76px); font-weight: 500; line-height: 1.3; letter-spacing: .03em; }
.story-copy > p:not(.kicker) { max-width: 500px; margin: 28px 0 34px; font-size: 17px; line-height: 2; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.feature-list li { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.feature-list span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(95,41,75,.2); border-radius: 50%; color: var(--plum); font-family: Georgia, serif; font-size: 11px; }
.story-note { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }

.app-stage { min-height: 100svh; padding: 42px clamp(24px, 6vw, 88px); display: grid; place-items: center; }
.phone { width: min(100%, 430px); height: min(850px, calc(100svh - 84px)); min-height: 690px; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid rgba(255,255,255,.8); border-radius: 32px; box-shadow: var(--shadow); }
.app-header { min-height: 76px; padding: 15px 16px; display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; border-bottom: 1px solid var(--line); text-align: center; }
.app-header button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.app-home-link { display: block; padding: 4px 6px; border-radius: 10px; color: inherit; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.app-home-link:hover { background: var(--rose-soft); transform: translateY(-1px); }
.app-home-link:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.back-button { font-size: 18px !important; text-align: left; }
.back-button[hidden] { display: block; visibility: hidden; }
.reset-button { text-align: right; }
.app-brand { margin: 0; color: var(--plum); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; letter-spacing: .08em; }
.app-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.progress-wrap { padding: 12px 20px 0; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.progress-track { height: 3px; margin-top: 8px; overflow: hidden; background: #efe6e9; border-radius: 999px; }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--plum)); border-radius: inherit; transition: width .35s ease; }

.chat { flex: 1; overflow-y: auto; padding: 24px 18px 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.message { display: flex; gap: 9px; margin-bottom: 14px; opacity: 0; transform-origin: left top; animation: chatBubblePop .44s cubic-bezier(.22, 1.28, .36, 1) .05s both; }
.message.user { justify-content: flex-end; }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; border: 2px solid white; border-radius: 50%; background: var(--rose-soft); box-shadow: 0 3px 12px rgba(58,28,45,.13); }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 15%; }
.bubble { max-width: 82%; padding: 13px 15px; border-radius: 6px 18px 18px 18px; background: var(--rose-soft); font-size: 15px; line-height: 1.75; }
.user .bubble { border-radius: 18px 6px 18px 18px; background: var(--plum); color: white; }
.bubble strong { color: var(--plum); }
.question-card { margin: 8px 0 12px 47px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 24px rgba(72,42,57,.06); opacity: 0; transform-origin: left top; animation: questionCardPop .48s cubic-bezier(.22, 1.24, .36, 1) .22s both; }
.question-card h2 { margin: 0 0 4px; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 22px; font-weight: 600; line-height: 1.55; }
.question-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.size-illustration { margin-top: 12px; overflow: hidden; border-radius: 14px; background: var(--cream); }
.size-illustration img { width: 100%; aspect-ratio: 2 / 1; display: block; object-fit: cover; }
.choices { padding: 10px 18px 20px; display: grid; gap: 9px; border-top: 1px solid var(--line); background: rgba(255,253,251,.97); }
.choices.is-revealing { transform-origin: center top; animation: choicePanelPop .5s cubic-bezier(.2, 1.3, .34, 1) .5s both; }
.choice { width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid #dbc7cf; border-radius: 15px; background: white; color: var(--plum-dark); font-weight: 700; font-size: 14px; line-height: 1.45; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.choice:hover { transform: translateY(-1px); border-color: var(--rose); background: #fff8fa; }
.choice.primary { border-color: var(--plum); background: var(--plum); color: white; }
.visual-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; max-height: min(48svh, 430px); overflow-y: auto; align-content: start; align-items: start; }
.visual-choice { min-height: 0; padding: 0; display: grid; grid-template-columns: 1fr 22px; grid-template-rows: auto auto; overflow: hidden; text-align: left; font-weight: 400; }
.choice-art { grid-column: 1 / -1; grid-row: 1; width: 100%; aspect-ratio: 1.28 / 1; display: block; position: relative; overflow: hidden; background-color: #fbf7f2; }
.choice-art svg { width: 100%; height: 100%; display: block; }
.choice-copy { min-width: 0; padding: 10px 4px 11px 11px; display: block; grid-column: 1; grid-row: 2; }
.choice-copy strong { display: block; color: var(--plum-dark); font-size: 12px; line-height: 1.45; }
.choice-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.45; }
.choice-chevron { grid-column: 2; grid-row: 2; align-self: center; color: var(--rose); font-family: Georgia, serif; font-size: 18px; }
.size-choices { padding-top: 12px; }
.size-selector { display: grid; gap: 12px; }
.size-selector fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.size-selector legend { margin-bottom: 7px; color: var(--plum-dark); font-size: 11px; font-weight: 700; }
.size-selector legend span { width: 19px; height: 19px; margin-right: 4px; display: inline-grid; place-items: center; border-radius: 50%; color: white; background: var(--plum); font-family: Georgia, serif; font-size: 10px; }
.size-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.size-card { min-width: 0; min-height: 54px; padding: 5px 2px; border: 1px solid #dbc7cf; border-radius: 12px; color: var(--plum-dark); background: white; font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.size-card:hover { transform: translateY(-1px); border-color: var(--rose); }
.size-card.is-selected { border-color: var(--plum); color: white; background: var(--plum); box-shadow: 0 4px 12px rgba(95,41,75,.18); }
.size-next { margin-top: 2px; }
.size-next:disabled { border-color: #dfd4d8; color: #a99ba2; background: #eee8eb; cursor: not-allowed; }

.intro { min-height: 100%; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.intro-visual { width: 180px; height: 180px; flex: 0 0 auto; margin: 0 auto 28px; display: grid; place-items: center; position: relative; border-radius: 50%; background: linear-gradient(145deg, #f8e9ee, #f1dce4); }
.intro-visual::before, .intro-visual::after { content: ""; position: absolute; border: 1px solid rgba(95,41,75,.2); border-radius: 50%; }
.intro-visual::before { inset: 20px -18px; transform: rotate(24deg); }
.intro-visual::after { inset: -10px 36px; transform: rotate(-22deg); }
.intro-visual img { width: 100%; height: 100%; display: block; position: relative; z-index: 1; border: 5px solid white; border-radius: 50%; object-fit: cover; object-position: center 15%; box-shadow: 0 10px 30px rgba(58,28,45,.14); }
.intro h2 { margin: 0; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 30px; line-height: 1.55; }
.intro p { margin: 16px auto 0; max-width: 330px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.intro .diagnosis-context { max-width: 350px; margin-top: 18px; padding: 11px 14px; border: 1px solid #ead4dc; border-radius: 12px; background: #fff8fa; color: var(--plum-dark); font-size: 12px; font-weight: 700; line-height: 1.75; }
.intro small { display: block; margin-top: 18px; color: #8d7d85; font-size: 11px; line-height: 1.7; }

.result { animation: rise .45s ease both; }
.result-hero { padding: 22px 20px 24px; border-radius: 24px; color: white; background: linear-gradient(145deg, var(--plum), #8a4968); position: relative; overflow: hidden; }
.result-hero::after { content: ""; position: absolute; width: 170px; height: 260px; right: -100px; top: -70px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transform: rotate(28deg); }
.result-kicker { margin: 0 0 7px; color: #f3d8e1; font-size: 11px; letter-spacing: .18em; }
.result-hero h2 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 30px; font-weight: 500; line-height: 1.45; }
.result-hero .en { margin: 3px 0 14px; color: #efd3dd; font-family: Georgia, serif; font-size: 12px; letter-spacing: .18em; }
.result-hero .summary { margin: 0; font-size: 14px; line-height: 1.8; }
.result-points { margin: 16px 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-points span { padding: 10px 5px; border: 1px solid var(--line); border-radius: 12px; color: var(--plum); background: white; font-size: 11px; font-weight: 700; text-align: center; }
.result-primary { margin: 0 0 24px; padding: 20px; border: 1px solid #d6b56f; border-radius: 20px; background: linear-gradient(145deg, #fffdf8, #fff6e2); box-shadow: 0 12px 32px rgba(87,52,28,.1); }
.result-primary__eyebrow { margin: 0 0 7px; color: #936d2c; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.result-primary h3 { margin: 0; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 22px; line-height: 1.5; }
.result-primary h3 span { display: block; color: var(--rose); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.result-primary__lead { margin: 11px 0 14px; color: #5d4d54; font-size: 13px; line-height: 1.75; }
.result-primary__facts { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; margin-bottom: 13px; }
.result-primary__facts span { padding: 10px 11px; border: 1px solid rgba(184,138,59,.24); border-radius: 11px; background: rgba(255,255,255,.76); color: var(--plum-dark); font-size: 12px; font-weight: 700; line-height: 1.45; }
.result-primary__facts small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }
.result-primary__cta { min-height: 52px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--plum), var(--plum-dark)); box-shadow: 0 8px 18px rgba(63,23,50,.2); font-size: 14px; font-weight: 800; line-height: 1.45; text-decoration: none; }
.result-primary__cta:hover { background: var(--plum-dark); transform: translateY(-1px); }
.result-primary__cta:focus-visible { outline: 3px solid rgba(201,111,137,.4); outline-offset: 3px; }
.result-primary__cta span { margin-left: 10px; font-family: Georgia, serif; font-size: 18px; }
.result-primary__note { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.ranking-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 10px; }
.ranking-title h3 { margin: 0; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 21px; }
.ranking-title span { color: var(--muted); font-size: 11px; }
.product-card { margin-bottom: 10px; padding: 12px 12px 12px 9px; display: grid; grid-template-columns: 34px 84px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 17px; background: white; }
.rank-wrap { min-height: 102px; display: flex; align-items: flex-start; justify-content: center; }
.product-media { width: 84px; height: 102px; display: block; position: relative; overflow: hidden; border-radius: 12px; background: var(--rose-soft); }
.product-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.rank { width: 31px; height: 31px; display: flex; align-items: baseline; justify-content: center; gap: 1px; border: 1px solid #dfcbd3; border-radius: 50%; color: var(--plum); background: var(--rose-soft); box-shadow: 0 3px 10px rgba(58,28,45,.12); }
.rank b { font-family: Georgia, serif; font-size: 14px; }
.rank small { font-size: 7px; }
.product-card[data-rank="1"] { border-color: #d6b56f; background: #fffaf0; }
.product-card[data-rank="1"] .rank { border-color: var(--gold); background: var(--gold); color: white; }
.product-copy { min-width: 0; }
.product-brand { margin: 0; color: var(--rose); font-size: 11px; font-weight: 700; }
.product-name { margin: 3px 0 5px; display: block; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.product-name:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { color: var(--plum); font-family: Georgia, serif; font-size: 16px; font-weight: 700; }
.match { color: var(--muted); font-size: 11px; }
.reason-list { margin: 9px 0 0; padding: 9px 0 0; display: flex; flex-wrap: wrap; gap: 5px; border-top: 1px solid var(--line); list-style: none; }
.reason-list li { padding: 4px 7px; border-radius: 999px; background: var(--rose-soft); color: var(--plum); font-size: 10px; }
.product-cta { margin-top: 9px; min-height: 36px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; border-radius: 9px; color: white; background: var(--plum); font-size: 12px; font-weight: 700; text-decoration: none; }
.product-cta:hover { background: var(--plum-dark); }
.product-cta span { font-family: Georgia, serif; font-size: 15px; line-height: 1; }
.brand-comparison { margin: 24px 0 14px; }
.comparison-heading { margin-bottom: 10px; }
.comparison-heading p { margin: 0 0 4px; color: var(--rose); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.comparison-heading h3 { margin: 0; color: var(--plum-dark); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 21px; }
.comparison-heading span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.comparison-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(72,42,57,.05); scrollbar-width: thin; }
.comparison-scroll table { width: 920px; min-width: 920px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.comparison-scroll th, .comparison-scroll td { min-width: 0; padding: 10px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; vertical-align: middle; line-height: 1.55; overflow-wrap: anywhere; }
.comparison-scroll th:first-child { width: 112px; min-width: 112px; position: sticky; left: 0; z-index: 2; border-right-color: #dbc7cf; }
.comparison-scroll thead th:not(:first-child), .comparison-scroll tbody td { width: 134px; }
.comparison-scroll thead th { color: var(--plum); background: #fbf3f5; font-weight: 700; white-space: nowrap; }
.comparison-scroll thead th:first-child { z-index: 3; }
.comparison-scroll tbody th { color: var(--plum-dark); background: #fffafc; font-weight: 700; white-space: nowrap; }
.comparison-scroll .is-priority { background: #fff8e9; }
.comparison-scroll tbody tr:last-child th, .comparison-scroll tbody tr:last-child td { border-bottom: 0; }
.comparison-scroll td small { display: block; margin-top: 3px; color: #a06a7e; font-size: 11px; }
.comparison-scroll a { padding: 7px 9px; display: inline-block; border-radius: 999px; color: white; background: var(--plum); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.comparison-note { margin: 9px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.result-note { padding: 13px 14px; border-radius: 13px; color: var(--muted); background: var(--cream); font-size: 11px; line-height: 1.7; }
.result-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 14px; }
.result-actions button { min-height: 44px; border: 1px solid var(--plum); border-radius: 12px; background: white; color: var(--plum); font-weight: 700; font-size: 13px; cursor: pointer; }
.result-actions .primary { background: var(--plum); color: white; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chatBubblePop {
  0% { opacity: 0; transform: translateY(12px) scale(.94); }
  72% { opacity: 1; transform: translateY(-2px) scale(1.015); }
  100% { opacity: 1; transform: none; }
}
@keyframes questionCardPop {
  0% { opacity: 0; transform: translateY(14px) scale(.965); }
  74% { opacity: 1; transform: translateY(-2px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}
@keyframes choicePanelPop {
  0% { opacity: 0; transform: translateY(16px) scale(.965); }
  72% { opacity: 1; transform: translateY(-2px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  body { background: var(--paper); }
  .page-shell { display: block; }
  .story-panel { display: none; }
  .app-stage { min-height: 100svh; padding: 0; display: block; }
  .phone { width: 100%; height: 100svh; min-height: 620px; border: 0; border-radius: 0; box-shadow: none; }
  .intro { min-height: auto; justify-content: flex-start; padding-top: clamp(14px, 4svh, 34px); }
  .intro-visual { width: clamp(140px, 23svh, 180px); height: clamp(140px, 23svh, 180px); margin-bottom: 28px; }
  .intro .kicker { position: relative; z-index: 2; margin-bottom: 12px; }
  .phone.is-question .chat { flex: 0 0 clamp(220px, 31svh, 272px); min-height: 0; max-height: none; padding: 16px 18px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .phone.is-question .message { margin-bottom: 10px; }
  .phone.is-question .avatar { width: 42px; height: 42px; }
  .phone.is-question .bubble { max-width: calc(100% - 51px); padding: 12px 14px; font-size: 16px; line-height: 1.62; }
  .phone.is-question .question-card { margin: 6px 0 0 51px; padding: 14px 16px; }
  .phone.is-question .question-card h2 { font-size: 22px; line-height: 1.45; }
  .phone.is-question .question-card p { font-size: 13px; line-height: 1.6; }
  .phone.is-question .choices { flex: 1 1 auto; min-height: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); align-content: start; }
  .phone.is-question .visual-choices { max-height: none; overflow: hidden; grid-template-rows: repeat(var(--choice-rows), minmax(0, 1fr)); }
  .phone.is-question .visual-choice { height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
  .phone.is-question .choice-art { height: 100%; min-height: 42px; aspect-ratio: auto; }
  .phone.is-question .choice-copy { padding: 7px 3px 8px 9px; }
  .phone.is-question .choice-copy strong { font-size: 12px; line-height: 1.35; }
  .phone.is-question .choice-copy small { margin-top: 2px; font-size: 9px; line-height: 1.35; }
  .phone.is-question .choice-chevron { font-size: 15px; }
  .phone.is-question .size-choices { align-content: start; overflow: hidden; }
  .phone.is-size-question .chat { flex-basis: clamp(300px, 41svh, 352px); }
  .phone.is-size-question .size-illustration img { height: auto; aspect-ratio: 2 / 1; object-fit: contain; object-position: center; }
  .result-primary { padding: 18px 16px; }
  .result-primary__cta { font-size: 13px; }
}

/* A narrow desktop window should not inherit the full-height mobile intro. */
@media (max-width: 860px) and (hover: hover) and (pointer: fine) {
  body {
    background:
      radial-gradient(circle at 20% 10%, rgba(255,255,255,.85), transparent 32%),
      linear-gradient(135deg, #f4e4e9 0%, #f8f1ed 48%, #ead9df 100%);
  }
  .app-stage { min-height: 100svh; padding: 24px; display: grid; place-items: center; }
  .phone { width: min(100%, 430px); height: min(850px, calc(100svh - 48px)); min-height: 690px; border: 1px solid rgba(255,255,255,.8); border-radius: 32px; box-shadow: var(--shadow); }
  .phone.is-intro { height: auto; min-height: 0; max-height: calc(100svh - 48px); }
  .phone.is-intro .chat { flex: none; overflow: visible; padding: 28px 18px 8px; }
  .phone.is-intro .intro { min-height: 0; padding-top: 0; justify-content: flex-start; }
  .phone.is-intro .intro-visual { width: 160px; height: 160px; margin-bottom: 18px; }
  .phone.is-intro .intro small { margin-top: 12px; }
  .phone.is-intro .choices { flex: none; padding-top: 10px; border-top: 0; }
}

@media (max-width: 860px) and (max-height: 700px) {
  .phone.is-question .app-header { min-height: 64px; padding-block: 9px; }
  .phone.is-question .progress-wrap { padding-top: 8px; }
  .phone.is-question .chat { flex-basis: 35svh; padding-top: 12px; }
  .phone.is-question .message { margin-bottom: 8px; }
  .phone.is-question .bubble { padding: 9px 12px; font-size: 14px; line-height: 1.5; }
  .phone.is-question .question-card { margin-top: 4px; padding: 11px 13px; }
  .phone.is-question .question-card h2 { font-size: 18px; line-height: 1.4; }
  .phone.is-question .question-card p { font-size: 10px; line-height: 1.45; }
  .phone.is-question .size-illustration { display: none; }
  .phone.is-question .choices { gap: 6px; padding-top: 7px; }
  .phone.is-question .choice-copy { padding-block: 5px 6px; }
  .phone.is-question .size-selector { gap: 8px; }
  .phone.is-question .size-card { min-height: 44px; font-size: 10px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .app-stage { padding-block: 20px; }
  .phone { height: calc(100svh - 40px); min-height: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
