@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090b0e;
  --card: #12171e;
  --card-2: #1b222c;
  --copper: #d08a4c;
  --copper-ink: #1c1008;
  --gold: #e6b450;
  --text: #f4f1ea;
  --muted: #a7b0bb;
  --faint: #6e7884;
  --line: rgba(244, 241, 234, 0.08);
  --danger: #e08a78;
  --display: "Geist", "Inter", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --nav: calc(68px + env(safe-area-inset-bottom));
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, .brand { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; }
a { color: var(--copper); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.noscript { padding: 24px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav) + 12px);
  transform: translateX(-50%);
  z-index: 50;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  max-width: min(92vw, 420px);
  box-shadow: var(--shadow);
}
#toast[hidden] { display: none; }

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 32px;
  position: relative;
  overflow: hidden;
}
.gate-stage {
  position: absolute;
  inset: -10% -20% auto;
  height: 70%;
  display: flex;
  gap: 16px;
  justify-content: center;
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
}
.tile {
  width: 108px;
  height: 148px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 28px;
  color: var(--gold);
  animation: float 7s ease-in-out infinite;
}
.tile:nth-child(2) { animation-delay: -1.4s; margin-top: 28px; }
.tile:nth-child(3) { animation-delay: -2.6s; margin-top: 8px; }
.tile:nth-child(4) { animation-delay: -3.8s; margin-top: 36px; }
.tile:nth-child(5) { animation-delay: -0.8s; }
@keyframes float {
  50% { transform: translateY(-10px); }
}

.gate-card {
  position: relative;
  width: min(440px, 100%);
  background: rgba(18, 23, 30, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
}
.brand-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(230, 180, 80, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(230, 180, 80, 0); }
}
.gate-card h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.02; margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 22px; }
.fine { color: var(--faint); font-size: 13px; margin: 16px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--copper);
  color: var(--copper-ink);
  font-weight: 600;
  padding: 14px 18px;
}
.btn.secondary {
  width: auto;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.tiny { width: auto; padding: 8px 12px; }
.text-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 0;
  color: var(--copper);
  padding: 10px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(9, 11, 14, 0.45);
  color: var(--text);
  display: grid;
  place-items: center;
}
.icon-btn[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }

.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.wordmark { font-family: var(--display); font-size: 22px; margin: 0; }
.wordmark span { color: var(--gold); }
.main { padding: 8px 0 calc(var(--nav) + 12px); }

.hero {
  margin: 12px 16px 8px;
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(208, 138, 76, 0.28), transparent 55%),
    var(--card);
  border-radius: 28px;
  min-height: 320px;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-kicker { margin: 0 0 8px; color: var(--gold); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h2 { font-size: clamp(34px, 9vw, 56px); line-height: 0.98; margin: 0 0 8px; max-width: 14ch; }
.hero-meta { color: var(--muted); margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-actions { display: flex; gap: 10px; align-items: center; }
.hero-actions .btn { width: auto; min-width: 148px; }
.hero-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 84px;
  height: 84px;
}
.hero-mark .logo,
.hero-mark .initials { width: 84px; height: 84px; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
}
.chip[aria-pressed="true"] { background: var(--copper); color: var(--copper-ink); border-color: var(--copper); }

.row { margin: 18px 0 6px; }
.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
}
.row-head h3 { margin: 0; font-size: 20px; }
.row-arrows { display: none; gap: 6px; }
.scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.card {
  position: relative;
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 196px;
}
.card.is-unavailable { opacity: 0.55; }
.card-open {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 10px 12px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 196px;
}
.logo, .initials {
  width: 100%;
  height: 96px;
  border-radius: 12px;
  background: #0d1116;
  object-fit: contain;
}
.initials {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 28px;
  color: var(--gold);
}
.hero-mark.initials { border-radius: 20px; font-size: 28px; }
.card-name { font-weight: 600; }
.card-sub { color: var(--faint); font-size: 13px; }
.card-fav {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(9, 11, 14, 0.72);
  color: var(--text);
}
.card-fav[aria-pressed="true"] { color: var(--gold); }
.card-group {
  position: absolute;
  top: 16px;
  right: 56px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(9, 11, 14, 0.72);
  color: var(--text);
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(230, 180, 80, 0.16);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.live-pill { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }

.empty-row, .empty-panel {
  margin: 0 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--muted);
  border: 1px solid var(--line);
}
.empty-panel { margin: 16px; }
.empty-panel h2 { margin: 0 0 8px; color: var(--text); }
.empty-panel .btn { margin-top: 12px; }

