:root {
  color-scheme: dark;
  --page: #16131c;
  --panel: #221e28;
  --edge: #5a5160;
  --text: #f6eee3;
  --muted: #d9cfc3;
  --accent: #ffb07a;
  --focus: #ffe08a;
  --tab-on: #3d2c28;
  font-family: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 8px 12px;
  background: #111;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip:focus, .skip:focus-visible {
  transform: none;
}

a, button, iframe {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.top, main, footer {
  width: min(1120px, calc(100% - 28px));
  margin-left: auto;
  margin-right: auto;
}

.top { padding: 28px 0 8px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 4.6vw, 2.1rem);
  line-height: 1.28;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.lede, .stats, footer p {
  color: var(--muted);
  line-height: 1.7;
}

.lede {
  margin: 0;
  max-width: 46rem;
  font-size: 1rem;
}

.rounds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.rounds button {
  flex: 1 1 14rem;
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
}

.rounds button[aria-selected="true"] {
  background: var(--tab-on);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.note {
  margin: 14px 0 0;
  max-width: 52rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  margin: 22px 0 14px;
}

.tabs {
  display: flex;
  width: 100%;
  max-width: 28rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.tabs button {
  flex: 1 1 0;
  margin: 0;
  border: 0;
  border-right: 1px solid var(--edge);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-height: 44px;
  padding: 8px 10px;
  cursor: pointer;
}

.tabs button:last-child { border-right: 0; }

.tabs button[aria-selected="true"] {
  background: var(--tab-on);
  color: var(--text);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.stats {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.875rem;
}

#play-btn {
  appearance: none;
  border: 1px solid #e8a06a;
  background: #ffb07a;
  color: #2a1a16;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
}

#play-btn:hover { filter: brightness(1.06); }
#play-btn:active { transform: translateY(1px); }

.stage {
  background: #100e14;
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  min-height: 70vh;
}

iframe {
  display: block;
  width: 100%;
  height: clamp(520px, 78vh, 980px);
  border: 0;
  background: #100e14;
}

footer {
  padding: 18px 0 28px;
}

footer p {
  margin: 0;
  font-size: 0.875rem;
}

@media (max-width: 700px) {
  .top, main, footer { width: calc(100% - 20px); }
  .top { padding-top: 20px; }
  .toolbar { margin-top: 16px; }
  .toolbar { grid-template-columns: 1fr; }
  #play-btn { width: 100%; }
  iframe { height: min(78vh, 720px); }
  .tabs { max-width: none; }
}
