/* ==========================================================================
   LockAxis (锁象) — 1940s Occult NYC Art Deco Design System
   Typography: ValveOccult + ValvePulp + Reaver + Radiance + Noto Serif/Sans SC
   ========================================================================== */

@font-face {
  font-family: "ValveOccult";
  src: url("./assets/fonts/ValveOccult-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "ValvePulp";
  src: url("./assets/fonts/ValvePulp-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Reaver";
  src: url("./assets/fonts/Reaver-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Reaver";
  src: url("./assets/fonts/Reaver-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Reaver";
  src: url("./assets/fonts/Reaver-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Radiance";
  src: url("./assets/fonts/Radiance-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Radiance";
  src: url("./assets/fonts/Radiance-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "ForevsDemo";
  src: url("./assets/fonts/ForevsDemo-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-void: #08070a;
  --bg-obsidian: #0d0b10;
  --bg-card: rgba(19, 16, 24, 0.84);
  --bg-card-solid: #14111a;
  --bg-elevated: #1c1824;
  --bg-hover: rgba(230, 195, 120, 0.08);

  --gold: #e6c378;
  --gold-bright: #f7e3b5;
  --gold-dim: #9e7f43;
  --gold-line: rgba(230, 195, 120, 0.24);
  --gold-line-strong: rgba(230, 195, 120, 0.52);

  --ivory: #f5ede0;
  --ash: #b4a998;
  --umber: #756b5e;

  --emerald: #3ce8a4;
  --emerald-bg: rgba(60, 232, 164, 0.13);
  --crimson: #f25c69;
  --crimson-bg: rgba(242, 92, 105, 0.13);
  --cyan: #66dcff;
  --cyan-bg: rgba(102, 220, 255, 0.13);
  --violet: #b88bff;
  --violet-bg: rgba(184, 139, 255, 0.14);
  --amber: #f5a64b;
  --amber-bg: rgba(245, 166, 75, 0.14);

  --weapon: #e8963e;
  --vitality: #55d47a;
  --spirit: #b582ff;

  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 18px 46px rgba(0, 0, 0, 0.55);
  --ease-deco: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg-void); color: var(--ivory); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Radiance", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-void);
  color: var(--ivory);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-occult { font-family: "ValveOccult", "Reaver", "Noto Serif CJK SC", "Songti SC", serif; letter-spacing: 0.08em; }
.font-editorial { font-family: "Reaver", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif; }
.font-pulp { font-family: "ValvePulp", "ForevsDemo", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.04em; }
.font-num { font-family: "Radiance", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* Main Page Scrollbar (subtle low-profile) */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #09080c; }
::-webkit-scrollbar-thumb { background: rgba(180, 165, 140, 0.24); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(230, 195, 120, 0.45); }

body.overlay-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* ================= AMBIENT 1940s ART DECO BACKDROP ================= */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 55% at 15% 0%, rgba(230, 195, 120, 0.085), transparent 62%),
    radial-gradient(ellipse 60% 50% at 88% 12%, rgba(102, 220, 255, 0.055), transparent 60%),
    radial-gradient(ellipse 65% 50% at 50% 100%, rgba(184, 139, 255, 0.055), transparent 65%),
    #08070a;
}
.ambient-photo {
  position: absolute;
  inset: 0;
  background: url("./assets/bg/Background_gothic.webp") center/cover no-repeat;
  opacity: 0.085;
  filter: saturate(0.45) contrast(1.18) blur(2.5px);
  transform: scale(1.04);
}
.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient-sunburst {
  position: absolute;
  top: -320px;
  left: 50%;
  width: 1400px;
  height: 1400px;
  transform: translateX(-50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(230, 195, 120, 0.028) 0deg 2deg,
    transparent 2deg 12deg
  );
  mask-image: radial-gradient(circle, rgba(0,0,0,0.8) 0%, transparent 66%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.8) 0%, transparent 66%);
  animation: slowSpin 160s linear infinite;
}
@keyframes slowSpin { from { transform: translateX(-50%) rotate(0deg); } to { transform: translateX(-50%) rotate(360deg); } }
.ambient-embers { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(5, 4, 7, 0.82) 100%);
}

/* ================= STICKY MASTHEAD & NAVIGATION ================= */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(11, 9, 14, 0.96) 0%, rgba(11, 9, 14, 0.90) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.48);
}
.masthead-top {
  max-width: 1460px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.brand-crest {
  width: 38px;
  height: 38px;
  transition: transform 0.5s var(--ease-deco);
}
.brand:hover .brand-crest { transform: rotate(45deg) scale(1.04); }
.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.05;
}
.brand-zh {
  font-size: 23px;
  font-weight: 900;
  background: linear-gradient(120deg, #fff5dc 0%, #e6c378 36%, #fff0c4 52%, #b98e3d 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.07em;
  animation: foilSheen 9s ease-in-out infinite;
}
@keyframes foilSheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.brand-dot { color: var(--gold-dim); font-size: 16px; }
.brand-en {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.14em;
}
.brand-sub {
  font-size: 10px;
  color: var(--umber);
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ash);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease-deco);
  white-space: nowrap;
}
.nav-btn .nav-num {
  font-size: 11px;
  color: var(--gold-dim);
  opacity: 0.85;
}
.nav-btn:hover {
  color: var(--ivory);
  background: rgba(230, 195, 120, 0.07);
}
.nav-btn.active {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(230, 195, 120, 0.16), rgba(230, 195, 120, 0.05));
  border-color: var(--gold-line-strong);
}
.nav-btn.active::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
.nav-btn.active .nav-num { color: var(--gold-bright); }
.nav-badge-new {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(184, 139, 255, 0.2);
  color: var(--violet);
  border: 1px solid rgba(184, 139, 255, 0.45);
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.global-search {
  position: relative;
  width: 245px;
}
.search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--gold-dim);
  pointer-events: none;
}
.global-search input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  color: var(--ivory);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.global-search input:focus {
  border-color: var(--gold);
  background: rgba(230, 195, 120, 0.07);
}
.global-search input::placeholder { color: var(--umber); }
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  background: #14111b;
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 22px 50px rgba(0,0,0,0.75);
  z-index: 90;
  padding: 6px;
}
.search-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.search-hit:hover { background: rgba(230, 195, 120, 0.12); }
.search-hit img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-line); }
.search-hit.is-item img { border-radius: 5px; }
.search-hit-name { font-size: 13px; color: var(--ivory); font-weight: 600; }
.search-hit-sub { font-size: 11px; color: var(--umber); }
.search-hit-tag { margin-left: auto; font-size: 10px; padding: 2px 6px; border-radius: 3px; background: rgba(230,195,120,0.12); color: var(--gold); }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(60, 232, 164, 0.08);
  border: 1px solid rgba(60, 232, 164, 0.32);
  color: var(--emerald);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.live-pill:hover { background: rgba(60, 232, 164, 0.16); border-color: var(--emerald); }
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseLive 2.2s ease-in-out infinite;
}
@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ================= GLOBAL FILTER RIBBON ================= */
.filter-ribbon {
  border-top: 1px solid rgba(230, 195, 120, 0.11);
  background: rgba(8, 7, 11, 0.72);
}
.filter-ribbon-inner {
  max-width: 1460px;
  margin: 0 auto;
  padding: 7px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.filter-group.disabled-group { opacity: 0.36; pointer-events: none; }
.filter-label {
  font-size: 11px;
  color: var(--umber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filter-sep { width: 1px; height: 20px; background: rgba(230, 195, 120, 0.16); flex-shrink: 0; }
.seg-control {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--ash);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--ivory); }
.seg-btn.active {
  background: linear-gradient(180deg, rgba(230, 195, 120, 0.25), rgba(186, 146, 70, 0.16));
  color: var(--gold-bright);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(230, 195, 120, 0.38);
}

.pill-row { display: inline-flex; align-items: center; gap: 5px; }
.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 195, 120, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ash);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.rank-pill img { width: 17px; height: 17px; object-fit: contain; }
.rank-pill:hover { border-color: var(--gold-line-strong); color: var(--ivory); }
.rank-pill.active {
  background: rgba(230, 195, 120, 0.18);
  border-color: var(--gold);
  color: var(--gold-bright);
  font-weight: 600;
}

