:root {
  --paper: #f7f7f3;
  --ink: #1b1b1b;
  --line: #7a7a76;
  --soft: #e6e6df;
  --pink: #c2185b;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sign: "Atkinson Hyperlegible", "Arial", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: var(--sign); overflow-x: hidden; }
button { font: inherit; color: inherit; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.shell { width: min(100%, 620px); min-height: 100svh; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
.masthead { min-height: 47px; display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; border-bottom: 2px solid var(--ink); }
.wordmark { margin: 0; font-size: clamp(20px, 6vw, 28px); line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.stop-count, .level-label, .small-label { font: 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.lang, .quiet-button, .primary, .source, .ticket, .closed-booth { border-radius: 0; }
.lang { min-width: 48px; min-height: 44px; border: 2px solid var(--ink); background: transparent; font: 12px var(--mono); }
.play-lab-link { min-height: 44px; display: grid; align-items: center; color: var(--ink); font: 12px var(--mono); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.play-lab-link:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.level-label { margin: 12px 0 0; display: flex; justify-content: space-between; color: #4b4b48; }
.opening-line { min-height: 25px; margin: 5px 0 0; font-size: 16px; font-weight: 700; }

.diagram { position: relative; height: min(48vh, 400px); min-height: 355px; margin-top: 0; overflow: hidden; border-bottom: 2px solid var(--ink); }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route-line, .chosen-line { vector-effect: non-scaling-stroke; }
.route-line { fill: none; stroke: var(--line); stroke-width: 6; stroke-linejoin: round; stroke-linecap: square; }
.route-line.direct { stroke-dasharray: 13 8; }
.chosen-line { fill: none; stroke: var(--pink); stroke-width: 8; stroke-dasharray: 13 6; stroke-linejoin: round; stroke-linecap: butt; animation: draw-route .32s linear both; }
@keyframes draw-route { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }

.ticket, .source, .closed-booth { position: absolute; z-index: 3; text-align: left; background: var(--paper); }
.ticket { left: 1%; width: 29%; min-height: 64px; padding: 8px 7px; border: 2px solid var(--ink); cursor: grab; touch-action: none; transform: translateY(-50%); }
.ticket:active { cursor: grabbing; }
.ticket.selected { border-color: var(--pink); background: var(--pink); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.ticket.lit { border-color: var(--pink); box-shadow: 4px 4px 0 var(--pink); }
.ticket.travel { transform: translate(74px, -50%); transition: transform .22s ease-in; }
.ticket-name, .source-name { display: block; font-size: clamp(13px, 3.6vw, 16px); line-height: 1.02; font-weight: 700; }
.ticket-question { display: block; margin-top: 5px; font-size: 12px; line-height: 1.16; }
.ticket-totals { display: block; margin-top: 7px; padding-top: 5px; border-top: 1px solid var(--ink); font: 10px/1.35 var(--mono); }
.limits-label { display: block; margin-bottom: 2px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ticket-selected { display: block; margin-top: 7px; padding-top: 5px; border-top: 1px solid currentColor; font: 10px/1.2 var(--mono); font-weight: 700; }
.ticket-answer { display: inline-block; margin-top: 6px; padding: 2px 4px; border: 2px solid var(--pink); color: var(--pink); font: 10px var(--mono); font-weight: 700; transform: rotate(-3deg); }

.source { right: 1%; width: 29%; min-height: 64px; padding: 7px 6px 6px 9px; border: 2px solid var(--ink); cursor: pointer; transform: translateY(-50%); }
.source::before { content: ""; position: absolute; left: -11px; top: calc(50% - 5px); width: 10px; height: 10px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); }
.source.selected { border-color: var(--pink); color: var(--pink); }
.source.selected::before { border-color: var(--pink); }
.source.lit { border-color: var(--pink); box-shadow: 4px 4px 0 var(--pink); }
.source.lit::before { border-color: var(--pink); }
.source.unavailable { opacity: .55; }
.source.cannot-answer { color: #a9a9a4; border-color: #b9b9b4; }
.source.cannot-answer .fare, .source.cannot-answer::before { border-color: #b9b9b4; }
.fare { display: block; margin-top: 7px; padding: 4px; border: 1px solid var(--ink); font: 10px/1.3 var(--mono); }
.source.selected .fare { border-color: var(--pink); }

.closed-booth { z-index: 4; left: 35%; top: 38%; width: 30%; min-height: 112px; padding: 9px 7px 7px; border: 2px solid var(--ink); transform: rotate(-2deg); cursor: pointer; }
.closed-booth::before { content: ""; display: block; height: 11px; margin: -9px -7px 5px; background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 6px); border-bottom: 1px solid var(--ink); }
.closed-booth::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; background: linear-gradient(135deg, var(--paper) 49%, var(--ink) 50% 53%, var(--soft) 54%); }
.closed-line, .closed-head { display: block; font: 8px/1.15 var(--mono); letter-spacing: .05em; }
.closed-line { margin-bottom: 3px; font-weight: 700; }
.closed-head { color: #555552; }
.closed-quote { display: block; margin-top: 5px; font-size: clamp(10px, 3.1vw, 13px); line-height: 1.08; font-weight: 700; }
.station { fill: var(--paper); stroke: var(--line); stroke-width: 4; }
.station.chosen { stroke: var(--pink); }

.route-actions { min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--ink); }
.route-actions.empty { justify-content: flex-start; }
.status { flex: 1; margin: 0; font-size: 15px; line-height: 1.15; }
.status:not(:empty) { flex: 0 0 100%; }
.quiet-button { min-width: 44px; min-height: 44px; padding: 6px 11px; border: 2px solid var(--ink); background: transparent; font-size: 14px; font-weight: 700; }
.primary { min-width: 88px; min-height: 44px; padding: 8px 18px; border: 2px solid var(--pink); background: var(--pink); color: #fff; font-size: 16px; font-weight: 700; }
.primary[disabled] { opacity: .45; }
.coach { min-height: 31px; padding: 7px 0 0; color: var(--pink); font-size: 13px; font-weight: 700; }
.ghost-arrow { position: absolute; z-index: 5; left: 12%; top: 14%; color: var(--pink); font-size: 28px; line-height: 1; animation: point 1s ease-in-out infinite alternate; pointer-events: none; }
@keyframes point { to { transform: translateY(8px); } }

.result { min-height: calc(100svh - 22px); display: flex; flex-direction: column; }
.result-main { padding: 23px 0 10px; }
.result-title { margin: 0; font-size: clamp(35px, 11vw, 52px); line-height: .93; letter-spacing: -.06em; }
.result-ticket { position: relative; width: 78%; margin: 24px 0 14px 10%; padding: 13px 14px 12px; border: 2px solid var(--ink); background: var(--paper); }
.result-stamp { position: absolute; right: -17px; top: -15px; padding: 5px 7px; border: 3px solid var(--pink); color: var(--pink); background: var(--paper); font: 11px var(--mono); font-weight: 700; transform: rotate(-7deg); }
.result-request { font-size: 18px; line-height: 1.14; font-weight: 700; }
.result-route { margin: 0 0 14px; font: 11px/1.35 var(--mono); }
.result-route span, .score-line span { color: #50504d; }
.score-line { margin: 0; font: 15px/1.35 var(--mono); }
.score-line span { display: block; margin-top: 3px; font-size: 10px; }
.marks { display: grid; gap: 7px; margin: 17px 0; padding: 13px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.mark { display: grid; grid-template-columns: 26px 1fr; align-items: center; font-size: 16px; }
.mark-sign { color: var(--pink); font: 20px var(--mono); }
.level-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 18px 0 10px; }
.map-stop { height: 25px; border: 2px solid var(--line); font: 10px/21px var(--mono); text-align: center; }
.map-stop.current, .map-stop.done { border-color: var(--pink); }
.map-stop.done { background: var(--pink); color: #fff; }
.map-caption { margin: 0; font: 10px var(--mono); color: #50504d; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 12px; }
.result-actions .primary { width: 100%; }
.share-line { min-height: 34px; margin: 10px 0 0; font: 11px/1.35 var(--mono); }
details { margin-top: 14px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 0; }
summary { min-height: 28px; cursor: pointer; font-weight: 700; }
details p { margin: 6px 0 0; font-size: 14px; line-height: 1.35; }

@media (min-width: 640px) {
  .shell { padding-left: 18px; padding-right: 18px; }
  .diagram { height: 430px; }
  .ticket, .source { width: 26%; }
  .closed-booth { left: 37%; width: 26%; }
}
@media (max-width: 340px) {
  .shell { padding-left: 8px; padding-right: 8px; }
  .ticket-question { font-size: 10px; }
  .ticket-totals, .fare { font-size: 9px; }
  .source { padding-left: 6px; }
  .closed-booth { padding-left: 5px; padding-right: 5px; }
  .closed-quote { font-size: 10px; }
  .wordmark { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* First-minute picture pass. The map stays deliberately small enough to be read
   as one phone-sized board rather than a form with controls below it. */
.masthead { grid-template-columns: 1fr auto auto; }
.level-label { display: block; margin: 10px 0 4px; min-height: 15px; }
.opening-line { display: block; min-height: 24px; margin: 5px 0 3px; font-size: 16px; line-height: 1.2; font-weight: 700; }
.coach { display: none; }
.diagram { height: min(48svh, 370px); min-height: 368px; margin-top: 0; }
.ticket { left: 1%; width: 32%; min-height: 94px; padding: 8px; border-width: 2px; touch-action: none; }
.ticket-question { margin: 0; font-size: clamp(12px, 3.3vw, 14px); line-height: 1.13; font-weight: 700; }
.ticket-totals { margin-top: 7px; padding-top: 5px; border-top: 1px solid currentColor; }
.ticket-icons, .source-icons { display: flex; align-items: center; gap: 3px; min-height: 18px; }
.metric-copy { white-space: nowrap; font: 10px/1.2 var(--mono); letter-spacing: -.025em; }
.clock, .coin, .lock { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }
.clock svg, .coin svg, .lock svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pips { display: inline-flex; gap: 2px; margin-right: 2px; }
.pips i { display: block; width: 5px; height: 5px; border: 1.5px solid currentColor; border-radius: 50%; }
.pips i.filled { background: currentColor; }
.lock.open .shackle { transform: rotate(-30deg); transform-origin: 6px 10px; }
.ticket.selected .lock.open, .preview-target .lock.open { color: var(--pink); }
.ticket.selected { color: #fff; }
.ticket .stamp, .ticket-answer { display: inline-block; margin-top: 5px; padding: 2px 4px; border: 2px solid var(--pink); color: var(--pink); background: var(--paper); font: 9px var(--mono); font-weight: 700; transform: rotate(-5deg); }
.failure-mark { position: absolute; right: 5px; bottom: 4px; color: var(--pink); font: 27px/1 var(--mono); }

.source { right: 1%; width: 33%; min-height: 100px; padding: 7px 6px; display: block; }
.source::before { left: -13px; top: calc(50% - 8px); width: 16px; height: 16px; border-width: 3px; }
.source-name { display: block; min-height: 29px; margin-left: 43px; font-size: clamp(12px, 3.2vw, 15px); line-height: 1.04; }
.source-note { display: block; margin: 2px 0 0 43px; color: var(--pink); font: 10px/1.1 var(--mono); font-weight: 700; }
.source .fare { position: absolute; right: 6px; bottom: 6px; left: 6px; margin: 0; padding: 0; border: 0; }
.station-art { position: absolute; bottom: 28px; left: 4px; width: 39px; height: 37px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.source-icons { gap: 4px; width: 100%; }
.source-icons .pips { gap: 1px; margin-right: 1px; }
.source-icons .pips i { width: 5px; height: 5px; }
.answer-slot { width: 12px; height: 12px; border: 2px solid currentColor; margin-left: 2px; }
.source.selected .answer-slot { background: currentColor; }
.source.cannot-answer { opacity: .55; }
.crossed { position: absolute; right: 4px; bottom: 2px; color: var(--pink); font-size: 18px; font-weight: 700; }
.preview-target { border-color: var(--pink); box-shadow: 3px 3px 0 var(--pink); }
.source.lit { background: #fff5fa; }
.source.lit::after { content: ""; position: absolute; z-index: -1; inset: -7px; border: 2px solid var(--pink); opacity: .45; animation: target-pulse 1s ease-in-out infinite alternate; pointer-events: none; }
@keyframes target-pulse { to { inset: -11px; opacity: .16; } }

.closed-booth { left: 36%; top: 38%; width: 30%; min-height: 94px; padding: 4px; display: grid; align-content: center; justify-items: center; gap: 1px; font: 10px var(--mono); font-weight: 700; z-index: 5; }
.first-route .closed-booth { top: 66%; }
.closed-booth::before, .closed-booth::after { content: none; }
.robot-booth { width: 60px; height: 43px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.closed-quote { display: block; max-width: 92%; margin: 0; text-align: center; font: 9px/1.08 var(--mono); font-weight: 400; letter-spacing: -.025em; }
.robot-booth .hatch { fill: var(--soft); }
.robot-booth text { stroke: none; fill: var(--ink); font: 13px var(--mono); }
.robot .shutter { stroke-width: 3; }
.robot.peek path:nth-child(3) { stroke: var(--pink); stroke-width: 3; }
.robot.peek { animation: robot-peek .28s steps(2) 4; }
@keyframes robot-peek { 50% { transform: translateY(-3px); } }

.route-line { stroke-width: 4; opacity: .55; }
.chosen-line { stroke-width: 6; }
.ghost-route { fill: none; stroke: var(--pink); stroke-width: 4; stroke-dasharray: 7 6; vector-effect: non-scaling-stroke; pointer-events: none; }
.tram { fill: var(--pink); stroke: var(--ink); stroke-width: 2; }

#demoHand { position: absolute; z-index: 10; left: 22%; top: 54%; width: 52px; height: 52px; pointer-events: none; animation: hand-ride 3.5s ease-in-out infinite; }
#demoHand svg { width: 100%; height: 100%; overflow: visible; }
#demoHand .cuff { fill: var(--pink); stroke: var(--ink); stroke-width: 2; }
#demoHand .hand-line { fill: var(--paper); stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-ticket { animation: ticket-ride 3.5s ease-in-out infinite; z-index: 6; }
.demo-route { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; pointer-events: none; animation: demo-route 3.5s ease-in-out infinite; }
.demo-route path { fill: none; stroke: var(--pink); stroke-width: 5; stroke-dasharray: 10 6; vector-effect: non-scaling-stroke; }
.demo-ask { position: absolute; z-index: 7; right: 3%; bottom: 5px; min-width: 60px; min-height: 34px; padding: 8px; border: 2px solid var(--pink); color: #fff; background: var(--pink); text-align: center; font-weight: 700; opacity: 0; animation: demo-ask 3.5s ease-in-out infinite; }
.demo-ask::after { content: "Ask"; }
.demo-stamp { position: absolute; z-index: 8; right: 4%; top: 16%; padding: 4px; border: 2px solid var(--pink); color: var(--pink); background: var(--paper); font: 9px var(--mono); font-weight: 700; transform: rotate(-7deg); opacity: 0; animation: demo-stamp 3.5s ease-in-out infinite; }
.demo-stamp::after { content: "ANSWERED"; }
@keyframes hand-ride { 0%, 10% { transform: translate(0, 0) rotate(-4deg); } 28% { transform: translate(42px, -108px) rotate(3deg); } 54% { transform: translate(178px, -108px) rotate(3deg); } 65% { transform: translate(182px, -18px) rotate(3deg); } 74%, 100% { transform: translate(0, 0) rotate(-4deg); } }
@keyframes ticket-ride { 0%, 12% { transform: translateY(-50%); } 28% { transform: translate(112px, calc(-50% - 86px)); } 54% { transform: translate(195px, calc(-50% - 86px)); } 65% { transform: translate(195px, -50%); } 74%, 100% { transform: translateY(-50%); } }
@keyframes demo-route { 0%, 10%, 74%, 100% { opacity: 0; } 18%, 68% { opacity: 1; } }
@keyframes demo-ask { 0%, 48%, 72%, 100% { opacity: 0; } 54%, 64% { opacity: 1; } }
@keyframes demo-stamp { 0%, 62%, 73%, 100% { opacity: 0; } 66%, 70% { opacity: 1; } }

.result-main { padding: 14px 0 8px; }
.result-title { font-size: clamp(34px, 11vw, 50px); }
.result-note { margin: 3px 0 12px; font: 12px var(--mono); }
.result-tickets { display: grid; gap: 10px; }
.result-ticket { width: 86%; min-height: 74px; margin: 0 auto; padding: 11px 14px; }
.result-request { font-size: 15px; line-height: 1.15; }
.result-stamp, .stamp { border-color: var(--pink); color: var(--pink); }
.stamp { animation: stamp-land .18s linear 2; }
@keyframes stamp-land { 25% { transform: translate(2px, -2px) rotate(-7deg); } 65% { transform: translate(-2px, 2px) rotate(-7deg); } }
.reaction-scene { display: flex; align-items: end; gap: 12px; min-height: 72px; margin: 12px 0; padding: 5px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.reaction-scene .station-art { position: static; width: 52px; height: 48px; }
.mini-station { font-size: 12px; font-weight: 700; }
.station-art.nod { animation: nod .45s ease-in-out 2; }
.station-art.forum-look { transform: rotate(-4deg); }
@keyframes nod { 50% { transform: translateY(3px); } }
.score-dots { display: flex; gap: 8px; min-height: 22px; }
.score-dots i { width: 17px; height: 17px; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); }
.share { margin-top: 9px; }
details, .level-map, .map-caption, .marks, .result-route, .score-line { display: none; }

@media (max-width: 340px) {
  .diagram { min-height: 350px; }
  .ticket { width: 33%; padding: 6px 5px; }
  .source { width: 34%; }
  .station-art { width: 34px; }
  .closed-booth { left: 36%; width: 30%; }
  .robot-booth { width: 60px; }
  #demoHand { left: 20%; }
  @keyframes hand-ride { 0%, 10% { transform: translate(0, 0) rotate(-4deg); } 28% { transform: translate(38px, -102px) rotate(3deg); } 54% { transform: translate(148px, -102px) rotate(3deg); } 65% { transform: translate(152px, -18px) rotate(3deg); } 74%, 100% { transform: translate(0, 0) rotate(-4deg); } }
  @keyframes ticket-ride { 0%, 12% { transform: translateY(-50%); } 28% { transform: translate(92px, calc(-50% - 82px)); } 54% { transform: translate(160px, calc(-50% - 82px)); } 65% { transform: translate(160px, -50%); } 74%, 100% { transform: translateY(-50%); } }
}
@media (prefers-reduced-motion: reduce) {
  #demoHand, .demo-ticket, .demo-route, .demo-ask, .demo-stamp, .robot.peek, .stamp, .station-art.nod { animation: none !important; }
  #demoHand.still { left: 22%; top: 54%; }
  #demoHand.still ~ .demo-route { opacity: 1; }
  #demoHand.still ~ .demo-route path { stroke-dasharray: 2 5; }
  #demoHand.still ~ .demo-ask { opacity: 0; }
  .source.lit { box-shadow: 0 0 0 4px var(--pink); }
  .source.lit::after { animation: none; inset: -7px; opacity: .45; }
}

.credit { margin: 18px 0 0; font-size: 12px; line-height: 1.45; opacity: .7; }

/* Day-planning pass. The old route map stays as a quiet transit vocabulary,
   while choices now sit directly on the stations. */
:root { --red: #b9273c; --blue: #155c78; --mist: #e6ecea; --sun: #f3bc4f; }
.shell { width: min(100%, 680px); padding: max(10px, env(safe-area-inset-top)) 12px 28px; }
.topbar { display: flex; min-height: 54px; align-items: center; gap: 8px; border-bottom: 2px solid var(--ink); }
.brand { display: flex; flex: 0 0 120px; min-width: 0; min-height: 44px; align-items: center; gap: 5px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand svg { width: 27px; height: 27px; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.top-control { min-width: 44px; min-height: 44px; padding: 5px 7px; border: 0; background: transparent; font: 11px/1.1 var(--mono); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.top-control.how { margin-left: auto; font-size: 10px; }
.goal-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px 0 8px; }
.eyebrow { margin: 0 0 3px; color: var(--blue); font: 10px/1.2 var(--mono); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.goal { max-width: 275px; margin: 0; font-size: clamp(18px, 5.2vw, 24px); line-height: 1.04; font-weight: 800; letter-spacing: -.04em; }
.rule { margin: 7px 0 0; font-size: 14px; font-weight: 700; }
.goal-stars { color: var(--sun); font-size: 20px; text-align: right; text-shadow: 1px 1px var(--ink); white-space: nowrap; }
.goal-stars small { display: block; color: var(--ink); font: 11px var(--mono); text-shadow: none; }
.meters { position: sticky; z-index: 4; top: 0; display: grid; grid-template-columns: 1.1fr .9fr 1.2fr; gap: 7px; margin: 0 -3px 6px; padding: 7px 3px; border-top: 1px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--paper); }
.meters > div { min-height: 43px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px; }
.meters small { grid-column: 1 / -1; font: 9px var(--mono); font-weight: 800; letter-spacing: .08em; }
.meters strong { font: 12px var(--mono); }
.battery { display: block; height: 15px; border: 2px solid var(--ink); border-radius: 2px; padding: 2px; background: #fff; }
.battery::after { content: ''; position: absolute; width: 3px; height: 7px; margin: 2px 0 0 2px; background: var(--ink); }
.battery i { display: block; height: 100%; background: var(--blue); transition: width .18s; }
.cup { display: grid; width: 23px; height: 24px; place-items: center; border-bottom: 3px solid var(--ink); color: #9da9ac; font-size: 24px; line-height: 1; }
.cup.full { color: var(--red); }
.home-thing strong { max-width: 80px; overflow: hidden; font-size: 12px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.home-thing em { color: var(--red); font: 12px var(--mono); font-style: normal; }
.day-line { position: relative; margin: 0 5px; padding: 7px 0 12px 32px; border-left: 6px solid #949c9d; }
.station { position: relative; display: grid; grid-template-columns: 1fr; margin: 0 0 12px -38px; padding: 0 0 5px 38px; }
.station::before { content: ''; position: absolute; z-index: 0; top: 20px; left: 0; width: 38px; border-top: 3px solid #949c9d; }
.dot { position: absolute; z-index: 1; top: 5px; left: -11px; display: grid; width: 24px; height: 24px; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 14px; }
.dot.wanted { color: var(--sun); text-shadow: 1px 1px var(--ink); }
.station-copy { display: flex; min-height: 31px; align-items: baseline; gap: 7px; }
.station-index { color: var(--blue); font: 11px var(--mono); font-weight: 800; }
.station h2 { margin: 0; font-size: 17px; line-height: 1.05; letter-spacing: -.025em; }
.picked { margin-left: auto; color: var(--blue); font: 10px var(--mono); font-weight: 800; }
.no-stamp, .no-mini { padding: 2px 4px; border: 2px solid var(--red); color: var(--red); background: var(--paper); font: 10px var(--mono); font-weight: 900; transform: rotate(-5deg); }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; min-height: 0; margin-top: 6px; }
.choice { min-width: 76px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; border: 2px solid var(--ink); background: #fff; font-size: 14px; }
.choice b { font-size: 14px; }
.choice.detour { border-color: var(--blue); color: var(--blue); }
.choice.no { border-color: var(--red); }
.choice:disabled { opacity: .35; }
.bars { display: inline-flex; gap: 2px; align-items: end; }
.bars i { display: block; width: 4px; height: 10px; background: currentColor; }
.loud { color: var(--red); font-size: 17px; line-height: 1; }
.home-stop { display: flex; align-items: center; gap: 7px; min-height: 45px; margin: 5px 0 0 -39px; padding-left: 38px; font-size: 17px; }
.home-stop span { position: absolute; left: -11px; display: grid; width: 24px; height: 24px; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: var(--sun); }
.hint, .reason { margin: 0; padding: 8px 0; border-top: 1px solid var(--ink); font-size: 12px; line-height: 1.3; }
.reason { color: var(--red); font-weight: 700; }
#result-screen, #levels-screen { padding: 18px 0; }
#result-screen h1, #levels-screen h1 { margin: 8px 0 14px; font-size: clamp(28px, 8vw, 42px); line-height: .98; letter-spacing: -.055em; }
.result-illustration { display: flex; align-items: end; justify-content: center; gap: 10px; min-height: 100px; margin: 10px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); font-size: 75px; }
.result-illustration span:last-child { color: var(--sun); font-size: 38px; }
.result-illustration.lit { background: #fff6d8; }
.result-score { font: 13px var(--mono); }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 10px; }
.primary, .share, .daily button { min-height: 46px; border: 2px solid var(--ink); background: var(--blue); color: #fff; font-weight: 800; }
.share { width: 100%; background: transparent; color: var(--ink); }
.why { margin-top: 16px; }
.why p { max-width: 350px; font-size: 13px; line-height: 1.4; }
.day-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.day-button { position: relative; min-height: 92px; padding: 8px; border: 2px solid var(--ink); background: #fff; text-align: left; }
.day-button.current { border-color: var(--blue); box-shadow: 4px 4px 0 var(--blue); }
.day-button b { display: block; color: var(--red); font: 13px var(--mono); }
.day-button span { display: block; margin: 3px 0; font-size: 14px; font-weight: 800; }
.day-button small { display: block; font-size: 10px; line-height: 1.15; }
.day-button i { position: absolute; right: 7px; top: 7px; color: var(--blue); font-style: normal; font-weight: 900; }
#levels-screen h2 { margin: 22px 0 6px; font-size: 18px; }
.daily { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.daily button { background: transparent; color: var(--ink); }
.table-note, table, .change { font-size: 11px; line-height: 1.3; }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); }
th, td { padding: 5px 3px; border-bottom: 1px solid var(--ink); text-align: left; }
.change { margin-top: 13px; color: var(--blue); font-weight: 800; }
.choice.unavailable { opacity: .45; border-style: dashed; }
.choice.unavailable.juice-down { opacity: .7; }
.reason { min-height: 32px; }
.settings-open { font-size: 21px; text-decoration: none; }
#settings-screen { padding: 18px 0; }
#settings-screen h1 { margin: 8px 0; font-size: 34px; line-height: 1; }
.settings-note { margin: 0 0 22px; font-size: 14px; }
.setting-row { display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: space-between; padding: 8px 4px; border: 0; border-top: 1px solid var(--ink); background: transparent; text-align: left; font-size: 17px; font-weight: 700; }
.setting-row:last-of-type { border-bottom: 1px solid var(--ink); }
.setting-row strong { min-width: 48px; padding: 5px 7px; border: 2px solid var(--ink); color: var(--blue); text-align: center; font: 700 14px var(--mono); }
.setting-row[aria-pressed="false"] strong { color: var(--ink); background: var(--mist); }
.settings-done { width: 100%; margin-top: 22px; }
summary { min-height: 44px; display: flex; align-items: center; }
:root { --juice-c1: var(--red); --juice-c2: var(--blue); --juice-c3: var(--sun); --juice-c4: var(--ink); }
.juice-number--good { color: var(--blue); }
.juice-reduced *, .juice-reduced *::before, .juice-reduced *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
@media (max-width: 390px) {
  .topbar { gap: 8px; }
  .brand { flex: 1 1 auto; min-width: 100px; font-size: 13px; line-height: 1; }
  .brand svg { width: 24px; height: 24px; flex: 0 0 24px; }
  .top-control { flex: 0 0 44px; padding: 3px; }
  .top-control.how { margin-left: 0; font-size: 18px; text-decoration: none; }
}
.modal-shade { position: fixed; z-index: 20; inset: 0; display: grid; align-items: center; justify-items: center; padding: 16px; overflow-y: auto; background: rgba(247,247,243,.92); }
.howto-card { max-height: calc(100dvh - 32px); overflow-y: auto; box-sizing: border-box; width: min(100%, 390px); padding: 17px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 7px 7px 0 var(--red); }
.howto-card h1 { margin: 0 0 8px; font-size: 29px; letter-spacing: -.05em; }
.howto-card svg { width: 100%; min-height: 120px; margin: 0 0 6px; }
.howto-card .guide-icon { position: absolute; width: 86px; height: 86px; margin: 12px 0 0 15px; opacity: .12; }
.howto-card ul { margin: 0 0 15px; padding-left: 20px; font-size: 15px; line-height: 1.35; }
.howto-card .primary { width: 100%; }
@media (max-width: 340px) { .shell { padding-left: 8px; padding-right: 8px; } .brand { min-width: 96px; font-size: 14px; } .top-control { padding: 4px; font-size: 10px; } .top-control.settings-open { font-size: 21px; } .top-control.how { font-size: 0; } .top-control.how::after { content: '?'; font-size: 18px; } .choice { min-width: 71px; padding: 6px; } .goal { font-size: 18px; } .station h2 { font-size: 16px; } }
