:root {
  --bg: #070a0d;
  --bg-2: #0a0f13;
  --panel: #0d1419;
  --panel-2: #101920;
  --panel-3: #14212a;
  --line: #1e2c35;
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #e9eee9;
  --muted: #8d9da3;
  --muted-2: #66757c;
  --accent: #ff7a2f;
  --accent-2: #ffb347;
  --accent-soft: rgba(255, 122, 47, 0.12);
  --teal: #41d6c3;
  --gold: #ffd166;
  --red: #ff5c6c;
  --green: #7ee081;
  --violet: #a98bff;
  --blue: #5bb8ff;
  --radius: 18px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 84% -8%, rgba(255, 122, 47, 0.16), transparent 62%),
    radial-gradient(900px 600px at -6% 18%, rgba(65, 214, 195, 0.075), transparent 60%),
    radial-gradient(760px 520px at 52% 108%, rgba(169, 139, 255, 0.065), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 18px 32px, rgba(255, 255, 255, 0.45), transparent 1px),
    radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, 0.3), transparent 1px),
    radial-gradient(1.5px 1.5px at 220px 170px, rgba(255, 179, 71, 0.45), transparent 1.5px),
    radial-gradient(1px 1px at 80px 210px, rgba(65, 214, 195, 0.35), transparent 1px);
  background-size: 280px 280px;
}

body.modal-open, body.menu-open { overflow: hidden; }

::selection { color: #170a02; background: var(--accent); }

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 400;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #180a02;
  font-weight: 800;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 14px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
  height: 74px;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 10, 13, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 47, 0.55), transparent);
  opacity: 0.55;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 122, 47, 0.4);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 122, 47, 0.16), rgba(255, 122, 47, 0.02));
  box-shadow: inset 0 0 18px rgba(255, 122, 47, 0.08);
  color: var(--accent);
}
.brand-mark svg { width: 30px; height: 30px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.04; }
.brand-text strong { font-size: 1rem; letter-spacing: 0.05em; }
.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.78rem;
  transition: 0.2s ease;
}
.icon-btn:hover { border-color: rgba(255, 209, 102, 0.5); color: var(--gold); }
.icon-btn span[aria-hidden] { font-size: 0.92rem; }
.icon-btn.is-on, .icon-btn[aria-pressed="true"] {
  border-color: rgba(255, 209, 102, 0.55);
  color: var(--gold);
  background: rgba(255, 209, 102, 0.08);
}

.fav-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-align: center;
}
.fav-count.has-fav { background: var(--gold); color: #211703; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff9a4d);
  color: #1a0a02;
  box-shadow: 0 10px 30px rgba(255, 122, 47, 0.16);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 122, 47, 0.26); }
.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 122, 47, 0.45); background: rgba(255, 122, 47, 0.07); }
.btn-small { height: 36px; padding: 0 13px; font-size: 0.78rem; border-radius: 9px; }
.btn.is-fav { border-color: rgba(255, 209, 102, 0.55); color: var(--gold); }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.menu-btn span { display: block; height: 1.5px; background: var(--text); transition: 0.2s ease; }
.menu-btn.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  position: absolute;
  top: 74px;
  left: 12px;
  right: 12px;
  z-index: 70;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0a0f13;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  isolation: isolate;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  font-weight: 600;
}
.mobile-nav a:hover { background: rgba(255, 122, 47, 0.08); }
.mobile-nav a span { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 7, 9, 0.74);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px 78px;
  min-height: 660px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 12px;
  border: 1px solid rgba(65, 214, 195, 0.22);
  border-radius: 999px;
  background: rgba(65, 214, 195, 0.05);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(65, 214, 195, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(65, 214, 195, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(65, 214, 195, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 214, 195, 0); }
}

