:root {
  color-scheme: light;
  --bg: #f7f3eb;
  --surface: #fffdf8;
  --surface-2: #efe7da;
  --text: #24332c;
  --muted: #66736c;
  --line: #d9cfc0;
  --primary: #49695a;
  --primary-strong: #2f5142;
  --primary-soft: #e4ede7;
  --accent: #b17b46;
  --danger: #9e453c;
  --warn: #80611f;
  --ok: #386c4d;
  --focus: #2e5fa8;
  --shadow: 0 14px 38px rgba(52, 63, 57, .09);
  --shadow-soft: 0 6px 20px rgba(52, 63, 57, .07);
  --shadow-hover: 0 18px 44px rgba(52, 63, 57, .13);
  --content-max: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --tap: 56px;
  --font-scale: 1;
  --body-size: calc(19px * var(--font-scale));
  --question-size: calc(29px * var(--font-scale));
  --small-size: calc(16px * var(--font-scale));
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: "Atkinson Hyperlegible", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: var(--body-size);
  line-height: 1.62;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 10% 0%, rgba(177, 123, 70, .14), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(73, 105, 90, .12), transparent 28rem),
    linear-gradient(180deg, rgba(255, 253, 248, .94), rgba(247, 243, 235, .98));
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

body.hide-main-nav {
  padding-bottom: 0;
}

body.font-large { --font-scale: 1.12; }
body.font-xlarge { --font-scale: 1.24; }
body.high-contrast {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #e8efe9;
  --text: #05140d;
  --muted: #26352d;
  --line: #607164;
  --primary: #174d38;
  --primary-strong: #063322;
  --accent: #7a3f00;
  --focus: #003cff;
  --shadow: 0 0 0 2px #05140d;
}

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

button, input, textarea, select {
  font: inherit;
}

button, .button {
  min-width: 0;
  max-width: 100%;
  min-height: var(--tap);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:hover, .button:hover { background: var(--primary-strong); }
button:active, .button:active { transform: translateY(1px); }
button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

button svg, .button svg {
  width: 1.35em;
  height: 1.35em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button.primary {
  min-height: 66px;
  padding-inline: 1.25rem;
  font-size: calc(21px * var(--font-scale));
}

button.secondary, .button.secondary {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: #b8c8bc;
}

button.secondary:hover, .button.secondary:hover { background: #ccd9cf; }

button.ghost {
  background: transparent;
  color: var(--primary-strong);
  border-color: var(--line);
}

button.ghost:hover { background: var(--surface-2); }

button.danger {
  background: #fff;
  color: var(--danger);
  border-color: #c79a96;
}

button.danger:hover {
  background: #f7e7e5;
}

a { color: var(--primary-strong); }

input, textarea, select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--tap);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

img, video, canvas, audio {
  max-width: 100%;
}

audio {
  width: 100%;
  min-width: 0;
}

fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

label {
  min-width: 0;
  display: grid;
  gap: .35rem;
  font-weight: 700;
}

label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: .65rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.35rem;
  min-height: 1.35rem;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

[data-page-title]:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: .7rem;
  z-index: 20;
  transform: translateY(-150%);
  opacity: 0;
  background: var(--text);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: var(--radius);
}

body.keyboard-nav .skip-link:focus {
  transform: translateY(0);
  opacity: 1;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: calc(.7rem + env(safe-area-inset-top)) clamp(.8rem, 3vw, 1.6rem) .7rem;
  background: rgba(247, 243, 235, .9);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid rgba(217, 207, 192, .82);
}

.header-inner {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.brand-mark {
  width: clamp(2.7rem, 5vw, 3.25rem);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  box-shadow: 0 8px 20px rgba(47, 81, 66, .2);
}

.brand-mark svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: .02em;
}

.eyebrow {
  margin: 0 0 .12rem;
  font-size: var(--small-size);
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.app-shell {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: clamp(.85rem, 3vw, 1.75rem);
}

.app-shell > * {
  min-width: 0;
}

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .25rem;
  padding: .45rem max(.5rem, env(safe-area-inset-left)) calc(.45rem + env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-right));
  background: rgba(255, 253, 248, .97);
  backdrop-filter: blur(16px) saturate(1.15);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(31, 42, 36, .09);
}

.nav-item {
  min-width: 0;
  min-height: 64px;
  padding: .35rem .2rem;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  flex-direction: column;
  gap: .1rem;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.2;
}

.nav-item svg {
  width: 1.45rem;
  height: 1.45rem;
}

.nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: #b8c8bc;
}

.nav-item[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: #b8c8bc;
}

body.hide-main-nav .bottom-nav {
  display: none;
}

.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.35rem; }

.stack > *, .stack-lg > *, .grid > *, .two-col > * {
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(.85rem, 2vw, 1.15rem);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17.5rem, .6fr);
  gap: clamp(1rem, 2.2vw, 1.35rem);
  align-items: start;
}

