:root {
  color-scheme: light;
  --ink: #182523;
  --forest: #23443d;
  --forest-soft: #54756d;
  --silver: #e6ecea;
  --mist: #f4f7f6;
  --white: #ffffff;
  --line: #d8e0dd;
  --muted: #697774;
  --error: #a23d37;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(25, 52, 46, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--mist);
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 20; padding: 10px 14px; background: var(--forest); color: #fff; }
.skip-link:focus { top: 12px; }

.page-shell { min-height: 100dvh; }
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(35, 68, 61, .12);
  background: rgba(244, 247, 246, .92);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--forest); border-radius: 50%; color: var(--forest); font-size: 11px; letter-spacing: .08em; }
.brand-name { display: grid; gap: 2px; font-size: 13px; font-weight: 650; letter-spacing: .04em; }
.brand-name small { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .17em; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.save-status { min-width: 70px; color: var(--muted); font-size: 12px; text-align: right; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.lang-button { min-width: 38px; height: 32px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.lang-button.active { color: var(--white); background: var(--forest); }

.main-grid { display: grid; grid-template-columns: minmax(300px, 39vw) 1fr; min-height: calc(100dvh - 89px); }
.story-panel { position: relative; overflow: hidden; color: #f8fbfa; background: var(--forest); }
.story-panel::before { content: ""; position: absolute; width: 42vw; height: 42vw; right: -19vw; bottom: -15vw; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.story-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,255,255,.08), transparent 42%); pointer-events: none; }
.story-inner { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; min-height: calc(100dvh - 89px); padding: clamp(48px, 8vw, 112px) clamp(28px, 5vw, 76px); }
.eyebrow, .step-kicker { margin: 0 0 18px; color: #b9cbc6; font-size: 11px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.story-panel h1 { margin: 0; max-width: 8ch; font-size: clamp(42px, 5.7vw, 82px); font-weight: 580; letter-spacing: -.065em; line-height: 1.04; }
.intro { max-width: 42ch; margin: 30px 0 0; color: #d6e0dd; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.8; }
.time-note { display: flex; align-items: flex-end; gap: 12px; margin-top: 48px; color: #c9d8d4; font-size: 12px; line-height: 1.5; }
.time-number { color: #fff; font-size: 38px; font-weight: 560; letter-spacing: -.05em; line-height: .9; }
.quiet-note { display: flex; gap: 14px; max-width: 38ch; margin-top: 44px; color: #aebfba; font-size: 11px; line-height: 1.65; }
.quiet-rule { flex: 0 0 28px; height: 1px; margin-top: 9px; background: #89a39c; }
.quiet-note p { margin: 0; }

.form-panel { padding: clamp(30px, 5vw, 72px) clamp(22px, 7vw, 104px); background: var(--white); }
.progress-nav { max-width: 760px; margin: 0 auto 52px; }
.progress-track { height: 2px; overflow: hidden; background: var(--silver); }
.progress-track span { display: block; width: 16.66%; height: 100%; background: var(--forest); transition: width .35s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
#stepCounter { font-variant-numeric: tabular-nums; }
#intakeForm, .success-state { max-width: 760px; margin: 0 auto; }
.form-step { display: none; animation: reveal .35s ease both; }
.form-step.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-heading { margin-bottom: 36px; }
.step-heading .step-kicker { color: var(--forest-soft); margin-bottom: 12px; }
.step-heading h2, .success-state h2 { margin: 0; font-size: clamp(31px, 4.2vw, 50px); font-weight: 590; letter-spacing: -.052em; line-height: 1.08; }
.step-heading > p:last-child { max-width: 56ch; margin: 16px 0 0; color: var(--muted); line-height: 1.7; }

.field-grid { display: grid; gap: 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 9px; margin-bottom: 24px; }
.field > span, .choice-group legend { font-size: 13px; font-weight: 720; }
.field em { margin-left: 8px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 520; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fbfcfc; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input, .field select { min-height: 50px; padding: 0 14px; }
.field textarea { resize: vertical; min-height: 104px; padding: 13px 14px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest-soft); background: #fff; box-shadow: 0 0 0 3px rgba(84,117,109,.12); }
.field small:not(.error) { color: var(--muted); font-size: 11px; line-height: 1.55; }
.field [aria-invalid="true"] { border-color: var(--error); }
.error { min-height: 0; color: var(--error); font-size: 11px; }
.choice-group { min-width: 0; margin: 0 0 26px; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 12px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice, .choice-card { position: relative; display: flex; align-items: center; gap: 10px; }
.choice { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; }
.choice input, .choice-card input, .consent input { accent-color: var(--forest); }
.option-stack { display: grid; gap: 10px; }
.choice-card { min-height: 72px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, background .2s, transform .2s; }
.choice-card:hover { border-color: #aabbb6; transform: translateY(-1px); }
.choice-card:has(input:checked) { border-color: var(--forest); background: #f2f6f4; }
.choice-card span { display: grid; gap: 4px; }
.choice-card strong { font-size: 13px; }
.choice-card small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.option-stack.compact .choice-card { min-height: 54px; }

.upload-zone { position: relative; min-height: 220px; display: grid; place-items: center; padding: 28px; border: 1px dashed #9eb0ab; border-radius: var(--radius); background: #f8faf9; text-align: center; transition: border-color .2s, background .2s; }
.upload-zone.dragging { border-color: var(--forest); background: #eff5f2; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-copy { display: grid; justify-items: center; gap: 10px; }
.upload-copy strong { font-size: 20px; letter-spacing: -.02em; }
.upload-copy span { max-width: 44ch; color: var(--muted); font-size: 12px; line-height: 1.6; }
.text-button { padding: 0 0 3px; border: 0; border-bottom: 1px solid currentColor; color: var(--forest); background: none; font-size: 12px; font-weight: 750; }
.photo-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.photo-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--silver); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item label { position: absolute; inset: auto 6px 6px 6px; padding: 6px; border-radius: 7px; background: rgba(19, 38, 34, .78); color: #fff; font-size: 9px; text-align: center; backdrop-filter: blur(8px); }
.photo-item input { margin: 0 4px 0 0; accent-color: #fff; }
.required-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.photo-requirement { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfc; }
.photo-example-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.photo-example-pair figure { position: relative; min-width: 0; margin: 0; overflow: hidden; background: #eef1ef; }
.photo-example-pair figure + figure { border-left: 1px solid rgba(255,255,255,.75); }
.photo-example-pair img { display: block; width: 100%; aspect-ratio: .82; object-fit: cover; object-position: center; }
.photo-example-pair .show-full { display: grid; place-items: center; background: #f2f3f1; }
.photo-example-pair .show-full img { object-fit: contain; padding: 5px; }
.photo-example-pair figcaption { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(250,249,245,.88); color: #46524d; font-size: 10px; font-weight: 650; line-height: 1.2; text-align: center; backdrop-filter: blur(8px); }
.photo-requirement-copy { display: grid; align-content: start; gap: 10px; min-height: 250px; padding: 18px; }
.photo-requirement-copy p { display: flex; align-items: center; gap: 9px; margin: 0; }
.photo-requirement-copy p strong { font-size: 14px; }
.photo-requirement-copy > small:not(.error) { min-height: 66px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.required-badge { padding: 4px 7px; border-radius: 999px; color: var(--white); background: var(--forest); font-size: 9px; font-weight: 750; }
.upload-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 40px; padding: 0 14px; border: 1px solid var(--forest); border-radius: 999px; color: var(--forest); font-size: 11px; font-weight: 750; cursor: pointer; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button:hover { color: var(--white); background: var(--forest); }
.file-name { min-height: 16px; overflow: hidden; color: var(--forest-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.optional-upload { margin-top: 18px; padding: 20px; border: 1px dashed #aebdb9; border-radius: var(--radius); background: #f8faf9; }
.optional-upload > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.optional-upload > div:first-child strong { font-size: 14px; }
.optional-upload > div:first-child span { color: var(--forest-soft); font-size: 10px; font-weight: 720; }
.optional-upload > p { max-width: 58ch; margin: 8px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.secondary-upload { min-height: 36px; }
.botanical-group { margin-top: 32px; }
.group-help { margin: -4px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.botanical-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.botanical-card { position: relative; display: grid; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfc; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.botanical-card:hover { transform: translateY(-2px); border-color: #aabbb6; box-shadow: 0 12px 28px rgba(25,52,46,.08); }
.botanical-card:has(input:checked) { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.botanical-card input { position: absolute; top: 10px; right: 10px; z-index: 2; width: 16px; height: 16px; accent-color: var(--forest); }
.botanical-visual { display: grid; grid-template-columns: 1.2fr .8fr; height: 220px; border-bottom: 1px solid var(--line); background: #f8f8f5; }
.botanical-visual img { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.botanical-visual .botanical-effect { padding: 5px; }
.botanical-visual .botanical-detail { border-left: 1px solid var(--line); background: #fff; }
.empty-botanical { display: block; width: 100%; height: 220px; border-bottom: 1px solid var(--line); background: #fff; }
.empty-botanical { background: linear-gradient(145deg,#f7f9f8,#eef2f0); }
.empty-botanical::after { content: ""; display: block; width: 36%; height: 1px; margin: 38% auto 0; background: #aebbb7; transform: rotate(-28deg); }
.botanical-card > strong { min-height: 54px; padding: 10px 12px; font-size: 11px; line-height: 1.35; }
.botanical-card > strong small { color: var(--muted); font-size: 9px; font-weight: 550; }
.soft-message { margin: 22px 0; padding: 15px 17px; border-left: 2px solid #9db2ac; background: #f5f8f7; color: var(--muted); font-size: 12px; line-height: 1.65; }
.soft-message p { margin: 0; }
.conditional.is-hidden { display: none; }
.consent-list { display: grid; gap: 12px; }
.consent { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; padding: 15px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.65; }
.consent input { margin-top: 3px; }
.summary { display: grid; gap: 0; margin-bottom: 32px; border-top: 1px solid var(--ink); }
.summary-row { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-row span:first-child { color: var(--muted); }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.button { min-height: 48px; padding: 0 22px; border: 1px solid var(--forest); border-radius: 999px; font-size: 12px; font-weight: 760; transition: transform .15s, background .2s, color .2s; }
.button:active { transform: scale(.98); }
.button.primary { margin-left: auto; color: #fff; background: var(--forest); }
.button.primary:hover { background: #17362f; }
.button.secondary { color: var(--forest); background: transparent; }
.button.secondary:disabled { visibility: hidden; }
.success-state { padding-top: 80px; }
.success-state .step-kicker { color: var(--forest-soft); }
.success-state > p:not(.step-kicker) { max-width: 54ch; margin: 22px 0 30px; color: var(--muted); line-height: 1.75; }
.success-state .restart { margin-left: 18px; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .story-panel { min-height: auto; }
  .story-inner { position: relative; min-height: 0; padding: 58px 24px; }
  .story-panel h1 { max-width: 9ch; font-size: clamp(44px, 12vw, 68px); }
  .time-note, .quiet-note { margin-top: 28px; }
  .form-panel { padding: 34px 22px 56px; }
  .progress-nav { margin-bottom: 40px; }
}
@media (max-width: 560px) {
  .site-header { min-height: 72px; padding: 12px 16px; }
  .brand-name span { display: none; }
  .save-status { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .photo-preview { grid-template-columns: repeat(2, 1fr); }
  .required-photo-grid { grid-template-columns: 1fr; }
  .photo-requirement-copy { min-height: 0; }
  .photo-requirement-copy > small:not(.error) { min-height: 0; }
  .botanical-visual, .empty-botanical { height: 190px; }
  .summary-row { grid-template-columns: 1fr; gap: 4px; }
  .form-actions { position: sticky; bottom: 0; z-index: 3; margin-inline: -22px; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink: #eef4f2; --forest: #19362f; --forest-soft: #9ab9b0; --silver: #273430; --mist: #101815; --white: #16201d; --line: #35443f; --muted: #a3b0ac; --error: #ff9c94; --shadow: none; }
  .site-header { background: rgba(16,24,21,.94); }
  .field input, .field select, .field textarea { background: #101815; color: var(--ink); }
  .field input:focus, .field select:focus, .field textarea:focus { background: #121c19; }
  .upload-zone, .soft-message { background: #121c19; }
  .choice-card:has(input:checked) { background: #20322d; }
  .form-actions { background: rgba(22,32,29,.94); }
}
