
:root{
  --bg:#071827;
  --bg2:#0a1e31;
  --panel:#0d2941;
  --panel2:#0b2236;
  --line:#1d4665;
  --line-soft:#17374f;
  --text:#f5f8fb;
  --muted:#91abc0;
  --accent:#3293d8;
  --green:#20ce82;
  --orange:#ff8c22;
  --header:#061827;
  --table-head:#0b4477;
  --table-a:#0f3453;
  --table-b:#0b2a45;
  --shadow:0 10px 24px rgba(0,0,0,.18);
}

html[data-theme="mid"]{
  --bg:#000;
  --bg2:#000;
  --panel:#fff;
  --panel2:#fff;
  --line:#d8d8d8;
  --line-soft:#e5e5e5;
  --text:#111;
  --muted:#666;
  --accent:#208bc8;
  --green:#0aa06a;
  --orange:#df6f00;
  --header:#fff;
  --table-head:#fff;
  --table-a:#fff;
  --table-b:#f6f6f6;
  --shadow:0 8px 20px rgba(0,0,0,.22);
}

html[data-theme="light"]{
  --bg:#eef4f8;
  --bg2:#fff;
  --panel:#fff;
  --panel2:#f7fbfe;
  --line:#c7d8e4;
  --line-soft:#dbe6ee;
  --text:#0b2032;
  --muted:#5f7384;
  --accent:#208bc8;
  --green:#0aa06a;
  --orange:#df6f00;
  --header:#fff;
  --table-head:#d8eaf7;
  --table-a:#fff;
  --table-b:#f5f9fc;
  --shadow:0 8px 18px rgba(24,67,99,.10);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body{min-width:320px}
a{text-decoration:none;color:inherit}
button,select{font:inherit}

/* Header armonizado con Lotería */
.topbar{
  height:58px;
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 34px;
  background:var(--header);
  border-top:2px solid rgba(196,184,151,.35);
  border-bottom:1px solid var(--line-soft);
  position:sticky;
  top:0;
  z-index:40;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.brand img{
  width:42px;
  height:42px;
  object-fit:contain;
  flex:0 0 auto;
}
.brand-copy strong{
  display:block;
  font-size:18px;
  line-height:1.06;
  font-weight:900;
  letter-spacing:-.15px;
}
.brand-copy small{
  display:block;
  margin-top:2px;
  color:var(--orange);
  font-size:11px;
  line-height:1;
  font-weight:900;
  letter-spacing:.055em;
}
.top-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
.clock{
  display:flex;
  align-items:center;
  gap:13px;
  margin:0 3px 0 2px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
.clock b{
  color:var(--text);
  font-size:15px;
  font-weight:900;
}
.icon-btn{
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel2);
  color:var(--text);
  display:inline-grid;
  place-items:center;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.icon-btn:hover{transform:translateY(-1px)}
.icon-btn svg{width:19px;height:19px;fill:currentColor}
.icon-btn.copied{
  border-color:var(--green);
  color:var(--green);
}
.user-slot{display:flex;align-items:center}
.user-pill{
  min-height:42px;
  max-width:285px;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel2);
  padding:4px 8px 4px 5px;
}
.user-avatar{
  width:30px;height:30px;border-radius:50%;
  display:grid;place-items:center;
  flex:0 0 auto;
  font-size:10px;font-weight:950;
  border:1px solid var(--line);
  background:var(--panel);
}
.user-copy{min-width:0;line-height:1.05}
.user-copy strong{
  display:block;max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:11px;font-weight:900
}
.user-copy small{
  display:block;max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--muted);font-size:8px;margin-top:2px
}
.user-logout{
  border:0;border-left:1px solid var(--line);background:transparent;color:var(--text);
  padding:0 4px 0 8px;font-size:9px;font-weight:850;cursor:pointer;white-space:nowrap
}

/* Segunda barra igualada a la estructura de Lotería */
.viewbar{
  height:48px;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 34px;
  background:var(--header);
  border-bottom:1px solid var(--line-soft);
  position:sticky;
  top:58px;
  z-index:35;
}
.view-tabs{display:flex;align-items:center;gap:8px}
.view-tab{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  padding:0 14px;
  border:1px solid transparent;
  border-radius:11px;
  color:var(--muted);
  font-size:14px;
  font-weight:850;
}
.view-tab.active{
  border-color:var(--line);
  background:var(--panel2);
  color:var(--text);
}
.history-btn{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel2);
  color:var(--text);
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}
.history-btn svg{width:18px;height:18px;fill:currentColor;color:var(--muted)}
.history-btn.historical{border-color:var(--accent);color:var(--accent)}

