:root {
  color-scheme: light;
  --bg: #f2f0e9;
  --bg-glow: rgba(201, 151, 76, .16);
  --surface: #fffdf8;
  --surface-soft: #f7f3ea;
  --surface-tint: #eef5ef;
  --ink: #1d2a22;
  --muted: #667169;
  --faint: #89928c;
  --line: #d8d4c9;
  --line-strong: #c9c1ae;
  --brand: #24573d;
  --brand-2: #3d7b59;
  --brand-soft: #deebe1;
  --gold: #ba8131;
  --gold-soft: #f5e9d5;
  --orange: #c86638;
  --blue: #4f8299;
  --danger: #a74040;
  --danger-soft: #f7e7e3;
  --shadow-sm: 0 5px 18px rgba(50, 55, 45, .08);
  --shadow-lg: 0 24px 70px rgba(44, 49, 40, .13);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --content: 1180px;
  --tap: 54px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1621;
  --bg-glow: rgba(83, 142, 111, .18);
  --surface: #172231;
  --surface-soft: #1d2a3c;
  --surface-tint: #1b3029;
  --ink: #edf2ec;
  --muted: #b5c0ba;
  --faint: #87958e;
  --line: #304156;
  --line-strong: #40526a;
  --brand: #86bd86;
  --brand-2: #a4d096;
  --brand-soft: #243e32;
  --gold: #e1b762;
  --gold-soft: #3b3321;
  --orange: #ef9668;
  --blue: #85bdd6;
  --danger: #ffaaa1;
  --danger-soft: #432a2e;
  --shadow-sm: 0 6px 22px rgba(0, 0, 0, .24);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

.site-header > *,
.assessment-layout > *,
.main-panel > *,
.screen > * { min-width: 0; }

p, h1, h2, h3, li, strong, small { overflow-wrap: anywhere; }

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% -10%, var(--bg-glow), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: var(--brand); }

:where(button, input, select, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 78%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 28px), var(--content));
  min-height: 92px;
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 48%, transparent);
  border-radius: 22px;
  background: linear-gradient(135deg, #173b2a, #285e40);
  box-shadow: 0 15px 36px rgba(29, 65, 46, .2);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  width: min(100%, 760px);
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-unit {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand-unit:hover .brand-label { color: #f4d28b; }
.brand-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .16);
}
.brand-label {
  min-width: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  transition: color .16s ease;
}
.brand-separator { flex: 0 0 auto; color: #f4d28b; font-size: 24px; font-weight: 900; }

.header-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.version-chip, .status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid rgba(244, 210, 139, .45);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #f9e7bd;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.home-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}
.home-link:hover { background: rgba(255, 255, 255, .18); }

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 15px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
}

.app-frame {
  width: min(calc(100% - 28px), var(--content));
  margin: 18px auto 0;
}

.app-shell {
  position: relative;
  min-height: min(750px, calc(100vh - 150px));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: clip;
}

.boot-card, .fatal-card {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 30px;
  text-align: center;
}
.fatal-card { max-width: 760px; margin: 32px auto; border-radius: var(--radius); background: var(--surface); }

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.assessment-layout {
  display: grid;
  min-height: min(750px, calc(100vh - 150px));
}

.context-panel {
  position: relative;
  padding: 28px 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--brand-soft) 88%, var(--surface)), var(--surface-soft));
}

.context-panel::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 110px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 18px color-mix(in srgb, var(--brand) 5%, transparent), 0 0 0 40px color-mix(in srgb, var(--brand) 3%, transparent);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.context-title {
  max-width: 560px;
  margin: 0;
  font-size: clamp(26px, 5.5vw, 40px);
  line-height: 1.28;
  letter-spacing: -.02em;
}

.context-copy {
  max-width: 590px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.privacy-list, .point-list, .summary-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.privacy-list li, .point-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 15px;
}
.privacy-list li::before, .point-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface);
  font-size: 12px;
  font-weight: 900;
}

.main-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--surface);
}

.progress-zone {
  padding: 22px 22px 0;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}
.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .28s ease;
}

.screen {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 28px 22px 18px;
}

