/* Bright cabinet shell; the playfield retains its high-contrast game palette. */
#launcherScreen.is-active{display:grid;overflow:auto}
.launcher-hero{min-height:0;flex:none}.launcher-hero::before,.launcher-hero::after{display:none}.launcher-hero h1,.launcher-hero>p:last-of-type{text-shadow:none}.launcher-hero>p:last-of-type{color:#38625d;font-size:16px;margin:4px 0}.game-list{max-width:none;padding:0;margin:0}.launcher-stats{max-width:none;margin:0}
:root{--bg:#123d3c;--bg-2:#0b302f;--panel:#174744;--panel-hi:#225753;--line:#56847a;--line-hi:#ffd35c;--cream:#fff8e8;--cream-dim:#c9ddd4;--gold:#ffd35c;--coral:#ff8c70;color-scheme:dark}
body{background:#123d3c}.system-bar{background:#fff8e8;color:#123d3c;border-bottom:3px solid #123d3c}.system-title{color:#123d3c}.system-live{display:none}.system-actions{display:flex;gap:8px;align-items:center}.system-actions a{color:#123d3c;font-size:14px;text-decoration:none;padding:8px}.system-bar button{background:#fff8e8;color:#123d3c;border:2px solid #123d3c;border-bottom-width:4px;border-radius:6px;min-height:40px}.system-actions button{min-width:44px}.restart-control{font-size:22px}.launcher-screen{background:#fff8e8;color:#123d3c;padding:clamp(16px,3vw,40px);gap:20px;grid-template-rows:auto minmax(0,1fr) auto}.launcher-hero{padding:0;background:none;border:0;text-align:left}.launcher-hero h1{font-size:clamp(32px,5vw,64px);line-height:1.1;color:#123d3c;letter-spacing:-.04em;margin:8px 0}.launcher-hero p{color:#38625d}.cabinet-label{color:#087973!important;font-size:12px;letter-spacing:.16em}.game-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:18px;border:0;background:none;overflow:visible}.game-row{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;padding:0;gap:0;background:#b7deda;color:#123d3c;border:2px solid #123d3c!important;border-bottom-width:8px!important;border-radius:10px;overflow:hidden;min-height:0;transition:transform .14s ease}.game-row:nth-child(2){background:#f5d464}.game-row:nth-child(3){background:#eead91}.game-row:nth-child(4){background:#c4cfaa}.game-row:hover,.game-row:focus-visible{background:#d0e5cf;transform:translateY(-4px);border-color:#123d3c}.row-art{width:100%;height:clamp(120px,25vh,280px);min-height:0;flex:1;max-height:320px;border:0;border-radius:0;background:none;overflow:hidden}.row-art img{width:100%;height:100%;object-fit:contain;transform:none;padding:12px}.row-copy{background:#fff8e8;padding:18px 18px 10px;flex:0}.row-copy strong{font-size:clamp(20px,2vw,30px);color:#123d3c}.row-copy small{color:#38625d;font-size:14px;line-height:1.5;white-space:normal}.row-chip{margin:0;border:0;border-top:1px solid #b8c5b3;border-radius:0;padding:14px 18px;background:#fff8e8;color:#123d3c;text-align:right;font-size:15px}.launcher-stats{background:none;border:0;border-top:2px solid #123d3c;border-radius:0;padding:12px 0 0;justify-content:flex-start;gap:36px}.launcher-stats strong{color:#123d3c}.launcher-stats span{color:#38625d}
.game-toolbar{background:#174744;border-color:#56847a}.game-toolbar button,.result-actions button{border-radius:6px;background:#225753;border-bottom-width:4px}.game-toolbar .primary-action,.result-actions .primary-action{background:#ffd35c;color:#123d3c}.touch-help{background:#0b302f}.arcade-screen{grid-template-rows:auto minmax(0,1fr) auto auto}.arcade-controls{display:flex;justify-content:center;gap:10px;padding:8px;background:#123d3c}.arcade-controls button{min-width:56px;min-height:46px;border:2px solid #78a599;border-bottom-width:5px;border-radius:8px;background:#fff8e8;color:#123d3c;touch-action:none;user-select:none;font-size:18px;font-weight:900}.arcade-controls button:active{transform:translateY(2px);border-bottom-width:3px}.arcade-controls button:last-child{background:#ffd35c}.cabinet-pause{background:#fff8e8;color:#123d3c;border:3px solid #123d3c;border-bottom-width:8px;border-radius:12px;max-width:min(440px,90vw);padding:32px}.cabinet-pause::backdrop{background:#082725dc}.cabinet-pause h2{font-size:40px;margin:0}.cabinet-pause button{display:block;width:100%;min-height:48px;margin-top:12px;border:2px solid #123d3c;border-bottom-width:5px;border-radius:6px;background:#fff8e8;color:#123d3c;cursor:pointer}.cabinet-pause #resumeCabinet{background:#ffd35c}.result-window{background:#fff8e8;color:#123d3c;border:3px solid #123d3c;border-radius:10px}.result-window p,.result-window h2{color:#123d3c}.result-window .result-metrics{color:#fff8e8}.result-titlebar{background:#123d3c}.result-actions button{background:#123d3c;color:#fff8e8}.result-actions #resultAgain{background:#ffd35c;color:#123d3c}
@media(max-width:900px){.game-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px}.row-art{max-height:180px;flex:1}.row-copy{padding:10px 14px 6px}.row-copy strong{font-size:21px}.row-chip{padding:8px 14px}.launcher-screen{gap:12px}.launcher-hero h1{font-size:36px}.system-title{font-size:15px;padding:0}.active-avatar{display:none}.system-actions{gap:4px}.system-actions a{font-size:12px}.system-actions button{min-width:36px;padding:3px}.system-bar{gap:5px}.start-button{padding:3px 8px}.arcade-controls{gap:6px}.arcade-controls button{min-width:46px;font-size:16px}}
@media(max-width:540px){.system-title{display:none}.system-bar{position:relative;box-sizing:border-box;width:100%;min-width:0;grid-template-columns:auto minmax(0,1fr);padding-left:8px;padding-right:8px}.system-actions{position:absolute;right:8px;top:6px;box-sizing:border-box;min-width:0;justify-content:flex-end;gap:3px}.system-actions a,.system-actions #soundButton,.system-actions #restartButton,.system-actions #fullscreenCabinet{display:none!important}.system-actions button{min-width:32px!important;width:32px!important;min-height:36px}.system-actions #pauseCabinet{min-width:42px!important;width:auto!important;font-size:12px;padding:3px 5px}.launcher-screen{padding:16px}.launcher-hero p:not(.cabinet-label){font-size:13px;margin:5px 0}.launcher-hero h1{font-size:32px}.row-copy small{font-size:12px}.row-chip{font-size:12px}.launcher-stats{gap:22px}.row-art{height:100px}.game-toolbar{padding:8px;gap:8px}.game-heading h2{font-size:18px}.game-heading p{font-size:11px}.game-actions #arcadeNew{display:none}.arcade-controls button{min-height:44px}.touch-help{font-size:11px;padding:5px}.launcher-stats strong{font-size:22px}}
@media(max-height:580px) and (min-width:700px){.launcher-screen{padding:12px 24px;gap:8px}.launcher-hero h1{font-size:30px}.launcher-hero p{margin:2px 0}.row-art{height:100px}.row-copy{padding:8px}.row-chip{padding:6px}.arcade-controls{padding:3px}.arcade-controls button{min-height:36px}.game-toolbar{padding:5px}.touch-help{padding:2px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.launcher-stats>div{background:none;border:0;padding:0;text-align:left;flex:0 1 160px}.row-art img{object-fit:cover;padding:0;object-position:50% 38%}

.system-actions #pauseCabinet{width:auto;min-width:48px;white-space:nowrap;font-size:14px;padding:4px 7px}.system-actions{min-width:0}.system-actions a{white-space:nowrap}

.result-metrics>div{background:#123d3c;border:0}.result-metrics span{color:#fff8e8}.play-surface{background:#0b302f;border-color:#56847a}

.arcade-controls[hidden]{display:none}
.block-pop-card{background:#2b2048;position:relative;color:#fff8e8}
.block-pop-card .row-art{background:#100f25}
.block-pop-card .row-art img{object-fit:cover!important;background:#100f25!important}
.block-pop-card .row-copy{background:#211936}.block-pop-card .row-copy strong{color:#fff8e8}.block-pop-card .row-copy small{color:#d5c9e8}
.block-pop-card .row-chip{background:#f1c956;color:#201633;font-weight:900;letter-spacing:.04em}
.block-pop-card:hover,.block-pop-card:focus-visible{background:#3a285f}
.block-pop-card:hover .row-chip,.block-pop-card:focus-visible .row-chip{background:#ffe18a}
/* Eleven cabinets: scroll the game shelf while keeping navigation in view. */
#launcherScreen{padding:20px 3vw;gap:14px}
#launcherScreen .launcher-hero h1{font-size:clamp(30px,3.2vw,46px)}
#launcherScreen .game-list{min-height:0;overflow:auto;overscroll-behavior:contain;grid-template-rows:repeat(3,minmax(190px,1fr));padding:5px 5px 8px;scroll-padding:6px}
#launcherScreen .row-art{height:auto;max-height:none;flex:1;min-height:75px}
#launcherScreen .row-copy{padding:10px 14px 8px}
#launcherScreen .row-copy strong{font-size:clamp(19px,1.65vw,25px)}
#launcherScreen .row-copy small{font-size:12px}
#launcherScreen .row-chip{padding:8px 14px;font-size:13px}
#launcherScreen .row-art img[src$=".svg"]{object-fit:contain;background:#123d3c}
#launcherScreen .launcher-stats{padding-top:10px}
@media(max-width:900px){#launcherScreen .game-list{grid-template-rows:repeat(6,minmax(205px,1fr))}#launcherScreen{padding:12px;gap:10px}#launcherScreen .launcher-hero h1{font-size:30px}}

/* Mobile pause must never create a desktop grid track. */
#mobilePause { display: none; }
.app-shell { grid-template-columns: minmax(0, 1fr); }
.system-bar { min-width: 0; }
#runeSkillControls, #runeSound, #runeInstructions { display: none; }
body:has(.rune-mode.is-active) #runeInstructions { display: block; line-height: 1.7; font-size: 14px; }
.rune-mode #arcadeCanvas:focus-visible { outline: 2px solid #ffe0a0; outline-offset: -3px; }
body:has(.rune-mode.is-active) #runeSound { display: block; }
/* Battle: compact toolbar, remaining-height canvas, one native skill row. */
.arcade-screen.rune-mode {
  --rune-gold: #b89a5d;
  width: 100%; min-width: 0; min-height: 0;
  padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  gap: 6px; background: #0d0c1d;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
}
.arcade-screen.rune-mode.is-active { display: grid; }
.arcade-screen.rune-mode .arcade-toolbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  width: 100%; max-width: 560px; min-width: 0;
  margin: 0; padding: 5px 8px; gap: 8px;
  background: #171522; border: 1px solid var(--rune-gold); border-radius: 8px;
}
.arcade-screen.rune-mode .game-heading,
.arcade-screen.rune-mode .game-heading > div { min-width: 0; }
.arcade-screen.rune-mode .heading-icon,
.arcade-screen.rune-mode .compact-metrics,
.arcade-screen.rune-mode .arcade-controls,
.arcade-screen.rune-mode .touch-help { display: none; }
.arcade-screen.rune-mode .game-heading h2 { font-size: 16px; line-height: 1.4; }
.arcade-screen.rune-mode .game-heading p {
  color: #d5c9af; font-size: 11px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.arcade-screen.rune-mode .game-actions { min-width: 0; gap: 4px; }
.arcade-screen.rune-mode .game-actions button {
  min-width: 44px; min-height: 44px; padding: 0 8px;
  font-size: 12px; background: #282333; border-color: var(--rune-gold);
}
.arcade-screen.rune-mode #arcadeNew { display: none; }
.arcade-screen.rune-mode .arcade-surface {
  width: 100%; max-width: 560px; height: 100%; min-width: 0; min-height: 0;
  margin: 0; padding: 2px; background: #080914;
  border: 1px solid var(--rune-gold); border-radius: 8px;
  box-shadow: inset 0 0 0 1px #443924;
}
.arcade-screen.rune-mode #arcadeCanvas {
  display: block; width: 100%; height: 100%; min-width: 0; min-height: 0;
  max-width: 100%; max-height: 100%; touch-action: none;
}
.arcade-screen.rune-mode #runeSkillControls {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px; width: 100%; max-width: 560px; min-width: 0;
}
#runeSkillControls button {
  min-width: 0; min-height: 44px; padding: 4px 2px;
  border: 1px solid #b89a5d; border-bottom-width: 3px; border-radius: 6px;
  background: #282333; color: #fff0c9; font-size: 12px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  touch-action: manipulation; cursor: pointer;
}
#runeSkillControls button:enabled:hover { background: #3a3141; }
#runeSkillControls button strong, #runeSkillControls button small { display: block; line-height: 1.35; }
#runeSkillControls button strong { font-size: 12px; }
#runeSkillControls button small { font-size: 10px; }
#runeSkillControls button:enabled:active { border-bottom-width: 1px; }
#runeSkillControls button:disabled { color: #a49d93; border-color: #625b50; background: #1b1922; cursor: default; }
#runeSkillControls button:focus-visible { outline: 2px solid #ffe0a0; outline-offset: 2px; }
.cabinet-pause { max-height: calc(100dvh - 24px); overflow-y: auto; }
@media(max-width:540px) {
  .system-actions { display: none; }
  .system-bar { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(70px, env(safe-area-inset-right)); }
  .system-bar .start-button { min-height: 44px; }
  #mobilePause {
    position: fixed; right: max(8px, env(safe-area-inset-right)); top: 4px; z-index: 20;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 54px; min-height: 44px; padding: 3px 8px;
    background: #fff8e8; color: #123d3c; border: 2px solid #123d3c;
    border-bottom-width: 4px; border-radius: 6px; font-weight: 900;
  }
}