.status-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:36px;
  padding:7px 44px;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.status-line .fresh{color:#4de6a5}
.status-line .stale{color:#f1b54c}
.status-line .historical-state{color:var(--accent)}

.board-shell{
  width:100%;
  max-width:100%;
  margin:0 auto;
  padding:0 14px 28px;
}
.empty-state{
  max-width:720px;
  margin:18px auto;
  padding:30px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:var(--panel);
  color:var(--muted);
  text-align:center;
}

/* DETALLE */
.detail-league{
  margin:0 0 14px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  box-shadow:var(--shadow);
}
.league-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:9px 12px;
  background:var(--panel2);
  border-bottom:1px solid var(--line);
}
.league-title{
  min-width:210px;
  display:flex;
  align-items:center;
  gap:9px;
}
.league-title img{
  width:31px;
  height:31px;
  object-fit:contain;
}
.league-title h2{
  margin:0;
  font-size:14px;
  font-weight:900;
}
.league-title p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}
.market-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  padding:1px 0;
}
.market-tab{
  flex:0 0 auto;
  min-height:34px;
  padding:5px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.market-tab small{
  margin-left:4px;
  font-size:9px;
  font-weight:700;
  opacity:.86;
}
.market-tab.active{
  color:#fff;
  background:#0b74b7;
  border-color:#2b9cdd;
}
html[data-theme="mid"] .market-tab.active,
html[data-theme="light"] .market-tab.active{
  color:#fff;
}
.market-tab.listed:not(.active)::after{
  content:"";
  width:5px;height:5px;border-radius:50%;
  display:inline-block;margin-left:6px;vertical-align:middle;
  background:#8399a9;opacity:.7;
}
.table-scroll{overflow:auto;max-width:100%}
.sports-table{
  width:100%;
  min-width:850px;
  border-collapse:collapse;
  font-size:11px;
}
.sports-table th,.sports-table td{
  padding:6px 7px;
  border-bottom:1px solid var(--line-soft);
  text-align:center;
  white-space:nowrap;
}
.sports-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--table-head);
  color:var(--text);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.2px;
}
html[data-theme="dark"] .sports-table thead th{color:#fff}
.sports-table tbody tr:nth-child(4n+1),
.sports-table tbody tr:nth-child(4n+2){background:var(--table-a)}
.sports-table tbody tr:nth-child(4n+3),
.sports-table tbody tr:nth-child(4n+4){background:var(--table-b)}
.sports-table tbody tr:hover{filter:brightness(1.06)}
.team-cell{text-align:left!important;min-width:225px}
.team-wrap{display:flex;align-items:center;gap:7px}
.team-wrap img{width:23px;height:23px;object-fit:contain;flex:0 0 auto}
.team-wrap b{font-size:11px}
.team-wrap span{margin-left:4px;color:var(--muted);font-size:10px}
.pitcher{display:block;margin-top:2px;color:var(--muted);font-size:9px}
.game-time{font-weight:900}
.game-code{color:var(--muted);font-weight:850}
.market-empty{
  padding:12px 14px;
  border-top:1px solid var(--line-soft);
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}

/* PANTALLA: módulos verticales compactos tipo pizarra física */
body.screen-mode .board-shell{padding:0 10px 28px}
body.screen-mode .status-line{padding-left:18px;padding-right:18px}
.screen-module{
  margin:0 0 9px;
  overflow:hidden;
  border:1px solid #225b87;
  background:#062641;
  box-shadow:0 5px 14px rgba(0,0,0,.13);
}
.screen-head{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  padding:4px 9px;
  background:#092b4b;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.screen-head-left{display:flex;align-items:center;gap:7px;min-width:0}
.screen-head img{width:24px;height:24px;object-fit:contain}
.screen-head h2{margin:0;color:#fff;font-size:11px;font-weight:950;text-transform:uppercase}
.screen-head small{display:block;margin-top:1px;color:#b9d8ef;font-size:8px;font-weight:700}
.screen-table{
  width:100%;
  min-width:880px;
  border-collapse:collapse;
  color:#fff;
  font-size:9px;
}
.screen-table th,.screen-table td{
  padding:3px 5px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:center;
  white-space:nowrap;
  line-height:1.15;
}
.screen-table thead th{
  background:#0b4477;
  color:#fff;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
}
.screen-table tbody tr:nth-child(4n+1),
.screen-table tbody tr:nth-child(4n+2){background:#0d4f8b}
.screen-table tbody tr:nth-child(4n+3),
.screen-table tbody tr:nth-child(4n+4){background:#063663}
.screen-table .team-cell{min-width:185px}
.screen-table .team-wrap img{width:17px;height:17px}
.screen-table .team-wrap b{font-size:9px;color:#fff}
.screen-table .team-wrap span{font-size:8px;color:#c9deed}
.screen-table .pitcher{font-size:7px;color:#b9d3e5}
.screen-empty{padding:8px 10px;color:#aac6da;font-size:9px}

/* Medio: fondo negro + encabezados/tablas blancas */
html[data-theme="mid"] body{background:#000}
html[data-theme="mid"] .topbar,
html[data-theme="mid"] .viewbar{
  background:#fff;
  color:#111;
}
html[data-theme="mid"] .detail-league{
  background:#fff;
  color:#111;
  border-color:#d7d7d7;
}
html[data-theme="mid"] .league-head,
html[data-theme="mid"] .sports-table thead th{
  background:#fff;
  color:#111;
}
html[data-theme="mid"] .sports-table tbody tr:nth-child(4n+1),
html[data-theme="mid"] .sports-table tbody tr:nth-child(4n+2){background:#fff}
html[data-theme="mid"] .sports-table tbody tr:nth-child(4n+3),
html[data-theme="mid"] .sports-table tbody tr:nth-child(4n+4){background:#f5f5f5}
html[data-theme="mid"] .screen-module{
  background:#fff;
  border-color:#d7d7d7;
}
html[data-theme="mid"] .screen-head,
html[data-theme="mid"] .screen-table thead th{
  background:#fff;
  color:#111;
  border-color:#ddd;
}
html[data-theme="mid"] .screen-head h2,
html[data-theme="mid"] .screen-head small,
html[data-theme="mid"] .screen-table,
html[data-theme="mid"] .screen-table .team-wrap b,
html[data-theme="mid"] .screen-table .team-wrap span,
html[data-theme="mid"] .screen-table .pitcher{
  color:#111;
}
html[data-theme="mid"] .screen-table tbody tr:nth-child(4n+1),
html[data-theme="mid"] .screen-table tbody tr:nth-child(4n+2){background:#fff}
html[data-theme="mid"] .screen-table tbody tr:nth-child(4n+3),
html[data-theme="mid"] .screen-table tbody tr:nth-child(4n+4){background:#f5f5f5}

/* Modal historial */
.modal-overlay{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(0,8,14,.70);
  backdrop-filter:blur(5px);
}
.modal-overlay[hidden]{display:none!important}
.modal{
  width:min(460px,100%);
  padding:18px;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--panel);
  color:var(--text);
  box-shadow:0 28px 80px rgba(0,0,0,.5);
}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.modal h2{margin:0;font-size:19px}
.modal p{margin:5px 0 15px;color:var(--muted);font-size:12px}
.modal-close{
  width:34px;height:34px;border:1px solid var(--line);border-radius:9px;
  background:var(--bg2);color:var(--text);cursor:pointer;font-size:22px
}
.history-select{
  width:100%;height:44px;padding:0 12px;
  border:1px solid var(--line);border-radius:10px;
  background:var(--bg2);color:var(--text)
}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:14px}
.modal-actions button{
  height:40px;padding:0 14px;border:1px solid var(--line);
  border-radius:10px;font-weight:850;cursor:pointer
}
.modal-actions .secondary{background:transparent;color:var(--text)}
.modal-actions .primary{background:#eaf6ff;color:#082036;border-color:#eaf6ff}

@media(max-width:980px){
  .topbar,.viewbar{padding-left:14px;padding-right:14px}
  .status-line{padding-left:14px;padding-right:14px}
  .user-pill{max-width:220px}
  .user-copy strong,.user-copy small{max-width:92px}
  .clock span{display:none}
}
@media(max-width:720px){
  .brand img{width:46px;height:46px}
  .brand-copy strong{font-size:17px}
  .brand-copy small{font-size:9px}
  .topbar{height:66px;min-height:66px}
  .viewbar{height:58px;min-height:58px;top:66px}
  .icon-btn{width:38px;min-width:38px;height:38px}
  .user-pill{display:none}
  .league-head{align-items:flex-start;flex-direction:column}
  .market-tabs{width:100%}
  .history-btn span{display:none}
  .history-btn{width:42px;padding:0}
}


/* =====================================================================
   V1.0.32.1.4.9 · DETALLE COMPACTO TIPO FUENTE
   ===================================================================== */
body:not(.screen-mode) .compact-detail-shell{
  padding:0 4px 10px;
}

.compact-board{
  width:100%;
  border:1px solid var(--line);
  background:var(--panel);
  overflow:hidden;
}

.sports-strip{
  min-height:38px;
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:8px;
  background:#3393d4;
  border-bottom:2px solid #f1a40a;
  color:#fff;
}

.sports-buttons{
  min-width:0;
  display:flex;
  align-items:stretch;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}

.sport-btn{
  flex:0 0 auto;
  min-width:112px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 12px;
  border:0;
  border-right:1px solid rgba(255,255,255,.18);
  background:transparent;
  color:rgba(255,255,255,.72);
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.sport-btn.active{
  color:#fff;
  background:rgba(0,0,0,.08);
}
.sport-btn img{
  width:24px;
  height:24px;
  object-fit:contain;
}
.sport-count{
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#167dbd;
  color:#fff;
  font-size:10px;
  font-weight:950;
}
.sport-btn.active .sport-count{
  background:#f0a619;
}

.compact-date{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  color:#0e3c5c;
  background:#3393d4;
  font-size:12px;
  font-weight:900;
}
.compact-date input{
  height:29px;
  padding:0 7px;
  border:1px solid rgba(7,45,70,.25);
  border-radius:6px;
  background:rgba(255,255,255,.94);
  color:#16364d;
  font-size:11px;
  font-weight:800;
}

.market-strip{
  min-height:38px;
  display:flex;
  align-items:stretch;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  background:#fff;
  border-bottom:4px solid #333c43;
}
.market-strip .market-tab{
  min-width:154px;
  min-height:38px;
  padding:4px 10px;
  border:0;
  border-right:1px solid #cfe0d7;
  border-radius:0;
  background:#fff;
  color:#222;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  font-size:12px;
  font-weight:900;
}
.market-strip .market-tab small{
  display:block;
  margin:0;
  color:#aaa;
  font-size:8px;
  font-weight:500;
}
.market-strip .market-tab.active{
  color:#fff;
  background:#3393d4;
}
.market-strip .market-tab.active small{color:#fff}
.market-strip .market-tab.listed::after{display:none}

.compact-table-frame{
  width:100%;
  height:calc(100vh - 158px);
  min-height:330px;
  overflow:auto;
  background:#f6f8f9;
}
.compact-table{
  width:100%;
  min-width:max-content;
  border-collapse:collapse;
  table-layout:auto;
  color:#1d2730;
  background:#f6f8f9;
  font-size:11px;
}
.compact-table th,
.compact-table td{
  height:42px;
  padding:4px 10px;
  border-right:1px solid #d7dde1;
  border-bottom:1px solid #d7dde1;
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
}
.compact-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  height:28px;
  padding:4px 8px;
  background:#343c42;
  color:#fff;
  font-size:11px;
  font-weight:950;
  text-transform:none;
}
.compact-table tbody tr:nth-child(4n+1),
.compact-table tbody tr:nth-child(4n+2){background:#e9edef}
.compact-table tbody tr:nth-child(4n+3),
.compact-table tbody tr:nth-child(4n+4){background:#f5f7f8}
.compact-table tbody tr.game-end td{
  border-bottom:3px solid #9bd2b1;
}
.compact-table .col-time{min-width:76px;font-weight:900}
.compact-table .col-code{min-width:74px;font-weight:900}
.compact-table .col-team{
  min-width:246px;
  text-align:left;
}
.compact-table .col-player{
  min-width:300px;
  text-align:left;
}
.compact-team{
  display:flex;
  align-items:center;
  gap:8px;
}
.compact-team img{
  width:35px;
  height:35px;
  object-fit:contain;
}
.compact-team-copy{
  display:flex;
  flex-direction:column;
  line-height:1.06;
}
.compact-team-copy b{
  font-size:12px;
  font-weight:950;
}
.compact-team-copy small{
  margin-top:3px;
  color:#53616c;
  font-size:7px;
  font-weight:800;
  text-transform:uppercase;
}
.player-cell{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:850;
}
.player-avatar{
  width:25px;
  height:25px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#dde3e7;
  color:#586671;
  font-size:10px;
  font-weight:950;
  flex:0 0 auto;
}
.market-price{
  min-width:138px;
  font-size:12px;
  font-weight:850;
}
.market-price.positive{color:#e11622}
.compact-empty{
  padding:22px;
  color:#697985;
  background:#fff;
  text-align:center;
  font-size:12px;
  font-weight:750;
}
.compact-table-footer{
  position:sticky;
  bottom:0;
  z-index:4;
  min-height:26px;
  display:flex;
  align-items:center;
  padding:0 14px;
  background:#343c42;
  color:#fff;
  font-size:10px;
  font-weight:850;
}

/* Tema oscuro: conservar estructura compacta, con paleta Virgilio. */
html[data-theme="dark"] .compact-board{background:#08263d}
html[data-theme="dark"] .market-strip{
  background:#09243a;
  border-bottom-color:#38434b;
}
html[data-theme="dark"] .market-strip .market-tab{
  background:#09243a;
  color:#96b1c5;
  border-right-color:#234a65;
}
html[data-theme="dark"] .market-strip .market-tab small{color:#758fa2}
html[data-theme="dark"] .market-strip .market-tab.active{
  background:#168acb;
  color:#fff;
}
html[data-theme="dark"] .market-strip .market-tab.active small{color:#fff}
html[data-theme="dark"] .compact-table-frame,
html[data-theme="dark"] .compact-table{background:#0b2d47;color:#fff}
html[data-theme="dark"] .compact-table th,
html[data-theme="dark"] .compact-table td{
  border-color:#173e5a;
}
html[data-theme="dark"] .compact-table tbody tr:nth-child(4n+1),
html[data-theme="dark"] .compact-table tbody tr:nth-child(4n+2){background:#123e60}
html[data-theme="dark"] .compact-table tbody tr:nth-child(4n+3),
html[data-theme="dark"] .compact-table tbody tr:nth-child(4n+4){background:#0b2f4a}
html[data-theme="dark"] .compact-team-copy small{color:#9fc0d7}
html[data-theme="dark"] .player-avatar{
  background:#173e5a;
  color:#bed2e1;
}
html[data-theme="dark"] .compact-empty{
  background:#0b2f4a;
  color:#a7becf;
}

/* Tema medio: fondo de la aplicación negro; pizarra compacta blanca. */
html[data-theme="mid"] body{background:#000}
html[data-theme="mid"] .compact-board,
html[data-theme="mid"] .market-strip,
html[data-theme="mid"] .market-strip .market-tab,
html[data-theme="mid"] .compact-table-frame,
html[data-theme="mid"] .compact-table,
html[data-theme="mid"] .compact-empty{
  background:#fff;
  color:#111;
}
html[data-theme="mid"] .market-strip .market-tab.active{
  background:#3393d4;
  color:#fff;
}
html[data-theme="mid"] .compact-table tbody tr:nth-child(4n+1),
html[data-theme="mid"] .compact-table tbody tr:nth-child(4n+2){background:#e9edef}
html[data-theme="mid"] .compact-table tbody tr:nth-child(4n+3),
html[data-theme="mid"] .compact-table tbody tr:nth-child(4n+4){background:#f7f8f8}
html[data-theme="mid"] .compact-team-copy small{color:#666}

/* Fullscreen: maximizar tabla interna y no añadir banners. */
:fullscreen .compact-table-frame{
  height:calc(100vh - 126px);
}
:fullscreen .status-line{
  display:none;
}

/* Responsive */
@media(max-width:900px){
  .sports-strip{flex-direction:column;align-items:stretch}
  .compact-date{
    min-height:36px;
    justify-content:flex-end;
  }
  .compact-table-frame{
    height:calc(100vh - 265px);
  }
}


/* V1.0.32.1.4.11 · CABECERA MÁS COMPACTA */
.status-line{display:none!important}
.header-updated{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  margin-right:3px;
}
.view-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.top-actions{gap:7px}
.clock{font-size:12px}
.clock b{font-size:14px}
.icon-btn{
  width:38px;
  min-width:38px;
  height:38px;
  border-radius:10px;
}
.view-tab{
  min-height:36px;
  padding:0 13px;
  font-size:13px;
}
.history-btn{
  min-height:38px;
  height:38px;
  padding:0 13px;
}
.brand-copy small{font-size:9px}
.compact-table-frame{
  height:calc(100vh - 158px);
}
:fullscreen .compact-table-frame{
  height:calc(100vh - 126px);
}

/* =====================================================================
   V1.0.32.1.4.11 · FILOSOFÍA FUENTE ORIGINAL / TABLA SIEMPRE VISIBLE
   ===================================================================== */
body:not(.screen-mode) .compact-detail-shell{padding:0 3px 8px}

.compact-table-frame{
  height:calc(100vh - 158px);
  min-height:330px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  position:relative;
}

.compact-table{
  width:100%;
  min-width:100%;
  table-layout:fixed;
  font-size:10px;
}

.compact-table th,
.compact-table td{
  height:40px;
  padding:2px 5px;
  font-size:clamp(8px,.62vw,11px);
  line-height:1.05;
  overflow:hidden;
  text-overflow:ellipsis;
}

.compact-table thead th{
  position:sticky;
  top:0;
  z-index:6;
  height:34px;
  padding:2px 5px;
  font-size:clamp(8px,.64vw,11px);
}

.compact-table tbody tr.game-end td{border-bottom:2px solid #9bd2b1}
.compact-table .col-time,
.compact-table .col-code{font-weight:900}
.compact-table .col-team,
.compact-table .col-player{min-width:0}

.compact-team{gap:6px}
.compact-team img{width:31px;height:31px}
.compact-team-copy{min-width:0}
.compact-team-copy b{
  font-size:clamp(8px,.75vw,12px);
  font-weight:950;
}
.compact-team-copy small{
  margin-top:2px;
  font-size:clamp(6px,.52vw,9px);
  letter-spacing:.02em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.player-cell{
  gap:5px;
  min-width:0;
  font-size:clamp(8px,.72vw,11px);
  font-weight:850;
}
.player-cell span:last-child{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-avatar{
  width:22px;
  height:22px;
  font-size:9px;
}

.market-price{
  min-width:0;
  font-size:clamp(8px,.72vw,11px);
  font-weight:900;
  letter-spacing:-.01em;
}
.market-price .odds-pos{color:#eb1f27}
.market-price .odds-neg{color:#15202b}
.market-price .odds-pos,
.market-price .odds-neg{display:inline-block}

.compact-table-footer{
  position:sticky;
  bottom:0;
  z-index:7;
  min-height:31px;
  border-top:1px solid rgba(255,255,255,.08);
  box-shadow:0 -1px 0 rgba(0,0,0,.08);
}

html[data-theme="dark"] .market-price .odds-neg{color:#f4f8fb}
html[data-theme="dark"] .compact-table th,
html[data-theme="dark"] .compact-table td{border-color:#204360}
html[data-theme="mid"] .market-price .odds-neg,
html[data-theme="light"] .market-price .odds-neg{color:#0f1820}

@media(max-width:1200px){
  .compact-table th,
  .compact-table td{padding:2px 4px}
  .compact-team img{width:28px;height:28px}
  .player-avatar{width:20px;height:20px}
}

@media(max-width:900px){
  .compact-table-frame{height:calc(100vh - 265px)}
}

:fullscreen .compact-table-frame{height:calc(100vh - 126px)}

/* PANTALLA V3 · tablas combinadas de lectura vertical */
body.screen-mode{background:#051626}
body.screen-mode .board-shell{padding:4px 8px 30px}
body.screen-mode .screen-module{
  margin:0 0 10px;
  border:1px solid #315d83;
  border-radius:0;
  background:#061c32;
  box-shadow:0 4px 12px rgba(0,0,0,.22);
}
body.screen-mode .screen-head{
  min-height:32px;
  justify-content:flex-start;
  gap:8px;
  padding:4px 8px 3px;
  background:#072b55;
  border-bottom:1px solid #7294b1;
}
body.screen-mode .screen-head img{width:20px;height:20px;object-fit:contain}
body.screen-mode .screen-head h2{
  margin:0;
  color:#ff5b68;
  font-size:clamp(12px,1vw,17px);
  font-weight:950;
  line-height:1.15;
  text-shadow:0 1px 2px #190309;
}
body.screen-mode .screen-table-wrap{max-width:100%;overflow-x:auto;scrollbar-color:#4d82b1 #052546}
body.screen-mode .screen-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  background:#06274b;
  color:#fff;
  font-size:clamp(9px,.75vw,12px);
}
body.screen-mode .screen-table th,
body.screen-mode .screen-table td{
  border:0;
  border-right:1px solid rgba(202,226,245,.09);
  padding:2px 3px;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
  vertical-align:middle;
  line-height:1.05;
}
body.screen-mode .screen-table thead th{
  position:static;
  background:#171e27;
  color:#fff;
  font-size:clamp(8px,.65vw,11px);
  font-weight:950;
  white-space:nowrap;
}
body.screen-mode .screen-table thead .screen-bands th{background:#08294c;border-bottom:1px solid #6a8faf}
body.screen-mode .screen-table thead .screen-columns th{background:#202934}
body.screen-mode .screen-table thead .screen-bands th:first-child{width:84px}
body.screen-mode .screen-table thead .screen-bands th:nth-child(2){width:53px}
body.screen-mode .screen-table thead .screen-bands th:nth-child(3){width:195px;text-align:left}
body.screen-mode .screen-proposals .screen-table thead .screen-bands th:nth-child(4){width:125px;text-align:left}
body.screen-mode .screen-table tbody tr.screen-tone-blue{background:#0966ce}
body.screen-mode .screen-table tbody tr.screen-tone-slate{background:#172b44}
body.screen-mode .screen-table tbody tr.screen-pair-end td{border-bottom:2px solid #3984b6}
body.screen-mode .screen-table .screen-time,
body.screen-mode .screen-table .screen-code{color:#fff;font-weight:950;white-space:nowrap}
body.screen-mode .screen-table .screen-team-cell{text-align:left}
body.screen-mode .screen-table .screen-team{display:flex;align-items:center;gap:5px;min-width:0}
body.screen-mode .screen-table .screen-team img{width:17px;height:17px;object-fit:contain;flex:0 0 auto}
body.screen-mode .screen-table .screen-team b{display:block;font-size:clamp(9px,.75vw,12px);line-height:1.1}
body.screen-mode .screen-table .screen-away .screen-team b{color:#84f9aa}
body.screen-mode .screen-table .screen-home .screen-team b{color:#fff}
body.screen-mode .screen-table .screen-team small{display:block;color:#d4e8f5;font-size:clamp(7px,.62vw,10px)}
body.screen-mode .screen-table .screen-player{text-align:left;color:#e4f4ff;font-weight:800}
body.screen-mode .screen-table .screen-odd{font-weight:900;white-space:nowrap;overflow-wrap:normal}
body.screen-mode .screen-table .screen-odd span{display:block;white-space:nowrap}
body.screen-mode .screen-table .screen-odd .odds-pos{color:#b5faff}
body.screen-mode .screen-table .screen-odd .odds-neg{color:#fff}
body.screen-mode .screen-table .col-time,
body.screen-mode .screen-table .col-code{font-weight:950;color:#fff;white-space:nowrap}
body.screen-mode .screen-table .col-team,
body.screen-mode .screen-table .col-player{text-align:left;color:#fff}
body.screen-mode .screen-table .compact-team{display:flex;align-items:center;gap:4px}
body.screen-mode .screen-table .compact-team img{width:16px;height:16px}
body.screen-mode .screen-table .compact-team-copy b{color:#eaffef;font-size:10px}
body.screen-mode .screen-table .compact-team-copy small{display:none}
body.screen-mode .screen-table .player-cell{color:#fff;font-size:10px}
body.screen-mode .screen-table .player-avatar{width:19px;height:19px;font-size:8px}
body.screen-mode .screen-table .market-price span{display:block;white-space:nowrap}
body.screen-mode .screen-table .market-price .odds-pos{color:#b5faff}
body.screen-mode .screen-table .market-price .odds-neg{color:#fff}
body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+1),
body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+2){background:#0966ce}
body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+3),
body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+4){background:#172b44}
@media(max-width:720px){
  body.screen-mode .board-shell{padding-left:3px;padding-right:3px}
  body.screen-mode .screen-head h2{font-size:12px}
}

/* Pantalla compacta: distribuir encuentros sin desplazar la tabla horizontalmente. */
body.screen-mode .screen-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:2px}
body.screen-mode .screen-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
body.screen-mode .screen-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
body.screen-mode .screen-grid .screen-table-wrap{min-width:0;max-width:100%;overflow:hidden}
body.screen-mode .screen-grid .screen-table{width:100%;min-width:0!important;table-layout:fixed}
body.screen-mode .screen-grid .screen-table thead .screen-bands th:first-child{width:7%}
body.screen-mode .screen-grid .screen-table thead .screen-bands th:nth-child(2){width:5%}
body.screen-mode .screen-grid .screen-table thead .screen-bands th:nth-child(3){width:15%}
body.screen-mode .screen-grid-2 .screen-table thead .screen-bands th:first-child,
body.screen-mode .screen-grid-3 .screen-table thead .screen-bands th:first-child{width:11%}
body.screen-mode .screen-grid-2 .screen-table thead .screen-bands th:nth-child(2),
body.screen-mode .screen-grid-3 .screen-table thead .screen-bands th:nth-child(2){width:8%}
body.screen-mode .screen-grid-2 .screen-table thead .screen-bands th:nth-child(3),
body.screen-mode .screen-grid-3 .screen-table thead .screen-bands th:nth-child(3){width:23%}
body.screen-mode .screen-grid-3 .screen-table thead .screen-bands th:nth-child(4){width:28%}
body.screen-mode .screen-grid .screen-table th,
body.screen-mode .screen-grid .screen-table td{padding:2px 1px;overflow-wrap:normal}
body.screen-mode .screen-grid-2 .screen-table,
body.screen-mode .screen-grid-3 .screen-table{font-size:clamp(7px,.64vw,10px)}
body.screen-mode .screen-grid-2 .screen-table thead th,
body.screen-mode .screen-grid-3 .screen-table thead th{font-size:clamp(6px,.58vw,9px);white-space:normal}
body.screen-mode .screen-grid-2 .screen-team img,
body.screen-mode .screen-grid-3 .screen-team img{width:12px;height:12px}
body.screen-mode .screen-grid-2 .screen-team b,
body.screen-mode .screen-grid-3 .screen-team b{font-size:clamp(7px,.6vw,10px)}
body.screen-mode .screen-grid-2 .screen-team small,
body.screen-mode .screen-grid-3 .screen-team small{display:none}
body.screen-mode .screen-grid-3 .player-avatar{display:none}
body.screen-mode .screen-grid-3 .player-cell{font-size:clamp(7px,.64vw,10px)}
body.screen-mode .screen-brand-break,
body.screen-mode .screen-brand-footer{
  margin:8px 0 10px;padding:14px 18px;color:#fff;
  background:linear-gradient(110deg,#052347,#0966ce 55%,#0b754b);
  border:1px solid #3a89ba;text-align:center
}
body.screen-mode .screen-brand-break strong{display:block;color:#fff;font-size:clamp(18px,2.5vw,32px);letter-spacing:.08em}
body.screen-mode .screen-brand-break span,
body.screen-mode .screen-brand-footer{font-size:clamp(9px,1vw,13px);font-weight:900;letter-spacing:.05em}
@media(max-width:600px){
  body.screen-mode .screen-grid-2,
  body.screen-mode .screen-grid-3{grid-template-columns:minmax(0,1fr)}
  body.screen-mode .screen-grid .screen-table{font-size:8px}
  body.screen-mode .screen-grid .screen-table thead th{font-size:7px}
}

/* Controles de lectura compartidos por Detalle y Pantalla. */
:root{--sports-font-scale:1;--sports-column-gap:2px}
.reading-controls{display:flex;align-items:center;gap:3px;white-space:nowrap}
.reading-controls .reading-label{font-size:10px;color:var(--muted);font-weight:850;margin-left:5px}
.reading-controls button{
  min-width:28px;height:29px;padding:0 4px;border:1px solid var(--line);
  border-radius:6px;background:var(--panel2);color:var(--text);
  font-size:12px;font-weight:950;cursor:pointer
}
.reading-controls output{min-width:34px;text-align:center;font-size:10px;color:var(--text);font-weight:900}
body:not(.screen-mode) .compact-table th,
body:not(.screen-mode) .compact-table td{
  font-size:calc(10px * var(--sports-font-scale));
  padding-left:calc(2px + var(--sports-column-gap));
  padding-right:calc(2px + var(--sports-column-gap))
}
body:not(.screen-mode) .compact-team-copy b,
body:not(.screen-mode) .player-cell,
body:not(.screen-mode) .market-price{font-size:calc(11px * var(--sports-font-scale))}
body:not(.screen-mode) .compact-team-copy small{font-size:calc(8px * var(--sports-font-scale))}
body.screen-mode .screen-grid .screen-table th,
body.screen-mode .screen-grid .screen-table td{
  font-size:calc(9px * var(--sports-font-scale));
  padding-left:var(--sports-column-gap);
  padding-right:var(--sports-column-gap)
}
body.screen-mode .screen-grid-2 .screen-table th,
body.screen-mode .screen-grid-2 .screen-table td,
body.screen-mode .screen-grid-3 .screen-table th,
body.screen-mode .screen-grid-3 .screen-table td{font-size:calc(8px * var(--sports-font-scale))}
body.screen-mode .screen-grid .screen-team b,
body.screen-mode .screen-grid .player-cell{font-size:calc(9px * var(--sports-font-scale))}
body.screen-mode .screen-grid .screen-team small{font-size:calc(8px * var(--sports-font-scale))}

/* Calendario de los últimos siete días deportivos. */
.history-calendar{padding:10px;border:1px solid var(--line);border-radius:11px;background:var(--bg2)}
.calendar-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.calendar-nav strong{text-transform:capitalize;font-size:15px}
.calendar-nav button{width:33px;height:33px;font-size:24px}
.calendar-nav button,.calendar-day{border:0;border-radius:8px;background:transparent;color:var(--text);cursor:pointer}
.calendar-nav button:disabled,.calendar-day:disabled{opacity:.35;cursor:default}
.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.calendar-weekdays{color:var(--muted);font-size:11px;font-weight:900;margin-bottom:5px}
.calendar-day,.calendar-blank{height:36px;display:grid;place-items:center}
.calendar-day.available{background:#174973;color:#fff;font-weight:900}
.calendar-day.selected{background:#1682d8;color:#fff;outline:2px solid #b6e7ff}
.calendar-selection,.calendar-empty{text-align:center;margin:11px 0 0!important}
@media(max-width:980px){
  .viewbar{height:auto;min-height:58px;flex-wrap:wrap;padding-top:4px;padding-bottom:4px}
  .view-actions{flex-wrap:wrap;gap:5px}
}
@media(max-width:560px){
  .reading-controls .reading-label{display:none}
  .reading-controls button{min-width:25px}
}

/* Pantallas independientes y lectura escalada. */
.screen-only{display:none!important}
body.screen-mode .screen-only{display:inline-flex!important}
.screen-identity{display:none;color:#fff;font-weight:950;letter-spacing:.08em}
body.individual-screen .screen-identity{display:inline-block}
body.screen-mode .screen-module{border:3px solid #e9f5ff;margin-bottom:17px}
body.screen-mode .screen-head{border-bottom:3px solid #fff}
body.screen-mode .screen-table th,
body.screen-mode .screen-table td{border-right:1px solid rgba(255,255,255,.8)}
body.screen-mode .screen-table thead .screen-bands th{border-bottom:2px solid #fff}
body.screen-mode .screen-table tbody tr.screen-pair-end td{border-bottom:2px solid #fff}
body.screen-mode .screen-grid{gap:4px}
body.screen-mode .screen-grid .screen-table-wrap + .screen-table-wrap{border-left:3px solid #fff}
body:not(.screen-mode) .compact-table th,
body:not(.screen-mode) .compact-table td{border-right:1px solid rgba(255,255,255,.45)}
.screens-modal{width:min(1100px,96vw);max-height:90vh;overflow:auto}
.screen-count-label{display:flex;gap:12px;align-items:center;font-weight:850;margin:12px 0}
.screen-count-label select{padding:6px 12px;border-radius:6px;background:var(--panel2);color:var(--text)}
.screens-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.screen-config-card{border:2px solid #6d9fca;border-radius:8px;padding:12px;background:var(--panel2)}
.screen-config-card h3{margin:0 0 10px;color:var(--text)}
.screen-config-card p{font-size:12px;color:var(--muted)}
.screen-block-list{max-height:250px;overflow:auto;border-top:1px solid #7794ad;margin-top:8px;padding-top:8px}
.screen-block-choice,.screen-join{display:flex;gap:7px;align-items:start;padding:4px 0;font-size:12px;cursor:pointer}
.screen-block-choice input,.screen-join input{margin-top:2px;flex:none}
.screen-open{display:inline-block;padding:8px 10px;margin-top:10px;border-radius:6px;background:#1468b5;color:white;text-decoration:none;font-weight:900}
@media(orientation:portrait){body.screen-mode .screen-grid{grid-template-columns:1fr!important}}

/* En pantalla completa, el encabezado sólo contiene la marca, el reloj y salir. */
.fullscreen-brand{display:none}
html:fullscreen{overflow:auto;background:var(--bg)}
html:fullscreen .viewbar,
html:fullscreen #userSlot,
html:fullscreen #themeBtn,
html:fullscreen #shareBtn,
html:fullscreen #screenIdentity,
html:fullscreen .brand-copy,
html:fullscreen .modal-overlay{display:none!important}
html:fullscreen .topbar{
  height:auto;min-height:82px;padding:10px clamp(12px,2.5vw,36px);
  background:#061827;border-top:0;border-bottom:3px solid #fff;
  gap:20px;z-index:40
}
html:fullscreen .brand{pointer-events:auto;gap:12px}
html:fullscreen .brand img{width:clamp(42px,4vw,64px);height:clamp(42px,4vw,64px)}
html:fullscreen .fullscreen-brand{
  display:block;color:#fff;font-size:clamp(19px,2.2vw,34px);
  font-weight:950;white-space:nowrap
}
html:fullscreen .top-actions{flex:1;gap:clamp(8px,2vw,24px)}
html:fullscreen .clock{
  flex:1;justify-content:center;gap:clamp(6px,1.5vw,24px);
  margin:0;color:#fff;font-size:clamp(16px,2.1vw,32px);
  font-weight:950;text-transform:capitalize;white-space:normal;text-align:center
}
html:fullscreen .clock b{font-size:clamp(21px,3.1vw,48px);color:#fff;white-space:nowrap}
html:fullscreen #fullscreenBtn{
  width:32px;min-width:32px;height:32px;border:1px solid #89abc6;
  border-radius:7px;background:transparent;color:#cde8fb;opacity:.75;
  flex:none
}
html:fullscreen #fullscreenBtn:hover{opacity:1}
html:fullscreen #fullscreenBtn svg{width:17px;height:17px}
html:fullscreen .compact-table-frame{height:calc(100vh - 105px)}
@media(max-width:650px){
  html:fullscreen .topbar{flex-wrap:wrap;gap:4px;justify-content:center}
  html:fullscreen .top-actions{min-width:100%;justify-content:center}
  html:fullscreen .clock{font-size:clamp(15px,3vw,21px)}
  html:fullscreen .clock b{font-size:clamp(20px,4vw,30px)}
  html:fullscreen #fullscreenBtn{position:absolute;right:8px;top:8px}
}

/* Las ventanas enlazadas continúan las filas sin repetir el encabezado. */
body.continuation-screen .topbar{
  min-height:40px;height:40px;justify-content:flex-end;padding:3px 12px
}
body.continuation-screen .topbar .brand,
body.continuation-screen .topbar .clock,
body.continuation-screen .topbar #userSlot,
body.continuation-screen .topbar #themeBtn,
body.continuation-screen .topbar #shareBtn{display:none!important}
body.continuation-screen .topbar #screenIdentity{display:inline-block;font-size:12px}
body.continuation-screen .topbar #fullscreenBtn{width:30px;min-width:30px;height:30px;border-radius:6px}
html:fullscreen body.continuation-screen .topbar{display:none!important}
html:fullscreen body.continuation-screen .board-shell{padding-top:0}

/* Colgroup fija Equipos y entrega el espacio recuperado a los mercados. */
body.screen-mode .screen-grid .screen-table thead .screen-bands th{width:auto!important}
body.screen-mode .screen-grid .screen-team > div{min-width:0}
body.screen-mode .screen-grid .screen-team b,
body.screen-mode .screen-grid .screen-team small{overflow-wrap:anywhere}

/* Claro: las tres presentaciones de tablas usan fondos claros y tinta oscura. */
html[data-theme="light"] body.screen-mode{background:#eef4f8}
html[data-theme="light"] body.individual-screen .screen-identity{color:#111827}
html[data-theme="light"] body.screen-mode .screen-module{
  background:#fff;border-color:#111827;box-shadow:0 3px 10px rgba(0,0,0,.08)
}
html[data-theme="light"] body.screen-mode .screen-head{
  background:#e5eef5;border-bottom-color:#111827
}
html[data-theme="light"] body.screen-mode .screen-head h2{
  color:#111827;text-shadow:none
}
html[data-theme="light"] body.screen-mode .screen-table{
  background:#fff;color:#111827
}
html[data-theme="light"] body.screen-mode .screen-table thead th,
html[data-theme="light"] body.screen-mode .screen-table thead .screen-bands th,
html[data-theme="light"] body.screen-mode .screen-table thead .screen-columns th{
  background:#dce8f0;color:#111827;border-bottom-color:#111827
}
html[data-theme="light"] body.screen-mode .screen-table tbody tr.screen-tone-blue,
html[data-theme="light"] body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+1),
html[data-theme="light"] body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+2){background:#fff}
html[data-theme="light"] body.screen-mode .screen-table tbody tr.screen-tone-slate,
html[data-theme="light"] body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+3),
html[data-theme="light"] body.screen-mode .screen-proposals .screen-table tbody tr:nth-child(4n+4){background:#eef3f6}
html[data-theme="light"] body.screen-mode .screen-table th,
html[data-theme="light"] body.screen-mode .screen-table td{
  color:#111827;border-right-color:#111827;border-bottom-color:#111827
}
html[data-theme="light"] body.screen-mode .screen-table tbody tr.screen-pair-end td{
  border-bottom-color:#111827
}
html[data-theme="light"] body.screen-mode .screen-grid .screen-table-wrap + .screen-table-wrap{
  border-left-color:#111827
}
html[data-theme="light"] body.screen-mode .screen-table .screen-time,
html[data-theme="light"] body.screen-mode .screen-table .screen-code,
html[data-theme="light"] body.screen-mode .screen-table .col-time,
html[data-theme="light"] body.screen-mode .screen-table .col-code,
html[data-theme="light"] body.screen-mode .screen-table .col-team,
html[data-theme="light"] body.screen-mode .screen-table .col-player,
html[data-theme="light"] body.screen-mode .screen-table .screen-player,
html[data-theme="light"] body.screen-mode .screen-table .screen-team b,
html[data-theme="light"] body.screen-mode .screen-table .screen-team small,
html[data-theme="light"] body.screen-mode .screen-table .compact-team-copy b,
html[data-theme="light"] body.screen-mode .screen-table .player-cell,
html[data-theme="light"] body.screen-mode .screen-table .screen-odd .odds-pos,
html[data-theme="light"] body.screen-mode .screen-table .screen-odd .odds-neg,
html[data-theme="light"] body.screen-mode .screen-table .market-price .odds-pos,
html[data-theme="light"] body.screen-mode .screen-table .market-price .odds-neg{
  color:#111827
}

html[data-theme="light"] body:not(.screen-mode) .compact-board,
html[data-theme="light"] body:not(.screen-mode) .compact-table-frame,
html[data-theme="light"] body:not(.screen-mode) .compact-table{
  background:#fff;color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .compact-table thead th{
  background:#dce8f0;color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+1),
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+2){background:#fff}
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+3),
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+4){background:#eef3f6}
html[data-theme="light"] body:not(.screen-mode) .compact-table th,
html[data-theme="light"] body:not(.screen-mode) .compact-table td,
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr.game-end td{
  color:#111827;border-right-color:#111827;border-bottom-color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .compact-table .market-price,
html[data-theme="light"] body:not(.screen-mode) .compact-table .market-price .odds-pos,
html[data-theme="light"] body:not(.screen-mode) .compact-table .market-price .odds-neg{
  color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .compact-table-footer{
  background:#dce8f0;color:#111827;border-top-color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .sports-table{
  background:#fff;color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .sports-table thead th{
  background:#dce8f0;color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .sports-table th,
html[data-theme="light"] body:not(.screen-mode) .sports-table td{
  color:#111827;border-right:1px solid #111827;border-bottom-color:#111827
}
html[data-theme="light"] body:not(.screen-mode) .sports-table tbody tr:nth-child(4n+1),
html[data-theme="light"] body:not(.screen-mode) .sports-table tbody tr:nth-child(4n+2){background:#fff}
html[data-theme="light"] body:not(.screen-mode) .sports-table tbody tr:nth-child(4n+3),
html[data-theme="light"] body:not(.screen-mode) .sports-table tbody tr:nth-child(4n+4){background:#eef3f6}

html[data-theme="light"]:fullscreen .topbar{
  background:#fff;border-bottom-color:#111827
}
html[data-theme="light"]:fullscreen .fullscreen-brand,
html[data-theme="light"]:fullscreen .clock,
html[data-theme="light"]:fullscreen .clock b,
html[data-theme="light"]:fullscreen #fullscreenBtn{color:#111827}
html[data-theme="light"]:fullscreen #fullscreenBtn{border-color:#111827}

/* V21: el selector de orden queda junto a la fecha de Compacto. */
body:not(.screen-mode) .compact-tools{
  flex:0 0 auto;display:flex;align-items:stretch;gap:5px;padding-right:5px;
}
body:not(.screen-mode) .compact-order-btn{
  align-self:center;min-height:30px;padding:4px 11px;
  border:1px solid currentColor;border-radius:6px;background:#08294c;color:#fff;
  font-size:calc(11px * var(--sports-font-scale));font-weight:900;
  white-space:nowrap;cursor:pointer;
}
body:not(.screen-mode) .compact-order-btn:focus-visible{
  outline:3px solid #f1a40a;outline-offset:2px;
}
@media(max-width:900px){
  body:not(.screen-mode) .compact-tools{justify-content:flex-end;padding:0 6px 5px}
  body:not(.screen-mode) .compact-date{padding:0 4px}
}
@media(max-width:450px){
  body:not(.screen-mode) .compact-order-btn{padding:3px 6px;font-size:10px}
}

/* Compacto comparte la paleta, la alternancia y los separadores de Tablas. */
html[data-theme="dark"] body:not(.screen-mode) .compact-board{
  background:#061c32;border:3px solid #e9f5ff;
}
html[data-theme="dark"] body:not(.screen-mode) .sports-strip,
html[data-theme="dark"] body:not(.screen-mode) .compact-date{
  background:#072b55;color:#fff;
}
html[data-theme="dark"] body:not(.screen-mode) .sport-btn.active{background:#0966ce}
html[data-theme="dark"] body:not(.screen-mode) .market-strip,
html[data-theme="dark"] body:not(.screen-mode) .market-strip .market-tab{
  background:#08294c;color:#fff;border-color:#fff;
}
html[data-theme="dark"] body:not(.screen-mode) .market-strip .market-tab.active{
  background:#0966ce;color:#fff;
}
html[data-theme="dark"] body:not(.screen-mode) .compact-table-frame,
html[data-theme="dark"] body:not(.screen-mode) .compact-table{
  background:#06274b;color:#fff;
}
html[data-theme="dark"] body:not(.screen-mode) .compact-table thead th{
  background:#202934;color:#fff;border-bottom:2px solid #fff;
}
html[data-theme="dark"] body:not(.screen-mode) .compact-table th,
html[data-theme="dark"] body:not(.screen-mode) .compact-table td{
  border-right:1px solid rgba(255,255,255,.8);border-bottom-color:#fff;color:#fff;
}
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+1),
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+2){background:#0966ce}
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+3),
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr:nth-child(4n+4){background:#172b44}
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr.game-end td{
  border-bottom:2px solid #fff;
}
html[data-theme="dark"] body:not(.screen-mode) .compact-table tbody tr:nth-child(2n+1) .compact-team-copy b{color:#84f9aa}
html[data-theme="dark"] body:not(.screen-mode) .compact-team-copy small{color:#d4e8f5}
html[data-theme="dark"] body:not(.screen-mode) .compact-table .market-price .odds-pos{color:#b5faff}
html[data-theme="dark"] body:not(.screen-mode) .compact-table .market-price .odds-neg{color:#fff}
html[data-theme="dark"] body:not(.screen-mode) .compact-table-footer{
  background:#08294c;color:#fff;border-top:2px solid #fff;
}

html[data-theme="light"] body:not(.screen-mode) .compact-board{
  background:#fff;border:3px solid #111827;
}
html[data-theme="light"] body:not(.screen-mode) .sports-strip,
html[data-theme="light"] body:not(.screen-mode) .compact-date{
  background:#e5eef5;color:#111827;border-bottom-color:#111827;
}
html[data-theme="light"] body:not(.screen-mode) .sport-btn{color:#111827;border-right-color:#111827}
html[data-theme="light"] body:not(.screen-mode) .sport-btn.active{background:#dce8f0;color:#111827}
html[data-theme="light"] body:not(.screen-mode) .market-strip,
html[data-theme="light"] body:not(.screen-mode) .market-strip .market-tab{
  background:#e5eef5;color:#111827;border-color:#111827;
}
html[data-theme="light"] body:not(.screen-mode) .market-strip .market-tab.active{
  background:#dce8f0;color:#111827;
}
html[data-theme="light"] body:not(.screen-mode) .market-strip .market-tab small{color:#374151}
html[data-theme="light"] body:not(.screen-mode) .compact-order-btn{
  background:#dce8f0;color:#111827;
}
html[data-theme="light"] body:not(.screen-mode) .compact-table tbody tr.game-end td{
  border-bottom:2px solid #111827;
}
html[data-theme="light"] body:not(.screen-mode) .compact-table-footer{
  border-top:2px solid #111827;
}
