:root {
  --bg: #0b1220;
  --card: #162036;
  --line: #243049;
  --gold: #e8b84a;
  --gold2: #f3d38a;
  --text: #f4f1ea;
  --muted: #9aa6b8;
  --loss: #ff6b6b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100%; overflow-x: hidden; max-width: 100vw;
}
body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
header.app {
  position: relative; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + 48px) 12px 10px;
}
.hero {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  background: radial-gradient(ellipse at 20% 40%, #1a2a4a, #0b1220 70%);
  border: 1px solid #3a2e14; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px;
}
.hero-mark {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 30%, #f3d38a, #c48a16 55%, #6b4a0a);
  display: grid; place-items: center; font-weight: 900; color: #1a1204; font-size: 13px;
}
.hero-text strong { display: block; font-size: 18px; letter-spacing: .02em; }
.hero-text strong span { color: var(--gold); }
.hero-text em { display: block; font-style: normal; color: var(--gold2); font-size: 13px; font-weight: 650; }
.hero-text small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.x-link {
  display: block; text-align: center; margin: 0 0 10px;
  color: var(--gold2); font-size: 13px; font-weight: 700; text-decoration: none;
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.logo {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 30%, #f3d38a, #c48a16 55%, #6b4a0a);
  display: grid; place-items: center; font-weight: 800; color: #1a1204; font-size: 12px;
}
h1 { font-size: 14px; letter-spacing: .03em; min-width: 0; }
h1 span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1 span[data-i18n="subtitle"], h1 span:last-child {
  color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: var(--card); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.pill.live { color: var(--gold); border-color: #5a4618; }
.stats-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.stats-bar strong { color: var(--gold2); }
.stats-bar .heat {
  margin-left: auto; border-radius: 999px; padding: 3px 8px; font-weight: 700; font-size: 11px;
}
.stats-bar .heat.low { background: #1a2740; color: var(--muted); }
.stats-bar .heat.mid { background: #243049; color: var(--gold2); }
.stats-bar .heat.hot { background: #3a2e14; color: var(--gold); }
.lang { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; width: 100%; }
.lang button {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 12px; min-height: 44px; font-size: 15px; font-weight: 800;
}
.lang button.active { color: #1a1204; background: var(--gold); border-color: var(--gold); }
nav.tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 10px;
  background: var(--bg); position: sticky; top: 0; z-index: 18;
}
nav.tabs button {
  flex: 1 1 calc(33.33% - 6px); min-width: calc(33.33% - 6px);
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 8px 6px; font-size: 12px; text-align: center;
}
nav.tabs button.active { color: #1a1204; background: var(--gold); border-color: var(--gold); font-weight: 700; }
section { display: none; padding: 6px 12px 20px; }
section.active { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; overflow: hidden; }
.card h2 { font-size: 14px; margin-bottom: 8px; }
.card h3 { font-size: 13px; color: var(--gold2); margin: 10px 0 6px; }
p, li { font-size: 14px; line-height: 1.45; color: #d7deea; }
.muted { color: var(--muted); font-size: 12px; }
table.standings { width: 100%; border-collapse: collapse; font-size: 11px; }
table.standings th, table.standings td { padding: 7px 3px; border-bottom: 1px solid #1e2a40; vertical-align: top; }
table.standings th { text-align: left; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.standings td.team { font-weight: 650; white-space: normal; word-break: break-word; max-width: 42vw; }
table.standings td:not(.team) { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.standings tr.po td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
table.standings tr.rel td:first-child { box-shadow: inset 3px 0 0 var(--loss); }
.pos { width: 18px; color: var(--muted); }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; padding: 12px 0; border-bottom: 1px solid #1e2a40; }
.match .side { font-size: 13px; overflow-wrap: anywhere; }
.match .side.away { text-align: right; }
.match .mid { text-align: center; min-width: 56px; }
.pred { display: inline-block; margin-top: 4px; background: #243049; color: var(--gold2); font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.preview-body { margin-top: 8px; font-size: 13.5px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.keys span { background: #1a2740; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin: 6px 0 10px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
input, select, textarea {
  width: 100%; background: #0f1728; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; font-size: 16px;
}
button.primary {
  width: 100%; margin-top: 10px; background: var(--gold); color: #1a1204; border: 0;
  border-radius: 12px; padding: 12px; font-weight: 800; font-size: 14px;
}
button.ghost {
  width: 100%; margin-top: 8px; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.note { background: #1a2740; border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 8px 0; }
footer.hint {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #0e1628; border-top: 1px solid var(--line);
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  font-size: 12px; color: var(--muted); text-align: center;
}
footer.hint a { color: var(--gold2); text-decoration: none; font-weight: 700; }