.wordmark {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(0.66rem, 1.1vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.36em;
}

.hero h1 {
  font-size: clamp(2.7rem, 5.2vw, 4.55rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.hero-title { display: block; }
.hero-title .title-tail { display: block; }
.hero-title .accent {
  position: relative;
  display: inline-block;
  color: var(--accent);
  margin: 0 0.04em 0 0.1em;
}
.hero-title .accent::after {
  content: "";
  position: absolute;
  left: 2%; right: 2%; bottom: 4%;
  height: 8%;
  border-radius: 4px;
  background: rgba(255, 122, 47, 0.18);
  z-index: -1;
}

.hero-lead {
  max-width: 580px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}
.hero-lead strong { color: var(--text); font-weight: 700; }

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 580px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-stats div { padding-left: 16px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-stats dd {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}

.hero-note {
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 0.74rem;
}
.hero-note span { color: var(--accent); margin-right: 4px; }

.hero-visual {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
}

.planet {
  position: absolute;
  width: min(420px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 179, 71, 0.2), transparent 45%),
    radial-gradient(circle at 62% 68%, rgba(65, 214, 195, 0.12), transparent 55%),
    radial-gradient(circle at 45% 45%, #1a252c 0%, #0d151a 58%, #070a0d 72%);
  border: 1px solid rgba(255, 122, 47, 0.15);
  box-shadow: inset -30px -20px 80px rgba(0, 0, 0, 0.7), 0 0 90px rgba(255, 122, 47, 0.07);
}
.planet::before {
  content: "";
  position: absolute;
  inset: -18% -6%;
  border: 1px solid rgba(255, 122, 47, 0.22);
  border-radius: 50%;
  transform: rotate(-22deg) scaleY(0.32);
  box-shadow: 0 0 28px rgba(255, 122, 47, 0.08);
}
.planet::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 18px, rgba(255, 255, 255, 0.018) 19px 20px);
  opacity: 0.7;
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(65, 214, 195, 0.16);
  border-radius: 50%;
}
.orbit-a { width: 480px; height: 480px; animation: spin 60s linear infinite; }
.orbit-b { width: 600px; height: 600px; border-color: rgba(255, 122, 47, 0.1); animation: spin 90s linear infinite reverse; }
.orbit::after {
  content: "";
  position: absolute;
  top: 50%; left: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}
@keyframes spin { to { transform: rotate(360deg); } }

.signal-board {
  position: relative;
  z-index: 2;
  width: min(480px, 100%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(22, 34, 42, 0.94), rgba(9, 14, 18, 0.94));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: rotate(-1.2deg);
  overflow: hidden;
}

.board-head, .board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}
.board-head { padding: 2px 2px 12px; }
.board-head span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.board-head i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.board-foot {
  margin-top: 12px;
  padding: 12px 2px 2px;
  border-top: 1px solid var(--line-soft);
  letter-spacing: 0.04em;
}
.board-foot span:first-child { color: var(--gold); }
.board-code { color: var(--muted-2); }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.signal-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
  border-radius: 10px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c) 13%, transparent), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}
.signal-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--c) 10%, transparent));
}
.signal-tile b {
  position: relative;
  z-index: 1;
  color: var(--c);
  font-size: clamp(0.85rem, 2vw, 1.25rem);
  font-weight: 800;
  text-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent);
}
.signal-tile i {
  position: absolute;
  right: 5px; bottom: 3px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.46rem;
  font-style: normal;
}

.board-scan {
  position: absolute;
  left: 0; right: 0;
  top: -10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(65, 214, 195, 0.65), transparent);
  box-shadow: 0 0 18px rgba(65, 214, 195, 0.5);
  animation: scan 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scan {
  0%, 100% { top: 8%; opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  85% { top: 92%; opacity: 0; }
}

.float-chip {
  position: absolute;
  z-index: 3;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 16, 20, 0.9);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: float 6s ease-in-out infinite;
  white-space: nowrap;
}
.chip-one { top: 8%; right: 0; color: var(--accent); border-color: rgba(255, 122, 47, 0.35); }
.chip-two { bottom: 10%; left: -2%; color: var(--teal); border-color: rgba(65, 214, 195, 0.3); animation-delay: -2s; }
.chip-three { bottom: 30%; right: -3%; color: var(--gold); border-color: rgba(255, 209, 102, 0.3); animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ============ Sections ============ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 78px 24px;
  border-top: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}