.patch-stamp {
  margin-left: auto;
  font-size: 11px;
  color: var(--gold);
  padding: 3px 9px;
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  background: rgba(230, 195, 120, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================= ART DECO CARDS & CORNERS ================= */
.deco-card {
  position: relative;
  background: linear-gradient(165deg, rgba(24, 20, 31, 0.88) 0%, rgba(14, 12, 19, 0.92) 100%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(247, 227, 181, 0.08);
  backdrop-filter: blur(10px);
}
.deco-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 227, 181, 0.55), transparent);
  pointer-events: none;
}
.deco-card.glow-track::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(230, 195, 120, 0.11), transparent 62%);
}
.deco-card.glow-track:hover::after { opacity: 1; }
.deco-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 2;
}
.deco-corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.deco-corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.deco-corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.deco-corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }

/* ================= MAIN STAGE & SECTION HEADERS ================= */
.stage {
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 22px 64px;
}
.view-section { display: none; }
.view-section.active {
  display: block;
  animation: viewEnter 0.42s var(--ease-deco) both;
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-line);
  position: relative;
  flex-wrap: wrap;
}
.section-header-strip::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 130px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-bright), transparent);
}
.section-title-block { display: flex; align-items: center; gap: 14px; }
.chapter-roman {
  font-size: 40px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(230, 195, 120, 0.65);
  user-select: none;
  min-width: 34px;
  text-align: center;
}
.section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ivory);
}
.section-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ash);
}

