/* 《第二纪元》V7 · Abyssal Carbon & Forged Gold (zero-mud · zero-green · zero-violet) */
@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 玄曜鎏金：冷峻深碳黑 + 金属钢灰边 + 鎏金主色 + 绯红首领 + 冰川钢蓝（彻底告别脏棕色！） */
  --bg-page: #080A0F;
  --bg-paper: rgba(16, 19, 27, 0.84);
  --bg-paper-solid: #11141C;
  --bg-inset: #181C26;
  --bg-hover: #212736;
  --bg-header: rgba(10, 12, 18, 0.82);

  --ink-primary: #F2F4F8;
  --ink-secondary: #B0B8C9;
  --ink-muted: #768096;

  --accent-gold: #F2B94B;
  --accent-gold-hi: #FFD27A;
  --accent-gold-soft: rgba(242, 185, 75, 0.14);
  --accent-gold-glow: rgba(242, 185, 75, 0.38);

  --accent-crimson: #E5483A;
  --accent-crimson-soft: rgba(229, 72, 58, 0.16);

  --accent-steel: #5BA4E5;
  --accent-steel-soft: rgba(91, 164, 229, 0.15);

  --border-line: rgba(214, 224, 242, 0.1);
  --border-strong: rgba(214, 224, 242, 0.2);
  --border-gold: rgba(242, 185, 75, 0.5);

  --shadow-paper: 0 12px 36px -14px rgba(0, 0, 0, 0.72);
  --shadow-hover: 0 22px 50px -14px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(242, 185, 75, 0.36);
  --shadow-float: 0 28px 68px rgba(0, 0, 0, 0.88);

  --radius-sm: 6px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="codex-light"] {
  /* 象牙金石浅色模式：极净白纸 + 墨黑字体 + 鎏金古铜 + 深钢蓝 */
  --bg-page: #F5F6F9;
  --bg-paper: rgba(255, 255, 255, 0.94);
  --bg-paper-solid: #FFFFFF;
  --bg-inset: #ECEFF5;
  --bg-hover: #E2E6F0;
  --bg-header: rgba(15, 18, 26, 0.95);

  --ink-primary: #11141C;
  --ink-secondary: #485166;
  --ink-muted: #747E94;

  --accent-gold: #B97B12;
  --accent-gold-hi: #9A650B;
  --accent-gold-soft: rgba(185, 123, 18, 0.12);
  --accent-gold-glow: rgba(185, 123, 18, 0.26);

  --accent-crimson: #C93528;
  --accent-crimson-soft: rgba(201, 53, 40, 0.11);

  --accent-steel: #256BB0;
  --accent-steel-soft: rgba(37, 107, 176, 0.12);

  --border-line: #DFE4EE;
  --border-strong: #C5CDDC;
  --border-gold: rgba(185, 123, 18, 0.48);

  --shadow-paper: 0 4px 18px -6px rgba(16, 22, 36, 0.08);
  --shadow-hover: 0 14px 32px -10px rgba(16, 22, 36, 0.15), 0 0 0 1px rgba(185, 123, 18, 0.38);
  --shadow-float: 0 20px 52px rgba(16, 22, 36, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%; overflow-x: clip;
  background: var(--bg-page); color: var(--ink-primary);
  font-family: var(--font-body); font-size: 14.5px; line-height: 1.68;
  -webkit-font-smoothing: antialiased; caret-color: var(--accent-gold);
}

#ember-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#app-root { position: relative; z-index: 1; min-height: 100vh; }

::selection { background: var(--accent-gold-soft); color: var(--ink-primary); }
:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

.view-enter { animation: viewFadeUp 300ms var(--ease-out) both; }
@keyframes viewFadeUp { from { opacity: 0.01; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 通用按钮、表单、徽章与流金边框特效 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-inset); color: var(--ink-primary);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 110ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-gold); }
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-xs { padding: 3px 7px; font-size: 11.5px; }
.btn-ghost { background: transparent; border-color: transparent; }

