:root {
  color-scheme: light;
  --bg: #f4fbff;
  --panel: #ffffff;
  --ink: #183143;
  --muted: #627988;
  --line: #cce2ec;
  --accent: #1b9aaa;
  --accent-strong: #087b8c;
  --sun: #ffd166;
  --coral: #ef6f6c;
  --mint: #8be0c9;
  font-family:
    Inter, "Noto Sans KR", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(139, 224, 201, 0.36), transparent 34%),
    linear-gradient(225deg, rgba(255, 209, 102, 0.42), transparent 32%),
    linear-gradient(0deg, rgba(239, 111, 108, 0.08), transparent 45%),
    var(--bg);
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.scoreboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(24, 49, 67, 0.08);
}

.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.2;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background: #faffff;
}

.secondary-button:hover {
  border-color: var(--accent);
  background: #eef9fb;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
  margin: 22px 0 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #faffff;
  font: inherit;
}

.status-message {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-message[data-tone="error"] {
  color: #b42318;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--panel);
}

th,
td {
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: #eef9fb;
  font-size: 0.82rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: #fbfeff;
}

.rank {
  width: 62px;
  color: var(--accent-strong);
  font-weight: 900;
}

.score,
.time {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hover-pill {
  display: inline-flex;
  min-width: 42px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #12312e;
  background: var(--mint);
  font-size: 0.8rem;
  font-weight: 900;
}

.hover-pill[data-enabled="false"] {
  color: #4b211f;
  background: color-mix(in srgb, var(--coral) 42%, #fff);
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    padding: 12px 0;
  }

  .scoreboard {
    padding: 14px;
  }

  .heading-row,
  .toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .heading-row {
    display: grid;
  }

  button {
    width: 100%;
  }
}
