:root {
  --canvas: #f2efe9;
  --canvas-deep: #e7e2d9;
  --surface: rgba(255, 253, 249, 0.88);
  --surface-solid: #fffdf9;
  --ink: #171b19;
  --muted: #6e746f;
  --forest: #173f35;
  --forest-bright: #276454;
  --sage: #cddbd2;
  --sage-light: #e6eee9;
  --coral: #d97762;
  --line: rgba(23, 27, 25, 0.12);
  --danger: #a23f37;
  --shadow-soft: 0 18px 60px rgba(32, 44, 38, 0.10);
  --shadow-button: 0 10px 24px rgba(23, 63, 53, 0.20);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(155deg, #f8f5ef 0%, var(--canvas) 48%, #ebe7df 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.ambient { position: fixed; z-index: 0; border-radius: 50%; pointer-events: none; filter: blur(2px); }
.ambient--one { width: 22rem; height: 22rem; top: -12rem; right: -12rem; background: rgba(163, 190, 174, .34); }
.ambient--two { width: 18rem; height: 18rem; bottom: -12rem; left: -11rem; background: rgba(217, 119, 98, .10); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 38rem);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(1.15rem, env(safe-area-inset-top)) max(1.15rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.15rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.brand { min-height: 2.75rem; display: flex; align-items: center; gap: .68rem; }
.brand-mark { width: 2.25rem; height: 2.25rem; padding: 3px; display: grid; border: 1px solid rgba(23, 63, 53, .34); border-radius: 50%; }
.brand-mark span { display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-family: Georgia, serif; font-size: 1rem; }
.brand-name { font-size: .84rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.brand-meta { margin-left: auto; color: var(--muted); font-size: .68rem; }

.screen { flex: 1; animation: reveal 260ms cubic-bezier(.2,.7,.2,1) both; }
.screen[hidden] { display: none !important; }
.screen--start { padding-top: clamp(2rem, 7svh, 4.5rem); }
.screen--quiz { padding-top: 1.7rem; display: flex; flex-direction: column; }
.screen--loading { display: grid; place-content: center; justify-items: center; text-align: center; padding-bottom: 4rem; }
.screen--result { padding-top: clamp(2rem, 6svh, 4rem); padding-bottom: 1rem; }

.hero-symbol { position: relative; width: 5.25rem; height: 5.25rem; margin: 0 0 1.65rem auto; display: grid; place-items: center; }
.hero-symbol__orbit { position: absolute; inset: 0; border: 1px solid rgba(23, 63, 53, .25); border-radius: 50%; }
.hero-symbol__orbit::before, .hero-symbol__orbit::after { content: ""; position: absolute; border-radius: 50%; background: var(--coral); }
.hero-symbol__orbit::before { width: .55rem; height: .55rem; top: .35rem; right: .35rem; }
.hero-symbol__orbit::after { width: .28rem; height: .28rem; bottom: .65rem; left: .2rem; background: var(--forest-bright); }
.hero-symbol__core { width: 3.65rem; height: 3.65rem; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: white; box-shadow: 0 10px 28px rgba(23,63,53,.24); font-family: Georgia, serif; font-size: 1.75rem; }

.eyebrow { margin-bottom: .85rem; display: flex; align-items: center; gap: .55rem; color: var(--forest-bright); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow > span, .statement-card__hint > span { width: 1.35rem; height: 1px; display: inline-block; background: currentColor; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 12ch; margin-bottom: 1.15rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.75rem, 12vw, 4.8rem); font-weight: 400; line-height: .95; letter-spacing: -.048em; }
.lead { max-width: 31rem; margin-bottom: 1.8rem; color: var(--muted); font-size: .98rem; line-height: 1.58; }

.birth-form { padding: 1rem 1rem .85rem; border: 1px solid rgba(255,255,255,.75); border-radius: 1.55rem; background: rgba(255,253,249,.64); box-shadow: 0 12px 38px rgba(32,44,38,.06); backdrop-filter: blur(10px); }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .78rem; font-size: .88rem; font-weight: 750; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: .55rem; }
.date-grid label { min-width: 0; }
.date-grid label span { display: block; margin: 0 0 .35rem .1rem; color: var(--muted); font-size: .68rem; }
input { width: 100%; min-height: 3.55rem; padding: .75rem .5rem; border: 1px solid var(--line); border-radius: .92rem; outline: none; background: var(--surface-solid); color: var(--ink); font-size: 1.08rem; font-weight: 650; text-align: center; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
input:focus { border-color: var(--forest-bright); box-shadow: 0 0 0 3px rgba(39,100,84,.13); transform: translateY(-1px); }
input::placeholder { color: #a5aaa6; font-weight: 500; }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(162,63,55,.10); }

.button { width: 100%; min-height: 3.75rem; border: 0; border-radius: 1.05rem; padding: .92rem 1.15rem; display: flex; align-items: center; justify-content: center; gap: .7rem; font-weight: 760; cursor: pointer; transition: transform 120ms ease, opacity 120ms ease, background 150ms ease, box-shadow 150ms ease; }
.button:active:not(:disabled) { transform: scale(.985); }
.button:focus-visible, .text-button:focus-visible, summary:focus-visible { outline: 3px solid rgba(39,100,84,.30); outline-offset: 3px; }
.button:disabled { cursor: wait; opacity: .52; box-shadow: none; }
.button--primary { margin-top: 1rem; justify-content: space-between; padding-left: 1.3rem; background: var(--forest); color: #fff; box-shadow: var(--shadow-button); }
.button--primary:hover:not(:disabled) { background: #0e342b; box-shadow: 0 13px 30px rgba(23,63,53,.25); }
.button-arrow { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); font-size: 1.15rem; }
.button--secondary { background: transparent; color: var(--forest); border: 1px solid rgba(23,63,53,.28); }
.privacy-note { margin: .7rem 0 0; color: var(--muted); font-size: .68rem; text-align: center; }

.progress-header { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .02em; }
.edit-date-button { align-self: flex-start; min-height: 2.75rem; margin: -.35rem 0 .65rem; padding: .45rem 0; border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 650; text-decoration: underline; text-underline-offset: .2rem; cursor: pointer; }
.edit-date-button:focus-visible { outline: 3px solid rgba(39,100,84,.30); outline-offset: 3px; border-radius: .3rem; }
.progress-header span:last-child { color: var(--forest-bright); }
.progress-track { height: .25rem; margin-top: .7rem; overflow: hidden; border-radius: 99px; background: var(--canvas-deep); }
.progress-bar { width: 8.33%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--forest), var(--forest-bright)); transition: width 240ms cubic-bezier(.2,.7,.2,1); }

.statement-card { position: relative; min-height: clamp(16rem, 42svh, 23rem); margin: 1.2rem 0 1rem; padding: clamp(1.45rem, 6vw, 2.2rem); display: flex; flex-direction: column; justify-content: center; overflow: hidden; border: 1px solid rgba(255,255,255,.85); border-radius: 1.75rem; background: var(--surface); box-shadow: var(--shadow-soft); backdrop-filter: blur(12px); }
.statement-card::after { content: ""; position: absolute; width: 9rem; height: 9rem; right: -5rem; bottom: -5rem; border: 1px solid rgba(39,100,84,.12); border-radius: 50%; box-shadow: 0 0 0 1.8rem rgba(39,100,84,.025), 0 0 0 3.6rem rgba(39,100,84,.018); }
.statement-card__number { position: absolute; top: -.65rem; right: .85rem; color: rgba(23,63,53,.065); font-family: Georgia, serif; font-size: 7.4rem; line-height: 1; }
.statement-card__hint { position: relative; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; color: var(--forest-bright); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.statement-card h2 { position: relative; z-index: 1; margin: 0; font-family: Georgia, serif; font-size: clamp(1.72rem, 7vw, 2.45rem); font-weight: 400; line-height: 1.18; letter-spacing: -.025em; }
.statement-card.is-changing { animation: card-change 230ms ease both; }

.answer-group { display: grid; grid-template-columns: 1fr 1fr; gap: .62rem; }
.button--answer { min-height: 3.65rem; justify-content: flex-start; padding: .7rem .8rem; background: var(--forest); color: white; box-shadow: 0 7px 18px rgba(23,63,53,.14); }
.answer-icon { width: 2.15rem; height: 2.15rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: .7rem; background: rgba(255,255,255,.13); font-size: 1.15rem; }
.button--quiet { grid-column: 1 / -1; background: rgba(255,253,249,.72); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.button--quiet .answer-icon { background: var(--sage-light); color: var(--forest); }
.message { min-height: 1.1rem; margin: .65rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; text-align: center; }
.message--error { padding: .65rem .75rem; border-radius: .75rem; background: rgba(162,63,55,.08); color: var(--danger); text-align: left; }
.text-button { display: block; min-height: 2.75rem; margin: .1rem auto 0; padding: .5rem; border: 0; background: none; color: var(--forest-bright); font-weight: 750; text-decoration: underline; cursor: pointer; }
.confirm-dialog { width: min(calc(100% - 2rem), 24rem); padding: 1.35rem; border: 1px solid rgba(255,255,255,.85); border-radius: 1.45rem; background: var(--surface-solid); color: var(--ink); box-shadow: 0 24px 80px rgba(17,31,25,.24); }
.confirm-dialog::backdrop { background: rgba(17,27,23,.42); backdrop-filter: blur(4px); }
.confirm-dialog__mark { width: 2.8rem; height: 2.8rem; margin-bottom: 1rem; display: grid; place-items: center; border-radius: 50%; background: var(--sage-light); color: var(--forest); font-size: 1.35rem; }
.confirm-dialog h2 { margin-bottom: .55rem; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 400; }
.confirm-dialog p { margin-bottom: 1.2rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.confirm-dialog__actions { display: grid; gap: .6rem; }
.confirm-dialog__actions .button { min-height: 3.3rem; margin: 0; }

.loading-orbit { position: relative; width: 5.5rem; height: 5.5rem; margin-bottom: 1.8rem; display: grid; place-items: center; border: 1px solid var(--sage); border-radius: 50%; }
.loading-orbit::before { content: ""; position: absolute; inset: -.25rem; border: 2px solid transparent; border-top-color: var(--forest-bright); border-radius: 50%; animation: spin 900ms linear infinite; }
.loading-orbit span { width: 3.65rem; height: 3.65rem; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: white; font-family: Georgia, serif; font-size: 1.65rem; }
.screen--loading h2 { max-width: 12ch; margin-bottom: .6rem; font-family: Georgia, serif; font-size: 2.25rem; font-weight: 400; line-height: 1.05; }
.screen--loading p { color: var(--muted); }

.result-hero { position: relative; margin-bottom: 1.1rem; }
.result-kicker { position: absolute; top: 0; right: 0; display: flex; align-items: center; gap: .4rem; color: var(--forest-bright); font-size: .68rem; font-weight: 700; }
.result-kicker span { width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border-radius: 50%; background: var(--sage-light); }
.screen--result h1 { margin-bottom: 1rem; }
.result-code { display: inline-flex; padding: .48rem .78rem; border: 1px solid rgba(23,63,53,.18); border-radius: 99px; background: rgba(255,253,249,.55); color: var(--forest); font-size: .68rem; font-weight: 720; }
.result-insight { position: relative; padding: 1.6rem 1.25rem 1.35rem; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 1.45rem; background: var(--surface); box-shadow: var(--shadow-soft); }
.result-insight__mark { position: absolute; top: -.5rem; right: .75rem; color: rgba(23,63,53,.08); font-family: Georgia, serif; font-size: 6rem; line-height: 1; }
.result-text { position: relative; margin: 0; color: #26312d; font-family: Georgia, serif; font-size: clamp(1.18rem, 5vw, 1.48rem); line-height: 1.5; white-space: pre-line; }
.result-section { margin-top: 1.8rem; }
.section-heading { margin-bottom: .8rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.section-heading span { color: var(--muted); font-size: .67rem; }
.numbers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.number-card { position: relative; min-height: 7.6rem; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid rgba(23,63,53,.06); border-radius: 1.2rem; background: var(--sage-light); }
.number-card::after { content: ""; position: absolute; width: 4rem; height: 4rem; right: -2.5rem; top: -2.5rem; border: 1px solid rgba(23,63,53,.13); border-radius: 50%; }
.number-card span { max-width: 12ch; color: var(--muted); font-size: .7rem; line-height: 1.28; }
.number-card strong { color: var(--forest); font-family: Georgia, serif; font-size: 2.55rem; font-weight: 400; line-height: 1; }
.result-section--details { margin-top: 1.25rem; }
details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; list-style: none; font-size: .82rem; font-weight: 720; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details[open] summary span { transform: rotate(45deg); }
summary span { transition: transform 160ms ease; }
.counts-grid { padding: .2rem 0 1rem; display: grid; grid-template-columns: 1fr auto; gap: .58rem 1rem; color: var(--muted); font-size: .78rem; }
.counts-grid strong { color: var(--ink); }
.result-actions { margin-top: 1.2rem; display: grid; gap: .65rem; }
.result-actions .button { margin-top: 0; }
noscript { display: block; padding: 1rem; color: var(--danger); text-align: center; }

@keyframes reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes card-change { 0% { opacity: .35; transform: translateY(5px); } 100% { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-height: 720px) { .screen--start { padding-top: 1.4rem; } .hero-symbol { width: 4.5rem; height: 4.5rem; margin-bottom: 1rem; } .hero-symbol__core { width: 3.1rem; height: 3.1rem; } .lead { margin-bottom: 1.15rem; } .statement-card { min-height: 14rem; } }
@media (min-width: 40rem) { .app-shell { padding-left: 2rem; padding-right: 2rem; } .screen--start { padding-top: 4rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
