:root {
    --paper: #f4efe5;
    --paper-strong: #fbf8f1;
    --ink: #2f271f;
    --muted: #786b5e;
    --line: rgba(56, 43, 31, .13);
    --accent: #6f7d4d;
    --accent-dark: #4d5e31;
    --earth: #725038;
    --night: #071a24;
    --shadow: 0 24px 70px rgba(20, 16, 12, .18);
    --soft-shadow: 0 14px 38px rgba(42, 34, 26, .12);
    --radius-xl: 34px;
    --radius-lg: 24px;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: #e9e2d6;
}
button, input { font: inherit; }
a { color: inherit; }
button { color: inherit; }
.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 100;
    padding: .75rem 1rem;
    border-radius: 999px;
    background: #fff;
}
.skip-link:focus { top: 16px; }
.site-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    background: var(--paper);
    min-height: 100vh;
    overflow: hidden;
}
.life-hero {
    background: var(--night);
    padding: clamp(14px, 2vw, 28px);
}
.life-scene {
    position: relative;
    min-height: min(820px, calc(100vh - 56px));
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    isolation: isolate;
}
.scene-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.moon { fill: #f9e8b2; }
.star-field circle { fill: #fff3c9; }
.horizon-back { fill: #47615f; opacity: .68; }
.horizon-front { fill: #243f3c; opacity: .96; }
.soil-highlight {
    fill: none;
    stroke: rgba(255, 226, 173, .16);
    stroke-width: 5;
    stroke-linecap: round;
}
.tiny-plants .tiny-stem {
    fill: none;
    stroke: #81936b;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tiny-plants .tiny-leaf {
    fill: #8da36c;
    stroke: rgba(193, 216, 150, .38);
    stroke-width: 1.5;
}
.petiole {
    fill: none;
    stroke: url(#stem);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.plant { transform-origin: 640px 690px; }
.stem-main,
.stem-side {
    fill: none;
    stroke: url(#stem);
    stroke-width: 13;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stem-side { stroke-width: 9; }
.stem-side.thin { stroke-width: 7; }
.leaf-shape,
.bud { fill: url(#leaf); }
.leaf-shape.right { filter: brightness(.94); }
.small-leaf { transform-origin: center; transform: scale(.84); }
.leaf-line {
    fill: none;
    stroke: rgba(238, 251, 188, .55);
    stroke-width: 3;
    stroke-linecap: round;
}
.dew { fill: rgba(245, 252, 226, .82); }
.dew.small { opacity: .72; }
.trunk,
.branch {
    fill: #77523a;
}
.branch {
    fill: none;
    stroke: #77523a;
    stroke-width: 24;
    stroke-linecap: round;
}
.branch.thin { stroke-width: 16; }
.tree-crown { fill: #6d836c; }
.plant-young,
.plant-tree { display: none; }
.phase-baby .plant-seedling,
.phase-toddler .plant-seedling,
.phase-child .plant-seedling,
.phase-teen .plant-seedling,
.phase-adult .plant-seedling { display: none; }
.phase-baby .plant-young { display: block; }
.phase-toddler .plant-young,
.phase-child .plant-young { display: block; transform: scale(1.08); }
.phase-teen .plant-tree,
.phase-adult .plant-tree { display: block; }

.age-card {
    position: absolute;
    z-index: 5;
    left: clamp(18px, 4vw, 58px);
    top: clamp(18px, 4vw, 54px);
    width: min(510px, calc(100% - 36px));
    padding: clamp(20px, 3vw, 34px);
    border-radius: 28px;
    background: rgba(248, 244, 236, .95);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .26);
    backdrop-filter: blur(8px);
}
.eyebrow {
    margin: 0 0 .45rem;
    font-size: .73rem;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 800;
    color: #817362;
}
.age-card h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    line-height: 1.15;
    font-weight: 500;
}
.birthline {
    margin: .45rem 0 1.3rem;
    color: var(--muted);
    font-size: .98rem;
}
.age-display {
    appearance: none;
    border: 0;
    background: none;
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
    cursor: pointer;
}
.age-primary {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: .92;
    letter-spacing: -.045em;
    color: #33291f;
}
.age-secondary {
    display: block;
    margin-top: .85rem;
    color: #6d6255;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 650;
}
.mode-pills {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.mode-pills span {
    border-radius: 999px;
    padding: .48rem .78rem;
    background: #e7e0d4;
    color: #6f604f;
    font-size: .84rem;
}
.mode-pills span.active {
    background: #d4d7c2;
    color: #3f4e2d;
    font-weight: 700;
}
.mode-hint {
    margin: .9rem 0 0;
    color: #615449;
    font-size: .95rem;
    font-weight: 560;
}
.visitor-marks {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}
.visitor-effect {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: auto;
    --delay: 0s;
    --length: 96px;
    --angle: 145deg;
}
.trace-name {
    position: absolute;
    left: 0;
    top: -8px;
    transform: translate(-50%, -100%);
    display: inline-flex;
    align-items: center;
    gap: .34rem;
    color: #fff7dd;
    font-size: .86rem;
    font-weight: 760;
    letter-spacing: .015em;
    line-height: 1;
    white-space: nowrap;
    text-shadow:
        0 1px 2px rgba(3, 12, 18, .95),
        0 0 8px rgba(3, 12, 18, .72);
}
.trace-symbol {
    color: var(--trace-color, #cbeaf2);
    font-size: .86rem;
    filter: drop-shadow(0 0 5px rgba(210, 229, 230, .48));
}
.trace-name::after {
    content: '';
    position: absolute;
    left: .95rem;
    right: 0;
    bottom: -.28rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.45), rgba(255,255,255,0));
    opacity: .45;
}
.trace-line,
.trace-particle {
    position: absolute;
    display: block;
    pointer-events: none;
}
.effect-water {
    --trace-color: #bfe9f3;
}
.effect-water .trace-name {
    top: -4px;
    transform: translate(-50%, -82%);
}
.effect-water .trace-line {
    left: 0;
    top: 0;
    width: 1px;
    height: var(--length);
    background: linear-gradient(180deg, rgba(190, 232, 243, 0), rgba(190, 232, 243, .58) 35%, rgba(190, 232, 243, .08));
}
.effect-water .trace-particle {
    left: -3px;
    top: 4px;
    width: 7px;
    height: 10px;
    border-radius: 58% 42% 62% 38%;
    background: linear-gradient(135deg, #e8fbff, #8ed1e1);
    box-shadow: 0 0 9px rgba(174, 229, 241, .58);
    transform: rotate(45deg);
    animation: water-fall 4.7s ease-in infinite;
    animation-delay: var(--delay);
}
.effect-water .trace-particle.particle-b {
    width: 5px;
    height: 7px;
    left: 5px;
    opacity: .7;
    animation-delay: calc(var(--delay) - 2.15s);
}
.effect-light {
    --trace-color: #f4d98e;
}
.effect-light .trace-name {
    top: -1px;
    transform: translate(4%, -96%) rotate(-10deg);
}
.effect-light .trace-line {
    left: 0;
    top: 0;
    width: var(--length);
    height: 2px;
    transform: rotate(var(--angle));
    transform-origin: 0 50%;
    background: linear-gradient(90deg, rgba(255, 232, 155, .9), rgba(255, 224, 128, .28) 70%, rgba(255, 224, 128, 0));
    filter: drop-shadow(0 0 7px rgba(255, 222, 124, .42));
    animation: light-breathe 4.8s ease-in-out infinite;
    animation-delay: var(--delay);
}
.effect-light .trace-particle {
    left: -3px;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff1b8;
    box-shadow: 0 0 13px rgba(255, 226, 133, .9);
    animation: light-pulse 3.6s ease-in-out infinite;
    animation-delay: var(--delay);
}
.effect-nutrient {
    --trace-color: #b9d083;
}
.effect-nutrient .trace-name {
    top: 18px;
    transform: translate(-50%, 0);
}
.effect-nutrient .trace-line {
    left: 0;
    bottom: 0;
    width: 1px;
    height: var(--length);
    background: linear-gradient(0deg, rgba(181, 207, 126, .15), rgba(181, 207, 126, .62) 55%, rgba(181, 207, 126, 0));
}
.effect-nutrient .trace-particle {
    left: -3px;
    bottom: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c9dc95;
    box-shadow: 0 0 9px rgba(191, 216, 137, .65);
    animation: nutrient-rise 5.1s ease-out infinite;
    animation-delay: var(--delay);
}
.effect-nutrient .trace-particle.particle-b {
    width: 5px;
    height: 5px;
    left: 6px;
    animation-delay: calc(var(--delay) - 2.4s);
}
.effect-stardust {
    --trace-color: #e4d8ff;
}
.effect-stardust .trace-name {
    top: -2px;
    transform: translate(-50%, -88%);
}
.effect-stardust .trace-particle {
    left: -2px;
    top: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f2eaff;
    box-shadow: 0 0 10px rgba(222, 205, 255, .78);
    animation: stardust-drift 5.6s ease-in-out infinite;
    animation-delay: var(--delay);
}
.effect-stardust .trace-particle.particle-b {
    width: 3px;
    height: 3px;
    left: 12px;
    top: -5px;
    animation-delay: calc(var(--delay) - 1.9s);
}
.effect-stardust .trace-particle.particle-c {
    width: 4px;
    height: 4px;
    left: -11px;
    top: 7px;
    animation-delay: calc(var(--delay) - 3.2s);
}
.visitor-effect.new .trace-name {
    animation: trace-name-in .75s ease both;
}
@keyframes water-fall {
    0% { opacity: 0; transform: translateY(0) rotate(45deg) scale(.7); }
    18% { opacity: .95; }
    82% { opacity: .8; }
    100% { opacity: 0; transform: translateY(var(--length)) rotate(45deg) scale(.92); }
}
@keyframes light-breathe {
    0%, 100% { opacity: .34; }
    50% { opacity: .92; }
}
@keyframes light-pulse {
    0%, 100% { opacity: .45; transform: scale(.7); }
    50% { opacity: 1; transform: scale(1.25); }
}
@keyframes nutrient-rise {
    0% { opacity: 0; transform: translateY(0) scale(.6); }
    18% { opacity: .9; }
    82% { opacity: .75; }
    100% { opacity: 0; transform: translateY(var(--rise)) scale(1.05); }
}
@keyframes stardust-drift {
    0% { opacity: 0; transform: translate(0, 0) scale(.55); }
    20% { opacity: .9; }
    70% { opacity: .65; }
    100% { opacity: 0; transform: translate(-34px, 66px) scale(1.1); }
}
@keyframes trace-name-in {
    from { opacity: 0; filter: blur(3px); }
    to { opacity: 1; filter: blur(0); }
}
.scene-caption {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    gap: .45rem;
    align-items: center;
    padding: .5rem .85rem;
    border-radius: 999px;
    background: rgba(7, 21, 31, .56);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.74);
    font-size: .88rem;
    backdrop-filter: blur(7px);
}
.scene-caption strong { color: #fff7dc; font-weight: 650; }
.story-notes {
    position: relative;
    z-index: 6;
    width: min(1040px, calc(100% - 32px));
    margin: -56px auto 0;
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    gap: 18px;
}
.note-card {
    background: var(--paper-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--soft-shadow);
    padding: 1.25rem 1.35rem;
}
.note-heading {
    display: flex;
    gap: .85rem;
    align-items: center;
}
.note-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    background: #dde2cb;
    color: #526039;
}
.note-label {
    margin: 0 0 .22rem;
    color: #8b725d;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: .68rem;
    font-weight: 800;
}
.note-card h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 500;
    line-height: 1.15;
}
.note-copy {
    margin: 1rem 0 0;
    color: #4f443a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    line-height: 1.5;
}
.note-foot {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    color: var(--muted);
    font-size: .9rem;
}
.note-foot button {
    appearance: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fffdf8;
    cursor: pointer;
}
.visitor-section {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(60px, 8vw, 110px) clamp(22px, 5vw, 80px);
    background: #f4efe5;
}
.visitor-copy h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
    font-weight: 500;
}
.visitor-copy > p:not(.eyebrow):not(.visitor-count) {
    margin: 1rem 0 0;
    max-width: 34rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}
.visitor-count {
    margin: 1.2rem 0 0;
    color: var(--muted);
}
.visitor-count strong {
    color: var(--ink);
    font-size: 1.2rem;
}
.visitor-form {
    display: grid;
    gap: 1rem;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 28px;
    background: rgba(255,255,255,.44);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}
.name-field span,
.symbol-picks legend,
.travel-custom label span {
    display: block;
    margin-bottom: .42rem;
    color: var(--muted);
    font-size: .9rem;
}
.name-field input,
.travel-custom input {
    width: 100%;
    min-height: 52px;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf8;
    color: var(--ink);
}
.name-field input:focus,
.travel-custom input:focus {
    outline: 3px solid rgba(112, 126, 78, .2);
    border-color: rgba(79, 94, 49, .4);
}
.symbol-picks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    margin: 0;
    padding: 0;
    border: 0;
}
.symbol-picks legend { grid-column: 1 / -1; }
.symbol-picks label {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffdf8;
    cursor: pointer;
}
.symbol-picks input {
    position: absolute;
    opacity: 0;
}
.symbol-picks label:has(input:checked) {
    background: #dfe4ce;
    border-color: rgba(83, 99, 59, .28);
    color: #42502e;
    font-weight: 700;
}
.primary-button {
    appearance: none;
    min-height: 52px;
    padding: .8rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: #697748;
    color: #fffdf4;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(79, 92, 50, .2);
}
.primary-button:disabled { opacity: .55; cursor: wait; }
.form-message,
.visitor-disabled {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}
.honeyfield {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px clamp(22px, 5vw, 80px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #eee6d9;
    font-size: .92rem;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 1.1rem; align-items: center; }
.footer-link,
.text-button {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #66594b;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.travel-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    align-items: end;
    padding: 16px;
    background: rgba(6, 13, 17, .64);
    backdrop-filter: blur(8px);
}
.travel-panel {
    width: min(940px, 100%);
    margin: 0 auto;
    padding: 1.3rem;
    border-radius: 28px;
    background: #f8f3e9;
    box-shadow: var(--shadow);
}
.travel-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}
.travel-head h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 500;
}
.travel-jumps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .7rem;
    margin: 1.25rem 0;
}
.travel-jumps button {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffdf8;
    cursor: pointer;
}
.travel-custom {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .8rem;
    align-items: end;
}
.travel-status {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.text-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 18px;
    background: #e9e2d6;
}
.legal-sheet {
    width: min(760px, 100%);
    padding: clamp(24px, 5vw, 48px);
    border-radius: 28px;
    background: var(--paper-strong);
    box-shadow: var(--soft-shadow);
}
.legal-sheet h1 {
    margin: 0 0 1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
}
.legal-sheet p { line-height: 1.65; }
.text-link { color: var(--accent-dark); }

@media (max-width: 1050px) {
    .life-scene { min-height: 760px; }
    .story-notes { grid-template-columns: 1fr 1fr; }
    .visitor-section { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
    .life-hero { padding: 8px; }
    .life-scene {
        min-height: 820px;
        border-radius: 24px;
    }
    .scene-art {
        width: 126%;
        left: -13%;
        max-width: none;
    }
    .age-card {
        left: 14px;
        top: 14px;
        width: calc(100% - 28px);
        padding: 20px;
        border-radius: 22px;
    }
    .age-card h1 { font-size: 1.18rem; }
    .birthline { font-size: .9rem; margin-bottom: 1rem; }
    .age-primary { font-size: clamp(3rem, 13vw, 4.5rem); }
    .age-secondary { font-size: 1rem; }
    .trace-name { font-size: .78rem; }
    .visitor-effect { --length: 78px; }
    .scene-caption { bottom: 16px; font-size: .78rem; }
    .story-notes {
        width: calc(100% - 16px);
        margin-top: 10px;
        grid-template-columns: 1fr;
    }
    .note-card { border-radius: 20px; }
    .visitor-section { padding: 58px 18px; }
    .symbol-picks { grid-template-columns: repeat(2, 1fr); }
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
    .travel-jumps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .travel-custom { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .life-scene { min-height: 760px; }
    .age-card { padding: 18px; }
    .mode-pills span { font-size: .76rem; padding: .42rem .65rem; }
    .visitor-effect:nth-child(n+9) { display: none; }
    .scene-caption { width: calc(100% - 28px); justify-content: center; }
    .site-footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }
