/* ============================================================ tokens */
:root {
  --bg: #04060c;
  --bg-2: #070b15;
  --surface: #0a1020;
  --surface-2: #0e1629;
  --surface-3: #131d35;
  --line: rgba(160, 190, 255, .07);
  --line-2: rgba(160, 190, 255, .13);
  --line-3: rgba(160, 190, 255, .22);
  --text: #eef3ff;
  --muted: #8592ad;
  --dim: #4f5b76;
  --blue: #2d6bff;
  --sky: #5cc8ff;
  --sky-2: #b5e6ff;
  --win: #3ddc97;
  --loss: #ff5470;
  --home: #5cc8ff;
  --away: #ff9a62;
  --radius: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Same pairing as crown-championship.cc. Archivo Black has a single (black) weight. */
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Archivo Black', 'Arial Black', var(--font);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: var(--surface-3) var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 500 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* One quiet light source at the top of the page. */
body::before {
  content: ''; position: fixed; inset: 0 0 auto; height: 520px; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 100% at 50% -20%, rgba(45, 107, 255, .16), transparent 70%);
}
::selection { background: rgba(92, 200, 255, .3); }
a { color: var(--sky); text-decoration: none; transition: color .15s; }
a:hover { color: #fff; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; }
h1 { font-size: 40px; line-height: 1.02; letter-spacing: -.005em; }
h2 { font-size: 13px; letter-spacing: .06em; }
h3 { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
code { font: 12px ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--sky-2); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-variant-numeric: tabular-nums; }
.num { font-family: var(--display); font-weight: 400; font-variant-numeric: tabular-nums; }

/* ============================================================ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(4, 6, 12, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 62px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 400 19px/1 var(--display); letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand img { transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand small { color: var(--sky); font: 800 10px var(--font); letter-spacing: .32em; margin-left: 2px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; position: relative; height: 100%; align-items: stretch; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted);
  font: 800 12px var(--font); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav-ink {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 0; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  box-shadow: 0 0 12px rgba(92, 200, 255, .6);
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s;
}
.search {
  width: 230px; border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; padding: 8px 14px 8px 34px; font: 600 13px var(--font); transition: border-color .2s, width .35s var(--ease), background-color .2s;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238592ad' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
}
.search:focus { outline: none; border-color: var(--sky); width: 270px; background-color: var(--surface-2); }
.search-results {
  position: absolute; right: 24px; top: 56px; width: 300px; background: rgba(14, 22, 41, .96); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: drop .22s var(--ease);
}
.search-results a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 6px; color: var(--text); font-weight: 700; }
.search-results a:hover, .search-results a.sel { background: var(--surface-3); }

main.wrap { padding-top: 40px; padding-bottom: 56px; min-height: 72vh; outline: none; }
.footer { color: var(--dim); font-size: 12px; padding-top: 22px; padding-bottom: 36px; border-top: 1px solid var(--line); }
.empty { color: var(--muted); padding: 64px 20px; text-align: center; }

/* ============================================================ motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6%, 8%); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.pop { animation: pop .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms + 150ms); }
.stats tbody tr { animation: fade .45s ease both; animation-delay: calc(var(--r, 0) * 18ms); }

.loading { padding: 40px 0; display: grid; gap: 14px; }
.skeleton {
  height: 18px; border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 0, var(--surface-3) 40%, var(--surface) 80%) 0 0 / 800px 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton.big { height: 200px; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ============================================================ layout pieces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; }
.panel-head h2::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: linear-gradient(var(--sky), var(--blue)); }
.panel-head > a, .panel-head > .muted { font-size: 12px; }
.panel-head > a { color: var(--muted); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.panel-head > a:hover { color: var(--sky); }
.panel-body { padding: 18px; }
.stack { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { margin: 10px 0 0; color: var(--muted); font-weight: 600; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--sky); font: 800 11px var(--font); letter-spacing: .22em; text-transform: uppercase; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--win); box-shadow: 0 0 10px var(--win); animation: pulse 2.4s ease infinite; }

/* ============================================================ hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: -40px calc(50% - 50vw) 28px; padding: 60px calc(50vw - 50% + 24px) 36px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 16, 32, .6), var(--bg));
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(120, 170, 255, .045) 22px 23px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 35%, #000 70%, transparent);
}
.hero::after {
  content: ''; position: absolute; z-index: -2; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; right: -15%; top: -60%;
  background: radial-gradient(circle, rgba(45, 107, 255, .35), rgba(92, 200, 255, .08) 40%, transparent 65%);
  filter: blur(20px); animation: drift 18s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(52px, 9vw, 118px); line-height: .9; letter-spacing: -.02em; margin: 16px 0 0;
  background: linear-gradient(180deg, #fff 35%, #8fbcff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-row { display: flex; flex-wrap: wrap; margin-top: 32px; border-top: 1px solid var(--line-2); }
.hero-stat { padding: 18px 30px 4px 0; margin-right: 30px; border-right: 1px solid var(--line); }
.hero-stat:last-child { border-right: 0; }
.hero-stat b { display: block; font: 400 32px/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.hero.map-hero { background: linear-gradient(100deg, hsl(var(--h) 70% 12% / .95), hsl(calc(var(--h) + 14) 80% 32% / .55)), var(--bg); }
.hero.map-hero .hero-title { font-size: clamp(44px, 7vw, 88px); }

/* ============================================================ tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { background: var(--surface); padding: 16px 18px; transition: background .25s; position: relative; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.tile:hover { background: var(--surface-2); }
.tile span { color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.tile b { display: block; margin: 8px 0 4px; font: 400 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.tile b.sm { font-size: 19px; }
.tile small { color: var(--dim); display: block; font-size: 12px; font-weight: 600; }
.tile .player-cell { font-size: 13px; }

/* ============================================================ tables */
.table-wrap { overflow-x: auto; }
table.stats { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats th, .stats td { padding: 10px 12px; text-align: right; white-space: nowrap; }
.stats td { font-weight: 600; vertical-align: middle; }
.stats th {
  color: var(--dim); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  border-bottom: 1px solid var(--line-2); cursor: pointer; user-select: none; transition: color .15s;
}
.stats th:hover { color: var(--text); }
.stats th.sorted { color: var(--sky); }
.stats th.sorted::after { content: ''; display: inline-block; margin-left: 5px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.stats th.sorted.asc::after { border-top-color: transparent; border-bottom-color: currentColor; transform: translateY(-2px); }
.stats th.left, .stats td.left { text-align: left; }
.stats tbody tr { border-bottom: 1px solid var(--line); transition: background .15s; }
.stats tbody tr:last-child { border-bottom: 0; }
.stats tbody tr:hover { background: rgba(92, 200, 255, .045); }
.stats tbody td:first-child { position: relative; }
.stats tbody td:first-child::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--sky);
  transform: scaleY(0); transition: transform .25s var(--ease);
}
.stats tbody tr:hover td:first-child::before { transform: scaleY(1); }
.stats td.key { font-weight: 800; color: #fff; }
.stats tr.home-row td:first-child::before { background: var(--home); transform: scaleY(1); opacity: .8; }
.stats tr.away-row td:first-child::before { background: var(--away); transform: scaleY(1); opacity: .8; }
.player-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.player-cell:hover { color: var(--sky); }
.player-cell img { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; background: var(--surface-3); transition: transform .25s var(--ease); }
.player-cell:hover img { transform: scale(1.12); }
.player-cell .team-tag { color: var(--dim); font-size: 11px; font-weight: 700; }

.rating { display: inline-block; min-width: 50px; padding: 4px 7px 3px; border-radius: 4px; font: 400 12.5px/1.1 var(--display); letter-spacing: .02em; text-align: center; }
.r-1 { color: #ff8da0; background: rgba(255, 84, 112, .1); }
.r-2 { color: var(--text); background: rgba(255, 255, 255, .05); }
.r-3 { color: var(--sky-2); background: rgba(92, 200, 255, .12); }
.r-4 { color: #fff; background: linear-gradient(90deg, var(--blue), #3f8bff); box-shadow: 0 0 14px rgba(45, 107, 255, .35); }
.pos { color: var(--win); }
.neg { color: var(--loss); }
.na { color: var(--dim); }

/* ============================================================ controls */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters label { display: grid; gap: 6px; font-size: 10.5px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
select, input[type=number], input[type=text], input[type=date], input[type=password] {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 8px 10px; font: 700 13px var(--font); min-width: 120px; transition: border-color .2s, background .2s;
}
select:hover, input:hover { border-color: var(--line-3); }
select:focus, input:focus { outline: none; border-color: var(--sky); background: var(--surface-2); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; border: 0;
  border-radius: var(--radius); padding: 10px 16px; font: 800 12px var(--font); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .25s;
}
.btn:hover { background: #3d78ff; color: #fff; box-shadow: 0 6px 22px rgba(45, 107, 255, .35); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--sky); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: wait; }

.tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; color: var(--muted); padding: 11px 14px; font: 800 12.5px var(--font);
  display: flex; gap: 8px; align-items: center; transition: color .2s;
}
.tab::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--sky); transform: scaleX(0); transition: transform .3s var(--ease); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { transform: scaleX(1); }
.tab .sc { font: 400 12px var(--display); }

/* ============================================================ matches */
.match-list { display: grid; }
.match-row {
  display: grid; grid-template-columns: 96px 1fr 92px 1fr 1.5fr; align-items: center; gap: 16px;
  padding: 14px 18px; color: var(--text); border-bottom: 1px solid var(--line); position: relative;
  transition: background .2s, padding-left .3s var(--ease);
}
.match-row:last-child { border-bottom: 0; }
.match-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--sky); transform: scaleY(0); transition: transform .3s var(--ease); }
.match-row:hover { background: var(--surface-2); color: var(--text); padding-left: 24px; }
.match-row:hover::before { transform: scaleY(1); }
.panel-body.match-list { padding: 0; }
.match-row .date { color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 700; }
.match-row .team { font-weight: 800; }
.match-row .team.right { text-align: right; }
.match-row .maps { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.score { font: 400 21px/1 var(--display); display: flex; gap: 8px; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.score .w { color: var(--win); }
.score .l { color: var(--loss); }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 3px; font: 800 11px var(--font);
  background: rgba(255, 255, 255, .035); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip.w { color: var(--win); background: rgba(61, 220, 151, .08); }
.chip.l { color: var(--loss); background: rgba(255, 84, 112, .08); }
.chip.src { color: var(--sky); background: rgba(92, 200, 255, .08); }
.month { display: flex; align-items: center; gap: 14px; margin: 28px 0 10px; }
.month::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.match-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding: 30px 28px; }
.match-team { display: flex; align-items: center; gap: 16px; color: var(--text); }
.match-team:hover { color: var(--text); }
.match-team.right { flex-direction: row-reverse; text-align: right; }
.match-team h2 { font-size: 22px; letter-spacing: 0; }
.match-team h2::before { display: none; }
.badge {
  width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; flex: none;
  font: 400 16px var(--display); color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--sky)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.badge.away { background: linear-gradient(135deg, #2a3350, #4b3a3a); }
.badge.sm { width: 28px; height: 28px; border-radius: 5px; font-size: 10px; }
.big-score { font: 400 64px/1 var(--display); display: flex; gap: 18px; align-items: center; font-variant-numeric: tabular-nums; }
.big-score small { font-size: 26px; color: var(--dim); }
.match-meta { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; letter-spacing: .06em; font-weight: 700; text-transform: uppercase; }
.match-sub { border-top: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Round strip */
.rounds { display: flex; gap: 3px; flex-wrap: wrap; }
.rnd {
  width: 38px; border-radius: 4px; padding: 6px 0 5px; text-align: center; font-size: 10px; font-weight: 700; color: var(--dim);
  background: var(--bg-2); border-top: 2px solid var(--line-2); position: relative; transition: transform .2s var(--ease);
}
.rnd:hover { transform: translateY(-2px); }
.rnd b { display: block; font: 400 13px/1.2 var(--display); color: var(--muted); }
.rnd.home { background: rgba(92, 200, 255, .09); border-top-color: var(--home); }
.rnd.away { background: rgba(255, 154, 98, .08); border-top-color: var(--away); }
.rnd.home b { color: var(--home); }
.rnd.away b { color: var(--away); }
.rnd .fb { display: block; height: 3px; margin: 4px 8px 0; border-radius: 2px; background: var(--dim); }
.rnd .fb-home { background: var(--home); }
.rnd .fb-away { background: var(--away); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.map-line { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.map-line a { color: var(--text); font-weight: 800; }
.map-line a:hover { color: var(--sky); }

/* Head to head */
.matrix td, .matrix th { text-align: center; }
.matrix td.cell { font: 400 13px var(--display); }

/* Kill feed */
details.round { border-top: 1px solid var(--line); }
details.round:first-child { border-top: 0; }
details.round summary { cursor: pointer; padding: 11px 2px; display: flex; gap: 12px; align-items: center; list-style: none; font-weight: 700; transition: color .15s; }
details.round summary:hover { color: var(--sky-2); }
details.round summary::-webkit-details-marker { display: none; }
details.round summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(-45deg); transition: transform .25s var(--ease); }
details.round[open] summary::before { transform: rotate(45deg); }
details.round[open] .feed { animation: rise .35s var(--ease); }
.feed { display: grid; gap: 5px; padding: 0 0 14px 20px; }
.feed div { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.feed .t { color: var(--dim); width: 44px; font-variant-numeric: tabular-nums; font-size: 12px; }
.side-home { color: var(--home); font-weight: 800; }
.side-away { color: var(--away); font-weight: 800; }
.panel-head h2.side-home::before { background: var(--home); }
.panel-head h2.side-away::before { background: var(--away); }

/* Bars */
.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 74px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row a { color: var(--text); font-weight: 700; }
.bar-row a:hover { color: var(--sky); }
.bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 3px; transform-origin: left; animation: grow 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 200ms); }
.bar-row .mono { text-align: right; font-weight: 800; }

/* Map cards */
.map-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.map-card {
  display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: transform .35s var(--ease), border-color .25s, box-shadow .35s;
}
.map-card:hover { transform: translateY(-4px); border-color: var(--line-3); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); color: var(--text); }
.map-art {
  height: 112px; display: flex; align-items: flex-end; padding: 12px 14px; position: relative; overflow: hidden;
  font: 400 20px/1 var(--display); text-transform: uppercase;
  background: linear-gradient(120deg, hsl(var(--h) 70% 14%), hsl(calc(var(--h) + 14) 80% 38%));
}
.map-art::before {
  content: ''; position: absolute; inset: -20px; z-index: 0;
  background: repeating-linear-gradient(115deg, transparent 0 14px, rgba(255, 255, 255, .05) 14px 15px);
  transition: transform .6s var(--ease);
}
.map-art::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(4, 6, 12, .7), transparent 70%); }
.map-art span { position: relative; z-index: 1; }
.map-card:hover .map-art::before { transform: translateX(15px); }
.map-card .body { padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.map-card .body b { display: block; font: 400 18px/1.1 var(--display); }
.map-card .body span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }

/* Profile */
.profile { display: flex; gap: 20px; align-items: center; }
.profile img { width: 92px; height: 92px; border-radius: 8px; image-rendering: pixelated; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2), 0 16px 40px rgba(45, 107, 255, .2); }
.profile h1 { font-size: 48px; text-transform: none; }
.profile .muted { font-weight: 700; margin-top: 4px; }

/* Import */
.drop {
  display: block; border: 1px dashed var(--line-3); border-radius: 10px; padding: 40px; text-align: center; color: var(--muted);
  background: var(--bg-2); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.drop:hover { border-color: var(--sky); }
.drop.over { border-color: var(--sky); color: var(--text); background: rgba(45, 107, 255, .1); transform: scale(1.01); }
.errors { color: var(--loss); margin: 8px 0 0; padding-left: 18px; }
.ok { color: var(--win); font-weight: 700; }
pre.code { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; color: var(--sky-2); margin: 8px 0; font-size: 12px; }
.note { border-left: 2px solid var(--sky); background: rgba(92, 200, 255, .05); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; color: var(--sky-2); font-size: 13px; font-weight: 600; }
.publish { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }
dl.defs { display: grid; grid-template-columns: 170px 1fr; gap: 12px 22px; margin: 0; }
dl.defs dt { font: 400 13px var(--display); color: var(--sky); text-transform: uppercase; padding-top: 2px; }
dl.defs dd { margin: 0; color: var(--muted); font-weight: 600; }

/* Let grid/flex children shrink so wide tables scroll inside their panel instead of widening the page. */
.nav, .grid-2 > *, .grid-3 > *, .match-row > *, .stack > * { min-width: 0; }

/* ============================================================ responsive */
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .match-row { grid-template-columns: 1fr auto 1fr; }
  .match-row .date, .match-row .maps { grid-column: 1 / -1; justify-content: flex-start; }
  .search { display: none; }
  .match-head { grid-template-columns: 1fr; text-align: center; }
  .match-team, .match-team.right { justify-content: center; flex-direction: row; }
  .big-score { justify-content: center; font-size: 52px; }
  .hero-stat { padding-right: 22px; margin-right: 22px; }
  .hero-stat b { font-size: 26px; }
  .map-line { grid-template-columns: 1fr; gap: 8px; }
  dl.defs { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 12px; }
  .brand small { display: none; }
  h1 { font-size: 30px; }
  .hero { padding: 44px calc(50vw - 50% + 16px) 28px; }
  .hero-stat { border-right: 0; padding-right: 0; margin-right: 26px; }
  .bar-row { grid-template-columns: 92px 1fr 60px; }
  .profile h1 { font-size: 34px; }
}
.btn.sm { padding: 6px 10px; font-size: 10.5px; }

/* Confirm dialogs */
.modal {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 0; width: min(420px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal[open] { animation: drop .25s var(--ease); }
.modal::backdrop { background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); }
.modal-body { padding: 22px; display: grid; gap: 12px; }
.modal-body p { margin: 0; }
.modal-body .field { display: grid; gap: 6px; font-size: 10.5px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.modal-body [data-err]:empty { display: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn.danger { background: var(--loss); }
.btn.danger:hover { background: #ff6b83; box-shadow: 0 6px 22px rgba(255, 84, 112, .3); }