.btn-primary {
  background: linear-gradient(180deg, #F5C35B, #D6911E);
  border-color: #FFDC91;
  color: #110E08;
  font-weight: 600;
  box-shadow: 0 6px 22px -4px rgba(242, 185, 75, 0.5);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #FFD278, #E39D28);
  box-shadow: 0 10px 28px -4px rgba(242, 185, 75, 0.72);
  color: #110E08;
}
.btn-steel {
  background: var(--accent-steel-soft);
  border-color: rgba(91, 164, 229, 0.42);
  color: var(--accent-steel);
}
.btn-steel:hover { background: rgba(91, 164, 229, 0.24); }
.btn-danger {
  background: var(--accent-crimson-soft);
  border-color: rgba(229, 72, 58, 0.42);
  color: var(--accent-crimson);
}
.btn-danger:hover { background: rgba(229, 72, 58, 0.26); }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-paper-solid); color: var(--ink-primary);
  font-family: var(--font-body); font-size: 14px;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px var(--accent-gold-soft); outline: none; }
.textarea { resize: vertical; min-height: 92px; line-height: 1.7; }

.pill {
  display: inline-flex; align-items: center; padding: 2.5px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 500; background: var(--bg-inset); color: var(--ink-secondary);
  border: 1px solid var(--border-line); white-space: nowrap;
}
.pill-gold { background: var(--accent-gold-soft); border-color: rgba(242, 185, 75, 0.36); color: var(--accent-gold); }
.pill-crimson { background: var(--accent-crimson-soft); border-color: rgba(229, 72, 58, 0.38); color: var(--accent-crimson); }
.pill-steel { background: var(--accent-steel-soft); border-color: rgba(91, 164, 229, 0.36); color: var(--accent-steel); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.rarity-普通 { color: var(--ink-primary); }
.rarity-精良 { color: var(--accent-steel); }
.rarity-稀有 { color: var(--accent-gold); }
.rarity-史诗 { color: #F59E3D; }
.rarity-传说, .rarity-首领 { color: var(--accent-crimson); }

/* 鼠标跟随流金高光 + 3D 微倾卡片 */
.glow-card {
  position: relative; overflow: hidden;
  background: var(--bg-paper); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.glow-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(380px circle at var(--mx, -260px) var(--my, -260px), var(--accent-gold-soft), transparent 62%);
  opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease-out);
}
.glow-card:hover::before { opacity: 1; }
.glow-card:hover { transform: translateY(-3px); border-color: var(--border-gold); box-shadow: var(--shadow-hover); }

/* 流光旋转金边特效 (@property --border-angle) */
.gilded-border {
  position: relative;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg-paper-solid), var(--bg-paper-solid)) padding-box,
    conic-gradient(from var(--border-angle), rgba(242,185,75,0.12) 0%, #F2B94B 18%, #5BA4E5 34%, rgba(242,185,75,0.1) 52%, #E5483A 75%, rgba(242,185,75,0.12) 100%) border-box;
  animation: rotateGilded 6.5s linear infinite;
}
@keyframes rotateGilded { to { --border-angle: 360deg; } }

