@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,700&display=swap');

:root {
  /* ── DartUP Brand Tokens ── */
  --brand-blue:      #007BFF;
  --brand-cyan:      #00D1FF;
  --brand-black:     #0A0A0A;

  /* ── Surfaces ── */
  --bg:              #0A0A0A;
  --card:            #141414;
  --surface:         #1A1A1A;
  --surface-2:       #222222;
  --surface-3:       #2C2C2C;

  /* ── Text ── */
  --text:            #FFFFFF;
  --text-secondary:  #CBD5E1;
  --muted:           #64748B;

  /* ── Borders ── */
  --border:          rgba(255,255,255,.09);
  --border-strong:   rgba(255,255,255,.18);

  /* ── Semantic ── */
  --primary:         #007BFF;
  --primary-dark:    #005FD4;
  --primary-glow:    rgba(0,123,255,.22);
  --accent:          #00D1FF;
  --accent-dark:     #00A8CC;
  --accent-glow:     rgba(0,209,255,.18);
  --success:         #22C55E;
  --success-bg:      rgba(34,197,94,.12);
  --warning:         #F59E0B;
  --warning-bg:      rgba(245,158,11,.12);
  --error:           #EF4444;
  --error-bg:        rgba(239,68,68,.12);

  /* ── Navigation ── */
  --nav-h:           56px;
  --nav-bg:          #0A0A0A;
  --nav-border:      rgba(255,255,255,.08);
  --nav-text:        #94A3B8;
  --nav-text-active: #FFFFFF;
  --nav-accent:      #007BFF;

  /* ── Typography ── */
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  ui-monospace, 'SF Mono', Menlo, monospace;
}
body {
  margin: 0;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: 1260px;
  margin: 20px auto 40px;
  padding: 0 16px;
}
.container.narrow { max-width: 960px; }
h1, h2, h3 { margin-top: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Legacy page-nav (kept for TV/referee pages that don't use _nav.html) ── */
.page-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: #0A0A0A;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.page-nav.sticky { position: sticky; top: 0; z-index: 20; }

/* ╔══════════════════════════════════════════════════════════════╗
   ║  APP NAV — nouvelle barre de navigation unifiée             ║
   ╚══════════════════════════════════════════════════════════════╝ */

.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  height: var(--nav-h);
}
.app-nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 20px;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
}

/* Brand */
.app-nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 12px;
}
.app-nav-logo {
  display: block;
  height: 32px;
  width: auto;
  /* Préserve le rendu SVG net à toutes densités */
  image-rendering: crisp-edges;
}
/* Conserver ces classes pour compatibilité si elles trainent en HTML */
.app-nav-icon { display: none; }
.app-nav-name { display: none; }
.app-nav-brand:hover { text-decoration: none; opacity: .82; }

