/* Outlaw's Last Stand — painted Wild West street at sunset:
   wooden saloons, dust and cacti in orange/brown/gold, a
   nailed wooden reel frame. Own CSS, family layout. */
:root {
  --sky: #e0f2fe;
  --wood: #b45309;
  --wood-deep: #78350f;
  --roof: #dc2626;
  --lawn: #22c55e;
  --gold: #f2c230;
  --gold-dim: #a8740a;
  --ink: #1c1917;
  --panel: #fffbeb;
  --panel2: #fef3c7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #7c2d12 0%, #c2410c 30%, #ea580c 55%, #f59e0b 82%, #78350f 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: #7f1d1d; text-shadow: 0 1px 0 #fff8, 0 2px 0 #dc262655; letter-spacing: .3px; }
.sub { font-size: 12px; opacity: .85; color: #ffedd5; font-weight: 600; }
.head-right { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: #dcfce7; border: 1px solid #16a34a; color: #7c2d12; }
.badge.real { background: #fee2e2; border-color: #ef4444; color: #7f1d1d; }
.ghost { background: #fffbeb; color: var(--ink); border: 1px solid #b4530988; border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 700; }
.ghost.on { background: #fde68a; border-color: var(--gold-dim); }
.card, .stage-card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid #b4530955;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px #451a0355;
}
.stage-card { position: relative; }
.roof {
  text-align: center; font-weight: 900; letter-spacing: 1px; color: #fff;
  background: linear-gradient(180deg, #ef4444, var(--roof));
  border-radius: 10px 10px 4px 4px; padding: 6px 10px; margin: -4px -4px 10px;
  box-shadow: 0 3px 0 #7f1d1d;
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 12px;
  border-radius: 6px 6px 14px 14px;
  background: linear-gradient(180deg, #d97706, var(--wood));
  border: 6px solid var(--wood-deep);
  outline: 2px solid var(--gold);
  box-shadow: inset 0 0 0 2px #451a03, inset 0 0 34px #00000044;
  position: relative;
}
/* Anticipation light-beam on the final reel. */
.grid.beam::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 4px; width: 20%;
  background: linear-gradient(90deg, transparent, #fef08a99, transparent);
  animation: beamPulse .5s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes beamPulse { from { opacity: .35; } to { opacity: 1; } }
.cell {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: visible;
  background: #fef9c3; border: 2px solid #78350f66;
  display: flex; align-items: center; justify-content: center;
}
.cell .tile-glyph svg { width: 100%; height: 100%; display: block; border-radius: 8px; }
.cell.win { outline: 3px solid #f59e0b; box-shadow: 0 0 0 2px #fff, 0 0 16px #f59e0b; animation: bounce .5s ease infinite alternate; z-index: 2; }
.cell.dim { opacity: .45; }
.cell.sticky { outline: 3px solid var(--gold); box-shadow: 0 0 12px #f2c230; }
.cell.fresh { animation: bounce .45s ease 3; }
@keyframes bounce { from { transform: scale(1); } to { transform: scale(1.07); } }
.mul-badge {
  position: absolute; right: -4px; bottom: -4px; z-index: 3;
  background: var(--gold); color: #451a03; border: 2px solid #fff;
  font-size: 12px; font-weight: 900; border-radius: 999px; padding: 1px 6px;
  box-shadow: 0 2px 6px #0006;
}
.win-banner {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  background: #fef08e; border: 3px solid var(--gold); color: #713f12;
  border-radius: 14px; padding: 8px 22px; text-align: center; z-index: 5;
  box-shadow: 0 8px 24px #0005; font-weight: 900;
}
.win-banner .wb-label { font-size: 13px; letter-spacing: 1px; }
.win-banner div:last-child { font-size: 24px; }
.hidden { display: none !important; }
.bigwin-overlay {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: #451a03cc; border-radius: 16px;
}
.bw-title { font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 0 22px #f59e0b; letter-spacing: 2px; }
.bw-amt { font-size: 30px; font-weight: 900; color: #fff; }
.picker-overlay {
  position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: #451a03e0; border-radius: 16px; padding: 16px;
}
.picker-title { font-size: 20px; font-weight: 900; color: #fef08a; text-align: center; }
.picker-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.picker-cell {
  width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: #fef9c3; border: 3px solid var(--gold); font-size: 28px; font-weight: 900; color: #7f1d1d;
}
.picker-cell.spinning { animation: pickerShake .18s linear infinite; color: #a8740a; }
.picker-cell.revealed { animation: bounce .4s ease 2; background: #fef08a; }
@keyframes pickerShake { 0% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.05); } 100% { transform: rotate(-3deg); } }
.picker-total { font-size: 15px; font-weight: 800; color: #fecaca; min-height: 22px; text-align: center; }
.choice-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 430px; }
.choice-btn {
  background: linear-gradient(180deg, #fde68a, var(--gold)); color: #451a03;
  border: 2px solid #78350f; border-radius: 12px; padding: 13px 14px;
  font-size: 15px; font-weight: 800; text-align: left; cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-dim); line-height: 1.35;
}
.choice-btn:disabled { opacity: .5; }
.picker-btn, .continue-btn {
  background: var(--gold); color: #451a03; border: 0; border-radius: 999px;
  font-size: 17px; font-weight: 900; padding: 12px 30px; cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-dim);
}
.picker-btn:disabled { opacity: .5; }
.continue-overlay {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; background: #451a03bb; border-radius: 16px;
}
.continue-text { font-size: 22px; font-weight: 900; color: #fef08a; text-align: center; padding: 0 12px; }
.orb-tray { min-height: 22px; text-align: center; font-weight: 800; color: #7c2d12; padding-top: 8px; font-size: 14px; }
.bottom-bar { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; }
.bb-item { display: flex; flex-direction: column; align-items: center; font-weight: 800; }
.bb-label { font-size: 11px; opacity: .7; font-weight: 700; }
.controls .bet-row { display: flex; flex-direction: column; gap: 8px; }
.controls label { font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid #b45309; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; cursor: pointer; }
.chip.on { background: var(--gold); }
.bet-input { display: flex; gap: 6px; align-items: center; }
.bet-input button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #b45309; background: #fff; font-size: 18px; font-weight: 900; cursor: pointer; }
.bet-input input { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid #b45309; font-size: 16px; font-weight: 800; text-align: center; }
.spin-btn {
  width: 100%; margin-top: 12px; padding: 15px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #ef4444, var(--roof)); color: #fff;
  font-size: 20px; font-weight: 900; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 5px 0 #7f1d1d;
}
.spin-btn:disabled { opacity: .55; }
.quick-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.msg { min-height: 22px; text-align: center; font-weight: 800; padding-top: 10px; color: #7c2d12; }
.msg.err { color: #b91c1c; }
.paytable .prow { padding: 6px 0; border-bottom: 1px dashed #b4530955; font-size: 14px; }
.note { font-size: 13px; 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 dashed #b4530944; font-size: 14px; font-weight: 600; }
.history .win { color: #15803d; font-weight: 900; }
.fair-grid { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.fair-grid code { word-break: break-all; background: #fff; padding: 2px 6px; border-radius: 6px; border: 1px solid #b4530944; }
.seed-edit { display: flex; gap: 6px; }
.seed-edit input { flex: 1; padding: 7px; border-radius: 8px; border: 1px solid #b45309; }
.fair-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fair-actions input { padding: 7px; border-radius: 8px; border: 1px solid #b45309; width: 110px; }
.verify-out { white-space: pre-wrap; font-size: 11px; max-height: 220px; overflow: auto; }
footer { text-align: center; font-size: 12px; font-weight: 700; color: #ffedd5; padding: 6px; }