.search-page, .you-page, .guide-page { padding-top: 8px; }
.search-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
}
.search-bar .text-btn { width: auto; margin: 0; padding: 8px 4px; }
.result {
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}
.result .initials, .result .logo { width: 64px; height: 48px; flex: 0 0 64px; }

.guide-scroll { overflow-x: auto; padding-bottom: 20px; }
.guide-grid { min-width: 760px; }
.guide-times, .guide-row {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: center;
}
.guide-times { color: var(--faint); font-size: 12px; padding: 0 16px; }
.guide-row { padding: 0 16px 8px; }
.guide-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  background: transparent;
  border: 0;
  text-align: left;
  color: var(--text);
}
.guide-channel .initials, .guide-channel .logo { width: 42px; height: 32px; flex: 0 0 42px; font-size: 14px; }
.guide-name { font-size: 13px; font-weight: 600; }
.track {
  position: relative;
  height: 64px;
  background: rgba(18, 23, 30, 0.65);
  border-radius: 12px;
  overflow: hidden;
}
.program {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--card-2);
  color: var(--text);
  text-align: left;
  padding: 6px 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.program.is-now { background: var(--copper); color: var(--copper-ink); }
.program.is-live { color: var(--gold); background: transparent; border: 1px dashed rgba(230, 180, 80, 0.45); }
.now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  z-index: 2;
  pointer-events: none;
}
.time-label { position: absolute; top: 0; transform: translateX(-50%); }

.you-card {
  margin: 12px 16px;
  background: var(--card);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid var(--line);
}
.you-card h2 { margin: 0 0 4px; }
.you-card p { margin: 0 0 8px; color: var(--muted); }
.gold { color: var(--gold); font-variant-numeric: tabular-nums; }
.you-card .btn { margin-top: 12px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(9, 11, 14, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav button, .side-link {
  background: transparent;
  border: 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 6px 0;
  border-radius: 12px;
}
.bottom-nav button[aria-current="page"], .side-link[aria-current="page"] { color: var(--copper); }

#player { position: fixed; inset: 0; z-index: 40; background: #000; }
#player[hidden] { display: none; }
#player-stage { position: absolute; inset: 0; background: #000; }
#player-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
}
#player-stage video.is-hold { opacity: 1; z-index: 1; }
#player-stage video.is-on { opacity: 0; z-index: 2; pointer-events: none; }
#player-stage video.is-on.is-frame { opacity: 1; }
.virtual-window { display: flex; gap: 12px; }
.virtual-spacer { flex: 0 0 auto; height: 1px; }
#player-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,.62), transparent 30%, transparent 60%, rgba(0,0,0,.78));
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
}
.player-top, .player-bottom { display: flex; align-items: center; gap: 10px; }
.player-top { justify-content: space-between; }
.player-id { min-width: 0; }
.player-id strong { display: block; font-family: var(--display); font-size: 22px; }
.player-id span { color: var(--muted); font-size: 13px; }
.player-bottom { justify-content: space-between; }
.player-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.zap { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 600; }
.keys { display: none; color: var(--faint); font-size: 12px; }
.switcher {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  max-height: 46vh;
  overflow: auto;
  background: rgba(18, 23, 30, 0.96);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 8px;
}
.switcher button.rowish {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 8px;
  border-radius: 12px;
  color: var(--text);
}
.switcher button.rowish[aria-current="true"] { background: rgba(208, 138, 76, 0.18); }
.switcher .initials, .switcher .logo { width: 48px; height: 36px; font-size: 14px; }
.skeleton {
  background: linear-gradient(90deg, #12171e 25%, #1c2430 37%, #12171e 63%);
  background-size: 400% 100%;
  animation: shine 1.4s ease infinite;
  border-radius: 18px;
}
.hero-skeleton { height: 280px; margin: 16px; }
.row-skeleton { height: 120px; margin: 16px; }
@keyframes shine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (min-width: 900px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 232px;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: #0c0f14;
    z-index: 15;
  }
  .side-link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    font-size: 16px;
    padding: 12px 12px;
  }
  .side-link[aria-current="page"] { background: rgba(208, 138, 76, 0.14); }
  .shell { padding-left: 232px; }
  .bottom-nav { display: none; }
  .main { padding-bottom: 32px; }
  #toast { bottom: 24px; }
  .hero { margin: 18px 28px; min-height: 380px; padding: 32px; }
  .hero h2 { font-size: 64px; }
  .chips, .row-head, .scroller, .guide-times, .guide-row { padding-left: 28px; padding-right: 28px; }
  .card { flex-basis: 210px; }
  .row-arrows { display: flex; }
  .keys { display: block; }
  .search-bar, .you-card, .empty-panel { margin-left: 28px; margin-right: 28px; }
  .search-bar { margin: 0 0 12px; }
  .result { width: auto; margin-left: 28px; margin-right: 28px; }
}