.panel, .story-card, .notice, .modal {
  min-width: 0;
  background: rgba(255, 253, 248, .96);
  border: 1px solid rgba(217, 207, 192, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: clamp(1rem, 3vw, 1.4rem);
}

.notice {
  margin: 0;
  padding: .85rem 1rem;
  box-shadow: none;
  overflow-wrap: anywhere;
}

.soft-panel {
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-wrap: anywhere;
}

.hero-question {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 1rem;
  padding: clamp(1.15rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, .98), rgba(239, 231, 218, .78)),
    var(--surface);
  border: 1px solid rgba(201, 187, 168, .92);
  border-radius: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.hero-question::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(8rem, 26vw, 16rem);
  aspect-ratio: 1;
  right: clamp(-5rem, -7vw, -2rem);
  top: clamp(-6rem, -9vw, -3rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 105, 90, .2), rgba(73, 105, 90, 0) 70%);
  pointer-events: none;
}

.hero-question > * {
  min-width: 0;
}

.hero-question h2 {
  max-width: 26ch;
  margin: 0;
  font-size: clamp(1.55rem, 4.2vw, var(--question-size));
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hero-actions, .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.action-row {
  align-items: center;
  justify-content: space-between;
}

.action-row > * {
  min-width: 0;
}

.hero-actions > button {
  flex: 1 1 min(100%, 13.75rem);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.inline-actions button {
  flex: 0 1 auto;
  min-height: 48px;
}

.view-title {
  max-width: 100%;
  margin: 0 0 .4rem;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.section-title {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.25;
}

.muted { color: var(--muted); }
.small { font-size: var(--small-size); }
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  border-radius: 999px;
  padding: .2rem .65rem;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: var(--small-size);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.warning {
  border-color: #d2b36b;
  background: #fff7dd;
  color: #3c2f0b;
}

.danger-note {
  border-color: #c79a96;
  background: #fff2f0;
  color: #4a1713;
}

.story-card {
  overflow: hidden;
  display: grid;
  align-self: start;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.story-cover {
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #dfe9e2, #f2dfc7);
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  overflow: hidden;
}

.story-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-card-body {
  min-width: 0;
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: .65rem;
}

.story-card-body .inline-actions {
  margin-top: auto;
}

.story-card h3, .story-card p { margin: 0; }

.story-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: .75rem;
}

.story-body {
  max-width: 760px;
  font-size: calc(20px * var(--font-scale));
  line-height: 1.72;
}

.story-detail .story-cover {
  min-height: 220px;
}

.family-mode {
  --primary: #0369a1;
  --primary-strong: #0c4a6e;
  --primary-soft: #e0f2fe;
}

.family-view .panel {
  border-color: #bdd7e8;
}

.family-hero {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.stats-grid .panel {
  min-height: 118px;
  place-items: start;
}

.stats-grid strong {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
  color: var(--primary-strong);
}

.file-drop {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: .75rem;
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  background: #f0f9ff;
  color: var(--primary-strong);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.file-drop input {
  width: min(100%, 320px);
  max-width: 100%;
  background: #fff;
}

.family-story-card {
  border-color: #bae6fd;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .9rem;
}

.record-box {
  display: grid;
  gap: .8rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fff;
}

.record-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(2rem, 11vw, 4rem);
  line-height: 1;
}

.record-state {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 800;
}

.record-state::before {
  content: "";
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: var(--muted);
}

.record-state.is-recording::before {
  background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.86); }
}

.photo-preview {
  width: 100%;
  min-height: 220px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.photo-preview img {
  max-width: 100%;
  max-height: 420px;
  display: block;
}

.timeline-list, .response-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .75rem;
}

.timeline-list li, .response-list li {
  min-width: 0;
  border-left: 5px solid var(--primary);
  padding: .8rem 1rem;
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: .4rem 1rem;
}

.tabs button {
  min-height: 48px;
  background: #fff;
  color: var(--primary-strong);
  border-color: var(--line);
}

.tabs button.is-active {
  background: var(--primary);
  color: #fff;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .56);
  overflow: hidden;
}

details > summary {
  cursor: pointer;
  padding: .9rem 1rem;
  touch-action: manipulation;
}

details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

details > .stack {
  padding: 1rem;
}

.playback-stage {
  min-height: min(72vh, 720px);
  display: grid;
  align-items: end;
  background: #18231d;
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.playback-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .62;
}

.playback-caption {
  position: relative;
  padding: clamp(1rem, 5vw, 2rem);
  background: linear-gradient(transparent, rgba(0,0,0,.78));
}

.playback-caption h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 7vw, 3.5rem);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 10;
  width: min(92vw, 560px);
  max-height: 4.4em;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, 160%);
  opacity: 0;
  visibility: hidden;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
  transition: transform .22s ease, opacity .22s ease, visibility 0s linear .22s;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform .22s ease, opacity .22s ease, visibility 0s;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: end center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(17, 24, 20, .52);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(100%, 620px);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(1rem, 3vw, 1.3rem);
}

