:root {
  color-scheme: light;
  --ink: #17333a;
  --heading: #12333b;
  --muted: #55747b;
  --teal: #006272;
  --card: rgba(237, 246, 247, 0.96);
  --line: rgba(23, 51, 58, 0.12);
  --ok: #00785d;
  --warning: #9b651c;
  --danger: #a64220;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #eef8f9;
  background:
    radial-gradient(circle at 18% 4%, rgba(82, 166, 178, 0.32), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(244, 202, 181, 0.16), transparent 30%),
    linear-gradient(180deg, #003f5c 0%, #002f45 54%, #062936 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.countdown-page {
  min-height: 100vh;
  padding: 48px 24px 72px;
}

.page-heading,
.filter-bar,
.countdown-grid,
.countdown-sections,
.empty-state {
  width: min(1360px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.page-heading {
  display: grid;
  justify-items: center;
  padding-bottom: 30px;
  text-align: center;
}

.brand-link {
  color: #eef8f9;
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: #9bd9dd;
  outline: none;
}

.brand-link h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
}

.page-heading h2 {
  margin: 18px 0 0;
  color: #c6dde2;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.page-heading p {
  max-width: 720px;
  color: #c6dde2;
  font-size: 1.08rem;
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #6f9fa8;
  border-radius: 22px;
  background: #9fc8cf;
  box-shadow: 0 14px 34px rgba(0, 23, 33, 0.2);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #7ca9b0;
  border-radius: 18px;
  color: var(--ink);
  background: #d5e8eb;
  font: inherit;
}

.countdown-sections {
  display: grid;
  gap: 34px;
}

.board-section h2 {
  margin: 0 0 12px;
  color: #eef8f9;
  font-size: 1.45rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.countdown-tile {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(198, 221, 226, 0.22);
  border-radius: 22px;
  color: var(--ink);
  background: #dceff0;
  box-shadow: 0 14px 34px rgba(0, 23, 33, 0.22);
}

.countdown-tile[hidden],
.board-section[hidden] {
  display: none;
}

.tile-thumbnail {
  width: 100%;
  height: 180px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  object-fit: cover;
  background: #e7f2f1;
}

.tile-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.game-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 18px;
  color: var(--teal);
  background: #e7f2f1;
  font-weight: 900;
}

.tile-title-group h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.35rem;
  line-height: 1.15;
}

.tile-title-group p,
.countdown-label,
.notes,
.empty-state {
  color: var(--muted);
}

.tile-title-group p {
  margin: 4px 0 0;
}

.countdown-value {
  margin: 22px 0 8px;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
}

.countdown-label {
  margin: 0;
  line-height: 1.5;
}

.tile-section {
  margin-top: 16px;
}

.tile-section h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #e7f2f1;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.confirmed {
  border-color: rgba(0, 120, 93, 0.3);
  color: var(--ok);
}

.badge.estimated,
.badge.unknown {
  border-color: rgba(155, 101, 28, 0.3);
  color: var(--warning);
}

.badge.delayed,
.badge.cancelled {
  border-color: rgba(166, 66, 32, 0.3);
  color: var(--danger);
}

.notes {
  line-height: 1.55;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.source-row a {
  color: var(--teal);
  font-weight: 850;
}

@media (max-width: 680px) {
  .countdown-page {
    padding: 32px 16px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}
