/* Retro Vegas Slot Machine — warm brass, red velvet, incandescent bulbs */

:root {
  --velvet-deep: #3a0a10;
  --velvet: #5a1218;
  --velvet-light: #7a1e24;
  --brass-dark: #8a6318;
  --brass: #c89a3a;
  --brass-light: #e4b84a;
  --brass-bright: #f5d98c;
  --ivory: #f5ecd4;
  --ivory-dim: #d9cda8;
  --cream: #fff7e0;
  --black-rich: #1a0608;
  --ruby: #c7373b;
  --ruby-dark: #8b2029;
  --shadow-inner: rgba(0,0,0,.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  font-family: 'Playfair Display', 'Didot', Georgia, serif;
  color: var(--ivory);
  background:
    radial-gradient(ellipse at 50% 0%, #2a0608 0%, #0d0204 55%, #000 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(228,184,74,.04) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(228,184,74,.04) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
}

/* Film grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.015) 0 1px, transparent 1px 3px);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: .5;
  z-index: 1;
}

#root {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 48px;
  gap: 28px;
  flex-wrap: wrap;
}

/* ═══ Machine wrap ═══════════════════════════════════════════════ */
.machine-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══ Cabinet ════════════════════════════════════════════════════ */
.cabinet {
  width: 820px;
  max-width: calc(100vw - 48px);
  background:
    linear-gradient(180deg,
      #6a1519 0%,
      #5a1218 30%,
      #4a0f14 70%,
      #3a0a10 100%);
  border-radius: 28px 28px 18px 18px;
  padding: 22px;
  position: relative;
  box-shadow:
    0 0 0 2px var(--brass-dark),
    0 0 0 6px #2a0608,
    0 0 0 8px var(--brass),
    0 0 0 10px #1a0608,
    0 40px 80px rgba(0,0,0,.8),
    0 20px 40px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -40px 80px rgba(0,0,0,.4);
}

/* Velvet texture */
.cabinet::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(0,0,0,.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg,
      rgba(255,255,255,.02) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* ═══ Marquee ════════════════════════════════════════════════════ */
.marquee {
  position: relative;
  padding: 14px 16px;
  margin-bottom: 16px;
  background:
    linear-gradient(180deg, #1a0608 0%, #0d0204 100%);
  border-radius: 14px;
  border: 2px solid var(--brass-dark);
  box-shadow:
    inset 0 0 0 1px rgba(228,184,74,.25),
    inset 0 0 20px rgba(0,0,0,.7),
    0 4px 12px rgba(0,0,0,.4);
}

.bulb-ring {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}

.bulb {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4a2a0a;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.5);
  transition: background .15s, box-shadow .15s;
}
.bulb.lit {
  background: var(--brass-bright);
  box-shadow:
    0 0 6px var(--brass-light),
    0 0 12px rgba(245,217,140,.6),
    inset 0 1px 1px rgba(255,255,255,.5);
}

.marquee-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 18px 56px;
  z-index: 2;
}

.marquee-flourish {
  color: var(--brass-light);
  font-size: 22px;
  text-shadow: 0 0 10px rgba(228,184,74,.6);
}

.marquee-title { text-align: center; }

.marquee-top {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 42px;
  letter-spacing: 0.12em;
  color: var(--brass-bright);
  text-shadow:
    0 0 20px rgba(245,217,140,.4),
    0 0 40px rgba(228,184,74,.25),
    0 2px 0 #000;
  line-height: 1;
  white-space: nowrap;
}

.marquee-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ivory-dim);
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ═══ Intensity strip ════════════════════════════════════════════ */
.intensity-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #2a0608 0%, #1a0406 100%);
  border: 1px solid var(--brass-dark);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(228,184,74,.15);
}

.intensity-label {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--brass-light);
  min-width: 60px;
}

.intensity-slider {
  flex: 1;
  appearance: none; -webkit-appearance: none;
  height: 6px;
  background: linear-gradient(90deg, #4a2a0a 0%, var(--brass-dark) 50%, var(--ruby) 100%);
  border-radius: 3px;
  outline: none;
  border: 1px solid #000;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6);
}
.intensity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-bright) 0%, var(--brass) 55%, var(--brass-dark) 100%);
  border: 1px solid #000;
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.4);
  cursor: pointer;
}
.intensity-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-bright) 0%, var(--brass) 55%, var(--brass-dark) 100%);
  border: 1px solid #000;
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.4);
  cursor: pointer;
}

