/* ===== Night Arena: stadium at night, spotlights, LED scoreboard ============ */
[data-theme="arena"] {
  --theme-color: #140C34;
  --page-bg: #07041a;
  --bg: #140C34;
  --ink: #fff;
  --font-display: 'Luckiest Guy', 'Arial Black', sans-serif;
  --font-body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --focus: #5CE0FF;
  --error: #FF8A80;
  --btn-primary-bg: #FFB800;
  --btn-primary-ink: #140C34;
  --btn-border: 0;
  --btn-shadow: 0 5px 0 #B57900;
  --btn-radius: 8px;
  --reveal-bg: #05030F;
  --reveal-ink: #fff;
  --reveal-border: 3px solid #FFB800;
  --reveal-shadow: none;
  --reveal-radius: 10px;
  --reveal-lost-bg: #3a0d14;
  --sheet-bg: #FFFDF4;
  --sheet-ink: #140C34;
  --sheet-line: #D6CFEC;
  --sheet-muted: #5A5478;
  --sheet-item-bg: #fff;
  --sheet-border: 4px solid #FFB800;
  --go-accent: #C27C00;
  --chip-border: 2px solid #05030F;
  --chip-gen-bg: transparent;
  --chip-gen-ink: #E4DEFF;
  --feedback-top: 40%;
}