.screen-head { max-width: 760px; }
.step-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}
.screen-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.35;
}
.screen-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.question-code {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}
.choice-grid.scale { grid-template-columns: 1fr; }
.choice-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice-button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: var(--tap);
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.choice-button:hover { border-color: var(--brand); transform: translateY(-1px); }
.choice-button.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
}
.choice-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}
.is-selected .choice-mark { border-color: var(--brand); background: var(--brand); color: var(--surface); }
.choice-copy { min-width: 0; }
.choice-copy strong { display: block; font-size: 17px; }
.choice-copy small { display: block; color: var(--muted); font-size: 13px; }

.field-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.field-grid.two { grid-template-columns: 1fr; }
.field-grid.three { grid-template-columns: 1fr; }
.field {
  display: grid;
  gap: 7px;
}
.field > span, .group-label { font-size: 15px; font-weight: 800; }
.field small { color: var(--muted); font-size: 13px; }
.field input, .field select {
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 18px;
}
.field input:focus, .field select:focus { border-color: var(--brand); }

.form-group {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}
.form-group .choice-grid { margin-top: 12px; }

.severity-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.severity-row .choice-button { justify-content: center; min-height: 58px; padding: 8px; text-align: center; }

.inline-note, .error-box, .review-gate, .safety-card, .disclaimer-card {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
}
.inline-note { margin-top: 20px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); }
.error-box {
  display: none;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 750;
}
.error-box.is-visible { display: block; }

.review-gate {
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line));
  border-left: 5px solid var(--gold);
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--ink) 78%, var(--gold));
}
.review-gate strong { display: block; margin-bottom: 4px; }

.screen-actions {
  position: sticky;
  z-index: 30;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(110px, .72fr) minmax(160px, 1.28fr);
  gap: 12px;
  margin-top: auto;
  padding: 14px 22px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -10px 30px rgba(30, 40, 33, .06);
  backdrop-filter: blur(12px);
}

.button {
  min-width: 0;
  min-height: 56px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 900;
  white-space: normal;
  cursor: pointer;
}
.button.primary {
  border-color: var(--brand);
  background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 72%, #173620));
  color: #fff;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--brand) 65%, #132d1d), 0 13px 24px rgba(36, 87, 61, .17);
}
.button.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--brand) 65%, #132d1d); }
.button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; }

.review-summary {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.summary-card h3 { margin: 0 0 5px; font-size: 16px; }
.summary-card p { margin: 0; color: var(--muted); font-size: 14px; }

.loading-view {
  display: grid;
  place-items: center;
  min-height: min(620px, calc(100vh - 180px));
  padding: 34px 20px;
  text-align: center;
}
.loading-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 50%;
}
.loading-orbit::before, .loading-orbit::after {
  content: "";
  position: absolute;
  border: 2px solid transparent;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1.3s linear infinite;
}
.loading-orbit::before { inset: 12px; }
.loading-orbit::after { inset: -10px; border-top-color: var(--gold); animation-direction: reverse; animation-duration: 2s; }
.loading-orbit span { color: var(--brand); font-family: "STKaiti", "KaiTi", serif; font-size: 36px; font-weight: 900; }
.loading-view h2 { margin: 34px 0 8px; font-size: 28px; }
.loading-message { min-height: 34px; margin: 0; color: var(--muted); transition: opacity .2s ease; }
.loading-dots { display: flex; gap: 8px; margin-top: 20px; }
.loading-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.loading-dots span.is-active { background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 12%, transparent); }

.result-view { padding: 26px; }
.result-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 22px;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 88%, #16311f), color-mix(in srgb, var(--brand) 65%, #0f2a1b));
  color: #fff;
}
.result-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -125px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, .04), 0 0 0 90px rgba(255, 255, 255, .025);
}
.result-hero > * { position: relative; z-index: 1; }
.result-hero h1 { margin: 0; font-size: clamp(28px, 5vw, 43px); line-height: 1.25; }
.result-hero p { max-width: 760px; margin: 8px 0 0; color: rgba(255, 255, 255, .8); }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.result-meta span { padding: 5px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12px; }

