/* =========================================================================
   Soul Land: Awakening World — 非官方资讯枢纽
   设计系统：斗罗·灵能 (Douluo Spirit Energy)
   配色取自「魂环年限色谱」：白→金→紫→黑→红
   ========================================================================= */

:root {
  /* base — 灵夜 dark theme */
  --bg:        #0a0d16;
  --bg-2:      #0c111e;
  --panel:     #121829;
  --panel-2:   #18203500;
  --panel-solid:#161d30;
  --line:      rgba(150,170,220,0.12);
  --line-2:    rgba(150,170,220,0.22);
  --ink:       #e9eefc;
  --ink-dim:   #97a3c4;
  --ink-faint: #67718f;

  /* 魂环色谱 — 稀有度 / Tier 体系（颜色有来源） */
  --ring-white:  #e7edf8;
  --ring-gold:   #f4c24c;
  --ring-purple: #9c6bff;
  --ring-black:  #4a4f6b;
  --ring-red:    #ff4f63;

  /* primary accent — tweakable，默认取「千年紫魂环」 */
  --accent:      #9c6bff;
  --accent-soft: color-mix(in oklab, var(--accent) 18%, transparent);
  --accent-2:    #f4c24c;

  --shadow: 0 24px 60px -24px rgba(0,0,0,0.8);
  --r: 4px;

  --maxw: 1240px;
}