.intensity-readout {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 220px;
  justify-content: flex-end;
}
.intensity-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}
.intensity-name {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ivory-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══ Reel bank ══════════════════════════════════════════════════ */
.reel-bank {
  position: relative;
  margin-bottom: 16px;
}

.reel-bank-frame {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(180deg, #1a0406 0%, #0a0203 100%);
  border-radius: 14px;
  border: 2px solid var(--brass-dark);
  box-shadow:
    inset 0 0 0 1px rgba(228,184,74,.2),
    inset 0 4px 12px rgba(0,0,0,.8),
    0 2px 6px rgba(0,0,0,.5);
}

/* Individual reel */
.reel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.reel-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--brass-light);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 6px;
  text-shadow: 0 0 6px rgba(228,184,74,.4);
}

.reel-window {
  position: relative;
  height: 92px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--ivory) 50%, var(--ivory-dim) 100%);
  border: 1px solid var(--brass);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.2),
    inset 0 2px 4px rgba(0,0,0,.15),
    inset 0 -2px 4px rgba(0,0,0,.15);
}

.reel-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.reel-cell {
  flex: 0 0 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 6px;
  color: var(--black-rich);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0;
  border-bottom: 1px dashed rgba(138,99,24,.25);
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.reel-cell span {
  display: block;
  max-height: 100%;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Motion blur while spinning */
.reel-spinning .reel-strip {
  filter: blur(1.2px);
}
.reel-spinning .reel-cell {
  opacity: 0.85;
}

/* Gloss overlay */
.reel-gloss {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.4) 0%,
      rgba(255,255,255,0) 30%,
      rgba(255,255,255,0) 70%,
      rgba(0,0,0,.25) 100%);
  pointer-events: none;
  border-radius: inherit;
}

.reel-shadow {
  position: absolute; inset: 0;
  box-shadow:
    inset 0 10px 14px -6px rgba(0,0,0,.4),
    inset 0 -10px 14px -6px rgba(0,0,0,.4);
  pointer-events: none;
  border-radius: inherit;
}

/* Pay line indicator — the center row highlight */
.reel-bank-frame::before {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  top: 50%;
  height: 2px;
  transform: translateY(-1px);
  background: linear-gradient(90deg,
    transparent 0%,
    var(--ruby) 10%,
    var(--brass-light) 50%,
    var(--ruby) 90%,
    transparent 100%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 2;
}

/* ═══ Jackpot burst ══════════════════════════════════════════════ */
.jackpot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.jackpot-rays {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  animation: jp-rotate 3s linear;
}
.jackpot-ray {
  position: absolute;
  width: 200%; height: 10px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(245,217,140,.25) 20%,
    rgba(245,217,140,.5) 50%,
    rgba(245,217,140,.25) 80%,
    transparent 100%);
  transform-origin: center;
}
@keyframes jp-rotate {
  from { transform: rotate(0deg) scale(0.8); opacity: 0; }
  20%  { opacity: 1; }
  to   { transform: rotate(180deg) scale(1.1); opacity: 0; }
}

