/* ══════════════════════════════════════════════════════════════════════
   Šachy na Smetance — Modern Dark Design System
   High-contrast dark canvas, frosted glassmorphism, rich chess accents,
   geometric typography, and fluid micro-interactions.
   ══════════════════════════════════════════════════════════════════════ */

/* Self-hosted fonts (SIL OFL, see styles/fonts/) so no visitor data is sent to Google. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/styles/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/styles/fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/styles/fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/styles/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  /* Surface & Base Colors */
  --bg: #090a0f;
  --bg-soft: #0e111a;
  --panel: #131622;
  --panel-2: #1a1e2e;
  --panel-3: #22273b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-focus: rgba(75, 142, 112, 0.5);
  /* Typography & Foreground */
  --ink: #f8fafc;
  --ink-soft: #e2e8f0;
  --muted: #94a3b8;
  --subtle: #64748b;
  /* Accent & Status Colors */
  --accent: #6366f1;           /* Indigo core */
  --accent-light: #818cf8;
  --accent-glow: rgba(75, 142, 112, 0.25);
  --accent-ink: #ffffff;
  --gold: #f59e0b;             /* XP / Level / Trophies */
  --gold-glow: rgba(245, 158, 11, 0.25);
  --good: #10b981;             /* Wins / Solved / Success */
  --good-glow: rgba(16, 185, 129, 0.25);
  --bad: #f43f5e;              /* Loss / Check / Error */
  --bad-glow: rgba(244, 63, 94, 0.25);
  --cyan: #06b6d4;             /* Info / Live */
  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 2px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  /* Fonts */
  --font: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", monospace;
  /* Glassmorphism */
  --glass: rgba(13, 16, 26, 0.85);
  --glass-card: rgba(26, 30, 46, 0.6);
  --glass-blur: blur(14px) saturate(1.2);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(75, 142, 112, 0.15), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 90%, rgba(245, 158, 11, 0.05), transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(16, 185, 129, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Typography */
h1, h2, h3, h4, h5 {
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(20px, 3vw, 26px); }
h3 { font-size: 18px; }
h4 { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--muted); }
.subtle { font-size: 13px; color: var(--muted); }
/* Layout Containers */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.wide {
  max-width: 1280px;
}
main {
  animation: pageFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.stack > * + * { margin-top: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
/* Grid Layouts */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* Floating Glass Header */
header[data-nav] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease;
}
.brand:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.22));
}
.brand-text {
  font-family: var(--font);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.nav-link.is-active {
  color: #fff;
  background: rgba(75, 142, 112, 0.2);
  border: 1px solid rgba(75, 142, 112, 0.35);
  box-shadow: 0 0 15px rgba(75, 142, 112, 0.25);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
}
.nav-user-name {
  font-weight: 600;
  font-size: 13px;
}
.as-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
/* Cards & Panels */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--line-strong);
}
.card-glass {
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card.highlight {
  border-color: rgba(75, 142, 112, 0.4);
  box-shadow: 0 0 30px rgba(75, 142, 112, 0.15), var(--shadow);
}
/* Modern Buttons */
.btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  user-select: none;
}
.btn:hover {
  background: var(--panel-3);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: translateY(0);
}
.btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 6px 20px rgba(75, 142, 112, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn.gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn.danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}
.btn.danger:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--bad);
  color: #fff;
  box-shadow: 0 4px 14px var(--bad-glow);
}
.btn.sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}
.btn.lg {
  padding: 14px 26px;
  font-size: 16px;
  border-radius: var(--radius);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
/* Forms & Inputs */
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: background-color 0.15s ease;
}
input::placeholder, textarea::placeholder {
  color: var(--subtle);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--panel-3);
}
/* Badges & Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.good {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.tag.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.tag.bad {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}
.tag.accent {
  background: rgba(75, 142, 112, 0.12);
  border-color: rgba(75, 142, 112, 0.3);
  color: #a5b4fc;
}
/* Lists */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}
.list li:hover {
  border-color: var(--line-strong);
  background: var(--panel-3);
}
/* Notices & Alerts */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice.err {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}
.notice.ok {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.center-narrow {
  max-width: 440px;
  margin: 48px auto;
}
footer {
  text-align: center;
  color: var(--subtle);
  font-size: 13px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
/* Gamification — XP Bar, Ranks, Badges */
.rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  box-shadow: 0 2px 10px var(--gold-glow);
}
.xp-bar {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.xp-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 12px;
}
.badge {
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: background-color 0.2s ease;
}
.badge:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.badge.earned {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--panel-2) 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.12);
}
.badge.locked {
  opacity: 0.4;
  filter: grayscale(1);
}
.badge-icon {
  font-size: 32px;
  line-height: 1;
}
.badge-name {
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--ink);
}
.badge-prog {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.badge.earned .badge-prog {
  color: #fbbf24;
  font-weight: 600;
}
.badge-chip {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lead-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 15px;
  background: var(--panel-3);
  color: var(--muted);
}
.lead-rank.top-1 {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.lead-rank.top-2 {
  background: rgba(226, 232, 240, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.3);
}
.lead-rank.top-3 {
  background: rgba(217, 119, 6, 0.15);
  color: #f97316;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.lead-top {
  border-color: rgba(75, 142, 112, 0.35) !important;
  background: linear-gradient(90deg, rgba(75, 142, 112, 0.1), transparent) !important;
}
/* Arena & ELO */
.elo-big {
  font-family: var(--font);
  font-weight: 900;
  font-size: 48px;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.elo-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(75, 142, 112, 0.15);
  border: 1px solid rgba(75, 142, 112, 0.3);
  color: #c7d2fe;
}
.elo-delta {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}
.elo-delta.up { color: #34d399; }
.elo-delta.down { color: #fb7185; }
/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0 24px;
  flex-wrap: wrap;
}
.tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-active {
  color: #fff;
  border-bottom-color: var(--accent);
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
/* Task Database Gallery */
.task-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.task-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.task-card .tc-board {
  width: 100%;
}
.task-card .tc-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink);
}
.task-card .tc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.task-card .tc-assign {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
/* Progress Drill-down */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 20px;
}
.crumbs .crumb {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.crumbs .crumb:hover { color: #fff; }
.crumbs .crumb.here { color: #fff; cursor: default; font-weight: 700; }
.crumb-sep { color: var(--subtle); }
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.group-card {
  text-align: left;
  padding: 18px 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  color: var(--ink);
}
.group-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.group-card .gc-name {
  font-weight: 700;
  font-size: 17px;
}
.group-card .gc-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.solve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.solve-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.solve-card.pending {
  border-style: dashed;
  opacity: 0.85;
}
.solve-card .sc-moves {
  font-family: var(--mono);
  font-size: 12px;
  color: #c7d2fe;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
}
/* Tournaments */
.bracket {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 12px 4px 20px;
}
.bracket-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  min-width: 210px;
}
.bracket-round {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 8px;
}
.bm {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
}
.bm-row.win {
  color: #fff;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
}
.bm-row.me {
  border-left: 3px solid var(--accent);
}
.bm-div {
  height: 1px;
  background: var(--line);
}
.bm-actions {
  display: flex;
  justify-content: center;
  padding: 8px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
}
.champion {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, var(--panel-2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 20px var(--gold-glow);
}
.my-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(75, 142, 112, 0.15) 0%, var(--panel-2) 100%);
  border: 1px solid rgba(75, 142, 112, 0.4);
  box-shadow: 0 4px 20px var(--accent-glow);
  font-weight: 600;
}
/* Announcement Banner */
.announce {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  position: sticky;
  top: 63px;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
/* Reward Popup */
.reward {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, var(--panel-2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px var(--gold-glow);
}
.reward-xp {
  font-weight: 900;
  font-size: 32px;
  color: #fbbf24;
}
.reward-rank {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--panel);
  border: 1px solid rgba(245, 158, 11, 0.5);
}
/* Events Calendar */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
.cal-month { font-weight: 800; font-size: 20px; min-width: 200px; text-align: center; }
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekday { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 6px 0 10px; }
.cal-day { min-height: 96px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-day.other { opacity: 0.35; }
.cal-day.today { border-color: var(--accent-light); box-shadow: inset 0 0 0 1px var(--accent-light); }
.cal-daynum { font-size: 12px; color: var(--muted); font-weight: 700; }
.cal-day.today .cal-daynum { color: #fff; }
.cal-pill { display: flex; align-items: baseline; gap: 6px; width: 100%; text-align: left; border: 1px solid transparent; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-xs); font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pill.going { background: var(--good); color: #000; font-weight: 700; }
.cal-pill.maybe { background: transparent; color: var(--ink); border-color: var(--line); }
@keyframes pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-inner { padding: 10px 16px; }
  .brand-text { font-size: 16px; }
  .nav-links { gap: 4px; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .wrap { padding: 0 16px; }
  .card { padding: 18px; }
}
/* ══════════════════════════════════════════════════════════════════════
   Production Readiness & Legal Footers
   ══════════════════════════════════════════════════════════════════════ */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  font-size: 13px;
  transition: color 0.15s ease;
}
.footer-links a:hover,
.footer-links a.is-active {
  color: var(--ink);
  text-decoration: underline;
}
/* Checkbox field styling */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.checkbox-field input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-field a {
  color: var(--accent-light);
  text-decoration: underline;
}
