/* Wild West Bounty — cartoon Western: wooden reel frame
   with warm browns/tans, sunset orange/pink backdrop,
   gold signage. Own CSS, family layout. */
:root {
  --wood: #6b4226;
  --wood-deep: #3b1d0d;
  --wood-dark: #2a1408;
  --gold: #f2c230;
  --gold-dim: #a8740a;
  --sunset: #f97316;
  --sunset-pink: #fb7185;
  --ink: #fff7e6;
  --panel: #4a2a12;
  --panel2: #5d3a1a;
  --reel-bg: #87431f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #c2571b 0%, #7c2d12 45%, #2a0f02 100%);
  color: var(--ink);
  min-height: 100vh;
}
#app { max-width: 560px; margin: 0 auto; padding: 10px 12px 28px; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 2px 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 46px; height: 46px; }
h1 { font-size: 20px; margin: 0; color: var(--gold); text-shadow: 0 0 14px #f59e0b88, 0 2px 0 #431407; letter-spacing: .3px; }
.sub { font-size: 12px; opacity: .85; color: #fed7aa; }
.head-right { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: #713f12; border: 1px solid var(--gold); color: #fef08a; }
.badge.real { background: #7f1d1d; border-color: #ef4444; color: #fecaca; }
.ghost { background: var(--wood-deep); color: var(--ink); border: 1px solid #f2c23088; border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 700; }
.ghost.on { background: var(--wood); border-color: var(--gold); color: var(--gold); }
.card, .stage-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid #f2c23055;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px #00000066;
}
.stage-card { position: relative; }
.stage-wrap { position: relative; }
/* The wooden BUY FREE SPINS sign (witnessed left of the
   reels in the original). Shown disabled in this
   preview: the buy is NOT built (program pattern). */
.buy-sign {
  position: absolute; left: -6px; top: 18px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: linear-gradient(180deg, #8a5a2b, #6b4226);
  border: 2px solid #3b1d0d; outline: 1px solid #f2c23066;
  border-radius: 10px; padding: 8px 10px;
  color: #fef08a; font-weight: 900; font-size: 11px; letter-spacing: .4px;
  cursor: not-allowed; opacity: .75; transform: rotate(-3deg);
  box-shadow: 0 4px 10px #00000088;
}
.buy-sign b { font-size: 13px; color: #fff7cc; }
.buy-sign small { font-size: 10px; opacity: .8; }
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: var(--reel-bg);
  border: 8px solid var(--wood);
  outline: 2px solid var(--gold-dim);
  box-shadow: inset 0 0 0 2px #3b1d0d, inset 0 0 34px #00000088, 0 0 18px #f2c23033;
  position: relative;
}
/* Anticipation glow on the final reel (cells are stored
   reel-major: reel 5 = children 17-20). */
.grid.beam .cell:nth-child(17), .grid.beam .cell:nth-child(18), .grid.beam .cell:nth-child(19), .grid.beam .cell:nth-child(20) {
  box-shadow: 0 0 22px 6px #fde047cc, inset 0 0 12px #fde04788;
  animation: beamPulse .5s ease-in-out infinite alternate;
}
@keyframes beamPulse { from { filter: brightness(1.1); } to { filter: brightness(1.65); } }
.cell {
  aspect-ratio: 1 / 1.08;
  border-radius: 10px;
  background: #fdf3d8;
  border: 1px solid #3b1d0d55;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.cell svg { width: 100%; height: 100%; display: block; }
.cell.win { outline: 3px solid var(--gold); outline-offset: -3px; transform: scale(1.06); z-index: 1; box-shadow: 0 0 16px #f2c230aa; }
.cell.dim { opacity: .45; }
.cell.wild { box-shadow: inset 0 0 0 2px var(--sunset); }
.cell.sticky { box-shadow: inset 0 0 0 3px var(--gold), 0 0 10px #f2c23088; }
.mult-badge {
  position: absolute; right: 2px; bottom: 2px; z-index: 2;
  background: #7c2d12; color: #fde047; border: 1px solid #fde047;
  border-radius: 999px; padding: 0 5px;
  font-size: clamp(9px, 2.6vw, 13px); font-weight: 900; line-height: 1.5;
}
.overlay-badge {
  position: absolute; left: 2px; top: 2px; z-index: 2;
  font-size: clamp(9px, 2.6vw, 13px);
  filter: drop-shadow(0 0 3px #fde047);
}
.orb-tray { min-height: 22px; text-align: center; font-weight: 800; color: var(--gold); padding-top: 8px; font-size: 14px; }
.bottom-bar { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; }
.bb-item { display: flex; flex-direction: column; align-items: center; flex: 1; background: #2a1408aa; border: 1px solid #f2c23044; border-radius: 10px; padding: 6px 4px; font-weight: 800; }
.bb-label { font-size: 10px; font-weight: 700; opacity: .75; letter-spacing: .6px; text-transform: uppercase; }
.win-banner {
  position: absolute; inset: auto 0 64px 0; margin: 0 auto; width: fit-content;
  background: #2a1408ee; border: 2px solid var(--gold); border-radius: 14px;
  padding: 8px 22px; text-align: center; z-index: 5;
  color: var(--gold); font-weight: 900; font-size: 22px;
  box-shadow: 0 0 24px #f2c23088;
}
.wb-label { font-size: 12px; color: var(--sunset-pink); letter-spacing: 2px; }
.hidden { display: none !important; }
.bigwin-overlay {
  position: absolute; inset: 0; z-index: 6;
  background: #2a0f02d9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 16px;
}
.bw-title { font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 0 22px #f59e0b, 0 3px 0 #431407; animation: beamPulse .4s ease-in-out infinite alternate; }
.bw-amt { font-size: 30px; font-weight: 900; color: var(--sunset-pink); }
.continue-overlay {
  position: absolute; inset: 0; z-index: 7;
  background: #1c0a01cc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border-radius: 16px; text-align: center; padding: 16px;
}
.continue-text { font-size: 20px; font-weight: 900; color: var(--gold); }
.continue-btn { font-size: 22px; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); background: var(--wood); color: #fff; cursor: pointer; }
.controls .bet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed #f2c23088; background: var(--wood-deep); color: var(--ink); font-weight: 800; cursor: pointer; }
.chip.on { background: var(--gold); color: #422006; border-color: #fff7cc; }
.bet-input { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bet-input button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #f2c23088; background: var(--wood-deep); color: var(--ink); font-size: 18px; cursor: pointer; }
.bet-input input { width: 76px; height: 36px; border-radius: 10px; border: 1px solid #f2c23088; background: var(--wood-deep); color: var(--ink); text-align: center; font-weight: 800; }
.spin-btn {
  width: 100%; padding: 15px; font-size: 20px; font-weight: 900; letter-spacing: 1px;
  border-radius: 50px; border: 2px solid #fff7cc;
  background: linear-gradient(180deg, #f59e0b, #b45309);
  color: #fff; cursor: pointer; box-shadow: 0 6px 18px #b4530966;
}
.spin-btn:disabled { opacity: .5; cursor: default; }
.quick-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.msg { min-height: 20px; margin-top: 10px; font-weight: 700; color: var(--gold); text-align: center; }
.msg.err { color: #fca5a5; }
.paytable .prow { padding: 6px 0; border-bottom: 1px solid #ffffff1c; font-size: 13px; }
.note { font-size: 12.5px; line-height: 1.55; opacity: .9; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #ffffff14; font-size: 13.5px; }
.history .win { color: #4ade80; font-weight: 800; }
.fair-grid { display: grid; gap: 8px; font-size: 12.5px; }
.fair-grid code { word-break: break-all; background: #2a1408aa; padding: 2px 6px; border-radius: 6px; }
.seed-edit { display: flex; gap: 6px; }
.seed-edit input, .fair-actions input { background: var(--wood-deep); border: 1px solid #f2c23066; border-radius: 8px; color: var(--ink); padding: 6px 8px; }
.fair-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.verify-out { white-space: pre-wrap; word-break: break-all; font-size: 11px; background: #2a1408aa; border-radius: 10px; padding: 8px; max-height: 260px; overflow: auto; }
footer { text-align: center; font-size: 12px; opacity: .75; padding: 6px; }
@media (max-width: 420px) {
  h1 { font-size: 17px; }
  .buy-sign { font-size: 9px; padding: 6px 7px; }
  .buy-sign b { font-size: 11px; }
}
