/* 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; padding:14px 28px 23px; 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 16px; }
  .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 14px; }
  .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; }