/* 圣昼 light theme */
[data-theme="light"] {
  --bg:        #efe8da;
  --bg-2:      #e7ddc9;
  --panel:     #faf5ec;
  --panel-solid:#fbf7ef;
  --line:      rgba(70,55,30,0.14);
  --line-2:    rgba(70,55,30,0.26);
  --ink:       #221a10;
  --ink-dim:   #6b5c44;
  --ink-faint: #9a8a6e;
  --ring-black:#574e3a;
  --shadow:    0 24px 50px -28px rgba(80,60,30,0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ---- background texture layer (tweakable) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  background:
    radial-gradient(1100px 600px at 78% -8%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(80,120,255,0.10), transparent 55%);
}
body[data-texture="stars"]::after,
body[data-texture="grid"]::after,
body[data-texture="rings"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body[data-texture="stars"]::after {
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.2px 1.2px at 70% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.6px 1.6px at 40% 80%, rgba(200,180,255,0.5), transparent),
    radial-gradient(1.2px 1.2px at 85% 20%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.3px 1.3px at 55% 12%, rgba(255,255,255,0.4), transparent);
  background-size: 260px 260px, 340px 340px, 300px 300px, 220px 220px, 280px 280px;
  opacity: 0.7;
}
body[data-texture="grid"]::after {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
          mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
body[data-texture="rings"]::after {
  background-image:
    repeating-radial-gradient(circle at 82% 18%, transparent 0 38px, var(--line) 38px 39px),
    repeating-radial-gradient(circle at 12% 86%, transparent 0 46px, var(--line) 46px 47px);
  opacity: 0.55;
}

#root { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- typography helpers ---------- */
.serif { font-family: "Noto Serif SC", serif; }
.eyebrow {
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.section { position: relative; padding: 92px 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.sec-head { margin-bottom: 44px; max-width: 760px; }
.sec-head h2 {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-top: 16px;
  text-wrap: balance;
}
.sec-head p {
  color: var(--ink-dim);
  margin-top: 14px;
  font-size: 16.5px;
  max-width: 640px;
  text-wrap: pretty;
}
.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  font-family: inherit;
}
.btn .ico { font-size: 17px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--accent), inset 0 1px 0 rgba(255,255,255,.25);
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost {
  background: color-mix(in oklab, var(--ink) 4%, transparent);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }

/* corner-tick panel — 替代「圆角+左边框」套路 */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--panel) 92%, var(--accent) 6%), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border: 1.5px solid var(--accent); opacity: .5;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================ NAV ============================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 66px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  position: relative;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0 5px, transparent 6px);
  box-shadow: 0 0 0 2px var(--ring-gold) inset, 0 0 18px -2px var(--accent);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--ring-purple) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring-red) 40%, transparent);
}
.brand-tt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-tt b { font-family: "Noto Serif SC", serif; font-size: 15.5px; letter-spacing: .02em; white-space: nowrap; }
.brand-tt span { font-family: "Cinzel", serif; font-size: 9.5px; letter-spacing: .22em; color: var(--ink-faint); text-transform: uppercase; white-space: nowrap; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 13.5px; color: var(--ink-dim); padding: 8px 10px; border-radius: var(--r);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.fan-badge {
  font-size: 11px; color: var(--ink-faint); border: 1px dashed var(--line-2);
  padding: 5px 10px; border-radius: 999px; letter-spacing: .02em;
}
.nav-toggle { display: none; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line-2); background: color-mix(in oklab, var(--ink) 4%, transparent);
  cursor: pointer; font-family: "Cinzel", "Noto Sans SC", serif;
}
.lang-toggle span { font-size: 12px; font-weight: 700; color: var(--ink-faint); padding: 4px 9px; border-radius: 999px; transition: all .15s; }
.lang-toggle span.on { background: var(--accent); color: #fff; }
[data-theme="light"] .lang-toggle span.on { color: #fff; }

/* ============================ HERO ============================ */
.hero { position: relative; padding: 72px 0 60px; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: .42; }
/* CSS-only spirit-ring orb (no image needed) */
.hero-orb { position: absolute; right: -20%; top: 50%; transform: translateY(-50%); width: 620px; height: 620px; max-width: 64vw; }
.hero-orb i {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 2px solid var(--rc);
  box-shadow: 0 0 40px -8px var(--rc), inset 0 0 30px -10px var(--rc);
  animation: spin var(--sp, 40s) linear infinite;
}
.hero-orb i:nth-child(1){ width: 100%; height: 100%; --sp: 60s; }
.hero-orb i:nth-child(2){ width: 76%; height: 76%; --sp: 46s; animation-direction: reverse; border-style: dashed; }
.hero-orb i:nth-child(3){ width: 54%; height: 54%; --sp: 38s; }
.hero-orb i:nth-child(4){ width: 34%; height: 34%; --sp: 30s; animation-direction: reverse; }
.hero-orb i:nth-child(5){ width: 17%; height: 17%; --sp: 24s; box-shadow: 0 0 70px 6px var(--rc), inset 0 0 30px -4px var(--rc); }
.hero-orb::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6%; height: 6%; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 90px 30px var(--accent-soft); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-orb i { animation: none; } }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in oklab, var(--bg) 80%, transparent) 46%, transparent 86%),
    linear-gradient(0deg, var(--bg) 1%, transparent 34%);
}
.hero-in { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.hero-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 44px; align-items: center; }
.hero-copy { max-width: 640px; min-width: 0; }
/* embedded trailer */
.hero-media { min-width: 0; }
.hero-media-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.watch-link { font-size: 12.5px; font-weight: 600; color: var(--ink-dim); white-space: nowrap; transition: color .15s; }
.watch-link:hover { color: var(--accent); }
.hero-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: #000; border: 1px solid var(--line-2);
  box-shadow: var(--shadow), 0 0 70px -22px var(--accent), inset 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent);
}
.hero-video::before, .hero-video::after {
  content: ""; position: absolute; width: 16px; height: 16px; z-index: 3; pointer-events: none;
  border: 2px solid var(--accent); opacity: .7;
}
.hero-video::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.hero-video::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.hero-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.live-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 14px; border-radius: 999px;
  background: color-mix(in oklab, var(--ring-red) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--ring-red) 45%, transparent);
  color: #ffd2d8;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ring-red);
  box-shadow: 0 0 0 0 var(--ring-red); animation: pulse 1.8s infinite; }