/* Buttons & Toggles */
.deco-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ivory);
  transition: all 0.2s var(--ease-deco);
  white-space: nowrap;
}
.deco-btn:hover { border-color: var(--gold); background: rgba(230, 195, 120, 0.12); transform: translateY(-1px); }
.deco-btn-gold {
  background: linear-gradient(135deg, #d7ae5a 0%, #f3d796 50%, #c1923c 100%);
  color: #120e07;
  border-color: #f8e6bd;
  box-shadow: 0 4px 16px rgba(230, 195, 120, 0.25);
}
.deco-btn-gold:hover { filter: brightness(1.08); background: linear-gradient(135deg, #e0b864 0%, #faE2a8 50%, #cc9d45 100%); }
.deco-btn-ghost { background: transparent; color: var(--ash); }
.deco-btn-xs { padding: 4px 9px; font-size: 11.5px; }

.deco-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ash);
  cursor: pointer;
  user-select: none;
}
.deco-toggle input { display: none; }
.toggle-track {
  width: 32px;
  height: 17px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--gold-line);
  position: relative;
  transition: all 0.2s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ash);
  transition: transform 0.22s var(--ease-deco), background 0.2s;
}
.deco-toggle input:checked + .toggle-track { background: rgba(230, 195, 120, 0.28); border-color: var(--gold); }
.deco-toggle input:checked + .toggle-track::after { transform: translateX(15px); background: var(--gold-bright); }
.deco-toggle input:checked ~ span:last-child { color: var(--gold-bright); }

.quadrant-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ================= VIEW 1: QUADRANT LAYOUT ================= */
.quadrant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 18px;
  align-items: start;
}
.quadrant-stage-card {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quad-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 4px;
}
.legend-items { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ash); }
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ash);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease-deco);
}
.legend-chip:hover { color: var(--ivory); border-color: var(--gold-line); background: rgba(230, 195, 120, 0.07); }
.legend-chip.active { color: var(--gold-bright); border-color: var(--gold); background: rgba(230, 195, 120, 0.16); font-weight: 600; }
.legend-chip.dimmed { opacity: 0.42; }
.legend-chip i { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); display: inline-block; }
.legend-chip.meta i { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.legend-chip.darkhorse i { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.legend-chip.trap i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.legend-chip.cold i { background: var(--crimson); box-shadow: 0 0 8px var(--crimson); }
.quad-zoom-hint { font-size: 11px; color: var(--umber); }

.canvas-shell {
  position: relative;
  width: 100%;
  height: 590px;
  border-radius: 6px;
  border: 1px solid rgba(230, 195, 120, 0.16);
  background: radial-gradient(ellipse at 50% 45%, #15121d 0%, #0b090f 100%);
  overflow: hidden;
  cursor: grab;
}
.canvas-shell:active { cursor: grabbing; }
#quadrantCanvas { display: block; width: 100%; height: 100%; }

/* Floating Tooltip on Quadrant */
.quad-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  min-width: 228px;
  background: rgba(14, 12, 19, 0.96);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 11px 13px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.78);
  transition: opacity 0.12s;
}
.tt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tt-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gold); }
.tt-name-zh { font-size: 15px; font-weight: 800; color: var(--ivory); line-height: 1.1; }
.tt-name-en { font-size: 11px; color: var(--gold); letter-spacing: 0.05em; }
.tt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12px; }
.tt-cell { display: flex; flex-direction: column; }
.tt-k { font-size: 10px; color: var(--umber); }
.tt-v { font-size: 13.5px; font-weight: 700; color: var(--ivory); }
.tt-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(230, 195, 120, 0.18);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gold-dim);
}

