:root {
  --ink: #fff8ee;
  --muted: #e6d3b4;
  --gold: #e4b45a;
  --gold-deep: #a87420;
  --wood: #1a120c;
  --font-display: "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: Aptos, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --digit: 7.2rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 50% 0%, rgba(228, 180, 90, 0.18), transparent 28rem),
    linear-gradient(180deg, #2a1c12 0%, var(--wood) 40%, #120c08 100%);
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--gold);
  color: #1a1208;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 800;
}

.skip:focus { transform: none; }

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  align-items: center;
  padding: 18px 24px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}

.brand img { border-radius: 10px; }

.status {
  margin: 0;
  max-width: 28rem;
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.stage {
  position: relative;
  overflow: hidden;
  padding: 36px 28px 28px;
  border: 1px solid rgba(228, 180, 90, 0.35);
  border-radius: 28px;
  background: rgba(255, 248, 238, 0.04);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.stage__glow {
  position: absolute;
  inset: auto 10% -40%;
  height: 55%;
  background: radial-gradient(circle, rgba(228, 180, 90, 0.28), transparent 68%);
  pointer-events: none;
}

.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 750;
}

h1 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 650;
  line-height: 1.05;
}

.prize-byline {
  margin: 10px 0 22px;
  color: var(--muted);
}

.window {
  position: relative;
  display: inline-flex;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #3a2a18, #24180f 40%, #4a341c);
  box-shadow: inset 0 0 0 2px rgba(228, 180, 90, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.reels {
  display: flex;
  gap: 6px;
  overflow: hidden;
  height: var(--digit);
  padding: 0 6px;
  border-radius: 14px;
  background: #140e09;
}

.reel {
  width: 4.1rem;
  overflow: hidden;
}

.reel__strip {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  will-change: transform;
}

.reel__strip span {
  display: grid;
  height: var(--digit);
  place-items: center;
  color: #fff8ee;
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.window__shine {
  position: absolute;
  inset: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.stage.is-locking .window {
  animation: lockflash 0.7s ease;
}

.stage.is-winner .window__shine {
  animation: sweep 1.1s ease;
}

@keyframes lockflash {
  0% { box-shadow: inset 0 0 0 2px rgba(228, 180, 90, 0.45), 0 0 0 rgba(228, 180, 90, 0); }
  40% { box-shadow: inset 0 0 0 2px #fff1cc, 0 0 48px rgba(228, 180, 90, 0.7); }
  100% { box-shadow: inset 0 0 0 2px rgba(228, 180, 90, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35); }
}

@keyframes sweep {
  from { transform: translateY(-30%); opacity: 0.2; }
  to { transform: translateY(20%); opacity: 1; }
}

.burst {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  animation: burst 900ms ease-out forwards;
  pointer-events: none;
}

@keyframes burst {
  to { transform: translate(var(--x), var(--y)) scale(0.4); opacity: 0; }
}

.announce {
  min-height: 1.6em;
  margin: 18px 0 8px;
  font-size: 1.15rem;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}

.play {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(180deg, #f0cb78, var(--gold-deep));
  color: #1a1208;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.play:disabled { cursor: wait; opacity: 0.65; }

.back { color: var(--muted); }

.side { display: grid; gap: 16px; align-content: start; }

.admin {
  padding: 16px;
  border: 1px solid rgba(228, 180, 90, 0.28);
  border-radius: 16px;
  background: rgba(255, 248, 238, 0.04);
}

.admin h2 { margin: 0 0 8px; font-size: 1.1rem; }
.admin p { margin: 0 0 12px; color: var(--muted); }
.admin label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 0.92rem; }
.admin input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(228, 180, 90, 0.35);
  border-radius: 10px;
  color: var(--ink);
  background: #140e09;
  font: inherit;
}

.board {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board li {
  padding: 14px 16px;
  border: 1px solid rgba(228, 180, 90, 0.22);
  border-radius: 16px;
  background: rgba(255, 248, 238, 0.04);
}

.board li.is-done {
  animation: settle 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  border-color: rgba(228, 180, 90, 0.7);
}

@keyframes settle {
  from { transform: translateY(10px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.board strong { display: block; }
.board span { color: var(--muted); font-size: 0.92rem; }
.board b { color: var(--gold); }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .status { text-align: left; }
  .top { flex-direction: column; align-items: flex-start; }
  :root { --digit: 5.4rem; }
  .reel { width: 3rem; }
  .reel__strip span { font-size: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reel__strip,
  .stage.is-locking .window,
  .stage.is-winner .window__shine,
  .board li.is-done,
  .burst {
    animation: none !important;
    transition: none !important;
  }
}
