:root {
  color-scheme: dark;
  --bg: #0b0d11;
  --panel: #12151b;
  --text: #f7f9fb;
  --muted: #aeb7c2;
  --line: #2a303a;
  --yellow: #ffd84d;
  --red: #ff4f61;
  --cyan: #54e2d1;
  --shadow: rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1072px, 100%);
  margin: 0 auto 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-badge {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 8px 24px var(--shadow);
  overflow: hidden;
  position: relative;
}

.brand-badge::before {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-bottom: 2px solid #101319;
  background: var(--red);
}

.brand-badge::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid #101319;
  border-radius: 50%;
  background: var(--text);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover {
  border-color: var(--cyan);
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed rgba(247, 249, 251, 0.24);
  border-radius: 8px;
  background: #101319;
  overflow: hidden;
  text-align: center;
}

.ad-slot span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.source-panel p,
.footer p,
.season-facts span,
.schedule-strip span,
.time-cell span,
.progress-head span {
  color: var(--muted);
}

.ad-unit {
  display: block;
  width: 100%;
  min-width: 120px;
  min-height: 90px;
}

.ad-slot--wide {
  width: min(728px, 100%);
  min-height: 90px;
  margin: 0 auto;
}

.top-ad {
  margin-bottom: 16px;
}

.bottom-ad {
  margin-top: 16px;
}

.page-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 680px) 180px;
  grid-template-areas: "left timer right";
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: stretch;
  justify-content: center;
}

.page-grid--left-empty {
  grid-template-columns: minmax(0, 680px) 180px;
  grid-template-areas: "timer right";
  width: min(876px, 100%);
}

.page-grid--right-empty {
  grid-template-columns: 180px minmax(0, 680px);
  grid-template-areas: "left timer";
  width: min(876px, 100%);
}

.page-grid--left-empty.page-grid--right-empty {
  grid-template-columns: minmax(0, 680px);
  grid-template-areas: "timer";
  width: min(680px, 100%);
}

.page-grid > * {
  min-width: 0;
}

.ad-rail {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  position: sticky;
  top: 16px;
  height: 100%;
  align-self: stretch;
}

.ad-rail--left {
  grid-area: left;
}

.ad-rail--right {
  grid-area: right;
}

.ad-rail--empty,
.ad-slot--empty {
  display: none;
}

.ad-slot--box {
  min-height: 0;
}

.ad-slot--tower {
  min-height: 0;
}

.ad-slot--box .ad-unit,
.ad-slot--tower .ad-unit {
  min-height: 100%;
}

.timer-stage {
  grid-area: timer;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 48px var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

h1 span {
  display: inline;
}

.target-title {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.crawler-fallback {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.time-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 88px;
  border: 1px solid rgba(247, 249, 251, 0.12);
  border-radius: 8px;
  background: #0d0f14;
}

.time-cell strong {
  color: var(--yellow);
  font-size: 2.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-cell span {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 700;
}

.schedule-strip,
.season-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  min-width: 0;
}

.season-facts {
  grid-template-columns: minmax(0, 1fr);
}

.schedule-strip div,
.season-facts div {
  min-height: 62px;
  padding: 12px;
  border: 1px solid rgba(247, 249, 251, 0.13);
  border-radius: 8px;
  background: #151922;
}

.schedule-strip span,
.season-facts span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.schedule-strip strong,
.season-facts strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.progress-block {
  margin-top: 16px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.progress-track {
  width: 100%;
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(247, 249, 251, 0.18);
  border-radius: 999px;
  background: rgba(8, 9, 13, 0.72);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.source-panel {
  width: min(760px, 100%);
  margin: 18px auto 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.source-panel h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.source-panel h2:not(:first-child) {
  margin-top: 24px;
}

.source-panel p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.source-panel p:last-child {
  margin-bottom: 0;
}

.fact-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.fact-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151922;
  color: var(--muted);
}

.fact-list strong {
  color: var(--text);
}

.schedule-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.schedule-table div {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.35fr;
}

.schedule-table div:first-child {
  background: #0d0f14;
  color: var(--muted);
  font-size: 0.92rem;
}

.schedule-table span {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
}

.schedule-table div:last-child span {
  border-bottom: 0;
}

.schedule-table span + span {
  border-left: 1px solid var(--line);
}

.guide-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151922;
  color: var(--text);
  text-decoration: none;
}

.guide-links a:hover,
.source-links a:hover {
  border-color: var(--cyan);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.footer {
  width: min(900px, 100%);
  margin: 22px auto 0;
  padding-bottom: 12px;
  text-align: center;
}

.footer p {
  margin: 6px 0;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "timer"
      "left"
      "right";
  }

  .ad-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
  }

  .ad-rail--left {
    order: 2;
  }

  .timer-stage {
    order: 1;
  }

  .ad-rail--right {
    order: 3;
  }

  .ad-slot--box,
  .ad-slot--tower {
    min-height: 120px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding: 12px 0;
  }

  .topbar,
  .ad-slot--wide,
  .page-grid,
  .source-panel,
  .footer {
    width: calc(100vw - 72px);
    max-width: calc(100vw - 72px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-nav {
    justify-content: flex-start;
  }

  .timer-stage {
    max-width: 100%;
    min-height: 0;
    padding: 24px 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h1 span {
    display: block;
  }

  .target-title {
    font-size: 1.08rem;
  }

  .countdown {
    grid-template-columns: 1fr;
  }

  .time-cell {
    min-height: 86px;
  }

  .time-cell strong {
    font-size: 2.45rem;
  }

  .schedule-strip,
  .season-facts,
  .ad-rail {
    grid-template-columns: 1fr;
  }

  .schedule-table,
  .schedule-table div,
  .schedule-table span,
  .schedule-table span + span {
    display: block;
    border-left: 0;
  }

  .schedule-table div:first-child {
    display: none;
  }

  .schedule-table span {
    border-bottom: 1px solid var(--line);
  }

  .guide-links {
    grid-template-columns: 1fr;
  }

  .progress-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .topbar,
  .ad-slot--wide,
  .page-grid,
  .source-panel,
  .footer {
    width: min(320px, calc(100vw - 48px));
    max-width: min(320px, calc(100vw - 48px));
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.9rem;
  }

  .countdown {
    gap: 8px;
  }

  .time-cell strong {
    font-size: 2.2rem;
  }
}
