@property --bg { syntax: "<color>"; inherits: true; initial-value: #120810; }
@property --bar { syntax: "<color>"; inherits: true; initial-value: #1a1016; }
@property --card { syntax: "<color>"; inherits: true; initial-value: #241820; }
@property --card-2 { syntax: "<color>"; inherits: true; initial-value: #2c1e28; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #3d2a36; }
@property --gold { syntax: "<color>"; inherits: true; initial-value: #f0a04a; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #1a1206; }
@property --soft { syntax: "<color>"; inherits: true; initial-value: #2a2116; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #c4a8b4; }

:root {
  --bg: #120810;
  --bar: #1a1016;
  --card: #241820;
  --card-2: #2c1e28;
  --line: #3d2a36;
  --text: #f7f1f3;
  --muted: #c4a8b4;
  --gold: #f0a04a;
  --ink: #1a1206;
  --soft: #2a2116;
  --glow: rgba(180, 60, 90, 0.22);
  --glow-2: rgba(240, 160, 74, 0.1);
  --live: #ff3b30;
  --danger: #ff8d86;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --glass: color-mix(in srgb, var(--card) 76%, transparent);
  --glass-bar: color-mix(in srgb, var(--bar) 72%, transparent);
  --glass-2: color-mix(in srgb, var(--card-2) 68%, transparent);
  --glass-line: color-mix(in srgb, white 16%, var(--line));
  --sheen: inset 0 1px 0 color-mix(in srgb, white 24%, transparent);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  transition: --bg 0.45s ease, --bar 0.45s ease, --card 0.45s ease, --card-2 0.45s ease, --line 0.45s ease, --gold 0.45s ease, --ink 0.45s ease, --soft 0.45s ease, --muted 0.45s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--glow), transparent 58%),
    radial-gradient(780px 420px at -8% 4%, var(--glow-2), transparent 52%),
    var(--bg);
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
  border-radius: 999px;
}
.skip:focus { top: 8px; }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass-bar);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: var(--sheen), 0 10px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  padding-top: env(safe-area-inset-top);
}
body.modal-open .top { z-index: 45; }
.top-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--gold) 35%, transparent));
}
.brand b { color: var(--gold); font-weight: 700; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.nav a.on, .nav a:hover {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--gold) 38%, transparent);
}
.nav a:active { transform: scale(0.96); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.find { display: flex; align-items: center; gap: 8px; }
.cluster { display: flex; align-items: center; gap: 8px; }
.search input, .field input, .field select, .field textarea, .pay input, .auth input, textarea {
  width: 100%;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  box-shadow: var(--sheen);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
textarea { resize: vertical; min-height: 120px; }
.search input { width: 190px; border-radius: 999px; }
.search input:focus, .field input:focus, .field select:focus, .field textarea:focus, .pay input:focus, .auth input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent);
}
.langs {
  display: flex;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  box-shadow: var(--sheen);
}
.langs button, .ghost, .text-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 10px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s var(--ease);
}
.langs button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.langs button:active, .ghost:active { transform: scale(0.96); }
.grace {
  min-width: 64px;
  text-align: center;
  background: color-mix(in srgb, var(--soft) 80%, transparent);
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 999px;
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  box-shadow: var(--sheen);
}
.who, .primary, .signin {
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}
.who {
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--sheen);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease;
}
.who:hover { border-color: color-mix(in srgb, var(--gold) 50%, transparent); transform: translateY(-1px); }
.who:active { transform: scale(0.97); }
.account-slot { position: relative; }
.who-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava {
  width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--soft) 85%, transparent);
  color: var(--gold);
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; overflow: hidden; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent);
}
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.lg { width: 84px; height: 84px; font-size: 32px; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 32;
  min-width: 210px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 4px;
  box-shadow: var(--sheen), var(--shadow);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  transform-origin: top right;
  animation: menu-in 0.28s var(--ease);
}
.account-menu a, .account-menu button {
  text-align: left;
  background: color-mix(in srgb, var(--card-2) 72%, transparent);
  color: var(--text);
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  transition: background 0.22s ease, transform 0.22s var(--ease);
}
.account-menu a:hover, .account-menu button:hover {
  background: color-mix(in srgb, var(--gold) 16%, var(--card-2));
}
.primary, .signin {
  background: linear-gradient(180deg, color-mix(in srgb, white 28%, var(--gold)), var(--gold));
  color: var(--ink);
  border: 0;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 50%, transparent), 0 8px 22px color-mix(in srgb, var(--gold) 32%, transparent);
  transition: transform 0.22s var(--ease), filter 0.22s ease;
}
.primary:hover, .signin:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary:active, .signin:active { transform: translateY(0) scale(0.98); }
.ghost {
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--card) 40%, transparent);
}
.ghost:hover { border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--text); }
label.ghost { cursor: pointer; display: inline-block; }

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 72px;
}
.enter { animation: rise 0.5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { opacity: 0.4; transform: translateY(110%); } to { opacity: 1; transform: none; } }
@keyframes lipa-shine {
  0%, 58% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.hero {
  position: relative;
  height: min(68vh, 620px);
  min-height: 280px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sheen), 0 24px 60px rgba(0, 0, 0, 0.35);
}
.hero iframe, .hero mux-player, .hero .hero-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}
.hero iframe, .hero mux-player {
  pointer-events: none;
  background: transparent;
  --media-object-fit: cover;
  --media-object-position: center;
  --media-background-color: transparent;
}
.hero-fallback { background: linear-gradient(160deg, var(--card-2), var(--bg) 60%, var(--soft)); }
.hero:has(.hero-fallback)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, color-mix(in srgb, white 16%, transparent) 50%, transparent 62%);
  transform: translateX(-70%);
  animation: lipa-shine 8s ease-in-out infinite;
}
textarea.link-box { min-height: 72px; }
.hero-shade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 72px 28px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55) 36%, rgba(0, 0, 0, 0.82));
}
.hero-shade h1 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
  max-width: 16ch;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hero-shade p { color: #d5e2d8; margin-top: 6px; }
.hero-link { color: var(--gold); font-weight: 700; display: inline-block; margin-top: 10px; }
.live-pill, .past-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.live-pill { background: color-mix(in srgb, var(--live) 88%, transparent); color: white; }
.live-pill i, .dot {
  width: 8px; height: 8px; border-radius: 50%; background: white; display: inline-block;
  animation: pulse 1.4s ease infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.past-pill { background: color-mix(in srgb, #24362c 75%, transparent); color: var(--muted); border: 1px solid var(--glass-line); }
.arrows { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.arrows button, .dots button {
  pointer-events: auto;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, white 22%, transparent);
  background: color-mix(in srgb, black 45%, transparent);
  color: white;
  font-size: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--sheen);
  transition: transform 0.22s var(--ease), background 0.22s ease;
}
.arrows button:hover { transform: scale(1.06); background: color-mix(in srgb, black 30%, transparent); }
.dots { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; }
.dots button { width: 9px; height: 9px; padding: 0; background: rgba(255,255,255,0.45); border: 0; box-shadow: none; }
.dots button.on { background: var(--gold); transform: scale(1.15); }

.empty-live, .empty, .note {
  color: var(--muted);
  padding: 8px 0 18px;
}
.block { margin-top: 28px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.block-head h2 { font-size: 22px; letter-spacing: -0.01em; }
.block-head a { color: var(--gold); font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--sheen), 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
  animation: card-in 0.62s var(--ease) both;
}
.grid .card:nth-child(2) { animation-delay: 0.05s; }
.grid .card:nth-child(3) { animation-delay: 0.1s; }
.grid .card:nth-child(4) { animation-delay: 0.15s; }
.grid .card:nth-child(5) { animation-delay: 0.2s; }
.grid .card:nth-child(6) { animation-delay: 0.25s; }
.grid .card:nth-child(7) { animation-delay: 0.3s; }
.grid .card:nth-child(n+8) { animation-delay: 0.34s; }
.card:hover {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  transform: translateY(-6px);
  box-shadow: var(--sheen), 0 22px 44px rgba(0, 0, 0, 0.34);
}
.poster { aspect-ratio: 16/9; background: #0c1814 center/cover no-repeat; position: relative; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.card:hover .poster img { transform: scale(1.04); }
.poster .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 42px; color: var(--gold);
  background: linear-gradient(160deg, var(--card-2), var(--bg) 60%, var(--soft));
}
.poster .live-pill, .poster .past-pill { position: absolute; left: 8px; top: 8px; }
.card-meta { padding: 12px 14px 14px; display: grid; gap: 2px; }
.card-meta strong { font-size: 15px; }
.card-meta span { color: var(--muted); font-size: 13px; }

.crumbs { color: var(--muted); margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--gold); }
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.player iframe, .player mux-player, .player img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
  background: #000;
}
.player mux-player {
  background: transparent;
  --media-object-fit: cover;
  --media-object-position: center;
  --media-background-color: transparent;
}
.watch-title { margin: 14px 0 4px; font-size: clamp(28px, 4vw, 44px); font-family: "Barlow Condensed", Impact, sans-serif; }
.lock {
  margin-top: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 10px;
  justify-items: start;
  box-shadow: var(--sheen);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.page-head { margin-bottom: 16px; }
.page-head h1 { font-family: "Barlow Condensed", Impact, sans-serif; font-size: 42px; }
.league-list { display: grid; gap: 10px; }
.league-list a {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  box-shadow: var(--sheen);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
  animation: card-in 0.5s var(--ease) both;
}
.league-list a:nth-child(2) { animation-delay: 0.05s; }
.league-list a:nth-child(3) { animation-delay: 0.1s; }
.league-list a:nth-child(n+4) { animation-delay: 0.14s; }
.league-list a:hover {
  border-color: color-mix(in srgb, var(--gold) 60%, transparent);
  transform: translateX(6px);
}
.account, .pay, .sheet, .rail, .preview-pane {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: var(--sheen), 0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
.account { padding: 18px; display: grid; gap: 8px; max-width: 720px; }
.account h1 { font-family: "Barlow Condensed", Impact, sans-serif; font-size: 40px; line-height: 1; }
.account h2 { font-size: 22px; margin-top: 8px; }
.about { white-space: pre-wrap; word-break: break-word; }
.profile-hero { display: flex; gap: 14px; align-items: center; }
.settings { gap: 14px; }
.watch-meta, .watch-count { color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.watch-count { display: inline-flex; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: var(--sheen);
  transition: transform 0.22s var(--ease), border-color 0.22s ease, background 0.22s ease;
}
.act:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.act:active { transform: scale(0.97); }
.act.on { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--soft) 80%, transparent); }
.act.down.on { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, #2a1616 80%, transparent); }
.act b { font-weight: 800; }
.comments { display: grid; gap: 12px; }
.comments h2 { font-size: 22px; }
.comment {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 8px;
  min-width: 0;
  box-shadow: var(--sheen);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.comment p { white-space: pre-wrap; word-break: break-word; }
.comment-head { display: flex; gap: 8px; align-items: center; min-width: 0; }
.comment-head a { font-weight: 800; }
.comment-head time { color: var(--muted); font-size: 13px; }
.replies { display: grid; gap: 8px; min-width: 0; }
.comment.depth-1 { margin-left: 22px; }
.replies .comment.depth-2 { margin-left: 22px; }
.comment.depth-2 .replies .comment { margin-left: 0; }
.composer textarea, .reply-box textarea { min-height: 72px; }
.composer, .reply-box { display: grid; gap: 8px; }
.account .row, .admin-actions, .auth-actions, .catalog-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 8, 7, 0.46);
  display: grid;
  place-items: center;
  padding: 18px;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  animation: veil 0.32s ease;
}
.sheet {
  width: min(440px, 100%);
  padding: 20px;
  position: relative;
  animation: sheet-pop 0.46s var(--ease);
}
.sheet-wide { width: min(920px, 100%); max-height: min(92vh, 900px); overflow: auto; }
.x {
  position: absolute; right: 10px; top: 8px;
  border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1;
  transition: color 0.2s ease, transform 0.2s var(--ease);
}
.x:hover { color: var(--text); transform: scale(1.08); }
.auth h2, .pay h2, .suggest h2, .rail h2 { font-size: 28px; font-family: "Barlow Condensed", Impact, sans-serif; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pay-head h2 { margin: 0; }
.pay-head .text-btn { flex: 0 0 auto; padding-right: 0; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 13px; }
.form-error { color: var(--danger); min-height: 1.2em; }
.pay-status { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--muted); }
.pay-status.wait, .pay-status.ok { color: var(--gold); }
.pay-status.bad { color: #ffb4af; }
.primary.wide.busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: progress;
}
.primary.wide:disabled { cursor: progress; }
.pay-spin {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-top-color: var(--ink);
  animation: pay-spin 0.7s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.plans.need .plan { box-shadow: inset 0 0 0 2px var(--danger); }
.pay input.phone-pill.bad { box-shadow: inset 0 0 0 2px var(--danger); }
.auth, .suggest, .pay { display: grid; gap: 10px; }
.auth-actions button, .primary.wide { width: 100%; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; }

body.modal-open { overflow: hidden; }
.sheet .pay { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.phone-field { display: grid; gap: 8px; }
.phone-title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text); }
.pay input.phone-pill {
  border-radius: 999px;
  min-height: 52px;
  padding: 0 18px;
  font-size: 16px;
}
.pay .plans { grid-template-columns: 1fr; }
.pay .plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 16px;
}
.plan-main { display: grid; gap: 2px; min-width: 0; color: var(--text); }
.pay .plan strong { font-size: 22px; color: var(--text); }
.pay .plan .plan-main span { color: var(--muted); font-weight: 700; }
.pay .plan em { position: static; }
.pay .plan.on { box-shadow: inset 0 0 0 1px var(--gold), var(--sheen); }
.primary.wide { min-height: 48px; position: relative; overflow: hidden; }
.primary.wide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, color-mix(in srgb, white 42%, transparent) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: lipa-shine 2.8s ease-in-out infinite;
}
.pay-group { margin-top: 8px; }
.pay-group h3 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.method-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.method {
  min-height: 36px;
  height: 40px;
  flex: 1 1 108px;
  border-radius: 10px;
  border: 0;
  display: grid;
  place-items: center;
  padding: 0 10px;
  transition: transform 0.22s var(--ease);
}
.method:hover { transform: translateY(-1px); }
.method.on { outline: 3px solid var(--gold); outline-offset: 2px; }
.method.mpesa { background: #fff; color: #e10600; }
.method.mixx { background: #0052cc; color: #ffe14a; }
.method.airtel { background: #ed1c24; color: #fff; }
.method.halo { background: #f5b400; color: #241c00; }
.method.visa, .method.mastercard { background: #fff; }
.method img { height: 18px; width: auto; }
.method.mastercard img { height: 26px; }
.logo-mno { font-weight: 800; letter-spacing: 0.02em; font-size: 14px; line-height: 1; }
.method.mixx .logo-mno { font-style: italic; font-size: 18px; }
.method.airtel .logo-mno { font-weight: 700; font-size: 14px; text-transform: lowercase; }
.method.airtel small { display: inline; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; margin-left: 4px; }
.sub-left strong, #renew-clock { font-variant-numeric: tabular-nums; }
.menu-remain { margin: 0; padding: 6px 8px 2px; color: var(--muted); font-size: 13px; font-weight: 700; }
.renew { display: grid; gap: 10px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan {
  text-align: left;
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 4px;
  position: relative;
  box-shadow: var(--sheen);
  transition: transform 0.22s var(--ease), border-color 0.22s ease;
}
.plan:hover { transform: translateY(-2px); }
.plan.on { border-color: var(--gold); background: color-mix(in srgb, var(--soft) 82%, transparent); }
.plan strong { font-size: 20px; }
.plan em {
  position: absolute; right: 8px; top: 8px;
  font-style: normal; font-size: 11px; font-weight: 800;
  background: var(--gold); color: var(--ink); border-radius: 999px; padding: 2px 6px;
}

.admin-layout { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: start; }
.rail { padding: 14px; display: grid; gap: 12px; position: sticky; top: 86px; max-height: calc(100vh - 104px); overflow: auto; }
.preview-pane { padding: 14px; }
.field { display: grid; gap: 6px; }
.field span, .check { color: var(--muted); font-size: 13px; font-weight: 700; }
.stack { display: grid; gap: 8px; }
details.fold { border-top: 1px solid var(--glass-line); padding-top: 8px; }
details.fold summary { cursor: pointer; font-weight: 800; padding: 8px 0; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary:before { content: "▸ "; color: var(--gold); }
details.fold[open] summary:before { content: "▾ "; }
.readout {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 10px;
  white-space: pre-wrap;
  color: var(--text);
}
.danger { background: transparent; color: var(--danger); border: 1px solid #5c2c2c; border-radius: 999px; padding: 10px 14px; font-weight: 700; }
.catalog-actions { margin-top: 4px; }
.hidden { display: none !important; }

#toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s var(--ease);
  max-width: min(92vw, 520px);
  text-align: center;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--gold) 28%, transparent);
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 800px) {
  .top-inner {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas:
      "brand cluster"
      "nav nav"
      "find find";
    gap: 10px;
    padding: 10px 14px 12px;
    min-height: 0;
    align-items: center;
  }
  .brand { grid-area: brand; font-size: 28px; min-width: max-content; }
  .brand img { width: 36px; height: 36px; }
  .tools { display: contents; }
  .cluster {
    grid-area: cluster;
    justify-self: end;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }
  .find { grid-area: find; min-width: 0; }
  .find .search { flex: 1 1 auto; min-width: 0; }
  .find .ghost { flex: 0 0 auto; padding: 8px 12px; }
  .nav {
    grid-area: nav;
    width: 100%;
    min-width: 0;
    overflow: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 12px; flex: 0 0 auto; }
  .search { min-width: 0; }
  .search input { width: 100%; min-width: 0; font-size: 16px; }
  .grace { min-width: 52px; padding: 7px 8px; }
  main { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }
  .page-head h1, .account h1 { font-size: clamp(32px, 9vw, 42px); }
  .admin-layout { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; }
  .plans { grid-template-columns: 1fr; }
  .hero {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: 18px;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }
  .player { -webkit-mask-image: -webkit-radial-gradient(white, black); }
  .hero-shade { padding: 28px 14px 12px; }
  .hero-shade h1 { font-size: 30px; }
  .arrows { align-items: flex-start; padding: 12px 8px 0; }
  .top, .card, .who, .account, .pay, .sheet, .rail, .preview-pane,
  .lock, .league-list a, .comment, .account-menu, .live-pill, .past-pill,
  .arrows button, .dots button, .overlay, .act, .plan, .readout {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .auth-actions { grid-template-columns: 1fr; }
  .who-name { max-width: 72px; }
  .comment.depth-1, .replies .comment.depth-2 { margin-left: 12px; }
  .ava.lg { width: 72px; height: 72px; }
  .overlay {
    align-items: end;
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .sheet, .sheet-wide {
    width: 100%;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top));
    overflow: auto;
    border-radius: 22px 22px 18px 18px;
    padding: 18px 14px 14px;
    animation-name: sheet-up;
  }
  .method { flex: 1 1 calc(50% - 6px); height: 52px; border-radius: 14px; }
  body.modal-open #toast {
    bottom: auto;
    top: calc(12px + env(safe-area-inset-top));
  }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-meta { padding: 8px 8px 10px; }
  .card-meta strong { font-size: 13px; }
  .card-meta span { font-size: 11px; }
  .poster .ph { font-size: 28px; }
  .field input, .field select, .field textarea, .pay input, .auth input, textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