/* Context chip (tournament pages) */
.app-nav-ctx {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  min-width: 0;
  overflow: hidden;
}
.app-nav-ctx-sep {
  color: var(--nav-border);
  font-size: 1.2rem;
  opacity: .6;
  flex-shrink: 0;
}
.app-nav-ctx-name {
  color: #CBD5E1;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.app-nav-ctx-name:hover { color: #fff; text-decoration: none; }
.app-nav-ctx-badge {
  background: rgba(0,123,255,.18);
  color: #66B3FF;
  border: 1px solid rgba(0,123,255,.28);
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Drawer (desktop = horizontal flex, mobile = vertical slide) */
.app-nav-drawer {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav-drawer::-webkit-scrollbar { display: none; }

.app-nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748B;
  padding: 0 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.app-nav-divider {
  width: 1px;
  height: 20px;
  background: var(--nav-border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Links */
.app-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--nav-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s, color .14s;
  flex-shrink: 0;
  position: relative;
}
.app-nav-link svg { opacity: .7; flex-shrink: 0; }
.app-nav-link:hover {
  background: rgba(255,255,255,.08);
  color: var(--nav-text-active);
  text-decoration: none;
}
.app-nav-link:hover svg { opacity: 1; }
.app-nav-link.active {
  background: rgba(0,123,255,.15);
  color: #00D1FF;
}
.app-nav-link.active svg { opacity: 1; }
.app-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--nav-accent);
}
.app-nav-link--tv { color: #22C55E; }
.app-nav-link--tv:hover { background: rgba(134,239,172,.12); color: #4ADE80; }
.app-nav-link--tv svg { color: #22C55E; }
.app-nav-ext-icon { font-size: .7rem; opacity: .6; margin-left: 1px; }

/* User area */
.app-nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 12px;
}
.app-nav-user-name {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  padding: 4px 10px 4px 4px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.1);
  transition: background .14s;
}
.app-nav-user-name:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.app-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nav-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.app-nav-user-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--nav-text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav-user-name.active .app-nav-user-label { color: #fff; }
.app-nav-admin-badge {
  background: rgba(250,204,21,.2);
  color: #fde047;
  border: 1px solid rgba(250,204,21,.35);
  border-radius: 10px;
  font-size: .62rem;
  font-weight: 700;
  padding: 1px 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.app-nav-logout {
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--nav-text);
  padding: 5px 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .14s, color .14s;
}
.app-nav-logout:hover { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.3); }
.app-nav-signin {
  font-size: .82rem;
  font-weight: 600;
  color: var(--nav-text);
  background: rgba(0,123,255,.20);
  border: 1px solid rgba(0,123,255,.32);
  border-radius: 8px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background .14s;
}
.app-nav-signin:hover { background: rgba(0,123,255,.32); text-decoration: none; color: #fff; }

/* Burger (hidden on desktop) */
.app-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}
.app-nav-burger span {
  display: block;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s, width .2s;
  width: 100%;
}
.app-nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.app-nav-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.app-nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.app-nav-burger:hover { background: rgba(255,255,255,.08); }

/* Body offset for sticky nav */
body { padding-top: 0; }

/* ── Responsive nav ────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-nav { height: var(--nav-h); }
  .app-nav-inner { padding: 0 14px; }
  .app-nav-ctx-name { max-width: 120px; }
  .app-nav-ctx-badge { display: none; }
  .app-nav-burger { display: flex; order: 10; }
  .app-nav-user { order: 9; }
  .app-nav-user-label { display: none; }
  .app-nav-admin-badge { display: none; }

  .app-nav-drawer {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #0A0A0A;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 16px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 99;
    border-top: 1px solid var(--nav-border);
  }
  .app-nav-drawer.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  .app-nav-link {
    width: 100%;
    padding: 10px 14px;
    font-size: .9rem;
    border-radius: 10px;
  }
  .app-nav-link.active::after { display: none; }
  .app-nav-section-label { padding: 8px 14px 4px; }
  .app-nav-divider { width: 100%; height: 1px; margin: 6px 0; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.top-align { align-items: start; }
.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 10px; }
input, textarea, button, select { font: inherit; }
input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #1A1A1A;
  color: #FFFFFF;
}
textarea { resize: vertical; }
button, .button-link {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-block;
}
button.secondary { background: #374151; }
button.danger { background: var(--error); }
button:hover, .button-link:hover { opacity: 0.92; text-decoration: none; box-shadow: 0 0 0 3px var(--primary-glow); }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr.qualified { background: rgba(34,197,94,.08); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-box {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.stat-box strong { font-size: 20px; }
.flash {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #fff;
}
.flash.success { background: var(--success); }
.flash.warning { background: var(--warning); }
.flash.error { background: var(--error); }
.flash.info { background: #374151; }
.inline-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
}
.inline-note.warning { background: var(--warning-bg); color: var(--warning); }
.inline-note.error { background: var(--error-bg); color: var(--error); }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
}
.badge.recommended { background: var(--success); }
.badge.possible { background: var(--warning); }
.badge.invalid { background: var(--error); }
.status-line {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.hint, .muted { color: var(--muted); }
.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-form input { max-width: 88px; }
.wide-form input { max-width: 72px; }
.group-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.group-tile {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.group-tile.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.match-card {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 8px;
}
.match-card.match-done { background:rgba(34,197,94,.07); border-color:rgba(34,197,94,.35); }
.match-card.match-ready { background:#1A1A1A; border-color:var(--primary); }
.match-players { display:grid; gap:4px; }
.match-player { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:5px 8px; border-radius:6px; background:rgba(0,0,0,.03); font-size:.95rem; }
.match-player strong { font-size:1.1rem; font-weight:900; flex-shrink:0; }
.match-player.match-winner { background:rgba(34,197,94,.1); font-weight:700; }
.match-player.match-loser { opacity:.55; }
.match-locked-hint { font-size:.8rem; color:#F59E0B; background:rgba(245,158,11,.10); border:1px solid rgba(245,158,11,.25); border-radius:6px; padding:5px 8px; }
.match-edit-details summary { font-size:.85rem; color:var(--primary); cursor:pointer; font-weight:600; }
.match-edit-details[open] summary { margin-bottom:4px; }
.small-btn { padding:5px 10px; font-size:.82rem; }
.board-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.board-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #141414;
  display: grid;
  gap: 8px;
}
.board-card.board-free { background: #141414; }
.board-card.board-assigned,
.board-card.board-in_progress { background: rgba(0,123,255,.08); }
.board-match-title { font-weight: 700; }
.ctrl-score-form { display:grid; gap:10px; }
.ctrl-score-row { display:flex; align-items:center; gap:10px; }
.ctrl-score-player { flex:1; display:grid; gap:4px; min-width:0; }
.ctrl-score-name { font-weight:700; font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ctrl-score-input { width:100%; font-size:1.5rem; font-weight:900; text-align:center; border:2px solid var(--border); border-radius:8px; padding:6px 4px; }
.ctrl-score-input:focus { border-color:var(--primary); outline:none; box-shadow: 0 0 0 3px var(--primary-glow); }
.ctrl-score-sep { font-size:1.4rem; font-weight:900; color:var(--muted); flex-shrink:0; }
.inline-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-space { margin-top: 10px; }
.center { text-align: center; }
.center-form { display: flex; justify-content: center; margin: 12px 0; }
.referee-body {
  background: #0A0A0A;
  color: #fff;
}
.referee-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 36px;
}
.referee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.referee-card {
  background: #121212;
  border-color: #F0F0F0;
  color: #fff;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  color: #94A3B8;
  margin-bottom: 8px;
}
.referee-players {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 24px 0;
}
.referee-player {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 14px;
  padding: 22px 12px;
}
.versus {
  font-size: 18px;
  color: #94A3B8;
}
.score-grid {
  display: grid;
  gap: 16px;
}
.score-grid label {
  display: grid;
  gap: 8px;
}
.score-grid span {
  font-weight: 700;
}
.score-grid input {
  font-size: 30px;
  text-align: center;
  padding: 18px 12px;
}
.big-button {
  font-size: 20px;
  padding: 16px;
}
@media (max-width: 900px) {
  .grid-2, .grid-form, .stats-grid {
    grid-template-columns: 1fr;
  }
  .page-nav { position: static; }
  .referee-players { grid-template-columns: 1fr; }
  .versus { text-align: center; }
}

.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}.mini-progress{margin:.5rem 0;color:#64748B;font-size:.92rem}.referee-side{text-align:center;flex:1}.leg-score{font-size:2.2rem;font-weight:800}.visit-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}.visit-form{display:flex;flex-direction:column;gap:.5rem}.visit-row{display:flex;gap:.5rem}.visit-row input{flex:1}.quick-buttons{display:flex;flex-wrap:wrap;gap:.4rem;margin:1rem 0}.quick-buttons form{margin:0}.visit-history{margin-top:1rem}.win-leg-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:1rem}.legs-strip{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem}.leg-chip{padding:.6rem .8rem;border-radius:12px;background:#CBD5E1;display:flex;flex-direction:column;gap:.2rem}.leg-chip.completed{background:#dcfce7}.leg-chip.active{background:rgba(0,123,255,.18)}.tv-body{background:#0A0A0A;color:#CBD5E1}.tv-wrap{max-width:1400px;margin:0 auto;padding:1.5rem}.tv-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.tv-grid{display:grid;grid-template-columns:2fr 1fr;gap:1rem}.tv-section{background:#121212;color:#e5e7eb}.tv-boards{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.tv-board{border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:1rem;background:#181818}.tv-board.free{opacity:.7}.tv-board-title{font-size:1.2rem;font-weight:700;margin-bottom:.4rem}.tv-match{font-size:1.2rem;margin:.6rem 0}.tv-recent{display:flex;flex-direction:column;gap:.7rem}.recent-line{display:flex;flex-direction:column;gap:.2rem;padding:.7rem;border-radius:12px;background:#181818}.with-scores{align-items:center}.versus.block{display:flex;flex-direction:column;gap:.4rem}.center{text-align:center}@media (max-width: 900px){.visit-grid,.win-leg-grid,.tv-grid,.tv-boards{grid-template-columns:1fr}}

/* V7 tablet referee UI */
.tablet-body { background: linear-gradient(180deg,#080808 0%,#0A0A0A 100%); color:#e5eefb; min-height:100vh; }
.tablet-shell { max-width: 1380px; margin:0 auto; padding:18px; }
.tablet-topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.tablet-subtitle { margin:.25rem 0 0; color:#94A3B8; }
.tablet-top-actions { display:flex; gap:.75rem; align-items:center; }
.live-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.5rem .8rem; border-radius:999px; background:#1A1A1A; color:#94A3B8; font-weight:700; }
.live-badge.connected { background:#083344; color:#99f6e4; }
.tablet-main-grid { display:grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, .9fr); gap:16px; }
.tablet-scoreboard, .tablet-side-panel, .tablet-empty, .tv-panel { background: #121212; border:1px solid var(--border-strong); border-radius:22px; box-shadow:0 20px 45px rgba(2,6,23,.28); }
.tablet-phase-row, .score-entry-header, .tv-board-top, .tv-bottom-row { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.mini-badges { display:flex; gap:.5rem; flex-wrap:wrap; }
.mini-badge { display:inline-flex; align-items:center; border-radius:999px; background:#001A40; color:#CCE5FF; padding:.45rem .75rem; font-size:.92rem; font-weight:700; }
.tablet-versus-grid { display:grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); gap:16px; margin:16px 0 14px; align-items:stretch; }
.player-panel { background: #141414; border:1px solid rgba(148,163,184,.16); border-radius:24px; padding:18px; display:flex; flex-direction:column; gap:12px; min-height:310px; }
.player-panel.current-turn { outline:3px solid rgba(34,197,94,.55); }
.player-headline { display:flex; gap:.75rem; align-items:center; }
.player-headline.right-align { justify-content:flex-end; }
.player-headline h2 { margin:0; font-size:1.75rem; line-height:1.1; }
.throw-indicator { width:18px; height:18px; border-radius:50%; background:#1E1E1E; box-shadow:0 0 0 6px rgba(51,65,85,.3); }
.throw-indicator.active { background:#22c55e; box-shadow:0 0 0 10px rgba(34,197,94,.15); }
.remaining-wrap { display:grid; gap:.3rem; justify-items:center; margin-top:.35rem; }
.remaining-caption { color:#94A3B8; text-transform:uppercase; letter-spacing:.08em; font-size:.78rem; }
.remaining-wrap strong { font-size:5.25rem; line-height:1; letter-spacing:-.05em; }
.leg-score-wrap { display:flex; justify-content:space-between; align-items:center; background:#0A0A0A; border:1px solid rgba(148,163,184,.14); border-radius:18px; padding:12px 14px; }
.leg-score-wrap strong { font-size:2.1rem; }
.winner-button { margin-top:auto; width:100%; padding:18px 16px; border-radius:18px; background:linear-gradient(135deg,#007BFF,#005FD4); font-weight:700; font-size:1.05rem; }
.tablet-center-col { display:flex; flex-direction:column; justify-content:center; gap:12px; align-items:stretch; }
.versus-badge { display:flex; align-items:center; justify-content:center; width:88px; height:88px; margin:0 auto; border-radius:50%; background:#1A1A1A; border:1px solid rgba(148,163,184,.18); font-size:1.4rem; font-weight:800; }
.primary-button { background:linear-gradient(135deg,#007BFF,#005FD4); color:#fff; border:0; border-radius:16px; padding:14px 18px; font-weight:700; display:inline-flex; justify-content:center; align-items:center; }
.primary-button.large { min-height:64px; }
.primary-button.huge { min-height:74px; font-size:1.1rem; min-width:220px; }
.ghost-button { background:#141414; border:1px solid rgba(148,163,184,.2); color:#e5eefb; border-radius:14px; padding:12px 14px; }
.ghost-button.warning { background:rgba(245,158,11,.12); }
.ghost-button.danger { background:rgba(239,68,68,.12); }
.action-stack.compact { display:grid; gap:10px; }
.score-entry-zone { margin-top:8px; background:#0C0C0C; border:1px solid rgba(148,163,184,.14); border-radius:22px; padding:16px; }
.selector-group { display:flex; gap:.55rem; }
.selector-button { border-radius:999px; padding:10px 18px; background:#141414; color:#d8e2f2; border:1px solid rgba(148,163,184,.16); }
.selector-button.active { background:#007BFF; color:#fff; }
.score-display-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; margin:14px 0; }
.points-display { text-align:center; font-size:3.2rem; font-weight:800; padding:14px 16px; border-radius:20px; background:rgba(0,123,255,.12); color:#FFFFFF; }
.quick-pad { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:10px; }
.pad-button { min-height:58px; border-radius:16px; background:#141414; border:1px solid rgba(148,163,184,.18); color:#fff; font-size:1.05rem; font-weight:700; }
.visit-timeline { display:grid; gap:10px; max-height:360px; overflow:auto; padding-right:4px; }
.visit-line { display:grid; grid-template-columns:60px 1fr auto; gap:10px; align-items:center; padding:12px 14px; border-radius:16px; background:#101010; border:1px solid rgba(148,163,184,.12); }
.visit-line.bust { background:#311417; border-color:rgba(239,68,68,.25); }
.visit-index { color:#94A3B8; font-weight:700; }
.visit-player { font-weight:600; }
.visit-points { font-size:1.15rem; }
.legs-ribbon { display:grid; gap:10px; margin-top:10px; }
.leg-pill { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:16px; background:#101010; border:1px solid rgba(148,163,184,.12); }
.leg-pill.done { background:#052e2b; }
.leg-pill.live { background:rgba(0,123,255,.18); }

/* V7 TV */
.v7-tv { min-height:100vh; background:radial-gradient(circle at top, #101010 0%, #080808 55%, #050505 100%); }
.tv-screen { max-width:1550px; margin:0 auto; padding:22px; }
.tv-hero { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:18px; }
.tv-hero h1 { font-size:2.7rem; margin-bottom:.25rem; }
.tv-kpis { display:grid; grid-template-columns:repeat(4, minmax(150px,1fr)); gap:12px; }
.tv-kpi { background:rgba(15,23,42,.92); border:1px solid rgba(148,163,184,.16); border-radius:20px; padding:16px; min-width:150px; }
.tv-kpi span { display:block; color:#94A3B8; font-size:.9rem; margin-bottom:8px; }
.tv-kpi strong { font-size:2rem; }
.tv-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(340px,.9fr); gap:18px; }
.tv-panel-primary { min-height:70vh; }
.tv-board-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.tv-board-card { background:#0A0A0A; border:1px solid rgba(148,163,184,.16); border-radius:20px; padding:16px; min-height:180px; display:flex; flex-direction:column; justify-content:space-between; }
.tv-board-card.idle { opacity:.76; }
.tv-board-card.in_progress { border-color:rgba(0,123,255,.45); box-shadow:0 0 0 2px rgba(0,123,255,.12); }
.tv-match-body { display:grid; gap:12px; margin:14px 0; }
.tv-player-line { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; font-size:1.25rem; }
.tv-player-line strong { font-size:2rem; }
.tv-big-placeholder { display:flex; align-items:center; justify-content:center; flex:1; font-size:2rem; color:#94A3B8; }
.tv-recent-list { display:grid; gap:10px; }
.tv-recent-line { padding:12px 14px; border-radius:16px; background:#0A0A0A; border:1px solid rgba(148,163,184,.12); display:grid; gap:6px; }
.tv-side-stack { display:grid; gap:16px; }

@media (max-width: 1180px) {
  .tablet-main-grid, .tv-layout { grid-template-columns:1fr; }
  .tablet-versus-grid { grid-template-columns:1fr; }
  .tablet-center-col { order:-1; }
  .quick-pad { grid-template-columns:repeat(4, minmax(0,1fr)); }
  .tv-board-grid, .tv-kpis { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .tablet-shell, .tv-screen { padding:12px; }
  .tablet-topbar, .tv-hero { flex-direction:column; }
  .score-display-row { grid-template-columns:1fr; }
  .quick-pad { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .remaining-wrap strong { font-size:4rem; }
  .tv-board-grid, .tv-kpis { grid-template-columns:1fr; }
}


/* V7.2 - TV single-page layout */
.tv-body.v7-tv { overflow:hidden; }
.tv-screen { height:100vh; max-width:none; padding:16px 18px; box-sizing:border-box; display:grid; grid-template-rows:auto minmax(0,1fr); gap:14px; overflow:hidden; }
.tv-hero { margin-bottom:0; min-height:0; }
.tv-hero h1 { font-size:2.2rem; line-height:1.05; }
.tv-hero .hint { font-size:.95rem; max-width:900px; }
.tv-kpis { align-self:start; }
.tv-kpi { padding:12px 14px; border-radius:18px; }
.tv-kpi strong { font-size:1.55rem; }
.tv-layout { min-height:0; height:100%; grid-template-columns:minmax(0,2.2fr) minmax(300px,.85fr); gap:14px; }
.tv-panel { padding:14px; min-height:0; overflow:hidden; }
.tv-panel h2 { font-size:1.2rem; margin-bottom:.35rem; }
.tv-panel-primary { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); }
.tv-board-grid { min-height:0; height:100%; grid-template-columns:repeat(2, minmax(0,1fr)); grid-auto-rows:1fr; gap:12px; align-content:stretch; }
.tv-board-card { min-height:0; padding:14px; border-radius:18px; }
.tv-board-top { font-size:.95rem; }
.tv-board-top strong { font-size:1.05rem; }
.tv-match-body { gap:10px; margin:10px 0; }
.tv-player-line { font-size:1.08rem; }
.tv-player-line strong { font-size:1.7rem; line-height:1; }
.tv-bottom-row { font-size:.92rem; color:#94A3B8; }
.tv-big-placeholder { font-size:1.45rem; }
.tv-side-stack { min-height:0; grid-template-rows:minmax(0,1fr) auto; }
.tv-side-stack .tv-panel:first-child { display:grid; grid-template-rows:auto minmax(0,1fr); }
.tv-recent-list { min-height:0; overflow:hidden; align-content:start; }
.tv-recent-line { padding:10px 12px; border-radius:14px; gap:4px; }
.tv-recent-line span { font-size:.86rem; color:#94A3B8; }
.tv-recent-line strong { font-size:.98rem; line-height:1.2; }
.tv-screen.density-compact .tv-board-grid { grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.tv-screen.density-compact .tv-board-card { padding:12px; }
.tv-screen.density-compact .tv-player-line { font-size:.98rem; }
.tv-screen.density-compact .tv-player-line strong { font-size:1.45rem; }
.tv-screen.density-compact .tv-big-placeholder { font-size:1.2rem; }
.tv-screen.density-tight .tv-layout { grid-template-columns:minmax(0,2.55fr) minmax(260px,.7fr); }
.tv-screen.density-tight .tv-board-grid { grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.tv-screen.density-tight .tv-board-card { padding:10px 11px; border-radius:16px; }
.tv-screen.density-tight .tv-board-top { font-size:.84rem; }
.tv-screen.density-tight .tv-player-line { font-size:.9rem; gap:8px; }
.tv-screen.density-tight .tv-player-line strong { font-size:1.25rem; }
.tv-screen.density-tight .tv-match-body { gap:7px; margin:7px 0; }
.tv-screen.density-tight .tv-bottom-row { font-size:.8rem; }
.tv-screen.density-tight .tv-big-placeholder { font-size:1.05rem; }
.tv-screen.density-tight .tv-recent-line { padding:8px 10px; }
@media (max-width: 1280px) {
  .tv-screen { padding:12px; gap:10px; }
  .tv-hero h1 { font-size:1.8rem; }
  .tv-kpis { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .tv-layout { grid-template-columns:minmax(0,1fr) 280px; gap:10px; }
  .tv-board-grid { gap:10px; }
}
@media (max-width: 1024px) {
  .tv-body.v7-tv { overflow:auto; }
  .tv-screen { height:auto; overflow:visible; }
}


/* V7.3 */
.flash.toast{position:fixed;top:12px;right:12px;z-index:2000;max-width:min(420px,calc(100vw - 24px));box-shadow:0 16px 40px rgba(2,6,23,.35)}
.tablet-shell.v73-referee{padding-top:12px}
.tablet-shell.v73-referee .tablet-topbar{display:none}
.v73-tv .tv-hero.compact-only{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px}
.v73-tv .tv-hero.compact-only h1{font-size:1.75rem;margin:0;line-height:1.05}
.v73-tv .compact-kpis{grid-template-columns:repeat(4,minmax(110px,1fr));gap:8px}
.v73-tv .compact-kpis .tv-kpi{padding:10px 12px;border-radius:14px;min-width:110px}
.v73-tv .compact-kpis .tv-kpi strong{font-size:1.2rem}
.v73-tv .tv-layout-full,.v73-tv .tv-panel-full{height:100%}
.v73-tv .compact-title-row h2{font-size:1.05rem}
.v73-grid{grid-template-columns:1fr;gap:10px;align-content:start}
.tv-tile{background:linear-gradient(180deg,#121212,#0A0A0A);border:1px solid rgba(148,163,184,.18);border-radius:12px;padding:10px 12px;display:grid;gap:8px;min-height:0}
.tv-tile.in_progress{border-color:rgba(0,123,255,.55);box-shadow:0 0 0 3px rgba(0,123,255,.18)}
.tv-tile-top{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:.95rem}
.tv-context{color:#66B3FF;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-players{display:grid;gap:6px}
.tv-player-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);align-items:center;gap:12px;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.03)}
.tv-player-row.active{background:rgba(0,209,255,.10);border:1px solid rgba(0,209,255,.30)}
.tv-name-wrap{display:flex;align-items:center;gap:10px;min-width:0}
.tv-turn-dot{width:10px;height:10px;border-radius:999px;background:transparent;border:1px solid rgba(148,163,184,.35);flex:0 0 auto}
.tv-turn-dot.active{background:#22c55e;border-color:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}
.tv-player-name{font-size:1.25rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tv-stat{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-radius:8px;background:#070707;font-size:.95rem;font-weight:700}
.tv-stat.score{font-size:1.05rem}
.tv-idle-body{display:flex;align-items:center;justify-content:center;min-height:86px;color:#94A3B8;font-size:1.2rem}
.tv-screen-v73.density-compact .tv-player-name{font-size:1.1rem}
.tv-screen-v73.density-compact .tv-stat{font-size:.85rem;padding:6px 8px}
.tv-screen-v73.density-tight .tv-hero.compact-only h1{font-size:1.4rem}
.tv-screen-v73.density-tight .tv-player-row{grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);padding:6px 8px}
.tv-screen-v73.density-tight .tv-player-name{font-size:1rem}
.tv-screen-v73.density-tight .tv-stat{font-size:.8rem;padding:5px 7px}
.tv-screen-v73.density-tight .tv-tile{padding:8px 10px;gap:6px}
@media (max-width: 1200px){.v73-tv .tv-hero.compact-only{grid-template-columns:1fr}.v73-tv .compact-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tv-player-row{grid-template-columns:1fr}.tv-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

button.success { background: #2f855a; }
.board-card a, .group-tile { word-break: break-all; }

.cricket-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}
.cricket-target{min-height:64px;font-size:1.15rem}
.cricket-score-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 12px}
.cricket-score-box{background:#141414;color:#fff;border-radius:14px;padding:10px 14px;display:flex;justify-content:space-between;align-items:center}
.cricket-marks-table{display:grid;gap:8px}
.cricket-mark-row{display:grid;grid-template-columns:56px 1fr 1fr;gap:10px;align-items:center;font-size:1rem}
@media (max-width: 1024px){.cricket-grid{grid-template-columns:repeat(4,1fr)}}


.sr-status-row{display:flex;justify-content:flex-end;align-items:center;gap:.75rem;margin:0 0 .5rem 0}.sync-badge{font-size:.85rem;opacity:.8}.sync-badge.connected{opacity:1;font-weight:700}.ghost-button.compact{padding:.35rem .7rem;font-size:.85rem}


.cricket-turn-builder{display:flex;flex-direction:column;gap:12px;margin-top:12px}.cricket-turn-head{display:flex;justify-content:space-between;align-items:center}.cricket-darts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.cricket-dart-card{border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:10px;background:rgba(255,255,255,.03)}.dart-multiplier-group{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.cricket-dart-card .cricket-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.cricket-dart-summary{margin-top:8px;display:inline-flex}@media (max-width:1100px){.cricket-darts-grid{grid-template-columns:1fr}}


/* V9.5.6 – responsive referee layout for smartphone landscape / tablet portrait */
.tv-game-badge{display:inline-flex;align-self:flex-start;margin:8px 0 10px;padding:4px 10px;border-radius:999px;background:#141414;border:1px solid var(--border);color:#94A3B8;font-size:.78rem;font-weight:700;letter-spacing:.06em}
.tv-players-stacked{display:grid;gap:10px}
.tv-center-divider{display:flex;justify-content:center;align-items:center}
.tv-center-divider span{padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.08);font-size:.8rem;color:#94A3B8}
.tv-cricket-track{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:center;padding:8px 0}
.tv-cricket-targets,.tv-cricket-icons{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;align-items:center}
.tv-cricket-targets span{display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.8rem;color:#94A3B8;background:rgba(255,255,255,.06);border-radius:999px;padding:4px 0}
.mark-icon{display:flex;align-items:center;justify-content:center;height:24px;border-radius:999px;font-weight:700;background:rgba(255,255,255,.06);color:#94A3B8}
.mark-icon.single{color:#fde68a}
.mark-icon.double{color:#141414}
.mark-icon.closed{color:#22C55E;border:1px solid rgba(134,239,172,.45)}
.mark-icon.empty{opacity:.45}

@media (max-width: 1180px), (orientation: portrait) and (max-width: 1024px), (orientation: landscape) and (max-height: 540px) {
  .tablet-shell{padding:10px}
  .tablet-main-grid{grid-template-columns:1fr;gap:10px}
  .tablet-side-panel{order:2}
  .tablet-scoreboard{order:1}
  .tablet-versus-grid{grid-template-columns:minmax(0,1fr) 116px minmax(0,1fr);gap:8px;align-items:stretch}
  .player-panel{padding:10px}
  .player-panel h2{font-size:1.05rem;margin:0}
  .remaining-caption,.leg-score-wrap span{font-size:.72rem}
  .remaining-wrap strong{font-size:2rem;line-height:1}
  .leg-score-wrap strong{font-size:1.5rem}
  .winner-button{padding:8px 10px;font-size:.85rem}
  .mini-badge{font-size:.72rem;padding:4px 8px}
  .tablet-phase-row{gap:8px;align-items:start}
  .tablet-phase-row .mini-badges{gap:6px}
  .score-entry-zone{padding-top:8px}
  .score-display-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
  .points-display{min-height:56px;font-size:1.75rem;padding:8px 10px}
  .primary-button.huge{min-height:56px;padding:10px 14px;font-size:1rem}
  .quick-pad{grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
  .pad-button{padding:10px 0;font-size:.92rem}
  .action-stack.compact{gap:6px}
  .action-stack.compact .ghost-button{padding:8px 10px;font-size:.78rem}
  .visit-timeline{max-height:180px;overflow:auto}
  .legs-ribbon{display:flex;flex-wrap:wrap;gap:6px}
}

@media (orientation: landscape) and (max-height: 540px) {
  .tablet-body{overflow:auto}
  .tablet-shell.v73-referee{padding:8px;max-width:none}
  .tablet-scoreboard.card,.tablet-side-panel.card{padding:10px}
  .tablet-phase-row{margin-bottom:6px}
  .tablet-center-col{gap:8px}
  .versus-badge{font-size:.95rem}
  .primary-button.large{padding:10px 8px;font-size:.95rem}
  .selector-button{padding:8px 10px;font-size:.8rem}
  .cricket-turn-builder{gap:8px;margin-top:8px}
  .cricket-darts-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .cricket-dart-card{padding:8px}
  .cricket-dart-card .cricket-grid{gap:4px}
  .cricket-target{min-height:42px;font-size:.9rem;padding:0}
  .cricket-dart-summary{font-size:.72rem}
}

@media (orientation: portrait) and (max-width: 1024px) {
  .tablet-body{overflow:auto}
  .tablet-shell.v73-referee{max-width:860px;margin:0 auto}
  .tablet-versus-grid{grid-template-columns:minmax(0,1fr) 132px minmax(0,1fr)}
  .quick-pad{grid-template-columns:repeat(5,minmax(0,1fr))}
  .cricket-darts-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* V9.6 scoring redesign */
.scoring-body {
  margin: 0;
  min-height: 100vh;
  background: #1b1b1b;
  color: #f7f3ea;
  font-family: var(--font);
}
.scoring-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(135deg, rgba(255,255,255,.03) 25%, transparent 25%) -16px 0/32px 32px,
    linear-gradient(225deg, rgba(255,255,255,.03) 25%, transparent 25%) -16px 0/32px 32px,
    linear-gradient(315deg, rgba(255,255,255,.03) 25%, transparent 25%) 0px 0/32px 32px,
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%) 0px 0/32px 32px,
    #212121;
}
.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: #ece8e2;
  color: #3d3d3d;
}
.score-header-left, .score-header-right { display: flex; align-items: center; gap: 10px; }
.header-square {
  width: 46px; height: 46px; border-radius: 12px; background: #dacdad; color: #3d3d3d;
  display: grid; place-items: center; font-weight: 700;
}
.header-square.ghost { background: #d9ccb0; }
.header-title-row { display: flex; align-items: baseline; gap: 10px; }
.header-title-row strong { font-size: 34px; letter-spacing: .03em; }
.header-meta { font-size: 18px; color: #8c8882; font-weight: 700; }
.header-subtitle { font-size: 13px; color: #7b7670; }
.header-icon-button {
  border: 1px solid rgba(0,0,0,.15); background: #efe7d7; color: #444; border-radius: 10px;
  min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 0 12px;
}
.sync-badge.dark { background: #2f2f2f; color: #fff; }
.dart-indicators { display: flex; gap: 8px; }
.dart-pill {
  min-width: 62px; padding: 8px 10px; border-radius: 10px; background: #343434; color: #fff; text-align: center; font-weight: 700;
}
.score-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}
.scoreboard-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 180px;
}
.score-player {
  position: relative;
  padding: 16px 18px 56px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.score-player-left { background: #c52d2d; }
.score-player-right { background: #424242; }
.score-player.active-turn::after {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 12px solid #ece8e2;
}
.score-player-top { display: flex; justify-content: space-between; align-items: center; }
.score-player-top.right { justify-content: space-between; }
.mini-state {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.82);
}
.mini-legs-box { display: grid; justify-items: center; border: 1px solid rgba(255,255,255,.5); padding: 2px 10px; min-width: 54px; }
.mini-legs-box span { font-size: 11px; opacity: .8; }
.mini-legs-box strong { font-size: 26px; line-height: 1; }
.score-player-name { font-size: 30px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.score-player-main { font-size: clamp(80px, 13vw, 150px); line-height: .9; font-weight: 700; }
.score-player-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 16px; background: #111; color: #fff;
  display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 14px;
}
.score-player-bottom strong { font-size: 28px; line-height: 1; }
.v96-winner {
  position: absolute; right: 12px; bottom: 52px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.26);
  color: #fff;
}
.scoring-zone {
  min-height: 0;
  background: #ded6c8;
  color: #393939;
}
.x01-screen {
  display: grid;
  grid-template-columns: 140px 1fr 180px 300px;
  min-height: 0;
}
.x01-side-actions {
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  gap: 8px;
  padding: 12px;
  background: #dfd6c5;
  border-right: 1px solid rgba(0,0,0,.12);
}
.quick-chip, .cricket-target-v96, .pad-button.big {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.14);
  color: #3b3b3b;
}
.disabled-chip { opacity: .45; }
.x01-keypad-wrap { padding: 0; }
.x01-keypad {
  display: grid; height: 100%;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr);
}
.pad-button.big {
  border-radius: 0; font-size: clamp(42px, 6vw, 72px); background: #ebe4d6; min-height: 0;
}
.pad-button.big.wide { grid-column: span 2; }
.x01-entry-panel {
  display: grid; grid-template-rows: auto auto 1fr auto; min-height: 0;
  background: #e6dfd1; border-left: 1px solid rgba(0,0,0,.12);
}
.x01-inline-tools {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #dfd6c5;
  border-left: 1px solid rgba(0,0,0,.12);
}
.inline-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 0;
  font-size: 1.02rem;
  font-weight: 700;
  padding: 16px 14px;
}
.compact-footer-actions {
  justify-content: flex-end;
}
.entry-mode-label {
  padding: 18px 16px 8px; font-size: 18px; letter-spacing: .05em; text-transform: uppercase; color: #54514b;
}
.selector-group.stacked { display: flex; gap: 8px; padding: 0 16px 12px; }
.selector-group.no-bg .selector-button { background: #ddd1b5; color: #403c36; }
.selector-group.no-bg .selector-button.active { background: #c52d2d; color: #fff; }
.entry-score-card {
  display: grid; align-content: center; justify-items: center; gap: 6px; padding: 14px; background: #eca823; color: #303030;
}
.points-display.v96 {
  width: 100%; background: transparent; border: 0; text-align: center; font-size: clamp(70px, 9vw, 120px); font-weight: 700; color: #2f2f2f;
}
.entry-caption { font-size: clamp(22px, 2.8vw, 32px); letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.entry-cta {
  margin: 0; border-radius: 0; background: #eca823; color: #303030; font-size: 32px; font-weight: 700; letter-spacing: .04em; min-height: 90px;
}
.cricket-screen {
  display: grid; grid-template-columns: 1.2fr .95fr; min-height: 0;
}
.cricket-board-v96 {
  display: grid; grid-template-rows: auto 1fr; background: #404040; color: #fff; border-right: 1px solid rgba(255,255,255,.1);
}
.cricket-board-head, .cricket-row-v96 {
  display: grid; grid-template-columns: 1fr 120px 1fr;
}
.cricket-board-head {
  background: rgba(0,0,0,.3); text-transform: uppercase; letter-spacing: .08em; font-size: 12px;
}
.cricket-head-col, .cricket-target-center, .cricket-mark-cell { display: grid; place-items: center; }
.cricket-row-v96 { min-height: 66px; border-top: 1px solid rgba(255,255,255,.08); }
.cricket-target-center { background: #e8dfcf; color: #373737; font-size: 36px; font-weight: 700; }
.cricket-mark-cell { font-size: 46px; }
.cricket-mark-cell.left { background: rgba(255,255,255,.03); }
.cricket-mark-cell.right { background: rgba(255,255,255,.06); }
.cricket-input-v96 {
  display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: #dfd6c5;
}
.cricket-input-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; background: #ece8e2;
}
.cricket-turn-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.turn-pill {
  min-width: 72px; background: #373737; color: #fff; border-radius: 8px; padding: 8px 10px; text-align: center; font-weight: 700;
}
.cricket-actions-inline { display: flex; gap: 8px; }
.miss-button { background: #ebe4d6; color: #343434; border: 1px solid rgba(0,0,0,.12); min-width: 88px; }
.cricket-darts-builder {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; min-height: 0;
}
.dart-card-v96 {
  display: grid; grid-template-rows: auto auto 1fr; gap: 8px; background: rgba(255,255,255,.2); border-radius: 14px; padding: 10px;
}
.dart-card-v96.active { box-shadow: 0 0 0 2px #eca823 inset; }
.dart-card-head { font-weight: 700; text-transform: uppercase; color: #514d47; font-size: 12px; letter-spacing: .08em; }
.dart-multiplier-group.compact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dart-multiplier-group.compact .selector-button { padding: 10px 0; }
.cricket-target-grid-v96 {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; align-content: start;
}
.cricket-target-v96 {
  min-height: 48px; background: #eadcb6; font-size: 24px; font-weight: 700; color: #393939;
}
.cricket-target-v96.active { background: #eca823; }
.score-footer-tools {
  display: grid; grid-template-columns: 1.2fr .8fr auto; align-items: center; gap: 10px; padding: 8px 12px; background: #1b1b1b; color: #fff;
}
.history-strip {
  display: flex; gap: 8px; overflow: hidden; align-items: center; min-height: 42px;
}
.visit-pill {
  display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap;
}
.visit-pill.bust { background: rgba(197,45,45,.45); }
.legs-ribbon.v96 { display: flex; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.footer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sc-empty.card {
  max-width: 920px; margin: 20px auto; background: #f4efe7; color: #363636;
}
.sc-topline { color: #7e776d; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.big-action-button { background: #eca823; color: #303030; font-weight: 700; }
.variant-select { max-width: 150px; }
@media (max-width: 1100px) {
  .x01-screen { grid-template-columns: 110px 1fr 150px 250px; }
  .cricket-screen { grid-template-columns: 1fr; }
  .cricket-darts-builder { grid-template-columns: repeat(3, 1fr); }
  .score-footer-tools { grid-template-columns: 1fr; }
}
@media (orientation: portrait) {
  .score-layout { grid-template-rows: auto auto auto; }
  .x01-screen { grid-template-columns: 120px 1fr 140px; grid-template-rows: auto 260px; }
  .x01-entry-panel { grid-column: 1 / span 2; grid-template-columns: 150px 1fr 1fr; grid-template-rows: auto 1fr; }
  .entry-mode-label { grid-column: 1; grid-row: 1; }
  .selector-group.stacked { grid-column: 1; grid-row: 2; flex-direction: column; }
  .entry-score-card { grid-column: 2 / 4; grid-row: 1 / 3; }
  .entry-cta { grid-column: 1 / -1; }
  .x01-inline-tools { grid-column: 3; grid-row: 1 / span 2; }
  .cricket-screen { grid-template-columns: 1fr; }
  .cricket-darts-builder { grid-template-columns: 1fr; max-height: 44vh; overflow: auto; }
}
@media (max-width: 900px) {
  .score-header { padding: 8px 10px; }
  .header-title-row strong { font-size: 24px; }
  .header-meta { font-size: 14px; }
  .dart-pill { min-width: 54px; padding: 6px 8px; }
  .scoreboard-panel { min-height: 150px; }
  .score-player { padding: 12px 12px 46px; }
  .score-player-name { font-size: 18px; }
  .score-player-main { font-size: clamp(48px, 13vw, 80px); }
  .score-player-bottom strong { font-size: 20px; }
  .x01-screen { grid-template-columns: 88px 1fr 130px 190px; }
  .x01-side-actions { padding: 8px; gap: 6px; }
  .quick-chip { padding: 8px 4px; font-size: 14px; }
  .pad-button.big { font-size: clamp(32px, 7vw, 52px); }
  .points-display.v96 { font-size: clamp(46px, 11vw, 72px); }
  .entry-caption { font-size: 18px; }
  .entry-cta { font-size: 22px; min-height: 74px; }
  .x01-inline-tools { padding: 8px; gap: 8px; }
  .inline-tool { font-size: .92rem; padding: 10px 8px; }
  .cricket-board-head, .cricket-row-v96 { grid-template-columns: 1fr 84px 1fr; }
  .cricket-target-center { font-size: 26px; }
  .cricket-mark-cell { font-size: 34px; }
  .cricket-darts-builder { gap: 8px; padding: 8px; }
  .cricket-target-v96 { min-height: 40px; font-size: 20px; }
  .footer-actions { justify-content: stretch; }
}

/* V9.6.1 scoring refinements */
.checkout-banner {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:#7f1d1d; color:#fff; padding:10px 14px; border-bottom:2px solid rgba(255,255,255,.18);
}
.checkout-banner-text { font-size:18px; font-weight:700; letter-spacing:.02em; }
.checkout-banner-btn {
  background:#fecaca; color:#651515; border:0; border-radius:12px; padding:12px 18px; font-weight:800;
}
.score-player-left, .score-player-right { background: #3f3f46; transition: background .15s ease; }
.score-player.active-turn { background:#c52d2d; }
.score-player.active-turn .mini-state { color:#fff; font-weight:700; }
.score-player:not(.active-turn) .mini-state { color:rgba(255,255,255,.65); }

.cricket-darts-builder.compact-v961 { grid-template-columns: 1fr; gap:8px; }
.cricket-active-darts { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.dart-pill-edit {
  border:1px solid rgba(0,0,0,.12); background:#efe7da; color:#343434; border-radius:12px; min-height:58px; font-weight:800;
}
.dart-pill-edit.active { background:#eca823; color:#2f2f2f; }
.dart-card-v96.single-panel { grid-template-rows:auto auto 1fr; }
.dart-multiplier-group.compact.shared { grid-template-columns: repeat(4,1fr); }
.cricket-target-grid-v96.shared { grid-template-columns: repeat(4,1fr); }
.cricket-target-grid-v96.shared .cricket-target-v96 { min-height:64px; font-size:28px; }

@media (max-width: 1100px) {
  .checkout-banner-text { font-size:15px; }
  .checkout-banner-btn { padding:10px 14px; }
  .cricket-target-grid-v96.shared { grid-template-columns: repeat(4,1fr); }
  .cricket-target-grid-v96.shared .cricket-target-v96 { min-height:52px; font-size:22px; }
}

@media (orientation: portrait) {
  .checkout-banner { padding:8px 10px; }
  .cricket-active-darts { grid-template-columns: repeat(3,1fr); }
}

/* V9.6.2 cricket speed tuning */
.speed-chip {
  background:#3f3f46; color:#fff; border:1px solid rgba(255,255,255,.12); min-width:80px; font-weight:800;
}
.cricket-actions-inline { flex-wrap: wrap; justify-content:flex-end; }
.cricket-active-darts .dart-pill-edit { min-height:50px; }
.cricket-target-grid-v96.shared .cricket-target-v96 { min-height:72px; }
@media (max-width: 900px) {
  .speed-chip { min-width:64px; padding:10px 8px; font-size:14px; }
  .cricket-target-grid-v96.shared .cricket-target-v96 { min-height:60px; font-size:24px; }
}


button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button.busy { opacity: .7; }


.leg-variant-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; margin:8px 0 10px; border-radius:14px; background:#171717; border:1px solid #2b2b2b; }
.leg-variant-label { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:#aaa; }
.leg-variant-actions { display:flex; gap:8px; }
.leg-variant-btn { min-width:96px; border:none; border-radius:12px; padding:10px 14px; font-weight:700; background:#222222; color:#fff; }
.leg-variant-btn.active { background:#c62828; }
.leg-variant-btn.busy { opacity:.7; }
@media (max-width: 900px), (orientation: portrait) { .leg-variant-strip { flex-direction:column; align-items:stretch; } .leg-variant-actions { width:100%; } .leg-variant-btn { flex:1; } }

.leg-variant-btn.variant-locked{opacity:.45;pointer-events:none;filter:grayscale(.15);}


/* V9.8 live control + TV improvements */
#liveStatusText { font-size: 0.95rem; }
.board-card .js-board-context:empty, .board-card .js-board-matchline:empty, .board-card .js-board-progress:empty { display:none; }
.tv-tile.cricket .tv-players-stacked { display:grid; grid-template-columns: 1fr; gap: .55rem; }
.tv-cricket-track { display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:.6rem; margin:.45rem 0; }
.tv-cricket-icons { display:grid; grid-template-columns: repeat(7, 1fr); gap:.25rem; justify-items:center; align-items:center; }
.tv-cricket-targets { display:grid; grid-template-columns: 1fr; gap:.2rem; justify-items:center; font-weight:700; opacity:.9; }
.tv-tile.cricket .tv-cricket-track { background: rgba(255,255,255,.04); border-radius: 12px; padding: .45rem .35rem; }
.tv-tile.cricket .tv-player-row { display:grid; grid-template-columns: 1fr auto; gap:.75rem; align-items:center; }
@media (min-width: 1200px) {
  .tv-tile.cricket { min-height: 340px; }
  .tv-tile.cricket .tv-player-row { grid-template-columns: 1fr; }
  .tv-tile.cricket .tv-stats { justify-self:start; }
}


/* V9.9 TV vertical cricket + polish */
.tv-cricket-track.vertical { display:grid; grid-template-columns: 1fr; gap: .28rem; background: rgba(255,255,255,.04); border-radius: 12px; padding: .45rem .4rem; }
.tv-cricket-row { display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:.5rem; }
.tv-cricket-mark { display:flex; align-items:center; justify-content:center; min-height: 1.6rem; }
.tv-cricket-target { display:flex; align-items:center; justify-content:center; min-width: 3.2rem; padding: .16rem .5rem; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 800; color: #CBD5E1; }
.tv-turn-dot.active { box-shadow: 0 0 0 4px rgba(239,68,68,.22); }
.tv-player-row.active { background: rgba(239,68,68,.08); border-radius: 12px; padding: .35rem .45rem; }


/* V10.4 TV PRO */
.tv-pro-body { background: #0A0A0A; color: #FFFFFF; min-height: 100vh; }
.tv-pro-screen { max-width: 1880px; margin: 0 auto; padding: 10px 12px; }
.tv-pro-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom: 8px; }
.tv-pro-brand { display:flex; align-items:center; gap:12px; }
.tv-pro-logo { height:38px; width:auto; }
.tv-pro-eyebrow { font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: #00D1FF; margin-bottom: 2px; font-weight: 800; }
.tv-pro-date { font-size: .78rem; color: #64748B; margin-top: 2px; }
.tv-pro-header h1 { margin: 0; font-size: clamp(1.35rem, 2.2vw, 2.2rem); line-height: 1.02; }
/* TV trad — result tile with brand accent bar */
.tv-trad-result-card { position:relative; overflow:hidden; }
.tv-trad-result-card::before { content:""; position:absolute; left:0; top:0; right:0; height:5px; background:linear-gradient(90deg,#007BFF 0%,#00D1FF 100%); }
/* Equal-size grid: 3 boards = 3 cols */
.tv-mode-grid.count-3 { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
.tv-pro-kpis { display:grid; grid-template-columns: repeat(4, minmax(140px,1fr)); gap: 10px; min-width:min(58vw, 760px); }
.tv-pro-kpi { background: rgba(20,20,20,.95); border:1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 8px 10px; }
.tv-pro-kpi span { display:block; color:#94A3B8; font-size:.74rem; margin-bottom: 4px; }
.tv-pro-kpi strong { display:block; font-size: clamp(1rem, 1.6vw, 1.45rem); }
.tv-pro-main { min-height: calc(100vh - 72px); height: calc(100vh - 72px); }
.tv-mode-focus, .tv-mode-hybrid, .tv-mode-grid { height: 100%; }
.tv-mode-focus { display:grid; }
.tv-featured-wrap { min-height: 0; }
.tv-mode-hybrid { display:grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, .9fr); gap: 14px; }
.tv-side-grid { display:grid; gap: 12px; grid-template-columns: 1fr; }
.tv-side-grid.count-4 { grid-template-columns: 1fr 1fr; }
.tv-side-grid.count-3 { grid-template-rows: repeat(3, 1fr); }
.tv-mode-grid.mode-large { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.tv-mode-grid.mode-medium { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.tv-mode-grid.mode-compact { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.tv-match-tile { position:relative; display:grid; grid-template-rows: auto 1fr; min-height: 270px; border-radius: 24px; border:1px solid rgba(255,255,255,.08); background: #141414; box-shadow: 0 18px 50px rgba(0,0,0,.28); overflow:hidden; }
.tv-match-tile.density-focus { min-height: calc(100vh - 170px); }
.tv-match-tile.density-large { min-height: 0; }
.tv-match-tile.density-medium { min-height: 220px; }
.tv-match-tile.density-compact { min-height: 170px; border-radius: 18px; }
.tv-match-tile.idle { opacity: .78; }
.tv-match-tile.variant-x01::before, .tv-match-tile.variant-cricket::before { content:''; position:absolute; left:0; top:0; right:0; height:4px; background: linear-gradient(90deg, #007BFF 0%, #00D1FF 100%); }
.tv-match-top { display:flex; justify-content:space-between; align-items:center; gap:10px; padding: 12px 14px 10px; }
.tv-board-pill { display:inline-flex; align-items:center; justify-content:center; min-width: 62px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(0,123,255,.18); color: #66B3FF; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tv-context-pill { display:inline-flex; align-items:center; justify-content:center; padding: 0 12px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.08); color: #94A3B8; font-size: .94rem; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.tv-match-body { display:grid; grid-template-rows: 1fr auto 1fr; gap: 8px; padding: 8px 14px 14px; min-height: 0; }
.tv-player-block { display:grid; gap: 8px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); }
.tv-player-block.active { background: rgba(0,123,255,.14); border-color: rgba(0,209,255,.45); box-shadow: inset 0 0 0 1px rgba(0,209,255,.12), 0 0 28px rgba(0,123,255,.14); }
.tv-player-mainline { display:grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items:end; }
.tv-name-wrap { display:flex; align-items:center; gap: 10px; min-width:0; }
.tv-active-dot { width: 12px; height: 12px; border-radius: 999px; background: #2C2C2C; border: 1px solid #444; flex: 0 0 auto; }
.tv-active-dot.active { background: #00D1FF; border-color: #00D1FF; box-shadow: 0 0 0 5px rgba(0,209,255,.20); }
.tv-player-name { font-size: clamp(1.05rem, 1.65vw, 2rem); font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #FFFFFF; }
.tv-big-score { font-family: var(--font-mono); font-size: clamp(2rem, 6vw, 6.8rem); font-weight: 800; line-height: .95; color: #FFFFFF; }
.tv-player-subline { display:flex; justify-content:space-between; align-items:center; gap: 12px; color: #94A3B8; font-size: clamp(.86rem, 1.15vw, 1.25rem); font-weight: 700; }
.tv-x-center { display:grid; justify-items:center; align-items:center; gap: 8px; padding: 2px 0; }
.tv-x-sep { width: min(72%, 360px); height: 5px; border-radius: 999px; background: linear-gradient(90deg, rgba(148,163,184,.18) 0%, rgba(248,250,252,.7) 50%, rgba(148,163,184,.18) 100%); }
.tv-x-badge { padding: 8px 16px; border-radius: 999px; background: rgba(148,163,184,.08); color: #94A3B8; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tv-c-center { display:grid; gap: 6px; padding: 8px 12px; border-radius: 18px; background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.04); }
.tv-c-empty { justify-items:center; color: #94A3B8; font-weight: 800; }
.tv-c-row { display:grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items:center; }
.tv-c-target { display:inline-flex; align-items:center; justify-content:center; min-width: 58px; height: 32px; border-radius: 999px; background: rgba(255,255,255,.10); color: #FFFFFF; font-weight: 900; font-size: clamp(.9rem, 1.2vw, 1.25rem); }
.tv-c-mark { display:flex; align-items:center; justify-content:center; font-size: clamp(1rem, 1.4vw, 1.7rem); font-weight: 900; color: #00D1FF; min-height: 28px; }
.tv-idle-state { display:flex; align-items:center; justify-content:center; height:100%; color:#94A3B8; font-size: clamp(1rem,1.4vw,1.5rem); font-weight: 700; }
.tv-match-tile.density-medium .tv-player-name { font-size: 1.05rem; }
.tv-match-tile.density-medium .tv-big-score { font-size: clamp(1.8rem, 3vw, 3.2rem); }
.tv-match-tile.density-medium .tv-player-subline { font-size: .84rem; }
.tv-match-tile.density-medium .tv-context-pill, .tv-match-tile.density-medium .tv-board-pill { height: 30px; font-size: .82rem; }
.tv-match-tile.density-compact .tv-match-top { padding: 8px 10px 6px; }
.tv-match-tile.density-compact .tv-match-body { padding: 6px 10px 10px; gap: 6px; }
.tv-match-tile.density-compact .tv-player-block { padding: 8px 9px; border-radius: 14px; }
.tv-match-tile.density-compact .tv-player-name { font-size: .92rem; }
.tv-match-tile.density-compact .tv-big-score { font-size: clamp(1.45rem, 2.2vw, 2.5rem); }
.tv-match-tile.density-compact .tv-player-subline { font-size: .75rem; }
.tv-match-tile.density-compact .tv-c-center { gap: 2px; padding: 6px 8px; }
.tv-match-tile.density-compact .tv-c-row { gap: 6px; }
.tv-match-tile.density-compact .tv-c-target { min-width: 42px; height: 24px; font-size: .76rem; }
.tv-match-tile.density-compact .tv-c-mark { font-size: .95rem; min-height: 20px; }
.tv-match-tile.density-compact .tv-x-sep { height: 3px; }
.tv-match-tile.density-compact .tv-x-badge { font-size: .68rem; padding: 5px 10px; }
.tv-match-tile.density-focus .tv-match-top { padding: 18px 22px 14px; }
.tv-match-tile.density-focus .tv-match-body { padding: 10px 22px 22px; gap: 14px; }
.tv-match-tile.density-focus .tv-player-block { padding: 16px 18px; }
.tv-match-tile.density-focus .tv-player-name { font-size: clamp(1.6rem, 2.7vw, 3rem); }
.tv-match-tile.density-focus .tv-big-score { font-size: clamp(4rem, 11vw, 8.5rem); }
.tv-match-tile.density-focus .tv-player-subline { font-size: clamp(1.05rem, 1.5vw, 1.55rem); }
.tv-match-tile.density-focus .tv-c-target { min-width: 86px; height: 42px; font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.tv-match-tile.density-focus .tv-c-mark { font-size: clamp(1.4rem, 2.2vw, 2rem); min-height: 36px; }
.tv-match-tile.density-focus .tv-x-badge { font-size: 1rem; padding: 10px 20px; }
@media (max-width: 1200px) { .tv-mode-hybrid { grid-template-columns: 1fr; } .tv-side-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .tv-pro-header { grid-template-columns: 1fr; display:grid; } .tv-pro-kpis { min-width: 0; grid-template-columns: repeat(2, minmax(120px,1fr)); } .tv-mode-grid.mode-medium, .tv-mode-grid.mode-compact { grid-template-columns: repeat(2, minmax(0,1fr)); } }


/* V10.5 TV fit + referee + cork */
body.tv-pro-body { height:100%; overflow:hidden; }
.tv-pro-screen { height:100vh; overflow:hidden; }
.tv-pro-main { height: calc(100vh - 90px); overflow:hidden; }
.tv-pro-stage, .tv-mode-grid, .tv-mode-hybrid, .tv-mode-focus { height:100%; overflow:hidden; }
.tv-mode-grid { display:grid; gap:10px; }
.tv-mode-grid.mode-compact { grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); }
.tv-mode-grid.mode-medium { grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); }
.tv-mode-grid.mode-large { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); }
.tv-match-tile { min-height:0 !important; height:100%; }
.tv-match-body { min-height:0; }
.tv-idle-upcoming { margin-top:.6rem; font-size:1.18rem; line-height:1.32; color:#e5e7eb; font-weight:800; }
.tv-match-tile.idle .tv-idle-state { font-size:1.4rem; }
.tv-referee-line { margin-top:.3rem; font-size:.9rem; color:#f5d76e; font-weight:700; }
.tv-mode-grid.mode-compact .tv-player-name { font-size:1rem; }
.tv-mode-grid.mode-compact .tv-big-score { font-size:2rem; }
.tv-mode-grid.mode-compact .tv-c-row { min-height: 1.05rem; }
.tv-mode-grid.mode-compact .tv-idle-upcoming { font-size:.82rem; }
.tv-mode-grid.mode-compact .tv-context-pill { font-size:.7rem; }
.next-match-preview-lg { font-size:1.35rem !important; line-height:1.35 !important; font-weight:800; color:#FFFFFF !important; }
.cork-panel { display:grid; gap:.8rem; margin: .7rem 0 1rem; padding: 1rem 1.2rem; border-radius: 16px; background: rgba(148,163,184,.12); border:1px solid rgba(148,163,184,.22); }
.cork-title { font-size:1.2rem; font-weight:900; letter-spacing:.08em; }
.cork-subtitle { font-size:1.05rem; font-weight:700; color:#CBD5E1; }
.cork-actions { display:flex; gap:.8rem; flex-wrap:wrap; }

.tv-idle-upcoming strong{display:block;font-size:1.28em;line-height:1.15;color:#FFFFFF;}
.tv-idle-upcoming .tv-upcoming-ref{display:block;font-size:.96em;opacity:.92;}
.next-match-preview-lg{font-size:1.7rem !important;line-height:1.28 !important;font-weight:900;color:#FFFFFF !important;}


/* V10.5.3 UX + TV fixes */
.next-match-strong { background: rgba(15,23,42,.78); padding: 1rem 1.15rem; border-radius: 16px; border:1px solid rgba(255,255,255,.09); color:#FFFFFF !important; text-shadow:0 1px 1px rgba(0,0,0,.35); }
.next-match-strong strong { color:#fff; font-size:1.1em; }
.confirm-match-panel { display:grid; gap:.75rem; margin:.8rem 0 1rem; padding:1rem 1.2rem; border-radius:16px; background:rgba(239,68,68,.14); border:1px solid rgba(239,68,68,.35); }
.confirm-match-title { font-size:1.35rem; font-weight:900; color:#fff; }
.confirm-match-subtitle { color:#fecaca; font-size:1rem; }
.header-meta#turnsHeader { background: rgba(255,255,255,.12); color:#fff; font-weight:800; }
.tv-pro-screen { max-width: 100vw; width:100vw; height:100vh; padding:10px; overflow:hidden; box-sizing:border-box; }
.tv-pro-header { margin-bottom:8px; gap:12px; }
.tv-pro-header h1 { font-size: clamp(1.35rem, 2vw, 2.2rem); }
.tv-pro-kpi { padding:8px 10px; border-radius:14px; }
.tv-pro-kpi span { font-size:.72rem; margin-bottom:2px; }
.tv-pro-kpi strong { font-size: clamp(1rem, 1.4vw, 1.45rem); }
.tv-pro-main { min-height:0; height: calc(100vh - 78px); overflow:hidden; }
.tv-pro-stage { height:100%; overflow:hidden; }
.tv-mode-grid.mode-compact { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(4,minmax(0,1fr)); gap:8px; }
.tv-mode-grid.mode-medium { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:10px; }
.tv-mode-grid.mode-large { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; }
.tv-match-tile { min-height:0 !important; height:100%; }
.tv-mode-grid.mode-compact .tv-match-tile { border-radius:14px; }
.tv-mode-grid.mode-compact .tv-match-top { padding:6px 8px 4px; }
.tv-mode-grid.mode-compact .tv-match-body { padding:5px 8px 8px; gap:5px; }
.tv-mode-grid.mode-compact .tv-player-block { padding:6px 8px; border-radius:12px; }
.tv-mode-grid.mode-compact .tv-player-name { font-size:.82rem; }
.tv-mode-grid.mode-compact .tv-big-score { font-size:1.35rem; }
.tv-mode-grid.mode-compact .tv-player-subline { font-size:.67rem; }
.tv-mode-grid.mode-compact .tv-context-pill, .tv-mode-grid.mode-compact .tv-board-pill { height:24px; font-size:.68rem; }
.tv-mode-grid.mode-compact .tv-c-target { min-width:32px; height:18px; font-size:.64rem; }
.tv-mode-grid.mode-compact .tv-c-mark { min-height:16px; font-size:.82rem; }
.tv-mode-grid.mode-compact .tv-idle-state { font-size:1rem; }
.tv-mode-grid.mode-compact .tv-idle-upcoming { margin-top:.2rem; font-size:.72rem; line-height:1.15; font-weight:800; }
.tv-mode-grid.mode-compact .tv-idle-upcoming strong { font-size:1.05em; }
.tv-mode-grid.mode-medium .tv-idle-upcoming { font-size:.92rem; }
.tv-idle-state { color:#fff; font-weight:900; }
.tv-idle-upcoming { color:#fff; }
.tv-upcoming-ref { color:#fde68a; font-weight:800; }
.tv-referee-line { color:#fde68a; font-size:.85em; font-weight:800; }

.header-referee{font-size:1.05rem;font-weight:900;color:#fde68a;letter-spacing:.06em;text-transform:uppercase;margin-top:4px;text-shadow:0 1px 0 rgba(0,0,0,.35)}
.next-match-preview-lg{line-height:1.35}

.tv-pro-screen[data-tile-count="4"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="5"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="6"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="7"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="8"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="9"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="10"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="11"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="12"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="13"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="14"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="15"] .tv-pro-kpis,.tv-pro-screen[data-tile-count="16"] .tv-pro-kpis{display:none}
.tv-pro-screen[data-tile-count="4"] .tv-pro-main,.tv-pro-screen[data-tile-count="5"] .tv-pro-main,.tv-pro-screen[data-tile-count="6"] .tv-pro-main,.tv-pro-screen[data-tile-count="7"] .tv-pro-main,.tv-pro-screen[data-tile-count="8"] .tv-pro-main,.tv-pro-screen[data-tile-count="9"] .tv-pro-main,.tv-pro-screen[data-tile-count="10"] .tv-pro-main,.tv-pro-screen[data-tile-count="11"] .tv-pro-main,.tv-pro-screen[data-tile-count="12"] .tv-pro-main,.tv-pro-screen[data-tile-count="13"] .tv-pro-main,.tv-pro-screen[data-tile-count="14"] .tv-pro-main,.tv-pro-screen[data-tile-count="15"] .tv-pro-main,.tv-pro-screen[data-tile-count="16"] .tv-pro-main{height:calc(100vh - 52px);min-height:calc(100vh - 52px)}
.tv-pro-screen[data-tile-count="4"] .tv-match-tile,.tv-pro-screen[data-tile-count="5"] .tv-match-tile,.tv-pro-screen[data-tile-count="6"] .tv-match-tile,.tv-pro-screen[data-tile-count="7"] .tv-match-tile,.tv-pro-screen[data-tile-count="8"] .tv-match-tile{min-height:0}
.tv-pro-screen[data-tile-count="4"] .tv-match-tile.density-large{min-height:calc((100vh - 80px)/2)}

.tv-idle-upcoming{display:grid;gap:6px;font-size:1rem;line-height:1.2}.tv-upcoming-ref{font-size:.95rem;color:#fde68a;font-weight:800}.tv-referee-line{font-size:.9rem;color:#fde68a;font-weight:800;letter-spacing:.04em;text-transform:uppercase}

.header-cork-result{font-size:1rem;font-weight:900;color:#66B3FF;letter-spacing:.05em;text-transform:uppercase;margin-top:4px;text-shadow:0 1px 0 rgba(0,0,0,.35)}
.next-match-preview-lg{display:grid;gap:10px;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}
.next-match-title{font-size:1.1rem;font-weight:800;color:#94A3B8;text-transform:uppercase;letter-spacing:.06em}
.next-match-versus{font-size:1.5rem;font-weight:900;color:#fff;line-height:1.15}
.next-match-versus span{color:#fbbf24}
.next-match-referee{font-size:1.12rem;font-weight:900;color:#fde68a;letter-spacing:.05em;text-transform:uppercase}
#turnsHeader{background:rgba(59,130,246,.16);color:#CCE5FF;border:1px solid rgba(147,197,253,.28);font-weight:900}
.tv-pro-header{padding-bottom:6px;margin-bottom:6px}
.tv-pro-eyebrow{font-size:.78rem}
.tv-pro-header h1{font-size:1.35rem;line-height:1.05;margin:0}
.tv-pro-kpi{padding:.42rem .65rem}
.tv-pro-kpi span{font-size:.62rem}
.tv-pro-kpi strong{font-size:1rem}
.tv-pro-main{height:calc(100vh - 64px)!important;min-height:calc(100vh - 64px)!important}
.tv-mode-grid.mode-large{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px}
.tv-mode-grid.mode-large .tv-match-top{padding:8px 10px 6px}
.tv-mode-grid.mode-large .tv-match-body{padding:7px 10px 10px;gap:7px}
.tv-mode-grid.mode-large .tv-player-block{padding:8px 10px;border-radius:14px}
.tv-mode-grid.mode-large .tv-player-name{font-size:1rem}
.tv-mode-grid.mode-large .tv-big-score{font-size:2rem}
.tv-mode-grid.mode-large .tv-player-subline{font-size:.78rem}
.tv-mode-grid.mode-large .tv-context-pill,.tv-mode-grid.mode-large .tv-board-pill{height:26px;font-size:.74rem}
.tv-mode-grid.mode-large .tv-c-target{min-width:38px;height:22px;font-size:.68rem}
.tv-mode-grid.mode-large .tv-c-mark{min-height:18px;font-size:.9rem}
.tv-mode-grid.mode-large .tv-idle-state{font-size:1.1rem}
.tv-mode-grid.mode-large .tv-idle-upcoming{font-size:.78rem;line-height:1.12;gap:4px}
.tv-mode-grid.mode-large .tv-idle-upcoming strong{font-size:1rem}
.tv-mode-grid.mode-large .tv-referee-line,.tv-mode-grid.mode-large .tv-upcoming-ref{font-size:.74rem}

/* V10.5.6 cork confirm + referee visibility */
.cork-confirm{display:grid;gap:.8rem;margin-top:.8rem;padding:.9rem 1rem;border-radius:16px;background:rgba(251,191,36,.14);border:1px solid rgba(251,191,36,.34)}
.cork-confirm-text{font-size:1.08rem;font-weight:900;color:#fff}
.cork-confirm-actions{display:flex;gap:.8rem;flex-wrap:wrap}
.header-referee{display:block;font-size:1.18rem!important;font-weight:900!important;color:#fde68a!important;letter-spacing:.08em;text-transform:uppercase;margin-top:6px;text-shadow:0 1px 0 rgba(0,0,0,.45)}
.confirm-match-panel .big-action-button.secondary{background:#64748B}
.tv-pro-screen[data-tile-count="4"] .tv-pro-main{height:calc(100vh - 56px)!important;min-height:calc(100vh - 56px)!important}
.tv-pro-screen[data-tile-count="4"] .tv-mode-grid.mode-large{gap:8px}
.tv-pro-screen[data-tile-count="4"] .tv-match-top{padding:6px 8px 4px}
.tv-pro-screen[data-tile-count="4"] .tv-match-body{padding:6px 8px 8px;gap:5px}
.tv-pro-screen[data-tile-count="4"] .tv-player-name{font-size:.9rem}
.tv-pro-screen[data-tile-count="4"] .tv-big-score{font-size:1.7rem}
.tv-pro-screen[data-tile-count="4"] .tv-player-subline{font-size:.72rem}
.tv-pro-screen[data-tile-count="4"] .tv-idle-upcoming{font-size:.72rem;line-height:1.08;gap:3px}
.tv-pro-screen[data-tile-count="4"] .tv-idle-upcoming strong{font-size:.92rem}
.tv-pro-screen[data-tile-count="4"] .tv-referee-line,.tv-pro-screen[data-tile-count="4"] .tv-upcoming-ref{font-size:.68rem}

.next-referee-callout{display:block;margin-top:12px;padding:14px 16px;border-radius:16px;background:rgba(251,191,36,.14);border:1px solid rgba(251,191,36,.32);font-size:1.32rem;font-weight:900;color:#fde68a;letter-spacing:.06em;text-transform:uppercase;text-shadow:0 1px 0 rgba(0,0,0,.35)}


/* V10.5.8 cleanup */
.tv-board-pill { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-referee-callout { font-size: 1.2rem; font-weight: 800; letter-spacing: .04em; }


/* V10.5.9 readability + confirm panel top */
.next-referee-callout{
  display:block;
  margin-top:12px;
  padding:14px 16px;
  border-radius:16px;
  background:#f3e8c8;
  border:1px solid #d6c28b;
  font-size:1.26rem;
  font-weight:900;
  color:#111 !important;
  letter-spacing:.03em;
  text-transform:uppercase;
  text-shadow:none;
}
.confirm-match-panel{
  display:grid;
  gap:.75rem;
  margin:.8rem 0 1rem;
  padding:1rem 1.2rem;
  border-radius:16px;
  background:#f3e8c8;
  border:1px solid #d6c28b;
}
.confirm-match-title{
  font-size:1.35rem;
  font-weight:900;
  color:#111 !important;
}
.confirm-match-subtitle{
  color:#111 !important;
  font-size:1rem;
  font-weight:800;
}
.cork-confirm-title,
.cork-confirm-subtitle,
.cork-panel .muted,
#nextMatchCallout,
#nextRefereeCallout,
#turnsHeader{
  color:#111 !important;
  font-weight:900 !important;
  text-shadow:none !important;
}
#turnsHeader{
  background:#f3e8c8 !important;
  border:1px solid #d6c28b !important;
}


/* V10.6.0 real confirm panel fix */
.confirm-match-panel{
  display:grid;
  gap:.75rem;
  margin:.8rem 0 1rem;
  padding:1rem 1.2rem;
  border-radius:16px;
  background:#f3e8c8;
  border:1px solid #d6c28b;
  position:relative;
  z-index:30;
}
.confirm-match-title{
  font-size:1.35rem;
  font-weight:900;
  color:#111 !important;
  text-shadow:none !important;
}
.confirm-match-subtitle{
  color:#111 !important;
  font-size:1rem;
  font-weight:800;
  text-shadow:none !important;
}


.tv-pro-main-split{display:grid;grid-template-columns:minmax(0,2fr) minmax(320px,1fr);gap:18px;align-items:start}
.tv-bracket-panel{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:16px;min-height:220px}
.tv-bracket-head{font-size:1.05rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;margin-bottom:12px}
.tv-bracket-stage{display:flex;flex-direction:column;gap:14px;max-height:78vh;overflow:auto}
.tv-bracket-section{display:flex;flex-direction:column;gap:8px}
.tv-bracket-section-title{font-weight:800;color:#fff}
.tv-bracket-columns{display:flex;gap:10px;align-items:flex-start;overflow:auto;padding-bottom:4px}
.tv-bracket-col{min-width:180px;display:flex;flex-direction:column;gap:8px}
.tv-bracket-round-title{font-size:.85rem;opacity:.8;text-transform:uppercase}
.tv-bracket-match{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.tv-bracket-match.completed{border-color:rgba(80,200,120,.5)}
.tv-bracket-match.in_progress,.tv-bracket-match.assigned,.tv-bracket-match.awaiting_validation{border-color:rgba(255,200,80,.7)}
.tv-bracket-player{display:flex;justify-content:space-between;gap:8px;font-size:.9rem}
.tv-bracket-player span{font-weight:800}
.tv-bracket-empty{opacity:.75}
@media (max-width: 1200px){.tv-pro-main-split{grid-template-columns:1fr}.tv-bracket-stage{max-height:none}}

/* V10.7.3 — TV rotation + winner overlay */
.tv-rotating-body { margin:0; min-height:100vh; background:radial-gradient(circle at top, #182233 0%, #0a0f18 50%, #06080d 100%); color:#FFFFFF; overflow:hidden; }
.tv-rotating-screen { width:100vw; height:100vh; box-sizing:border-box; padding:14px; display:flex; flex-direction:column; gap:10px; }
.tv-rotating-header { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.tv-rotating-header h1 { margin:0; font-size:clamp(1.5rem, 2.2vw, 2.5rem); }
.tv-rotating-kpis { display:grid; grid-template-columns:repeat(4, minmax(130px, 1fr)); gap:10px; min-width:min(55vw, 760px); }
.tv-rotating-kpi { background:rgba(15,23,42,.88); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:10px 12px; }
.tv-rotating-kpi span { display:block; font-size:.74rem; color:#94A3B8; margin-bottom:4px; }
.tv-rotating-kpi strong { font-size:clamp(1rem, 1.5vw, 1.45rem); }
.tv-rotating-banner { display:flex; justify-content:space-between; align-items:center; gap:12px; background:rgba(15,23,42,.72); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:10px 14px; }
.tv-rotating-mode { font-size:1rem; font-weight:800; letter-spacing:.08em; }
.tv-rotating-clock { font-size:1.1rem; font-weight:700; color:#66B3FF; }
.tv-rotating-main { flex:1; min-height:0; }
.tv-empty-state { height:100%; display:flex; align-items:center; justify-content:center; text-align:center; background:rgba(15,23,42,.72); border:1px solid rgba(255,255,255,.08); border-radius:20px; font-size:2rem; font-weight:700; color:#94A3B8; }
.tv-simple-grid { height:100%; display:grid; gap:14px; grid-template-columns:repeat(2, minmax(0, 1fr)); }
.tv-simple-grid.cols-1 { grid-template-columns:1fr; }
.tv-simple-grid.cols-2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.tv-simple-grid.cols-3, .tv-simple-grid.cols-4 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.tv-simple-card { background:linear-gradient(180deg, rgba(20,29,45,.98), rgba(10,15,24,.98)); border:1px solid rgba(255,255,255,.1); border-radius:22px; padding:16px; display:flex; flex-direction:column; justify-content:space-between; min-height:200px; box-shadow:0 10px 30px rgba(0,0,0,.26); }
.tv-simple-card.awaiting { box-shadow:0 0 0 2px rgba(250,204,21,.45) inset; }
.tv-simple-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; font-size:.95rem; }
.tv-simple-board { display:inline-block; background:#007BFF; color:#fff; padding:6px 10px; border-radius:999px; font-weight:700; }
.tv-simple-phase { color:#94A3B8; text-align:right; }
.tv-simple-versus { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; text-align:center; }
.tv-simple-player { font-size:clamp(1.6rem, 2.6vw, 2.9rem); font-weight:800; line-height:1.05; }
.tv-simple-vs { font-size:1.05rem; font-weight:800; letter-spacing:.14em; color:#66B3FF; }
/* ── Bracket tree TV (electronic mode) ─────────────────────────────── */
.tv-bt-wrap { height:100%; display:flex; flex-direction:column; gap:12px; overflow:hidden; padding:4px 8px 8px; }
.tv-bt-section { flex:1; display:flex; flex-direction:column; min-height:0; }
.tv-bt-section-lbl { font-weight:800; font-size:.9rem; color:#66B3FF; letter-spacing:.12em; text-transform:uppercase; margin-bottom:4px; }
.tv-bt-labels { display:flex; gap:44px; padding-bottom:6px; flex-shrink:0; }
.tv-bt-round-lbl { flex:1; text-align:center; font-size:.72rem; font-weight:700; color:rgba(255,255,255,.38); letter-spacing:.14em; text-transform:uppercase; }
.tv-bt-tree { display:flex; gap:44px; flex:1; min-height:0; }
.tv-bt-round { flex:1; display:flex; flex-direction:column; }
.tv-bt-slot { flex:var(--span,1); display:flex; flex-direction:column; justify-content:center; position:relative; padding:5px 0; }

/* Match card */
.tv-bt-match { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:8px 11px; display:flex; flex-direction:column; gap:4px; transition:border-color .3s, box-shadow .3s; }
.tv-bt-match.s-completed { border-color:rgba(74,222,128,.4); }
.tv-bt-match.s-in_progress, .tv-bt-match.s-assigned { border-color:rgba(251,191,36,.6); box-shadow:0 0 0 2px rgba(251,191,36,.12); animation:tvBtPulse 2.2s ease-in-out infinite; }
.tv-bt-match.s-awaiting_validation { border-color:rgba(251,191,36,.5); }
.tv-bt-match.tbd { opacity:.4; }
.tv-bt-match.final-match { border-radius:14px; padding:12px 15px; gap:6px; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.22); }
.tv-bt-match.final-match.s-completed { border-color:rgba(74,222,128,.55); background:rgba(74,222,128,.07); }
.tv-bt-player { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:.82rem; min-width:0; }
.tv-bt-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
.tv-bt-score { font-weight:900; font-size:.95rem; flex-shrink:0; }
.tv-bt-player.win { font-weight:700; }
.tv-bt-player.win .tv-bt-score { color:#22C55E; }
.tv-bt-player.lose { opacity:.45; }
.tv-bt-sep { height:1px; background:rgba(255,255,255,.1); flex-shrink:0; }
.tv-bt-match.final-match .tv-bt-player { font-size:1rem; }
.tv-bt-match.final-match .tv-bt-score { font-size:1.15rem; }
@keyframes tvBtPulse {
  0%,100% { box-shadow:0 0 0 2px rgba(251,191,36,.12); }
  50%      { box-shadow:0 0 0 4px rgba(251,191,36,.25); }
}

/* ── Connector lines ──────────────────────────────────────────────── */
/* Outgoing connectors: odd slot = top of pair, even = bottom of pair  */
/* (CSS nth-child is 1-based: 1,3,5=odd; 2,4,6=even)                   */
.tv-bt-round:not(.last) .tv-bt-slot:nth-child(odd)::after,
.tv-bt-round:not(.last) .tv-bt-slot:nth-child(even)::after {
  content:''; position:absolute; left:100%; width:22px; border-right:1.5px solid rgba(255,255,255,.22);
}
.tv-bt-round:not(.last) .tv-bt-slot:nth-child(odd)::after {
  top:50%; bottom:-50%; border-top:1.5px solid rgba(255,255,255,.22); border-top-right-radius:4px;
}
.tv-bt-round:not(.last) .tv-bt-slot:nth-child(even)::after {
  top:-50%; bottom:50%; border-bottom:1.5px solid rgba(255,255,255,.22); border-bottom-right-radius:4px;
}
/* Incoming horizontal connector into non-first rounds */
.tv-bt-round:not(:first-child) .tv-bt-slot::before {
  content:''; position:absolute; right:100%; width:22px; top:50%; height:1.5px; background:rgba(255,255,255,.22);
}
/* ─────────────────────────────────────────────────────────────────── */
.tv-winner-overlay { position:fixed; inset:0; background:rgba(3,7,18,.72); display:flex; align-items:center; justify-content:center; z-index:999; transition:opacity .35s ease; }
.tv-winner-overlay.hidden { opacity:0; pointer-events:none; }
.tv-winner-card { min-width:min(90vw, 900px); background:linear-gradient(160deg, rgba(10,18,35,.99) 0%, rgba(20,35,65,.99) 100%); border:1px solid rgba(255,255,255,.18); border-radius:32px; padding:44px 48px 36px; text-align:center; box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(250,204,21,.18); }
.tv-winner-eyebrow { color:#facc15; font-size:1.05rem; font-weight:800; letter-spacing:.2em; text-transform:uppercase; margin-bottom:14px; }
.tv-winner-name { font-size:clamp(3rem, 5.5vw, 6rem); font-weight:900; line-height:1.02; margin-bottom:14px; letter-spacing:-.01em; }
.tv-winner-score { font-size:clamp(1.2rem, 2.2vw, 2.2rem); color:#94A3B8; margin-bottom:10px; }
.tv-winner-meta { color:#66B3FF; font-size:1.05rem; margin-bottom:22px; }
.tv-winner-progress { height:4px; border-radius:999px; background:rgba(255,255,255,.12); overflow:hidden; }
.tv-winner-progress-bar { height:100%; border-radius:999px; background:linear-gradient(90deg,#facc15,#f59e0b); transform-origin:left; }
@keyframes tvOverlayCardIn {
  0%   { opacity:0; transform:scale(.82) translateY(28px); }
  55%  { opacity:1; transform:scale(1.03) translateY(-4px); }
  100% { opacity:1; transform:scale(1) translateY(0); }
}
@keyframes tvWinnerNameGlow {
  0%,100% { text-shadow:0 0 0 rgba(250,204,21,0); }
  50%     { text-shadow:0 0 40px rgba(250,204,21,.45), 0 0 80px rgba(250,204,21,.2); }
}
.tv-winner-card.tv-winner-pop { animation:tvOverlayCardIn 550ms cubic-bezier(.22,.85,.25,1.1) both; }
.tv-winner-card.tv-winner-pop .tv-winner-name { animation:tvWinnerNameGlow 2s ease-in-out 600ms 6; }
@media (max-width: 1100px) {
  .tv-rotating-header { display:grid; grid-template-columns:1fr; }
  .tv-rotating-kpis { min-width:0; grid-template-columns:repeat(2, minmax(0, 1fr)); }
}


.tv-simple-result{margin-top:10px;font-size:18px;opacity:.9}.tv-bracket-overview-result{margin-top:8px;font-size:14px;font-weight:700;opacity:.9}

.tv-simple-card.traditional {
  min-height: 260px;
}
.tv-traditional-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.tv-traditional-player {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  font-size: 1.25rem;
  font-weight: 800;
}
.tv-traditional-player.throwing {
  outline: 2px solid rgba(255,255,255,0.8);
}
.tv-traditional-scoreline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.tv-traditional-scoreline > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tv-traditional-scoreline span {
  font-size: 1rem;
}
.tv-traditional-scoreline strong {
  font-size: 1.1rem;
}
.tv-traditional-averages, .tv-traditional-marks {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.tv-traditional-averages span, .tv-traditional-marks span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}
/* ── Tuile résultat traditionnel ── */
.tv-trad-result-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px 16px 20px;
  text-align: center;
  gap: 6px;
}
.tv-trad-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #00D1FF;
}
.tv-trad-winner {
  font-size: clamp(1.6rem, 3.2vw, 3rem);
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.05;
}
.tv-trad-score {
  font-size: clamp(.85rem, 1.4vw, 1.15rem);
  color: #CBD5E1;
  font-weight: 600;
  margin-top: 4px;
}
.tv-trad-score strong {
  color: #FFFFFF;
  font-size: 1.2em;
}
.tv-trad-label {
  font-size: .78rem;
  color: #64748B;
  margin-top: 2px;
}

.tv-result-highlight {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.22) inset;
}
.tv-simple-versus.winner .tv-simple-player:first-child {
  font-size: 1.5rem;
}


/* V10.7.12 — electronic live colors + traditional scoring refinements */
.tv-electronic-card{
  background: #141414;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
  position:relative;
  overflow:hidden;
}
.tv-electronic-card::before{content:"";position:absolute;left:0;top:0;right:0;height:5px;background:linear-gradient(90deg,#ef4444 0%,#f59e0b 100%)}
.tv-electronic-card .tv-simple-board{background:rgba(239,68,68,.16);color:#fecaca;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.tv-electronic-card .tv-simple-phase{color:#94A3B8}
.tv-electronic-card .tv-simple-vs{color:#66B3FF}
.tv-electronic-card .tv-simple-result{color:#CBD5E1}
.tv-winner-name-pop{font-size:clamp(2.3rem,4vw,4.2rem)!important;line-height:1.02;text-shadow:0 4px 20px rgba(0,0,0,.35)}
.tv-winner-pop{animation:tvWinnerTilePop .55s cubic-bezier(.2,.85,.25,1.15)}
@keyframes tvWinnerTilePop{0%{transform:scale(.9);box-shadow:0 0 0 rgba(0,0,0,0)}60%{transform:scale(1.03);box-shadow:0 18px 48px rgba(239,68,68,.24)}100%{transform:scale(1)}}

.header-app-name{font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#8b7355;margin-bottom:4px}
.score-header{padding:8px 12px;background:#f1ede6;color:#2f2f2f;border-bottom:1px solid rgba(0,0,0,.08)}
.score-header-left,.score-header-right{gap:8px}
.header-square{width:40px;height:40px;border-radius:10px;background:#ddd4c6}
.header-square.ghost{background:#ece5d7}
.header-title-row strong{font-size:28px}
.header-meta{font-size:15px;color:#7a746d}
.header-subtitle{font-size:12px;color:#7b7670}
.scoreboard-panel{min-height:155px}
.score-player{padding:12px 14px 48px;gap:4px}
.score-player-name{font-size:24px}
.score-player-main{font-size:clamp(64px,11vw,118px)}
.score-player-bottom{padding:7px 14px;font-size:13px}
.score-player-bottom strong{font-size:24px}
.mini-legs-box strong{font-size:22px}
.v96-winner{bottom:46px}
.x01-screen{grid-template-columns:120px 1fr 250px}
.x01-side-actions{padding:8px;gap:6px}
.quick-chip{font-size:1rem}
.points-display.v96{font-size:clamp(58px,8vw,98px)}
.entry-caption{font-size:clamp(18px,2.3vw,26px)}
.entry-cta{font-size:26px;min-height:72px}
.cricket-row-v96{min-height:58px}
.cricket-target-center{font-size:30px}
.cricket-mark-cell{font-size:40px}
.next-match-preview-clean{display:grid;gap:6px;margin-top:8px;padding:0;background:transparent!important;border:0!important}
.next-match-preview-clean .next-match-title{font-size:1.45rem;font-weight:900;line-height:1.15;color:#111!important;background:transparent!important;text-transform:none}
.next-match-preview-clean .next-match-versus{font-size:2.05rem;font-weight:900;line-height:1.08;color:#111!important;background:transparent!important}
.next-match-preview-clean .next-match-versus span{font-size:.6em;letter-spacing:.14em;text-transform:uppercase;color:#444}
.empty-hint-minimal{display:none!important}
.next-referee-callout{display:block}
.variant-select{display:none!important}
@media (max-width: 1100px){
  .score-header{padding:6px 10px}
  .header-square{width:36px;height:36px}
  .header-title-row strong{font-size:24px}
  .scoreboard-panel{min-height:140px}
  .score-player-name{font-size:20px}
  .score-player-main{font-size:clamp(54px,10vw,96px)}
  .x01-screen{grid-template-columns:104px 1fr 220px}
  .next-match-preview-clean .next-match-title{font-size:1.2rem}
  .next-match-preview-clean .next-match-versus{font-size:1.6rem}
}


.tv-winner-pop { animation: winnerPopIn 480ms ease-out; }
@keyframes winnerPopIn {
  0% { transform: scale(0.94); opacity: 0; }
  60% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.tv-winner-name-pop, .tv-traditional-winner-name {
  font-size: clamp(2rem, 3.8vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
}
.tv-traditional-winner-name { color: #111; }


.tv-registered-wrap { display:grid; gap:18px; }
.tv-registered-title { font-size:34px; font-weight:800; letter-spacing:.08em; text-align:center; color:#0A0A0A; }
.tv-registered-grid { display:grid; grid-template-columns: repeat(var(--cols, 4), minmax(0,1fr)); gap:16px; }
.tv-registered-grid.cols-1 { grid-template-columns:repeat(1,minmax(0,1fr)); }
.tv-registered-grid.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tv-registered-grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tv-registered-grid.cols-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tv-registered-card { background:rgba(255,255,255,.9); border:1px solid rgba(15,23,42,.12); border-radius:18px; padding:18px 20px; display:grid; gap:8px; box-shadow:0 12px 28px rgba(15,23,42,.08); }
.tv-registered-card strong { font-size:26px; color:#0A0A0A; }
.tv-registered-card span { font-size:16px; color:#64748B; }
.tv-registered-card em { font-style:normal; font-weight:700; color:#15803d; }
.tv-registered-card.checked-in { border-color:rgba(21,128,61,.35); box-shadow:0 12px 28px rgba(21,128,61,.12); }

.tv-registered-wrap.with-ranking {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  align-items: start;
}
.tv-registered-main {
  display: grid;
  gap: 18px;
}
.tv-ranking-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
.tv-ranking-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
  color: #0A0A0A;
}
.tv-ranking-list {
  display: grid;
  gap: 10px;
}
.tv-ranking-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  padding: 10px 12px;
}
.tv-ranking-pos {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #991b1b;
  background: rgba(239,68,68,.14);
}
.tv-ranking-body { display:grid; gap:2px; min-width:0; }
.tv-ranking-body strong { font-size: 20px; color:#0A0A0A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-ranking-body span { font-size: 14px; color:#64748B; }
.tv-ranking-metrics { display:grid; gap:4px; text-align:right; font-weight:800; color:#1E1E1E; }
.tv-ranking-metrics span { font-size: 14px; }
.tv-ranking-empty { color:#64748B; font-size:18px; line-height:1.4; }

@media (max-width: 1200px) {
  .tv-registered-wrap.with-ranking { grid-template-columns: 1fr; }
}


.table-scroll{overflow:auto;width:100%;}
.table-scroll.limited-height{max-height:420px;}
.fullwidth-search{width:100%;padding:10px 12px;margin:10px 0 12px;border:1px solid #d7dce5;border-radius:10px;font-size:14px;}
.tv-traditional-winner-name{font-size:2rem;font-weight:800;color:#101010;text-align:center;padding:18px 8px;}


/* V11.4.3 */
.sc-empty.card{max-width:none;width:min(100%,980px);margin:0 auto;min-height:calc(100vh - 92px);display:flex;flex-direction:column;justify-content:space-between;padding:24px 24px 28px;border-radius:24px}
#nextMatchPreview{flex:1;display:flex;flex-direction:column;justify-content:center}
.next-match-preview-clean{min-height:0}
.next-referee-callout{width:100%;box-sizing:border-box}
.score-footer-tools{grid-template-columns:1.1fr .9fr auto;grid-template-areas:'history actions actions' 'legs actions actions';align-items:start}
.history-strip{grid-area:history}
.legs-ribbon.v96{grid-area:legs}
.footer-actions{grid-area:actions;display:grid;grid-template-columns:repeat(2,minmax(140px,1fr));align-content:start;justify-content:stretch}
.footer-actions .ghost-button{padding:10px 12px;font-size:.98rem}
.tv-registered-title-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.tv-registered-page-indicator{font-size:20px;font-weight:800;color:#1E1E1E;background:rgba(255,255,255,.72);padding:8px 14px;border-radius:999px;border:1px solid rgba(15,23,42,.08)}
.tv-registered-dots{display:flex;justify-content:center;gap:8px;margin-top:14px}
.tv-dot{width:10px;height:10px;border-radius:999px;background:rgba(71,85,105,.25)}
.tv-dot.active{background:#0A0A0A;transform:scale(1.15)}
@media (max-width:1100px){
  .sc-empty.card{min-height:calc(100vh - 76px);padding:18px}
  .score-footer-tools{grid-template-columns:1fr;grid-template-areas:'history' 'legs' 'actions'}
  .footer-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ── Delete tournament ──────────────────────────────────────────────── */
.button-link.danger { background: var(--error); }
.delete-tournament-form { display:inline; margin:0; padding:0; }

dialog { border:0; border-radius:18px; padding:0; box-shadow:0 24px 60px rgba(0,0,0,.35); max-width:min(90vw, 520px); }
dialog::backdrop { background:rgba(0,0,0,.5); }
.dialog-body { padding:32px 36px; display:flex; flex-direction:column; gap:18px; }
.dialog-title { margin:0; font-size:1.25rem; font-weight:800; }
.dialog-text { margin:0; line-height:1.6; color:#64748B; }
.dialog-actions { display:flex; gap:12px; justify-content:flex-end; }
.dialog-actions button { padding:10px 20px; font-size:1rem; }
/* ─────────────────────────────────────────────────────────────────── */


/* V11.4.5 actual fixes */
.group-standings-callout{margin-top:14px;padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.22);border:1px solid rgba(0,0,0,.12);color:#2f2f2f;width:100%;box-sizing:border-box}
.group-standings-callout.in-match{margin:10px 0 0;background:#f3ede3}
.group-standings-callout.compact{padding:10px 12px}
.group-standings-title{font-size:1rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;margin-bottom:10px;color:#3a342b}
.group-standings-table{display:grid;gap:6px}
.group-standings-head,.group-standings-row{display:grid;grid-template-columns:52px minmax(0,1fr) 58px 46px 62px;gap:8px;align-items:center}
.group-standings-head{font-size:.82rem;font-weight:800;color:#6b6254;text-transform:uppercase}
.group-standings-row{padding:9px 10px;border-radius:12px;background:rgba(255,255,255,.7);font-weight:700}
.group-standings-row .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.group-standings-row.highlight{background:#eca823;color:#2f2f2f;box-shadow:0 0 0 2px rgba(236,168,35,.32) inset}

@media (orientation: landscape) and (max-height: 900px) {
  .score-header{padding:8px 10px}
  .header-square{width:54px;height:54px;font-size:20px}
  .header-app-name{font-size:12px}
  .header-title-row strong{font-size:26px}
  .scoreboard-panel{min-height:132px}
  .score-player{padding:10px 12px 42px}
  .score-player-name{font-size:clamp(18px,2.2vw,26px)}
  .score-player-main{font-size:clamp(44px,6vw,82px)}
  .score-player-bottom strong{font-size:20px}
  .x01-screen{grid-template-columns:88px 1fr 156px 230px}
  .x01-side-actions{padding:8px;gap:6px}
  .quick-chip{padding:8px 2px;font-size:13px}
  .x01-inline-tools{padding:8px;gap:8px}
  .inline-tool{font-size:.92rem;padding:10px 8px}
  .entry-mode-label{padding:10px 12px 4px;font-size:13px}
  .selector-group.stacked{padding:0 12px 8px}
  .entry-score-card{padding:8px}
  .points-display.v96{font-size:clamp(44px,7vw,84px)}
  .entry-caption{font-size:16px}
  .entry-cta{font-size:22px;min-height:62px}
  .score-footer-tools{padding:6px 10px}
  .history-strip{min-height:34px}
  .visit-pill{padding:6px 10px}
}

@media (orientation: landscape) and (max-height: 700px) {
  .group-standings-row{padding:7px 9px}
  .group-standings-title{margin-bottom:8px;font-size:.92rem}
}

/* ── Auth / Login ────────────────────────────────────────────────── */
.nav-logout-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: .85rem;
  padding: 3px 10px;
  line-height: 1.6;
}
.nav-logout-btn:hover {
  background: var(--border);
}
.badge-admin {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  padding: 1px 8px;
  vertical-align: middle;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.stack-space { display: flex; flex-direction: column; gap: 12px; }
.stack-space label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.stack-space input[type="email"],
.stack-space input[type="password"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   DartUP — Écran arbitre / referee board  (rb-*)
   Thème sombre, optimisé tablette portrait
════════════════════════════════════════════════════════════════ */

/* ── Base ── */
.rb-body {
  margin: 0;
  background: #080808;
  color: #CBD5E1;
  font-family: var(--font, system-ui, sans-serif);
  height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.rb-app {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Désactivé (mode électronique) ── */
.rb-disabled {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px 24px;
  color: #64748B;
}
.rb-disabled-icon { font-size: 3.5rem; margin-bottom: 20px; }
.rb-disabled h2 { font-size: 1.4rem; color: #64748B; margin: 0 0 12px; }
.rb-disabled p { font-size: .95rem; color: #64748B; max-width: 360px; }

/* ══════════════════════════════════════════════════════════
   ÉCRAN D'APPEL DE MATCH
══════════════════════════════════════════════════════════ */
.rb-call-screen {
  /* JS set display:block — inner wrapper handles flex */
  height: 100dvh;
  overflow-y: auto;
  box-sizing: border-box;
}

.rb-call-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px 20px 0;
  box-sizing: border-box;
}

.rb-call-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.rb-call-cible {
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #94A3B8;
}

.rb-brand-chip {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: .12em;
  color: #007BFF;
}

.rb-call-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
  min-height: 0;
}

.rb-call-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #f1f5f9;
  text-align: center;
  margin: 0;
}

.rb-call-hint {
  text-align: center;
  color: #64748B;
  font-size: .95rem;
  margin: 0;
}

/* Carte prochain match */
.rb-next-match-card {
  background: #121212;
  border: 1px solid #1e3a5f;
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
}

.rb-next-label {
  font-size: .8rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 20px;
}

.rb-next-versus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rb-next-player {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
}

.rb-next-vs {
  font-size: .85rem;
  font-weight: 900;
  color: #007BFF;
  background: #1e3a5f;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rb-muted { color: #64748B !important; }

/* Arbitre appelé */
.rb-referee-callout {
  background: #007BFF;
  border: 2px solid #00D1FF;
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Classement de poule (appel + match) */
.rb-standings-block {
  background: #121212;
  border: 1px solid #1A1A1A;
  border-radius: 14px;
  padding: 14px;
  font-size: .9rem;
}
.rb-standings-block .group-standings-title { color: #64748B; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.rb-standings-block .group-standings-head { display: grid; grid-template-columns: 28px 1fr 30px 36px 30px 44px; gap: 4px; padding: 4px 8px; color: #64748B; font-size: .75rem; font-weight: 700; border-bottom: 1px solid #1A1A1A; margin-bottom: 4px; }
.rb-standings-block .group-standings-row { display: grid; grid-template-columns: 28px 1fr 30px 36px 30px 44px; gap: 4px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.88); color: #111111; font-size: .85rem; }
.rb-standings-block .group-standings-row.highlight { background: #1e3a5f; color: #E8F4FF; font-weight: 700; }
.rb-standings-block .group-standings-row .name { font-weight: 600; }

/* Footer appel */
.rb-call-footer {
  padding: 16px 0 28px;
}
.rb-call-inline-cta {
  padding: 16px 0 8px;
}

/* ── Tag visite courante ── */
.rb-tag-visit {
  background: rgba(0,209,255,.15);
  color: #00D1FF;
  border: 1px solid rgba(0,209,255,.3);
  font-weight: 800;
}

/* ── Boutons CTA ── */
.rb-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 20px;
  border-radius: 14px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: filter .1s, transform .1s;
  user-select: none;
}
.rb-cta:active { filter: brightness(.85); transform: scale(.98); }
.rb-cta.busy { opacity: .6; pointer-events: none; }

.rb-cta-primary { background: #007BFF; color: #fff; }
.rb-cta-ghost { background: #1A1A1A; color: #94A3B8; border: 1px solid #1E1E1E; }
.rb-cta-green { background: #16a34a; color: #fff; }
.rb-cta-danger { background: #dc2626; color: #fff; }
.rb-cta-start { background: #0ea5e9; color: #fff; }

.rb-two-ctas { display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════════════════════
   ÉCRAN DE MATCH — contenu dans le viewport, pas de scroll
══════════════════════════════════════════════════════════ */
.rb-match-screen {
  /* JS set display:flex */
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: #080808;
}

/* Sections fixes (ne grandissent pas) */
.rb-header,
.rb-variant-strip,
.rb-checkout-banner,
.rb-standings-block.rb-in-match,
.rb-scoreboard,
.rb-footer { flex-shrink: 0; }

/* ── Header ── */
.rb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0A0A0A;
  padding: 8px 14px;
  border-bottom: 1px solid #1A1A1A;
}

.rb-header-left { display: flex; align-items: center; gap: 10px; }

.rb-header-num {
  background: #007BFF;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rb-header-info { display: flex; flex-direction: column; gap: 2px; }

.rb-header-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.rb-variant-tag {
  font-size: 1rem;
  font-weight: 900;
  color: #007BFF;
  letter-spacing: .04em;
}

.rb-tag {
  font-size: .72rem;
  color: #64748B;
  background: #1A1A1A;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .03em;
}

.rb-header-context { font-size: .78rem; color: #64748B; }
.rb-header-referee {
  font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #00D1FF; background: rgba(0,209,255,.10); border: 1px solid rgba(0,209,255,.22);
  border-radius: 6px; padding: 3px 10px; display: inline-block; margin-top: 2px;
}
.rb-header-cork { font-size: .78rem; color: #22C55E; font-weight: 700; }

.rb-header-right { display: flex; align-items: center; gap: 8px; }

.rb-sync {
  font-size: .72rem;
  color: #64748B;
  font-weight: 600;
}
.rb-sync.connected { color: #22C55E; }

.rb-icon-btn {
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  color: #94A3B8;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .1s;
}
.rb-icon-btn:active { background: #1E1E1E; }

/* Variant strip */
.rb-variant-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #0A0A0A;
  border-bottom: 1px solid #1A1A1A;
  flex-shrink: 0;
}
.rb-variant-label { font-size: .8rem; color: #64748B; margin-right: 4px; }
.rb-variant-btn {
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid #1E1E1E;
  background: #1A1A1A;
  color: #64748B;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.rb-variant-btn.active { background: #007BFF; color: #fff; border-color: #007BFF; }
.rb-variant-btn.variant-locked { opacity: .45; cursor: not-allowed; }

/* ── Cork ── */
/* ── Modal backdrop ── */
.rb-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.68);
  z-index: 900;
}
.rb-modal-backdrop.visible { display: block; }

/* ── Cork / Confirm / Reset modals (fixed centered) ── */
.rb-cork-panel,
.rb-confirm-panel,
.rb-reset-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 910;
  background: #0d1520;
  border-radius: 16px;
  padding: 26px 22px;
  width: min(92vw, 400px);
  box-shadow: 0 12px 48px rgba(0,0,0,.85);
}
.rb-cork-panel { border: 1px solid rgba(245,158,11,.45); }
.rb-confirm-panel { border: 1px solid rgba(251,191,36,.45); }
.rb-reset-confirm { border: 1px solid rgba(239,68,68,.45); }

.rb-cork-title {
  font-size: 1rem;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: .1em;
  text-align: center;
  margin-bottom: 8px;
}
.rb-cork-text { color: #94a3b8; font-size: .9rem; text-align: center; margin: 0 0 16px; }
.rb-cork-confirm { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.rb-cork-confirm-text { font-size: 1rem; font-weight: 700; color: #f1f5f9; text-align: center; margin-bottom: 12px; }

/* ── Checkout ── */
.rb-checkout-banner {
  background: #052e16;
  border-bottom: 2px solid #22C55E;
  padding: 14px 16px;
  text-align: center;
  flex-shrink: 0;
}
.rb-checkout-text { font-size: 1.1rem; font-weight: 800; color: #22C55E; margin-bottom: 10px; }

/* ── Confirm match ── */
.rb-confirm-title { font-size: .95rem; font-weight: 700; color: #fbbf24; text-align: center; margin-bottom: 14px; }

/* ── Reset confirm ── */
.rb-reset-confirm-title { font-size: 1rem; font-weight: 900; color: #ef4444; letter-spacing: .06em; text-align: center; margin-bottom: 16px; }

/* ── Scoreboard ── */
.rb-scoreboard {
  display: flex;
  border-bottom: 2px solid #1A1A1A;
  flex-shrink: 0;
}
.rb-player { flex: 1 1 0; min-width: 0; }

.rb-player {
  background: #0d1520;
  padding: 14px 12px 12px;
  text-align: center;
  transition: background .2s;
  border-right: 1px solid #1A1A1A;
}
.rb-player-right { border-right: none; }

.rb-player.active-turn {
  background: #091930;
  border-bottom: 3px solid #007BFF;
}

.rb-player-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.rb-player-top-right { flex-direction: row-reverse; }

.rb-state {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  color: #94A3B8;
  background: #1A1A1A;
  padding: 3px 7px;
  border-radius: 5px;
  line-height: 1.3;
}
.rb-player.active-turn .rb-state {
  color: #66B3FF;
  background: #1e3a5f;
}

.rb-legs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}
.rb-legs span { font-size: .6rem; color: #64748B; font-weight: 700; letter-spacing: .06em; }
.rb-legs strong { font-size: 1.4rem; font-weight: 900; color: #CBD5E1; }

.rb-player-name {
  font-size: .95rem;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-player.active-turn .rb-player-name { color: #94A3B8; }

.rb-player-score {
  font-size: 4.4rem;
  font-weight: 900;
  color: #CBD5E1;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.rb-player.active-turn .rb-player-score { color: #60a5fa; }

.rb-player-avg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: .75rem;
  color: #64748B;
  margin-top: 4px;
}
.rb-player-avg strong { color: #64748B; font-weight: 700; }

.rb-winner-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 8px;
  background: #052e16;
  color: #22C55E;
  border: 1px solid #16a34a;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .1s;
}
.rb-winner-btn:active { background: #14532d; }

/* ══════════════════════════════════════════════════════════
   ZONE X01 — remplit l'espace restant, pas de scroll
══════════════════════════════════════════════════════════ */
.rb-x01-zone {
  /* JS set display:flex */
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sections fixes dans x01 */
.rb-chips-row,
.rb-x01-entry { flex-shrink: 0; }

/* Chips rapides */
.rb-chips-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.rb-chips-row::-webkit-scrollbar { display: none; }

.rb-chip {
  flex-shrink: 0;
  padding: 9px 16px;
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 10px;
  color: #94A3B8;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s;
}
.rb-chip:active { background: #293548; }
.rb-chip-bust { color: #ef4444; border-color: #450a0a; background: #0f0404; opacity: .7; }
.rb-chip-miss { color: #f59e0b; border-color: #78350f; }

/* Entrée score + sélecteur joueur */
.rb-x01-entry {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.rb-slot-group {
  display: flex;
  flex-direction: column;
  border: 1px solid #1E1E1E;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.rb-slot-btn {
  flex: 1;
  padding: 12px 18px;
  background: #1A1A1A;
  border: none;
  color: #64748B;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .1s;
}
.rb-slot-btn + .rb-slot-btn { border-top: 1px solid #1E1E1E; }
.rb-slot-btn.active { background: #1e3a5f; color: #60a5fa; }

.rb-score-display-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rb-score-input {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 3rem;
  font-weight: 900;
  background: #121212;
  border: 2px solid #1E1E1E;
  border-radius: 12px;
  color: #f1f5f9;
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.rb-score-input::-webkit-inner-spin-button,
.rb-score-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.rb-score-input:focus { outline: none; border-color: #007BFF; }

.rb-score-caption {
  font-size: .75rem;
  color: #64748B;
  text-align: center;
  font-weight: 600;
}

/* Pavé numérique — flex:1 pour remplir l'espace disponible */
.rb-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.rb-key {
  height: auto;
  min-height: 52px;
  background: #121212;
  border: 1px solid #1A1A1A;
  border-radius: 12px;
  color: #CBD5E1;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .08s, transform .08s;
  user-select: none;
}
.rb-key:active { background: #1A1A1A; transform: scale(.96); }
.rb-key-wide { grid-column: span 2; font-size: 1.4rem; color: #64748B; }

/* Le bouton valider de x01 ne se réduit pas */
.rb-x01-zone > .rb-cta { flex-shrink: 0; margin-bottom: 10px; }

/* ══════════════════════════════════════════════════════════
   ZONE CRICKET — remplit l'espace restant, pas de scroll
══════════════════════════════════════════════════════════ */
.rb-cricket-zone {
  /* JS set display:flex */
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 0;
}

.rb-cricket-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Plateau */
.rb-cricket-board {
  background: #121212;
  border: 1px solid #1A1A1A;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rb-cricket-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  text-align: center;
  padding: 10px 8px;
  background: #0A0A0A;
  font-size: .78rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: .05em;
  border-bottom: 1px solid #1A1A1A;
}
.rb-cricket-head .center { color: #94A3B8; }
.rb-cricket-head .right { text-align: right; }

.rb-cricket-rows { flex: 1; }

.rb-cricket-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border-bottom: 1px solid #1A1A1A;
}
.rb-cricket-row:last-child { border-bottom: none; }

.rb-cricket-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #60a5fa;
  min-height: 44px;
}
.rb-cricket-mark.right { border-left: 1px solid #1A1A1A; }
.rb-cricket-mark.left { border-right: 1px solid #1A1A1A; }

.rb-cricket-target {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  font-size: .9rem;
  font-weight: 800;
  color: #94A3B8;
}

/* Saisie cricket */
.rb-cricket-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rb-turn-preview {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.rb-turn-pill {
  flex: 1;
  padding: 8px 6px;
  background: #1e3a5f;
  border: 1px solid #007BFF;
  border-radius: 8px;
  color: #60a5fa;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}

.rb-cricket-quick {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.rb-dart-selector {
  display: flex;
  gap: 6px;
}

.rb-dart-pill {
  flex: 1;
  padding: 10px 6px;
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 9px;
  color: #64748B;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.rb-dart-pill.active { background: #1e3a5f; border-color: #007BFF; color: #60a5fa; }

.rb-dart-card-label { font-size: .72rem; color: #64748B; text-align: center; margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; }

.rb-hit-group {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.rb-hit-btn {
  flex: 1;
  padding: 11px 4px;
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 8px;
  color: #94A3B8;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.rb-hit-btn.active { background: #1e3a5f; border-color: #007BFF; color: #60a5fa; }

.rb-target-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.rb-target-btn {
  padding: 10px 4px;
  background: #1A1A1A;
  border: 1px solid #1E1E1E;
  border-radius: 8px;
  color: #94A3B8;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.rb-target-btn.active { background: #1e3a5f; border-color: #007BFF; color: #60a5fa; }

/* ══════════════════════════════════════════════════════════
   FOOTER — outils d'annulation uniquement
══════════════════════════════════════════════════════════ */
.rb-footer {
  background: #0a0f1e;
  border-top: 1px solid #1A1A1A;
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Outils */
.rb-footer-tools {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.rb-tool-btn {
  flex: 1;
  padding: 11px 8px;
  background: #121212;
  border: 1px solid #1A1A1A;
  border-radius: 9px;
  color: #64748B;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.rb-tool-btn:active { background: #1A1A1A; }
.rb-tool-btn.rb-tool-warn { color: #f59e0b; border-color: #451a03; }
.rb-tool-btn.rb-tool-warn:active { background: #1c0a00; }
.rb-tool-btn.rb-tool-danger { color: #ef4444; border-color: #450a0a; }
.rb-tool-btn.rb-tool-danger:active { background: #1a0404; }
.rb-tool-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   Responsive — tablette portrait jusqu'à 480px
══════════════════════════════════════════════════════════ */
/* Petit téléphone */
@media (max-width: 400px) {
  .rb-next-player { font-size: 1.1rem; }
  .rb-player-score { font-size: 2.8rem; }
  .rb-key { font-size: 1.4rem; min-height: 44px; }
  .rb-chip { padding: 7px 10px; font-size: .82rem; }
  .rb-player { padding: 10px 8px 8px; }
}

/* iPad et grandes tablettes portrait — keypad plus généreux */
@media (min-height: 900px) {
  .rb-key { font-size: 2.2rem; }
  .rb-player-score { font-size: 5rem; }
  .rb-chips-row .rb-chip { padding: 10px 18px; font-size: 1rem; }
}

@media (min-width: 600px) and (min-height: 800px) {
  .rb-player-score { font-size: 4.8rem; }
  .rb-next-player { font-size: 1.8rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC VIEWER  (pub-* / pm-*)
   Pages sans authentification — thème sombre DartUP
════════════════════════════════════════════════════════════════ */

/* ── Variables locales ── */
.pub-body, .pub-match-body {
  --pm-primary:  #007BFF;
  --pm-secondary:#00D1FF;
  --pm-dark:   #0A0A0A;
  --pm-dark2:  #141414;
  --pm-dark3:  #1A1A1A;
  --pm-dark4:  #222222;
  --pm-border: rgba(255,255,255,.08);
  --pm-text:   #F0F0F0;
  --pm-muted:  #64748B;
  --pm-p1:     #007BFF;
  --pm-p2:     #00D1FF;
}

.pub-body {
  margin: 0;
  background: #0A0A0A;
  color: var(--pm-text);
  font-family: var(--font);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC HEADER  (shared)
════════════════════════════════════════════════════════════════ */
.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: #0d0d0d;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 12px;
}

.pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 1;
  transition: opacity .15s;
}
.pub-brand:hover { opacity: .82; text-decoration: none; }
.pub-body a:hover, .pub-match-body a:hover { text-decoration: none; }
.pub-brand-logo { display: block; height: 28px; width: auto; }
/* Compatibility stubs */
.pub-brand-icon { display: none; }
.pub-brand-name { display: none; }
.pub-brand-tag  {
  font-size: .72rem; color: #64748B; font-weight: 600;
  background: #1A1A1A; border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px; padding: 2px 8px; letter-spacing: .04em; text-transform: uppercase;
}

.pub-header-right { display: flex; align-items: center; gap: 8px; }

.pub-back {
  color: #777;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid #333;
  transition: background .12s;
}
.pub-back:hover { background: #1e1e1e; color: #ccc; }

.pub-header-btn {
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.pub-header-btn-primary { background: #007BFF; color: #fff; }
.pub-header-btn-primary:hover { background: #005FD4; }
.pub-header-btn-outline { background: transparent; color: #aaa; border: 1px solid #444; }
.pub-header-btn-outline:hover { background: #1A1A1A; color: #F0F0F0; }
.pub-header-btn-ghost { background: transparent; color: #666; border: 1px solid #333; }
.pub-header-btn-ghost:hover { background: #141414; color: #aaa; }

/* ═══════════════════════════════════════════════════════════════
   PUBLIC SEARCH PAGE  (pub-*)
════════════════════════════════════════════════════════════════ */

.pub-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.pub-hero { text-align: center; margin-bottom: 36px; }
.pub-hero-logo { font-size: 2.5rem; margin-bottom: 10px; }
.pub-hero-logo-img { height: 52px; width: auto; margin: 0 auto 16px; display: block; }
.pub-hero-title { font-size: 1.7rem; font-weight: 900; color: #F0F0F0; margin: 0 0 8px; }
.pub-hero-sub { color: #64748B; font-size: .95rem; margin: 0; max-width: 480px; margin-inline: auto; }

.pub-search-form { margin-bottom: 36px; }
.pub-search-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.pub-search-field { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 5px; }
.pub-search-field label { font-size: .8rem; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .05em; }
.pub-search-field input {
  padding: 11px 14px;
  border: 1px solid #333;
  border-radius: 10px;
  font-size: .95rem;
  background: #141414;
  color: #F0F0F0;
  outline: none;
  transition: border-color .15s;
}
.pub-search-field input:focus { border-color: #007BFF; }
.pub-search-btn {
  padding: 11px 26px;
  background: #007BFF;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.pub-search-btn:hover { background: #005FD4; }

.pub-section { margin-bottom: 32px; }
.pub-section-title {
  font-size: .82rem; font-weight: 800; color: #666;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #222222;
}

.pub-dot { color: #444; margin: 0 4px; }
.pub-empty { color: #555; text-align: center; padding: 40px 20px; font-size: .95rem; }

.pub-tournament-list { display: flex; flex-direction: column; gap: 6px; }
.pub-tournament-card {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 12px;
  background: #141414; border: 1px solid #222222; border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  transition: border-color .15s, background .15s;
}
.pub-tournament-card:hover { border-color: #007BFF; background: #1e1e1e; text-decoration: none; }
.pub-tc-header { display: flex; align-items: center; gap: 10px; }
.pub-tc-name { font-weight: 700; font-size: .95rem; color: #F0F0F0; }
.pub-tc-badge {
  font-size: .7rem; font-weight: 700; background: #222222; color: #666;
  border-radius: 5px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.pub-tc-done { background: rgba(34,197,94,.10); color: #22C55E; }
.pub-tc-live { background: #2b1a00; color: #f59e0b; }
.pub-tc-meta { font-size: .8rem; color: #555; }
.pub-tc-arrow { color: #444; font-size: 1.1rem; }

.pub-player-list { display: flex; flex-direction: column; gap: 6px; }
.pub-player-card {
  display: flex; align-items: center; gap: 12px;
  background: #141414; border: 1px solid #222222; border-radius: 10px;
  padding: 12px 14px; text-decoration: none; color: inherit; transition: border-color .15s;
}
.pub-player-card:hover { border-color: #007BFF; text-decoration: none; }
.pub-player-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #007BFF; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .95rem; flex-shrink: 0;
}
.pub-player-info { flex: 1; }
.pub-player-info strong { display: block; color: #F0F0F0; font-size: .9rem; }
.pub-player-info span { color: #555; font-size: .8rem; }
.pub-player-arrow { color: #444; font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════════
   PUBLIC TOURNAMENT PAGE
════════════════════════════════════════════════════════════════ */

.pub-tourn-head { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid #222222; }
.pub-tourn-name { font-size: 1.6rem; font-weight: 900; color: #F0F0F0; margin: 0 0 8px; }
.pub-tourn-meta { font-size: .83rem; color: #666; }

.pub-group-block {
  background: #141414; border: 1px solid #222222; border-radius: 14px;
  overflow: hidden; margin-bottom: 20px;
}
.pub-group-header {
  background: #007BFF; color: #fff;
  font-weight: 800; font-size: .88rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 16px;
}
.pub-group-table { padding: 8px 10px 0; }
.pub-gt-head, .pub-gt-row {
  display: grid;
  grid-template-columns: 26px 1fr 30px 26px 26px 54px 40px;
  gap: 4px; padding: 5px 8px; font-size: .82rem; align-items: center;
}
.pub-gt-head { color: #555; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #222; margin-bottom: 4px; }
.pub-gt-row:nth-child(even) { background: rgba(255,255,255,.02); }
.pub-gt-name { font-weight: 600; color: #e0e0e0; }
.pub-qualified .pub-gt-name { color: #60a5fa; font-weight: 700; }
.pub-qualified { border-left: 3px solid #007BFF; }

.pub-round-label {
  font-size: .72rem; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px 4px;
}

.pub-match-row {
  display: grid; grid-template-columns: 1fr 64px 1fr 18px;
  align-items: center; gap: 8px; padding: 10px 16px;
  text-decoration: none; color: inherit;
  border-top: 1px solid #222; transition: background .1s;
}
.pub-match-row:hover { background: rgba(255,255,255,.03); text-decoration: none; }
.pub-match-p1 { text-align: right; font-size: .88rem; color: #aaa; }
.pub-match-p2 { text-align: left; font-size: .88rem; color: #aaa; }
.pub-match-score {
  font-size: .95rem; font-weight: 900; color: #F0F0F0;
  text-align: center; white-space: nowrap; background: #222; border-radius: 6px; padding: 4px 6px;
}
.pub-match-arrow { color: #444; font-size: .9rem; text-align: center; }
.pub-winner { color: #007BFF; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   PUBLIC MATCH DETAIL  (pm-*)
════════════════════════════════════════════════════════════════ */

.pub-match-body { background: #0A0A0A; }
.pm-wrap { max-width: 860px; margin: 0 auto; padding-bottom: 60px; }

/* Scoreboard */
.pm-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr;
  background: #141414; border-bottom: 2px solid #007BFF; min-height: 90px;
}
.pm-sb-player {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 12px; gap: 4px;
}
.pm-sb-p1 { border-right: 1px solid #222222; }
.pm-sb-p2 { border-left: 1px solid #222222; }
.pm-sb-winner { background: #1a0a0a; }
.pm-sb-winner .pm-sb-name { color: #EF4444; }
.pm-sb-winner .pm-sb-legs { color: #fff; }
.pm-sb-name {
  font-size: .82rem; font-weight: 700; color: #666; text-align: center; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
}
.pm-sb-legs { font-size: 3rem; font-weight: 900; color: #ccc; line-height: 1; font-variant-numeric: tabular-nums; }
.pm-sb-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 16px; gap: 3px; text-align: center;
}
.pm-sb-ctx { font-size: .72rem; color: #555; font-weight: 600; white-space: nowrap; overflow: hidden; max-width: 200px; text-overflow: ellipsis; }
.pm-sb-mode { font-size: .72rem; color: #444; }
.pm-sb-status {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  margin-top: 4px; padding: 2px 8px; border-radius: 4px;
}
.pm-sb-status-completed { color: #22C55E; background: rgba(34,197,94,.10); }
.pm-sb-status-in_progress { color: #fbbf24; background: #1a1400; }
.pm-sb-status-assigned, .pm-sb-status-pending { color: #555; background: #141414; }

/* Onglets */
.pm-tabs {
  display: flex; background: #141414;
  border-bottom: 1px solid #222222; overflow-x: auto; scrollbar-width: none;
}
.pm-tabs::-webkit-scrollbar { display: none; }
.pm-tab {
  flex-shrink: 0; padding: 12px 20px;
  font-size: .85rem; font-weight: 700; color: #555;
  background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.pm-tab:hover { color: #aaa; }
.pm-tab.active { color: #FFFFFF; border-bottom-color: #007BFF; }

.pm-tab-content { display: none; }
.pm-tab-content.active { display: block; }

.pm-empty { color: #555; text-align: center; padding: 48px 20px; font-size: .95rem; }
.pm-empty-cell { color: #555; text-align: center; padding: 16px; font-size: .85rem; font-style: italic; }

/* Selecteur leg */
.pm-leg-selector {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px 16px; background: #141414; border-bottom: 1px solid #222;
}
.pm-leg-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid #333; background: #111; color: #666;
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pm-leg-btn:hover { border-color: #555; color: #aaa; }
.pm-leg-btn.active { background: #007BFF; border-color: #007BFF; color: #fff; }
.pm-leg-btn-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pm-dot-p1 { background: #EF4444; }
.pm-dot-p2 { background: #007BFF; }

.pm-leg-panel { display: none; }
.pm-leg-panel.active { display: block; }

/* Tables */
.pm-leg-table { width: 100%; border-collapse: collapse; font-size: .88rem; color: #ccc; }
.pm-leg-table th {
  background: #007BFF; color: #fff;
  padding: 9px 10px; font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}

/* X01 table */
.pm-x01-table th.pm-th-round { width: 40px; text-align: center; background: #1a0a0a; color: #888; }
.pm-x01-table th.pm-th-p1 { background: #6b1a1a; text-align: right; }
.pm-x01-table th.pm-th-p2 { background: #1a3b6b; text-align: left; }
.pm-x01-table th.pm-th-pts, .pm-x01-table th.pm-th-rem { width: 68px; text-align: center; }
.pm-x01-table th.pm-th-name { width: 100px; }

.pm-row-start td { padding: 6px 10px; font-size: .82rem; }
.pm-td-start, .pm-td-start-r { text-align: center; color: #888; font-weight: 700; }
.pm-td-round-zero { color: #444; font-size: .75rem; background: #111; text-align: center; }

.pm-row-pair td { padding: 7px 10px; border-bottom: 1px solid #1e1e1e; }
.pm-row-pair:hover td { background: rgba(255,255,255,.015); }
.pm-td-round { background: #0d0d0d; text-align: center; color: #555; font-size: .78rem; font-weight: 700; }
.pm-td-points { text-align: center; font-weight: 700; color: #e0e0e0; }
.pm-td-rem { text-align: center; color: #777; font-variant-numeric: tabular-nums; }
.pm-td-p1 { background: rgba(192,57,43,.08); }
.pm-td-rem-p1 { background: rgba(192,57,43,.04); }
.pm-td-p2 { background: rgba(59,130,246,.08); }
.pm-td-rem-p2 { background: rgba(59,130,246,.04); }
.pm-td-player-name { width: 0; padding: 0 !important; }

.pm-bust-val { color: #dc2626 !important; }
.pm-finish-val { color: #22C55E !important; font-weight: 900 !important; }
.pm-zero { color: #22C55E !important; font-weight: 900 !important; font-size: 1.05rem; }
.pm-bust { font-size: .75rem; font-weight: 800; letter-spacing: .04em; }

.pm-row-footer td {
  text-align: center; padding: 8px; font-size: .8rem; color: #555;
  background: #0d0d0d; border-top: 1px solid #222222;
}
.pm-row-footer strong { color: #22C55E; }

/* Cricket */
.pm-cricket-table .pm-th-player { text-align: left; width: 140px; }
.pm-row-p1 td { background: rgba(192,57,43,.06); }
.pm-row-p2 td { background: rgba(59,130,246,.06); }
.pm-cricket-table td { padding: 8px 12px; border-bottom: 1px solid #1e1e1e; vertical-align: middle; }
.pm-td-player { font-weight: 700; color: #ccc; font-size: .85rem; }
.pm-td-darts { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0; }
.pm-dart {
  display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: .8rem; font-weight: 700;
  background: #222222; color: #ccc; border: 1px solid #333;
}
.pm-dart-miss { color: #444; background: #141414; border-color: #222222; }
.pm-dart-d { color: #60a5fa; background: #0f2340; border-color: #1e3a6b; }
.pm-dart-t { color: #c084fc; background: #1a0f2e; border-color: #3b1e6b; }

/* Stats */
.pm-stat-section { padding: 0 16px 20px; border-bottom: 1px solid #222; margin-bottom: 20px; }
.pm-stat-section:last-child { border-bottom: none; }
.pm-stat-title {
  font-size: .75rem; font-weight: 800; color: #555;
  text-transform: uppercase; letter-spacing: .08em; padding: 14px 0 10px;
}
.pm-stat-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.pm-stat-table th {
  background: #007BFF; color: #fff;
  padding: 8px 12px; font-size: .75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; text-align: center; white-space: nowrap;
}
.pm-stat-table th:first-child { text-align: left; }
.pm-th-p1 { background: #6b1a1a !important; }
.pm-th-p2 { background: #1a3b6b !important; }
.pm-stat-table td { padding: 8px 12px; border-bottom: 1px solid #1e1e1e; color: #ccc; text-align: center; }
.pm-stat-table td:first-child { text-align: left; }
.pm-stat-table tr:last-child td { border-bottom: none; }
.pm-td-name-p1 { color: #EF4444 !important; font-weight: 700; }
.pm-td-name-p2 { color: #60a5fa !important; font-weight: 700; }
.pm-td-winner { font-weight: 700; color: #00D1FF; }
.pm-td-checkout { color: #22C55E !important; }
.pm-td-180 { color: #c084fc; font-weight: 700; }
.pm-stat-perleg th, .pm-stat-perleg td { min-width: 40px; }

/* Infos */
.pm-info-grid { padding: 16px; display: flex; flex-direction: column; gap: 0; }
.pm-info-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #1e1e1e; font-size: .88rem;
}
.pm-info-row:last-child { border-bottom: none; }
.pm-info-row span { color: #555; min-width: 140px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.pm-info-row strong { color: #e0e0e0; font-weight: 600; }

/* Responsive */
@media (max-width: 540px) {
  .pub-search-row { flex-direction: column; }
  .pub-search-btn { width: 100%; }
  .pub-gt-head, .pub-gt-row { grid-template-columns: 20px 1fr 26px 22px 22px 44px 34px; font-size: .74rem; }
  .pub-match-row { padding: 9px 12px; }
  .pm-sb-legs { font-size: 2.4rem; }
  .pm-sb-name { font-size: .75rem; max-width: 90px; }
  .pm-sb-ctx { max-width: 120px; }
  .pm-leg-table { font-size: .8rem; }
  .pm-stat-table { font-size: .78rem; }
  .pm-stat-table td, .pm-stat-table th { padding: 6px 8px; }
  .pm-info-row span { min-width: 110px; }
}


/* ═══════════════════════════════════════════════════════
   DartUP Brand Overrides — hiérarchie typographique
   ═══════════════════════════════════════════════════════ */

/* Headings : Inter, tranchant */
h1, h2, h3, h4 {
  font-family: var(--font);
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Liens admin → brand blue */
a { color: var(--primary); }

/* Inputs dark mode */
input:not([type=checkbox]):not([type=radio]),
textarea,
select {
  background: #1A1A1A;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Bouton primaire avec glow */
button, .button-link {
  transition: opacity .15s, box-shadow .15s;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
}
button:hover, .button-link:hover {
  box-shadow: 0 0 0 3px var(--primary-glow);
}
button.secondary { background: #222222; color: var(--text-secondary); border: 1px solid var(--border); }
button.secondary:hover { box-shadow: none; background: #2A2A2A; }

/* Table dark mode */
th {
  background: #0A0A0A;
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
td { color: var(--text); }
tr:hover td { background: rgba(255,255,255,.03); }

/* Stat box dark */
.stat-box {
  background: #141414;
  border: 1px solid var(--border);
}
.stat-box strong { color: var(--text); }

/* Card dark */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* Flash messages */
.flash.info { background: #1A2540; border: 1px solid rgba(0,123,255,.25); }

/* Group tile dark */
.group-tile { background: #141414; color: var(--text); }
.group-tile:hover { border-color: var(--primary); }

/* Board card dark */
.board-card { background: #141414; }
.board-card.board-assigned,
.board-card.board-in_progress { background: rgba(0,123,255,.08); border-color: rgba(0,123,255,.25); }

/* Match cards */
.match-card { background: #161616; }
.match-card.match-done { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.25); }
.match-card.match-ready { background: #161616; border-color: var(--primary); }

/* Locked match hint → brand warning */
.match-locked-hint { background: var(--warning-bg); border-color: rgba(245,158,11,.25); color: var(--warning); }

/* Inline notes dark */
.inline-note.warning { background: var(--warning-bg); color: var(--warning); }
.inline-note.error   { background: var(--error-bg);   color: var(--error); }

/* qualified row in tables */
tr.qualified td { background: rgba(34,197,94,.07); }

/* Referee legacy body */
.referee-body { background: #0A0A0A; }
.referee-card { background: #141414; border-color: var(--border); }
.referee-player { background: #141414; border-color: var(--border); }

/* TV pro board card tweak */
.tv-board-card.in_progress {
  border-color: rgba(0,123,255,.55);
  box-shadow: 0 0 0 2px rgba(0,123,255,.15), 0 0 20px rgba(0,123,255,.07);
}

/* Active player glow — cyan pour bien se démarquer du blue */
.player-panel.current-turn { outline: 3px solid rgba(0,209,255,.50); box-shadow: 0 0 20px rgba(0,209,255,.08); }

/* RB active player : glow cyan */
.rb-player.active { box-shadow: 0 0 0 2px var(--brand-cyan), 0 0 16px rgba(0,209,255,.15); }

/* Scrollbars dark */
* { scrollbar-width: thin; scrollbar-color: #333 #0A0A0A; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }


/* ═══════════════════════════════════════════════════════
   DartUP Brand Overrides — hiérarchie typographique
   ═══════════════════════════════════════════════════════ */

/* Headings : Inter, tranchant */
h1, h2, h3, h4 {
  font-family: var(--font);
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Liens admin → brand blue */
a { color: var(--primary); }

/* Inputs dark mode */
input:not([type=checkbox]):not([type=radio]),
textarea,
select {
  background: #1A1A1A;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Bouton primaire avec glow */
button, .button-link {
  transition: opacity .15s, box-shadow .15s;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
}
button:hover, .button-link:hover {
  box-shadow: 0 0 0 3px var(--primary-glow);
}
button.secondary { background: #222222; color: var(--text-secondary); border: 1px solid var(--border); }
button.secondary:hover { box-shadow: none; background: #2A2A2A; }

/* Table dark mode */
th {
  background: #111111;
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
td { color: var(--text); }
tr:hover td { background: rgba(255,255,255,.03); }

/* Stat box dark */
.stat-box {
  background: #141414;
  border: 1px solid var(--border);
}
.stat-box strong { color: var(--text); }

/* Card dark */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* Flash messages */
.flash.info { background: #1A2540; border: 1px solid rgba(0,123,255,.25); }

/* Group tile dark */
.group-tile { background: #141414; color: var(--text); }
.group-tile:hover { border-color: var(--primary); }

/* Board card dark */
.board-card { background: #141414; }
.board-card.board-assigned,
.board-card.board-in_progress { background: rgba(0,123,255,.08); border-color: rgba(0,123,255,.25); }

/* Match cards */
.match-card { background: #161616; }
.match-card.match-done { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.25); }
.match-card.match-ready { background: #161616; border-color: var(--primary); }

/* Locked match hint → brand warning */
.match-locked-hint { background: var(--warning-bg); border-color: rgba(245,158,11,.25); color: var(--warning); }

/* Inline notes dark */
.inline-note.warning { background: var(--warning-bg); color: var(--warning); }
.inline-note.error   { background: var(--error-bg);   color: var(--error); }

/* qualified row in tables */
tr.qualified td { background: rgba(34,197,94,.07); }

/* Referee legacy body */
.referee-body { background: #0A0A0A; }
.referee-card { background: #141414; border-color: var(--border); }
.referee-player { background: #141414; border-color: var(--border); }

/* TV pro board card tweak */
.tv-board-card.in_progress {
  border-color: rgba(0,123,255,.55);
  box-shadow: 0 0 0 2px rgba(0,123,255,.15), 0 0 20px rgba(0,123,255,.07);
}

/* Active player glow — cyan pour bien se démarquer du blue */
.player-panel.current-turn { outline: 3px solid rgba(0,209,255,.50); box-shadow: 0 0 20px rgba(0,209,255,.08); }

/* RB active player : glow cyan */
.rb-player.active { box-shadow: 0 0 0 2px var(--brand-cyan), 0 0 16px rgba(0,209,255,.15); }

/* Scrollbars dark */
* { scrollbar-width: thin; scrollbar-color: #333 #0A0A0A; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }
