@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Share+Tech+Mono&family=Barlow+Condensed:wght@300;400;600;700&display=swap');

/* ══════════════════════════════════════════════
   COMMAND & HONOR — American Legion Bingo Theme
   Admin Panel
══════════════════════════════════════════════ */
/* ── WORDPRESS ADMIN CHROME OVERRIDES ── */
/* Remove WP's default content padding so our header sits flush at the top */
#wpcontent,
#wpbody-content {
  padding-top: 0 !important;
}
/* Push wrap up to sit right under the admin bar */
.bingo-wrap {
  margin-top: 0 !important;
}



:root {
  --navy:      #0a1628;
  --navy2:     #0f1f3d;
  --navy3:     #162a52;
  --gold:      #c9a84c;
  --gold2:     #e8c96a;
  --gold-dim:  #7a6230;
  --red:       #b22234;
  --red2:      #d42b3f;
  --white:     #f0ead8;
  --muted:     #4a5a7a;
  --border:    #1e3060;

  /* Branch colors for B-I-N-G-O */
  --B: #6b7c3a;   /* Army — olive green */
  --I: #1a3a6e;   /* Navy — deep navy */
  --N: #c8102e;   /* Marines — scarlet */
  --G: #4a7fc1;   /* Air Force — steel blue */
  --O: #f0ead8;   /* Coast Guard — white */
}

/* ── RESET SCOPE ── */
.bingo-wrap * { box-sizing: border-box; }

/* ── STAR FIELD BACKGROUND ── */
.bingo-wrap {
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(240,234,216,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(240,234,216,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 8%,  rgba(240,234,216,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 30%, rgba(240,234,216,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 18%, rgba(240,234,216,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 82% 45%, rgba(240,234,216,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 12%, rgba(240,234,216,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 65%, rgba(240,234,216,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(240,234,216,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 75%, rgba(240,234,216,0.3) 0%, transparent 100%),
    linear-gradient(180deg, #0a1628 0%, #0d1c38 50%, #0a1628 100%);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  min-height: calc(100vh - 32px);
  padding: 0 0 60px;
  margin: -10px -20px 0;   /* WP content padding is 10px top, 20px sides */
}

/* ── HEADER ── */
.bingo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 72px;
  background: linear-gradient(180deg, #0a1628 0%, #0f1f3d 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 30px rgba(201,168,76,0.15), inset 0 -1px 0 rgba(201,168,76,0.3);
  position: relative;
}

/* Double-rule top accent */
.bingo-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--red) 0px, var(--red) 40px, var(--white) 40px, var(--white) 50px, #0a1628 50px, #0a1628 55px, var(--white) 55px, var(--white) 65px, var(--gold) 65px, var(--gold) 105px, #0a1628 105px, #0a1628 110px);
}

.bingo-logo {
  font-family: 'Oswald', sans-serif !important;
  font-weight: 700 !important;
  font-size: 36px !important;
  letter-spacing: 14px !important;
  color: var(--gold2) !important;
  text-shadow: 0 0 20px rgba(201,168,76,0.4), 2px 2px 0 rgba(0,0,0,0.5) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1 !important;
  -webkit-text-fill-color: var(--gold2) !important;
  background: none !important;
}

.title-star { width: 0.6em; height: 0.6em; fill: currentColor; opacity: 0.8; vertical-align: middle; margin: 0 0.2em; flex-shrink: 0; }

.bingo-header-meta { display: flex; align-items: center; gap: 16px; }

.bstat {
  text-align: center;
  background: rgba(10,22,40,0.8);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 6px 16px;
  min-width: 68px;
}
.bstat-val {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 28px;
  color: var(--gold2);
  line-height: 1;
  text-shadow: 0 0 12px rgba(232,201,106,0.5);
}
.bstat-lbl {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── TABS ── */
.bingo-tabs {
  display: flex;
  align-items: center;
  background: var(--navy2);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
}

.btab {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 3px;
  padding: 14px 22px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btab:hover { color: var(--white); }
.btab.active { color: var(--gold2); border-bottom-color: var(--gold); }

.btab-shortcode {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.btab-shortcode a, .btab-shortcode code {
  color: var(--gold2);
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 2px 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  text-decoration: none;
}

/* ── PANELS ── */
.bpanel { display: none; padding: 28px; }
.bpanel.active { display: block; }

/* ── BUTTONS ── */
.bingo-btn {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 10px 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
}
.bingo-btn:active { transform: scale(.97); }

.b-primary {
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}
.b-primary:hover { background: linear-gradient(180deg, #f0d880, var(--gold2)); box-shadow: 0 0 20px rgba(201,168,76,0.5); }

.b-danger {
  background: linear-gradient(180deg, var(--red2), var(--red));
  color: var(--white);
  box-shadow: 0 2px 8px rgba(178,34,52,0.3);
}
.b-danger:hover { background: linear-gradient(180deg, #e83348, var(--red2)); }

.b-success {
  background: linear-gradient(180deg, #4a9a4a, #2d7a2d);
  color: var(--white);
}
.b-success:hover { background: linear-gradient(180deg, #5aaa5a, #4a9a4a); }

.b-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.b-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--gold-dim); }

.full-w { width: 100%; text-align: center; }

/* ── FIELDS ── */
.ball-field {
  background: rgba(10,22,40,0.9);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: 'Share Tech Mono', monospace;
  font-size: 22px;
  padding: 10px 14px;
  text-align: center;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.ball-field:focus { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.2); }

.field-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.b-section-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.b-section-title::before { content: ''; display: inline-block; width: 6px; height: 6px; background: currentColor; border-radius: 50%; margin-right: 8px; vertical-align: middle; opacity: 0.8; }

/* ── CALLER TAB ── */
.caller-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

.caller-left {
  background: rgba(15,31,61,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.1);
}

/* Big ball */
.big-ball {
  width: 140px; height: 140px;
  border-radius: 50%;
  margin: 0 auto;
  border: 3px solid currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.1), rgba(0,0,0,0.3));
  box-shadow: 0 0 40px currentColor, inset 0 0 20px rgba(0,0,0,0.4);
  transition: all .4s;
  position: relative;
}
/* Star watermark */
.big-ball .ball-star {
  position: absolute;
  width: 55%;
  height: 55%;
  opacity: 0.07;
  fill: white;
  pointer-events: none;
}

.big-ball.empty { color: #2a3a5a; box-shadow: none; }
.big-ball.B { color: var(--B); }
.big-ball.I { color: var(--I); }
.big-ball.N { color: var(--N); }
.big-ball.G { color: var(--G); }
.big-ball.O { color: var(--O); }

.bb-letter {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1; opacity: .85;
  z-index: 1;
}
.bb-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 52px;
  line-height: .9;
  z-index: 1;
}

.ball-row { display: flex; gap: 8px; }

/* Mini balls */
.recent-row { display: flex; gap: 6px; flex-wrap: wrap; }

.mini-ball {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mini-ball.B { color: var(--B); }
.mini-ball.I { color: var(--I); }
.mini-ball.N { color: var(--N); }
.mini-ball.G { color: var(--G); }
.mini-ball.O { color: var(--O); }
.mini-ball .ml { font-size: 8px; font-family: 'Oswald', sans-serif; line-height: 1; }
.mini-ball .mn { font-size: 13px; font-family: 'Share Tech Mono', monospace; line-height: 1; }

/* Quick select */
.caller-right {
  background: rgba(15,31,61,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.1);
}

.quick-grid {
  display: grid;
  grid-template-columns: 28px repeat(15, 1fr);
  gap: 5px;
}

/* Row letter label */
.qrow-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border-radius: 4px;
}
.qrow-label.B { color: var(--B); }
.qrow-label.I { color: #7aaaf0; }
.qrow-label.N { color: var(--N); }
.qrow-label.G { color: var(--G); }
.qrow-label.O { color: var(--O); }

/* Ball buttons */
.qbtn {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(11px, 2.6vw, 36px);
  font-weight: bold;
  aspect-ratio: 1;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.08), rgba(0,0,0,.3));
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
  line-height: 1;
}
.qbtn.B { color: var(--B); }
.qbtn.I { color: #7aaaf0; }
.qbtn.N { color: var(--N); }
.qbtn.G { color: var(--G); }
.qbtn.O { color: var(--O); }
.qbtn:hover:not(.called) { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), rgba(0,0,0,.2)); box-shadow: 0 0 8px currentColor; transform: scale(1.08); }
.qbtn.called  { opacity: 0.18; cursor: default; box-shadow: none; transform: none; }
.qbtn.last    { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: var(--navy); border-color: var(--gold2); box-shadow: 0 0 10px var(--gold); }

/* ── BOARD TAB ── */
.full-board-wrap {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(15,31,61,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.1);
}

.board-col-heads {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.bch {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 34px;
  text-align: center;
  padding: 10px 4px 6px;
  border-radius: 4px;
  line-height: 1;
}
.bch.B { color: var(--B); background: rgba(107,124,58,.15); border-bottom: 2px solid var(--B); }
.bch.I { color: var(--I); background: rgba(26,58,110,.15);  border-bottom: 2px solid var(--I); }
.bch.N { color: var(--N); background: rgba(200,16,46,.15);  border-bottom: 2px solid var(--N); }
.bch.G { color: var(--G); background: rgba(74,127,193,.15); border-bottom: 2px solid var(--G); }
.bch.O { color: var(--O); background: rgba(240,234,216,.08); border-bottom: 2px solid rgba(240,234,216,.5); }

/* Sub-label: branch name */
.bch span {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  opacity: 0.6;
  font-weight: 400;
  margin-top: 2px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 5px;
}

.bcell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(12px, 1.8vw, 20px);
  border-radius: 4px;
  background: rgba(10,22,40,0.6);
  border: 1px solid var(--border);
  color: #2a3a5a;
  transition: all .3s;
}
.bcell.called { color: var(--white); }
.bcell.called.B { background: rgba(107,124,58,.25);  color: var(--B); border-color: rgba(107,124,58,.5); }
.bcell.called.I { background: rgba(26,58,110,.35);   color: #5080c0; border-color: rgba(26,58,110,.7); }
.bcell.called.N { background: rgba(200,16,46,.25);   color: var(--N); border-color: rgba(200,16,46,.5); }
.bcell.called.G { background: rgba(74,127,193,.25);  color: var(--G); border-color: rgba(74,127,193,.5); }
.bcell.called.O { background: rgba(240,234,216,.1);  color: var(--O); border-color: rgba(240,234,216,.35); text-shadow: 0 0 8px rgba(240,234,216,0.5); }

@keyframes cellPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); box-shadow: 0 0 16px currentColor; }
  100% { transform: scale(1); }
}
.bcell.pop { animation: cellPop .45s ease; }

/* ── VERIFY TAB ── */
.verify-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}
.verify-left, .verify-right {
  background: rgba(15,31,61,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.1);
}
.verify-left { display: flex; flex-direction: column; gap: 12px; }
.verify-result {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 220px; gap: 12px;
}
.vr-icon  { font-size: 64px; line-height: 1; }
.vr-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 44px;
  letter-spacing: 8px;
}
.vr-label.win  { color: var(--gold2); text-shadow: 0 0 30px rgba(232,201,106,0.5); }
.vr-label.lose { color: #2a3a5a; }
.vr-sub { font-size: 14px; color: var(--muted); letter-spacing: 1px; }
.divider { height: 1px; background: var(--border); }

.winner-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(201,168,76,0.08);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  margin-top: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--gold2);
}

/* ── CARDS PAGE ── */
.cards-toolbar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(15,31,61,0.8);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px; flex-wrap: wrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; padding: 28px;
}

.no-cards-msg {
  grid-column: 1/-1; text-align: center;
  color: var(--muted); letter-spacing: 2px;
  font-size: 13px; padding: 60px 0;
}

.bcard {
  background: rgba(15,31,61,0.9);
  border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.bcard:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.bcard.winner {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(201,168,76,0.35);
  animation: winPulse 1.2s ease infinite alternate;
}
@keyframes winPulse {
  from { box-shadow: 0 0 20px rgba(201,168,76,0.2); }
  to   { box-shadow: 0 0 50px rgba(201,168,76,0.6); }
}

.bcard-head {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(10,22,40,0.8);
}
.bcardh {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 20px; text-align: center; padding: 7px;
}
.bcardh.B { color: var(--B); }
.bcardh.I { color: var(--I); }
.bcardh.N { color: var(--N); }
.bcardh.G { color: var(--G); }
.bcardh.O { color: var(--O); }

.bcard-body {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px; padding: 3px;
  background: rgba(10,22,40,0.6);
}
.bcard-cell {
  aspect-ratio: 1; display: flex;
  align-items: center; justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px; border-radius: 3px;
  background: rgba(15,31,61,0.8);
  color: var(--white); transition: all .2s;
}
.bcard-cell.free { background: rgba(201,168,76,0.15); color: var(--gold2); font-size: 9px; letter-spacing: 1px; }
.bcard-cell.marked { background: rgba(201,168,76,0.25); color: var(--gold2); border: 1px solid var(--gold-dim); }

.bcard-foot {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.bcard-id { font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.win-badge {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 12px; letter-spacing: 2px;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: var(--navy); padding: 2px 9px;
  border-radius: 3px; display: none;
}
.bcard.winner .win-badge { display: block; }
.del-card-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 0 4px; transition: color .15s;
}
.del-card-btn:hover { color: var(--red2); }

/* ── MODAL ── */
.bingo-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: none; align-items: center;
  justify-content: center; z-index: 99999;
}
.bingo-modal-overlay.show { display: flex; }
.bingo-modal {
  background: var(--navy2);
  border: 2px solid var(--red);
  border-radius: 6px; padding: 36px;
  max-width: 400px; width: 90%; text-align: center;
  color: var(--white);
  box-shadow: 0 0 60px rgba(178,34,52,0.3);
}
.bingo-modal h2 {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 30px; letter-spacing: 6px;
  color: var(--red2); margin: 0 0 12px;
}
.bingo-modal p { font-size: 14px; color: #7a8aaa; line-height: 1.6; margin: 0 0 24px; }
.modal-btns { display: flex; gap: 12px; }

/* ── TOAST ── */
.bingo-toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 5px; padding: 13px 20px;
  font-size: 13px; letter-spacing: 1px;
  opacity: 0; transform: translateY(8px);
  transition: all .3s; z-index: 100000;
  max-width: 280px; pointer-events: none;
  font-family: 'Oswald', sans-serif;
}
.bingo-toast.show { opacity: 1; transform: translateY(0); }
.bingo-toast.t-error   { border-color: var(--red2);  color: var(--red2); }
.bingo-toast.t-success { border-color: #4a9a4a;      color: #6aba6a; }
.bingo-toast.t-info    { border-color: var(--gold-dim); color: var(--gold2); }

/* ── PRINT ── */
@media print {
  .bingo-wrap { background: white !important; color: black !important; }
  .bingo-header, .bingo-tabs, .cards-toolbar { display: none !important; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); padding: 0; }
  .bcard { break-inside: avoid; border: 1px solid #ccc !important; box-shadow: none !important; animation: none !important; background: white !important; }
  .bcard-cell { background: #f5f5f5 !important; color: black !important; }
  .bcard-cell.marked { background: #ffe0a0 !important; }
  .bcard-cell.free { background: #ffe0a0 !important; color: black !important; }
  .bcard-head, .bcardh { background: white !important; color: black !important; }
  .bcard-body { background: white !important; }
}

/* ════════════════════════════════════════════
   SETTINGS PAGE
════════════════════════════════════════════ */

#bingo-settings-page .bingo-wrap { padding-bottom: 80px; }

.settings-section {
  max-width: 960px;
  background: rgba(15,31,61,0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  margin: 28px;
  box-shadow: inset 0 1px 0 rgba(201,168,76,0.1);
}

.settings-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; letter-spacing: 0.5px; }
.settings-row { margin-bottom: 16px; }

/* ── POST LABEL in header ── */
.bingo-post-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--gold);
  opacity: 0.7;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── THEME GRID ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.theme-card {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  background: rgba(10,22,40,0.6);
}
.theme-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.theme-card.active { border-color: var(--gold); box-shadow: 0 0 20px rgba(201,168,76,0.3); }

.theme-preview {
  height: 70px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tp-header { height: 18px; flex-shrink: 0; }
.tp-body { flex: 1; display: flex; gap: 4px; padding: 4px; }
.tp-board { flex: 0 0 65%; border-radius: 3px; }
.tp-ball  { flex: 1; border-radius: 50%; }

/* Theme-specific preview colors */
.theme-military .tp-header { background: linear-gradient(90deg,#b22234 33%,#f0ead8 33%,#f0ead8 66%,#1a3a7a 66%); }
.theme-military .tp-body   { background: #071020; }
.theme-military .tp-board  { background: #0c1830; border: 1px solid #1e3060; }
.theme-military .tp-ball   { background: radial-gradient(circle,#c9a84c,#8a6030); }

.theme-christmas .tp-header { background: linear-gradient(90deg,#cc0000 50%,#228b22 50%); }
.theme-christmas .tp-body   { background: #0d2010; }
.theme-christmas .tp-board  { background: #122818; border: 1px solid #1e4020; }
.theme-christmas .tp-ball   { background: radial-gradient(circle,#ffd700,#cc9900); }

.theme-halloween .tp-header { background: linear-gradient(90deg,#ff6600 50%,#9b30ff 50%); }
.theme-halloween .tp-body   { background: #0d0808; }
.theme-halloween .tp-board  { background: #1a0f08; border: 1px solid #3a1f08; }
.theme-halloween .tp-ball   { background: radial-gradient(circle,#ff6600,#cc4400); }

.theme-classic .tp-header { background: linear-gradient(90deg,#4fc3f7 20%,#ce93d8 40%,#ef9a9a 60%,#a5d6a7 80%,#ffcc80 100%); }
.theme-classic .tp-body   { background: #1a1a2e; }
.theme-classic .tp-board  { background: #16213e; border: 1px solid #0f3460; }
.theme-classic .tp-ball   { background: radial-gradient(circle,#e2b96a,#a07840); }

.theme-july4 .tp-header { background: linear-gradient(90deg,#b22234 33%,#ffffff 33%,#ffffff 66%,#3c3b6e 66%); }
.theme-july4 .tp-body   { background: #050a1e; }
.theme-july4 .tp-board  { background: #0a1428; border: 1px solid #1a2a5e; }
.theme-july4 .tp-ball   { background: radial-gradient(circle,#ffd700,#cc9900); }

.theme-custom .tp-header { background: linear-gradient(90deg, var(--B) 20%, var(--N) 40%, var(--G) 60%, var(--O) 80%); }
.theme-custom .tp-body   { background: #111; }
.theme-custom .tp-board  { background: #222; border: 1px solid #333; }
.theme-custom .tp-ball   { background: radial-gradient(circle,var(--gold),var(--gold-dim)); }

.theme-label {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--white);
  padding: 8px;
  border-top: 1px solid var(--border);
}
.theme-card.active .theme-label { color: var(--gold2); }

/* ── COLOR GRID ── */
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.color-field { display: flex; flex-direction: column; gap: 6px; }
.color-input-row { display: flex; align-items: center; gap: 8px; }
.color-swatch { width: 40px; height: 40px; border: 2px solid var(--border); border-radius: 4px; background: none; cursor: pointer; padding: 2px; }
.color-hex { background: rgba(10,22,40,0.8); border: 1px solid var(--border); border-radius: 4px; color: var(--white); font-family: 'Share Tech Mono', monospace; font-size: 13px; padding: 8px 10px; width: 110px; outline: none; }
.color-hex:focus { border-color: var(--gold); }

/* ── PATTERN GRID ── */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.pattern-card {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(10,22,40,0.6);
  transition: border-color .2s, box-shadow .2s;
}
.pattern-card:hover { border-color: var(--gold-dim); }
.pattern-card.active { border-color: var(--gold); box-shadow: 0 0 20px rgba(201,168,76,0.25); }

.pattern-mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  width: 70px;
}
.pmg-cell { aspect-ratio: 1; border-radius: 2px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.pmg-cell.on   { background: var(--gold); border-color: var(--gold2); }
.pmg-cell.free { background: var(--gold); border-color: var(--gold2); }
.pattern-label { font-family: 'Oswald', sans-serif; font-size: 11px; letter-spacing: 2px; color: var(--white); text-align: center; }
.pattern-card.active .pattern-label { color: var(--gold2); }

/* ── CUSTOM PATTERN EDITOR ── */
.custom-grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.custom-grid-heads {
  display: grid;
  grid-template-columns: repeat(5, 48px);
  gap: 4px;
  margin-left: 0;
}
.custom-grid-heads div {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  color: var(--gold2);
}
.custom-grid {
  display: grid;
  grid-template-columns: repeat(5, 48px);
  gap: 4px;
}
.cg-cell {
  width: 48px; height: 48px;
  border-radius: 6px;
  background: rgba(10,22,40,0.8);
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gold-dim);
  transition: background .15s, border-color .15s;
  user-select: none;
}
.cg-cell:hover:not(.free) { border-color: var(--gold-dim); background: rgba(201,168,76,0.1); }
.cg-cell.on  { background: rgba(201,168,76,0.25); border-color: var(--gold); }
.cg-cell.free { background: rgba(201,168,76,0.15); border-color: var(--gold-dim); color: var(--gold2); cursor: default; }

/* ── BSTAT PATTERN ── */
.bstat-pattern .bstat-val { font-family: 'Oswald', sans-serif !important; }

/* Game selector widget in control header */
.ctrl-game-selector { cursor: default; }
.ctrl-game-btn {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px; color: rgba(255,255,255,0.6);
    width: 26px; height: 26px; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
}
.ctrl-game-btn:hover { background: rgba(100,181,246,0.2); border-color: #64b5f6; color: #64b5f6; }

/* ── ADMIN COUNTDOWN TIMER ── */
.admin-timer-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.admin-timer-ring { position: relative; width: 44px; height: 44px; }
.admin-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.admin-timer-ring .ring-bg  { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; }
.admin-timer-ring .ring-bar { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .9s linear, stroke .3s; }
.admin-timer-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Share Tech Mono', monospace; font-size: 13px; color: var(--gold2); font-weight: bold; }
.admin-timer-lbl { font-size: 8px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.admin-timer-wrap.timer-hidden { display: none; }
.admin-timer-input { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.admin-timer-input input { width: 48px; background: rgba(10,22,40,0.9); border: 1px solid var(--border); border-radius: 3px; color: var(--gold2); font-family: 'Share Tech Mono', monospace; font-size: 14px; padding: 3px 5px; text-align: center; outline: none; }
.admin-timer-input input:focus { border-color: var(--gold); }

/* ════ PHYSICAL CARDS ════ */
.phys-winner-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 16px; border: 1px solid;
    font-family: 'Share Tech Mono', monospace; font-size: 14px;
    cursor: pointer; transition: all .15s;
}
.phys-winner-pill:hover { opacity: .8; transform: scale(1.05); }
.pw-tag {
    font-size: 9px; letter-spacing: 1px; font-family: 'Oswald', sans-serif;
    background: rgba(75,175,80,.2); padding: 1px 5px; border-radius: 3px;
}
.phys-card-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; margin-top: 16px; }
.phys-card-head { text-align:center; font-family:'Oswald',sans-serif; font-weight:700; font-size:18px; padding:6px 0; border-radius:4px; }
.phys-card-head.B{color:var(--B,#6b7c3a);} .phys-card-head.I{color:var(--I,#1a3a6e);} .phys-card-head.N{color:var(--N,#c8102e);} .phys-card-head.G{color:var(--G,#4a7fc1);} .phys-card-head.O{color:var(--O,#f0ead8);}
.phys-cell { text-align:center; font-family:'Share Tech Mono',monospace; font-size:16px; padding:8px 4px; border-radius:4px; background:rgba(0,0,0,.3); border:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.4); }
.phys-cell.called { background:rgba(201,168,76,.25); border-color:var(--gold,#c9a84c); color:var(--gold2,#e8c96a); font-weight:700; }
.phys-cell.free { background:rgba(201,168,76,.15); border-color:var(--gold,#c9a84c); color:var(--gold2,#e8c96a); }
.phys-cell.winner-cell { background:rgba(75,175,80,.3); border-color:#4caf50; color:#4caf50; }