/* 14-Day Timeline Scrubber */
.timeline-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(10, 8, 14, 0.85);
  border: 1px solid rgba(230, 195, 120, 0.2);
}
.timeline-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(230, 195, 120, 0.14);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.timeline-play-btn:hover { background: var(--gold); color: #120e07; }
.timeline-info { display: flex; flex-direction: column; min-width: 138px; flex-shrink: 0; }
.timeline-kicker { font-size: 9px; color: var(--gold-dim); letter-spacing: 0.14em; }
.timeline-label { font-size: 12.5px; color: var(--gold-bright); font-weight: 600; }
.timeline-slider-wrap { flex: 1; display: flex; flex-direction: column; gap: 3px; }
#timelineSlider {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
  height: 4px;
}
.timeline-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--umber);
}

/* Right Telemetry Sidebar */
.quadrant-sidebar { display: flex; flex-direction: column; gap: 12px; }
.kpi-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi-card { padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; }
.kpi-label { font-size: 11px; color: var(--umber); }
.kpi-val { font-size: 20px; font-weight: 700; color: var(--gold-bright); line-height: 1.15; }
.kpi-val-sm { font-size: 16px; }
.kpi-sub { font-size: 11px; color: var(--ash); }

.mover-card { padding: 11px 13px; }
.mover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mover-badge {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mover-badge.up { color: var(--emerald); }
.mover-badge.down { color: var(--crimson); }
.mover-badge.hot { color: var(--gold-bright); }
.mover-hint { font-size: 10.5px; color: var(--umber); }

.mover-list { display: flex; flex-direction: column; gap: 5px; }
.mover-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s var(--ease-deco);
}
.mover-row:hover {
  background: rgba(230, 195, 120, 0.1);
  border-color: var(--gold-line-strong);
  transform: translateX(3px);
}
.mover-row img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-line); }
.mover-meta { flex: 1; min-width: 0; }
.mover-name { font-size: 13px; font-weight: 600; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-sub { font-size: 11px; color: var(--umber); }
.mover-nums { text-align: right; }
.mover-delta { font-size: 13px; font-weight: 700; display: block; }
.mover-now { font-size: 11px; color: var(--ash); }

.weekly-callout {
  padding: 13px 14px;
  background: linear-gradient(135deg, rgba(230, 195, 120, 0.11), rgba(19, 16, 24, 0.92));
  border-color: var(--gold-line-strong);
}
.weekly-kicker { font-size: 10px; color: var(--gold); letter-spacing: 0.14em; }
.weekly-title { font-size: 14.5px; font-weight: 700; color: var(--ivory); margin: 3px 0 4px; }
.weekly-desc { font-size: 11.5px; color: var(--ash); line-height: 1.5; }

/* ================= SUBTABS, FILTERS & TABLES ================= */
.subtab-bar {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.subtab-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ash);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.subtab-btn:hover { color: var(--ivory); border-color: var(--gold-line-strong); }
.subtab-btn.active {
  background: linear-gradient(180deg, rgba(230, 195, 120, 0.22), rgba(230, 195, 120, 0.07));
  border-color: var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
}
.subtab-btn.slot-weapon.active { border-color: var(--weapon); color: var(--weapon); background: rgba(232, 150, 62, 0.16); }
.subtab-btn.slot-vitality.active { border-color: var(--vitality); color: var(--vitality); background: rgba(85, 212, 122, 0.16); }
.subtab-btn.slot-spirit.active { border-color: var(--spirit); color: var(--spirit); background: rgba(181, 130, 255, 0.16); }

.table-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tier-filter-row, .quad-filter-row, .cost-filter-row, .item-extra-filters, .codex-tag-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tier-pill, .chip-btn {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 195, 120, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ash);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
}
.tier-pill:hover, .chip-btn:hover { color: var(--ivory); border-color: var(--gold-line-strong); }
.tier-pill.active, .chip-btn.active {
  background: rgba(230, 195, 120, 0.18);
  border-color: var(--gold);
  color: var(--gold-bright);
  font-weight: 600;
}