.section-head > div { max-width: 700px; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section h2 {
  font-size: clamp(1.75rem, 3.1vw, 2.45rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============ Quick picks ============ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  text-align: left;
  overflow: hidden;
  transition: 0.22s ease;
}
.quick-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: var(--c);
  opacity: 0.75;
}
.quick-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.quick-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px; height: 50px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  color: var(--c);
  font-size: 1.25rem;
  font-weight: 800;
}
.quick-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.quick-top { display: flex; align-items: baseline; gap: 7px; }
.quick-top strong { font-size: 0.98rem; }
.quick-top em { color: var(--muted-2); font-family: var(--mono); font-size: 0.58rem; font-style: normal; }
.quick-build { color: var(--accent-2); font-size: 0.7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-tags { display: flex; gap: 4px; }
.quick-tags i {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 0.56rem;
  font-style: normal;
}
.quick-arrow { margin-left: auto; color: var(--muted-2); transition: 0.2s ease; }
.quick-card:hover .quick-arrow { color: var(--c); transform: translateX(3px); }

/* ============ Toolbars ============ */
.toolbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 20, 25, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-box:focus-within {
  border-color: rgba(255, 122, 47, 0.55);
  background: rgba(255, 122, 47, 0.04);
}
.search-box svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.8;
  stroke-linecap: round;
  flex: 0 0 auto;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.86rem;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  transition: 0.18s ease;
}
.chip i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--chip-color, var(--muted-2));
}
.chip span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.6rem;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.chip[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--chip-color, var(--accent)) 55%, transparent);
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 9%, transparent);
  color: var(--text);
}
.chip[aria-pressed="true"] span { color: var(--text); }

.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.select-wrap { position: relative; display: inline-flex; }
.select-wrap select {
  height: 31px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.72rem;
  appearance: none;
  outline: 0;
}
.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 0.6rem;
  pointer-events: none;
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.segmented button {
  height: 25px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}
.segmented button[aria-pressed="true"] {
  background: rgba(255, 122, 47, 0.14);
  color: var(--accent-2);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px 12px;
}
.results-bar p { color: var(--muted); font-size: 0.78rem; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 0.68rem; }
.legend-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }

/* ============ Survivor cards ============ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.char-wrap { position: relative; min-width: 0; }

.char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  height: 100%;
  min-height: 292px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--c) 5%, var(--panel-2)) 0%, var(--panel) 68%);
  text-align: left;
  overflow: hidden;
  transition: 0.22s ease;
}
.char-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  filter: blur(20px);
  pointer-events: none;
}
.char-card::after {
  content: "";
  position: absolute;
  top: 0; left: 16px;
  width: 32px; height: 2px;
  background: var(--c);
  opacity: 0.8;
}
.char-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

.char-top { display: flex; align-items: center; justify-content: space-between; padding-right: 24px; }
.char-num { color: var(--muted-2); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; }

.diff-pips { display: inline-flex; gap: 3px; }
.diff-pips i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.diff-pips i.on { background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 50%, transparent); }

.char-main { display: flex; align-items: center; gap: 13px; }
.char-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px; height: 58px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--c) 18%, transparent), color-mix(in srgb, var(--c) 3%, transparent));
  color: var(--c);
  font-size: 1.45rem;
  font-weight: 800;
  text-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent);
}
.char-id { display: flex; flex-direction: column; min-width: 0; }
.char-id strong { font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.01em; }
.char-id em {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.char-roles i {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line));
  border-radius: 4px;
  color: color-mix(in srgb, var(--c) 70%, var(--text));
  font-size: 0.58rem;
  font-style: normal;
}

.char-build {
  padding-left: 8px;
  border-left: 2px solid color-mix(in srgb, var(--c) 50%, transparent);
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.5;
}

.char-items { display: flex; flex-wrap: wrap; gap: 4px; }
.core-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.core-chip i { width: 4px; height: 4px; border-radius: 50%; background: var(--t); flex: 0 0 auto; }

.char-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 0.6rem;
}
.char-cta { color: var(--muted); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.08em; }
.char-cta i { color: var(--c); font-style: normal; margin-left: 2px; transition: 0.2s ease; }
.char-card:hover .char-cta { color: var(--text); }
.char-card:hover .char-cta i { transform: translateX(3px); }

.fav-btn {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(7, 10, 13, 0.8);
  color: var(--muted-2);
  font-size: 0.66rem;
  line-height: 1;
  transition: 0.18s ease;
}
.fav-btn:hover { color: var(--gold); border-color: rgba(255, 209, 102, 0.5); transform: scale(1.1); }
.fav-btn.is-fav { color: var(--gold); border-color: rgba(255, 209, 102, 0.55); background: rgba(255, 209, 102, 0.12); }

.empty-state {
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}
.empty-glyph {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 1.4rem;
}
.empty-state h3 { font-size: 1.15rem; }
.empty-state p { margin-top: 6px; color: var(--muted); font-size: 0.84rem; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ============ Items ============ */
.item-toolbar { padding: 14px; }
.item-mode-row { display: flex; gap: 10px; align-items: center; }
.item-search { flex: 1; }
.item-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.item-count { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }

.item-data-note {
  margin: 14px 2px 18px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--t);
  border-radius: 12px;
  background: linear-gradient(150deg, var(--panel-2), var(--panel));
  transition: 0.2s ease;
}
.item-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--t) 38%, var(--line));
  border-left-color: var(--t);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.item-glyph {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid color-mix(in srgb, var(--t) 28%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--t) 8%, transparent);
  color: var(--t);
  font-size: 0.9rem;
  font-weight: 800;
}
.rate {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}
.rate-s { color: #1a1203; background: var(--gold); border-color: var(--gold); }
.rate-a { color: var(--teal); border-color: rgba(65, 214, 195, 0.4); background: rgba(65, 214, 195, 0.08); }
.rate-b { color: var(--blue); border-color: rgba(91, 184, 255, 0.35); background: rgba(91, 184, 255, 0.07); }
.rate-c { color: var(--muted); }

.item-card h4 {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
}
.item-card h4 em {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.item-effect { margin-top: 8px; color: #cbd5d3; font-size: 0.76rem; line-height: 1.65; }
.item-note {
  margin-top: 6px;
  padding-left: 8px;
  border-left: 1px solid color-mix(in srgb, var(--t) 25%, transparent);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.6;
}
.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted-2);
  font-size: 0.56rem;
}
.tier-tag { color: color-mix(in srgb, var(--t) 80%, var(--text)); white-space: nowrap; }
.item-stack { text-align: right; }
.item-empty {
  grid-column: 1 / -1;
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

/* ============ Routes ============ */
.route-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.route-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
  transition: 0.2s ease;
}
.route-tab span {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-bottom: 5px;
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  border-radius: 8px;
  color: var(--c);
  font-size: 0.78rem;
  font-weight: 800;
}
.route-tab strong { font-size: 0.8rem; }
.route-tab em {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.48rem;
  font-style: normal;
  letter-spacing: 0.08em;
}
.route-tab:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.route-tab[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, var(--panel)), var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 12%, transparent);
}

.route-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 20, 25, 0.72);
}

.route-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.route-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 62px; height: 62px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--c) 9%, transparent);
  color: var(--c);
  font-size: 1.4rem;
  font-weight: 800;
}
.route-intro-text { flex: 1; min-width: 0; }
.route-en { color: var(--c); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.18em; }
.route-intro h3 { margin-top: 2px; font-size: 1.35rem; }
.route-intro p { max-width: 780px; margin-top: 4px; color: var(--muted); font-size: 0.82rem; line-height: 1.75; }
.route-count { text-align: right; }
.route-count strong { display: block; color: var(--c); font-family: var(--mono); font-size: 1.8rem; line-height: 1; }
.route-count span { color: var(--muted-2); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em; }