[data-theme="light"] .live-pill { color: #9e1b2f; background: color-mix(in oklab, var(--ring-red) 24%, #fff);
  border-color: color-mix(in oklab, var(--ring-red) 55%, transparent); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in oklab,var(--ring-red) 70%,transparent)} 70%{box-shadow:0 0 0 9px transparent} 100%{box-shadow:0 0 0 0 transparent} }
.hero h1 {
  font-family: "Noto Serif SC", serif; font-weight: 900;
  font-size: clamp(34px, 4.2vw, 58px); line-height: 1.04; letter-spacing: .005em;
  margin: 18px 0 6px; text-wrap: balance;
}
.hero-title {
  font-family: "Noto Serif SC", serif; font-weight: 800;
  font-size: clamp(23px, 2.5vw, 36px); line-height: 1.1; letter-spacing: .01em;
  margin: 4px 0 4px; white-space: nowrap;
}
.hero-title .wiki { color: var(--accent); font-weight: 700; font-style: italic; }
@media (max-width: 460px) { .hero-title { white-space: normal; font-size: 24px; } }
.hero h1 .glow { color: var(--accent); text-shadow: 0 0 36px var(--accent-soft); }
.hero .subtitle { font-family: "Cinzel", serif; letter-spacing: .24em; font-size: 14px; color: var(--ink-dim); text-transform: uppercase; }
.hero .lede { color: var(--ink-dim); font-size: 17.5px; margin: 18px 0 28px; max-width: 560px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 480px; }
.hero-meta div { display: flex; flex-direction: column; gap: 3px; }
.hero-meta .k { font-family: "Cinzel", serif; font-size: 10.5px; letter-spacing: .18em; color: var(--ink-faint); text-transform: uppercase; }
.hero-meta .v { font-weight: 700; font-size: 15px; }

/* ============================ ONBOARDING / 从这里开始 ============================ */
#start { background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--accent) 4%, transparent)); }
.start-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step {
  position: relative; padding: 24px 20px 22px; min-height: 210px;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .2s;
}
.step:hover { transform: translateY(-4px); border-color: var(--accent); }
.step .num {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 13px;
  color: var(--bg); background: var(--accent);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 16px;
  box-shadow: 0 0 18px -4px var(--accent);
}
[data-theme="light"] .step .num { color: #fff; }
.step h3 { font-family: "Noto Serif SC", serif; font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--ink-dim); flex: 1; text-wrap: pretty; }
.step .go { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 14px; display: inline-flex; gap: 6px; align-items: center; }
.step:hover .go { gap: 10px; }
.step-line { position: absolute; top: 39px; right: -8px; width: 16px; height: 1px; background: var(--line-2); z-index: 2; }

/* ============================ SYSTEMS ============================ */
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sys-card { padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 12px; transition: transform .18s, border-color .2s; }
.sys-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.sys-ico {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  position: relative;
}
.sys-card h3 { font-family: "Noto Serif SC", serif; font-size: 21px; font-weight: 700; }
.sys-card .tag { font-family: "Cinzel", serif; font-size: 10px; letter-spacing: .16em; color: var(--ink-faint); text-transform: uppercase; }
.sys-card p { font-size: 14px; color: var(--ink-dim); text-wrap: pretty; }
.sys-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.sys-card li { font-size: 13.5px; color: var(--ink-dim); padding-left: 16px; position: relative; }
.sys-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---- 魂环色谱 feature ---- */
.ring-feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; margin-top: 22px; padding: 34px; }
.ring-stage { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; min-height: 200px; position: relative; }
.soul-ring {
  width: 86px; height: 86px; border-radius: 50%; margin: 0 -14px;
  border: 7px solid var(--rc);
  box-shadow: 0 0 24px -2px var(--rc), inset 0 0 12px -2px var(--rc);
  position: relative; animation: float 4s ease-in-out infinite;
}
.soul-ring:nth-child(2){ animation-delay: .4s } .soul-ring:nth-child(3){ animation-delay: .8s }
.soul-ring:nth-child(4){ animation-delay: 1.2s } .soul-ring:nth-child(5){ animation-delay: 1.6s }
@keyframes float { 0%,100%{transform: translateY(0)} 50%{transform: translateY(-9px)} }
.ring-legend { display: flex; flex-direction: column; gap: 10px; }
.ring-row { display: grid; grid-template-columns: 18px 64px 1fr; align-items: center; gap: 12px; font-size: 14px; }
.ring-row .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px -1px var(--rc); }
.ring-row b { font-family: "Noto Serif SC", serif; }
.ring-row span { color: var(--ink-faint); font-size: 12.5px; }

