/* ==========================================================
   Dragon Dux Tournament — playful dragon theme
   Cyan + red + yellow + purple/green from the banner.
   Plus a dark "Arena TV" theme for the schedule dashboard.
   Mobile-first.
   ========================================================== */

:root {
  --sky: #88dbe6;
  --sky-2: #b8ecf2;
  --sky-3: #d6f3f8;
  --red: #e54a35;
  --red-d: #c93823;
  --yellow: #f6c63a;
  --yellow-d: #e2ad1f;
  --purple: #9b7ed8;
  --purple-2: #c5a4ee;
  --pink: #ec9bbf;
  --green: #4fa858;
  --green-d: #2f7f3a;
  --grass: #8cc55a;

  --ink-900: #1a2433;
  --ink-700: #36465a;
  --ink-500: #6b7787;
  --ink-300: #a9b3c1;
  --line: #e2e8ee;

  --bg: #f3fbfc;
  --card: #ffffff;
  --shadow: 0 2px 4px rgba(13,30,50,.06), 0 12px 28px rgba(13,30,50,.08);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1160px;

  --tv-bg: #0e2444;
  --tv-bg-2: #143161;
  --tv-card: #15346a;
  --tv-card-2: #1a3e7a;
  --tv-line: #234982;
  --tv-text: #eaf2ff;
  --tv-muted: #95b1d8;
  --tv-accent: #f6c63a;
  --tv-accent-2: #88dbe6;
  --tv-active: #f6c63a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans Georgian", "BPG Nino Mtavruli", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  background-image:
    radial-gradient(800px 400px at 90% -20%, rgba(155,126,216,.18), transparent 70%),
    radial-gradient(700px 360px at -10% 0%, rgba(136,219,230,.35), transparent 70%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--red-d); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
section { padding: 28px 0; }
@media (min-width: 768px) { section { padding: 48px 0; } }

/* ---------- Header / Nav ---------- */
.site-header {
  background: linear-gradient(180deg, #ffffff 0%, #f3fbfc 100%);
  border-bottom: 3px solid var(--sky);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(13,30,50,.05);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  background: var(--sky);
  flex: 0 0 auto;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(13,30,50,.1);
}
.brand-name { line-height: 1.05; }
.brand-name small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: .8px;
  text-transform: uppercase;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: var(--red);
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--red-d);
}
.nav-toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-d); }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; width: 18px; height: 2px;
  background: #fff; position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-links { list-style: none; margin: 0; padding: 0; display: none; width: 100%; }
.nav-links.open { display: block; }
.nav-links li { border-top: 1px solid var(--line); }
.nav-links a {
  display: block;
  padding: 14px 18px;
  color: var(--ink-900);
  font-weight: 700;
  font-size: 15px;
}
.nav-links a:hover { background: var(--sky-3); text-decoration: none; }
.nav-links a.active { color: var(--red); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex !important; width: auto; gap: 4px; }
  .nav-links li { border-top: none; }
  .nav-links a { padding: 8px 14px; border-radius: 10px; }
  .nav-links a.active { background: var(--yellow); color: var(--ink-900); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,.18) 100%),
    url('channels4_banner.jpg') center 35% / cover no-repeat,
    var(--sky);
  color: #fff;
  padding: 36px 0 44px;
  text-align: center;
  border-bottom: 6px solid var(--yellow);
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,36,68,.05), rgba(14,36,68,.35));
  pointer-events: none;
}
.hero .container { position: relative; }
.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--red);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 14px;
  text-shadow: none;
  box-shadow: 0 3px 0 var(--red-d);
}
.hero h1 {
  font-size: clamp(28px, 7vw, 56px);
  line-height: 1.05;
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: -.5px;
}
.hero h1 .accent { color: var(--yellow); }
.hero p.lead {
  margin: 0 auto 22px;
  max-width: 640px;
  font-size: clamp(15px, 2.6vw, 18px);
  color: rgba(255,255,255,.95);
}
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
  text-shadow: none;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-d); }
