:root {
  --bg: #0c0712;
  --fg: #f6f1fb;
  --muted: #b5a4c6;
  --line: rgba(198, 146, 255, 0.22);
  --surface: #160d20;
  --accent: #b026ff;
  color: var(--fg);
  background: var(--bg);
  font-family: "Segoe UI", "Microsoft JhengHei UI", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  background: var(--bg);
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }

#nano {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bloom {
  position: fixed;
  z-index: 0;
  left: 50%;
  top: -180px;
  width: min(980px, 92vw);
  height: 520px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(176, 70, 255, 0.34), rgba(88, 28, 140, 0.12) 42%, transparent 70%);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 10px 28px;
  flex-wrap: wrap;
  background: transparent;
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: rgba(12, 7, 18, 0.84);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.brand svg {
  width: 22px;
  height: 22px;
}

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

.nav nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 560;
}

.pill:hover { background: #c44dff; }

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

.hero {
  position: relative;
  z-index: 1;
  padding: 72px 0 28px;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  margin-top: 22px;
}

.hero-row p,
.hero-row a,
.split p,
.close p,
.sheet,
footer {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-row p,
.hero-row a { margin: 0; }

.hero-row a { color: var(--fg); white-space: nowrap; }
.hero-row a:hover { color: #fff; }

.stage {
  position: relative;
  width: min(1120px, calc(100% - 56px));
  margin: 64px auto 0;
}

.halo {
  position: absolute;
  left: 8%;
  right: 8%;
  top: -48px;
  height: 160px;
  background: radial-gradient(ellipse at center, rgba(176, 70, 255, 0.28), transparent 70%);
  pointer-events: none;
}

.window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #100818;
  box-shadow: 0 30px 80px rgba(40, 0, 70, 0.35);
}

.window header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.window header i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8cdd4;
}

.window header strong {
  color: var(--fg);
  font-weight: 520;
}

.window header em {
  margin-left: auto;
  font-style: normal;
}

.window ul {
  margin: 0;
  padding: 8px;
  list-style: none;
}

.window li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 8px;
}

.window li + li { border-top: 1px solid rgba(255, 255, 255, 0.04); }

.window li span {
  color: var(--muted);
  font-size: 13px;
}

.window li b {
  font-weight: 450;
  font-size: 14px;
}

.band {
  position: relative;
  z-index: 1;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr);
  gap: 32px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.split p { margin: 6px 0 0; }

.sheet {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.sheet p {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font-size: 14px;
}

.sheet p:first-child { border-top: 0; }

.sheet span { color: var(--muted); }

.close {
  position: relative;
  z-index: 1;
  padding: 104px 0 88px;
  border-top: 1px solid var(--line);
}

.close h2 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.045em;
}

.close p { margin: 14px 0 0; }

footer {
  position: relative;
  z-index: 1;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 760px) {
  .nav { padding: 0 16px; gap: 12px; }
  .nav nav { display: none; }
  .wrap, .stage { width: calc(100% - 32px); }
  .hero { padding-top: 40px; }
  h1 { font-size: 42px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .split { grid-template-columns: 1fr; gap: 12px; }
  .band { padding: 56px 0; }
  .window li { grid-template-columns: 56px 1fr; }
}

.window img,
.pair img {
  display: block;
  width: 100%;
  height: auto;
}

.pair {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 28px;
}

.pair figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.pair figcaption {
  padding: 10px 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

.grid-adv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  gap: 1px;
}

.grid-adv article {
  padding: 26px 24px 28px;
  background: #120a18;
}

.grid-adv h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.03em;
}

.grid-adv p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.loads .pill { height: 40px; padding: 0 18px; }

.loads .text {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font-size: 14px;
}

.loads .text:hover { border-color: rgba(210, 160, 255, 0.55); }

.chapter {
  display: grid;
  grid-template-columns: 88px minmax(0, 760px);
  gap: 28px;
  align-items: start;
}

.num {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: #d7a6ff;
}

.prose h2 { margin-bottom: 18px; }

.prose p,
.prose li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.prose p { margin: 0 0 16px; }

.prose ol,
.prose ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.prose li { margin: 0 0 8px; }

.prose code {
  color: var(--fg);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.92em;
}

#consent {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
}

#consent label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
}

#consent input { margin-top: 4px; }

button.pill,
button.text {
  border: 0;
  cursor: pointer;
  font: inherit;
}

button.pill:disabled,
button.text:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

button.text {
  background: transparent;
  border: 1px solid var(--line);
}

.fine {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .pair, .grid-adv, .chapter { grid-template-columns: 1fr; }
  .num { margin-top: 0; }
}

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