/* ---- home ---- */
.arena-home { background: #140C34; color: #fff; font-family: var(--font-body); }
.arena-beam {
  position: absolute; top: -20px; width: 220px; height: 120%;
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0; pointer-events: none;
}
.arena-beam--l { left: -50px; background: linear-gradient(rgba(255, 236, 170, 0.32), rgba(255, 236, 170, 0)); animation: arena-sweep-l 7s ease-in-out infinite; }
.arena-beam--r { right: -50px; background: linear-gradient(rgba(160, 200, 255, 0.3), rgba(160, 200, 255, 0)); animation: arena-sweep-r 7s ease-in-out infinite; }
.arena-crowd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none;
  background-color: #0B0620;
  background-image: radial-gradient(#3B2E6E 3px, transparent 3.5px), radial-gradient(#2A2058 3px, transparent 3.5px);
  background-size: 16px 14px, 16px 14px; background-position: 0 0, 8px 7px;
}
.arena-ticker { position: relative; z-index: 1; flex: 0 0 34px; overflow: hidden; background: #000; border-bottom: 2px solid #FFB800; }
.arena-ticker-track { display: flex; width: max-content; animation: arena-ticker 22s linear infinite; }
.arena-ticker-track > span { padding-right: 40px; font: 400 24px/34px 'VT323', monospace; color: #FFB800; white-space: nowrap; }
.arena-home-body {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 18px 22px 22px;
}
.arena-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 12vw, 48px); line-height: 0.92; text-align: center;
  color: #fff; -webkit-text-stroke: 2px #140C34;
  text-shadow: 4px 4px 0 #E8342E, 8px 8px 0 #FFB800;
}
.arena-poster { position: relative; width: 196px; margin: 6px 0 18px; }
.arena-poster-frame { height: 180px; border: 4px solid #FFB800; border-radius: 6px; overflow: hidden; background: #2A1E62; }
.arena-ribbon {
  position: absolute; left: -24px; right: -24px; bottom: -18px;
  padding: 6px 0; text-align: center;
  font: 400 21px var(--font-display); letter-spacing: 1.5px; color: #fff;
  background: #E8342E; border: 3px solid #140C34; transform: rotate(-2deg);
}
.arena-dedication { text-align: center; font-weight: 600; font-size: 19px; line-height: 1.25; color: #E4DEFF; max-width: 340px; }
.arena-nick .nick-label { font-weight: 800; font-size: 14px; letter-spacing: 2px; color: #FFB800; }
.arena-nick .nick-input {
  height: 52px; padding: 0 16px; border-radius: 8px;
  border: 2px solid #6A5BB8; background: #1E1450; color: #fff;
  font: 800 22px var(--font-body);
}
.arena-nick .nick-input::placeholder { color: #8C7FC8; }
.arena-nick .nick-input:focus { border-color: #FFB800; }
.arena-play {
  width: 100%; height: 64px; border: 0; border-radius: 8px;
  background: #FFB800; color: #140C34;
  font: 400 clamp(24px, 7.6vw, 30px) var(--font-display); letter-spacing: 2px;
  box-shadow: 0 6px 0 #B57900;
}
.arena-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #B57900; }
.arena-row { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.arena-sec {
  min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 2px solid #6A5BB8; background: rgba(20, 12, 52, 0.7); color: #E4DEFF;
  font: 800 18px var(--font-body); letter-spacing: 1px;
}
.arena-sec svg { color: #FFB800; font-size: 20px; }

/* ---- game ---- */
.arena-game { background: #140C34; color: #fff; font-family: var(--font-body); }
.arena-topbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 0; }
.arena-icon { --icon-btn-ink: #A99BE0; font-size: 22px; }
.arena-round { font: 400 22px 'VT323', monospace; color: #8C7FC8; letter-spacing: 1px; }
.arena-board {
  flex: 0 0 auto; margin: 0 12px; padding: 6px 12px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center;
  background: #000; border: 3px solid #3B2E6E; border-radius: 10px;
  font-family: 'VT323', monospace;
}
.arena-cell-label { font-size: 16px; color: #8C7FC8; line-height: 1; }
.arena-cell--mid { text-align: center; }
.arena-cell--end { text-align: right; }
.arena-score { font-size: 42px; line-height: 0.85; color: #FFB800; }
.arena-hints { font-size: 28px; line-height: 1; color: #5CE0FF; }
.arena-lives { --life-gap: 5px; --life-lost-opacity: 1; margin-top: 4px; }
.arena-lives .led { display: block; width: 16px; height: 16px; background: #FF4A3D; box-shadow: 0 0 8px rgba(255, 74, 61, 0.6); }
.arena-lives .life.is-lost { filter: none; transform: none; }
.arena-lives .life.is-lost .led { background: transparent; box-shadow: inset 0 0 0 2px #4A3D80; }
.arena-stage { margin-top: 2px; }
.arena-spot {
  position: absolute; left: 50%; top: -20px; width: 82%; height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(rgba(255, 240, 190, 0.45), rgba(255, 240, 190, 0.04));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  animation: arena-flicker 3s linear infinite;
}
.arena-platform {
  position: absolute; left: 50%; bottom: 7%; width: 74%; height: 16%;
  transform: translateX(-50%); border-radius: 50%;
  background: #3B2E6E; border: 4px solid #FFB800;
}
.arena-glow { position: absolute; left: 50%; bottom: 11%; width: 52%; height: 9%; transform: translateX(-50%); border-radius: 50%; background: rgba(255, 240, 190, 0.35); }
.arena-stage { --sprite-inset: 12% 14% 14%; --missing-ink: #05030F; }
.arena-stage .sprite { --sprite-idle: arena-rise 3s ease-in-out infinite; }
.arena-tag {
  position: absolute; left: 14px; top: 8px; z-index: 2;
  font: 400 22px/1 var(--font-display); color: #fff;
  text-shadow: 3px 3px 0 #E8342E; transform: rotate(-4deg);
}
.arena-controls { flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 14px; }
.arena-controls .clues { --chip-border: 2px solid #6A5BB8; }
.arena-controls .clues-label { color: #8C7FC8; }
.arena-controls .slots {
  --font-slot: 'VT323', monospace; --slot-fs: 36px; --slot-fs-long: 30px;
  --slot-bg: #000; --slot-border: 2px solid #3B2E6E; --slot-radius: 4px;
  --slot-open-border: 2px solid #FFB800; --slot-open-ink: #FFB800; --slot-fixed-ink: #FFB800;
}
.arena-form { display: grid; grid-template-columns: 1fr 78px; grid-template-areas: "input input" "submit hint"; gap: 8px; }
.arena-form .guess-input {
  grid-area: input; height: 54px; padding: 0 16px; border-radius: 8px;
  border: 2px solid #6A5BB8; background: #1E1450; color: #fff; font: 800 22px var(--font-body);
}
.arena-form .guess-input::placeholder { color: #8C7FC8; }
.arena-form .guess-input:focus { border-color: #FFB800; }
.arena-form .guess-submit {
  grid-area: submit; height: 58px; border: 0; border-radius: 8px;
  background: #FFB800; color: #140C34; font: 400 26px var(--font-display); letter-spacing: 1px;
  box-shadow: 0 5px 0 #B57900;
}
.arena-form .guess-submit:active { transform: translateY(3px); box-shadow: 0 2px 0 #B57900; }
.arena-hint {
  grid-area: hint; height: 58px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 2px solid #5CE0FF; border-radius: 8px; background: transparent; color: #5CE0FF;
  font: 800 15px/1 var(--font-body);
}
.arena-hint svg { font-size: 20px; }
.arena-hint-count {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: #5CE0FF; color: #05030F; font: 800 14px var(--font-body);
}

/* keyboard open: one compact row, no decorations */
.kb-open .arena-topbar, .kb-open .arena-tag { display: none; }
.kb-open .arena-board { margin-top: 6px; padding: 3px 10px; }
.kb-open .arena-score { font-size: 32px; }
.kb-open .arena-form { grid-template-columns: 1fr auto 52px; grid-template-areas: "input submit hint"; }
.kb-open .arena-form .guess-input, .kb-open .arena-form .guess-submit, .kb-open .arena-hint { height: 46px; }
.kb-open .arena-form .guess-submit { font-size: 18px; padding: 0 10px; }
.kb-open .arena-hint span:not(.arena-hint-count) { display: none; }
.kb-open .arena-controls { gap: 6px; padding-bottom: 8px; }
.is-short .arena-poster-frame { height: 170px; }

@keyframes arena-sweep-l { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-6deg); } }
@keyframes arena-sweep-r { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(6deg); } }
@keyframes arena-ticker { to { transform: translateX(-50%); } }
@keyframes arena-flicker { 0%, 100% { opacity: 1; } 48% { opacity: 0.85; } 50% { opacity: 1; } }
@keyframes arena-rise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
