.run-controls { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 14px; padding:12px 0; border-bottom:1px solid #8a9ab844; }
.run-controls p { margin:0; color:var(--muted); font-size:13px; line-height:1.4; }
.new-game-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; flex:none; padding:10px 18px; border:1px solid #d6b56e; background:#ead8a8; color:#17283b; font-size:15px; font-weight:750; box-shadow:0 3px 0 #8e7141; }
.new-game-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.new-game-button:focus-visible { outline:3px solid #fff0bd; outline-offset:4px; }
.new-game-button:disabled { opacity:.5; cursor:wait; }
@media (hover:hover) { .new-game-button:not(:disabled):hover { background:#f6e7be; } }
@media (max-width:600px) { .run-controls { margin-top:12px; gap:12px; } .run-controls p { max-width:145px; font-size:12px; } .new-game-button { padding:10px 14px; } }

/* Actions stay outside the scrolling content, including in short mobile viewports. */
.shop-dialog[open] { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.shop-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:28px; }
.shop-dialog .dialog-top { top:-28px; padding-top:8px; }
.shop-footer { flex:none; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 28px; border-top:1px solid #78859b66; background:#101c31; }
.shop-footer strong { font-size:12px; letter-spacing:.6px; color:var(--gold); }
.shop-footer p { font-size:12px; line-height:1.4; color:var(--muted); margin:7px 0 0; max-width:440px; }
.shop-footer .start-button { min-width:170px; flex:none; }
.report-dialog[open] { display:flex; overflow:hidden; }
.report-receipt { display:flex; flex-direction:column; min-height:0; max-height:inherit; width:100%; padding:0; }
.report-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:26px 28px 4px; }
.report-footer { flex:none; max-height:55svh; overflow:auto; overscroll-behavior:contain; scroll-padding:8px; padding:14px 28px max(23px,env(safe-area-inset-bottom)); border-top:1px dashed #9eaa9e; background:#f3e7ca; }
.report-footer .receipt-foot { font-size:11px; line-height:1.5; letter-spacing:0; margin:0 0 13px; color:#354938; font-weight:600; }
.report-footer .start-button { background:#eeb950; color:#18273a; border-color:#b98629; box-shadow:0 3px 0 #b48c42; min-width:0; }
.report-skip { display:block; width:100%; min-height:44px; margin-top:6px; background:transparent; color:#34485c; font-size:12px; text-decoration:underline; text-underline-offset:4px; }
.report-time { font-size:12px; color:#476357; margin:0; }
.report-body .report-total { padding-bottom:8px; }
.report-body .incident { padding-top:17px; }
@media (max-width:900px) {
  html { scroll-padding-bottom:calc(100px + env(safe-area-inset-bottom)); }
  .game { padding-bottom:calc(108px + env(safe-area-inset-bottom)); }
  .command-dock { position:fixed; z-index:20; left:0; right:0; bottom:0; max-width:none; width:auto; margin:0; padding:12px max(18px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-right)); background:#111e34f5; border-top:1px solid #a2a98880; box-shadow:0 -8px 30px #09122470; gap:12px; }
  .command-dock .shop-button { min-height:48px; }
  .command-dock .shop-button small { display:none; }
  .command-dock .start-group { gap:8px; }
  .command-dock .speed-button { min-width:44px; min-height:48px; }
  .command-dock .start-button { min-height:48px; }
  .toast { bottom:calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width:600px) {
  .shop-body { padding:18px; }
  .shop-dialog .dialog-top { top:-18px; }
  .shop-footer { gap:12px; padding:12px 18px max(12px, env(safe-area-inset-bottom)); }
  .shop-footer .start-button { min-width:130px; font-size:21px; padding:10px; gap:9px; }
  .shop-footer strong { font-size:10px; }
  .shop-footer p { font-size:10px; margin-top:5px; }
  .report-body { padding:23px 23px 0; }
  .report-footer { padding:12px 23px max(16px,env(safe-area-inset-bottom)); }
  .report-body h2 { font-size:43px; }
  .report-body .receipt-brand { margin-bottom:22px; padding-bottom:14px; }
  .report-opponent { margin-bottom:16px; }
  .command-dock .shop-button { gap:6px; }
  .command-dock .shop-button>span { font-size:12px; }
}
@media (max-width:360px) {
  .command-dock { padding-left:12px; padding-right:12px; gap:8px; }
  .command-dock .shop-button>svg { display:none; }
  .command-dock .start-button { min-width:128px; font-size:20px; padding:10px; }
  .command-dock .start-group { gap:6px; }
}
@media (max-height:500px) and (max-width:900px) {
  .command-dock { padding-top:6px; padding-bottom:calc(6px + env(safe-area-inset-bottom)); }
  .report-footer { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; padding:10px 20px max(14px,env(safe-area-inset-bottom)); }
  .report-footer .receipt-foot { grid-column:1/-1; margin-bottom:8px; }
  .report-footer .start-button { font-size:18px; padding:8px; min-height:44px; }
  .report-footer .report-skip { font-size:11px; margin:0; }
  .shop-footer { padding-top:10px; padding-bottom:10px; }
}

#save-retry { min-height:44px; padding:7px 12px; color:var(--gold); background:#1d304a; border:1px solid #7a89a1; font-size:12px; }
.run-note { align-items:center; }
.save-dialog { width:min(440px, calc(100vw - 32px)); padding:28px; border-color:#d5b877; }
.save-dialog::backdrop { background:#07111be6; }
.save-seal { display:grid; place-items:center; width:54px; height:58px; margin-bottom:22px; color:var(--gold); background:#c6a36312; border:1px solid #d5b87766; border-radius:4px; transform:rotate(-3deg); }
.save-seal svg { width:32px; height:32px; }
.save-dialog h2 { font-size:clamp(34px, 7vw, 44px); line-height:1.06; margin:12px 0 16px; }
.save-dialog #save-detail { font-size:15px; line-height:1.6; color:var(--muted); margin:0 0 24px; }
.save-dialog .start-button { width:100%; min-width:0; min-height:52px; font-size:22px; }

/* A second timecard stays beside the game, with a deliberate sign-off action. */
.overtime-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 24px;padding:14px 19px;border-left:5px solid #eeb950;background:#eeb95013;color:#f3e7ca}
.overtime-banner strong{font:700 17px/1.3 Bricolage,Arial,sans-serif}
.overtime-banner p{font-size:12px;line-height:1.5;margin:5px 0 0;color:#cccdbf}
.overtime-banner .plain-button{flex:none;min-height:44px}
.starter-route-note{font-size:13px;line-height:1.5;color:#c6cecb;margin:0 24px 16px}
.overtime-invite{border:1px dashed #928b69;border-left:4px solid #ba8b30;padding:15px 16px;margin:21px 0;text-align:left;background:#e3cf9d33}
.overtime-invite strong{display:block;font:700 25px/1.2 Bricolage,Arial,sans-serif;color:#283f3b}
.overtime-invite p{font-size:13px;line-height:1.6;color:#4b6055;margin:7px 0 0}
.overtime-exit p{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 22px}
.overtime-exit>.start-button{width:100%;min-width:0;font-size:24px;min-height:52px}
.overtime-exit>.plain-button{width:100%;margin-top:14px;min-height:44px}
.overtime-banner[hidden],.overtime-invite[hidden],#report-bank[hidden],#report-skip[hidden],#overtime-leave[hidden],#battle-report[hidden]{display:none}
.report-opponent[data-result="waiting"] img{filter:none;transform:none}
@media(max-width:600px){.overtime-banner{gap:10px;margin-bottom:18px;padding:12px}.overtime-banner strong{font-size:15px}.overtime-banner p{font-size:11px}.overtime-banner .plain-button{padding:8px 12px}.starter-route-note{margin:0 18px 14px}.overtime-invite{padding:12px}.overtime-invite strong{font-size:23px}}

#report-retry[hidden],#overtime-exit-retry[hidden]{display:none}
#report-retry{font-weight:700;color:#7a332d}
