/* Lockdown Ways — prison yard theme: dark concrete, cell bars,
   hazard orange. Own CSS; layout follows the family chassis. */
:root {
  --bg: #14171c; --card: #1e232c; --card2: #262d38; --ink: #e8ecf2;
  --muted: #9aa7ba; --gold: #f5a921; --orange: #ff7a1a; --teal: #2ec4b6;
  --red: #e5484d; --bar: #39424f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
#app { max-width: 860px; margin: 0 auto; padding: 12px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 46px; height: 46px; }
h1 { font-size: 20px; margin: 0; letter-spacing: .4px; }
.sub { color: var(--muted); font-size: 12px; }
.head-right { display: flex; align-items: center; gap: 10px; }
.balance-box { background: var(--card); border: 1px solid var(--bar); border-radius: 10px; padding: 8px 12px; display: flex; gap: 8px; align-items: center; }
.bal-label { color: var(--muted); font-size: 12px; }
.badge { background: #3a4353; color: #ffd98a; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; }
.badge.real { background: var(--red); color: #fff; }
button { font: inherit; }
.ghost { background: var(--card2); color: var(--ink); border: 1px solid var(--bar); border-radius: 9px; padding: 8px 12px; cursor: pointer; }
.ghost.on { border-color: var(--gold); color: var(--gold); }
main { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.card, .stage-card { background: var(--card); border: 1px solid var(--bar); border-radius: 14px; padding: 14px; }
.stage-card { position: relative; background: linear-gradient(180deg, #232a35, #1a1f27); overflow: hidden; }
.tower-decor { text-align: center; color: #4b586c; font-weight: 800; letter-spacing: 3px; font-size: 13px; margin-bottom: 8px; }
.fs-banner { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: #3a2410; border: 1px solid var(--orange); color: #ffd9ae; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.hidden { display: none !important; }
.cells-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0; }
.ecell { height: 40px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; background: #10131a; border: 2px dashed #39424f; color: #6b7688; }
.ecell.open { border: 2px solid var(--gold); background: #2b2416; color: var(--ink); box-shadow: 0 0 10px rgba(245,169,33,.35); }
.ecell.kind-razor { border-color: var(--red); background: #33191c; }
.ecell.kind-xways { border-color: var(--teal); background: #123029; }
.ecell.kind-wild { border-color: #ffe27a; background: #33300f; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cell { aspect-ratio: 1 / 1.02; border-radius: 10px; background: #2a313d; border: 1px solid #46536a; display: grid; place-items: center; position: relative;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0,0,0,.13) 10px 12px); }
.cell .tile-glyph { font-size: 26px; }
.cell.win { border-color: var(--gold); box-shadow: 0 0 12px rgba(245,169,33,.55); background-color: #3a3220; }
.cell.wild { background-color: #4a3d10; border-color: #ffe27a; }
.cell.bonus { background-color: #12303a; border-color: var(--teal); }
.cell.splitwild { background-color: #3a1030; border-color: #ff7ad9; }
.cell.jw { background-color: #59331a; border-color: var(--orange); box-shadow: 0 0 12px rgba(255,122,26,.6); }
.cell.myst-inmate { border-color: var(--red); box-shadow: 0 0 10px rgba(229,72,77,.55); }
.cell.myst { border-color: #7a8db0; }
.win-panel { margin-top: 10px; text-align: center; background: #101820; border: 1px solid var(--gold); color: #ffe9b0; border-radius: 10px; padding: 9px; font-weight: 700; }
.win-banner { margin-top: 10px; text-align: center; font-size: 24px; font-weight: 800; color: var(--gold); }
.win-banner .tier-head { font-size: 15px; letter-spacing: 2px; color: var(--orange); }
.win-banner.tier-epic { color: #ff5d5d; font-size: 30px; }
.overlay { position: absolute; inset: 0; background: rgba(10, 12, 16, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 5; text-align: center; padding: 20px; }
.overlay h3 { margin: 0; color: var(--gold); letter-spacing: 1px; }
.controls .bet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--card2); color: var(--ink); border: 1px solid var(--bar); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip.on { background: var(--gold); color: #241300; font-weight: 700; }
.bet-input { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bet-input input { width: 76px; padding: 8px; border-radius: 8px; border: 1px solid var(--bar); background: #12151b; color: var(--ink); }
.bet-input button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--bar); background: var(--card2); color: var(--ink); cursor: pointer; }
.spin-btn { width: 100%; margin-top: 12px; padding: 14px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #ffb03a, #f08c0a); color: #241300; font-size: 18px; font-weight: 800; cursor: pointer; letter-spacing: 1px; }
.spin-btn:disabled { opacity: .55; cursor: wait; }
.overlay .spin-btn { width: auto; padding: 12px 34px; }
.quick-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.msg { margin-top: 10px; min-height: 20px; color: var(--teal); font-weight: 600; }
.msg.err { color: #ff8585; }
.paytable .prow { padding: 7px 0; border-bottom: 1px solid #2c3542; font-size: 14px; }
.paytable .prow span { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #2c3542; font-size: 14px; }
.history .win { color: #7be495; font-weight: 700; }
.fair-grid { display: grid; gap: 8px; font-size: 13px; }
.fair-grid code { word-break: break-all; color: #ffd98a; }
.seed-edit { display: inline-flex; gap: 6px; }
.seed-edit input, .fair-actions input { padding: 7px; border-radius: 8px; border: 1px solid var(--bar); background: #12151b; color: var(--ink); }
.fair-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.verify-out { white-space: pre-wrap; font-size: 11px; color: var(--muted); max-height: 260px; overflow: auto; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 0 4px; }
@media (max-width: 480px) {
  .cell .tile-glyph { font-size: 20px; }
  .ecell { height: 34px; font-size: 14px; }
  h1 { font-size: 17px; }
}
