/* Lotout — a lot board spray-stencilled on a dark ground; one orange accent; the CA rides a hanging tag on the right edge. */
:root {
  --ground: #5A5751; --slab: #4B4843; --slab-2: #3D3A36; --rule: #77736B; --grey: #A29D93; --mute: #D2CCC1;
  --paper: #F4F0E8; --soot: #2E2C29; --spray: #FF8A1F; --spray-dim: #7A4614; --spray-glow: rgba(255, 138, 31, .42);
  --stencil: 'Saira Stencil One', 'Arial Black', sans-serif;
  --txt: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --tagw: 86px;
}
* { box-sizing: border-box; }
html { background-color: var(--ground); background-image: radial-gradient(ellipse 70% 40% at 20% 0%, rgba(255, 255, 255, .05), transparent 70%), radial-gradient(ellipse 60% 50% at 90% 100%, rgba(0, 0, 0, .12), transparent 70%); min-height: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--paper); font: 400 16px/1.42 var(--txt); -webkit-font-smoothing: antialiased;
  background-color: var(--ground);
  overflow-x: hidden;
  padding: 14px calc(var(--tagw) + 14px) 40px 14px; display: flex; flex-direction: column; gap: 18px;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
code { font-family: var(--mono); }
b { font-weight: 700; }


.brandline { display: flex; align-items: center; gap: 8px; }
.brandline img { border-radius: 50%; }
.brandword { font: 400 19px/1 var(--stencil); letter-spacing: .06em; }
.roundchip { font: 400 11px/1 var(--mono); color: var(--mute); border: 1px solid var(--rule); padding: 4px 6px; border-radius: 3px; }
.plug { margin-left: auto; background: transparent; border: 1px dashed var(--grey); color: var(--mute); padding: 5px 9px; border-radius: 3px; font: 400 11px/1 var(--mono); }
.plug[data-on="1"] { border-style: solid; color: var(--paper); }

/* the out-call: the pot the last lot drawn out took, one huge stencilled number */
.outcall { display: flex; flex-direction: column; gap: 4px; }
.outcall-kick { margin: 0; font: 400 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--paper); }
.outcall-kick b { color: var(--spray); font-weight: 400; }
.outcall-num { margin: 0; font: 400 88px/.92 var(--stencil); color: var(--spray); letter-spacing: -.01em; text-shadow: 0 3px 0 var(--soot); display: flex; align-items: baseline; gap: 8px; }
.outcall-num small { font: 400 20px/1 var(--stencil); color: var(--paper); text-shadow: none; }
.outcall-cap { margin: 2px 0 0; font: 500 15px/1.35 var(--txt); color: var(--paper); max-width: 46ch; }

/* the live sentence */
.notice { border-left: 3px solid var(--spray); padding: 2px 0 2px 12px; }
.notice-now { margin: 0; font: 600 20px/1.26 var(--txt); color: var(--paper); }
.notice-now b { color: var(--spray); text-shadow: 0 1px 0 var(--soot); }
.notice-small { margin: 8px 0 0; font-size: 14px; color: var(--mute); max-width: 56ch; }

