:root {
  --bg: #f3f5ff;
  --ink: #16227a;
  --cobalt: #2340d8;
  --sun: #ffd23f;
  --pink: #e8456f;
  --mint: #19b394;
  --panel: #ffffff;
  --muted: #4a5496;
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1446;
    --ink: #eef0ff;
    --cobalt: #8fa2ff;
    --panel: #16205e;
    --muted: #b4bbef;
    --pink: #ff7aa2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--round);
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top {
  display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 56px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.tag { margin: 0; color: var(--muted); font-size: 15px; }

.hero { padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 56px) 8px; max-width: 1200px; }
h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(34px, 7.4vw, 92px);
  line-height: 1.08;
  letter-spacing: -.02em;
}
h1 span { display: block; }
h1 span:first-child { color: var(--cobalt); transform: rotate(-1.5deg); transform-origin: left bottom; }
h1 span:last-child { padding-left: clamp(0px, 6vw, 96px); }
.lede { max-width: 34em; color: var(--muted); margin: 1.2em 0 0; }

.lab {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 56px);
  max-width: 1280px;
  align-items: start;
}
.board-wrap {
  background: var(--cobalt);
  border-radius: 28px;
  padding: clamp(10px, 2vw, 18px);
}
@media (prefers-color-scheme: dark) { .board-wrap { background: #22307e; } }
#board { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 18px; }

.panel { display: grid; gap: 22px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
button {
  font: inherit; font-weight: 800; cursor: pointer;
  border: 0; border-radius: 999px;
  padding: 10px 22px;
  background: var(--sun); color: #16227a;
  box-shadow: 0 4px 0 #c89c00;
  transition: transform .08s, box-shadow .08s;
}
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #c89c00; }
button.plain { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; }
.tilt label { display: block; font-weight: 700; margin-bottom: 6px; }
.tilt output { color: var(--pink); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--pink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stats div { border-top: 3px solid var(--ink); padding-top: 6px; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 900; font-variant-numeric: tabular-nums; }
.note { margin: 0; color: var(--muted); font-size: 15px; }

.odd { padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 56px) 0; max-width: 1280px; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin: 0 0 28px; letter-spacing: -.01em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 32px; }
.facts article { position: relative; padding-top: 10px; }
.facts h3 {
  display: inline-block; margin: 0 0 8px;
  font-size: 24px; font-weight: 900;
  padding: 2px 14px; border-radius: 999px;
  background: var(--sun); color: #16227a;
}
.facts article:nth-child(2) h3 { background: var(--pink); color: #fff; transform: rotate(2deg); }
.facts article:nth-child(3) h3 { background: var(--mint); color: #062b24; transform: rotate(-2deg); }
.facts article:nth-child(4) h3 { background: var(--cobalt); color: #fff; }
@media (prefers-color-scheme: dark) { .facts article:nth-child(4) h3 { color: #0c1446; } }
.facts p { margin: 0; max-width: 22em; }

.foot { padding: 72px clamp(16px, 4vw, 56px) 40px; color: var(--muted); font-size: 15px; }

@media (max-width: 820px) {
  .lab { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