.result-section { margin-top: 24px; }
.result-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.result-section h2 { margin: 0; font-size: 24px; }
.result-section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.score-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.score-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
}
.score-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.score-name { font-size: 17px; font-weight: 900; }
.score-value { color: var(--brand); font-size: 22px; font-weight: 900; }
.score-status { margin-top: 2px; color: var(--muted); font-size: 13px; }
.score-bar { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: var(--line); }
.score-bar span { display: block; width: var(--score, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--gold), var(--orange)); }
.score-card[data-status="是"] { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); }
.score-card[data-status="倾向是"], .score-card[data-status="基本是"] { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }

.overview-grid, .advice-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.overview-card, .advice-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.overview-card .card-kicker, .advice-card .card-kicker { color: var(--brand); font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.overview-card h3, .advice-card h3 { margin: 5px 0 8px; font-size: 20px; }
.overview-card p, .advice-card p { margin: 0; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-list span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 13px; }
.advice-card ul { margin: 10px 0 0; padding-left: 1.25em; color: var(--muted); }
.advice-card li + li { margin-top: 7px; }
.advice-card.diet { border-top: 4px solid #42a29b; }
.advice-card.exercise { border-top: 4px solid #df7447; }
.advice-card.sleep { border-top: 4px solid #6797b1; }
.advice-card.sitting { border-top: 4px solid #b98b45; }
.advice-card.daily { border-top: 4px solid #7c9f62; }

.explanation-list { display: grid; gap: 10px; margin-top: 14px; }
.explanation-item { padding: 13px 15px; border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface-soft); }
.explanation-item strong { display: block; }
.explanation-item p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

.safety-card { border: 1px solid color-mix(in srgb, var(--orange) 38%, var(--line)); background: color-mix(in srgb, var(--gold-soft) 64%, var(--surface)); }
.safety-card h3, .disclaimer-card h3 { margin: 0 0 6px; font-size: 18px; }
.safety-card ul { margin: 6px 0 0; padding-left: 1.25em; }
.disclaimer-card { margin-top: 14px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.a4-poster-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 62%, var(--line));
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--gold-soft) 72%, transparent) 0 120px, transparent 121px),
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--gold-soft) 42%, var(--surface)));
  box-shadow: var(--shadow-sm);
}
.a4-poster-copy .card-kicker { color: var(--brand); font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.a4-poster-copy h2 { margin: 7px 0 10px; font-size: clamp(23px, 3vw, 32px); line-height: 1.28; }
.a4-poster-copy p { max-width: 780px; margin: 0; color: var(--muted); }
.poster-privacy-note { margin-top: 14px; padding: 10px 12px; border-left: 4px solid var(--brand); border-radius: 8px; background: color-mix(in srgb, var(--brand-soft) 72%, transparent); color: var(--muted); font-size: 13px; }
.a4-poster-actions { display: grid; gap: 11px; justify-items: stretch; position: relative; z-index: 1; }
.a4-paper-mark {
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 210 / 297;
  margin: 0 auto 2px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line));
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(58, 43, 16, .12);
  color: var(--brand);
}
.a4-paper-mark span { font-size: 31px; font-weight: 950; line-height: 1; }
.a4-paper-mark small { color: var(--muted); font-size: 11px; }
.poster-status { min-height: 1.5em; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }

body.poster-preview-open { overflow: hidden; }
.poster-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 19, 15, .78);
  backdrop-filter: blur(8px);
}
.poster-preview-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(94vw, 860px);
  height: min(94dvh, 1120px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}