.jackpot-text {
  position: relative;
  text-align: center;
  animation: jp-pop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes jp-pop {
  from { transform: scale(0.2); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.jp-main {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 96px;
  color: var(--brass-bright);
  letter-spacing: 0.1em;
  text-shadow:
    0 0 20px var(--brass-light),
    0 0 40px rgba(228,184,74,.6),
    0 4px 0 #000,
    0 8px 24px rgba(0,0,0,.8);
  line-height: 1;
}
.jp-sub {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--brass-bright);
  letter-spacing: 0.25em;
  text-shadow: 0 0 8px rgba(228,184,74,.5);
  margin: 6px 0;
}

/* Confetti */
.confetti {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px; height: 12px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  from { transform: translateY(0) rotate(0); opacity: 1; }
  to   { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ═══ Console (readout + lever) ══════════════════════════════════ */
.console {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.readout {
  padding: 14px 18px;
  background: linear-gradient(180deg, #2a0608 0%, #1a0406 100%);
  border: 2px solid var(--brass-dark);
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(228,184,74,.18),
    inset 0 2px 6px rgba(0,0,0,.7);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.readout-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--brass-light);
}

.readout-display {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.readout-waiting {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--ivory-dim);
  opacity: .55;
  letter-spacing: 0.08em;
}

.readout-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.08;
  color: var(--brass-bright);
  text-shadow: 0 0 14px rgba(245,217,140,.25), 0 2px 0 #000;
  text-wrap: balance;
}

.readout-acro {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}
.readout-acro-lbl {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--ivory-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.readout-acro-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--ruby);
  letter-spacing: 0.08em;
}
.readout-star {
  color: var(--brass-bright);
  font-size: 16px;
  text-shadow: 0 0 6px var(--brass-light);
}

.readout-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.btn-ghost {
  appearance: none;
  background: transparent;
  border: 1px solid var(--brass-dark);
  color: var(--ivory);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(228,184,74,.12);
  border-color: var(--brass);
  color: var(--brass-bright);
}
.btn-ghost:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.btn-ghost.small { padding: 4px 10px; font-size: 10px; }
.btn-ghost span { font-size: 13px; }

/* ═══ Lever ══════════════════════════════════════════════════════ */
.lever-frame {
  position: relative;
  background: linear-gradient(180deg, #2a0608 0%, #1a0406 100%);
  border: 2px solid var(--brass-dark);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 0 10px;
  box-shadow:
    inset 0 0 0 1px rgba(228,184,74,.18),
    inset 0 2px 6px rgba(0,0,0,.7);
}

.lever-mount {
  position: absolute;
  bottom: 26px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--brass-bright) 0%, var(--brass) 50%, var(--brass-dark) 100%);
  border: 1px solid #000;
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 -2px 4px rgba(0,0,0,.3);
  z-index: 2;
}

.lever-arm {
  position: relative;
  height: 130px;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  transform: rotate(-8deg);
  transition: transform 0.15s cubic-bezier(.6,.05,.98,.53);
  cursor: pointer;
  z-index: 3;
}
.lever-arm.pulled {
  transform: rotate(60deg);
  transition: transform .25s cubic-bezier(.6,.05,.98,.53);
}

.lever-shaft {
  width: 8px;
  height: 110px;
  background: linear-gradient(90deg, #7a5a18 0%, var(--brass) 35%, var(--brass-bright) 50%, var(--brass) 65%, #7a5a18 100%);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.5);
}

.lever-ball {
  position: relative;
  width: 30px; height: 30px;
  margin-top: -4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #ff6b4a 0%, var(--ruby) 40%, var(--ruby-dark) 85%, #5a1218 100%);
  border: 1px solid #000;
  box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 -3px 6px rgba(0,0,0,.35);
}
.lever-ball-highlight {
  position: absolute;
  top: 5px; left: 7px;
  width: 8px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  filter: blur(1px);
}

.lever-hint {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--brass-light);
  letter-spacing: 0.3em;
  margin-top: 4px;
  text-shadow: 0 0 6px rgba(228,184,74,.4);
}

/* ═══ Base plate ═════════════════════════════════════════════════ */
.base-plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background:
    linear-gradient(180deg, var(--brass-dark) 0%, #6a4810 100%);
  border-radius: 10px;
  border: 1px solid #000;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 -2px 4px rgba(0,0,0,.5);
}

.credit {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.credit-lbl {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: rgba(0,0,0,.6);
  letter-spacing: 0.15em;
}
.credit-val {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--ivory);
  text-shadow: 0 1px 0 rgba(0,0,0,.3);
}

.base-badge {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(0,0,0,.65);
  letter-spacing: 0.2em;
}

/* ═══ History / Ledger ═══════════════════════════════════════════ */
.history {
  width: 320px;
  max-width: 100%;
  background: linear-gradient(180deg, #2a0608 0%, #1a0406 100%);
  border-radius: 18px;
  padding: 18px;
  box-shadow:
    0 0 0 2px var(--brass-dark),
    0 0 0 4px #1a0608,
    0 0 0 6px var(--brass),
    0 0 0 8px #1a0608,
    0 20px 40px rgba(0,0,0,.5);
  align-self: flex-start;
  max-height: 720px;
  display: flex;
  flex-direction: column;
}

.history-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(228,184,74,.2);
}
.history-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--brass-bright);
  text-shadow: 0 0 8px rgba(228,184,74,.3);
}
.history-meta {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--ivory-dim);
  letter-spacing: 0.12em;
  flex: 1;
}
.history-clear {
  appearance: none;
  background: transparent;
  border: 1px solid var(--brass-dark);
  color: var(--ivory-dim);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  letter-spacing: 0.08em;
}
.history-clear:hover {
  color: var(--ruby);
  border-color: var(--ruby);
}

