:root {
  --bg: #101725;
  --panel: #182234;
  --panel-raised: #223149;
  --text: #edf2ef;
  --muted: #adbabf;
  --accent: #d6f788;
  --border: #354356;
  --ink: #263d43;
  --paper: #f0f3e7;
  font-family: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
}
body { background: radial-gradient(ellipse at 83% 0%, #36504455, transparent 45%), var(--bg); }
main { width: min(1280px, 94vw); margin: 0 auto 2rem; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button { transition: background .18s, border-color .18s, transform .18s; }
button:active { transform: translateY(1px); }
[hidden] { display: none !important; }
.masthead { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--border); font-size: .7rem; letter-spacing: .12em; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 750; }
.brand > span:last-child { color: var(--muted); }
.brand-mark { font-size: 2rem; line-height: 1; color: var(--accent); }
.edition { display: flex; align-items: center; gap: .55rem; color: var(--muted); }
.status-dot { width: .45rem; height: .45rem; background: var(--accent); border-radius: 50%; }
.hero { display: flex; justify-content: space-between; align-items: center; margin: 2.4rem 0 1.8rem; }
.hero h1 { margin: .3rem 0 .8rem; font-size: clamp(2.8rem, 6vw, 5.15rem); letter-spacing: -.065em; line-height: 1; max-width: none; }
.hero h1 em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--accent); }
.eyebrow { margin: 0; font-size: .67rem; font-weight: 700; letter-spacing: .17em; }
.lede { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.lede strong { color: var(--text); font-weight: 500; }
.hero-art { width: clamp(160px, 23vw, 270px); height: auto; margin-right: 1rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.hero-tags span { border: 1px solid var(--border); border-radius: 50px; padding: .2rem .65rem; font-size: .68rem; color: var(--muted); }
.onboarding { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin: 1.8rem 0; }
.onboarding > div { display: flex; align-items: center; gap: .75rem; }
.onboarding p { font-size: .76rem; color: var(--muted); margin: 0; }
.onboarding strong { display: block; font-size: .8rem; color: var(--text); }
.step-number { font: italic 1.6rem Georgia, serif; color: var(--accent); opacity: .8; }
.game-shell { overflow: hidden; border: 1px solid #4b605e; border-radius: 1.1rem; background: var(--panel); box-shadow: 0 24px 70px #0003; }
.game-topline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: .85rem 1.25rem; gap: .5rem; border-bottom: 1px solid var(--border); }
.garden-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.garden-picker label { color: var(--muted); font-size: .72rem; margin: 0; }
.garden-picker select { font-size: .78rem; padding: .4rem .6rem; border: 0; background: #233448; }
.shift-state { font-size: .62rem; color: var(--accent); letter-spacing: .1em; font-weight: 700; }
.hud { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 1rem; padding: 1.1rem 1.3rem; }
.hud > div { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); padding-right: 1rem; }
.hud > div:last-child { border: 0; }
.stat-label { color: var(--muted); font-size: .65rem; }
.hud strong { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.4; letter-spacing: -.025em; }
.hud strong small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.hud > div > small { font-size: .58rem; color: var(--muted); }
.goal-track { height: 4px; margin: .4rem 0 0; background: var(--border); border-radius: 4px; max-width: 180px; overflow: hidden; }
.goal-track span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; border-top: 1px solid var(--border); }
.garden-area { background: var(--paper); color: var(--ink); min-width: 0; padding: 1rem; }
.board-caption { display: flex; justify-content: space-between; margin: .1rem .2rem .7rem; font: 650 .6rem ui-monospace, monospace; letter-spacing: .14em; opacity: .75; }
.board-wrap { position: relative; border-radius: .65rem; background: #e3eada; border: 1px solid #c8d2c1; overflow: hidden; }
#board { display: block; width: 100%; height: auto; overflow: hidden; }
.board-tile { fill: #e4eadc; stroke: #d8e0d0; stroke-width: 1; }
.board-tile.path { fill: #dce6d5; }
.board-grass { fill: none; stroke: #a0bca3; stroke-width: 1.5; opacity: .65; stroke-linecap: round; }
.map-label { font: 700 9px ui-monospace, monospace; letter-spacing: .4px; fill: #38565a; text-anchor: middle; pointer-events: none; }
.patch { cursor: pointer; }
.patch:focus-visible { outline: none; }
.patch:focus-visible .patch-ring, .patch.focused .patch-ring { stroke: #254f59; stroke-width: 3; stroke-dasharray: 4 3; }
.patch-ring { fill: #f4efce; stroke: #c9c892; stroke-width: 1.4; }
.patch.depleted .patch-ring { fill: #dfe3d3; stroke-dasharray: 2 3; }
.pod-symbol { fill: #efc354; stroke: #86662a; stroke-width: 1.2; }
.bot { cursor: pointer; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.bot:focus-visible { outline: none; }
.bot .selection { fill: none; stroke: transparent; stroke-width: 2.8; }
.bot.selected .selection, .bot:focus-visible .selection { stroke: #243c48; stroke-dasharray: 3 3; }
.bot .body { stroke: #253d46; stroke-width: 1.7; }
.bot .face { stroke: #253d46; fill: none; stroke-linecap: round; stroke-width: 1.5; }
.bot .bot-name { font: 800 9px ui-monospace, monospace; fill: #263d43; text-anchor: middle; }
.bot .carried { fill: #f7ce5b; stroke: #846724; stroke-width: 1.4; }
.bot.stranded { opacity: .65; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .8rem .2rem; color: #52696b; font-size: .6rem; }
.legend span { display: flex; align-items: center; gap: .3rem; }
.legend i { font: normal 700 .75rem ui-monospace, monospace; }
.legend-home { color: #346c69; }
.legend-pod { color: #99711b; }
.legend-rock { color: #778a7b; }
.transport { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; align-items: center; }
.transport button { font-size: .72rem; padding: .65rem .8rem; color: var(--ink); background: #e2e8d9; border: 1px solid #bfccbc; }
.transport button:hover { border-color: #456664; }
button.primary { background: var(--accent); color: #22351f; font-weight: 750; border-color: #c6e67f; }
.transport button.primary { background: #244e47; color: #f0f4de; border-color: #244e47; flex-grow: 1; }
.transport button.primary:hover { background: #32665c; }
kbd { font: .65rem ui-monospace, monospace; padding: .05rem .22rem; border: 1px solid currentColor; border-radius: 3px; opacity: .6; margin-left: .2rem; white-space: nowrap; }
.quiet { background: transparent !important; border-color: transparent !important; }
.pace-note { font-size: .61rem; color: #566d68; margin: .65rem .1rem; }
.hint { background: #dce8d2; border: 1px solid #c0d2b5; border-radius: .4rem; font-size: .73rem; line-height: 1.55; padding: .7rem .8rem; margin: .8rem 0 0; }
.classroom { padding: 1.05rem; background: #1a2839; }
.section-label, .lesson-heading, .journal-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.section-label h2 { margin: 0; font-size: .95rem; letter-spacing: -.01em; }
.section-label > span { font: .55rem ui-monospace, monospace; color: var(--muted); letter-spacing: .04em; }
.robot-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin: 1rem 0 1.15rem; }
.robot-card { display: flex; flex-direction: column; align-items: center; padding: .65rem .25rem; background: #223449; border: 1px solid #3b4c5d; border-radius: .65rem; gap: .13rem; }
.robot-card[aria-pressed="true"] { background: #33483f; border-color: var(--accent); box-shadow: inset 0 0 0 1px #d6f78830; }
.bot-letter { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; margin-bottom: .2rem; font: 800 .8rem ui-monospace, monospace; color: #263d43; background: #b6c8ed; box-shadow: 0 3px 0 #080f1922; }
.ada .bot-letter { background: #f2d49a; border-radius: 11px 11px 7px 7px; }
.bop .bot-letter { background: #9adccb; border-radius: 6px 6px 11px 11px; }
.robot-card strong { font-size: .75rem; font-weight: 600; }
.robot-card kbd { font-size: .52rem; margin-left: .1rem; }
.robot-battery, .cargo { font-size: .54rem; color: #b8c5ce; white-space: nowrap; }
.robot-card progress { width: 70%; height: 4px; margin: .2rem 0; accent-color: var(--accent); border: none; border-radius: 5px; }
progress::-webkit-progress-bar { background: #0c1925; border-radius: 5px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
.lesson-heading h3 { margin: 0; font-size: .95rem; }
.lesson-heading .badge { font-size: .56rem; background: #243b35; color: var(--accent); padding: .15rem .45rem; border-color: #405847; }
.robot-thought { color: #b9c8d2; font: italic .8rem Georgia, serif; min-height: 1.35rem; margin: .4rem 0 .8rem; }
.lesson { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: #223448; padding: .75rem .65rem; margin: .5rem 0; border-color: #3b5061; border-radius: .5rem; }
.lesson[aria-pressed="true"] { background: #29423d; border-color: #7eac79; }
.lesson-icon { font: 1.3rem Georgia, serif; color: var(--accent); width: 23px; text-align: center; flex-shrink: 0; }
.lesson strong { font-size: .7rem; display: block; line-height: 1.45; }
.lesson small { font-size: .59rem; color: #b3c0ca; display: block; line-height: 1.55; margin-top: .2rem; }
.lesson-check { margin-left: auto; color: var(--accent); font-size: 1.1rem; font-weight: 400; }
.route-choice { margin-top: .8rem; }
.route-choice label { font-size: .7rem; margin: .2rem 0 .4rem; color: #d0dcd9; }
.route-choice select { width: 100%; font-size: .75rem; background: #172637; padding: .5rem; }
.route-choice small, .small-print { display: block; color: var(--muted); font-size: .61rem; line-height: 1.6; }
.route-choice small { margin-top: .4rem; }
.care-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.care-actions button { flex: 1; padding: .5rem; font-size: .67rem; }
.care-actions button[aria-pressed="true"] { border-color: var(--accent); background: #29423d; }
.care-actions span { margin-left: .15rem; color: #f6d08a; }
.journal-heading { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .75rem; }
.journal-heading h3 { font-size: .73rem; margin: 0; color: #c0ccce; }
.journal-heading > span { color: var(--accent); }
.journal { margin: .5rem 0 0; padding: 0; list-style: none; max-height: 9rem; overflow: auto; }
.journal li { color: var(--muted); font: .57rem/1.65 ui-monospace, monospace; padding: .25rem 0; border-bottom: 1px solid #33425488; }
.journal li:first-child { color: #d5e4d8; }
.outcome { position: absolute; z-index: 2; inset: 12% 10%; border: 1px solid #c3d5b8; padding: 1.4rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #f3f7eaf5; border-radius: 1rem; box-shadow: 0 12px 60px #35533b33; backdrop-filter: blur(4px); }
.outcome > span { font-size: 2.5rem; line-height: 1; color: #577549; }
.outcome h2 { font: 2rem/1.05 Georgia, serif; margin: .7rem 0 .5rem; letter-spacing: -.04em; }
.outcome p { font-size: .79rem; line-height: 1.5; margin: .3rem 0; max-width: 34ch; }
.outcome .outcome-score { font: 700 .7rem/1.7 ui-monospace, monospace; margin: .5rem 0 .9rem; }
.outcome button { font-size: .73rem; }
.lower-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; margin: 1.5rem 0; }
.lower-grid .panel { padding: 1.5rem; border-color: var(--border); border-radius: .85rem; }
.lower-grid h2 { font: 1.65rem Georgia, serif; letter-spacing: -.025em; margin: .5rem 0 .7rem; }
.lower-grid p { color: var(--muted); font-size: .76rem; }
.lower-grid p.eyebrow { color: var(--accent); font-size: .62rem; }
.replay-pick { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.replay-pick label { width: 100%; font-size: .65rem; color: var(--muted); margin: .35rem 0 0; }
.replay-pick select { flex: 1; width: 60%; font-size: .69rem; min-width: 140px; }
.replay-pick button, .archive .toolbar button, .file-button { font-size: .67rem; padding: .6rem .7rem; }
.file-button { position: relative; display: inline-flex; align-items: center; min-height: 2.25rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--panel-raised); margin: 0; cursor: pointer; overflow: hidden; }
.file-button:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.file-button input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; }
.archive .small-print { font-size: .62rem; }
#replay-controls { background: #223246; padding: .6rem .8rem; border-radius: .5rem; margin: 1rem 0; }
#replay-controls label { display: flex; justify-content: space-between; font-size: .65rem; margin: 0; }
#replay-position { width: 100%; padding: 0; accent-color: var(--accent); }
.cycle-row { display: flex; align-items: center; gap: .7rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.cycle-row > span:first-child { font: italic 1.4rem Georgia, serif; color: var(--accent); }
.cycle-row > div { flex: 1; }
.cycle-row strong { font-size: .78rem; }
.cycle-row p { font-size: .66rem; margin: .15rem 0 0; }
.cycle-row b { color: #dbe5d8; font-weight: 550; }
.cycle-tag { font: 650 .55rem ui-monospace, monospace; color: var(--accent); white-space: nowrap; }
.cycle-tag.failed { color: #f4cc86; }
.lab-notes .honesty { font-size: .66rem; line-height: 1.7; margin-top: 1rem; }
.lab-notes a { font-size: .65rem; }
.field-guide { background: #18223488; border: 1px solid var(--border); border-radius: .65rem; padding: 1rem 1.3rem; margin-bottom: 1.5rem; }
.field-guide summary { color: #dce7dd; font-size: .8rem; cursor: pointer; }
.guide-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; padding: .8rem 0; }
.guide-columns h3 { font-size: .9rem; }
.guide-columns p { font-size: .73rem; color: var(--muted); }
.guide-columns label { display: block; font-size: .7rem; }
.guide-columns select, .guide-columns input, .guide-columns button { font-size: .72rem; }
#seed { width: 10rem; margin-right: .4rem; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .7rem; font-size: .6rem; color: var(--muted); }
.message { position: fixed; z-index: 5; bottom: 1rem; right: 1rem; max-width: min(460px, 90vw); background: #283e40; border: 1px solid #71937b; border-radius: .65rem; padding: .8rem 1rem; font-size: .8rem; box-shadow: 0 5px 30px #0006; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 10; left: 1rem; top: -100px; background: var(--bg); padding: .5rem 1rem; }
.skip:focus { top: 1rem; }
@media (max-width: 1020px) {
  .play-layout { grid-template-columns: minmax(0, 1fr) 305px; }
  .classroom { padding: .85rem; }
  .outcome { inset: 7%; padding: 1rem; }
  .outcome h2 { font-size: 1.6rem; }
  .outcome > span { font-size: 2rem; }
}
@media (max-width: 820px) {
  .play-layout { grid-template-columns: 1fr; }
  .classroom { padding: 1.2rem; }
  .robot-tabs { margin-bottom: 1rem; }
  .robot-card { padding: .65rem; }
  .robot-battery, .cargo { font-size: .65rem; }
  .lesson strong { font-size: .85rem; }
  .lesson small { font-size: .7rem; }
  .lesson-heading h3 { font-size: 1.1rem; }
  .lower-grid { grid-template-columns: 1fr; }
  .guide-columns { grid-template-columns: 1fr; gap: .5rem; }
  .hero-art { width: 190px; }
  .onboarding { gap: .8rem; }
}
@media (max-width: 550px) {
  .edition { font-size: .5rem; letter-spacing: .04em; }
  .hero { margin: 1.8rem 0 1.2rem; }
  .hero-art { display: none; }
  .lede { font-size: .85rem; }
  .hero-tags span { font-size: .58rem; }
  .onboarding { grid-template-columns: 1fr; gap: .6rem; margin: 1.3rem 0; }
  .onboarding strong { display: inline; margin-right: .25rem; font-size: .75rem; }
  .onboarding p { font-size: .7rem; }
  .step-number { font-size: 1.1rem; width: 25px; }
  .hud { grid-template-columns: repeat(2, 1fr); padding: .9rem; gap: .75rem; }
  .hud > div:nth-child(2) { border: 0; }
  .hud strong { font-size: 1.45rem; }
  .garden-area { padding: .6rem; }
  .transport button { font-size: .65rem; padding: .65rem .55rem; }
  .transport kbd { display: none; }
  .transport .quiet { flex-grow: 1; }
  .legend { gap: .4rem .7rem; font-size: .55rem; }
  .outcome { inset: 4%; padding: .65rem; }
  .outcome > span { display: none; }
  .outcome h2 { font-size: 1.35rem; margin: .3rem 0; }
  .outcome p { font-size: .67rem; }
  .outcome .outcome-score { font-size: .57rem; margin: .3rem 0; }
  .outcome button { padding: .4rem .65rem; font-size: .65rem; }
  .lower-grid .panel { padding: 1.1rem; }
  .cycle-row strong { font-size: .7rem; }
  .cycle-row p { font-size: .58rem; }
  .cycle-tag { font-size: .48rem; }
  .masthead { padding: 1rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