/* ---------- the board: eight slots on a ring ---------- */
.wheelwrap { display: flex; flex-direction: column; gap: 10px; }
.wheelhead { display: flex; justify-content: space-between; gap: 8px; font: 400 11px/1.2 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.wheelclock { color: var(--paper); text-align: right; }
.wheel { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1 / 1; margin: 0 auto; }
.wheel-track { position: absolute; inset: 11%; border-radius: 50%; border: 9px solid var(--slab-2); box-shadow: inset 0 0 0 1px var(--rule); }
.wheel.is-drawing .wheel-track { border-color: var(--spray-dim); animation: sweep 1.1s linear infinite; border-top-color: var(--spray); }
.pegs { position: absolute; inset: 0; }
.peg {
  position: absolute; width: 23%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--ground); border: 2px dashed var(--rule); color: var(--grey); padding: 0;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.peg-n { font: 400 20px/1 var(--stencil); }
.peg-w { font: 400 8.5px/1 var(--mono); letter-spacing: -.02em; max-width: 90%; overflow: hidden; white-space: nowrap; }
.peg.is-in { background: var(--slab-2); border: 2px solid var(--grey); color: var(--paper);
  background-image: repeating-radial-gradient(circle at 50% 50%, transparent 0 7px, rgba(255, 255, 255, .05) 7px 9px); }
.peg.is-mine { border-color: var(--paper); box-shadow: 0 0 0 3px var(--ground), 0 0 0 4px var(--paper); }
.peg.is-next { border: 2px solid var(--spray); color: var(--spray); animation: beckon 1.6s ease-in-out infinite; }
.peg.is-next .peg-w { color: var(--spray); }
.peg.is-out { background: var(--spray); border-color: var(--spray); color: #1C0E02; box-shadow: 0 0 22px 4px var(--spray-glow); }
.peg.is-out .peg-w { color: #1C0E02; font-weight: 700; }
.peg.is-dim { opacity: .38; }
.peg.is-fresh { animation: stamp .5s ease-out; }
.hubdisc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40%; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.hub-k { font: 400 10px/1 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .1em; }
.hub-n { font: 400 34px/1 var(--stencil); color: var(--paper); }
.hub-n.is-hot { color: var(--spray); text-shadow: 0 0 18px var(--spray-glow); }
.hub-s { font: 500 12px/1.2 var(--txt); color: var(--mute); }

.playrow { display: flex; flex-direction: column; gap: 8px; }
.putlot { width: 100%; border: 0; border-radius: 4px; background: var(--spray); color: #1C0E02; padding: 14px 12px; font: 700 17px/1 var(--txt); letter-spacing: .02em; text-transform: uppercase; }
.putlot:disabled { opacity: .55; cursor: default; }
.mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--mute); }
.redeem { border: 1px solid var(--spray); background: transparent; color: var(--spray); border-radius: 3px; padding: 6px 9px; font: 400 12px/1 var(--mono); }

/* ---------- last lot out ---------- */
.lastout { background: var(--slab); border: 1px solid var(--rule); border-radius: 4px; padding: 12px; }
.lastout-h, .tape-h, .howto-h, .ledger-h, .worked-h { font: 400 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); display: flex; justify-content: space-between; gap: 8px; }
.lastout-body { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.lastout-body p { margin: 0; font-size: 15px; }
.lastout-body p b { color: var(--spray); }
.minirow { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-width: 340px; }
.minipeg { aspect-ratio: 1 / 1; border-radius: 50%; border: 1.5px solid var(--grey); display: flex; align-items: center; justify-content: center; font: 400 11px/1 var(--stencil); color: var(--mute); }
.minipeg.is-empty { border-style: dashed; border-color: var(--rule); color: var(--rule); }
.minipeg.is-out { background: var(--spray); border-color: var(--spray); color: #1C0E02; box-shadow: 0 0 10px var(--spray-glow); }
.hashline { font: 400 10px/1.35 var(--mono); color: var(--grey); word-break: break-all; }

/* ---------- the tape ---------- */
.tape-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); max-height: 340px; overflow-y: auto; }
.tape-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.tape-list li.is-new { animation: print .55s ease-out; }
.tape-list li.is-sample { opacity: .5; }
.tape-list li.is-blank { display: block; color: var(--mute); }
.tp-k { font: 400 10px/1 var(--mono); text-transform: uppercase; color: var(--grey); }
.tape-list li[data-k="out"] .tp-k, .tape-list li[data-k="out"] b { color: var(--spray); }
.tp-w { font: 400 10px/1 var(--mono); color: var(--grey); }
.tape-list code { font-size: 12px; color: var(--mute); }

/* ---------- rules ---------- */
.howto-steps { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.howto-steps li::marker { font-family: var(--stencil); color: var(--spray); }
.worked { margin-top: 14px; padding: 12px; border: 1px dashed var(--grey); border-radius: 4px; }
.worked p { margin: 8px 0 0; font-size: 15px; }
.worked p b { color: var(--spray); }

.ledger-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ledger-list li { padding: 9px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.ledger-list li.is-blank { color: var(--mute); }
.lg-top { display: flex; justify-content: space-between; gap: 8px; }
.lg-top b { color: var(--spray); font-weight: 600; }
.whopanel { background: var(--slab); border: 1px solid var(--rule); border-radius: 4px; padding: 12px; font-size: 14px; }
.whopanel code { word-break: break-all; font-size: 12px; }

.base { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--mute); }
.base-row { display: flex; flex-direction: column; gap: 2px; }
.base-row span { font: 400 10px/1 var(--mono); text-transform: uppercase; color: var(--grey); }
.base-row code { font-size: 11px; color: var(--paper); word-break: break-all; }
.base-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.base-links a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.base-links a.is-off { opacity: .35; pointer-events: none; }
.base-note { margin: 4px 0 0; font-family: var(--stencil); letter-spacing: .05em; color: var(--grey); }

/* ---------- the hanging lot tag: the CA, pinned to the right edge at every width ---------- */
.lottag {
  position: fixed; z-index: 30; right: 7px; top: 50%; transform: translateY(-50%) rotate(-1.5deg); width: var(--tagw);
  display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 22px 8px 10px;
  background: var(--paper); color: #1A1714; border-radius: 6px 6px 4px 4px;
  clip-path: polygon(14% 0, 86% 0, 100% 8%, 100% 100%, 0 100%, 0 8%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.lottag-hole { position: absolute; top: 7px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--soot); box-shadow: inset 0 0 0 2px var(--spray); }
.lottag-k { font: 400 11px/1 var(--stencil); letter-spacing: .04em; text-align: center; }
.lottag-addr { font: 700 10px/1.32 var(--mono); word-break: break-all; user-select: all; -webkit-user-select: all; text-align: left; }
.lottag-addr.is-unset { word-break: normal; font: 400 14px/1.05 var(--stencil); text-align: center; color: #6A635A; user-select: none; -webkit-user-select: none; }
.lottag-copy { border: 0; border-radius: 3px; background: #1A1714; color: var(--spray); padding: 8px 4px; font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.lottag-copy[data-done="1"] { background: var(--spray); color: #1A1714; }
.lottag-gm { font: 400 9.5px/1 var(--mono); color: #6A635A; text-align: center; text-decoration: none; }

.toasts { position: fixed; left: 12px; bottom: 14px; z-index: 40; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: var(--slab-2); border-left: 3px solid var(--spray); color: var(--paper); padding: 9px 12px; font-size: 14px; border-radius: 3px; max-width: 70vw; }

@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 var(--spray-glow); } 50% { box-shadow: 0 0 0 7px rgba(255, 138, 31, 0); } }
@keyframes stamp { from { transform: translate(-50%, -50%) scale(1.35); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes print { from { transform: translateY(-8px); opacity: 0; background: rgba(255, 138, 31, .12); } to { transform: none; opacity: 1; background: transparent; } }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---------- tablet: still one column, wider measure, bigger board ---------- */
@media (min-width: 700px) {
  :root { --tagw: 118px; }
  body { padding: 26px calc(var(--tagw) + 34px) 56px 34px; gap: 24px; }
  body > section, body > footer, .brandline { max-width: 760px; width: 100%; }
  .outcall-num { font-size: 132px; }
  .outcall-num small { font-size: 28px; }
  .outcall-cap { font-size: 18px; }
  .notice-now { font-size: 26px; }
  .notice-small { font-size: 16px; }
  .wheel { max-width: 440px; }
  .peg-n { font-size: 28px; }
  .peg-w { font-size: 10px; }
  .hub-n { font-size: 48px; }
  .playrow { flex-direction: row; align-items: center; }
  .putlot { width: auto; min-width: 280px; }
  .lottag { right: 16px; padding: 26px 11px 12px; }
  .lottag-addr { font-size: 12.5px; }
  .lottag-k { font-size: 13px; }
}

/* ---------- desktop: recomposes — notice + board on the left, last-out / tape / rules in a second column ---------- */
@media (min-width: 1000px) {
  :root { --tagw: 132px; }
  body {
    max-width: 1240px; margin: 0 auto; padding: 30px calc(var(--tagw) + 56px) 64px 40px;
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); column-gap: 48px; row-gap: 22px; align-items: start;
  }
  body > section, body > footer, .brandline { max-width: none; }
  .brandline { grid-column: 1 / -1; }
  .outcall { grid-column: 1; grid-row: 2; }
  .notice { grid-column: 1; grid-row: 3; }
  .wheelwrap { grid-column: 1; grid-row: 4 / span 3; }
  .lastout { grid-column: 2; grid-row: 2; align-self: end; }
  .tape { grid-column: 2; grid-row: 3 / span 2; }
  .howto { grid-column: 2; grid-row: 5; }
  .ledger { grid-column: 2; grid-row: 6; }
  .whopanel { grid-column: 1; grid-row: 7; }
  .base { grid-column: 1 / -1; grid-row: 8; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; }
  .outcall-num { font-size: 120px; }
  .notice-now { font-size: 25px; }
  .wheel { max-width: 470px; }
  .peg-n { font-size: 31px; }
  .peg-w { font-size: 11px; }
  .hub-n { font-size: 58px; }
  .tape-list { max-height: 300px; }
  .lottag { right: max(18px, calc((100vw - 1240px) / 2 + 18px)); }
  .lottag-addr { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