.modal h2 { margin-top: 0; }

.loading-state {
  min-height: 55vh;
  display: grid;
  place-items: center;
  gap: 1rem;
  text-align: center;
}

.soft-loader {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: .45rem solid var(--surface-2);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.print-root {
  display: grid;
  gap: 1rem;
  color: #000;
  background: #fff;
}

@media (max-width: 820px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-body {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding-top: calc(.6rem + env(safe-area-inset-top));
    padding-bottom: .6rem;
  }

  .app-header .eyebrow {
    font-size: clamp(.72rem, 3.2vw, .88rem);
  }

  .brand-mark {
    width: 2.65rem;
    border-radius: 13px;
  }

  .app-shell {
    padding-block: .8rem 1.15rem;
  }

  .hero-question,
  .panel {
    border-radius: 18px;
  }

  .hero-actions > button {
    flex-basis: 100%;
  }

  .action-row {
    align-items: stretch;
  }

  .action-row > div,
  .action-row > h2,
  .action-row > h3 {
    flex: 1 1 100%;
  }

  .action-row > button {
    flex: 1 1 10rem;
  }

  .inline-actions > button {
    flex: 1 1 9rem;
  }

  .tabs button {
    flex: 1 1 calc(50% - .5rem);
  }

  .photo-preview {
    min-height: 180px;
  }

  .playback-stage {
    min-height: min(62dvh, 560px);
  }

  .dialog-backdrop {
    place-items: end stretch;
    padding-inline: .65rem;
  }

  .modal {
    width: 100%;
    border-radius: 18px 18px 12px 12px;
  }
}

@media (max-width: 420px) {
  :root {
    --tap: 58px;
  }

  .app-shell {
    padding-left: max(.7rem, env(safe-area-inset-left));
    padding-right: max(.7rem, env(safe-area-inset-right));
  }

  .header-inner {
    gap: .65rem;
  }

  .app-header h1 {
    font-size: 1.45rem;
  }

  .bottom-nav {
    gap: .12rem;
    padding-left: max(.25rem, env(safe-area-inset-left));
    padding-right: max(.25rem, env(safe-area-inset-right));
  }

  .nav-item {
    font-size: calc(12.5px * var(--font-scale));
  }

  .nav-item span {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-question {
    padding: 1rem;
  }

  .hero-question h2 {
    font-size: clamp(1.5rem, 7vw, var(--question-size));
  }

  .action-row > button,
  .inline-actions > button {
    flex-basis: 100%;
  }

  .story-card-body,
  .soft-panel,
  .record-box {
    padding: .85rem;
  }

  .timeline-list li,
  .response-list li {
    padding: .75rem .8rem;
  }

  .toast {
    width: calc(100vw - 1rem);
    border-radius: 14px;
  }
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .bottom-nav {
    position: static;
    display: flex;
    justify-content: flex-end;
    gap: .45rem;
    width: min(calc(100% - 2rem), var(--content-max));
    margin: .75rem auto 0;
    padding: .45rem;
    background: rgba(255, 253, 248, .8);
    border: 1px solid rgba(217, 207, 192, .85);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
  }

  .nav-item {
    min-height: 50px;
    min-width: 104px;
    flex-direction: row;
    padding-inline: .9rem;
    font-size: calc(16px * var(--font-scale));
  }

  .nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .toast {
    left: auto;
    right: 1.25rem;
    bottom: auto;
    top: 5.6rem;
    transform: translateX(calc(100% + 2rem));
  }

  .toast.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .dialog-backdrop {
    place-items: center;
  }
}

@media (min-width: 1200px) {
  .app-shell {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .hero-question {
    padding: 2rem 2.2rem;
  }

  .grid {
    gap: 1.25rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .story-card:hover {
    transform: translateY(-3px);
    border-color: rgba(73, 105, 90, .42);
    box-shadow: var(--shadow-hover);
  }
}

body.high-contrast .panel,
body.high-contrast .story-card,
body.high-contrast .notice,
body.high-contrast .modal,
body.high-contrast .bottom-nav {
  background: var(--surface);
  border-color: var(--line);
}

body.high-contrast .hero-question {
  background: var(--surface);
  border-color: var(--line);
}

@media print {
  body {
    background: #fff;
    padding: 0;
    color: #000;
  }
  .app-header, .bottom-nav, .toast, .skip-link, button, input, textarea, select {
    display: none !important;
  }
  .app-shell {
    width: 100%;
    padding: 0;
  }
  .panel, .story-card {
    box-shadow: none;
    border-color: #999;
    break-inside: avoid;
  }
}