/* ============================ RESOURCE GRID ============================ */
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.res-cell {
  padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; min-height: 132px;
  transition: transform .16s, border-color .2s, background .2s;
}
.res-cell:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--accent-soft); }
.res-cell .ri { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 18px;
  background: color-mix(in oklab, var(--ink) 6%, transparent); border: 1px solid var(--line); }
.res-cell h3 { font-size: 15.5px; font-weight: 700; }
.res-cell p { font-size: 12.5px; color: var(--ink-faint); }
.res-cell .arr { margin-top: auto; color: var(--accent); font-size: 13px; align-self: flex-start; }

/* ============================ TIER LIST ============================ */
.tier-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tier-tab {
  font-size: 13.5px; font-weight: 600; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-dim); font-family: inherit;
  transition: all .15s;
}
.tier-tab:hover { color: var(--ink); }
.tier-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="light"] .tier-tab.active { color: #fff; }
.tier-table { display: flex; flex-direction: column; gap: 10px; }
.tier-row { display: grid; grid-template-columns: 78px 1fr; align-items: stretch; gap: 14px; }
.tier-badge {
  display: grid; place-items: center; border-radius: var(--r); font-family: "Noto Serif SC", serif;
  font-weight: 900; font-size: 30px; color: #0a0d16; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
}
.tier-badge span { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tier-badge small { position: absolute; bottom: 4px; font-family: "Cinzel",serif; font-size: 8px; letter-spacing: .1em; opacity: .7; z-index: 1; }
.tier-chips { display: flex; flex-wrap: wrap; gap: 9px; align-content: center; padding: 14px 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px 8px 9px;
  border-radius: 999px; background: color-mix(in oklab, var(--ink) 5%, transparent);
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 600;
  transition: transform .14s, border-color .2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.chip .av { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--accent); font-weight: 800; }
.chip em { font-style: normal; color: var(--ink-faint); font-size: 11.5px; font-weight: 500; }
.tier-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 18px; display: flex; gap: 8px; align-items: center; }

/* ============================ NEWS ============================ */
.news-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.news-feature { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-feature .ph { height: 200px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 34%, var(--panel)), var(--panel) 78%); }
.news-feature .ph::before { content: ""; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px; border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--ring-gold) 55%, transparent);
  box-shadow: 0 0 0 18px color-mix(in oklab, var(--ring-purple) 22%, transparent), inset 0 0 60px -10px var(--accent); }
.news-feature .ph .glyph { position: absolute; left: 26px; bottom: 14px; font-family: "Noto Serif SC", serif;
  font-weight: 900; font-size: 84px; line-height: 1; color: color-mix(in oklab, var(--ink) 26%, transparent); }
