:root {
  --ink: var(--atlas-ink, #101113);
  --muted: var(--atlas-muted, #626976);
  --line: var(--atlas-line, rgba(16, 17, 19, 0.13));
  --surface: var(--atlas-paper, #ffffff);
  --soft: var(--atlas-paper-soft, #f7f8fa);
  --bg: var(--atlas-canvas, #f4f6f8);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 14% 0%, #fff 0, #f8f9fb 42%, #eef1f4 100%);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Pretendard", Inter, sans-serif;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.05rem 1rem 3rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.86rem;
}

.brand-wrap,
.nav-links a {
  color: inherit;
  text-decoration: none;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.78rem;
}

.brand-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.brand {
  font-weight: 900;
  letter-spacing: 0.07em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

.nav-links a {
  font-size: 0.87rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.game-db {
  display: grid;
  gap: 0.82rem;
  margin-top: 1rem;
}

.game-hero,
.game-panel,
.game-card,
.game-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  min-height: 148px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

.game-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.game-hero h1 {
  margin: 0.24rem 0 0;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.game-hero p {
  max-width: 760px;
  margin: 0.52rem 0 0;
  color: #4a5361;
  line-height: 1.55;
}

.game-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.48rem;
  min-width: min(460px, 100%);
}

.game-control {
  display: grid;
  gap: 0.24rem;
}

.game-control label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.game-control select {
  min-height: 42px;
  border: 1px solid rgba(16, 17, 19, 0.16);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  padding: 0.42rem 0.52rem;
}

.game-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
}

.game-kpi {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  padding: 0.72rem;
}

.game-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.game-kpi strong {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.25rem, 2.6vw, 1.82rem);
  font-weight: 950;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 0.82fr);
  gap: 0.82rem;
  align-items: stretch;
}

.game-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.74rem;
  min-height: 458px;
  padding: 0.9rem;
}

.game-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.72rem;
  border-bottom: 1px solid rgba(16, 17, 19, 0.08);
  padding-bottom: 0.58rem;
}

.game-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.game-panel-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.game-chart {
  min-height: 372px;
}

.game-list {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  max-height: 720px;
  overflow: auto;
  padding-right: 0.1rem;
}

.game-card {
  display: grid;
  gap: 0.42rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--team-primary) 7%, #fff), #fff 70%),
    #fff;
  color: inherit;
  padding: 0.62rem;
  text-decoration: none;
}

.game-card.is-active {
  border-color: #111318;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.game-card__meta {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.game-card__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}

.game-team {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.game-team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.game-team b,
.game-team strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__teams i {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.game-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.game-metrics em {
  border: 1px solid rgba(16, 17, 19, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  padding: 0.18rem 0.34rem;
}

.game-table-wrap {
  max-height: 720px;
  overflow: auto;
}

.game-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.game-table th,
.game-table td {
  border-bottom: 1px solid rgba(16, 17, 19, 0.08);
  padding: 0.56rem 0.62rem;
  text-align: right;
  white-space: nowrap;
}

.game-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.game-table th:first-child,
.game-table td:first-child {
  text-align: left;
}

.game-state {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

@media (max-width: 980px) {
  .game-hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-controls,
  .game-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .top-nav {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .game-controls,
  .game-kpis {
    grid-template-columns: 1fr;
  }

  .game-panel {
    min-height: 360px;
  }
}
