.crossing-page { background:#f4f8f5; --ink:#173d4c; --line:#cededb; --blue:#075fbd; --muted:#577079; }
.crossing-page .site-header { background:#fffdf8; }
.crossing-game { width:min(1500px,calc(100% - 64px)); margin:0 auto 28px; color:var(--ink); }
.crossing-game .breadcrumbs { margin:17px 0 12px; font-size:14px; }
.crossing-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.crossing-heading h1 { margin:0; font-size:clamp(26px,3vw,36px); line-height:1.15; letter-spacing:-.7px; color:var(--ink); }
.crossing-heading p { font-size:16px; color:var(--muted); margin:7px 0 0; }
.free-play-label { background:#e3eee8; color:#365f51; padding:7px 13px; border-radius:30px; font-size:13px; font-weight:800; white-space:nowrap; }
.crossing-toolbar { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.audio-controls { display:flex; gap:6px; flex-shrink:0; }
.audio-controls button { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.audio-controls button[aria-pressed="true"], #camera[aria-pressed="true"] { background:#d9e8df; border-color:#8ca99b; }
#music > span:first-child { font-size:22px; line-height:1; }
.layout-options { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.layout-options[hidden] { display:none; }
.layout-options button { min-height:44px; padding:7px 12px; }
.layout-options button[aria-pressed="true"] { background:#d9e8df; border-color:#8ca99b; color:#204e43; }
#route-note { font-size:12px; color:var(--muted); margin-left:7px; }
.situation-options { display:flex; gap:6px; flex-wrap:wrap; }
.crossing-game button { min-height:44px; padding:9px 14px; background:#fffdf8; border:1px solid var(--line); color:var(--ink); border-radius:10px; font-size:14px; cursor:pointer; }
.crossing-game button:hover { background:#e6f0eb; }
.crossing-game button:disabled { cursor:default; opacity:.55; }
.situation-options button { color:#53696e; background:transparent; border-color:transparent; }
.situation-options button[aria-pressed="true"] { color:#fff; background:#245e54; border-color:#245e54; }
.crossing-game #sound { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.crossing-game button img { width:19px; height:19px; }
.playfield { height:clamp(370px,calc(100dvh - 345px),740px); position:relative; overflow:hidden; border-radius:18px; background:#d8edf2; border:1px solid #d0dfd8; isolation:isolate; }
#world { position:absolute; inset:0; outline-offset:-4px; touch-action:none; }
#world canvas { width:100%; height:100%; display:block; }
.world-hud { position:absolute; top:18px; left:18px; right:18px; display:flex; justify-content:space-between; gap:12px; pointer-events:none; }
.objective, #signal-status { align-self:start; background:#fffdf8ed; border:1px solid #fff9; border-radius:9px; padding:9px 13px; box-shadow:0 2px 8px #173d4c09; font-size:13px; font-weight:850; }
.objective { flex-shrink:0; white-space:nowrap; }.objective span { color:#25846a; margin-right:6px; }
#signal-status[data-signal="walk"] { background:#e2f1e4ed; color:#1d6846; }
#signal-status[data-signal="hand"], #signal-status[data-signal="changing"] { color:#835224; }
#emergency-cue { position:absolute; top:62px; left:18px; right:18px; margin:0 auto; width:fit-content; max-width:calc(100% - 36px); padding:9px 13px; color:#70452f; background:#fff0d9f5; border-radius:9px; font-size:14px; font-weight:800; }
#emergency-cue span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:50%; background:#cc744b; color:white; margin-right:6px; }
.scene-panel { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(360px,calc(100% - 36px)); padding:25px; text-align:center; background:#fffdf8f5; border:1px solid #fff; border-radius:16px; box-shadow:0 14px 50px #163c4325; }
.scene-panel .panel-eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:1.1px; color:#4a7865; font-weight:900; }
.scene-panel h2 { font-size:25px; line-height:1.17; letter-spacing:-.5px; color:var(--ink); margin:11px 0; }
.scene-panel p { font-size:15px; line-height:1.55; margin:12px 0 20px; color:#50666a; }
.scene-panel button { margin:4px 0; width:100%; }
.scene-panel .primary { background:var(--blue); border-color:var(--blue); color:white; min-height:48px; }
.scene-panel .primary:hover { background:#0754a5; }
.scene-panel small { display:block; margin-top:13px; color:var(--muted); font-size:11px; }
.scene-panel a { display:block; margin-top:12px; }
#outcome-panel { top:auto; bottom:16px; left:auto; right:16px; transform:none; width:320px; }
.caption-row { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:12px 0; min-height:44px; }
#caption { font-size:16px; font-weight:750; margin:0; line-height:1.45; }
.crossing-game #hear { padding:9px; min-width:44px; }
.play-controls { display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid var(--line); padding-top:15px; }
.movement-pad { display:grid; grid-template:48px 48px / 48px 48px 48px; gap:4px; flex-shrink:0; }
.crossing-game .move { min-height:48px; padding:0; font-family:system-ui,sans-serif; font-size:23px; touch-action:none; user-select:none; -webkit-user-select:none; }
.move.up { grid-area:1 / 2; }.move.left { grid-area:2 / 1; }.move.down { grid-area:2 / 2; }.move.right { grid-area:2 / 3; }
.crossing-game .move.is-held { background:#245e54; color:#fff; }
.observation-controls { display:grid; gap:7px; text-align:center; flex:1; min-width:0; }
.observation-controls > div { display:flex; gap:5px; flex-wrap:wrap; justify-content:center; }
.observation-controls button { min-height:48px; }
#button-note { font-size:12px; color:var(--muted); }
.session-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; max-width:225px; }
.session-controls button { min-height:48px; }
.crossing-footer { display:flex; justify-content:space-between; align-items:start; gap:20px; margin-top:18px; font-size:13px; }
.crossing-footer details { max-width:680px; padding-top:13px; color:var(--muted); }.crossing-footer summary { cursor:pointer; font-weight:750; }
.crossing-footer details p { line-height:1.7; }
.crossing-footer > div { display:flex; flex-shrink:0; gap:7px; }
.crossing-footer button { display:flex; gap:7px; align-items:center; }
@media(max-width:800px) {
  .crossing-game { width:calc(100% - 28px); }.crossing-heading { margin-bottom:12px; }.crossing-game .breadcrumbs { font-size:12px; }
  .crossing-toolbar { align-items:start; }.situation-options { gap:2px; }.situation-options button { min-height:42px; font-size:12px; padding:7px 9px; }
  .crossing-game #sound { min-width:44px; font-size:0; padding:10px; }.crossing-game #sound img { width:21px; }
  .audio-controls { flex-direction:column; }.audio-controls button { min-width:44px; justify-content:center; padding:10px; }.audio-controls button span:last-child { display:none; }
  #route-note { margin:3px 0 0; width:100%; }.layout-options button { font-size:12px; padding:7px 10px; }
  .playfield { height:clamp(340px,52dvh,560px); }.play-controls { gap:12px; flex-wrap:wrap; }
  .session-controls { max-width:none; width:100%; justify-content:flex-end; }.observation-controls { flex:1; }
  .observation-controls > div { justify-content:center; flex-wrap:wrap; }.observation-controls button { font-size:12px; padding:8px; }
  .crossing-footer { flex-wrap:wrap; }.crossing-footer > div { margin-left:auto; }
}
@media(max-width:420px) {
  .crossing-page .site-header .utility-nav { gap:3px; }.crossing-page .site-header .utility-nav button { font-size:0; gap:0; min-width:48px; min-height:48px; padding:8px; }
  .crossing-heading h1 { font-size:25px; }.free-play-label { padding:6px 9px; font-size:11px; }
  .crossing-heading p { font-size:14px; }.situation-options { display:grid; grid-template-columns:1fr 1fr; }.situation-options button:last-child { grid-column:1 / -1; }
  .playfield { height:360px; }.world-hud { top:10px; left:10px; right:10px; gap:5px; }.objective,#signal-status { font-size:11px; padding:7px 8px; }
  #emergency-cue { top:74px; font-size:12px; left:10px; right:10px; }
  .scene-panel { padding:18px; }.scene-panel h2 { font-size:23px; }
  #outcome-panel { left:10px; right:10px; bottom:10px; width:auto; padding:15px; }#outcome-panel p { margin:8px 0 10px; }
  #caption { font-size:14px; }.movement-pad { grid-template-columns:48px 48px 48px; column-gap:2px; }.observation-controls > div { gap:3px; }.observation-controls { min-width:125px; }
  .observation-controls button { min-height:48px; }.observation-controls [data-look="0"] { order:1; width:100%; }
}
@media(max-width:360px) { .play-controls { justify-content:center; }.observation-controls { flex-basis:100%; }.observation-controls [data-look="0"] { width:auto; order:0; } }
@media(prefers-reduced-motion:reduce) { .crossing-page * { scroll-behavior:auto; } }