/* Tier Stamps */
.tier-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 3px;
  font-family: "ValvePulp", "ForevsDemo", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tier-sp { background: linear-gradient(135deg, #f7df9d, #d49d3b); color: #161006; box-shadow: 0 0 12px rgba(230,195,120,0.4); }
.tier-s { background: rgba(60, 232, 164, 0.18); color: var(--emerald); border: 1px solid rgba(60,232,164,0.45); }
.tier-a { background: rgba(102, 220, 255, 0.16); color: var(--cyan); border: 1px solid rgba(102,220,255,0.4); }
.tier-b { background: rgba(230, 195, 120, 0.12); color: var(--gold); border: 1px solid rgba(230,195,120,0.3); }
.tier-c { background: rgba(245, 166, 75, 0.14); color: var(--amber); border: 1px solid rgba(245,166,75,0.35); }
.tier-d { background: rgba(242, 92, 105, 0.15); color: var(--crimson); border: 1px solid rgba(242,92,105,0.4); }

/* Data Tables */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.deco-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.deco-table thead th {
  position: sticky;
  top: 0;
  background: #14111b;
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--gold-line-strong);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.deco-table thead th:hover { color: var(--gold-bright); }
.deco-table thead th.sorted-asc::after { content: " ▲"; font-size: 10px; }
.deco-table thead th.sorted-desc::after { content: " ▼"; font-size: 10px; }
.deco-table thead th.num, .deco-table tbody td.num { text-align: right; }

.deco-table tbody tr {
  border-bottom: 1px solid rgba(230, 195, 120, 0.08);
  transition: background 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.deco-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.012); }
.deco-table tbody tr:hover {
  background: rgba(230, 195, 120, 0.09);
  box-shadow: inset 3px 0 0 var(--gold);
}
.deco-table tbody tr:hover .hero-avatar,
.deco-table tbody tr:hover .item-icon { transform: scale(1.08); border-color: var(--gold-bright); }
.hero-avatar, .item-icon { transition: transform 0.2s var(--ease-deco), border-color 0.2s; }
.deco-table tbody td { padding: 9px 12px; vertical-align: middle; white-space: nowrap; }

.entity-cell { display: flex; align-items: center; gap: 10px; }
.hero-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-line-strong);
  background: #0d0b10;
  flex-shrink: 0;
}
.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid var(--gold-line);
  background: #0c0a0f;
  flex-shrink: 0;
}
.item-icon.slot-weapon { border-color: rgba(232, 150, 62, 0.72); box-shadow: inset 0 0 8px rgba(232,150,62,0.22); }
.item-icon.slot-vitality { border-color: rgba(85, 212, 122, 0.72); box-shadow: inset 0 0 8px rgba(85,212,122,0.22); }
.item-icon.slot-spirit { border-color: rgba(181, 130, 255, 0.72); box-shadow: inset 0 0 8px rgba(181,130,255,0.22); }

.entity-name-zh { font-weight: 700; color: var(--ivory); font-size: 13.5px; }
.entity-name-en { font-size: 11px; color: var(--umber); display: block; }
.pos { color: var(--emerald); }
.neg { color: var(--crimson); }
.flat { color: var(--umber); }