.news-feature .body { padding: 24px 26px 26px; }
.news-feature h3 { font-family: "Noto Serif SC", serif; font-size: 25px; font-weight: 800; margin: 8px 0 10px; line-height: 1.18; }
.news-feature p { color: var(--ink-dim); font-size: 14.5px; }
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; transition: border-color .2s, transform .15s; }
.news-item:hover { border-color: var(--accent); transform: translateX(3px); }
.news-item .date { font-family: "Cinzel", serif; font-size: 11px; color: var(--ink-faint); white-space: nowrap; padding-top: 2px; min-width: 58px; }
.news-item h3 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.news-item p { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.kicker { display: inline-block; font-family: "Cinzel", serif; font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 3px; font-weight: 600; }
.kicker.patch { background: color-mix(in oklab, var(--ring-purple) 18%, transparent); color: var(--ring-purple); }
.kicker.event { background: color-mix(in oklab, var(--ring-gold) 18%, transparent); color: var(--ring-gold); }
.kicker.live  { background: color-mix(in oklab, var(--ring-red) 18%, transparent); color: var(--ring-red); }

/* ============================ BUILDS ============================ */
.build-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.build-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: transform .18s, border-color .2s; }
.build-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.build-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.build-card h3 { font-family: "Noto Serif SC", serif; font-size: 20px; font-weight: 800; white-space: nowrap; }
.build-card .role { font-size: 12px; color: var(--ink-faint); font-family: "Cinzel",serif; letter-spacing: .12em; text-transform: uppercase; }
.build-rings { display: flex; gap: 6px; flex: none; padding-top: 4px; }
.build-rings i { width: 17px; height: 17px; border-radius: 50%; border: 3px solid var(--rc); box-shadow: 0 0 8px -1px var(--rc); }
.build-block { border-top: 1px solid var(--line); padding-top: 12px; }
.build-block .lab { font-family: "Cinzel",serif; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 7px; }
.build-block .seq { font-size: 13.5px; color: var(--ink-dim); line-height: 1.7; }
.build-block .seq strong { color: var(--ink); font-weight: 700; }
.kv { display: flex; gap: 10px; flex-wrap: wrap; }
.kv span { font-size: 12.5px; background: color-mix(in oklab, var(--ink) 5%, transparent); padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-dim); }

/* ============================ CODEX ============================ */
.codex-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.codex-card { padding: 0; overflow: hidden; transition: transform .18s, border-color .2s;
  width: 100%; text-align: left; font-family: inherit; color: inherit; cursor: pointer; background: var(--panel); border: 1px solid var(--line); }
.codex-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.codex-card .por { aspect-ratio: 3/4; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 32%, color-mix(in oklab, var(--rc) 50%, var(--panel)) 0%, var(--panel) 72%); }
.codex-card .por::before { content: ""; position: absolute; left: 50%; top: 30%; transform: translate(-50%,-50%);
  width: 116px; height: 116px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--rc) 60%, transparent);
  box-shadow: 0 0 30px -6px var(--rc); }