.btn-primary:hover { background: #ee5840; text-decoration: none; }
.btn-primary:active { box-shadow: 0 2px 0 var(--red-d); }
.btn-yellow { background: var(--yellow); color: var(--ink-900); box-shadow: 0 4px 0 var(--yellow-d); }
.btn-yellow:hover { background: #fed14a; text-decoration: none; }
.btn-yellow:active { box-shadow: 0 2px 0 var(--yellow-d); }
.btn-ghost {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}
.btn-ghost:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.btn-outline { background: #fff; color: var(--ink-900); border: 2px solid var(--line); }
.btn-outline:hover { background: var(--sky-3); text-decoration: none; }
.btn-danger { background: #fff; color: var(--red); border: 2px solid #f8c0b6; }
.btn-sm { padding: 8px 14px; font-size: 13px; box-shadow: none; }

/* ---------- Cards ---------- */
.section-title {
  font-size: clamp(22px, 4.2vw, 30px);
  margin: 0 0 6px;
  color: var(--ink-900);
  letter-spacing: -.3px;
  font-weight: 900;
}
.section-title .accent { color: var(--red); }
.section-sub { color: var(--ink-500); margin: 0 0 22px; font-size: 15px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card.bordered-red { border-color: var(--red); }
.card.bordered-yellow { border-color: var(--yellow); }
.card.bordered-purple { border-color: var(--purple-2); }
.card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: .2px; font-weight: 800; }
.card .label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red-d);
  font-weight: 800;
  margin-bottom: 6px;
}
.card .value { font-size: 24px; font-weight: 900; color: var(--ink-900); line-height: 1.15; }
.card .meta { color: var(--ink-500); font-size: 14px; margin-top: 4px; }

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
}
label { font-size: 13px; color: var(--ink-700); font-weight: 700; display: block; margin-bottom: 4px; }
input[type="text"], input[type="number"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 12px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229,74,53,.18);
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 2px solid var(--sky-2); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--sky-3);
  padding: 10px 12px;
  border-bottom: 2px solid var(--sky-2);
}
tbody td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--sky-3); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--yellow); color: var(--ink-900); font-size: 12px; font-weight: 800; }
.badge-red    { background: var(--red);    color: #fff; }
.badge-purple { background: var(--purple); color: #fff; }
.badge-green  { background: var(--green);  color: #fff; }
.badge-sky    { background: var(--sky);    color: var(--ink-900); }
.badge-gray   { background: #eef1f4;       color: var(--ink-700); }

/* ---------- Venue / Map ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--sky-2); box-shadow: var(--shadow); aspect-ratio: 16 / 10; background: #e5e7eb; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.map-illustration {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--yellow);
  box-shadow: var(--shadow), 0 0 0 4px var(--sky-2) inset;
  aspect-ratio: 16 / 10;
  background: var(--sky);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.map-illustration:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(13,30,50,.12), 0 16px 36px rgba(13,30,50,.14);
}
.map-illustration:active { transform: translateY(0); }
.map-illustration svg { width: 100%; height: 100%; display: block; }

.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k { flex: 0 0 130px; color: var(--ink-500); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.fact-list .v { color: var(--ink-900); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  background: var(--ink-900);
  color: rgba(255,255,255,.78);
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  border-top: 4px solid var(--red);
}
.site-footer a { color: #fff; }

/* ---------- Toast / inline messages ---------- */
.note { padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; font-weight: 600; }
.note-info { background: var(--sky-3); color: var(--ink-700); border: 1px solid var(--sky-2); }
.note-warn { background: #fff4d6;     color: #7a5400;       border: 1px solid var(--yellow); }

.empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--ink-500);
  border: 2px dashed var(--sky-2);
  border-radius: var(--radius);
  background: #fff;
}

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }
.muted { color: var(--ink-500); }

/* ==========================================================
   SCHEDULE / SCOREBOARD — bright dragon palette
   Uses the same colors as the rest of the site (cyan/red/yellow).
   ========================================================== */

.tv-hero {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,.18) 100%),
    url('channels4_banner.jpg') center 35% / cover no-repeat,
    var(--sky);
  padding: 30px 0 26px;
  border-bottom: 6px solid var(--yellow);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
  position: relative;
}
.tv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,36,68,.05), rgba(14,36,68,.35));
  pointer-events: none;
}
.tv-hero .container { position: relative; }
.tv-hero h1 {
  margin: 0;
  font-size: clamp(26px, 5.4vw, 44px);
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--yellow);
  line-height: 1.05;
}
.tv-hero p.lead { color: rgba(255,255,255,.9); margin: 8px 0 0; font-size: 15px; }