.mini-bar-wrap { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mini-bar { width: 58px; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.mini-bar-fill.up { background: linear-gradient(90deg, #1b9f6e, var(--emerald)); }
.mini-bar-fill.down { background: linear-gradient(90deg, #9f2936, var(--crimson)); }

.core3-row { display: inline-flex; align-items: center; gap: 5px; }
.core3-row img { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--gold-line); object-fit: cover; transition: transform 0.15s; }
.core3-row img:hover { transform: scale(1.25); z-index: 5; border-color: var(--gold); }

.heat-cell {
  display: inline-block;
  min-width: 58px;
  text-align: center;
  padding: 4px 7px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12.5px;
}
.th-rank-head { display: inline-flex; align-items: center; gap: 5px; }
.th-rank-head img { width: 18px; height: 18px; object-fit: contain; }

.tag-chip-sm {
  display: inline-block;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.tag-patch { background: rgba(230, 195, 120, 0.18); color: var(--gold-bright); border: 1px solid rgba(230, 195, 120, 0.45); }
.tag-active { background: rgba(102, 220, 255, 0.14); color: var(--cyan); border: 1px solid rgba(102, 220, 255, 0.35); }
.tag-lore { background: rgba(184, 139, 255, 0.16); color: var(--violet); border: 1px solid rgba(184, 139, 255, 0.4); }

/* ================= VIEW 4: COMBOS ================= */
.hero-picker-card { padding: 12px 14px; margin-bottom: 16px; }
.hero-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.picker-title { font-size: 12.5px; color: var(--gold); font-weight: 600; letter-spacing: 0.04em; }
.picker-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-seg { display: inline-flex; gap: 5px; }
.hero-avatar-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.strip-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 3px;
  border-radius: 99px;
  border: 1px solid rgba(230, 195, 120, 0.15);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ash);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s;
}
.strip-hero-btn img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.strip-hero-btn:hover { border-color: var(--gold-line-strong); color: var(--ivory); }
.strip-hero-btn.active {
  background: rgba(230, 195, 120, 0.22);
  border-color: var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.combo-card {
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s var(--ease-deco), border-color 0.22s;
  animation: cardRise 0.35s var(--ease-deco) both;
}
.combo-card:hover { transform: translateY(-3px); border-color: var(--gold-line-strong); }
@keyframes cardRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.combo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.combo-hero-info { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.combo-hero-info img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gold); }
.combo-wr-pill { text-align: right; }
.combo-wr-big { font-size: 20px; font-weight: 700; line-height: 1.1; }
.combo-wr-sub { font-size: 11px; color: var(--umber); }

.combo-items-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.combo-item-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 195, 120, 0.14);
  cursor: pointer;
  transition: all 0.18s;
}
.combo-item-box:hover { border-color: var(--gold); background: rgba(230, 195, 120, 0.09); }
.combo-item-box img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; }
.combo-item-name { font-size: 11.5px; color: var(--ivory); font-weight: 600; line-height: 1.2; }
.combo-item-cost { font-size: 10.5px; color: var(--gold-dim); }

.duo-pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.duo-avatars { display: flex; align-items: center; gap: 8px; }
.duo-hero-chip { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.duo-hero-chip img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gold-line-strong); }
.duo-link-glyph { color: var(--gold); font-size: 16px; padding: 0 2px; }
.duo-bar-block { display: flex; flex-direction: column; gap: 5px; }
.duo-bar-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ash); }

/* ================= VIEW 5: CODEX & HIDDEN LORE ================= */
.codex-search-wrap { flex: 1; min-width: 240px; max-width: 440px; }
.codex-search-wrap input {
  width: 100%;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ivory);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.codex-search-wrap input:focus { border-color: var(--gold); }

.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.codex-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease-deco), border-color 0.25s;
  animation: cardRise 0.35s var(--ease-deco) both;
}
.codex-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.codex-hero-banner {
  position: relative;
  height: 164px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  background: radial-gradient(circle at 75% 35%, var(--hero-accent, rgba(230,195,120,0.28)), #0c0a11 72%);
  border-bottom: 1px solid var(--gold-line);
}
.codex-wordmark-bg {
  position: absolute;
  left: 12px;
  top: 10px;
  max-height: 36px;
  max-width: 170px;
  opacity: 0.18;
  pointer-events: none;
  filter: brightness(1.4);
}
.codex-live-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ash);
}
.codex-count-pill {
  font-size: 12px;
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(230, 195, 120, 0.08);
  border: 1px solid var(--gold-line);
  white-space: nowrap;
}
.deco-divider-diamond {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-dim);
  font-size: 10px;
  margin: 2px 0;
}
.deco-divider-diamond::before,
.deco-divider-diamond::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.codex-hero-render {
  position: absolute;
  right: -8px;
  top: -6px;
  height: 185px;
  width: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.72));
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  transition: transform 0.45s var(--ease-deco);
}
.codex-card:hover .codex-hero-render { transform: scale(1.06) translateY(-3px); }
.codex-hero-title-group { position: relative; z-index: 2; max-width: 62%; }
.codex-file-code {
  display: inline-block;
  font-size: 10px;
  color: var(--gold);
  background: rgba(8, 7, 10, 0.72);
  border: 1px solid var(--gold-line);
  padding: 1px 7px;
  border-radius: 3px;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}
.codex-hero-zh { font-size: 23px; font-weight: 900; color: var(--ivory); line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,0.8); }
.codex-hero-en { font-size: 12px; color: var(--gold-bright); letter-spacing: 0.1em; margin-top: 2px; }
.codex-hero-tagline { font-size: 12px; color: var(--ash); margin-top: 5px; line-height: 1.35; }