.codex-card .por b { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 8%;
  font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 52px;
  color: color-mix(in oklab, var(--rc) 62%, #fff); text-shadow: 0 0 24px color-mix(in oklab, var(--rc) 50%, transparent); }
[data-theme="light"] .codex-card .por b { color: color-mix(in oklab, var(--rc) 70%, #3a2a10); }
.codex-card .por::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(0deg, var(--panel), transparent); }

/* ---- codex detail modal ---- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: color-mix(in oklab, #000 62%, transparent); backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; width: 100%; max-width: 520px; padding: 28px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 88%, var(--rc) 8%), var(--panel));
  box-shadow: var(--shadow), 0 0 80px -30px var(--rc); animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal::before, .modal::after { border-color: var(--rc); opacity: .8; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 8%, transparent); border: 1px solid var(--line-2); color: var(--ink-dim);
  cursor: pointer; font-size: 14px; transition: all .15s; }
.modal-x:hover { color: var(--ink); border-color: var(--accent); }
.modal-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.modal-por { position: relative; width: 84px; height: 110px; flex: none; border-radius: 6px; overflow: hidden;
  background: radial-gradient(circle at 50% 32%, color-mix(in oklab, var(--rc) 55%, var(--panel)) 0%, var(--panel) 74%);
  border: 1px solid color-mix(in oklab, var(--rc) 45%, transparent); display: grid; place-items: center; }
.modal-por b { font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 44px;
  color: color-mix(in oklab, var(--rc) 64%, #fff); text-shadow: 0 0 20px color-mix(in oklab, var(--rc) 50%, transparent); }
.modal-por .rarity { position: absolute; top: 6px; left: 6px; font-family: "Cinzel",serif; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; background: var(--rc); color: #0a0d16; }
.modal-head h3 { font-family: "Noto Serif SC", serif; font-size: 26px; font-weight: 800; }
.modal-head h3 .alt { font-size: 18px; font-weight: 600; color: var(--ink-dim); margin-left: 6px; }
.modal-head p { color: var(--ink-dim); font-size: 14px; margin-top: 3px; }
.infobox { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.info-row { display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row:nth-child(odd) { background: color-mix(in oklab, var(--ink) 3%, transparent); }
.info-row dt { font-family: "Cinzel", serif; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding-top: 2px; }
.info-row dd { font-size: 13.5px; color: var(--ink); text-wrap: pretty; }
.skills-block { margin-top: 18px; }
.skills-block .lab { font-family: "Cinzel",serif; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; font-weight: 600;
  background: color-mix(in oklab, var(--rc) 16%, transparent); border: 1px solid color-mix(in oklab, var(--rc) 42%, transparent);
  color: color-mix(in oklab, var(--rc) 75%, var(--ink)); }
.wiki-link { display: inline-block; margin-top: 20px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.wiki-link:hover { text-decoration: underline; }
[data-theme="light"] .modal-por b, [data-theme="light"] .skill-tag { color: color-mix(in oklab, var(--rc) 72%, #2a1e08); }
.codex-card .rarity { position: absolute; top: 8px; left: 8px; z-index: 3; font-family: "Cinzel",serif; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px; background: var(--rc); color: #0a0d16; letter-spacing: .05em; }
.codex-card .meta { padding: 12px 12px 14px; }
.codex-card h3 { font-family: "Noto Serif SC", serif; font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.codex-card h3 .alt { display: block; font-size: 12px; font-weight: 500; color: var(--ink-faint); margin-top: 1px; }
.codex-card p { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }

/* ============================ TROUBLESHOOT ============================ */
.ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font-family: inherit;
  font-size: 15.5px; font-weight: 600; padding: 16px 2px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq-q .pm { color: var(--accent); font-size: 20px; transition: transform .2s; flex: none; }
.faq-item.open .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--ink-dim); font-size: 14px; }
.faq-item.open .faq-a { max-height: 220px; }
.faq-a div { padding: 0 2px 16px; text-wrap: pretty; }
.keys { display: flex; flex-direction: column; gap: 10px; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.key-row span { font-size: 14px; color: var(--ink-dim); }
.kbd { font-family: "Cinzel", "Noto Sans SC", monospace; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 5px;
  background: color-mix(in oklab, var(--ink) 8%, transparent); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2); color: var(--ink); min-width: 34px; text-align: center; }

/* ============================ FOOTER ============================ */
.footer { border-top: 1px solid var(--line); padding: 54px 0 40px; background: var(--bg-2); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h5, .footer .foot-h { font-family: "Cinzel",serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.footer a { display: block; color: var(--ink-dim); font-size: 13.5px; padding: 5px 0; transition: color .15s; }
.footer a:hover { color: var(--accent); }
.footer .about p { color: var(--ink-dim); font-size: 13.5px; margin: 14px 0; max-width: 360px; }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-faint); line-height: 1.7; text-wrap: pretty; }
.disclaimer b { color: var(--ink-dim); }

.note-pill { font-size: 11px; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; display: inline-flex; gap: 5px; align-items: center; }
.note-pill::before { content: "ⓘ"; opacity: .7; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1120px) {
  .fan-badge { display: none; }
}
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px; gap: 2px; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid var(--line-2);
    border-radius: var(--r); color: var(--ink); cursor: pointer; font-size: 18px; }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { max-width: 720px; }
  .hero-orb { display: none; }
  .start-rail { grid-template-columns: repeat(2, 1fr); }
  .step-line { display: none; }
  .sys-grid, .build-grid { grid-template-columns: repeat(2, 1fr); }
  .res-grid { grid-template-columns: repeat(3, 1fr); }
  .codex-grid { grid-template-columns: repeat(4, 1fr); }
  .news-grid, .ts-grid, .ring-feature { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px; gap: 2px; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid var(--line-2);
    border-radius: var(--r); color: var(--ink); cursor: pointer; font-size: 18px; }
  .fan-badge { display: none; }
  .start-rail, .sys-grid, .build-grid, .res-grid { grid-template-columns: 1fr; }
  .codex-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .tier-row { grid-template-columns: 60px 1fr; }
  .hero-meta { gap: 18px; }
}