.tv-stats { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 720px) { .tv-stats { grid-template-columns: repeat(4, 1fr); } }
.tv-stat {
  background: rgba(255,255,255,.92);
  border: 2px solid var(--yellow);
  padding: 10px 12px;
  border-radius: 14px;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(13,30,50,.18);
}
.tv-stat .k {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red-d);
  font-weight: 800;
}
.tv-stat .v { font-size: 18px; font-weight: 900; color: var(--ink-900); margin-top: 2px; }

.tv-controls {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.tv-layout { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .tv-layout { grid-template-columns: 2fr 1fr; } }

.tv-groups { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tv-groups { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tv-groups { grid-template-columns: repeat(2, 1fr); } }

.tv-group {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tv-group::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--sky), var(--purple-2), var(--yellow));
}
.tv-group h3 {
  margin: 4px 0 12px;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red-d);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tv-group .pill {
  background: var(--yellow);
  color: var(--ink-900);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
}
.tv-round { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.tv-round-title {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 800;
  margin: 0 0 6px;
}
.tv-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.tv-match:hover { background: var(--sky-3); }
.tv-match.has-score {
  background: #fff8df;
  border-color: var(--yellow);
}
.tv-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
  min-width: 0;
}
.tv-team > span:not(.tv-avatar) {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tv-team.right { justify-content: flex-end; text-align: right; }

/* Stack on narrow screens — long player-pair names need their own row */
@media (max-width: 560px) {
  .tv-match {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 6px;
    text-align: center;
  }
  .tv-team, .tv-team.right {
    justify-content: center;
    text-align: center;
  }
  .tv-score {
    justify-content: center;
    padding: 4px 0;
  }
}
.tv-score { display: flex; gap: 6px; align-items: center; }
.tv-score input {
  width: 44px;
  padding: 6px 4px !important;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  border-radius: 8px !important;
  border: 2px solid var(--line) !important;
  background: #fff !important;
  color: var(--ink-900) !important;
}
.tv-score input:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(229,74,53,.18) !important;
}
.tv-score .dash { color: var(--red); font-weight: 900; font-size: 18px; }

.tv-side { display: grid; gap: 14px; }
.tv-board {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tv-board::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--yellow), var(--red), var(--purple));
}
.tv-board h3 {
  margin: 4px 0 10px;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red-d);
  font-weight: 900;
  display: flex; align-items: center; gap: 10px;
}
.tv-board h3 .pill {
  background: var(--sky);
  color: var(--ink-900);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
}
.tv-stand { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ink-900); }
.tv-stand td:nth-child(2), .tv-stand th:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}

/* Simplified 6-col standings (standings.html): # · გუნდი · თ · მ · წ · ქ */
.tv-board table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.tv-board table th:first-child,
.tv-board table td:first-child {
  width: 24px;
  padding-left: 8px;
}
.tv-board table th:nth-child(2),
.tv-board table td:nth-child(2) {
  width: auto;
  text-align: left;
}
.tv-board table th:nth-child(n+3),
.tv-board table td:nth-child(n+3) {
  width: 30px;
  text-align: center;
  padding: 6px 4px;
}

.tv-stand th {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-500);
  text-align: center;
  padding: 6px 4px;
  border-bottom: 2px solid var(--sky-2);
  background: transparent;
}
.tv-stand th:nth-child(2) { text-align: left; }
.tv-stand td {
  padding: 8px 4px;
  border-bottom: 1px dashed var(--line);
  text-align: center;
  background: transparent;
}
.tv-stand td:nth-child(2) { text-align: left; font-weight: 700; }
.tv-stand tr:nth-child(odd) td { background: var(--sky-3); }
.tv-stand tr.leader td {
  background: #fff8df !important;
  color: var(--ink-900);
}
.tv-stand tr.leader td:first-child { color: var(--red); font-weight: 900; }
.tv-stand .pts {
  background: var(--yellow);
  color: var(--ink-900);
  border-radius: 6px;
  padding: 2px 10px;
  font-weight: 900;
  display: inline-block;
  box-shadow: 0 2px 0 var(--yellow-d);
}