.route-timeline { padding: 18px 0 4px; }
.route-step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
}
.step-rail { position: relative; display: flex; justify-content: center; }
.step-rail::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--c) 20%, transparent);
}
.route-step:first-child .step-rail::before { top: 18px; }
.route-step:last-child .step-rail::before { bottom: calc(100% - 18px); }
.step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--c);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
}
.step-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: 0.2s ease;
}
.step-card:hover { border-color: color-mix(in srgb, var(--c) 30%, var(--line)); }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-tag { color: var(--c); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; }
.step-boss { color: var(--muted-2); font-size: 0.58rem; white-space: nowrap; }
.step-card h4 { margin-top: 4px; font-size: 0.98rem; }
.step-card h4 em { margin-left: 6px; color: var(--muted-2); font-family: var(--mono); font-size: 0.58rem; font-style: normal; font-weight: 400; }
.step-card p { margin-top: 4px; color: var(--muted); font-size: 0.78rem; line-height: 1.7; }
.route-tagline { padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 0.7rem; text-align: right; }

.hidden-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 38px 0 16px;
}
.hidden-head h3 { font-size: 1.25rem; }
.hidden-head p:last-child { max-width: 420px; color: var(--muted); font-size: 0.78rem; text-align: right; }

.hidden-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hidden-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
  transition: 0.2s ease;
}
.hidden-card:hover { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); transform: translateY(-2px); }
.hidden-top { display: flex; align-items: center; gap: 10px; }
.hidden-glyph {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  color: var(--c);
  font-size: 0.92rem;
  font-weight: 800;
}
.hidden-top h4 { font-size: 0.9rem; }
.hidden-top em { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 0.54rem; font-style: normal; }
.hidden-card p { margin-top: 8px; color: var(--muted); font-size: 0.72rem; line-height: 1.65; }
.hidden-how { display: flex; gap: 7px; }
.hidden-how span {
  flex: 0 0 auto;
  padding: 0 5px;
  border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line));
  border-radius: 3px;
  color: var(--c);
  font-size: 0.56rem;
  height: 18px;
  line-height: 16px;
}
.hidden-note { padding-left: 8px; border-left: 1px solid color-mix(in srgb, var(--c) 25%, transparent); color: var(--muted-2) !important; }

/* ============ Mechanics ============ */
.mech-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mech-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
}
.mech-glyph {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 9%, transparent);
  color: var(--c);
  font-size: 0.9rem;
  font-weight: 800;
}
.mech-card h3 { font-size: 0.92rem; }
.mech-card p { margin-top: 5px; color: var(--muted); font-size: 0.74rem; line-height: 1.7; }
.mech-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.mech-tags span {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted-2);
  font-size: 0.52rem;
}

.formula {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(700px 200px at 15% 0%, rgba(255, 122, 47, 0.06), transparent 60%),
    var(--panel);
}
.formula-head h3 { font-size: 1.2rem; }
.formula-code {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.formula-code .fx { color: var(--accent); font-weight: 700; }
.formula-code .op { color: var(--muted-2); }
.formula-code .term { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); white-space: nowrap; }
.formula-code .term.hl { border-color: rgba(255, 209, 102, 0.3); color: var(--gold); }
.formula-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.formula-grid span { color: var(--accent); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.12em; }
.formula-grid h4 { margin-top: 4px; font-size: 0.88rem; }
.formula-grid p { margin-top: 4px; color: var(--muted); font-size: 0.72rem; line-height: 1.7; }

.rhythm {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.rhythm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.rhythm-head h3 { font-size: 1.2rem; }
.rhythm-head p { color: var(--muted); font-size: 0.76rem; text-align: right; }
.rhythm-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.rhythm-step { position: relative; padding-right: 8px; }
.rhythm-time { color: var(--accent-2); font-family: var(--mono); font-size: 0.66rem; }
.rhythm-dot {
  display: block;
  width: 7px; height: 7px;
  margin: 7px 0 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 47, 0.1);
}
.rhythm-step h4 { font-size: 0.82rem; }
.rhythm-step p { margin-top: 3px; color: var(--muted); font-size: 0.68rem; line-height: 1.65; }