/* ==========================================================================
   ZONE 1: 电影级 AAA 游戏官网主页 (Official Game Website)
   ========================================================================== */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(8, 10, 15, 0.88), rgba(8, 10, 15, 0));
  padding: 16px 32px;
}
.landing-nav-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-nav .btn { background: rgba(255, 255, 255, 0.07); border-color: rgba(214, 224, 242, 0.18); color: #F2F4F8; }
.landing-nav .btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #F2B94B; }

.landing-hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 110px 24px 76px; overflow: hidden;
  background:
    radial-gradient(ellipse 68% 50% at 50% 42%, rgba(242, 185, 75, 0.17), transparent 66%),
    radial-gradient(ellipse 46% 36% at 82% 18%, rgba(91, 164, 229, 0.14), transparent 65%),
    radial-gradient(ellipse 42% 30% at 18% 82%, rgba(229, 72, 58, 0.12), transparent 65%),
    linear-gradient(180deg, #06070B 0%, #0D111A 55%, #080A0F 100%);
  color: #F4F6FA;
}

.parallax-stage { position: absolute; inset: -36px; pointer-events: none; overflow: hidden; }
.parallax-layer { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 260ms var(--ease-out); }
.forge-ring { animation: slowSpin 44s linear infinite; transform-origin: 720px 340px; }
.forge-ring-rev { animation: slowSpin 68s linear infinite reverse; transform-origin: 720px 340px; }
@keyframes slowSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hero-center { position: relative; z-index: 2; max-width: 860px; display: flex; flex-direction: column; align-items: center; }
.hero-crest-seal {
  width: 66px; height: 66px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 27px; font-weight: 700; color: #FFD27A;
  background: linear-gradient(145deg, rgba(242, 185, 75, 0.24), rgba(15, 19, 28, 0.94));
  border: 1px solid rgba(255, 210, 122, 0.55);
  box-shadow: 0 0 42px rgba(242, 185, 75, 0.34);
  margin-bottom: 24px;
}

/* 逐字流金浮现主标题 */
.landing-title {
  margin: 0; font-family: var(--font-display); font-size: clamp(48px, 7.6vw, 88px);
  font-weight: 700; line-height: 1.08; letter-spacing: 0.18em; text-indent: 0.18em;
  color: #FAFBFD;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.9), 0 0 36px rgba(242, 185, 75, 0.26);
  display: inline-flex; justify-content: center;
}
.title-char {
  display: inline-block;
  animation: charReveal 720ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms);
}
@keyframes charReveal {
  from { opacity: 0; transform: translateY(22px) scale(0.94); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.landing-subtitle { margin: 16px 0 0; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.3em; color: #F2B94B; }
.landing-lead { margin: 22px 0 38px; max-width: 58ch; font-size: 16px; line-height: 1.8; color: #BFC7D8; }

.hero-portal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.portal-cta {
  display: flex; align-items: center; gap: 15px; padding: 17px 28px; min-width: 274px;
  border-radius: var(--radius-md); text-align: left; cursor: pointer; font-family: var(--font-body);
  transition: transform 200ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 200ms var(--ease-out);
}
.portal-cta:hover { transform: translateY(-4px); }
.portal-cta:active { transform: translateY(-1px) scale(0.985); }

.portal-cta-wiki {
  background: linear-gradient(135deg, #F5C35B 0%, #D48A18 100%);
  border: 1px solid #FFE29E; color: #120E08;
  box-shadow: 0 18px 44px -10px rgba(242, 185, 75, 0.58);
}
.portal-cta-wiki:hover { box-shadow: 0 24px 56px -8px rgba(242, 185, 75, 0.78); }

.portal-cta-studio {
  color: #F2F4F8;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.8);
}
.portal-cta-title { display: block; font-family: var(--font-display); font-size: 18.5px; font-weight: 700; }
.portal-cta-desc { display: block; font-size: 12px; opacity: 0.86; margin-top: 2px; }

.scroll-cue { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 12px; color: #8A95AC; display: flex; flex-direction: column; align-items: center; gap: 4px; }

.landing-section { max-width: 1240px; margin: 0 auto; padding: 72px 24px; }
.landing-sec-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.landing-sec-title { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); }

.showcase-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.showcase-tabs { display: flex; flex-direction: column; gap: 10px; }
.showcase-tab {
  padding: 18px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-line);
  background: var(--bg-paper); color: var(--ink-secondary); text-align: left; cursor: pointer; font-family: var(--font-body);
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.showcase-tab:hover { border-color: var(--border-strong); color: var(--ink-primary); }
.showcase-tab.active { border-color: var(--accent-gold); background: var(--accent-gold-soft); color: var(--ink-primary); transform: translateX(4px); }

.showcase-stage {
  border-radius: var(--radius-lg); padding: 34px 38px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-height: 310px;
}

.dual-door-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; perspective: 1000px; }
.door-card {
  padding: 32px 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 270px; cursor: pointer;
  transform-style: preserve-3d;
}

/* ==========================================================================
   ZONE 2: 独立游戏百科全站 (Standalone Wiki)
   ========================================================================== */
.zone-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg-header); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: #F2F4F8; border-bottom: 1px solid rgba(214, 224, 242, 0.1);
}
.zone-header-inner { max-width: 1280px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.zone-header .btn { background: rgba(255, 255, 255, 0.07); border-color: rgba(214, 224, 242, 0.18); color: #F2F4F8; }
.zone-header .btn:hover { background: rgba(255, 255, 255, 0.15); border-color: #F2B94B; }
.zone-header .btn-primary { background: linear-gradient(180deg, #F5C35B, #D6911E); border-color: #FFDC91; color: #110E08; }

.wiki-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #F2F4F8; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
.wiki-emblem {
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #FFD27A;
  background: linear-gradient(145deg, rgba(242, 185, 75, 0.25), #131722); border: 1px solid rgba(255, 210, 122, 0.45);
}
.header-search-wrap { position: relative; flex: 1; max-width: 460px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8A95AC; pointer-events: none; }
.header-search-input {
  width: 100%; padding: 8px 14px 8px 36px; border-radius: var(--radius-sm);
  border: 1px solid rgba(214, 224, 242, 0.18); background: rgba(255, 255, 255, 0.06); color: #F2F4F8;
  font-family: var(--font-body); font-size: 13.5px;
}
.header-search-input::placeholder { color: #8A95AC; }
.header-search-input:focus { background: rgba(255, 255, 255, 0.12); border-color: #F2B94B; outline: none; }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-paper-solid); color: var(--ink-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-float); max-height: 360px; overflow-y: auto; padding: 6px; z-index: 60;
}
.search-hit {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-primary); text-align: left; cursor: pointer; font-family: var(--font-body); font-size: 13.5px;
}
.search-hit:hover { background: var(--bg-hover); }

.cat-strip { background: rgba(15, 18, 26, 0.94); border-top: 1px solid rgba(214, 224, 242, 0.06); }
.cat-strip-inner { max-width: 1280px; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.cat-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 11px 14px;
  border: 0; background: transparent; color: #9BA5BA; font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: color 150ms var(--ease-out);
}
.cat-tab:hover { color: #FFFFFF; }
.cat-tab.active { color: #FFD27A; font-weight: 600; }
.cat-tab::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px; background: #F2B94B; transform: scaleX(0); transition: transform 200ms var(--ease-out); }
.cat-tab.active::after { transform: scaleX(1); }

.wiki-container { max-width: 1280px; width: 100%; margin: 0 auto; padding: 26px 22px 72px; }
.home-cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.cat-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.cat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.cat-card-id { display: flex; align-items: center; gap: 12px; }
.cat-crest { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--accent-gold-soft); color: var(--accent-gold); border: 1px solid rgba(242, 185, 75, 0.28); flex-shrink: 0; }
.cat-card[data-tone="crimson"] .cat-crest { background: var(--accent-crimson-soft); color: var(--accent-crimson); border-color: rgba(229, 72, 58, 0.28); }
.cat-card[data-tone="steel"] .cat-crest { background: var(--accent-steel-soft); color: var(--accent-steel); border-color: rgba(91, 164, 229, 0.28); }
.cat-card-title { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.cat-card-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.cat-quick-list { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 11px; border-top: 1px solid var(--border-line); }

.entry-chip {
  padding: 4.5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-line);
  background: var(--bg-inset); color: var(--ink-primary); font-size: 12.5px; cursor: pointer; font-family: var(--font-body);
  transition: border-color 140ms var(--ease-out), transform 110ms var(--ease-out);
}
.entry-chip:hover { border-color: var(--accent-gold); transform: translateY(-1px); }

.browse-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-line); }
.browse-title { margin: 0; font-family: var(--font-display); font-size: 27px; font-weight: 700; }
.browse-desc { margin: 5px 0 0; color: var(--ink-secondary); font-size: 14px; }
.subfilter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.subfilter-btn { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border-line); background: var(--bg-paper); color: var(--ink-secondary); font-size: 13px; cursor: pointer; font-family: var(--font-body); }
.subfilter-btn.active { background: var(--accent-gold); border-color: var(--accent-gold); color: #110E08; font-weight: 600; }

.entry-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 15px; }
.entry-card { padding: 17px 19px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-primary); cursor: pointer; }
.entry-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.entry-card-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.entry-card-tip { font-size: 12.5px; color: var(--ink-secondary); line-height: 1.55; }
.entry-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--border-line); font-size: 11.5px; color: var(--ink-muted); }
.card-quick-ops { display: inline-flex; gap: 4px; opacity: 0.72; transition: opacity 150ms; }
.entry-card:hover .card-quick-ops { opacity: 1; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 24px; align-items: start; }
.article-paper { background: var(--bg-paper); backdrop-filter: blur(12px); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 28px 34px; box-shadow: var(--shadow-paper); min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-muted); margin-bottom: 12px; }
.breadcrumbs button { background: none; border: 0; padding: 0; color: var(--ink-secondary); cursor: pointer; font-size: 12.5px; }
.breadcrumbs button:hover { color: var(--accent-gold); text-decoration: underline; }
.article-h1 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.25; }
.article-subbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border-line); }
.article-prose { margin-top: 18px; font-size: 15px; line-height: 1.82; max-width: 68ch; }
.article-prose h2 { font-family: var(--font-display); font-size: 19px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-line); }
.article-prose p { margin: 0 0 12px; }
.article-prose ul { margin: 0 0 14px; padding-left: 20px; }
.wikilink { color: var(--accent-gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(242, 185, 75, 0.45); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.wikilink:hover { color: var(--accent-steel); }
.wikilink.broken { color: var(--accent-crimson); text-decoration-style: dashed; }

.infobox { background: var(--bg-paper); backdrop-filter: blur(12px); border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-paper); position: sticky; top: 116px; }
.infobox-titlebar { padding: 14px 16px; background: var(--bg-inset); border-bottom: 1px solid var(--border-line); }
.infobox-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.infobox-tooltip { padding: 10px 16px; font-size: 12.5px; font-style: italic; color: var(--ink-secondary); border-bottom: 1px solid var(--border-line); }
.infobox-body { padding: 8px 16px 14px; }
.infobox-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-line); font-size: 13px; }
.infobox-row:last-child { border-bottom: 0; }
.infobox-k { color: var(--ink-muted); }
.infobox-v { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.wiki-block { margin-top: 22px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--bg-inset); border: 1px solid var(--border-line); }
.ctree-list { list-style: none; margin: 0; padding: 0; }
.ctree-list .ctree-list { margin-left: 20px; padding-left: 14px; border-left: 1px dashed var(--border-strong); }
.ctree-item { padding: 5px 0; }
.ctree-node { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 5.5px 11px; border-radius: var(--radius-sm); background: var(--bg-paper-solid); border: 1px solid var(--border-line); font-size: 13px; }
.ctree-node.root { border-color: var(--accent-gold); background: var(--accent-gold-soft); }
.diff-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.diff-table th, .diff-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-line); text-align: right; }
.diff-table th:first-child, .diff-table td:first-child { text-align: left; color: var(--ink-muted); }