@media (min-width: 1400px) {
  .hero h2 { font-size: 76px; }
  .card { flex-basis: 240px; }
}

@media (min-width: 1600px) {
  body { font-size: 20px; }
  button:focus, a:focus, input:focus {
    outline: 4px solid var(--gold);
    outline-offset: 6px;
  }
  .btn, .icon-btn, .chip, .side-link, .text-btn { min-height: 56px; font-size: 20px; }
  .card { flex-basis: 300px; }
  .card strong, .player-id strong { font-size: 28px; }
  .hero h2 { font-size: 84px; }
  .player-bottom .icon-btn, .player-top .icon-btn { width: 64px; height: 64px; }
  .keys { display: block; font-size: 16px; }
}

.overrides {
  white-space: pre-wrap;
  background: #0c0f14;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
  max-height: 360px;
  overflow: auto;
}
.badge.on-now { background: var(--gold); color: #1a1208; }
.now-next { display: block; color: var(--gold); font-size: 12px; margin-top: 4px; }
.reconnect {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(18, 23, 30, 0.92);
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 18px;
  font-family: var(--display);
}
.reconnect p { margin: 0; }
.picker {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(9, 11, 14, 0.72);
  display: grid;
  place-items: end center;
  padding: 12px;
}
.picker-card {
  width: min(560px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.picker-head, .picker-create, .group-block { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.picker-head { justify-content: space-between; }
.picker-card input, .group-block input {
  flex: 1;
  min-width: 140px;
  background: #0c0f14;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.picker-list { display: grid; gap: 8px; margin-top: 12px; }
.country-option {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #0c0f14;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 52px;
}
.country-option span, .group-block li span { color: var(--muted); }
.country-option[aria-current="true"] { outline: 2px solid var(--gold); }
.group-block { margin-top: 12px; }
.group-block ul { width: 100%; list-style: none; padding: 0; margin: 8px 0 0; }
.group-block li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.country-open { width: auto; margin: 0; }
.place-head { padding: 8px 16px 0; }
.place-head h2 { margin: 0; font-size: clamp(32px, 5vw, 56px); }
.place-head p { color: var(--muted); margin: 6px 0 0; }
.adult-box { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.adult-box input[type="text"], .adult-box input { display: block; width: 100%; margin-top: 8px; background: #0c0f14; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.adult-box .check { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.you-card h3 { margin: 18px 0 6px; font-size: 22px; }
.you-card .btn, .you-card .text-btn { margin: 8px 8px 0 0; }

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