/* In-game HUD: readable touch controls around an open playfield. */
.game-screen{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.game-stage{--hud-white:#fffffff5;--hud-border:#abc3b4;--hud-shadow:0 2px 0 #224f3c22;--hud-radius:2cqw}
.is-playing .top-hud{top:2.5%;left:2%;right:2%;align-items:flex-start;justify-content:space-between;gap:2cqw}
.is-playing .student-hud{width:auto;min-width:16%;padding:.55cqw 1.2cqw .55cqw .4cqw;gap:.5cqw;border:1px solid var(--hud-border);border-radius:var(--hud-radius);background:var(--hud-white);box-shadow:var(--hud-shadow)}
.is-playing .student-hud canvas{width:5cqw;height:5cqw;min-width:33px;min-height:33px}
.is-playing .student-hud>div{display:grid;gap:.25cqw}
.is-playing .student-hud strong{font-size:clamp(15px,2.2cqw,31px);line-height:1.1}
.is-playing .student-hud p{font-size:clamp(10px,1.2cqw,18px);line-height:1.3;white-space:nowrap}
.is-playing .path-rail{position:relative;left:auto;top:auto;width:34%;margin:0;padding:.9cqw .8cqw .7cqw;background:var(--hud-white);border:1px solid var(--hud-border);border-radius:var(--hud-radius);box-shadow:var(--hud-shadow)}
.is-playing .path-rail li{padding-top:1.6cqw;font-size:clamp(10px,1.25cqw,18px);line-height:1.3;white-space:nowrap;color:#6d7c74}
.is-playing .path-rail li::before{width:1.25cqw;height:1.25cqw;top:0;left:calc(50% - .625cqw);background:#becac2;box-shadow:none;border:0}
.is-playing .path-rail li::after{height:.25cqw;top:.5cqw;background:#becac2}
.is-playing .path-rail li.active,.is-playing .path-rail li.done{color:var(--green)}
.is-playing .path-rail li.active::before,.is-playing .path-rail li.done::before,.is-playing .path-rail li.done::after{background:#2e8250}
.is-playing .path-rail li.active::before{box-shadow:0 0 0 .3cqw #2e825020}
.is-playing .game-tools{flex:none;background:none;border:0;box-shadow:none;padding:0;gap:1cqw;justify-content:flex-end}
.is-playing .light-counter{min-height:44px;min-width:8cqw;padding:.6cqw 1.1cqw;border:1px solid var(--hud-border);border-radius:var(--hud-radius);background:var(--hud-white);box-shadow:var(--hud-shadow);font-size:clamp(20px,3cqw,42px);font-variant-numeric:tabular-nums;gap:.4cqw}
.is-playing .light-counter canvas{width:3.8cqw;height:3.8cqw;min-width:25px;min-height:25px}
.is-playing .pause-button{width:5.8cqw;height:5.8cqw;min-width:44px;min-height:44px;display:grid;place-items:center;padding:1.3cqw;background:var(--hud-white);border:1px solid var(--green);border-radius:1.6cqw;box-shadow:var(--hud-shadow)}
.is-playing .pause-button svg{width:100%;height:100%;min-width:20px;min-height:20px;stroke-width:5}
.is-playing .inventory-hud{top:calc(2.5% + max(44px,6.3cqw) + 1.1cqw);right:2%;width:auto;min-width:18%;height:auto;min-height:44px;display:grid;gap:.65cqw;padding:.7cqw 1.2cqw;border:1px solid var(--hud-border);border-radius:var(--hud-radius);background:var(--hud-white);box-shadow:var(--hud-shadow)}
.is-playing .inventory-label strong{font-size:clamp(11px,1.35cqw,20px);font-weight:800;white-space:nowrap}
.inventory-label b{font-weight:600;color:#567261;margin-left:.4cqw;font-variant-numeric:tabular-nums}
.is-playing .inventory-slots{gap:.8cqw;justify-content:flex-start}
.is-playing .inventory-slot{display:grid;place-items:center;width:4.5cqw;height:4.5cqw;min-width:28px;min-height:28px;border:1px solid #7fa58d;border-radius:1cqw;background:#eff5ed}
.is-playing .inventory-slot canvas{width:100%;height:100%;min-width:0;min-height:0}
.is-playing .inventory-slot.is-empty{border-style:dashed;background:#f7f9f6;color:#a1b1a6;font-size:clamp(20px,3cqw,36px);font-weight:400}
.inventory-slots>.arrow-icon{width:2cqw;height:2cqw;min-width:13px;min-height:13px;margin-left:auto;stroke-width:2.6}
.is-playing .choice-panel.is-running{display:none}
.is-playing .controls{left:2%;right:2%;bottom:4%;align-items:flex-end}
.is-playing .control{width:12%;height:11.5cqw;min-width:72px;min-height:72px;padding:.8cqw;display:flex;flex-direction:column;justify-content:center;gap:.2cqw;border:2px solid white;border-radius:3cqw;font-size:clamp(16px,2cqw,29px);line-height:1.2;box-shadow:0 .55cqw 0 #0d392c,0 0 0 1px #376d52;transition:transform .08s,box-shadow .08s,background .08s;touch-action:none}
.is-playing .control .arrow-icon{width:3.8cqw;height:3.8cqw;min-width:24px;min-height:24px;stroke-width:3.6}
.is-playing .control small{font-size:clamp(9px,1cqw,15px);font-weight:600}
.is-playing .control.secondary{background:#f9fcf5;border-color:#315a47;color:var(--green);box-shadow:0 .55cqw 0 #7c9c84}
.is-playing .control:active,.is-playing .control.is-active{transform:translateY(.35cqw) scale(.97);box-shadow:0 .15cqw 0 #0d392c;background:#286d51;color:white}
.is-playing .control:focus-visible,.is-playing .hud-button:focus-visible{outline:3px solid #f7d263;outline-offset:4px}
.is-playing .team-strip{left:50%;right:auto;transform:translateX(-50%);bottom:4%;width:max-content;max-width:64%;height:auto;min-height:28px;padding:.6cqw 1.6cqw;border-radius:3cqw;background:var(--hud-white);border:1px solid #d4e2d6;box-shadow:var(--hud-shadow);gap:.7cqw}
.is-playing .team-pictures canvas{width:3cqw;height:3cqw;min-width:20px;min-height:20px}
.is-playing .team-copy span{font-size:clamp(10px,1.2cqw,18px);white-space:nowrap}.team-copy b{margin-left:.3cqw}
.is-playing .team-strip[hidden]{display:none}
.is-playing .scene-hint{left:24%;right:24%;bottom:17%;max-width:none;text-align:center;font-size:clamp(11px,1.3cqw,18px)}
.is-playing .choice-panel.is-choice,.is-playing .choice-panel.is-feedback{top:34%;right:2%;width:49%;max-height:63%;padding:1.5cqw;border:1px solid var(--hud-border);border-radius:var(--hud-radius);background:#fffffff7;box-shadow:0 .5cqw 1.5cqw #244c3426;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
.is-playing .choice-heading{font-size:clamp(16px,2cqw,30px);line-height:1.3;margin-bottom:.5cqw}
.choice-context{font-size:clamp(11px,1.2cqw,18px);line-height:1.4;color:#52715d;margin:0 0 1cqw;word-break:keep-all}
.is-playing .choice-buttons{gap:.8cqw}
.is-playing .choice-button{min-height:54px;padding:.8cqw;gap:1cqw;border:1px solid #c6dacb;border-radius:1.2cqw;background:#f2f7ef;box-shadow:0 2px 0 #d4e2d3}
.is-playing .choice-button:hover,.is-playing .choice-button:focus-visible{background:#e5f1df;border-color:#4b8c61}.is-playing .choice-button:active{transform:translateY(1px)}
.is-playing .choice-copy strong{font-size:clamp(14px,1.7cqw,25px)}.is-playing .choice-copy span{font-size:clamp(11px,1.3cqw,19px);line-height:1.35}
.is-playing .choice-description{font-size:clamp(10px,1.1cqw,16px);margin-top:.8cqw;color:#56705d}
.is-playing .feedback h2{font-size:clamp(16px,2cqw,29px)}.is-playing .feedback p{font-size:clamp(12px,1.45cqw,20px);line-height:1.5}.is-playing .feedback .effect{font-size:clamp(11px,1.3cqw,18px)}.is-playing .feedback .button{min-height:44px;font-size:clamp(14px,1.6cqw,24px)}
.game-stage[data-phase=choice] .controls,.game-stage[data-phase=feedback] .controls,.game-stage[data-phase=countdown] .controls,.game-stage[data-phase=arriving] .controls{visibility:hidden;pointer-events:none}
.game-stage[data-phase=choice] .team-strip,.game-stage[data-phase=feedback] .team-strip{visibility:hidden}
.start-countdown{background:#fffffff2;border:1px solid #95bca2;border-radius:3cqw;box-shadow:0 .5cqw 0 #527d6133}.countdown-caption{font-size:clamp(12px,1.7cqw,24px)}
.is-playing .choice-panel.is-arrival{background:#fffffff2;border:1px solid #95bca2;border-radius:2cqw;box-shadow:var(--hud-shadow)}
#pause-dialog>.text-button{min-height:44px;border:1px solid var(--line);border-radius:10px;margin:8px 5px 12px 0;padding:8px 14px}#pause-dialog>.button{min-height:46px}
@media(prefers-reduced-motion:reduce){.is-playing .control{transition:none}}
@container(max-width:600px){
  .is-playing .choice-panel.is-choice,.is-playing .choice-panel.is-feedback{top:124px;width:56%;max-height:calc(100% - 132px);padding:8px}
  .is-playing .choice-button{min-height:48px;padding:5px}
  .is-playing .choice-description{display:none}
  .choice-context{margin-bottom:5px}
}
.staff-receipt{margin:24px auto 0;padding:16px;max-width:440px;border:1px solid #d6dfd8;border-radius:14px;text-align:left;background:#f6f8f3}
.staff-receipt summary{cursor:pointer;font-weight:700;color:#4e6258;min-height:30px;line-height:30px}
.staff-receipt p{font-size:14px;line-height:1.65;color:#53675c}.staff-receipt .button{width:100%}
#receipt-dialog [hidden]{display:none!important}#receipt-dialog{max-width:440px;width:calc(100% - 32px);box-sizing:border-box}
#receipt-dialog .staff-label{font-size:12px;font-weight:800;color:#66776b;letter-spacing:.05em;margin-bottom:8px}
#receipt-dialog .receipt-hold{position:relative;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background:#edf3ec;min-height:64px}
.receipt-hold::before{content:'';position:absolute;inset:0 auto 0 0;width:var(--hold-progress,0%);background:#b6d9ba;pointer-events:none}.receipt-hold span{position:relative;z-index:1}
#receipt-dialog .receipt-footnote{font-size:12px;line-height:1.5;color:#68786d;margin:16px 0 0}