/* ==========================================================
   Teams page — card list (replaces table on all sizes)
   ========================================================== */
.team-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .team-list { grid-template-columns: repeat(2, 1fr); }
}

.team-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.team-card-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--ink-900);
  font-weight: 900;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.team-card-body {
  min-width: 0;
}
.team-card-players {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-900);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.team-card-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 13px;
}
.team-card-meta .badge { white-space: nowrap; }
.team-card-remove {
  flex: 0 0 auto;
  align-self: flex-start;
}
@media (max-width: 480px) {
  .team-card { padding: 10px 12px; }
  .team-card-players { font-size: 14px; }
  .team-card-remove { padding: 6px 10px; font-size: 12px; }
}

/* ==========================================================
   Day-grouped schedule view
   ========================================================== */
.day-section { margin-bottom: 26px; }
.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  color: var(--ink-900);
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 3px 0 var(--red-d);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.day-count { background: rgba(255,255,255,.55); }
.day-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .3px;
  flex: 1;
}
.day-count {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.time-slot { margin-bottom: 14px; }
.time-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-700);
  background: var(--sky-3);
  border: 1px solid var(--sky-2);
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 8px;
}

.match-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .match-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .match-grid { grid-template-columns: repeat(3, 1fr); } }

.match-card {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.match-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--purple-2), var(--yellow));
}
.match-card.has-score { background: #fffaef; border-color: var(--yellow); }
.match-card.has-score::before { background: linear-gradient(90deg, var(--yellow), var(--red)); }

.match-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
}
.court-pill {
  background: var(--ink-900);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 6px;
}
.match-card-head .badge { font-size: 11px; padding: 3px 8px; }
.match-id {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-500);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.stage-code {
  font-size: 12px;
  font-weight: 900;
  color: var(--red-d);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.match-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 4px;
}
.match-team-a, .match-team-b {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-900);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.match-team-a { text-align: left; }
.match-team-b { text-align: right; }
.match-team-a.pending, .match-team-b.pending {
  color: var(--ink-500);
  font-weight: 700;
}
.match-score {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-700);
  white-space: nowrap;
}
.bk-mini-row .score-text {
  display: inline-block;
  min-width: 58px;
  padding: 4px 10px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
  color: var(--ink-900);
  background: var(--sky-3);
  border: 2px solid var(--sky-2);
  border-radius: 7px;
  line-height: 1.1;
  letter-spacing: .5px;
}
.bk-mini.has-score .bk-mini-row .score-text {
  background: #fff;
  border-color: var(--yellow);
  color: var(--red-d);
}

@media (max-width: 480px) {
  .match-team-a, .match-team-b { font-size: 12px; }
  .match-score { font-size: 13px; }
}

/* ==========================================================
   Bracket — compact card style, two brackets (B and C)
   ========================================================== */
.bracket-block { margin-bottom: 28px; }
.bracket-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.3px;
  color: var(--ink-900);
  display: inline-block;
  padding: 8px 18px;
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--yellow-d);
}

.bk-mini {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.bk-mini::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sky), var(--purple-2));
}
.bk-mini.has-score { background: #fffaef; border-color: var(--yellow); }
.bk-mini.has-score::before { background: linear-gradient(180deg, var(--yellow), var(--red)); }
.bk-mini-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--red-d);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 6px;
  padding-left: 4px;
}
.bk-mini-tag .muted { color: var(--ink-500); font-weight: 700; }
.bk-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 0 5px 4px;
  border-bottom: 1px dashed var(--line);
}
.bk-mini-row:last-child { border-bottom: 0; }
.bk-mini-row > span {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.bk-mini-row.pending > span {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 800;
  background: var(--sky-3);
  padding: 3px 8px;
  border-radius: 5px;
  flex: 0 0 auto;
  letter-spacing: .3px;
}
.bk-mini-row input[type="number"] {
  width: 44px !important;
  padding: 5px 4px !important;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  border: 2px solid var(--line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--ink-900) !important;
}
.bk-mini-row input[type="number"]:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(229,74,53,.18) !important;
}

/* Inherit existing .bk-grid, .bk-col, .bk-col-title, .bk-podium-card, .bk-pod */
.bracket-block .bk-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .bracket-block .bk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .bracket-block .bk-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================
   Playoff bracket (legacy classes still used by .bk-pod podium)
   ========================================================== */
