:root {
  --bg: #000;
  --text: #fafafa;
  --muted: #c4c4cc;
  --faint: #a1a1aa;
  --line: rgba(255, 255, 255, 0.1);
  --pink: #f0abfc;
  --violet: #a78bfa;
  --card: #121217;
  --max: 1080px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(168, 85, 247, 0.22), transparent 62%),
    radial-gradient(640px 280px at 86% 8%, rgba(236, 72, 153, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 96px,
    rgba(255, 255, 255, 0.025) 96px,
    rgba(255, 255, 255, 0.025) 97px
  );
  mask-image: linear-gradient(180deg, #000 0%, transparent 42%);
}

a { color: inherit; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(760px, 100%);
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(145deg, #fb7185, #7c3aed);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.logo-mark svg { display: block; }

.nav-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  text-decoration: none;
  color: #d4d4d8;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a:hover { color: #fff; }

.nav-links a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  text-align: center;
  padding: 78px 0 34px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.grad {
  background: linear-gradient(100deg, #f9a8d4 0%, #e879f9 42%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 18px auto 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.stage {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 600px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  background: #111;
}

.stage-copy {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 36px 36px 32px;
  color: #1c1917;
  background:
    radial-gradient(90% 70% at 0% 100%, rgba(167, 139, 250, 0.45), transparent 55%),
    radial-gradient(70% 50% at 100% 0%, rgba(251, 113, 133, 0.28), transparent 50%),
    linear-gradient(165deg, #f5f5f4 0%, #e7e5e4 48%, #d6d3d1 100%);
}

.stage-kicker {
  margin: 0;
  color: #44403c;
  font-size: 16px;
  line-height: 1.55;
}

.stage-mid h2 {
  margin: 12px 0 8px;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stage-mid p {
  margin: 0;
  max-width: 320px;
  color: #44403c;
  font-size: 16px;
}

.app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fb7185, #7c3aed);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.28);
}

.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #be185d, #6d28d9);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  color: #fff;
  background: #18181b;
}

.btn-ghost:hover { background: #27272a; }

.btn-line {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.btn-line:hover { background: rgba(255, 255, 255, 0.06); }

.stage-ui {
  position: relative;
  background:
    radial-gradient(80% 50% at 80% 0%, rgba(99, 102, 241, 0.35), transparent 55%),
    linear-gradient(180deg, #171722, #0c0c12 70%);
}

.ui-frame {
  position: absolute;
  left: 28px;
  top: 22px;
  right: -36px;
  bottom: 18px;
  border-radius: 18px 0 0 0;
  background: rgba(17, 17, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 0;
  border-bottom: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 22px 22px 0;
}

.ui-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ui-top h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.ui-badge,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: #fae8ff;
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid rgba(216, 180, 254, 0.35);
}

.ui-shuffle {
  margin-left: auto;
  margin-right: 90px;
}

.ui-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
}

.ui-label {
  margin: 0 0 8px;
  color: #a1a1aa;
  font-size: 13px;
}

.ui-period {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.rank-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-list li,
.plain-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: #e4e4e7;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #c084fc;
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.15);
}

.rank-list span { flex: 1; }

.ball {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: #7c3aed;
}

.ball[data-n="1"] { background: #7c3aed; }
.ball[data-n="2"] { background: #db2777; }
.ball[data-n="3"] { background: #4f46e5; }
.ball[data-n="4"] { background: #0891b2; }
.ball[data-n="5"] { background: #d97706; }
.ball[data-n="6"] { background: #9333ea; }
.ball[data-n="7"] { background: #e11d48; }
.ball[data-n="8"] { background: #0284c7; }
.ball[data-n="9"] { background: #65a30d; }
.ball[data-n="10"] { background: #c026d3; }

.ball.bump { animation: bump 0.35s var(--ease); }

@keyframes bump {
  50% { transform: translateY(-3px) scale(1.08); }
}

.shuffle-note {
  margin: 0 0 12px;
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.55;
  max-width: 250px;
}

.section { padding: 36px 0; }

.section h2,
.essay h2,
.block h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 8px;
  color: #f0abfc;
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.card {
  display: block;
  text-decoration: none;
  padding: 20px 18px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  min-height: 180px;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 180, 254, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.card strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.65;
}

.card-index {
  color: #e879f9;
  font-size: 13px;
}

.essay {
  padding-bottom: 40px;
}

.prose {
  width: min(740px, 100%);
}

.prose p,
.answer p,
.block p { color: var(--muted); }

.prose p,
.block p { font-size: 17px; line-height: 1.95; margin: 0 0 18px; }

.prose a,
.block a,
.answer a {
  color: #f5d0fe;
  text-underline-offset: 3px;
}

.prose a:hover,
.block a:hover,
.answer a:hover { color: #fff; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.page-hero { padding: 64px 0 12px; }

.page-hero h1 { font-size: clamp(36px, 5vw, 60px); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--faint);
  font-size: 14px;
}

.crumbs a { color: #e4e4e7; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.panel {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.panel h3 { margin: 0 0 8px; font-size: 16px; }

.table-scroll {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #0c0c10;
}

caption {
  caption-side: bottom;
  text-align: left;
  padding: 12px 14px 0;
  color: var(--faint);
  font-size: 14px;
}

th, td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-variant-numeric: tabular-nums;
}

th {
  color: #e4e4e7;
  font-weight: 650;
  font-size: 13px;
  background: #14141b;
}

td:first-child, th:first-child { text-align: left; padding-left: 16px; }

tbody tr:hover td { background: rgba(167, 139, 250, 0.08); }

.bars { display: grid; gap: 10px; }

.bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 36px;
  gap: 10px;
  align-items: center;
  color: #e4e4e7;
  font-size: 14px;
}

.bar-track {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #fb7185, #8b5cf6);
  transform-origin: left center;
  animation: grow 0.9s var(--ease);
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.lanes {
  display: grid;
  gap: 8px;
}

.lane {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 30%),
    #12121a;
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.lane:hover,
.lane.is-on {
  border-color: rgba(232, 121, 249, 0.7);
  background: rgba(124, 58, 237, 0.18);
}

.lane i {
  width: 34px;
  height: 18px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(90deg, #fb7185, #7c3aed);
  display: inline-block;
}

.lane-note {
  min-height: 3.2em;
  margin: 12px 0 0;
  color: var(--muted);
}

.stats,
.word-grid,
.steps,
.terms {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.stats { grid-template-columns: repeat(4, 1fr); }
.word-grid,
.terms { grid-template-columns: repeat(3, 1fr); }

.stat,
.word-card,
.term,
.compare article {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.stat { padding: 22px 18px 18px; }

.stat b {
  display: block;
  margin-bottom: 10px;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, #f9a8d4, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span,
.word-card p,
.term span,
.steps span,
.end-band p {
  color: var(--muted);
}

.stat span { display: block; font-size: 14px; line-height: 1.6; }

.word-card { padding: 22px; min-height: 210px; }

.word-card h3,
.compare h3,
.end-band h2 {
  margin: 16px 0 8px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.word-card p { margin: 0; font-size: 15px; line-height: 1.7; }

.word-card-accent {
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(192, 132, 252, 0.28), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.steps {
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 22px 0;
  padding: 0;
}

.steps li {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.steps em,
.route em {
  color: #f0abfc;
  font-style: normal;
  font-size: 13px;
}

.steps b,
.route b { display: block; margin: 8px 0 6px; }

.steps span { display: block; font-size: 14px; line-height: 1.6; }

.ticket {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #101016;
}

.ticket-label,
.more-chip {
  color: #e4e4e7;
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.chip i { font-style: normal; color: #d4d4d8; font-size: 13px; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.compare article { padding: 8px 22px 18px; }

.compare h3 { font-size: 26px; }

.compare ul { list-style: none; margin: 0; padding: 0; }

.compare li {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.compare-yes { box-shadow: inset 3px 0 0 #34d399; }
.compare-no { box-shadow: inset 3px 0 0 #fb7185; }

.term {
  display: block;
  padding: 18px;
  text-decoration: none;
  min-height: 132px;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}

.term:hover {
  transform: translateY(-3px);
  border-color: rgba(216, 180, 254, 0.45);
}

.term strong { display: block; margin-bottom: 8px; font-size: 18px; }
.term span { display: block; font-size: 14px; line-height: 1.65; }

.route { margin-top: 8px; }

.route a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 4px;
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.route a:hover b { color: #f5d0fe; }
.route span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.route i { color: #e4e4e7; font-style: normal; font-size: 14px; }

.end-wrap { padding-bottom: 72px; }

.end-band {
  padding: 36px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 80% at 0% 0%, rgba(192, 132, 252, 0.22), transparent 55%),
    #12121a;
}

.end-band h2 { font-size: clamp(28px, 4vw, 40px); max-width: 16em; }
.end-band p { max-width: 640px; font-size: 16px; line-height: 1.8; }
.end-band .stage-actions { margin-top: 8px; }

.faq { display: grid; gap: 10px; }

.qa {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.qa h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }

.qa-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.qa-btn:hover { background: rgba(255, 255, 255, 0.03); }

.qa-icon {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
}

.qa-icon::before,
.qa-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 13px;
  height: 1.5px;
  background: #fff;
}

.qa-icon::after { transform: rotate(90deg); transition: transform 0.2s var(--ease); }
.qa.is-open .qa-icon::after { transform: rotate(0deg); }
.qa.is-open { border-color: rgba(216, 180, 254, 0.45); }

.answer[hidden] { display: none; }

.answer { padding: 0 18px 16px; }

.answer p { margin: 0; }

.callout {
  margin-top: 8px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(196, 181, 253, 0.25);
}

.callout p { margin: 0; color: #f5f3ff; }

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 70px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--faint);
}

.site-footer strong { color: #fff; display: block; margin-bottom: 6px; }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 16px 0;
}

.foot-links a { color: #e4e4e7; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

.site-footer small { display: block; max-width: 760px; line-height: 1.7; }

:focus-visible {
  outline: 2px solid #d8b4fe;
  outline-offset: 3px;
}

::selection { background: #6d28d9; color: #fff; }

@media (max-width: 980px) {
  .cards,
  .stats,
  .steps { grid-template-columns: 1fr 1fr; }
  .word-grid,
  .terms,
  .compare,
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; border-radius: 22px; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 4px 0 8px;
  }
  .nav-links.is-open { display: flex; }
  .stage { grid-template-columns: 1fr; }
  .stage-copy { min-height: 0; }
  .stage-ui { min-height: 560px; }
  .ui-frame {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    margin: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding-bottom: 16px;
  }
  .ui-shuffle { margin-right: 0; }
  .ui-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .cards,
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .route a { grid-template-columns: 36px 1fr; }
  .route i { display: none; }
  .end-band { padding: 24px; }
  .lede { font-size: 16px; }
  .hero h1, .page-hero h1 { font-size: 36px; }
  .stage-copy { padding: 24px; }
  .ui-top { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