.shrine-block { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.shrine-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 20px; margin-bottom: 14px; }
.shrine-head .section-kicker { flex-basis: 100%; margin-bottom: 2px; }
.shrine-head h3 { font-size: 1.2rem; margin-right: auto; }
.shrine-head .shrine-desc { max-width: 380px; color: var(--muted); font-size: 0.76rem; text-align: right; }
.table-wrap { overflow-x: auto; }
.shrine-table { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.shrine-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  white-space: nowrap;
}
.shrine-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); vertical-align: top; }
.shrine-table tbody tr:hover { background: rgba(255, 122, 47, 0.035); }
.shrine-table td:first-child { min-width: 130px; }
.shrine-table td:first-child strong { display: block; color: var(--text); font-size: 0.78rem; }
.shrine-table td:first-child em { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 0.5rem; font-style: normal; }
.shrine-table td:nth-child(2) { white-space: nowrap; color: var(--accent-2); }
.shrine-table td:nth-child(3) { white-space: nowrap; }
.shrine-table td:last-child { min-width: 240px; line-height: 1.65; }

/* ============ Unlocks ============ */
.unlock-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.unlock-summary-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}
.unlock-summary-card > span { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--c); opacity: 0.8; }
.unlock-summary-card h4 { font-size: 0.88rem; }
.unlock-summary-card p { margin-top: 5px; color: var(--muted); font-size: 0.72rem; line-height: 1.7; }

.unlock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.unlock-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  transition: 0.18s ease;
}
.unlock-row:hover { border-color: color-mix(in srgb, var(--c) 32%, var(--line)); background: var(--panel-2); }
.unlock-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
  border-radius: 9px;
  color: var(--c);
  font-size: 0.8rem;
  font-weight: 800;
}
.unlock-name { flex: 1; min-width: 0; }
.unlock-name h4 { font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unlock-name h4 em { color: var(--muted-2); font-family: var(--mono); font-size: 0.54rem; font-style: normal; font-weight: 400; }
.unlock-name p { color: var(--muted); font-size: 0.68rem; line-height: 1.5; }
.unlock-dlc {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 0.52rem;
  white-space: nowrap;
}

/* ============ About & footer ============ */
.about { max-width: 1280px; margin: 0 auto; padding: 20px 24px 78px; }
.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(255, 122, 47, 0.08), transparent 60%),
    linear-gradient(150deg, var(--panel-2), var(--panel));
}
.about-card h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.25; }
.about-card p { max-width: 720px; margin-top: 12px; color: var(--muted); font-size: 0.84rem; line-height: 1.85; }
.about-card p a { color: var(--accent); border-bottom: 1px solid rgba(255, 122, 47, 0.35); }
.about-card p a:hover { color: var(--accent-2); }
.about-fine { color: var(--muted-2) !important; font-size: 0.72rem !important; }
.about-meta { display: flex; flex-direction: column; gap: 9px; }
.about-meta div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.about-meta span { color: var(--muted-2); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; }
.about-meta strong { color: var(--text); font-size: 0.76rem; text-align: right; }

.site-footer { border-top: 1px solid var(--line); background: rgba(5, 8, 10, 0.6); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px;
}
.footer-brand .brand-mark { width: 36px; height: 36px; }
.footer-brand .brand-mark svg { width: 25px; height: 25px; }
.footer-brand .brand-text strong { font-size: 0.86rem; }
.footer-brand .brand-text small { font-size: 0.48rem; }
.footer-inner > p { color: var(--muted-2); font-size: 0.7rem; }
.footer-links { display: flex; gap: 16px; margin-left: auto; }
.footer-links a { color: var(--muted); font-size: 0.72rem; }
.footer-links a:hover { color: var(--accent); }