/* ==========================================================================
   ZONE 3: 独立宽敞的研发制作中枢 (Spacious Dev Studio)
   ========================================================================== */
.studio-shell { max-width: 1440px; margin: 0 auto; padding: 24px 24px 64px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.studio-nav { position: sticky; top: 76px; background: var(--bg-paper); backdrop-filter: blur(14px); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.studio-nav-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); font-family: var(--font-body); font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: left; transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out); }
.studio-nav-btn:hover { background: var(--bg-hover); color: var(--ink-primary); }
.studio-nav-btn.active { background: var(--accent-gold-soft); border-color: var(--border-gold); color: var(--ink-primary); font-weight: 600; }

.writer-split { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; align-items: start; }
.writer-list { background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 180px); overflow-y: auto; }
.writer-item { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-line); background: var(--bg-inset); color: var(--ink-primary); text-align: left; cursor: pointer; font-family: var(--font-body); transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.writer-item:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.writer-item.active { border-color: var(--accent-gold); background: var(--accent-gold-soft); }

.writer-editor { background: var(--bg-paper); backdrop-filter: blur(14px); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-paper); }
.writer-title-input { width: 100%; border: 0; border-bottom: 1px solid var(--border-line); padding: 6px 0 12px; background: transparent; color: var(--ink-primary); font-family: var(--font-display); font-size: 24px; font-weight: 700; outline: none; }
.writer-title-input:focus { border-bottom-color: var(--accent-gold); }
.writer-body-area { width: 100%; min-height: 290px; border: 1px solid var(--border-line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg-paper-solid); color: var(--ink-primary); font-family: var(--font-body); font-size: 14.5px; line-height: 1.8; resize: vertical; }
.writer-body-area:focus { border-color: var(--accent-gold); outline: none; }