/* =========================================================================
   Production additions — a11y + Tweaks launcher & panel
   In the design tool the Tweaks panel opened via a host edit-mode message and
   its styles were injected by JS. For the live site we ship the panel styles
   here and add a visible launcher so the owner (or a visitor) can re-theme.
   ========================================================================= */

/* visible keyboard focus ring (mouse users unaffected) */
:where(a, button, .codex-card, .tier-tab, .faq-q):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r);
}

/* skip-to-content link (a11y) — hidden until focused */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 2147483647;
  transform: translateY(-160%);
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: var(--r);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.6);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid #fff; outline-offset: 2px; }

/* floating launcher — a CSS spirit-ring glyph */
.tweaks-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 2147483645;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  color: var(--accent);
  background: color-mix(in oklab, var(--panel-solid) 86%, var(--accent) 12%);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), 0 0 22px -6px var(--accent);
  transition: transform .18s ease, box-shadow .2s ease;
}
.tweaks-fab:hover { transform: translateY(-2px) rotate(20deg); box-shadow: var(--shadow), 0 0 30px -6px var(--accent); }
.tweaks-fab[hidden] { display: none; }

/* Tweaks panel — glassy floating control (matches the prototype's chrome) */
.twk-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 2147483646; width: 280px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: rgba(250,249,247,.82); color: #29261b;
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: .5px solid rgba(255,255,255,.6); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 40px rgba(0,0,0,.28);
  font: 11.5px/1.4 "Noto Sans SC", ui-sans-serif, system-ui, sans-serif; overflow: hidden;
}
.twk-panel[hidden] { display: none; }
.twk-hd { display: flex; align-items: center; justify-content: space-between; padding: 11px 8px 11px 14px; }
.twk-hd b { font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.twk-x { appearance: none; border: 0; background: transparent; color: rgba(41,38,27,.55);
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; }
.twk-x:hover { background: rgba(0,0,0,.06); color: #29261b; }
.twk-body { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.twk-sect { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(41,38,27,.5); padding: 8px 0 0; }
.twk-sect:first-child { padding-top: 0; }
.twk-row { display: flex; flex-direction: column; gap: 6px; }
.twk-lbl { color: rgba(41,38,27,.72); font-weight: 600; }

.twk-seg { position: relative; display: flex; padding: 2px; border-radius: 8px; background: rgba(0,0,0,.06); }
.twk-seg-thumb { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; background: rgba(255,255,255,.92);
  box-shadow: 0 1px 2px rgba(0,0,0,.14); transition: left .15s cubic-bezier(.3,.7,.4,1), width .15s; }
.twk-seg button { appearance: none; position: relative; z-index: 1; flex: 1; border: 0; background: transparent;
  color: inherit; font: inherit; font-weight: 600; min-height: 24px; border-radius: 6px; cursor: pointer; padding: 4px 6px; }

.twk-chips { display: flex; gap: 6px; }
.twk-chip { position: relative; appearance: none; flex: 1; min-width: 0; height: 46px; padding: 0; border: 0;
  border-radius: 6px; overflow: hidden; cursor: pointer;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.twk-chip:hover { transform: translateY(-1px); box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.12); }
.twk-chip[data-on="1"] { box-shadow: 0 0 0 1.5px rgba(0,0,0,.85), 0 2px 6px rgba(0,0,0,.15); }
.twk-chip svg { position: absolute; top: 6px; left: 6px; width: 13px; height: 13px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }

@media (max-width: 680px) {
  .twk-panel { width: calc(100vw - 32px); }
}