.poster-preview-head, .poster-preview-foot { position: relative; z-index: 2; padding: 16px 20px; background: var(--surface); }
.poster-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.poster-preview-head .card-kicker { color: var(--brand); font-size: 12px; font-weight: 900; }
.poster-preview-head h2 { margin: 2px 0 0; font-size: 22px; }
.poster-close { width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); font-size: 28px; line-height: 1; cursor: pointer; }
.poster-preview-scroll { overflow: auto; padding: 18px; background: #d9d3c8; overscroll-behavior: contain; }
.a4-poster-canvas { display: block; width: min(100%, 720px); height: auto; margin: 0 auto; background: #f4efe4; box-shadow: 0 10px 35px rgba(0, 0, 0, .22); }
.poster-preview-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.poster-preview-foot p { flex: 1 1 280px; margin: 0; color: var(--muted); font-size: 13px; }
.poster-preview-foot .button { flex: 0 0 auto; }

.site-footer {
  width: min(calc(100% - 32px), var(--content));
  margin: 18px auto 34px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.site-footer strong { color: var(--brand); }

@media (min-width: 560px) {
  .choice-grid.scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .choice-grid.scale .choice-button { min-height: 100px; flex-direction: column; justify-content: center; text-align: center; }
  .field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advice-card.daily { grid-column: 1 / -1; }
  .severity-row { grid-template-columns: repeat(11, minmax(0, 1fr)); }
}

@media (max-width: 559px) {
  body { font-size: 18px; line-height: 1.65; }
  .site-header { width: calc(100% - 16px); margin-top: 8px; padding: 11px 9px; border-radius: 18px; }
  .brand-lockup { gap: 6px; }
  .brand-unit { gap: 7px; }
  .brand-logo { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  .brand-label { font-size: 18px; line-height: 1.2; }
  .brand-separator { font-size: 20px; }
  .header-tools { width: 100%; }
  .version-chip { min-height: 36px; padding-inline: 10px; font-size: 18px; }
  .home-link { min-height: 52px; flex: 1 1 auto; font-size: 18px; }
  .icon-button { width: 52px; height: 52px; flex: 0 0 52px; }
  .app-frame { width: calc(100% - 12px); margin-top: 10px; }
  .app-shell { min-height: calc(100dvh - 104px); border-radius: 22px; }
  .context-panel { padding: 24px 20px; }
  .context-panel::after { width: 78px; right: 6px; bottom: 10px; }
  .context-title { font-size: 29px; }
  .context-copy { font-size: 18px; }
  .context-panel.is-compact { padding: 13px 18px; }
  .context-panel.is-compact::after,
  .context-panel.is-compact .context-copy { display: none; }
  .context-panel.is-compact .eyebrow { margin-bottom: 2px; font-size: 18px; }
  .context-panel.is-compact .context-title { font-size: 21px; line-height: 1.35; }
  .eyebrow,
  .step-label,
  .question-code,
  .progress-meta,
  .screen-help,
  .choice-copy small,
  .field > span,
  .field small,
  .group-label,
  .inline-note,
  .error-box,
  .review-gate,
  .privacy-list li,
  .point-list li,
  .summary-card h3,
  .summary-card p,
  .score-name,
  .score-status,
  .overview-card .card-kicker,
  .advice-card .card-kicker,
  .overview-card p,
  .advice-card p,
  .advice-card li,
  .tag-list span,
  .explanation-item p,
  .result-meta span,
  .result-section-head p,
  .safety-card,
  .disclaimer-card,
  .site-footer { font-size: 18px; }
  .progress-zone { padding: 14px 18px 0; }
  .screen { min-height: calc(100dvh - 225px); padding: 14px 18px 12px; }
  .screen-title { font-size: 24px; }
  .screen-help { margin-top: 6px; line-height: 1.4; }
  .question-code { min-height: 28px; margin-bottom: 7px; }
  .choice-grid { gap: 7px; margin-top: 8px; }
  .choice-grid.compact { grid-template-columns: 1fr; }
  .choice-button { min-height: 52px; gap: 10px; padding: 4px 11px; }
  .choice-mark { width: 31px; height: 31px; flex-basis: 31px; }
  .choice-copy { line-height: 1.18; }
  .choice-copy strong,
  .choice-copy small { font-size: 18px; line-height: 1.18; }
  .screen-actions { grid-template-columns: .78fr 1.22fr; padding: 8px 18px calc(12px + var(--safe-bottom)); }
  .button { min-height: 52px; padding-inline: 12px; }
  .form-group { padding: 15px; }
  .severity-row { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .result-view { padding: 12px; }
  .result-hero { padding: 22px 18px; border-radius: 19px; }
  .result-section { margin-top: 20px; }
  .result-section-head { align-items: start; flex-direction: column; }
  .result-section h2 { font-size: 23px; }
  .a4-poster-card { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; }
  .a4-poster-copy .card-kicker,
  .poster-privacy-note,
  .poster-status,
  .poster-preview-head .card-kicker,
  .poster-preview-foot p { font-size: 18px; }
  .a4-paper-mark { width: 92px; }
  .poster-preview-layer { padding: 6px; }
  .poster-preview-dialog { width: 100%; height: calc(100dvh - 12px); border-radius: 20px; }
  .poster-preview-head { padding: 11px 12px; }
  .poster-preview-head h2 { font-size: 21px; }
  .poster-preview-scroll { padding: 10px; }
  .poster-preview-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + var(--safe-bottom)); }
  .poster-preview-foot p { grid-column: 1 / -1; line-height: 1.45; }
  .poster-preview-foot .button { width: 100%; padding-inline: 8px; }
}

@media (min-width: 900px) and (orientation: landscape) {
  body { font-size: 20px; }
  .site-header { min-height: 94px; }
  .brand-label,
  .version-chip,
  .status-chip { font-size: 20px; }
  .app-shell, .assessment-layout { min-height: min(820px, calc(100vh - 132px)); }
  .assessment-layout { grid-template-columns: minmax(310px, 34%) minmax(0, 1fr); }
  .context-panel { border-right: 1px solid var(--line); border-bottom: 0; padding: 38px 32px; }
  .context-title { font-size: clamp(32px, 2.7vw, 40px); }
  .context-copy { font-size: 20px; }
  .privacy-list li,
  .point-list li,
  .eyebrow,
  .step-label,
  .question-code,
  .progress-meta,
  .choice-copy small,
  .field > span,
  .field small,
  .group-label,
  .inline-note,
  .error-box,
  .review-gate,
  .summary-card h3,
  .summary-card p,
  .score-name,
  .score-status,
  .overview-card .card-kicker,
  .advice-card .card-kicker,
  .overview-card p,
  .advice-card p,
  .advice-card li,
  .tag-list span,
  .explanation-item p,
  .result-meta span,
  .result-section-head p,
  .safety-card,
  .disclaimer-card,
  .site-footer { font-size: 20px; }
  .progress-zone { padding: 28px 34px 0; }
  .screen { padding: 32px 34px 24px; }
  .screen-title { font-size: clamp(30px, 3vw, 40px); }
  .screen-help { font-size: 20px; }
  .choice-button { min-height: 64px; }
  .choice-copy strong { font-size: 20px; }
  .field input, .field select { min-height: 62px; font-size: 20px; }
  .screen-actions { padding: 16px 34px 22px; }
  .button { min-height: 62px; font-size: 20px; }
  .result-view { padding: 32px; }
  .result-hero { grid-template-columns: minmax(0, 1fr); align-items: end; padding: 34px; }
  .result-hero h1 { font-size: 42px; }
  .score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .advice-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .advice-card.daily { grid-column: auto; }
}

@media (min-width: 1500px) and (orientation: landscape) {
  :root { --content: 1500px; }
  .assessment-layout { grid-template-columns: 430px minmax(0, 1fr); }
  .score-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .result-hero { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-height: 680px) and (min-width: 900px) and (orientation: landscape) {
  .site-header { min-height: 64px; margin-top: 8px; padding-block: 7px; }
  .brand-logo, .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .app-frame { margin-top: 8px; }
  .app-shell, .assessment-layout { min-height: calc(100vh - 90px); }
  .context-panel { padding: 24px 28px; }
  .context-title { font-size: 32px; }
  .privacy-list { margin-top: 15px; }
  .progress-zone { padding-top: 18px; }
  .screen { padding-top: 19px; padding-bottom: 12px; }
  .choice-grid { margin-top: 16px; }
  .choice-grid.scale .choice-button { min-height: 82px; }
  .screen-actions { padding-top: 10px; padding-bottom: 12px; }
  .site-footer { display: none; }
}

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