.dev-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 12px; color: var(--ink-muted); }
.kpi-num { font-family: var(--font-mono); font-size: 25px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.progress-bar-track { height: 7px; border-radius: 99px; background: var(--bg-inset); overflow: hidden; border: 1px solid var(--border-line); }
.progress-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5BA4E5, #F2B94B); transform-origin: left center; transition: transform 320ms var(--ease-out); }

.phase-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.phase-node { padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-line); background: var(--bg-paper); cursor: pointer; text-align: left; transition: border-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.phase-node:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.phase-node.active { border-color: var(--accent-gold); background: var(--accent-gold-soft); }

.paper-card { background: var(--bg-paper); backdrop-filter: blur(12px); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-paper); }
.table-wrap { width: 100%; overflow-x: auto; background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 600; color: var(--ink-muted); background: var(--bg-inset); border-bottom: 1px solid var(--border-line); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.stage-stepper { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.stage-step { padding: 3.5px 8px; border-radius: 4px; border: 1px solid var(--border-line); background: var(--bg-inset); color: var(--ink-muted); font-size: 11px; cursor: pointer; }
.stage-step.done { background: var(--accent-steel-soft); color: var(--accent-steel); border-color: rgba(91, 164, 229, 0.35); }
.stage-step.current { background: var(--accent-gold); color: #110E08; border-color: var(--accent-gold); font-weight: 700; }

.map-board { position: relative; height: 480px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: radial-gradient(circle at 28% 45%, rgba(242, 185, 75, 0.14), transparent 52%), radial-gradient(circle at 76% 65%, rgba(91, 164, 229, 0.16), transparent 48%), var(--bg-paper-solid); overflow: hidden; cursor: crosshair; }
.map-pin { position: absolute; transform: translate(-50%, -50%); padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--bg-paper-solid); color: var(--ink-primary); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-paper); }
.map-pin.checked { opacity: 0.55; text-decoration: line-through; }
.map-pin[data-cat="boss"] { border-color: var(--accent-crimson); color: var(--accent-crimson); }
.map-pin[data-cat="camp"] { border-color: var(--accent-gold); color: var(--accent-gold); }
.map-pin[data-cat="resource"] { border-color: var(--accent-steel); color: var(--accent-steel); }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(6, 8, 12, 0.74); backdrop-filter: blur(8px); display: none; place-items: center; padding: 20px; }
.modal-backdrop.open { display: grid; }
.modal-card { width: min(470px, 100%); background: var(--bg-paper-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-float); }
.modal-title { margin: 0; font-family: var(--font-display); font-size: 18px; }
.modal-desc { margin: 0; font-size: 13px; color: var(--ink-secondary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

#notice { position: fixed; right: 22px; bottom: 22px; z-index: 120; margin: 0; padding: 11px 18px; border-radius: var(--radius-md); background: var(--bg-paper-solid); color: var(--ink-primary); border: 1px solid var(--accent-gold); font-size: 13px; box-shadow: var(--shadow-float); }

@media (max-width: 1080px) {
  .studio-shell, .writer-split, .showcase-grid { grid-template-columns: 1fr; }
  .studio-nav { position: static; flex-direction: row; overflow-x: auto; }
  .dev-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-cat-grid, .dual-door-grid, .grid-2, .article-layout { grid-template-columns: 1fr; }
  .infobox { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