/* ============ Modal ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 8, 0.8);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: #0a1015;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  transform: translateY(14px) scale(0.99);
  transition: transform 0.22s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.modal.is-open .modal-panel { transform: none; }
.modal-panel:focus { outline: none; }
.modal-panel::-webkit-scrollbar { width: 10px; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid #0a1015; }

.modal-top {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 16, 21, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.modal-index { color: var(--muted-2); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; }
.modal-nav { display: flex; gap: 6px; }
.modal-close { color: var(--text); }

.modal-body { padding: 24px; }

.m-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.m-glyph {
  display: grid;
  place-items: center;
  width: 92px; height: 92px;
  border: 1px solid color-mix(in srgb, var(--c) 36%, transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    color-mix(in srgb, var(--c) 6%, transparent);
  color: var(--c);
  font-size: 2.3rem;
  font-weight: 800;
  text-shadow: 0 0 30px color-mix(in srgb, var(--c) 35%, transparent);
}
.m-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}
.m-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.m-title h2 em { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-style: normal; font-weight: 400; letter-spacing: 0.02em; }
.m-title > p { max-width: 620px; margin-top: 7px; color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag-row span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.6rem;
}
.tag-row .tag-build { border-color: color-mix(in srgb, var(--c) 24%, var(--line)); color: var(--c); }
.m-actions { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }

.m-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 26px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.m-stats div { padding: 0 14px; border-left: 1px solid var(--line); min-width: 0; }
.m-stats div:first-child { padding-left: 0; border-left: 0; }
.m-stats span { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.12em; }
.m-stats strong { display: block; margin-top: 2px; font-family: var(--mono); font-size: 1rem; }
.m-unlock-text { font-family: var(--font) !important; font-size: 0.68rem !important; line-height: 1.45; color: var(--muted); }

.m-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 30px; align-items: start; }
.m-section { margin-bottom: 28px; }
.m-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.m-section h3 span { color: var(--accent); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.08em; }
.m-sub { margin: 16px 0 8px; color: var(--muted-2); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; font-weight: 500; }

.skill-list { display: flex; flex-direction: column; gap: 9px; }
.skill-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 11px; }
.skill-slot {
  display: grid;
  place-items: center;
  height: 24px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
}
.skill-row h4 { font-size: 0.8rem; }
.skill-row h4 em { color: var(--muted-2); font-size: 0.66rem; font-style: normal; font-weight: 400; }
.skill-row p { margin-top: 2px; color: var(--muted); font-size: 0.72rem; line-height: 1.65; }

.core-list { display: flex; flex-direction: column; gap: 2px; }
.core-item {
  display: grid;
  grid-template-columns: 3px 168px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.core-item-tier { width: 3px; height: 100%; min-height: 26px; border-radius: 2px; background: var(--t); }
.core-item-name { font-size: 0.76rem; font-weight: 700; line-height: 1.35; }
.core-item-name em { display: block; margin-top: 1px; color: var(--muted-2); font-family: var(--mono); font-size: 0.5rem; font-style: normal; font-weight: 400; }
.core-item-why { color: var(--muted); font-size: 0.7rem; line-height: 1.55; }

.alt-list { display: flex; flex-wrap: wrap; gap: 5px; }
.alt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.62rem;
}
.alt-chip i { width: 4px; height: 4px; border-radius: 50%; background: var(--t); }

.equip-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.equip-line span { color: var(--muted-2); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.1em; }
.equip-line strong { color: var(--accent-2); font-size: 0.68rem; text-align: right; }

.priority-bars { display: flex; flex-direction: column; gap: 8px; }
.priority-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 20px; gap: 10px; align-items: center; }
.priority-row > span { color: var(--muted); font-size: 0.68rem; }
.priority-track { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.priority-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c)); }
.priority-row b { color: var(--c); font-family: var(--mono); font-size: 0.62rem; font-weight: 600; text-align: right; }
.m-fine { margin-top: 10px; color: var(--muted-2); font-size: 0.62rem; line-height: 1.6; }

.phase { padding: 0 0 12px 12px; border-left: 1px solid var(--line); margin-bottom: 12px; }
.phase span { color: var(--accent); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em; }
.phase h4 { margin-top: 2px; font-size: 0.78rem; }
.phase p { margin-top: 3px; color: var(--muted); font-size: 0.71rem; line-height: 1.65; }
.m-copy { color: var(--muted); font-size: 0.74rem; line-height: 1.7; }
.tip-list { display: flex; flex-direction: column; gap: 7px; }
.tip-list li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}
.tip-list li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); font-size: 0.6rem; }
.m-warn {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 92, 108, 0.22);
  border-radius: 9px;
  background: rgba(255, 92, 108, 0.05);
}
.m-warn span { color: var(--red); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.12em; }
.m-warn p { margin-top: 3px; color: var(--muted); font-size: 0.7rem; line-height: 1.6; }

/* ============ Toast / to-top ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 28, 0.96);
  color: var(--text);
  font-size: 0.74rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 20, 25, 0.9);
  color: var(--muted);
  font-family: var(--mono);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: rgba(255, 122, 47, 0.45); }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding-top: 60px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 520px; margin-top: 10px; }
  .char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hidden-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-header {
    gap: 16px;
    height: 68px;
    background: #070a0d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .site-nav { display: none; }
  .menu-btn { display: flex; }
  .mobile-nav { top: 68px; }
  .header-actions #random-top { display: none; }
  .section { padding: 62px 20px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-desc { max-width: 640px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unlock-grid { grid-template-columns: 1fr; }
  .unlock-summary { grid-template-columns: 1fr; }
  .formula-grid { grid-template-columns: 1fr; }
  .rhythm-line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .about-card { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { flex-wrap: wrap; gap: 16px; }
  .footer-links { margin-left: 0; }
  .modal { padding: 0; }
  .modal-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .m-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .m-stats div:nth-child(4) { border-left: 0; padding-left: 0; }
  .m-stats div:nth-child(5) { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  .about { padding: 10px 20px 60px; }
}

@media (max-width: 700px) {
  .hero { padding: 44px 18px 60px; }
  .hero-title .title-tail { display: block; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .float-chip { display: none; }
  .char-card { min-height: 0; }
  .results-bar .legend { display: none; }
  .search-box kbd { display: none; }
  .search-box input { font-size: 0.8rem; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .hero-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-visual { min-height: 430px; }
  .signal-board { width: 100%; }
  .orbit-a, .orbit-b { display: none; }
  .chip-three { display: none; }
  .section { padding: 52px 18px; }
  .toolbar-row { flex-direction: column; align-items: stretch; }
  .toolbar-right { justify-content: flex-start; }
  .item-mode-row { flex-direction: column; align-items: stretch; }
  .item-filter-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .results-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .quick-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: 1fr; }
  .hidden-grid { grid-template-columns: 1fr; }
  .hidden-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hidden-head p:last-child { text-align: left; }
  .route-panel { padding: 14px; }
  .route-intro { align-items: flex-start; }
  .route-count { display: none; }
  .route-step { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .step-boss { display: none; }
  .rhythm-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rhythm-head, .shrine-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rhythm-head p, .shrine-head .shrine-desc { text-align: left; }
  .about-card { padding: 22px; }
  .m-hero { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .m-glyph { width: 68px; height: 68px; font-size: 1.7rem; border-radius: 16px; }
  .m-actions { grid-column: 1 / -1; flex-direction: row; }
  .modal-body { padding: 16px; }
  .modal-top { padding: 8px 12px; }
  .core-item { grid-template-columns: 3px minmax(0, 1fr); }
  .core-item-why { grid-column: 2; }
  .core-item-name { font-size: 0.74rem; }
  .m-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .m-stats div:nth-child(4) { border-left: 1px solid var(--line); padding-left: 14px; }
  .m-stats div:nth-child(5) { grid-column: 1 / -1; }
  .formula-code { font-size: 0.64rem; }
}

@media (max-width: 460px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: 0.9rem; }
  .hero h1 { font-size: 2.35rem; }
  .hero-actions .btn { flex: none; }
  .float-chip { font-size: 0.48rem; }
  .chip-one { top: 2%; right: 0; }
  .char-grid { gap: 10px; }
  .route-tabs { grid-template-columns: 1fr 1fr; }
  .route-tab:last-child { grid-column: 1 / -1; }
  .m-title h2 em { display: block; margin-top: 2px; }
  .m-actions .btn { flex: 1; }
  .shrine-table { font-size: 0.68rem; }
  .shrine-table th, .shrine-table td { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
