:root {
  --bg: #0c0c14;
  --bg-raised: #161622;
  --panel: #14141f;
  --stroke: #2c2c40;
  --text: #f5f5fa;
  --muted: #9b9bb2;
  --purple: #c084fc;
  --purple-deep: #7c3aed;
  --green: #8fe05a;
  --yellow: #ffe14a;
  --orange: #ff8a3d;
  --blue: #5ebeff;
  --danger: #ff3348;
  --ok: #18c964;
  --empty: #2e2e40;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", system-ui, sans-serif;
  --display: "Avenir Next", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 108px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(192, 132, 252, 0.28), transparent 58%),
    radial-gradient(680px 460px at -12% 18%, rgba(94, 190, 255, 0.16), transparent 52%),
    radial-gradient(520px 360px at 50% 110%, rgba(143, 224, 90, 0.08), transparent 50%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  color: #111;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1120px, calc(100% - 28px));
  margin: 14px auto 0;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(12, 12, 20, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover { color: var(--text); }

.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: #232332;
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: white;
  color: #16121f;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dots { display: inline-flex; gap: 5px; }

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.dots .g { background: var(--green); }
.dots .p { background: var(--purple); }
.dots .y { background: var(--yellow); }
.dots .o { background: var(--orange); }
.dots .b { background: var(--blue); }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.lead {
  margin: 22px 0 0;
  max-width: 38rem;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.65;
}

.quiet {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  color: white;
  background: linear-gradient(180deg, #d7a6ff, #9a5cff);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
}

.button.ghost {
  color: var(--text);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.platforms li {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
}

.stage {
  padding: 18px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.board {
  display: grid;
  grid-template-columns: 34px repeat(6, 1fr);
  grid-template-rows: 34px repeat(6, 1fr);
  gap: 7px;
  aspect-ratio: 1;
}

.cell, .chip, .corner {
  border-radius: 18%;
}

.cell {
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 14px rgba(0, 0, 0, 0.25);
}

.cell::after, .swatch::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 9%;
  height: 34%;
  border-radius: 40%;
  background: linear-gradient(rgba(255, 255, 255, 0.72), transparent);
  pointer-events: none;
}

.g { background: linear-gradient(180deg, #d9f8a8, #8fe05a 46%, #3f9e24); }
.p { background: linear-gradient(180deg, #f0d4ff, #c084fc 48%, #7c3aed); }
.y { background: linear-gradient(180deg, #fff6b8, #ffe14a 50%, #e0b000); }
.o { background: linear-gradient(180deg, #ffd0a8, #ff8a3d 48%, #e25a12); }
.b { background: linear-gradient(180deg, #c7e8ff, #5ebeff 48%, #2f7cff); }
.e {
  background: linear-gradient(180deg, #3c3c52, #2e2e40);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.chip {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.chip.y, .chip.o { color: #2a2410; }
.chip.ok { box-shadow: 0 0 0 2px var(--ok), 0 0 12px rgba(24, 201, 100, 0.45); }
.chip.bad { box-shadow: 0 0 0 2px var(--danger), 0 0 12px rgba(255, 51, 72, 0.5); }

.badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid white;
  color: white;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.badge[hidden] { display: none; }
.badge.ok { background: var(--ok); }
.badge.bad { background: var(--danger); }

section { padding: 72px 0; scroll-margin-top: 108px; }

.section-kicker {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.section-lead {
  max-width: 40rem;
  color: var(--muted);
  margin: 12px 0 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.card {
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(20, 20, 31, 0.86);
  border: 1px solid var(--stroke);
}

.step-no {
  margin: 0;
  color: var(--purple);
  font-weight: 800;
}

.card h3 { margin: 8px 0; font-size: 20px; letter-spacing: -0.03em; }
.card p { margin: 0; color: var(--muted); }

.demo {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(20, 20, 31, 0.86);
  border: 1px solid var(--stroke);
}

.demo-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
}

.demo-cells {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.demo-cells button {
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  border-radius: 18%;
  cursor: pointer;
  position: relative;
}

.demo-cells button:focus-visible,
.button:focus-visible,
.lang button:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.demo-note { margin: 14px 0 0; color: var(--muted); }

.pair {
  display: grid;
  grid-template-columns: 28px max-content max-content;
  gap: 12px;
  align-items: center;
  justify-content: start;
  margin-top: 16px;
}

.pair .chip {
  min-width: 42px;
  min-height: 32px;
  padding: 0 6px;
}

.bracket {
  height: 74px;
  border: 2px solid #d7d7ec;
  border-right: 0;
  border-radius: 12px 0 0 12px;
}

.mini {
  display: grid;
  gap: 8px;
}

.mini span {
  display: grid;
  grid-template-columns: repeat(6, 18px);
  gap: 6px;
}

.mini i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: block;
  position: relative;
}

.features {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.feature h3 { margin: 12px 0 8px; letter-spacing: -0.03em; }
.feature p { margin: 0; color: var(--muted); }

.feature.wide {
  background:
    linear-gradient(160deg, rgba(192, 132, 252, 0.18), transparent 42%),
    rgba(20, 20, 31, 0.9);
}

@media (min-width: 861px) {
  .feature.wide { grid-column: span 2; }
}

.swatches { display: flex; gap: 8px; }
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.level {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.level strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.level span { color: var(--muted); font-size: 14px; }

.band {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background: white;
  color: #1b1630;
}

.band p { margin: 8px 0 0; color: #514a63; }
.band .button.primary { color: white; }

footer {
  padding: 28px 0 48px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

footer a { color: var(--text); }

.page {
  padding: 48px 0 20px;
}

.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(40px, 6vw, 64px); }
.prose h2 { font-size: 24px; margin-top: 32px; }
.prose h3 { font-size: 18px; margin: 20px 0 8px; letter-spacing: -0.02em; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--text); }
.prose ul {
  margin: 8px 0 16px;
  padding-left: 1.25rem;
}
.prose li { margin: 6px 0; }
.prose .updated {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; border-radius: 24px; }
  .nav-links { width: 100%; }
  .hero, .steps, .features, .levels, .band, .demo-row {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 36px; }
  .pair { grid-template-columns: 22px max-content max-content; }
  section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
