:root { --slomie-serif: var(--font-body); }

/* Frame treatments are painted inside the existing cabinet boxes. */
.play-screen { border-color:#9aa8b0; box-shadow:0 0 0 1px #07090c,0 0 24px #000; }
.play-screen::before {
  background:
    linear-gradient(90deg,#171b1e,#adb7bf 16%,#4f5b67 31%,#191d22 54%,#06080a 73%,#687681 90%,#161e27) left / var(--frame-edge) 100% no-repeat,
    linear-gradient(270deg,#171b1e,#adb7bf 16%,#4f5b67 31%,#191d22 54%,#06080a 73%,#687681 90%,#161e27) right / var(--frame-edge) 100% no-repeat,
    linear-gradient(145deg,#151b21,#06080b 42%,#0e161e 77%,#0a0b0d);
}
.machine-data-panel {
  background:linear-gradient(#131e23,#02070b 53%,#0b131a) padding-box,
    linear-gradient(155deg,#c9d1d7,#535e69 14%,#a8b7c0 24%,#141b22 53%,#4a575f 79%,#9aaab6) border-box;
  box-shadow:inset 0 0 0 1px #a2aeb0,inset 0 3px 0 #212d35,inset 0 -3px 0 #050a0e;
}
.management-counter > div {
  background:linear-gradient(180deg,#182329,#030609 38%,#060e13 90%,#101c25);
  box-shadow:inset 0 1px #677680,inset 0 -1px #263941,inset 2px 0 #03080a;
}
.lcd-screen {
  background:linear-gradient(170deg,var(--state-deep),#060c11 78%) padding-box,
    linear-gradient(140deg,#f0f5fa,#78818b 18%,#222a31 28%,#a3aeb7 42%,#424f5b 67%,#f3f7fa 91%,#5c6974) border-box;
  box-shadow:inset 0 0 0 1px #090c10,inset 0 0 0 3px #586872,inset 0 0 0 4px #152b35,inset 0 0 13px 3px #060c11;
}
.reel-machine {
  box-shadow:inset 0 0 0 1px #020408,inset 0 0 0 2px #919ca6,inset 0 0 0 4px #37434d,inset 0 4px 8px #020407;
}
.reel-window { border-inline-color:#151d23; box-shadow:0 0 0 1px #9ea9b1,0 0 0 2px #151b21,inset 0 1px 2px #a8b5c3; }
.reel-window::after { background:linear-gradient(90deg,#1520275c,transparent 15% 86%,#18232c61); }
.switch-housing,.push-housing { background:linear-gradient(155deg,#e5e9ed,#5d6872 16%,#202931 28%,#11151b 64%,#82919a 87%,#c9d4dc); }
.push-housing,.push-button { border-radius:10px; }
.spin-button { --button-fill:linear-gradient(#68c9fb,#0279b7 25%,#024b75 60%,#0ecaf0 91%,#2472aa); --button-text:#f1fbff; }
.spin-button,.push-button,.auto-button { text-shadow:0 1px #04101a; }
.push-button.push-idle { color:#11232e; background:linear-gradient(#e2eaee,#748f9e 58%,#485e70); text-shadow:0 1px #f5faff90; }
.auto-button:not([aria-pressed="true"]) { border-color:#5fabca; background:linear-gradient(#223542,#0a1118 75%); }

.lcd-flash-frame { position:absolute; inset:3px; width:calc(100% - 6px); height:calc(100% - 6px); pointer-events:none; z-index:8; overflow:visible; }
.lcd-flash-frame rect { fill:none; stroke:#fff; stroke-linecap:round; }
.frame-line { stroke-width:1.2px; opacity:.19; }
.frame-trail,.frame-spark { opacity:0; }
.lcd-screen:is([data-flash-pattern="short"],[data-flash-pattern="double"]) .frame-line { filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #fff9); stroke-width:2px; }
[data-flash-pattern="short"] .frame-line { animation:lcd-flash-short var(--flash-duration) ease-out both; }
[data-flash-pattern="double"] .frame-line { animation:lcd-flash-double var(--flash-duration) linear both; }
[data-flash-pattern="sweep"] .frame-trail,[data-flash-pattern="sweep"] .frame-spark {
  animation:lcd-flash-sweep var(--flash-duration) linear both;
  filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #fffb);
}
[data-flash-pattern="sweep"] .frame-trail { stroke-width:1.3px; stroke-dasharray:160 840; --trail-shift:0; }
[data-flash-pattern="sweep"] .frame-spark { stroke-width:2.4px; stroke-dasharray:62 938; --trail-shift:-98; }
[data-freeze-phase] .lcd-flash-frame { display:none; }
@keyframes lcd-flash-short { 0%,15% { opacity:1; } 100% { opacity:.19; } }
@keyframes lcd-flash-double { 0%,16%,58%,72% { opacity:1; } 34%,44%,100% { opacity:.19; } }
@keyframes lcd-flash-sweep {
  0% { stroke-dashoffset:var(--trail-shift); opacity:.7; }
  8%,92% { opacity:1; }
  100% { stroke-dashoffset:calc(var(--trail-shift) - 1000); opacity:.25; }
}
@media (prefers-reduced-motion:reduce) {
  .lcd-screen[data-flash-pattern] .lcd-flash-frame rect { animation:none; }
  .lcd-screen[data-flash-pattern] .frame-line { opacity:.72; }
  .lcd-screen[data-flash-pattern] :is(.frame-trail,.frame-spark) { opacity:0; }
}

.sound-controls { flex:none; width:90px; justify-content:space-between; gap:2px; }
.sound-channel { display:flex; width:44px; height:29px; gap:1px; align-items:stretch; }
.sound-controls .sound-channel button { display:flex; position:relative; align-items:center; justify-content:center; min-width:0; width:22px; padding:0; height:29px; }
.channel-mute svg { width:15px; height:15px; }
.channel-mute[aria-pressed="true"] svg { opacity:.46; }
.channel-mute[aria-pressed="true"]::after { content:""; position:absolute; width:18px; height:1.5px; border-radius:1px; background:#e8eff4; transform:rotate(-46deg); }

.state-panel.state-high .phase-metrics { --left-stat:clamp(60px,17.5vw,89px); }
.state-panel.state-high .phase-metrics #remaining-readout {
  grid-template-columns:max-content max-content; align-items:baseline; align-content:center; column-gap:1px; row-gap:3px;
}
.state-panel.state-high #remaining-label { grid-column:1/-1; }
.state-panel.state-high .phase-metrics #remaining-game { font-size:clamp(22px,7vw,35px); }
#high-games-progress { white-space:nowrap; color:#d1ffdd; font:780 clamp(10px,2.75vw,14px)/1.15 var(--font-code); }
#state-role-guide .stacked-award .award-weights { grid-template-columns:1fr; padding-block:0; gap:0; }
#state-role-guide .stacked-award .award-weight { display:flex; justify-content:space-between; min-height:13px; line-height:13px; }
.reel-cell:is([data-highlight="BELL"],[data-highlight="NAVI_BELL"]) { --stop-color:#ffd04a75; }
.reel-cell[data-highlight="REPLAY"] { --stop-color:#4299ff68; }
.reel-cell:is([data-highlight="CHERRY"],[data-highlight="STRONG_CHERRY"],[data-highlight="MIDDLE_CHERRY"]) { --stop-color:#f6355359; }
.reel-cell[data-highlight="LONG_FREEZE"] { --stop-color:#fbc13f9e; }
.ending-stamp[data-kind="HIGH_HINT"] { color:#fff; font:900 clamp(9px,2.4vw,12px)/1 var(--font-body); letter-spacing:-.09em; }
.guide-table .ending-stamp { width:23px; }
.guide-page .ending-stamp { font-size:12px; white-space:nowrap; overflow-wrap:normal; word-break:keep-all; }
.guide-page .ending-stamp[data-kind="HIGH_HINT"] { font-size:10px; }

.app-shell:has(#reference-screen:not([hidden])),.app-shell:has(#judge-screen:not([hidden])),.app-shell:has(#final-result-screen:not([hidden])) {
  width:min(100%,870px); height:100dvh; min-height:0; overflow:hidden;
}
.reference-screen:not([hidden]) { display:grid; height:100%; min-height:0; grid-template-rows:auto minmax(0,1fr); }
#reference-content,.judge-screen,#session-review { min-width:0; min-height:0; max-width:100%; overflow:hidden scroll; scrollbar-gutter:stable; overscroll-behavior:contain; scrollbar-width:thin; }
.app-shell:has(#judge-screen:not([hidden])) #game-screen { height:100%; min-height:0; }
.judge-screen { height:100%; align-content:start; }
.judge-screen > .ending-summary { margin:0; }
.judge-data-toggle { min-height:38px; background:#142f40; color:#e4f9ff; border:1px solid #426985; border-radius:4px; font:750 13px/1.2 var(--font-body); }
.judge-data-status { margin:0; font-size:12px; }
.judge-data-status:empty { display:none; }

.guide-page,.judge-screen,#session-review,.results-brand small,.judge-intro p { font-family:var(--font-body); }
#session-review,.result-hero,.judge-intro { background:#060a0d; }
.result-hero::before { content:none; }
.result-hero .review-coins { font:850 clamp(43px,14.5vw,110px)/1.04 var(--font-code); color:#fff0b9; }
.result-landing strong b,.result-series strong { font-family:var(--font-code); font-style:normal; font-variant-numeric:tabular-nums; }
.result-landing .result-judgment .judgment-label { max-width:100%; padding-inline:1px; white-space:normal; word-break:keep-all; text-align:center; font:800 clamp(10px,3.1vw,18px)/1.2 var(--font-body); }
