/* Ash-Fall arcade design system: polished cabinets, legible controls, responsive play spaces. */
:root{--arcade-ember:#b25b68;--arcade-rust:#b25b68;--arcade-line:#827076}






.back{display:inline-flex;align-items:center;gap:.5rem;margin:.6rem 0 1rem!important;color:#dac098!important;text-decoration:none;letter-spacing:.04em;transition:color .18s ease,transform .18s ease}
.back:hover{color:#c7a77c!important;transform:translateX(-2px)}
.cabinet,.game,.game-panel,.panel{border-color:#827076!important;background:linear-gradient(145deg,rgba(21,18,16,.98),rgba(9,9,9,.98))!important;box-shadow:0 18px 48px rgba(0,0,0,.22)}


.cabinet:hover,.game:hover{border-color:#b25b68!important;box-shadow:0 24px 54px rgba(0,0,0,.32)}




button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #b25b68!important;outline-offset:3px}
.screen,.arena,.play-area,.canvas{border-color:#827076!important;box-shadow:inset 0 0 0 1px rgba(178,91,104,.045),inset 0 0 40px rgba(0,0,0,.5)}


.game-tabs button[aria-selected=true],.tabs button[aria-selected=true],.tabs .active{border-color:#b25b68!important;background:rgba(178,91,104,.14)!important;color:#f9d7f3!important}
.cabinet .eyebrow,.game .eyebrow,.hero .eyebrow{color:#c7a77c}
.cabinet .tag,.genre,.license,.pill{border-color:#827076!important;color:#c7a77c!important;background:rgba(178,91,104,.075)!important}



@media(max-width:800px){}
@media(max-width:560px){}
@media(prefers-reduced-motion:reduce){}


/* Cabinet refresh: deeper materials, clearer hierarchy, stronger play surfaces. */
:root{--arcade-ember:#b25b68;--arcade-gold:#ece1d3;--arcade-ink:#08090d;--arcade-surface:#101218;--arcade-edge:rgba(255,255,255,.105);--arcade-copy:#f6f3ef;--arcade-dim:#aaa6a2}
html{scroll-behavior:smooth;scroll-padding-top:1.5rem}
body{background-color:var(--arcade-ink);background-image:radial-gradient(ellipse at 50% -14rem,rgba(178,91,104,0.18),transparent 48%),radial-gradient(ellipse at 100% 42%,rgba(79,90,150,.075),transparent 35%),linear-gradient(180deg,#0a0b10 0%,#08090d 72%);color:var(--arcade-copy);-webkit-font-smoothing:antialiased}
main,main.wrap,.wrap,.arcade{isolation:isolate}
.hero h1,h1{font-weight:950;text-wrap:balance}
.hero h1 span,h1 span{filter:drop-shadow(0 5px 22px rgba(178,91,104,0.13))}
.eyebrow,.kicker,.tagline{font-weight:900;text-transform:uppercase;letter-spacing:.19em}
.cabinet,.game,.game-panel,.panel,.account,.board-wrap,.table-wrap,.scoreboard,.side-panel{border:1px solid var(--arcade-edge)!important;border-radius:18px!important;background:linear-gradient(145deg,rgba(23,25,33,.97),rgba(11,12,17,.99))!important;box-shadow:0 24px 70px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.035)}
.cabinet,.game,.game-panel,.panel{backdrop-filter:blur(12px)}
.cabinet,.game{overflow:hidden}
.cabinet:after,.game:after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 1px rgba(255,255,255,.055);z-index:2}
.cabinet:hover,.game:hover{border-color:rgba(178,91,104,0.3)!important;box-shadow:0 28px 80px rgba(0,0,0,.42),0 0 35px rgba(178,91,104,0.045)}
p{line-height:1.72}
.lede,.muted,.sub,.description{color:#b3b1b7}
button,.btn,.button,.action,input,select,textarea{font:inherit}
button,.btn,.button,.action{border-radius:10px;transition:transform .16s ease,border-color .16s ease,background .16s ease,filter .16s ease,box-shadow .16s ease}
button:not(:disabled),.btn:not(:disabled),.button:not(:disabled),.action:not(:disabled){touch-action:manipulation}
button:hover:not(:disabled),.btn:hover:not(:disabled),.button:hover:not(:disabled),.action:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.08)}
button:active:not(:disabled),.btn:active:not(:disabled),.button:active:not(:disabled),.action:active:not(:disabled){transform:translateY(0) scale(.985)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #ece1d3!important;outline-offset:4px}
button:disabled,.btn:disabled,.button:disabled,.action:disabled{cursor:not-allowed;filter:saturate(.4);opacity:.42}
input,select,textarea{border:1px solid rgba(255,255,255,.14)!important;border-radius:10px!important;background:#090b10!important;color:#fff!important}
input:focus,select:focus,textarea:focus{border-color:rgba(178,91,104,0.7)!important;box-shadow:0 0 0 3px rgba(178,91,104,0.1)}
.stat,.stats>*,.meter,.score-row>*,.pill,.badge,.chip{border-color:rgba(255,255,255,.1)}
.stat,.meter{box-shadow:inset 0 1px rgba(255,255,255,.035)}
.stat strong,.meter strong{font-variant-numeric:tabular-nums;letter-spacing:-.035em}
canvas{max-width:100%}
.cabinet canvas,.game canvas,.play-area canvas,.field canvas,.playfield canvas{image-rendering:auto}
.screen,.arena,.play-area,.canvas,.playfield,.field{border:1px solid rgba(255,255,255,.1)!important;border-radius:14px;overflow:hidden}
a{transition:color .16s ease,opacity .16s ease}
a:hover{color:#ece1d3}
.arcade-tools{display:flex;justify-content:flex-end;align-items:center;gap:.65rem;margin:0 0 .8rem}
.arcade-fullscreen{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;min-height:42px;padding:.7rem 1rem;border:1px solid rgba(178,91,104,0.3);border-radius:11px;background:linear-gradient(135deg,rgba(178,91,104,0.16),rgba(178,91,104,0.06));color:#ffe2cf;font-size:.76rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.06)}
.arcade-fullscreen svg{width:16px;height:16px;flex:none}
.arcade-fullscreen:hover{border-color:#ece1d3;background:rgba(178,91,104,0.22)}
.arcade-fullscreen[aria-pressed=true]{background:linear-gradient(135deg,#b25b68,#b25b68);color:#1b0b04;border-color:#ece1d3}
.arcade-fullscreen:focus-visible{outline:2px solid #ece1d3;outline-offset:4px}
.arcade-fullscreen-target:fullscreen{width:100vw;height:100vh;max-width:none!important;max-height:none!important;margin:0!important;padding:clamp(10px,2vw,28px)!important;overflow:auto;background:#08090d!important;border:0!important;border-radius:0!important}
.arcade-fullscreen-target:fullscreen .playfield canvas,.arcade-fullscreen-target:fullscreen .field canvas,.arcade-fullscreen-target:fullscreen .play-area canvas{max-height:68vh;object-fit:contain}
.arcade-fullscreen-target:fullscreen .hero{padding-top:.4rem!important;padding-bottom:1rem!important}
.arcade-fullscreen-target:fullscreen .hero h1{font-size:clamp(2rem,5vw,4rem)!important}
@media(min-width:1100px){.cabinet,.game{border-radius:20px!important}.cabinet,.game,.panel{padding:clamp(1.2rem,2vw,2rem)}}
@media(max-width:720px){.cabinet,.game,.game-panel,.panel{border-radius:14px!important}.arcade-tools{margin-bottom:.65rem}.arcade-fullscreen{min-height:40px;padding:.6rem .8rem}.hero{gap:.8rem}.stats{gap:.45rem}.stat{padding:.7rem .6rem}.stat strong{font-size:clamp(1.05rem,5vw,1.4rem)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Display treatment for canvas arenas and card-table surfaces. */
.playfield:has(canvas),.field:has(canvas),.play-area:has(canvas),.canvas-wrap:has(canvas){position:relative;isolation:isolate}
 .playfield:has(canvas):after,.field:has(canvas):after,.play-area:has(canvas):after,.canvas-wrap:has(canvas):after{content:"";position:absolute;z-index:1;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 48%,rgba(0,0,0,.28) 100%),repeating-linear-gradient(0deg,rgba(255,255,255,.014) 0,rgba(255,255,255,.014) 1px,transparent 1px,transparent 4px);box-shadow:inset 0 0 70px rgba(0,0,0,.22)}
.screen-overlay,.overlay{z-index:2}
.felt{background-color:#0c3525!important;background-image:radial-gradient(ellipse at 50% 15%,rgba(61,160,107,.27),transparent 65%),repeating-linear-gradient(115deg,rgba(255,255,255,.012) 0,rgba(255,255,255,.012) 1px,transparent 1px,transparent 5px),linear-gradient(145deg,#12452f,#09271b)!important;border-color:rgba(108,204,148,.3)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.035),inset 0 0 65px rgba(0,0,0,.22),0 18px 45px rgba(0,0,0,.22)}
.playing-card{box-shadow:0 8px 18px rgba(0,0,0,.28),inset 0 0 0 1px rgba(25,25,25,.09)!important}
.playing-card:hover{box-shadow:0 14px 24px rgba(0,0,0,.38)!important}

/* Cabinet controls v2: useful options, keyboard access, and saved display preferences. */
.arcade-tools{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:.5rem;margin:0 0 .8rem;position:relative;z-index:20}
.arcade-tool{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px;padding:.62rem .82rem;border:1px solid rgba(178,91,104,0.25);border-radius:10px;background:linear-gradient(135deg,rgba(178,91,104,0.12),rgba(178,91,104,0.035));color:#ffe2cf;font-size:.7rem;font-weight:900;letter-spacing:.045em;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.05)}
.arcade-tool-icon{font-size:1rem;line-height:1}
.arcade-tool:hover{border-color:#ece1d3;background:rgba(178,91,104,0.2)}
.arcade-tool[aria-pressed=true]{background:linear-gradient(135deg,#b25b68,#b25b68);color:#1b0b04;border-color:#ece1d3}
.arcade-tool:focus-visible,.arcade-help-close:focus-visible{outline:2px solid #ece1d3;outline-offset:3px}
.arcade-shortcuts{position:relative;z-index:19;margin:0 0 1rem;padding:1rem 1.1rem;border:1px solid rgba(178,91,104,0.28);border-radius:14px;background:linear-gradient(145deg,#17131a,#0a0b10);box-shadow:0 18px 44px #0008;color:#f5eee8}
.arcade-shortcuts[hidden]{display:none}
.arcade-shortcuts-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;color:#ece1d3;letter-spacing:.12em;font-size:.75rem}
.arcade-help-close{width:34px;height:34px;border:1px solid #78666a;border-radius:8px;background:#1b1717;color:#fff;font-size:1.35rem;cursor:pointer}
.arcade-shortcuts dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin:.9rem 0}
.arcade-shortcuts dl>div{display:flex;align-items:center;gap:.6rem;min-width:0;padding:.55rem;border:1px solid #ffffff12;border-radius:8px;background:#ffffff05}
.arcade-shortcuts dt{flex:none;min-width:2rem;padding:.3rem .45rem;text-align:center;border:1px solid #ece1d340;border-radius:6px;background:#b25b6817;color:#ece1d3;font-weight:900}
.arcade-shortcuts dd{margin:0;color:#c7c0bb;font-size:.82rem}
.arcade-shortcuts p{margin:.6rem 0 0;color:#8e8985;font-size:.78rem}
body.arcade-focus-mode>header,body.arcade-focus-mode>.kf-header,body.arcade-focus-mode>nav,body.arcade-focus-mode>footer{display:none!important}
body.arcade-focus-mode .arcade-fullscreen-target{margin-top:1rem!important}
html.arcade-high-contrast{--arcade-copy:#fff;--arcade-dim:#fff;filter:contrast(1.13)}
html.arcade-high-contrast body{background:#000!important;color:#fff!important}
html.arcade-high-contrast .muted,html.arcade-high-contrast .lede,html.arcade-high-contrast .sub,html.arcade-high-contrast .description{color:#f1f1f1!important}
html.arcade-high-contrast button,html.arcade-high-contrast a{outline-color:#ece1d3}
html.arcade-reduce-motion *,html.arcade-reduce-motion *:before,html.arcade-reduce-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.arcade-fullscreen-target:fullscreen .arcade-tools{position:sticky;top:0}
@media(max-width:600px){.arcade-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}.arcade-tool{width:100%;min-height:42px;padding:.55rem .4rem;font-size:.68rem}.arcade-shortcuts dl{grid-template-columns:repeat(2,minmax(0,1fr))}.arcade-shortcuts{padding:.8rem}}
@media(prefers-reduced-motion:reduce){.arcade-tool{transition:none!important}}


/* True gameplay fullscreen: use the cabinet as the viewport and preserve the HUD + input controls. */
.arcade-fullscreen-target:fullscreen {
  display:flex!important;
  flex-direction:column!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:clamp(8px,1.4vw,20px)!important;
  gap:clamp(6px,1vh,12px)!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border:0!important;
  border-radius:0!important;
  background:#05080e!important;
  isolation:isolate!important;
}
.arcade-fullscreen-target:fullscreen > .arcade-tools,
.arcade-fullscreen-target:fullscreen > .arcade-shortcuts {
  flex:0 0 auto;
  margin:0!important;
}
.arcade-fullscreen-target:fullscreen .playfield,
.arcade-fullscreen-target:fullscreen .field,
.arcade-fullscreen-target:fullscreen .play-area,
.arcade-fullscreen-target:fullscreen .canvas-wrap {
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.arcade-fullscreen-target:fullscreen .playfield canvas,
.arcade-fullscreen-target:fullscreen .field canvas,
.arcade-fullscreen-target:fullscreen .play-area canvas,
.arcade-fullscreen-target:fullscreen .canvas-wrap canvas {
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:unset!important;
  object-fit:contain!important;
}
.arcade-fullscreen-target:fullscreen .hud,
.arcade-fullscreen-target:fullscreen .controls,
.arcade-fullscreen-target:fullscreen .control-group,
.arcade-fullscreen-target:fullscreen .seat-instructions,
.arcade-fullscreen-target:fullscreen .readout {
  flex:0 0 auto!important;
}
.arcade-fullscreen-target:fullscreen .controls {
  padding:clamp(6px,1vw,14px)!important;
  gap:clamp(6px,1vw,12px)!important;
}
.arcade-fullscreen-target:fullscreen .lower,
.arcade-fullscreen-target:fullscreen .odds-panel,
.arcade-fullscreen-target:fullscreen .paytable,
.arcade-fullscreen-target:fullscreen .foot,
.arcade-fullscreen-target:fullscreen .fineprint {
  display:none!important;
}
.arcade-fullscreen-target:fullscreen .hero {
  flex:0 0 auto!important;
  padding:.25rem 0!important;
  margin:0!important;
  border:0!important;
}
.arcade-fullscreen-target:fullscreen .hero h1,
.arcade-fullscreen-target:fullscreen h1 {
  font-size:clamp(1.2rem,3vw,2.4rem)!important;
  margin:.1rem 0!important;
}
.arcade-fullscreen-target:fullscreen .hero p,
.arcade-fullscreen-target:fullscreen .back {
  display:none!important;
}
.arcade-fullscreen-target:fullscreen .screen-overlay {
  z-index:10;
}
.arcade-fullscreen-target:fullscreen .table,
.arcade-fullscreen-target:fullscreen .felt {
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
}
@media (orientation:landscape) and (max-height:600px) {
  .arcade-fullscreen-target:fullscreen { padding:5px!important; gap:5px!important; }
  .arcade-fullscreen-target:fullscreen .hud { grid-template-columns:repeat(5,minmax(0,1fr))!important; margin:0!important; padding:4px!important; gap:4px!important; }
  .arcade-fullscreen-target:fullscreen .meter { min-width:0!important; padding:5px 7px!important; }
  .arcade-fullscreen-target:fullscreen .meter small { font-size:.55rem!important; }
  .arcade-fullscreen-target:fullscreen .meter strong { font-size:clamp(.8rem,2.3vh,1.2rem)!important; }
  .arcade-fullscreen-target:fullscreen .controls { padding:4px!important; }
  .arcade-fullscreen-target:fullscreen .btn,
  .arcade-fullscreen-target:fullscreen .arcade-tool { min-height:34px!important; padding:5px 8px!important; font-size:.72rem!important; }
}
@media (max-width:700px) {
  .arcade-fullscreen-target:fullscreen { padding:5px!important; gap:5px!important; }
  .arcade-fullscreen-target:fullscreen .arcade-tools { display:flex!important; flex-wrap:wrap!important; justify-content:flex-end!important; gap:4px!important; }
  .arcade-fullscreen-target:fullscreen .arcade-tool { width:auto!important; min-height:34px!important; padding:5px 8px!important; }
  .arcade-fullscreen-target:fullscreen .controls { flex-wrap:wrap!important; justify-content:center!important; }
}


/* CHAOS CARTRIDGE: toxic slime + bubblegum neon arcade overhaul. */
:root{
  --arcade-ember:#b25b68;
  --arcade-rust:#b92eff;
  --arcade-line:rgba(178,91,104,.32);
  --arcade-ember:#b25b68;
  --arcade-gold:#c7a77c;
  --arcade-electric:#5bffb7;
  --arcade-ink:#070a10;
  --arcade-surface:#111321;
  --arcade-edge:rgba(146,161,138,.24);
  --arcade-copy:#f7f2ff;
  --arcade-dim:#b6b3c9;
}
html{scrollbar-color:#b25b68 #090b13}
body{
  background-color:#070910!important;
  background-image:
    radial-gradient(ellipse at 12% 4%,rgba(255,55,211,.2),transparent 32%),
    radial-gradient(ellipse at 88% 12%,rgba(69,255,158,.16),transparent 33%),
    radial-gradient(ellipse at 50% 100%,rgba(149,49,255,.12),transparent 42%),
    linear-gradient(180deg,#080912,#070910 68%,#0b0814)!important;
  color:#f8f3ff;
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:50;
  pointer-events:none;
  opacity:.13;
  background:repeating-linear-gradient(to bottom,transparent 0,transparent 3px,rgba(255,255,255,.16) 4px,transparent 5px);
  mix-blend-mode:screen;
}
body:after{
  content:"";
  position:fixed;
  inset:0;
  z-index:49;
  pointer-events:none;
  opacity:.2;
  background-image:radial-gradient(rgba(255,255,255,.38) .65px,transparent .8px);
  background-size:5px 5px;
  mask-image:linear-gradient(to bottom,black,transparent 75%);
}
.arcade-fullscreen-target:fullscreen{background:#070910!important}
.hero h1,.cartridge-title,h1{
  text-shadow:3px 0 rgba(255,65,210,.32),-3px 0 rgba(81,255,171,.25),0 0 32px rgba(178,91,104,.18)!important;
}
.hero h1 span,.cartridge-title span,h1 span{
  color:#c7a77c!important;
  text-shadow:0 0 8px rgba(199,167,124,.45),0 0 28px rgba(199,167,124,.18)!important;
}
.eyebrow,.kicker,.cartridge-number,.section-label{
  color:#ff65df!important;
  text-shadow:0 0 15px rgba(178,91,104,.25);
}
.cabinet,.game,.game-panel,.panel,.cartridge-cabinet,.odds-panel,.arcade-shortcuts,.playfield,.play-area,.field,.canvas-wrap{
  border-color:rgba(101,255,183,.32)!important;
  background-color:#0e111d!important;
  box-shadow:0 0 0 1px rgba(178,91,104,.1),0 0 28px rgba(71,255,170,.055),0 20px 60px rgba(0,0,0,.48),inset 0 1px rgba(255,255,255,.055)!important;
}
.cabinet:before,.game:before,.cartridge-cabinet:before{
  background:linear-gradient(110deg,transparent,rgba(178,91,104,.13),rgba(146,161,138,.13),transparent)!important;
}
.cartridge-cabinet{
  border-radius:14px!important;
  background:linear-gradient(145deg,rgba(23,15,34,.98),rgba(9,14,22,.99))!important;
}
.cartridge-cabinet:after{
  background:radial-gradient(circle,var(--glow,rgba(178,91,104,.2)),transparent 70%)!important;
}
.cartridge-cabinet h3,.game h2,.game-panel h2,.panel h2,.odds-panel h2{
  color:#f8f1ff;
  text-shadow:0 0 18px rgba(178,91,104,.1);
}
.cartridge-cabinet p,.lede,.muted,.hero p:not(.eyebrow),.panel p,.panel li{
  color:#b9b8cb!important;
}
.status,.pill,.badge,.genre,.license,.tag{
  border:1px solid rgba(199,167,124,.36)!important;
  background:rgba(199,167,124,.07)!important;
  color:#d6ff7c!important;
}
button,.btn,.button,.action,.primary,.game-tabs button,.arcade-tool{
  border-color:rgba(255,91,219,.48)!important;
  background:linear-gradient(135deg,rgba(178,91,104,.16),rgba(92,255,178,.08))!important;
  color:#fff1ff!important;
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 0 18px rgba(178,91,104,.06)!important;
}
button:hover:not(:disabled),.btn:hover:not(:disabled),.button:hover:not(:disabled),.action:hover:not(:disabled),.arcade-tool:hover{
  border-color:#c7a77c!important;
  box-shadow:0 0 0 1px rgba(199,167,124,.26),0 0 24px rgba(178,91,104,.18)!important;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid #c7a77c!important;
  outline-offset:3px;
}
button:active:not(:disabled),.btn:active:not(:disabled),.button:active:not(:disabled),.action:active:not(:disabled){
  filter:saturate(1.35);
}
.btn.hot,.button-primary,.action.primary,.arcade-tool[aria-pressed=true]{
  background:linear-gradient(120deg,#b25b68 0%,#ff76b8 48%,#c7a77c 100%)!important;
  border-color:#ffd4f5!important;
  color:#160b1b!important;
  font-weight:950!important;
  box-shadow:0 0 24px rgba(178,91,104,.2),inset 0 1px rgba(255,255,255,.5)!important;
}
input,select,textarea,.guess-form input{
  border-color:rgba(146,161,138,.32)!important;
  background:#080b13!important;
  color:#f8f3ff!important;
}
.playfield canvas,.field canvas,.play-area canvas,.canvas-wrap canvas,.game canvas,.cabinet canvas{
  image-rendering:auto;
}
/* Only explicitly marked pixel-art assets should use nearest-neighbour scaling. */
.pixel-art,.sprite-thumb,.asset-thumb{image-rendering:pixelated;image-rendering:crisp-edges;}
.arcade-tools{gap:.55rem}
.arcade-tool-icon{color:#c7a77c}
.arcade-shortcuts-head{color:#ff75e3!important}
.arcade-shortcuts dt{border-color:rgba(199,167,124,.5)!important;color:#c7a77c!important;background:rgba(199,167,124,.08)!important}
.score-row strong,.stat strong,.meter strong,.credits,.credit{color:#c7a77c!important}
.score-row,.stat,.meter,.readout,.message,.wallet-inline{
  border-color:rgba(146,161,138,.18)!important;
}
.game-tabs button[aria-selected=true],.tabs button[aria-selected=true],.tabs .active{
  border-color:#c7a77c!important;
  background:linear-gradient(120deg,rgba(178,91,104,.2),rgba(199,167,124,.12))!important;
  color:#e5ff9e!important;
}
.memory-card.revealed,.memory-card.matched,.whack-hole.live,.reaction-box.ready,.ttt-cell:hover{
  border-color:#c7a77c!important;
  box-shadow:0 0 22px rgba(199,167,124,.18)!important;
}
.target{
  background:linear-gradient(135deg,#b25b68,#c7a77c)!important;
  color:#100b16!important;
  box-shadow:0 0 30px rgba(178,91,104,.35),0 0 50px rgba(199,167,124,.12)!important;
}
.fineprint,.fine,.footnote,.cartridge-note{color:#85849c!important}
a{color:#ff82e5}
a:hover{color:#d7ff72}
@media(prefers-reduced-motion:no-preference){
  .cartridge-cabinet:nth-child(3n+1),.game:nth-child(3n+1){animation:chaos-flicker 7s steps(2,end) infinite}
  .cartridge-cabinet:nth-child(3n+2),.game:nth-child(3n+2){animation:chaos-flicker 9s steps(2,end) infinite reverse}
  @keyframes chaos-flicker{0%,94%,100%{filter:none}95%{filter:brightness(1.09) saturate(1.3)}96%{filter:brightness(.98)}}
}
@media(prefers-reduced-motion:reduce){
  body:before,body:after{display:none!important}
  .cartridge-cabinet,.game,.cabinet{animation:none!important}
}


/* Integrated arcade fullscreen and cabinet polish, recolored for Ash-Fall. */
/* Ash-Fall arcade design system: polished cabinets, legible controls, responsive play spaces. */
:root{--arcade-ember:#92a18a;--arcade-rust:#b25b68;--arcade-line:#303030}
main.arcade,body>main{position:relative;isolation:isolate}
main.arcade:before,body>main:before{content:"";position:absolute;z-index:-1;pointer-events:none;inset:0 0 auto;height:25rem;background:radial-gradient(ellipse at 78% 0%,rgba(178,91,104,.11),transparent 58%)}
.hero{position:relative;padding-top:clamp(3.5rem,8vw,6.5rem)!important;padding-bottom:2.5rem!important}
.hero h1{font-size:clamp(3.2rem,8vw,6.6rem)!important;line-height:.9!important;letter-spacing:-.075em!important;text-wrap:balance}
.hero h1 span{color:#c7a77c;text-shadow:0 0 36px rgba(178,91,104,.1)}
.hero .lede,.hero .muted{max-width:760px;color:#b9aeca;line-height:1.8}
.back{display:inline-flex;align-items:center;gap:.5rem;margin:.6rem 0 1rem!important;color:#92a18a!important;text-decoration:none;letter-spacing:.04em;transition:color .18s ease,transform .18s ease}
.back:hover{color:#b25b68!important;transform:translateX(-2px)}
.cabinet,.game,.game-panel,.panel,.card{border-color:#303030!important;background:linear-gradient(145deg,rgba(21,18,16,.98),rgba(9,9,9,.98))!important;box-shadow:0 18px 48px rgba(0,0,0,.22)}
.cabinet,.game{position:relative;isolation:isolate;overflow:hidden;transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease}
.cabinet:before,.game:before{content:"";position:absolute;z-index:-1;inset:0;background:radial-gradient(ellipse at 100% 0%,rgba(178,91,104,.09),transparent 56%);pointer-events:none}
.cabinet:hover,.game:hover{border-color:#92a18a!important;box-shadow:0 24px 54px rgba(0,0,0,.32)}
.cabinet h2,.game h2,.game-panel h2,.panel h2{letter-spacing:-.04em}
.cabinet p,.game p,.game-panel .muted,.panel .muted{line-height:1.75}
.btn,.button,.action,.primary{transition:transform .17s ease,filter .17s ease,border-color .17s ease}
.btn:hover,.button:hover,.action:hover,.primary:hover{filter:brightness(1.1);transform:translateY(-2px)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #92a18a!important;outline-offset:3px}
.screen,.arena,.play-area,.canvas{border-color:#b25b68!important;box-shadow:inset 0 0 0 1px rgba(168,255,62,.045),inset 0 0 40px rgba(0,0,0,.5)}
.stat,.stats,.scoreline,.account-status,.message,.status,.note,.credits{border-color:#827076}
.game-tabs,.tabs,.game-library-tools{gap:.6rem}
.game-tabs button[aria-selected=true],.tabs button[aria-selected=true],.tabs .active{border-color:#b25b68!important;background:rgba(178,91,104,.14)!important;color:#92a18a!important}
.cabinet .eyebrow,.game .eyebrow,.hero .eyebrow{color:#b25b68}
.cabinet .tag,.genre,.license,.pill{border-color:#b25b68!important;color:#92a18a!important;background:rgba(178,91,104,.075)!important}
.shelf,.grid,.layout,.dump-grid{gap:1rem}
.cabinet canvas,.game canvas,.canvas{max-width:100%;border-radius:8px}
.fineprint,.fine,.footnote{color:#b9aeca;line-height:1.7}
@media(max-width:800px){.hero{padding-top:3.5rem!important}.hero h1{font-size:clamp(3rem,12vw,5rem)!important}.shelf,.grid,.layout{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.hero{padding-top:2.8rem!important;padding-bottom:1.6rem!important}.hero h1{font-size:clamp(2.7rem,13vw,4.2rem)!important}.shelf,.grid,.layout{grid-template-columns:minmax(0,1fr)!important}.cabinet,.game{border-radius:12px!important}.game-tabs,.tabs{display:flex;max-width:100%;overflow-x:auto;padding-bottom:.3rem}.game-tabs button,.tabs button{flex:0 0 auto}.back{font-size:.85rem}}
@media(prefers-reduced-motion:reduce){.cabinet,.game,.back,.btn,.button,.action,.primary{transition:none!important}}


/* Round five: unified cabinet chrome, legible controls and true game fullscreen. */
:root{--af-ember:#92a18a;--af-panel:#11100f;--af-edge:#303030;--af-text:#f5f1ed;--af-muted:#aaa19a}
.af-game-root{position:relative;min-width:0;isolation:isolate}
.af-game-tools{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin:0 0 1rem;padding:.65rem .75rem;border:1px solid #303030;border-radius:10px;background:linear-gradient(100deg,#1a1511,#0b0b0b 75%);box-shadow:inset 0 1px 0 #ffffff08}
.af-game-kicker{font-size:.64rem;font-weight:950;letter-spacing:.18em;color:#78666a}
.af-fullscreen-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:42px;padding:.65rem .9rem;border:1px solid #78666a;border-radius:9px;background:linear-gradient(135deg,#92a18a,#b25b68);color:#160a03;font:inherit;font-size:.83rem;font-weight:900;letter-spacing:.01em;cursor:pointer;box-shadow:0 5px 18px #92a18a20;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
.af-fullscreen-toggle:hover{filter:brightness(1.12);transform:translateY(-1px);box-shadow:0 8px 24px #92a18a30}
.af-fullscreen-toggle:focus-visible{outline:2px solid #ece1d3;outline-offset:3px}
.af-game-root:fullscreen,.af-game-root:-webkit-full-screen{width:100%;height:100%;max-width:none;max-height:none;overflow:auto;margin:0!important;padding:clamp(.75rem,2.5vw,2rem);border:0!important;border-radius:0!important;background:radial-gradient(ellipse at 15% 0%,#b25b6828,transparent 38%),#080808!important;color:#f5f1ed;box-shadow:none!important}
.af-game-root:fullscreen .af-game-tools,.af-game-root:-webkit-full-screen .af-game-tools{position:sticky;top:0;z-index:30;backdrop-filter:blur(14px);background:#11100fee}
.af-game-root:fullscreen canvas,.af-game-root:-webkit-full-screen canvas{max-height:calc(100vh - 190px);object-fit:contain}
.af-game-root:fullscreen .screen,.af-game-root:-webkit-full-screen .screen{min-height:0}
.af-game-root:fullscreen .arena,.af-game-root:fullscreen .play-area,.af-game-root:-webkit-full-screen .arena,.af-game-root:-webkit-full-screen .play-area{min-height:min(44vh,480px)}
.af-game-root:fullscreen .game-panel,.af-game-root:fullscreen .panel,.af-game-root:-webkit-full-screen .game-panel,.af-game-root:-webkit-full-screen .panel{min-height:calc(100vh - 150px)}
.af-game-root:fullscreen .canvas-wrap canvas,.af-game-root:-webkit-full-screen .canvas-wrap canvas{width:100%;max-height:calc(100vh - 230px);object-fit:contain}
.af-game-root:fullscreen .af-fullscreen-toggle,.af-game-root:-webkit-full-screen .af-fullscreen-toggle{background:#a4ff8a;border-color:#a4ff8a;color:#091007}
.af-game-root:fullscreen .layout,.af-game-root:-webkit-full-screen .layout{width:100%;max-width:1500px;margin-inline:auto}
.af-game-root:fullscreen .log,.af-game-root:-webkit-full-screen .log{scrollbar-color:#78666a #100e0c}
button,select,input,textarea{accent-color:var(--af-ember)}
button:disabled{cursor:not-allowed}
@media(max-width:650px){.af-game-tools{padding:.55rem;align-items:stretch}.af-game-kicker{align-self:center}.af-fullscreen-toggle{min-height:44px}.af-game-root:fullscreen,.af-game-root:-webkit-full-screen{padding:.55rem}.af-game-root:fullscreen .af-game-tools,.af-game-root:-webkit-full-screen .af-game-tools{gap:.45rem}.af-game-root:fullscreen canvas,.af-game-root:-webkit-full-screen canvas{max-height:calc(100dvh - 180px)}}
@media(prefers-reduced-motion:reduce){.af-fullscreen-toggle{transition:none}}

/* Full-page game layouts keep their HUDs and controls while hiding only marketing chrome. */
main.af-game-root:fullscreen,main.af-game-root:-webkit-full-screen{display:block!important;width:100%!important;max-width:none!important;margin:0!important}
main.af-game-root:fullscreen>.back,main.af-game-root:fullscreen>.hero,main.af-game-root:fullscreen>.intro,main.af-game-root:fullscreen>.account,
main.af-game-root:-webkit-full-screen>.back,main.af-game-root:-webkit-full-screen>.hero,main.af-game-root:-webkit-full-screen>.intro,main.af-game-root:-webkit-full-screen>.account{display:none!important}
main.af-game-root:fullscreen .roster,main.af-game-root:fullscreen .roster-heading,main.af-game-root:fullscreen .mutation-row,main.af-game-root:fullscreen .character-banner,
main.af-game-root:-webkit-full-screen .roster,main.af-game-root:-webkit-full-screen .roster-heading,main.af-game-root:-webkit-full-screen .mutation-row,main.af-game-root:-webkit-full-screen .character-banner{display:none!important}
main.af-game-root:fullscreen .hud,main.af-game-root:-webkit-full-screen .hud{margin-top:.3rem}




/* Round eight: game-specific presentation layers. Keep each game's identity while
   making the actual play area, HUD and live feedback feel deliberately designed. */

/* City of Cinders: arcade-fighter HUD and character-select clarity. */
body:has(#roster) .roster{gap:.85rem}
body:has(#roster) .monster-card{position:relative;overflow:hidden;min-height:118px;padding:1rem;background:linear-gradient(145deg,#191713,#0c0c0c 72%);border-radius:13px;transition:transform .18s ease,border-color .18s ease,background .18s ease}
body:has(#roster) .monster-card:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--arcade-ember),#92a18a);opacity:.65}
body:has(#roster) .monster-card[aria-pressed="true"]{background:linear-gradient(145deg,#242016,#10120b);border-color:#92a18a!important;box-shadow:0 0 0 1px #92a18a30,0 12px 30px #0008}
body:has(#roster) .monster-card strong{font-size:1.02rem;letter-spacing:-.025em;margin-bottom:.35rem}
body:has(#roster) .hud{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:.65rem}
body:has(#roster) .hud .stat{border-radius:11px;background:linear-gradient(150deg,#171513,#0b0b0b);padding:.8rem;border-color:#3b3027}
body:has(#roster) .game-shell{border-radius:15px;border:1px solid #493528;background:#090909;box-shadow:inset 0 0 45px #0008,0 18px 45px #0005}
body:has(#roster) .canvas-wrap{border-radius:12px;overflow:hidden;background:#08090a}
body:has(#roster) .overlay-panel{backdrop-filter:blur(9px);border:1px solid #92a18a70;box-shadow:0 16px 55px #000b}
body:has(#roster) .mobile-controls .control{min-height:48px;border-radius:12px;font-weight:900}

/* Not Dead Yet: compact survival HUD, readable campaign progress and strong action hierarchy. */
body:has(#campaign-stage) .hud{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:.55rem;margin:1rem 0}
body:has(#campaign-stage) .hud .stat{padding:.7rem .8rem;border-radius:10px;background:linear-gradient(145deg,#18151a,#0b0b0e);border-color:#39313e}
body:has(#campaign-stage) .hud .stat strong{font-variant-numeric:tabular-nums;letter-spacing:-.035em}
body:has(#campaign-stage) #campaign-stage{border:1px solid #3e343f;border-radius:12px;padding:1rem;background:linear-gradient(120deg,#17131b,#0c0b10)}
body:has(#campaign-stage) #stage-progress,body:has(#campaign-stage) #contract-bar{accent-color:#92a18a}
body:has(#campaign-stage) .game-shell{border-radius:16px;border:1px solid #41303a;background:#08090d;box-shadow:inset 0 0 55px #0009,0 20px 55px #0007}
body:has(#campaign-stage) .screen{overflow:hidden;border-radius:12px;background:#09090e}
body:has(#campaign-stage) .controls{gap:.65rem}
body:has(#campaign-stage) .controls button,body:has(#campaign-stage) .touch-controls button{min-height:44px;border-radius:10px}
body:has(#campaign-stage) #overlay{backdrop-filter:blur(8px)}
body:has(#campaign-stage) #achievement-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:.5rem}

/* Lemonade Stand: business dashboard hierarchy and a calmer management surface. */
body:has(#upgrade-sign) .layout{align-items:start}
body:has(#upgrade-sign) .layout>.panel:first-child{background:radial-gradient(ellipse at 100% 0%,#c7f36b0b,transparent 45%),linear-gradient(145deg,#171a13,#0b0d0a)!important}
body:has(#upgrade-sign) .layout>.panel:last-child{background:linear-gradient(155deg,#151710,#0b0d0a)!important}
body:has(#upgrade-sign) .stats{gap:.65rem}
body:has(#upgrade-sign) .stat{min-width:0;transition:border-color .18s ease}
body:has(#upgrade-sign) .stat strong{font-variant-numeric:tabular-nums;letter-spacing:-.04em}
body:has(#upgrade-sign) .controls{gap:.9rem}
body:has(#upgrade-sign) .field input,body:has(#upgrade-sign) .field select{min-height:44px;border-radius:9px;background:#090b08}
body:has(#upgrade-sign) #log{max-height:300px;overflow:auto;overscroll-behavior:contain;border:1px solid #303728;border-radius:10px;padding:.8rem;background:#090b08;line-height:1.65}
body:has(#upgrade-sign) .panel h2{display:flex;align-items:center;gap:.55rem}

/* Wagonbound: journey planning, party condition and event log become distinct panels. */
body:has(#rookcondition) .layout{align-items:start}
body:has(#rookcondition) .layout>.panel:first-child{background:radial-gradient(ellipse at 50% 0%,#ece1d30b,transparent 50%),linear-gradient(145deg,#191610,#0d0c09)!important}
body:has(#rookcondition) .layout>.panel:last-child{background:linear-gradient(155deg,#17140f,#0b0a08)!important}
body:has(#rookcondition) .stats{gap:.65rem}
body:has(#rookcondition) .stat{min-width:0;transition:border-color .18s ease}
body:has(#rookcondition) .stat strong{font-variant-numeric:tabular-nums}
body:has(#rookcondition) .event{border:1px solid #4a3a27;border-radius:12px;background:linear-gradient(135deg,#1b1710,#100e0a);padding:1rem}
body:has(#rookcondition) .landscape{border-radius:13px;box-shadow:inset 0 0 40px #0008}
body:has(#rookcondition) #log{max-height:320px;overflow:auto;overscroll-behavior:contain;border:1px solid #3a3023;border-radius:10px;padding:.8rem;background:#0b0a08;line-height:1.65}
body:has(#rookcondition) .controls button{min-height:44px;border-radius:9px}

/* Small screens: prevent HUD cards and management controls from squeezing the play field. */
@media(max-width:620px){
 body:has(#roster) .hud{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:has(#campaign-stage) .hud{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:has(#upgrade-sign) .stats,body:has(#rookcondition) .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:has(#upgrade-sign) .controls,body:has(#rookcondition) .controls{grid-template-columns:minmax(0,1fr)}
 body:has(#campaign-stage) .controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:has(#campaign-stage) .controls button,body:has(#campaign-stage) .touch-controls button{min-height:48px}
}
@media(prefers-reduced-motion:reduce){
 body:has(#roster) .monster-card,body:has(#upgrade-sign) .stat,body:has(#rookcondition) .stat{transition:none}
}


/* Ash-Fall arcade feedback: score changes, messages, and tactile controls. */
.af-feedback-status{position:relative;transition:color .16s ease,border-color .16s ease}
.af-feedback-pulse{animation:afFeedbackPulse .48s ease-out}
.af-feedback-alert{animation:afFeedbackAlert .48s ease-out}
.af-feedback-number{font-variant-numeric:tabular-nums}
.af-feedback-press{transform:scale(.975)!important;filter:brightness(1.2)}
.af-arcade-hidden .af-feedback-pulse,.af-arcade-hidden .af-feedback-alert{animation:none!important}
@keyframes afFeedbackPulse{
  0%{filter:brightness(1.55);text-shadow:0 0 18px #b25b6855}
  100%{filter:brightness(1);text-shadow:none}
}
@keyframes afFeedbackAlert{
  0%{color:#ece1d3;filter:brightness(1.3)}
  100%{filter:brightness(1)}
}
@media(prefers-reduced-motion:reduce){
  .af-feedback-pulse,.af-feedback-alert,.af-feedback-press{animation:none!important;transition:none!important;transform:none!important;filter:none!important}
}


/* Display reliability: gameplay canvases must fit mobile cabinets without cropping.
   Keep native drawing-buffer dimensions intact so input coordinates still map correctly. */
:where(.game-panel,.cabinet,.game,.panel,.playfield,.field,.play-area,.canvas-wrap,.screen,.arena){min-width:0}
:where(.playfield,.field,.play-area,.canvas-wrap,.screen,.arena) canvas{
  display:block;
  max-width:100%;
  height:auto;
  object-fit:contain;
}
:where(.playfield,.field,.play-area,.canvas-wrap,.screen,.arena) iframe{
  display:block;
  width:100%;
  max-width:100%;
  border:0;
}
:where(.arcade-fullscreen-target:fullscreen) {
  box-sizing:border-box;
  width:100vw!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:auto!important;
  overscroll-behavior:contain;
}
@media(max-width:720px){
  :where(.game-panel,.cabinet,.game,.panel){max-width:100%}
  :where(.playfield,.field,.play-area,.canvas-wrap,.screen,.arena){max-width:100%}
}
