/* Dickbroom — pop-art roast slot. Bold outlines, halftone grime, neon sleaze. */
@font-face {
  font-family: "Baroness Kuffner";
  src: url("assets/BaronessKuffner.ttf?v=3") format("truetype");
  font-display: swap;
}
:root {
  --display: "Baroness Kuffner", "Arial Black", sans-serif;
  --pink: #ff1493;
  --pink-soft: #ff5fb6;
  --gold: #d4af37;
  --cream: #f5f0e6;
  --purple: #8b2bff;
  --green: #39ff88;
  --toxic: #8dff2e; /* radioactive win green */
  --ink: #120a16;
  --ink2: #1d1022;
  --stain: #daa520;
  --cell: clamp(60px, min(14vw, 17vh), 148px);
  --outline: 3px solid #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Arial Black", "Arial", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 20, 147, 0.18), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(139, 43, 255, 0.2), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 6px),
    var(--ink);
  background-attachment: fixed;
  overflow-x: hidden;
}
body.fs-mode {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 20, 147, 0.32), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 6px),
    #25061f;
}

/* Baroness Kuffner on the headline / chrome text; numbers stay legible. */
h1, .fs-flag, .prog, #spin-btn, #buy-btn, #auto-btn,
.fs-splash-title, .fs-splash-spins, .fs-splash-go,
#overlay-title, #overlay-amt, #win-pop,
.modal-box h2, .buy-name, .meter-label,
.fs-banner-k, .fs-banner-v, .pt-name, .lbl { font-family: var(--display); }

#app { max-width: 980px; margin: 0 auto; padding: 10px 12px 18px; display: flex; flex-direction: column; min-height: 100%; }

