/* Web 2.0 / Glossy UI */
/* (same as previous glossy CSS; kept concise for brevity in generator) */
:root{--bg1:#e9f2ff;--bg2:#cfe2ff;--ink:#10223a;--muted:#4c6787;--panel:#fff;--panel2:#f7fbff;--border:rgba(16,34,58,.16);--primary:#2f7df6;--primary2:#0e5ce6;--success:#20c06b;--danger:#e5484d;--shadow:0 10px 25px rgba(16,34,58,.18);--shadow2:0 6px 14px rgba(16,34,58,.14);--radius:18px;--radius-sm:12px}
*{box-sizing:border-box}
body{margin:0;font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:var(--ink);background:radial-gradient(900px 520px at 15% -10%, rgba(47,125,246,.45), transparent 60%),radial-gradient(900px 520px at 105% 0%, rgba(32,192,107,.28), transparent 55%),linear-gradient(180deg,var(--bg1),var(--bg2))}
a{color:var(--primary2);text-decoration:none}a:hover{text-decoration:underline}
.container{max-width:1280px;margin:0 auto;padding:18px 14px 44px}
.header{position:sticky;top:0;z-index:50;background:linear-gradient(180deg,#fff,#f3f8ff);border-bottom:1px solid var(--border);box-shadow:0 6px 18px rgba(16,34,58,.10)}
.header .inner{max-width:1280px;margin:0 auto;padding:14px 14px;display:flex;gap:14px;align-items:center}
.brand{font-weight:900;letter-spacing:.2px;font-size:18px;color:#0b1c33;text-shadow:0 1px 0 rgba(255,255,255,.85)}
.pill{margin-left:auto;display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:999px;background:linear-gradient(180deg,#fff,#eaf2ff);border:1px solid rgba(47,125,246,.25);box-shadow:0 4px 12px rgba(47,125,246,.18);color:var(--muted);font-size:12px}
.dot{width:9px;height:9px;border-radius:999px;background:radial-gradient(circle at 35% 35%,#b9ffd8,var(--success));box-shadow:0 0 0 6px rgba(32,192,107,.16), inset 0 1px 0 rgba(255,255,255,.65)}
.tabs{display:flex;gap:10px;margin:18px 0 12px;flex-wrap:wrap;align-items:center}
.tab{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;border:1px solid rgba(16,34,58,.18);background:linear-gradient(180deg,#fff,#eef5ff);color:var(--muted);box-shadow:0 6px 14px rgba(16,34,58,.10)}
.tab:hover{transform:translateY(-1px);box-shadow:0 10px 18px rgba(16,34,58,.12);text-decoration:none}
.tab.active{color:#fff;border-color:rgba(14,92,230,.35);background:linear-gradient(180deg,var(--primary),var(--primary2));text-shadow:0 1px 0 rgba(0,0,0,.22)}
.small{color:var(--muted);font-size:12px}
.badgeSmall{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;border:1px solid rgba(16,34,58,.18);background:linear-gradient(180deg,#fff,#f0f6ff);box-shadow:0 4px 10px rgba(16,34,58,.10);color:rgba(16,34,58,.78);font-size:12px}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.card{grid-column:span 12;border-radius:var(--radius);border:1px solid var(--border);background:linear-gradient(180deg,#fff,var(--panel2));box-shadow:var(--shadow);padding:14px;overflow:hidden}
@media (min-width:820px){.card{grid-column:span 6}}
@media (min-width:1180px){.card{grid-column:span 4}}
.card::before{content:"";display:block;height:6px;margin:-14px -14px 12px -14px;background:linear-gradient(90deg,rgba(47,125,246,.95),rgba(32,192,107,.85));border-bottom:1px solid rgba(16,34,58,.10)}
.cardHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.cardHead .title{font-weight:900;font-size:15px;color:#0b1c33}
.badge{font-size:12px;color:rgba(16,34,58,.78);border:1px solid rgba(16,34,58,.18);border-radius:999px;padding:4px 10px;background:linear-gradient(180deg,#fff,#f0f6ff);box-shadow:0 4px 10px rgba(16,34,58,.10)}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{padding:10px 8px;border-top:1px solid rgba(16,34,58,.12)}
.table th{color:rgba(16,34,58,.70);font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-size:11px}
.table tr:hover td{background:rgba(47,125,246,.06)}
.table td.place{width:58px;font-weight:900}
.table td.weight{width:92px;font-weight:900;color:#0e5ce6}
.table td.time{color:var(--muted);font-size:12px}
.panel{border:1px solid var(--border);background:linear-gradient(180deg,#fff,var(--panel2));border-radius:var(--radius);padding:14px;box-shadow:var(--shadow2)}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
.field{flex:1 1 180px;min-width:200px}
label{display:block;font-size:12px;color:rgba(16,34,58,.70);margin-bottom:6px;font-weight:700}
input,select{width:100%;padding:11px 12px;border-radius:var(--radius-sm);border:1px solid rgba(16,34,58,.22);background:linear-gradient(180deg,#fff,#f4f8ff);color:var(--ink);outline:none;box-shadow:inset 0 1px 2px rgba(16,34,58,.10),0 2px 10px rgba(16,34,58,.06)}
input:focus,select:focus{border-color:rgba(47,125,246,.55);box-shadow:inset 0 1px 2px rgba(16,34,58,.10),0 0 0 4px rgba(47,125,246,.18)}
input::placeholder{color:rgba(76,103,135,.65)}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;align-items:center}
button{padding:11px 14px;border-radius:14px;border:1px solid rgba(16,34,58,.18);background:linear-gradient(180deg,#fff,#edf5ff);color:rgba(16,34,58,.88);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 8px 16px rgba(16,34,58,.12);cursor:pointer;font-weight:800}
button:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 12px 18px rgba(16,34,58,.14)}
button.primary{color:#fff;border-color:rgba(14,92,230,.45);background:linear-gradient(180deg,#5aa0ff,var(--primary2));text-shadow:0 1px 0 rgba(0,0,0,.22)}
button.danger{color:#fff;border-color:rgba(229,72,77,.45);background:linear-gradient(180deg,#ff7b7f,var(--danger));text-shadow:0 1px 0 rgba(0,0,0,.22)}
hr{border:none;border-top:1px solid rgba(16,34,58,.14);margin:18px 0}
.notice{margin-top:10px;font-size:12px;color:rgba(16,34,58,.78)}
.notice.good{color:#0a7a3a}
.notice.bad{color:#b51d22}
.manageWrap{overflow:auto;border-radius:var(--radius);border:1px solid rgba(16,34,58,.16);margin-top:12px;box-shadow:0 10px 18px rgba(16,34,58,.10)}
.manageWrap table{width:100%;border-collapse:collapse;min-width:980px;background:#fff}
.manageWrap th,.manageWrap td{padding:10px 8px;border-top:1px solid rgba(16,34,58,.12);text-align:left}
.manageWrap th{color:rgba(16,34,58,.70);text-transform:uppercase;font-size:11px;letter-spacing:.06em;background:linear-gradient(180deg,#fff,#f1f6ff)}
.manageWrap td small{color:rgba(76,103,135,.80)}
.manageWrap input,.manageWrap select{padding:9px 10px;border-radius:12px}
.manageWrap button{padding:8px 10px;border-radius:12px}
.checkRow{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px}
.checkPill{display:inline-flex;gap:8px;align-items:center;padding:8px 12px;border-radius:999px;border:1px solid rgba(16,34,58,.18);background:linear-gradient(180deg,#fff,#eef5ff);box-shadow:0 6px 14px rgba(16,34,58,.10);color:rgba(16,34,58,.78);font-size:12px}
.checkPill input{width:auto;box-shadow:none}


/* Sponsor area */
.logoImg{
  height: 36px;
  width: auto;
  display:block;
  filter: drop-shadow(0 2px 3px rgba(16,34,58,.18));
}
@media (min-width: 820px){
  .logoImg{ height: 44px; }
}
.sponsorGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 820px){
  .sponsorGrid{ grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1180px){
  .sponsorGrid{ grid-template-columns: repeat(6, 1fr); }
}
.sponsorTile{
  border:1px solid rgba(16,34,58,.14);
  border-radius: 16px;
  background: linear-gradient(180deg,#fff,#f4f8ff);
  box-shadow: 0 8px 16px rgba(16,34,58,.10);
  padding: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 82px;
}
.sponsorTile img{
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
  display:block;
}
.sponsorTitle{
  margin-top:6px;
  text-align:center;
  font-size:12px;
  color: rgba(16,34,58,.74);
  font-weight:700;
}


/* TV / Weigh-in display */
body.tv{
  background: radial-gradient(1200px 700px at 20% -10%, rgba(47,125,246,.35), transparent 60%),
              radial-gradient(1200px 700px at 110% 0%, rgba(32,192,107,.22), transparent 55%),
              linear-gradient(180deg,#071221,#0a1630);
  color: #eaf2ff;
}
.tv .header{
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.tv .brand{ color:#fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); font-size: 26px; }
.tv .pill{
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.86);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.tv .container{ max-width: 1920px; padding: 12px 12px 14px; }
.tv .grid{ gap: 16px; }
.tv .card{
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.tv .card::before{
  background: linear-gradient(90deg, rgba(47,125,246,1), rgba(32,192,107,1));
  border-bottom: 1px solid rgba(0,0,0,.35);
}
.tv .badge, .tv .badgeSmall{
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.88);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}
.tv .small{ color: rgba(255,255,255,.72); }
.tv .table{ font-size: 16px; }
.tv .table th{ color: rgba(255,255,255,.78); font-size: 13px; }
.tv .table td{ border-top: 1px solid rgba(255,255,255,.12); }
.tv .table tr:hover td{ background: rgba(255,255,255,.06); }
.tv .table td.place{ font-size: 20px; }
.tv .table td.weight{ font-size: 20px; color: #9ec7ff; }
.tv .table td.time{ font-size: 14px; color: rgba(255,255,255,.70); }
.tvTopRow{
  display:flex;
  align-items:center;
  gap:14px;
}
.tvLogo{
  height: 52px;
  width:auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
}
.tvTicker{
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  padding: 10px 14px;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.tvTicker strong{ color:#fff; }
.tvSponsors{
  margin-top: 14px;
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  opacity: .95;
}
.tvSponsors img{
  height: 42px;
  width:auto;
  object-fit:contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.40));
}
@media (min-width: 1200px){
  .tv .card{ grid-column: span 4; }
}
@media (min-width: 1700px){
  .tv .card{ grid-column: span 3; }
}



/* TV scale controls */
.tv .tvScaleRoot{
  --tvScale: 1;
}
.tv .tvScaleRoot{
  font-size: calc(16px * var(--tvScale));
}
.tvControls{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  padding: 10px 12px;
  width: 320px;
  max-width: calc(100vw - 28px);
  backdrop-filter: blur(6px);
}
.tvControls .row2{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.tvControls label{color:rgba(255,255,255,.78);font-weight:800;margin:0;font-size:12px}
.tvControls input[type="range"]{width:100%}
.tvControls .miniBtn{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  color: rgba(255,255,255,.9);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
  cursor:pointer;
  font-weight:900;
}
.tvControls .miniBtn:hover{transform: translateY(-1px);}
.tvControls .hint{font-size:12px;color:rgba(255,255,255,.72);margin-top:6px}
.tvHide{display:none !important}


/* TV Freeform board (drag + resize widgets) */
.tvBoard{
  position: relative;
  height: calc(100vh - 120px); /* fallback; JS refines */
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  overflow: hidden; /* keep widgets inside */
}
.tvWidget{
  position: absolute;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  overflow: hidden;
  min-width: 260px;
  min-height: 220px;
}
.tvWidget .cardHead{
  cursor: grab;
  user-select: none;
}
.tvWidget.dragging .cardHead{ cursor: grabbing; }
.tvWidget .tvBody{
  padding: 10px 12px 12px;
}
.tvWidget .table{ margin-top: 6px; }
.tvWidget .table td{ padding: 10px 10px; }
.tvWidget .table th{ padding: 10px 10px; }
.tvResizeHandle{
  position:absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.20);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  box-shadow: 0 12px 24px rgba(0,0,0,.30);
  cursor: nwse-resize;
}
.tvWidget .badge{ font-size: 12px; }
.tvWidget .title{ font-size: 16px; }
.tv .tvTicker{ margin-top: 10px; }

@media (max-width: 1100px){
  .tvBoard{ height: auto; min-height: 680px; }
}


/* TV layout lock */
.tvLocked .tvWidget .cardHead{ cursor: default; }
.tvLocked .tvResizeHandle{ display:none; }
.lockPill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  color: rgba(255,255,255,.92);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}
.lockDot{
  width:10px;height:10px;border-radius:99px;
  background: rgba(32,192,107,1);
  box-shadow: 0 0 0 6px rgba(32,192,107,.18);
}
.tvLocked .lockDot{ background: rgba(255,99,71,1); box-shadow: 0 0 0 6px rgba(255,99,71,.18); }


/* Sponsors page */
.sponsor-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:14px; }
.sponsor-card { border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px; text-align:center; }
.sponsor-card img { max-width: 100%; height: 90px; object-fit: contain; display:block; margin: 0 auto; }
.sponsor-title { margin-top: 8px; font-weight: 700; }
.sponsor-url { margin-top: 4px; font-size: 12px; opacity: .8; word-break: break-word; }
.sponsor-link { display:inline-block; }

/* Mobile polish */
@media (max-width: 600px) {
  .tabs { flex-wrap: wrap; gap: 8px; }
  .tab { padding: 10px 12px; }
  table { display:block; overflow-x:auto; }
  .sponsorTile img { max-width: 140px; max-height: 70px; }
}

/* ===============================
   Sponsors Page Logo Size Fix
================================ */
.sponsorGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.sponsorTile {
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsorTile img {
  max-height: 90px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* =========================
   RIRC Compatibility Layer
   Keeps RIRC layout, adopts NWFL glossy theme
   ========================= */

/* RIRC uses .wrap instead of .container on public pages */
.wrap{ max-width:1280px; margin:0 auto; padding:18px 14px 44px; }

/* small muted helper used in RIRC pages */
.muted{ color: var(--muted); font-size: 12px; }

/* RIRC public nav variants (.nav in index.php, .topnav in _public_nav.php) */
.nav, .topnav{
  display:flex;
  gap:10px;
  margin: 18px 0 12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
}

/* Make any link inside those navs look like a glossy tab */
.nav a, .topnav a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border: 1px solid rgba(16,34,58,.18);
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  color: var(--muted);
  box-shadow: 0 6px 14px rgba(16,34,58,.10);
  text-decoration:none;
  font-weight: 800;
}
.nav a:hover, .topnav a:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(16,34,58,.12);
  text-decoration:none;
}

/* If pages mark current tab with .active or aria-current, show active styling */
.nav a.active, .topnav a.active,
.nav a[aria-current="page"], .topnav a[aria-current="page"],
.nav a[aria-current="true"], .topnav a[aria-current="true"]{
  color:#ffffff;
  border-color: rgba(14,92,230,.35);
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
}

/* Logo image framing used on public pages */
.tournament-logo{
  height:120px;
  width:auto;
  max-width:100%;
  object-fit:contain;
  border-radius:16px;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  padding:10px;
  border:1px solid rgba(16,34,58,.16);
  box-shadow: 0 8px 18px rgba(16,34,58,.12);
}

/* Admin: RIRC uses .topbar; match the glossy sticky header */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(16,34,58,.10);
}
.topbar-inner{
  max-width:1280px;
  margin:0 auto;
  padding:14px 14px;
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap: wrap;
}

/* Admin nav links (in topbar) */
.topbar a{
  text-decoration:none;
}
.topbar .brand{
  font-weight: 900;
  font-size: 18px;
  color:#0b1c33;
}
.topbar .nav-admin{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.topbar .nav-admin a{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border: 1px solid rgba(16,34,58,.18);
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  color: var(--muted);
  box-shadow: 0 6px 14px rgba(16,34,58,.10);
  font-weight: 800;
}
.topbar .nav-admin a:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(16,34,58,.12);
}
.topbar .nav-admin a.active{
  color:#fff;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  border-color: rgba(14,92,230,.35);
}

/* Admin cards spacing */
.admin .container{ max-width:1280px; margin:0 auto; padding:18px 14px 44px; }
/* ===== Sponsors logo sizing fix ===== */

.sponsor-logo img,
.sponsors img,
.sponsor-card img,
.card img.logo {
  max-height: 70px !important;   /* ← main size control */
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

/* Optional: give the logo area consistent spacing */
.sponsor-logo,
.sponsor-card .logo-wrap {
  padding: 8px 6px;
}
/* ===== Public Sponsors logo sizing (rirc/sponsors.php uses .logo img) ===== */
.card .logo{
  height: 90px;                 /* consistent logo area */
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px;
}

.card .logo img{
  max-height: 70px !important;  /* change this number to taste */
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display:block;
}
/* ===== Sponsor cards → perfect squares ===== */

/* Make the sponsor logo area square */
.card .logo{
  width: 100%;
  aspect-ratio: 1 / 1;          /* ⭐ forces square */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #ffffff;
}

/* Keep logos contained and centered */
.card .logo img{
  max-width: 80%;
  max-height: 80%;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}

/* Optional: make the whole sponsor card feel tighter */
.sponsors .card,
.grid .card{
  overflow: hidden;
}
/* Force 3-across sponsor tiles on desktop */
.grid{
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  gap: 14px !important;
}
.grid .card{ grid-column: span 12 !important; }
@media (min-width: 820px){ .grid .card{ grid-column: span 6 !important; } }
@media (min-width: 1180px){ .grid .card{ grid-column: span 4 !important; } }
/* ===== Mobile leaderboard fix: prevent Time column cutoff ===== */
@media (max-width: 520px){

  /* Let the cards breathe a bit on small screens */
  .card, .panel, .box{
    padding: 12px !important;
  }

  /* Make tables fit the screen */
  table, .table{
    width: 100% !important;
    table-layout: fixed !important;   /* forces columns to respect widths */
  }

  /* Reduce cell padding so more fits */
  th, td, .table th, .table td{
    padding: 8px 6px !important;
    font-size: 12px !important;
  }

  /* Force the Time column to be wide enough + wrap nicely */
  th:last-child,
  td:last-child{
    width: 78px !important;
    white-space: normal !important;
    text-align: right !important;
  }

  /* Give Team column more room (typically 2nd column) */
  th:nth-child(2),
  td:nth-child(2){
    width: auto !important;
  }

  /* Keep weight columns compact (middle columns) */
  th:nth-child(3), td:nth-child(3),
  th:nth-child(4), td:nth-child(4),
  th:nth-child(5), td:nth-child(5){
    width: 56px !important;
    text-align: right !important;
  }

  /* Place/# column very small */
  th:first-child,
  td:first-child{
    width: 26px !important;
  }

  /* Stop long team names from blowing up the layout */
  td:nth-child(2){
    word-break: break-word !important;
    hyphens: auto !important;
  }
}
/* ===========================
   TV VIEW: High-contrast / legible
   =========================== */

/* Target common TV view wrappers */
body.tv, body.tvview, body.tv-view,
.tv, .tvview, .tv-view, #tvView, .tvPage{
  color: #0b1c33 !important;
}

/* Remove any dark overlay/opacity that makes tiles unreadable */
.tv .card, .tvview .card, .tv-view .card,
#tvView .card, .tvPage .card,
.tv .panel, .tvview .panel, .tv-view .panel,
#tvView .panel, .tvPage .panel{
  background: linear-gradient(180deg, #ffffff, #f6fbff) !important;
  border: 1px solid rgba(16,34,58,.16) !important;
  box-shadow: 0 14px 34px rgba(16,34,58,.18) !important;
  opacity: 1 !important;
  filter: none !important;
}

/* If the tiles are using some custom class like .tile */
.tv .tile, .tvview .tile, .tv-view .tile, #tvView .tile{
  background: linear-gradient(180deg, #ffffff, #f6fbff) !important;
  border: 1px solid rgba(16,34,58,.16) !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Make headings pop */
.tv h1, .tv h2, .tv h3,
.tvview h1, .tvview h2, .tvview h3,
.tv-view h1, .tv-view h2, .tv-view h3{
  color: #071426 !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
}

/* Tables: bigger font + stronger contrast for TV */
.tv table, .tvview table, .tv-view table,
.tv .table, .tvview .table, .tv-view .table{
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 18px !important;          /* bigger */
}

.tv th, .tv td,
.tvview th, .tvview td,
.tv-view th, .tv-view td{
  padding: 12px 10px !important;
  border-top: 1px solid rgba(16,34,58,.16) !important;
  color: #0b1c33 !important;
}

/* Header row */
.tv th, .tvview th, .tv-view th{
  color: rgba(16,34,58,.85) !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px !important;
  background: rgba(255,255,255,.65) !important;
}

/* Make key numbers pop */
.tv td.weight, .tv td.total,
.tvview td.weight, .tvview td.total,
.tv-view td.weight, .tv-view td.total{
  font-weight: 900 !important;
  color: #0e5ce6 !important;
}

/* Time column: keep readable */
.tv td.time, .tvview td.time, .tv-view td.time{
  color: rgba(16,34,58,.85) !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

/* Kill any "dim all tiles" effect if present */
.tv *[style*="opacity:"],
.tvview *[style*="opacity:"],
.tv-view *[style*="opacity:"]{
  opacity: 1 !important;
}