.bk-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .bk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .bk-grid { grid-template-columns: repeat(4, 1fr); } }

.bk-col { display: flex; flex-direction: column; gap: 12px; }
.bk-col-title {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red-d);
  font-weight: 900;
  padding: 6px 10px;
  background: var(--yellow);
  border-radius: 999px;
  display: inline-block;
  align-self: flex-start;
  box-shadow: 0 3px 0 var(--yellow-d);
}

.bk-match {
  background: var(--card);
  border: 2px solid var(--sky-2);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.bk-match::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--sky), var(--purple-2));
}
.bk-match.has-score { border-color: var(--yellow); background: #fffaef; }
.bk-match.has-score::before { background: linear-gradient(180deg, var(--yellow), var(--red)); }
.bk-match.pending { opacity: .65; }
.bk-match.pending::before { background: var(--line); }

.bk-tag {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 800;
  margin: 0 0 8px;
  padding-left: 4px;
}
.bk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0 6px 4px;
  border-bottom: 1px dashed var(--line);
}
.bk-row:last-of-type { border-bottom: 0; }
.bk-team { font-weight: 700; color: var(--ink-900); font-size: 14px; flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.bk-team .slot-team { color: var(--ink-900); }
.bk-team .slot-pending {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  background: var(--sky-3);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: .5px;
}
.bk-row input[type="number"] {
  width: 50px !important;
  padding: 6px 4px !important;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  border: 2px solid var(--line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--ink-900) !important;
}
.bk-row input[type="number"]:focus {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(229,74,53,.18) !important;
}
.bk-row input[type="number"]:disabled { background: #f6f7f9 !important; opacity: .5; }

/* Podium */
.bk-podium-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bk-pod {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
  border: 2px solid;
  box-shadow: var(--shadow);
}
.bk-pod span { font-size: 28px; line-height: 1; }
.bk-pod strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-700); }
.bk-pod div { font-size: 16px; color: var(--ink-900); margin-top: 2px; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.bk-pod > div { overflow: hidden; }
.bk-pod.gold   { background: #fff8df; border-color: var(--yellow); }
.bk-pod.silver { background: #eef3f8; border-color: #c8d3df; }
.bk-pod.bronze { background: #fbe8d8; border-color: #e2a675; }

/* ==========================================================
   Filter pills (teams.html, schedule.html, standings.html)
   ========================================================== */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink-700);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.filter-pill:hover { background: var(--sky-3); }
.filter-pill.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red-d);
  box-shadow: 0 2px 0 var(--red-d);
}

/* ==========================================================
   Mobile refinements
   ========================================================== */
@media (max-width: 720px) {
  /* Prevent iOS Safari from zooming when focusing inputs */
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="number"], select, textarea { font-size: 16px; }
}

@media (max-width: 480px) {
  /* fact-list: key+value stacks vertically on tight phones */
  .fact-list li { flex-direction: column; gap: 2px; padding: 8px 0; }
  .fact-list .k { flex: 0 0 auto; font-size: 11px; }

  /* Slightly looser container padding for thumbs */
  .container { padding-left: max(14px, env(safe-area-inset-left));
                padding-right: max(14px, env(safe-area-inset-right)); }

  /* Brand "ARENA · LIVE" / "ტურნირი 2026" line — let it breathe */
  .brand-name small { font-size: 10px; }
}

@media (max-width: 360px) {
  .brand { font-size: 16px; }
  .brand-logo { width: 36px; height: 36px; border-width: 2px; }
  .nav-toggle { width: 38px; height: 38px; }
}

@media print {
  .site-header, .nav-toggle, .site-footer, .tv-controls, .btn { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .tv-hero { background: #fff !important; color: #000 !important; border: 0 !important; }
  .tv-hero h1 { color: #000 !important; }
  .tv-group, .tv-board, .bk-match, .bk-pod { background: #fff !important; color: #000 !important; border: 1px solid #999 !important; box-shadow: none !important; }
  .tv-group h3, .tv-board h3 { color: #000 !important; }
  .tv-stand th, .tv-stand td { color: #000 !important; }
  .tv-group::before, .tv-board::before, .bk-match::before { display: none !important; }
}