.codex-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.codex-secret-box {
  position: relative;
  padding: 11px 13px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(230, 195, 120, 0.09), rgba(184, 139, 255, 0.05));
  border: 1px solid rgba(230, 195, 120, 0.32);
  border-left: 3px solid var(--gold);
}
.secret-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.secret-title { font-size: 13.5px; font-weight: 700; color: var(--ivory); margin-bottom: 4px; }
.secret-text { font-size: 12.5px; color: #ddd3c2; line-height: 1.65; }

.codex-official-lore {
  font-size: 12px;
  color: var(--ash);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.codex-official-lore.expanded { -webkit-line-clamp: unset; }
.codex-relations { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--umber); }
.codex-relations span::before { content: "◆ "; color: var(--gold-dim); }
.codex-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(230, 195, 120, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.world-tag { font-size: 11px; color: var(--gold); letter-spacing: 0.14em; }
.world-title { font-size: 19px; font-weight: 900; color: var(--ivory); line-height: 1.3; }
.world-body { font-size: 13.5px; color: #d9cfc0; line-height: 1.75; }

.item-codex-card { padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.item-codex-head { display: flex; align-items: center; gap: 12px; }
.item-codex-head img { width: 48px; height: 48px; border-radius: 7px; object-fit: cover; }

/* ================= SLIDE-OUT HERO DETAIL DOSSIER DRAWER ================= */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(4, 3, 7, 0.76);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 100vw);
  z-index: 100;
  background: #0f0d15;
  border-left: 1px solid var(--gold-line-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  animation: slideInRight 0.32s var(--ease-deco);
}
@keyframes slideInRight { from { transform: translateX(48px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.hero-drawer-body {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 195, 120, 0.65) rgba(10, 8, 14, 0.9);
}
/* Dedicated Brass Hairline Scrollbar for Hero Drawer (distinct from main page) */
.hero-drawer-body::-webkit-scrollbar { width: 5px; }
.hero-drawer-body::-webkit-scrollbar-track {
  background: rgba(8, 7, 11, 0.92);
  border-left: 1px solid rgba(230, 195, 120, 0.14);
}
.hero-drawer-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f7e3b5 0%, #c89b44 100%);
  border-radius: 99px;
}
.hero-drawer-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff2ce 0%, #e6c378 100%);
}

.drawer-close, .modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 30;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(230, 195, 120, 0.55);
  background: rgba(10, 8, 15, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold-bright);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transition: all 0.2s var(--ease-deco);
}
.drawer-close:hover, .modal-close:hover {
  background: var(--gold);
  color: #110d06;
  border-color: var(--gold-bright);
  transform: scale(1.06);
}

.drawer-hero-header {
  position: relative;
  width: 100%;
  padding: 26px 24px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-line);
  background: radial-gradient(circle at 82% 30%, var(--hero-accent, rgba(230,195,120,0.3)), #0f0d15 68%);
}
.drawer-render {
  position: absolute;
  right: 8px;
  bottom: -14px;
  height: 225px;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.8));
  mask-image: linear-gradient(180deg, #000 76%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 100%);
}
.drawer-wordmark { max-height: 44px; max-width: 240px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.7)); }
.drawer-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-name-zh { font-size: 30px; font-weight: 900; color: var(--ivory); line-height: 1.1; }
.drawer-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
  position: relative;
  z-index: 2;
}
.drawer-kpi {
  padding: 9px 10px;
  border-radius: 5px;
  background: rgba(10, 9, 14, 0.78);
  border: 1px solid rgba(230, 195, 120, 0.22);
}
.drawer-kpi span { display: block; font-size: 10.5px; color: var(--umber); }
.drawer-kpi strong { font-size: 17px; color: var(--ivory); }

.drawer-content { padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 18px; }
.drawer-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: 10px;
}

.bracket-bars { display: flex; flex-direction: column; gap: 7px; }
.bracket-bar-row { display: grid; grid-template-columns: 118px 1fr 56px; align-items: center; gap: 10px; font-size: 12px; }
.bracket-bar-label { display: flex; align-items: center; gap: 6px; color: var(--ash); }
.bracket-bar-label img { width: 18px; height: 18px; }
.bracket-bar-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.06); overflow: hidden; position: relative; }
.bracket-bar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(230,195,120,0.45); }
.bracket-bar-fill { height: 100%; border-radius: 99px; }

