/* Shared interaction tokens. LEGO branding remains in lego.css; the device uses fixed px. */
:root{--background:#fff;--foreground:#202020;--surface:#f7f7f8;--border:#dedee2;--muted-foreground:#61636a;--primary:var(--moss);--primary-foreground:#fff;--focus:#006db7;--success:#176b3d;--destructive:#a52b20;--control-radius:.5rem}
html{scroll-behavior:smooth;scroll-padding-top:1.5rem}body{line-height:1.5}body main>*{min-width:0}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
body header{height:auto;min-height:88px;gap:1rem}body .brand{min-width:0}body .brand svg{flex-shrink:0}body .brand span{min-width:0}body .brand small{line-height:1.5}body .header-right{flex-shrink:0;gap:.75rem}body .icon-button{width:44px;height:44px;font-size:1rem;margin-left:0;flex-shrink:0}body .variant-link{min-height:44px;display:inline-flex;align-items:center;padding:.5rem .8rem;font-size:.75rem;margin-right:0}
body main{max-width:1180px;grid-template-columns:480px minmax(0,1fr);padding:2.5rem clamp(1rem,4vw,3rem) 3rem;gap:2rem 3rem;align-items:start;min-height:0}
body .intro{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:.5rem 3rem;text-align:left;align-items:center;padding-bottom:1.75rem;border-bottom:1px solid var(--line)}
body .eyebrow{grid-column:1;font-size:.625rem;letter-spacing:.1em;font-weight:700;margin:0;color:var(--moss)}
body .intro h1{grid-column:1;grid-row:2/4;font-family:inherit;font-weight:700;font-size:2.5rem;line-height:1.13;letter-spacing:-.05em;margin:0;max-width:18ch}
body.lego-page .intro h1{font-weight:900}body .intro h1 em{font-weight:inherit}body .intro h1 br{display:none}
body .intro>p{grid-column:2;grid-row:2;font-size:.9375rem;line-height:1.7;color:var(--muted-foreground);margin:0;max-width:42ch}
.jump-links{grid-column:2;display:flex;flex-wrap:wrap;gap:.25rem 1rem}.jump-links a{font-size:.8125rem;color:var(--moss);font-weight:500;text-underline-offset:4px;min-height:36px;display:inline-flex;align-items:center}
body .device-area{background:var(--surface);border:1px solid var(--border);border-radius:1rem;align-self:start}
body .device-caption{color:#60636a;line-height:1.6}
body .journey{width:100%;max-width:none;margin:0;align-self:start;min-width:0}
body .journey-heading{font-size:.75rem;letter-spacing:.08em;margin:0 0 .25rem;min-height:44px;color:var(--foreground)}body .journey-heading .text-button{font-size:.8125rem;min-height:44px;padding:.5rem .75rem;border:1px solid var(--border);border-radius:var(--control-radius);background:var(--background);font-weight:500;color:var(--foreground)}
body .steps{display:block;margin:0 0 1.25rem}.progress-summary{display:flex;justify-content:space-between;gap:1rem;font-size:.75rem;color:var(--muted-foreground);font-variant-numeric:tabular-nums;margin-bottom:.5rem}.progress-summary span:last-child{flex-shrink:0}
progress{appearance:none;display:block;width:100%;height:6px;border:0;border-radius:4px;overflow:hidden;background:#e5e6e9}progress::-webkit-progress-bar{background:#e5e6e9}progress::-webkit-progress-value{background:var(--moss)}progress::-moz-progress-bar{background:var(--moss)}
.next-step{display:flex;flex-direction:column;gap:.25rem;background:var(--surface);border:1px solid var(--border);border-inline-start:4px solid var(--moss);padding:1rem 1.25rem;margin-bottom:1.25rem;border-radius:0 var(--control-radius) var(--control-radius) 0}.next-label{font-size:.625rem;font-weight:700;letter-spacing:.1em;color:var(--muted-foreground)}
body .next-step h2{font-weight:700;font-family:inherit;font-size:1.125rem;line-height:1.35;letter-spacing:-.02em;margin:0;color:var(--foreground)}body .next-step p{font-size:.8125rem;line-height:1.7;color:var(--muted-foreground);margin:0}
body .simulation{margin-bottom:1.25rem;border:1px solid var(--border);border-radius:var(--control-radius);background:var(--surface);min-width:0}.map-heading{padding:1rem 1rem .5rem;gap:1rem}.map-heading h2{font-family:inherit;font-size:.875rem;font-weight:700;letter-spacing:0;margin:0;line-height:1.4}.map-heading strong{font-size:.75rem;border:1px solid var(--border);background:var(--background);padding:.2rem .55rem;border-radius:2rem;white-space:nowrap;flex-shrink:0;color:var(--muted-foreground)}
body .museum-map{width:100%;max-height:280px;height:auto;aspect-ratio:320/220}.map-beacon:not(.target) .scan-zone{display:none}.map-beacon .beacon-wave{opacity:.5}.map-beacon:not(.target) .beacon-marker{fill:#b4bdc7;stroke:#fff}.map-beacon:not(.target) text{fill:#26323e}.map-beacon.collected .beacon-marker{fill:#176b3d}.map-beacon.collected text{fill:#fff}.map-beacon.target .beacon-marker{stroke-width:2}.player-marker{stroke-width:2.5}.map-player text{font-size:8px}
body .map-bottom{display:flex;flex-wrap:wrap;padding:.5rem 1rem 0;gap:.75rem;align-items:flex-start}.map-key{flex:1 1 100%;align-items:flex-start;min-width:0;font-size:.8125rem;line-height:1.6;color:var(--muted-foreground)}.map-key i{margin-top:.4em;flex-shrink:0}.map-key span{overflow-wrap:anywhere;min-width:0}.map-direction-controls{display:flex;gap:.5rem}.map-direction-controls button{width:44px;height:44px;border-radius:var(--control-radius);border-color:#b8bec5;background:var(--background);color:#30353c}.map-direction-controls svg{width:20px;height:20px}body #map-instructions{font-size:.75rem;line-height:1.7;color:var(--muted-foreground);margin:.75rem 1rem}.map-legend{display:flex;flex-wrap:wrap;gap:.5rem 1rem;border-top:1px solid var(--border);padding:.75rem 1rem;font-size:.6875rem;color:var(--muted-foreground)}.map-legend span{display:flex;align-items:center;gap:.4rem}.map-legend i{width:9px;height:9px;flex-shrink:0;border-radius:50%;display:block}.legend-player{background:#006db7}.legend-target{background:#ffcf00;border:1px solid #333}.legend-zone{border:1px dashed var(--moss)}
body .station-panel{padding:1.5rem;border:1px solid var(--border);border-top:4px solid var(--moss);border-radius:var(--control-radius);background:var(--background);min-width:0}.lego-page .station-panel{border-top-color:#ffcf00}body .panel-kicker{font-size:.6875rem;letter-spacing:.08em;margin-bottom:.75rem;color:var(--moss)}body .station-panel h2{font-family:inherit;font-size:1.5rem;font-weight:700;line-height:1.3;letter-spacing:-.035em;margin:0 0 .75rem;overflow-wrap:anywhere}body .station-panel p{font-size:.875rem;line-height:1.75;color:var(--muted-foreground);margin:0 0 1rem;overflow-wrap:anywhere}
body .primary,body .secondary{font-family:inherit;font-size:.875rem;line-height:1.5;min-height:44px;height:auto;padding:.75rem 1rem;border-radius:var(--control-radius);white-space:normal;overflow-wrap:anywhere;font-weight:500}body .secondary{border:1px solid var(--border);color:var(--foreground);background:var(--background)}body .secondary:hover{background:var(--surface);color:var(--foreground)}body .primary:disabled{background:#e3e5e8;color:#626973;border-color:#b7bdc5;opacity:1}.tile-actions{display:flex;flex-direction:column;gap:.5rem;margin-top:1rem}.tile-actions .secondary{margin:0}
body .station-panel .scan-hint{font-size:.8125rem;line-height:1.7;margin:0 0 .75rem;color:var(--muted-foreground)}
.simulation-checks{margin-top:1rem;border-top:1px solid var(--border);padding-top:.75rem}.simulation-checks summary{font-size:.75rem;color:var(--muted-foreground);cursor:pointer;min-height:36px;display:list-item;align-content:center;list-style-position:inside}.simulation-checks p{font-size:.75rem!important}
.answer-choices{display:flex;flex-direction:column;gap:.625rem}body .option{display:flex;align-items:flex-start;width:100%;gap:.75rem;padding:.875rem;border:1px solid var(--border);border-radius:var(--control-radius);background:var(--background);color:var(--foreground);text-align:start;font-family:inherit;font-size:.875rem;line-height:1.6;min-height:48px}body .option:hover{border-color:var(--moss);background:var(--surface)}body .option b{flex:0 0 28px;height:28px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);border-radius:.25rem;font-size:.8125rem;font-weight:700;color:var(--foreground)}body .option span{min-width:0;overflow-wrap:anywhere}.option.incorrect{border-color:var(--destructive);border-inline-start-width:4px}body .station-panel .keyboard-hint{font-size:.75rem;margin:1rem 0 0}.keyboard-hint kbd{font:inherit;border:1px solid var(--border);border-radius:3px;padding:.05rem .3rem;background:var(--surface)}
body .station-panel .notice{margin:1rem 0 0!important;border:1px solid var(--border);border-inline-start:3px solid var(--moss);padding:.75rem 1rem;border-radius:.25rem;background:var(--surface);font-size:.8125rem;color:var(--foreground)!important}body .station-panel .notice-error{border-inline-start-color:var(--destructive);color:var(--destructive)!important}body .station-panel .notice-success{border-inline-start-color:var(--success);color:var(--success)!important}
.return-checks{border:0;padding:0;margin:0 0 1rem;min-width:0}.return-checks legend{font-weight:500;font-size:.875rem;margin-bottom:.5rem}body .check-row{font-size:.875rem;line-height:1.7;display:flex;align-items:flex-start;gap:.75rem;min-height:44px;margin:.25rem 0;padding:.5rem 0}.check-row input{width:20px;height:20px;flex-shrink:0;margin-top:.15rem}
body .hint{padding:.875rem .25rem 0;gap:.75rem}body .hint svg{flex-shrink:0}body .hint p{font-size:.75rem;line-height:1.7;color:var(--muted-foreground)}body footer{font-size:.75rem;gap:1rem;min-height:88px}body footer .text-button{min-height:44px;font-size:.75rem}body .footer-spec{font-size:.625rem}
body dialog{max-height:85dvh;overflow-y:auto;width:min(560px,calc(100% - 2rem));padding:1.5rem}body dialog h2{font-family:inherit;font-size:1.5rem;line-height:1.4;padding-inline-end:1.5rem}body dialog p,body dialog li{font-size:.9375rem;line-height:1.75}body dialog img{height:auto;width:100%}body .close-dialog{width:44px;height:44px;line-height:1;font-size:1.75rem}.dialog-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}.dialog-actions button{flex:1 1 160px;margin:0}
body.lego-page .next-step{border-inline-start-color:#006db7}.lego-page .journey-heading .text-button[aria-pressed=true]{background:#201d48;border-color:#201d48;color:#fff}
body .device-area{position:sticky;top:1.5rem;align-self:start}
@media(max-width:1000px){body main{grid-template-columns:minmax(0,1fr);gap:1.75rem;max-width:700px}body .intro{grid-template-columns:1fr;gap:.625rem;padding-bottom:1.25rem}body .intro h1{grid-column:1;grid-row:auto;max-width:24ch;font-size:2.25rem}body .intro>p{grid-column:1;grid-row:auto;max-width:48ch}body .jump-links{grid-column:1}body .intro h1 br{display:none}body .journey{max-width:none}body .device-area{justify-self:center}body .device-caption:after{content:' • A–D buttons and NFC pad are interactive';font-size:9px}}
@media(max-width:600px){body header{padding:1rem 5%;flex-wrap:wrap;gap:1rem}body .brand{font-size:.75rem;gap:.75rem}body .brand small{font-size:.625rem}body .brand svg{width:36px;height:36px}body .header-right{font-size:0;gap:.75rem;margin-left:auto}body .header-right .demo-dot{display:none}body .header-right .variant-link{font-size:.6875rem}body main{padding:1.5rem 5% 2rem;gap:1.5rem}body .intro h1{font-size:2rem}body .intro>p{font-size:.875rem}body .journey{max-width:none}body .station-panel{padding:1.125rem}body .station-panel h2{font-size:1.375rem}body .next-step{padding:1rem}body .device-area{border-radius:.75rem}body .device-caption:after{content:' • Scroll sideways to see the full handheld'}body footer{padding:1rem 5%}body .map-key{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

@media(min-width:1001px){body .device-area{grid-column:1;grid-row:2}body .journey{grid-column:2;grid-row:2}}

.map-heading{flex-wrap:wrap}.map-heading h2{min-width:0;overflow-wrap:anywhere}

.jump-links{grid-row:3}.map-heading h2{flex:1}.map-collapse{border:0;background:transparent;color:var(--moss);font:inherit;font-size:.75rem;min-height:44px;padding:.5rem;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.map-collapsed #map-content{display:none}@media(max-width:1000px){.jump-links{grid-row:auto}}

.player-marker,.player-halo{fill:#006db7}.map-player text{fill:#006db7}.legend-target{background:var(--moss)}.lego-page .legend-target{background:#ffcf00}

body .device{line-height:normal}

#next-action:empty{display:none}#next-action .secondary{width:auto;margin-top:.75rem;background:var(--background);padding:.5rem .875rem}

/* Reserve the same space for every next-step message, including tile actions. */
body .next-step{height:12rem;min-height:12rem;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin}
body .next-step>*{flex-shrink:0}
#next-action:not(:empty){margin-top:auto}
