:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-2: #1e1e1e;
  --line: #2a2a2a;
  --text: #f0f0f0;
  --muted: #7a7a7a;
  --accent: #e61b23;
  --accent-2: #f5c518;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.home-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 760;
}

.brand h1 a {
  color: inherit;
  text-decoration: none;
}

.brand h1 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.brand .powered-by {
  margin-top: 3px;
  color: #9aabb8;
  font-size: 12px;
  font-weight: 650;
}

.brand .range {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
}

.metric {
  min-width: 92px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
}

.nav-links {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
}

.nav-links a,
.panel-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a:hover,
.panel-head a:hover {
  border-color: var(--accent);
}

.home-content {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.countdown-panel,
.digest-panel,
.link-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.countdown-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.countdown-copy {
  min-width: 0;
  padding: 22px;
  background: #1a1a1a;
  border-right: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.countdown-copy h2,
.panel-head h2 {
  margin: 5px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.countdown {
  margin-top: 18px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.countdown-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.day3-guide {
  min-width: 0;
  padding: 22px;
}

.day3-guide h3 {
  margin: 0;
  font-size: 18px;
}

.day3-guide ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #9aabb8;
  line-height: 1.65;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #1a1a1a;
}

.digest-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  min-height: 360px;
}

.digest-media {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #0f0f0f;
}

.digest-media video,
.digest-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.digest-media video {
  object-fit: cover;
}

.digest-media img {
  object-fit: contain;
}

.media-placeholder {
  height: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 22px;
  font-weight: 760;
}

.digest-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.digest-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.digest-meta strong {
  color: var(--text);
  font-size: 17px;
}

.digest-stat {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: baseline;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1a1a;
}

.digest-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.digest-stat strong {
  color: var(--accent-2);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.digest-stat small {
  color: var(--muted);
  font-size: 12px;
}

.digest-copy p {
  margin: 0;
  color: #9aabb8;
  line-height: 1.7;
}

.digest-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.digest-teams section {
  min-width: 0;
  padding: 10px;
  border: 1px solid #252525;
  border-radius: 8px;
  background: #1a1a1a;
}

.digest-teams strong {
  display: block;
  margin-bottom: 5px;
}

.digest-teams span {
  color: var(--muted);
  line-height: 1.5;
}

.link-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.view-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.view-card:last-child {
  border-right: 0;
}

.view-card:hover {
  background: #1c1c1c;
}

.view-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.view-card strong {
  font-size: 18px;
}

.view-card small {
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 32px auto;
  max-width: 460px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .home-topbar,
  .countdown-panel,
  .digest-body {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .countdown-copy,
  .digest-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .link-panel {
    grid-template-columns: 1fr;
  }

  .view-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .view-card:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .home-topbar,
  .home-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-links {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head a {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand h1 {
    font-size: 15px;
  }

  .home-topbar .summary {
    display: none;
  }
}