.phase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.phase-col {
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(230, 195, 120, 0.14);
}
.phase-col-title { font-size: 11.5px; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.phase-item-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 11.5px;
  cursor: pointer;
}
.phase-item-row:hover { color: var(--gold-bright); }
.phase-item-row img { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; }

.matchup-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.matchup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 5px;
  cursor: pointer;
}
.matchup-row:hover { background: rgba(230, 195, 120, 0.1); }
.matchup-hero { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.matchup-hero img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* Item Modal */
.modal-backdrop { display: grid; place-items: center; padding: 18px; }
.item-modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  background: #14111c;
}
.item-modal::-webkit-scrollbar { width: 5px; }
.item-modal::-webkit-scrollbar-track { background: rgba(8, 7, 11, 0.9); }
.item-modal::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f7e3b5 0%, #c89b44 100%);
  border-radius: 99px;
}

.poster-modal {
  width: min(860px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px 18px;
  background: #14111c;
}
.poster-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 44px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.poster-preview-wrap {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--gold-line-strong);
  background: #08070b;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
}
.poster-preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-touch-callout: default;
}
.poster-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ash);
  text-align: center;
}
.poster-hint strong { color: var(--gold-bright); }
.live-pill.is-fallback {
  background: rgba(230, 195, 120, 0.08);
  border-color: rgba(230, 195, 120, 0.35);
  color: var(--gold-bright);
}
.live-pill.is-fallback .live-dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

/* Loading & Toast */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 7, 10, 0.94);
  display: grid;
  place-items: center;
  transition: opacity 0.35s ease;
}
.loading-overlay.fade-out { opacity: 0; pointer-events: none; }
.loading-crest { text-align: center; }
.loading-ring {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 2px solid rgba(230, 195, 120, 0.18);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 24px; color: var(--gold-bright); letter-spacing: 0.2em; }
.loading-sub { font-size: 12.5px; color: var(--ash); margin-top: 6px; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 220;
  padding: 9px 18px;
  border-radius: 99px;
  background: rgba(20, 17, 27, 0.96);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--gold-line);
  background: rgba(8, 7, 10, 0.85);
  padding: 18px 22px;
}
.footer-inner {
  max-width: 1460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--umber);
}
.footer-brand { color: var(--gold); display: flex; align-items: center; gap: 6px; }
.footer-sep { opacity: 0.4; }

/* Mobile / Bilibili Toy Bottom Dock */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(11, 9, 15, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold-line-strong);
  grid-template-columns: repeat(5, 1fr);
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
}
.dock-btn {
  border: none;
  background: transparent;
  color: var(--umber);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-family: inherit;
  padding: 4px 0;
  cursor: pointer;
}
.dock-btn span { font-size: 15px; line-height: 1; }
.dock-btn em { font-style: normal; }
.dock-btn.active { color: var(--gold-bright); font-weight: 700; }

/* ================= RESPONSIVE / BILIBILI TOY EMBED ADAPTATION ================= */
@media (max-width: 1120px) {
  .quadrant-grid { grid-template-columns: 1fr; }
  .canvas-shell { height: 500px; }
  .quadrant-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .kpi-strip { grid-column: 1 / -1; }
  .weekly-callout { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .primary-nav { display: none; }
  .mobile-dock { display: grid; }
  .stage { padding: 14px 12px 84px; }
  .masthead-top { padding: 9px 12px; gap: 8px; }
  .masthead-actions { flex: 1; justify-content: flex-end; min-width: 0; gap: 6px; }
  .global-search { flex: 1; min-width: 100px; max-width: 165px; width: auto; }
  .brand-zh { font-size: 18px; }
  .brand-en { font-size: 13px; }
  .brand-crest { width: 30px; height: 30px; }
  .brand-sub { display: none; }
  .live-pill { padding: 6px 8px; }
  #liveStatusText { display: none; }
  .filter-ribbon-inner { padding: 6px 12px; gap: 10px; }
  .patch-stamp { display: none; }
  .canvas-shell { height: 420px; }
  .quadrant-sidebar { grid-template-columns: 1fr; }
  .section-title { font-size: 19px; }
  .chapter-roman { font-size: 30px; min-width: 24px; }
  .timeline-bar { flex-wrap: wrap; }
  .combo-grid, .codex-grid { grid-template-columns: 1fr; }
  .drawer-kpis { grid-template-columns: repeat(2, 1fr); }
  .phase-grid, .matchup-split { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 76px; }
}