/* Header */
header { text-align: center; position: relative; }
header h1 {
  font-size: clamp(34px, 8vw, 64px);
  letter-spacing: 2px;
  color: var(--cream);
  -webkit-text-stroke: 2.5px #000;
  text-shadow: 4px 4px 0 var(--pink), 7px 7px 0 rgba(0,0,0,0.5);
  transform: rotate(-2deg);
  line-height: 1;
}
.header-flags { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 6px; min-height: 26px; }
.fs-flag { background: var(--pink); color: #fff; padding: 3px 12px; border: var(--outline); border-radius: 20px; font-size: 13px; box-shadow: 3px 3px 0 #000; animation: wobble 0.6s infinite alternate; }
.prog { background: var(--gold); color: #000; padding: 3px 12px; border: var(--outline); border-radius: 20px; font-size: 13px; box-shadow: 3px 3px 0 #000; }
@keyframes wobble { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

/* Main layout */
main { display: flex; gap: 14px; align-items: stretch; margin-top: 10px; flex: 1; }
#board-wrap { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* Sliding Dickbroom Row — each segment caps its own reel, so with the grid
   center-aligned and reels stepped (2-4-5-4-2), the caps arch over the contour
   instead of forming a flat bar. Reclaims the dead space above the short reels. */
.col { display: flex; flex-direction: column; align-items: center; }
.seg {
  width: var(--cell); height: 34px; margin-bottom: 7px; transition: transform 0.26s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid #000; border-radius: 8px; background: linear-gradient(#2a1430, #160b1c);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.45); font-size: 11px; line-height: 1;
  color: #6b5a72; overflow: hidden;
}
.seg .seg-icon { font-size: 18px; }
.seg .seg-lbl { font-size: 8px; letter-spacing: 0.5px; margin-top: 1px; }
.seg.pop { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.mod-wild { background: linear-gradient(#3a2a00, #1a1300); color: var(--gold); }
.mod-pepper { background: linear-gradient(#3a0028, #1a0012); color: var(--pink-soft); }
.mod-reject { background: linear-gradient(#06243a, #02121d); color: #5fd0ff; }
.mod-chat { background: linear-gradient(#062a16, #02160b); color: var(--green); }
.mod-charge { background: linear-gradient(#2a1a3a, #150a20); color: var(--purple); }

/* Stepped grid */
#grid { display: flex; gap: 6px; align-items: center; }
/* Idle: let winning cells glow past the reel edges. Only clip while spinning so
   the scrolling buffer stays masked. */
.reel { overflow: visible; }
.reel.spinning { overflow: hidden; }
.reel-strip { display: flex; flex-direction: column; gap: 6px; will-change: transform; }
.cell {
  width: var(--cell); height: var(--cell);
  border: var(--outline); border-radius: 12px;
  background: radial-gradient(circle at 50% 28%, #2c1934, #150a1b);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 0 0 2px rgba(255,255,255,0.03), 0 4px 0 rgba(0,0,0,0.4);
  position: relative; overflow: hidden; cursor: pointer; transition: transform 0.22s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s, border-color 0.3s, filter 0.25s;
}
.cell img { width: 110%; height: 110%; object-fit: contain; filter: drop-shadow(2px 3px 2px rgba(0,0,0,0.55)); transition: transform 0.28s cubic-bezier(.2,.8,.2,1), opacity 0.28s; }
.cell.blank { background: radial-gradient(circle at 50% 35%, #1c1022, #100712); }
.cell.blank img { width: 100%; height: 100%; opacity: 0.9; filter: none; }
/* Crisp single-settle bounce as a reel snaps into place (no big translate that
   fights the strip's own deceleration). */
.cell.land { animation: land 0.22s cubic-bezier(.2,.85,.3,1.1); }
@keyframes land { 0% { transform: translateY(-6px) scale(1.02); } 60% { transform: translateY(2px) scale(0.99); } 100% { transform: translateY(0) scale(1); } }

/* Winning cells: bright toxic ring + inset glow rendered INSIDE the cell so it
   survives the reel mask, plus an outward halo for idle reels. */
.cell.win { border-color: var(--toxic); z-index: 3; animation: winpulse 0.8s ease-in-out infinite; }
.cell.scatter-win { border-color: var(--green); z-index: 3; animation: winpulse 0.8s ease-in-out infinite; }
.cell.win img { transform: scale(1.1); filter: drop-shadow(0 0 7px rgba(141,255,46,0.85)) drop-shadow(2px 3px 2px rgba(0,0,0,0.55)); }
.cell.scatter-win img { transform: scale(1.08); filter: drop-shadow(0 0 7px rgba(141,255,46,0.65)) drop-shadow(2px 3px 2px rgba(0,0,0,0.55)); }
@keyframes winpulse {
  0%,100% { box-shadow: 0 0 0 2px var(--toxic), 0 0 10px 2px rgba(141,255,46,0.55), inset 0 0 12px rgba(141,255,46,0.45), 0 4px 0 rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 0 3px var(--toxic), 0 0 30px 9px rgba(141,255,46,0.95), inset 0 0 22px rgba(141,255,46,0.75), 0 4px 0 rgba(0,0,0,0.4); }
}
/* Dim the losers so the green winners pop. */
#grid.win-active .cell:not(.win) { filter: brightness(0.45) saturate(0.8); }
#grid.win-active .cell:not(.win) img { opacity: 0.85; }
/* Some source arts carry more transparent padding — scale them up to match the
   visual weight of the rest of the set. */
.cell[data-sym="micro"] img { width: 134%; height: 134%; }
.cell[data-sym="drakkar"] img,
.cell[data-sym="pepper"] img { width: 178%; height: 178%; }
/* The Creep is high-frequency NON-PAYING filler. Keep the art fully present (so
   the board never looks empty) but drain it to grayscale and shrink it slightly
   so it reads as dead grime — clearly NOT one of the colourful paying symbols.
   It only matters when it expands and gets rejected (see .creep-reject). */
.cell.creep { border-color: rgba(139,43,255,0.3); background: radial-gradient(circle at 50% 35%, #1f1330, #0e0717); }
.cell.creep img { filter: grayscale(1) brightness(0.72) contrast(0.9); opacity: 0.9; transform: scale(0.92); }
.cell.creep::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, transparent 52%, rgba(139,43,255,0.22));
}
/* When an xCreep actually expands and is rejected, restore its colour and flash
   it — so the feature reads as a real, exciting event, not the dead filler. */
.cell.creep-reject { border-color: var(--pink); z-index: 3; }
.cell.creep-reject img { filter: none; opacity: 1; transform: scale(1.08); }
.cell.creep-reject::after { display: none; }
.cell.creep-reject { animation: creepReject 0.5s ease-in-out 3; }
@keyframes creepReject {
  0%,100% { box-shadow: 0 0 0 2px var(--purple), inset 0 0 10px rgba(139,43,255,0.4), 0 4px 0 rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 22px 7px var(--pink), inset 0 0 18px rgba(255,20,147,0.6), 0 4px 0 rgba(0,0,0,0.4); }
}
.cell.cleared { animation: roastout 0.55s cubic-bezier(.4,0,.7,.2) forwards; }
.cell.cascade-out { animation: cascadeOut 0.55s cubic-bezier(.4,0,.7,.2) forwards; }
@keyframes roastout { 0% { transform: scale(1) rotate(0); opacity: 1; } 40% { transform: scale(1.12) rotate(-8deg); } 100% { transform: scale(0.15) rotate(48deg); opacity: 0; filter: blur(3px); } }
@keyframes cascadeOut { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(130%) scale(0.75); opacity: 0; filter: blur(2px); } }

/* Roast feed */
#roast-feed { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 100%; text-align: center; pointer-events: none; }
.roast-line { font-size: 15px; color: var(--cream); text-shadow: 2px 2px 0 #000; opacity: 1; transition: opacity 0.8s; }
.roast-line.hot { color: var(--pink-soft); }
.roast-line.fade { opacity: 0; }

/* Big toxic-green win readout over the board */
#win-pop {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%) scale(0.7);
  font-size: clamp(26px, 6vw, 56px); font-weight: 900; letter-spacing: 1px; color: var(--toxic);
  -webkit-text-stroke: 2px #000;
  text-shadow: 0 0 16px var(--toxic), 0 0 36px rgba(141,255,46,0.7), 3px 3px 0 #000;
  opacity: 0; pointer-events: none; z-index: 16; white-space: nowrap;
  transition: opacity 0.25s ease, transform 0.32s cubic-bezier(.2,1.5,.3,1);
}
#win-pop.show { opacity: 1; transform: translateX(-50%) scale(1); }
#win-pop.hidden { display: none; }
#win-pop.huge { animation: winThrob 0.5s ease-in-out infinite alternate; }
@keyframes winThrob { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.12); } }

/* Overlay */
#overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(10,4,12,0.78); z-index: 20; border-radius: 16px; text-align: center;
}
#overlay.hidden { display: none; }
#overlay-title {
  font-size: clamp(30px, 7vw, 58px); color: var(--gold); -webkit-text-stroke: 2px #000;
  text-shadow: 4px 4px 0 var(--pink); transform: rotate(-3deg); animation: pop 0.4s ease;
}
#overlay-amt { font-size: clamp(16px, 3.5vw, 26px); color: var(--cream); margin-top: 8px; text-shadow: 2px 2px 0 #000; }
#overlay.sweep #overlay-title { color: var(--pink); text-shadow: 4px 4px 0 #000; }
#overlay.bigroast #overlay-title { color: var(--green); }
#overlay.bigwin #overlay-title { color: var(--gold); }
#overlay.bigwin #overlay-amt { color: var(--toxic); text-shadow: 0 0 16px var(--toxic), 0 0 32px rgba(141,255,46,0.6), 2px 2px 0 #000; font-weight: 900; }

/* Sweep meter */
#meter-panel {
  width: 40px; flex: 0 0 40px; background: linear-gradient(#23122b, #160b1c);
  border: 2px solid #000; border-radius: 10px; padding: 7px 4px; text-align: center;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 5px;
}
.meter-label { font-size: 7px; color: var(--pink-soft); letter-spacing: 0.5px; line-height: 1.05; writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; margin: 2px 0; }
.meter-hint { display: none; }
#sweep-meter {
  position: relative; flex: 1; min-height: 160px; border: 2px solid #000; border-radius: 10px;
  background: #0e0712; overflow: hidden;
}
#sweep-fill {
  position: absolute; bottom: 0; left: 0; right: 0; width: 100%; height: var(--pct, 0%);
  background: linear-gradient(0deg, var(--pink), var(--gold)); transition: height 0.4s ease;
}
#sweep-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; text-shadow: 1px 1px 0 #000; }
#sweep-meter.full { animation: full 0.4s infinite alternate; }
@keyframes full { from { box-shadow: inset 0 0 8px var(--gold); } to { box-shadow: inset 0 0 22px var(--pink); } }
.meter-hint { font-size: 9px; color: #7a6a82; }

/* Controls — premium glass bar */
#controls {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, #241433, #14091c);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* Stat chips */
.stats { display: flex; gap: 12px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 7px 16px; min-width: 104px;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.lbl { font-size: 9px; color: #b0a0bc; letter-spacing: 2px; text-transform: uppercase; }
.val { font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.val.gold { color: var(--gold); text-shadow: 0 0 12px rgba(212,175,55,0.45); }
.val.green { color: var(--toxic); text-shadow: 0 0 14px rgba(141,255,46,0.6); }

/* Bet stepper */
.bet { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bet > .lbl { align-self: center; }
.bet-sel {
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 999px;
}
.bet-adjust, .bet-sel button {
  width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer;
  font-family: inherit; color: var(--cream); border: 1px solid rgba(255,255,255,0.15);
  background: radial-gradient(circle at 50% 30%, #3a2348, #221230); box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  display: grid; place-items: center; transition: transform 0.08s, filter 0.15s;
}
.bet-sel button:hover { filter: brightness(1.25); }
.bet-sel button:active { transform: scale(0.9); }
#bet-amt { min-width: 46px; text-align: center; font-size: 20px; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Actions */
.actions { display: flex; align-items: center; gap: 14px; }
.auto-wrap { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
#auto-count {
  width: 70px; padding: 5px; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  background: rgba(0,0,0,0.4); color: var(--cream); text-align: center; font-family: inherit;
}
#auto-btn {
  padding: 6px 14px; border-radius: 10px; cursor: pointer; font-family: inherit; letter-spacing: 1px;
  color: var(--cream); border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, #34204a, #1d1029); box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}
#spin-btn {
  font-family: inherit; font-size: 18px; font-weight: 900; letter-spacing: 2px; cursor: pointer; color: #fff;
  width: 116px; height: 116px; border-radius: 50%; text-transform: uppercase;
  background:
    radial-gradient(circle at 50% 32%, #ff67c0, var(--pink) 45%, #b5006b 100%);
  border: 4px solid var(--gold);
  box-shadow:
    0 0 0 4px rgba(0,0,0,0.55), 0 0 26px rgba(255,20,147,0.6),
    inset 0 4px 10px rgba(255,255,255,0.45), inset 0 -8px 16px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s; position: relative;
}
#spin-btn:hover { filter: brightness(1.08); box-shadow: 0 0 0 4px rgba(0,0,0,0.55), 0 0 38px rgba(255,20,147,0.85), inset 0 4px 10px rgba(255,255,255,0.5), inset 0 -8px 16px rgba(0,0,0,0.4); }
#spin-btn:active { transform: scale(0.94); }
#spin-btn:disabled, button:disabled { opacity: 0.45; cursor: not-allowed; }

/* Utilities */
.utils { display: flex; gap: 8px; }
.utils button {
  font-family: inherit; cursor: pointer; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px;
  background: linear-gradient(180deg, #2a1838, #180e22); color: var(--cream); padding: 9px 13px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5); transition: filter 0.15s, transform 0.08s;
}
.utils button:hover { filter: brightness(1.2); }
.utils button:active { transform: translateY(2px); }
#buy-btn { color: var(--green); border-color: rgba(57,255,136,0.5); box-shadow: 0 0 14px rgba(57,255,136,0.25), 0 3px 8px rgba(0,0,0,0.5); font-weight: 900; letter-spacing: 1px; }
/* Fullscreen toggle is for touch/mobile — desktop uses the casino header control. */
#fs-btn { display: none; font-size: 17px; line-height: 1; }
@media (max-width: 640px), (pointer: coarse) { #fs-btn { display: inline-grid; place-items: center; } }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.78); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal.hidden { display: none; }
.modal-box {
  position: relative; max-width: 720px; width: 100%; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(#22122a, #160b1c); border: var(--outline); border-radius: 16px;
  padding: 22px; box-shadow: 8px 8px 0 rgba(0,0,0,0.6);
}
.modal-box h2 { color: var(--gold); text-align: center; margin-bottom: 14px; -webkit-text-stroke: 1px #000; }
.close-x { position: absolute; top: 10px; right: 16px; font-size: 30px; cursor: pointer; color: var(--pink-soft); }
.rules p { font-size: 13px; line-height: 1.5; margin-bottom: 8px; color: #d8cce0; }
.rules b { color: var(--gold); }

/* Tap-a-symbol popup */
.sym-box { max-width: 320px; text-align: center; }
#sym-img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.6)); margin: 4px auto 6px; }
#sym-name { font-size: 22px; margin-bottom: 6px; }
.sym-tier {
  display: inline-block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 12px; border: 2px solid #000; border-radius: 20px; background: #0e0712; color: var(--cream); margin-bottom: 12px;
}
.sym-tier.tier-premium { border-color: var(--gold); color: var(--gold); }
.sym-tier.tier-wild { border-color: var(--pink); color: var(--pink-soft); }
.sym-tier.tier-scatter { border-color: var(--green); color: var(--green); }
.sym-tier.tier-creep { border-color: var(--purple); color: #c79bff; }
.sym-pays { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 16px; color: #d8cce0; margin-bottom: 12px; }
.sym-pays b { color: var(--gold); }
.sym-blurb { font-size: 12px; line-height: 1.45; color: #b8acc0; }

.phone { border-color: var(--green); box-shadow: 8px 8px 0 rgba(57,255,136,0.25); }
.buy-options { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.buy-opt {
  display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer; font-family: inherit;
  background: #0e0712; border: 2px solid var(--green); border-radius: 12px; padding: 12px 16px; color: var(--cream);
  box-shadow: 3px 3px 0 #000;
}
.buy-opt:hover { background: #14180f; }
.buy-name { font-size: 18px; color: var(--green); }
.buy-desc { font-size: 12px; color: #b8acc0; }
.buy-cost { font-size: 14px; color: var(--gold); }

#paytable-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.pt-item { background: #0e0712; border: 2px solid #000; border-radius: 10px; padding: 8px; text-align: center; }
.pt-item img { width: 54px; height: 54px; object-fit: contain; }
.pt-name { font-size: 10px; color: var(--cream); margin: 4px 0; min-height: 24px; }
.pt-pays { font-size: 10px; color: var(--gold); display: flex; flex-direction: column; gap: 1px; }
.pt-pays b { color: var(--cream); }
.tier-premium { border-color: var(--gold); }
.tier-wild { border-color: var(--pink); }
.tier-scatter { border-color: var(--green); }
.tier-creep { border-color: var(--purple); }

/* ===================== FREE SPINS — "THE BIG ROAST" ===================== */
/* Intro splash takeover */
#fs-splash {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #3a0a2a 0%, #18030f 60%, #0a0208 100%);
  opacity: 0; transition: opacity 0.45s ease; cursor: pointer; overflow: hidden;
}
#fs-splash.show { opacity: 1; }
#fs-splash.hidden { display: none; }
.fs-splash-rays {
  position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(212,175,55,0.16) 0deg 7deg, transparent 7deg 16deg);
  animation: rays 26s linear infinite; opacity: 0.6;
}
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.fs-splash-inner { position: relative; text-align: center; transform: scale(0.85); transition: transform 0.5s cubic-bezier(.2,1.3,.3,1); }
#fs-splash.show .fs-splash-inner { transform: scale(1); }
.fs-jesus {
  width: clamp(120px, 26vw, 230px); filter: drop-shadow(0 0 26px rgba(212,175,55,0.85)) drop-shadow(3px 4px 0 #000);
  animation: jesusFloat 3s ease-in-out infinite;
}
@keyframes jesusFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
.fs-splash-title {
  font-size: clamp(40px, 10vw, 92px); color: var(--gold); -webkit-text-stroke: 3px #000;
  text-shadow: 5px 5px 0 var(--pink), 9px 9px 0 rgba(0,0,0,0.5); transform: rotate(-3deg); margin-top: 6px;
}
.fs-splash-spins { font-size: clamp(20px, 4.5vw, 34px); color: var(--pink-soft); text-shadow: 3px 3px 0 #000; margin-top: 4px; letter-spacing: 1px; }
.fs-splash-spins span { color: #fff; }
.fs-splash-sub { font-size: 13px; color: #d8c6e0; margin-top: 10px; opacity: 0.85; }
.fs-chat { position: absolute; inset: -40px -10px; pointer-events: none; }
.fs-chat .bubble {
  position: absolute; font-size: clamp(11px, 2.4vw, 15px); font-family: Arial, sans-serif; color: #111;
  background: #eafff2; border: 2px solid #000; border-radius: 14px; padding: 6px 12px; box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  opacity: 0; animation: bubblePop 0.5s ease forwards;
}
.fs-chat .b1 { top: 4%; left: -2%; transform: rotate(-6deg); animation-delay: 0.5s; }
.fs-chat .b2 { top: 22%; right: -4%; background: #ffe1f3; transform: rotate(5deg); animation-delay: 0.9s; }
.fs-chat .b3 { bottom: 16%; left: -4%; background: #fff6d6; transform: rotate(4deg); animation-delay: 1.3s; }
.fs-chat .b4 { bottom: 2%; right: -2%; background: #ffe1f3; transform: rotate(-5deg); animation-delay: 1.7s; }
@keyframes bubblePop { from { opacity: 0; transform: scale(0.4) translateY(8px); } to { opacity: 1; } }
.fs-splash-go { margin-top: 18px; font-size: 12px; letter-spacing: 2px; color: var(--gold); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* FS HUD banner */
#fs-banner {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 760px; margin-bottom: 8px;
  padding: 7px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,20,147,0.25), rgba(0,0,0,0.35)), linear-gradient(180deg, #3a0f2c, #1a0712);
  border: 2px solid var(--gold); box-shadow: 0 0 22px rgba(255,20,147,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: bannerGlow 2.2s ease-in-out infinite;
}
#fs-banner.hidden { display: none; }
@keyframes bannerGlow { 0%,100% { box-shadow: 0 0 18px rgba(255,20,147,0.35), inset 0 1px 0 rgba(255,255,255,0.15); } 50% { box-shadow: 0 0 30px rgba(212,175,55,0.55), inset 0 1px 0 rgba(255,255,255,0.15); } }
.fs-banner-cell { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.fs-banner-cell.right { text-align: right; margin-left: auto; }
.fs-banner-k { font-size: 9px; letter-spacing: 1.5px; color: var(--gold); text-transform: uppercase; }
.fs-banner-v { font-size: 16px; color: var(--cream); text-shadow: 2px 2px 0 #000; }
.fs-banner-v b { color: #fff; }
.fs-banner-v.big { font-size: 24px; color: var(--gold); text-shadow: 0 0 12px rgba(212,175,55,0.6), 2px 2px 0 #000; }
.fs-ladder { display: flex; gap: 3px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow: hidden; }
.fs-ladder .pip { width: 9px; height: 16px; border-radius: 3px; background: rgba(255,255,255,0.1); border: 1px solid rgba(0,0,0,0.6); transition: background 0.25s, box-shadow 0.25s; }
.fs-ladder .pip.on { background: linear-gradient(0deg, var(--pink), var(--gold)); box-shadow: 0 0 8px rgba(255,20,147,0.7); }
.fs-ladder .pip.max { background: var(--gold); box-shadow: 0 0 12px var(--gold); animation: full 0.4s infinite alternate; }

/* In-mode interface overhaul */
body.fs-mode header h1 { text-shadow: 4px 4px 0 var(--gold), 7px 7px 0 rgba(0,0,0,0.5); color: #ffe9a8; }
body.fs-mode .cell { border-color: rgba(212,175,55,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 14px rgba(255,20,147,0.18), 0 4px 0 rgba(0,0,0,0.4); }
body.fs-mode #grid { filter: saturate(1.15); }
body.fs-mode .seg { border-color: var(--gold); box-shadow: 0 0 14px rgba(212,175,55,0.4), 3px 3px 0 rgba(0,0,0,0.45); }
body.fs-mode #spin-btn { border-color: var(--gold); background: radial-gradient(circle at 50% 32%, #ffd76a, var(--gold) 48%, #a8780c 100%); color: #2a1500; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
body.fs-mode #meter-panel { opacity: 0.4; }

/* ============================== Responsive / Mobile ====================== */
@media (max-width: 640px) {
  /* Cell sized off width so 5 reels + gaps always fit, capped off height so the
     grid never pushes the controls off-screen. */
  :root { --cell: clamp(46px, min(17.6vw, 14.5vh), 104px); }
  #app { padding: 5px 6px 8px; }
  header h1 { font-size: clamp(24px, 8.5vw, 38px); letter-spacing: 1px; text-shadow: 3px 3px 0 var(--pink), 5px 5px 0 rgba(0,0,0,0.5); }
  .header-flags { margin-top: 3px; min-height: 0; gap: 6px; }
  .fs-flag, .prog { font-size: 11px; padding: 2px 9px; }

  main { flex-direction: column-reverse; gap: 8px; margin-top: 6px; }
  #grid { gap: 4px; }            /* horizontal only — vertical pitch is measured in JS */

  /* Sweep meter -> slim horizontal bar above the controls */
  #meter-panel { width: 100%; flex: none; flex-direction: row; min-height: 0; align-items: center; gap: 8px; padding: 4px 8px; }
  .meter-label { writing-mode: horizontal-tb; transform: none; margin: 0; font-size: 8px; white-space: nowrap; }
  #sweep-meter { min-height: 0; height: 15px; flex: 1; }
  #sweep-fill { top: 0; height: 100%; width: var(--pct, 0%); transition: width 0.4s ease; }
  #sweep-text { font-size: 10px; }
  .meter-hint { display: none; }

  /* Sliding Dickbroom row caps — tighter */
  .seg { height: 24px; margin-bottom: 5px; border-radius: 6px; box-shadow: 2px 2px 0 rgba(0,0,0,0.45); }
  .seg .seg-icon { font-size: 13px; }
  .seg .seg-lbl { font-size: 7px; margin-top: 0; }

  /* Compact control bar: stats on their own row, then bet · SPIN · utils */
  #controls { margin-top: 6px; padding: 6px 8px; border-radius: 12px; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }

  .stats { order: -1; width: 100%; justify-content: space-between; gap: 6px; }
  .stat { flex: 1; min-width: 0; padding: 3px 10px; }
  .lbl { font-size: 7px; letter-spacing: 1px; }
  .val { font-size: 15px; }

  .bet { order: 1; }
  .bet > .lbl { display: none; }
  .bet-sel { padding: 2px; gap: 1px; }
  .bet-sel button, .bet-adjust { width: 27px; height: 27px; font-size: 16px; }
  #bet-amt { font-size: 15px; min-width: 30px; }

  .actions { order: 2; gap: 6px; }
  #auto-count { display: none; }            /* tap-and-hold-free: Auto runs to balance */
  #auto-btn { padding: 7px 9px; font-size: 11px; }
  #spin-btn { width: 66px; height: 66px; font-size: 13px; letter-spacing: 1px; border-width: 3px; }

  .utils { order: 3; gap: 5px; flex: 1; justify-content: flex-end; }
  .utils button { padding: 7px 8px; font-size: 11px; }
}

/* Small phones — squeeze a touch more */
@media (max-width: 380px) {
  :root { --cell: clamp(42px, 16.5vw, 84px); }
  #spin-btn { width: 60px; height: 60px; font-size: 12px; }
  .val { font-size: 14px; }
  .utils button { padding: 6px 7px; font-size: 10px; }
  #auto-btn { padding: 6px 8px; font-size: 10px; }
}