.history-empty {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--ivory-dim);
  font-size: 14px;
  text-align: center;
  padding: 30px 10px;
  opacity: .7;
  line-height: 1.5;
}

.history-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--brass-dark) transparent;
}
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-thumb { background: var(--brass-dark); border-radius: 3px; }

.history-item {
  padding: 10px 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(228,184,74,.15);
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
}
.history-item:hover {
  background: rgba(228,184,74,.08);
  border-color: var(--brass-dark);
  transform: translateX(-2px);
}
.history-jackpot {
  border-color: rgba(228,184,74,.5);
  background:
    linear-gradient(135deg, rgba(228,184,74,.08) 0%, rgba(0,0,0,.35) 60%);
  box-shadow: inset 0 0 0 1px rgba(228,184,74,.15);
}

.history-number {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--brass-light);
  letter-spacing: 0.15em;
  opacity: .7;
  margin-bottom: 3px;
}

.history-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: var(--ivory);
  margin-bottom: 5px;
  text-wrap: balance;
}

.history-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-acro {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--ruby);
  letter-spacing: 0.08em;
}

.history-badge {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--brass-bright);
  letter-spacing: 0.15em;
  text-shadow: 0 0 4px rgba(228,184,74,.5);
}

/* ═══ Vocab editor ═══════════════════════════════════════════════ */
.vocab-editor {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, #2a0608 0%, #1a0406 100%);
  border: 2px solid var(--brass-dark);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow:
    0 0 0 1px rgba(228,184,74,.3),
    0 30px 80px rgba(0,0,0,.8);
  z-index: 100;
}

.vocab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.vocab-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--brass-bright);
}
.vocab-close {
  appearance: none;
  background: transparent;
  border: 1px solid var(--brass-dark);
  color: var(--ivory);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.vocab-close:hover { background: var(--ruby-dark); border-color: var(--ruby); }

.vocab-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  background: rgba(0,0,0,.4);
  padding: 3px;
  border-radius: 8px;
}
.vocab-tab {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ivory-dim);
  padding: 7px 8px;
  border-radius: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.vocab-tab.active {
  background: var(--brass-dark);
  color: var(--brass-bright);
}

.vocab-tiers {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.vocab-tier {
  appearance: none;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--brass-dark);
  color: var(--ivory-dim);
  padding: 4px 12px;
  border-radius: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.vocab-tier.active {
  background: var(--brass-dark);
  color: var(--brass-bright);
  border-color: var(--brass);
}

.vocab-textarea {
  width: 100%;
  height: 280px;
  background: #0d0204;
  color: var(--ivory);
  border: 1px solid var(--brass-dark);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.vocab-textarea:focus { border-color: var(--brass); }

.vocab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.vocab-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ivory-dim);
  letter-spacing: 0.08em;
}

/* ═══ Responsive ═════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .history { width: 100%; max-width: 820px; }
}
@media (max-width: 700px) {
  .marquee-top { font-size: 28px; }
  .marquee-sub { font-size: 12px; }
  .reel-bank-frame { padding: 10px; gap: 6px; }
  .reel-cell { font-size: 13px; }
  .reel-window { height: 80px; }
  .reel-cell { flex-basis: 80px; height: 80px; }
  .console { grid-template-columns: 1fr; }
  .lever-frame { height: 140px; }
  .jp-main { font-size: 56px; }
}
