/* ═══════════════════════════════════════════════
   Infinity Sweeper 攻略 · 主题样式 v2
   改进：系统字体、移动端导航、动效、
         回到顶部、图片回退、通知提示、无障碍
   ═══════════════════════════════════════════════ */

/* ─── 设计令牌 ─── */
:root {
  --bg:        #090d13;
  --bg2:       #0e1520;
  --panel:     #131c2a;
  --panel2:    #192436;
  --text:      #dce8f7;
  --muted:     #8499b8;
  --faint:     #4a5a72;
  --accent:    #4ef0a0;
  --accent-dim:#2db870;
  --accent-glow:rgba(78,240,160,0.18);
  --warn:      #ffbb6b;
  --danger:    #ff6b6b;
  --border:    #1e2f44;
  --border2:   #263a52;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --ease-out:  cubic-bezier(0.16,1,0.3,1);
}

/* ─── 重置 ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 渐变背景 */
  background-image:
    radial-gradient(ellipse 900px 500px at 0% 0%, #0f2040 0%, transparent 65%),
    radial-gradient(ellipse 600px 400px at 100% 100%, #0a1a10 0%, transparent 60%);
}


/* 跳过导航：键盘用户可直接进入正文 */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #04120a;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform .18s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); text-decoration: none; }

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

main:focus:not(:focus-visible) { outline: none; }

/* ─── 链接 ─── */
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: #7dffc0; text-decoration: underline; text-underline-offset: 3px; }

/* ─── 布局容器 ─── */
.wrap { width: min(980px, 94vw); margin: 0 auto; }

/* ══════════════════════════════════════════
   导航头部（含移动端汉堡菜单）
   ══════════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(9,13,19,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1rem;
}

/* Logo */
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.logo:hover { color: var(--accent); text-decoration: none; }
.tag {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--bg);
  background: var(--accent);
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.06em;
}

/* 桌面导航 */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.15rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  background: rgba(78,240,160,0.1);
}

/* 汉堡菜单按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px 7px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端：折叠导航 */
@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9,13,19,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    backdrop-filter: blur(12px);
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 0.55rem 0.75rem; font-size: 0.95rem; }
  /* 保持 sticky：移动端滚动时导航仍可用 */
}

/* ══════════════════════════════════════════
   主内容区
   ══════════════════════════════════════════ */
main { flex: 1; padding: 2.5rem 0 4rem; }

/* 面包屑 */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.breadcrumb::before { content: ""; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* 标题 */
h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 1.75rem;
  line-height: 1.75;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--warn);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.muted { color: var(--muted); font-weight: 400; }

/* ─── Hero 区 ─── */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(240px,400px);
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 800px) {
  .hero-split { grid-template-columns: 1fr; }
}
.hero-art {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(78,240,160,0.05);
  background: var(--panel);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.hero-art:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.6), 0 0 30px rgba(78,240,160,0.08);
}
.hero-art img { width: 100%; height: auto; display: block; }
.hero-art figcaption {
  padding: 0.45rem 0.8rem;
  font-size: 0.75rem;
  color: var(--faint);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* 图片加载失败回退 */
img[src] { background: var(--panel); }
img.img-failed::after {
  content: "本地图片加载失败，请检查 assets/images 文件夹";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ─── 按钮 ─── */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.btn {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color .15s, background .15s, transform .15s;
  cursor: pointer;
  background: var(--panel);
}
.btn:hover {
  border-color: var(--accent-dim);
  background: var(--panel2);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #04120a;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 16px rgba(78,240,160,0.25);
}
.btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78,240,160,0.35);
}

/* ─── 卡片网格 ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.card:hover::before { opacity: 1; }
.card h2 { margin: 0 0 0.45rem; font-size: 1.02rem; }
.card h2 a { color: var(--text); }
.card h2 a:hover { color: var(--accent); text-decoration: none; }
.card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ─── 目录面板 ─── */
.toc-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.6rem;
  margin-bottom: 2rem;
}
.toc-panel h2 { margin: 0 0 0.8rem; font-size: 1.05rem; }
.toc-list { margin: 0; padding-left: 1.3rem; color: var(--muted); }
.toc-list li { margin: 0.4rem 0; font-size: 0.95rem; }

/* ─── 说明框 ─── */
.note {
  background: var(--panel);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.note h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.small { font-size: 0.83rem; color: var(--muted); }

/* ─── 文章内正文样式 ─── */
.article h2 { margin-top: 2.25rem; font-size: 1.2rem; color: var(--text); }
.article h3 { margin-top: 1.5rem; font-size: 1rem; color: var(--text); }
.article ul, .article ol { padding-left: 1.4rem; color: var(--muted); }
.article li { margin: 0.4rem 0; }
.article p { color: var(--muted); margin-bottom: 0.75rem; }
.article strong { color: var(--text); }

/* ─── FAQ块 ─── */
.faq-block {
  margin-top: 2.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.faq-block:last-of-type { border-bottom: none; }
.faq-block h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--text);
}
.faq-block ul, .faq-block ol {
  padding-left: 1.4rem;
  color: var(--muted);
}
.faq-block li { margin: 0.45rem 0; }
.faq-block p { color: var(--muted); margin-bottom: 0.5rem; }
.faq-block strong { color: var(--text); }

/* ─── 提示框 ─── */
.callout {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(78,240,160,0.06);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}
.callout strong { color: var(--accent); display: block; margin-bottom: 0.4rem; }
.callout ol, .callout ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }

/* ─── 定义列表 ─── */
.deflist dt { font-weight: 600; color: var(--accent); margin-top: 1rem; }
.deflist dd { margin: 0.3rem 0 0; color: var(--muted); padding-left: 0.5rem; }

/* ─── 翻页导航 ─── */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ─── 媒体横幅 ─── */
.media-banner {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}
.media-banner img { width: 100%; height: auto; display: block; }
/* 图片加载失败占位 */
.media-banner .img-placeholder {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 0.85rem;
  background: var(--panel);
}


/* ─── Hub 网格 ─── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px,1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.hub-card {
  display: block;
  padding: 1.25rem 1.3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.hub-card:hover {
  border-color: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.hub-card h3 { margin: 0.4rem 0 0.5rem; font-size: 1.12rem; color: var(--text); }
.hub-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hub-priority {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--warn);
  padding: 0.18rem 0.42rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ─── 紧凑FAQ ─── */
.compact-faq {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  background: rgba(14,21,32,0.7);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.compact-faq h3 { margin: 1rem 0 0.35rem; font-size: 1rem; color: var(--text); }
.compact-faq h3:first-child { margin-top: 0; }
.compact-faq p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ─── 图鉴导航 ─── */
.catalog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
}
.catalog-nav a {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  transition: color .15s, border-color .15s, background .15s;
}
.catalog-nav a:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  background: var(--panel);
  text-decoration: none;
}

/* ─── 总表 ─── */
.compendium-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.compendium-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  min-width: 600px;
}
.compendium-table th, .compendium-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.compendium-table th {
  background: var(--panel2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.compendium-table tbody tr:hover td { background: rgba(78,240,160,0.03); }
.compendium-table .tag-col { white-space: nowrap; color: var(--accent); font-weight: 600; }
.compendium-table .src { font-size: 0.78rem; color: var(--muted); }

/* ─── 道具卡片 ─── */
.item-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  transition: border-color .2s;
}
.item-card:hover { border-color: var(--border2); }
.item-card h3 { margin: 0 0 0.4rem; font-size: 1.02rem; color: var(--text); }
.item-card .meta {
  font-size: 0.72rem;
  color: var(--warn);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.item-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ─── 无障碍 ─── */
.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;
}

/* ─── 页脚 ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  font-size: 0.8rem;
  color: var(--faint);
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ══════════════════════════════════════════
   回到顶部按钮
   ══════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--panel2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s var(--ease-out);
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--panel);
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ══════════════════════════════════════════
   通知提示条
   ══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--panel2);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease-out);
  z-index: 200;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   页面进入动效
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.article > * { animation: fadeUp .45s var(--ease-out) both; }
.article > *:nth-child(1) { animation-delay: .05s; }
.article > *:nth-child(2) { animation-delay: .10s; }
.article > *:nth-child(3) { animation-delay: .15s; }
.article > *:nth-child(4) { animation-delay: .20s; }
.article > *:nth-child(5) { animation-delay: .25s; }

.hero-copy { animation: fadeUp .5s .05s var(--ease-out) both; }
.hero-art  { animation: fadeUp .5s .15s var(--ease-out) both; }
.toc-panel { animation: fadeUp .45s .2s var(--ease-out) both; }
.cards .card:nth-child(n) { animation: fadeUp .4s var(--ease-out) both; }
.cards .card:nth-child(1) { animation-delay: .1s; }
.cards .card:nth-child(2) { animation-delay: .15s; }
.cards .card:nth-child(3) { animation-delay: .2s; }
.cards .card:nth-child(4) { animation-delay: .25s; }
.cards .card:nth-child(5) { animation-delay: .3s; }
.cards .card:nth-child(6) { animation-delay: .35s; }
.cards .card:nth-child(7) { animation-delay: .4s; }
.cards .card:nth-child(8) { animation-delay: .45s; }
.cards .card:nth-child(9) { animation-delay: .5s; }

/* ══════════════════════════════════════════
   内联搜索框（图鉴总表用）
   ══════════════════════════════════════════ */
.table-search {
  width: 100%;
  max-width: 380px;
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s;
  margin-bottom: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238499b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem center;
}
.table-search:focus { border-color: var(--accent-dim); }
.table-search::placeholder { color: var(--faint); }


.table-status {
  min-height: 1.4em;
  margin: -0.45rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-col {
  width: 5.6rem;
  white-space: nowrap;
  text-align: right;
}
.copy-row-btn {
  padding: 0.32rem 0.58rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}
.copy-row-btn:hover, .copy-row-btn:focus-visible {
  border-color: var(--accent-dim);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════
   响应式微调
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .pager { flex-direction: column; }
  .pager .btn { text-align: center; }
  #back-to-top { bottom: 1.2rem; right: 1rem; }
}


/* ══════════════════════════════════════════
   资深玩家作战手册新增样式
   ══════════════════════════════════════════ */
.quick-panel {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border2);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(78,240,160,0.09), rgba(255,187,107,0.04)),
    var(--panel);
  box-shadow: 0 16px 50px rgba(0,0,0,0.32);
}
.quick-panel h2 { margin: 0 0 .45rem; font-size: 1.18rem; }
.quick-panel p { color: var(--muted); }
.home-command { margin-top: 0; }
.route-selector {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0;
}
.route-btn, .route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: .45rem .82rem;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: rgba(19,28,42,.9);
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.route-btn:hover, .route-link:hover,
.route-btn.is-active {
  background: rgba(78,240,160,.12);
  border-color: var(--accent-dim);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.route-result {
  margin-top: .85rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(78,240,160,.28);
  border-radius: var(--radius);
  background: rgba(9,13,19,.42);
}
.route-result h3 { margin-top: 0; color: var(--text); }
.route-result ul { margin: .55rem 0 0; }
.featured-card {
  border-color: rgba(78,240,160,.45);
  background: linear-gradient(180deg, rgba(78,240,160,.07), rgba(19,28,42,.98));
}
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.phase-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(19,28,42,.78);
}
.phase-card h3 { margin: .55rem 0 .35rem; color: var(--text); }
.phase-card p { margin: 0; font-size: .9rem; }
.pill {
  display: inline-block;
  padding: .16rem .48rem;
  border-radius: 999px;
  background: rgba(255,187,107,.12);
  color: var(--warn);
  border: 1px solid rgba(255,187,107,.25);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .05em;
}
.priority-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.priority-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: .9rem;
}
.priority-table th, .priority-table td {
  padding: .72rem .85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.priority-table th {
  background: var(--panel2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
}
.priority-table tr:last-child td { border-bottom: 0; }
.decision-tree {
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}
.decision-tree li {
  position: relative;
  margin: .7rem 0;
  padding: .75rem .9rem .75rem 2.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(19,28,42,.72);
}
.decision-tree li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: .8rem;
  top: .75rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #04120a;
  font-size: .78rem;
  font-weight: 800;
}
.checklist-panel {
  display: grid;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(9,13,19,.38);
}
.checklist-panel label {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  color: var(--muted);
}
.checklist-panel input {
  margin-top: .28rem;
  accent-color: var(--accent);
}
.checklist-panel.compact { margin-top: .8rem; }
.review-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,187,107,.28);
  border-radius: var(--radius);
  background: rgba(255,187,107,.06);
}
.review-card p:last-child { margin-bottom: 0; }
.review-card.mini { margin-top: .75rem; padding: .75rem .9rem; }
@media (max-width: 600px) {
  .quick-panel { padding: 1.1rem; }
  .route-btn, .route-link { width: 100%; }
  .priority-table { min-width: 560px; }
}


/* ══════════════════════════════════════════
   图鉴配图增强
   ══════════════════════════════════════════ */
.media-disclaimer {
  margin: -.3rem 0 1.15rem;
  color: var(--faint);
  font-size: .84rem;
}
.compendium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1rem;
  margin: 0 0 1.6rem;
}
.compendium-entry {
  display: block;
  padding: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19,28,42,.96), rgba(13,19,29,.98));
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.compendium-entry:hover {
  text-decoration: none;
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.compendium-entry h3 {
  margin: .85rem 0 .35rem;
  color: var(--text);
  font-size: 1rem;
}
.compendium-entry p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}
.compendium-thumb {
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(8,12,18,.7);
}
.compendium-thumb img,
.item-media img {
  display: block;
  width: 100%;
  height: auto;
}
.item-card--media {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1rem 1.2rem;
  align-items: start;
}
.item-card--media .item-body {
  min-width: 0;
}
.item-media {
  margin: 0;
}
.item-media img {
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(8,12,18,.72);
}
.item-media-note {
  margin-top: .42rem;
  color: var(--faint);
  font-size: .76rem;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .item-card--media {
    grid-template-columns: 1fr;
  }
}


/* ══════════════════════════════════════════
   图鉴增强版：可点击放大 + 更强视觉反馈
   ══════════════════════════════════════════ */
.enhanced-note {
  margin: .65rem 0 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(78,240,160,.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(78,240,160,.08), rgba(19,28,42,.94));
  color: var(--muted);
  font-size: .88rem;
}
.compendium-thumb,
.item-media {
  position: relative;
}
.compendium-thumb::after,
.item-media::after {
  content: '点击放大';
  position: absolute;
  right: .65rem;
  bottom: .65rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(9,13,19,.72);
  border: 1px solid rgba(255,255,255,.10);
  color: #dfe8ff;
  font-size: .74rem;
  pointer-events: none;
  opacity: .92;
}
.compendium-thumb img,
.item-media img {
  cursor: zoom-in;
  transition: transform .22s, box-shadow .22s, filter .22s;
}
.compendium-entry:hover .compendium-thumb img,
.item-card--media:hover .item-media img {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 18px 36px rgba(0,0,0,.28);
  filter: saturate(1.05);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5,8,13,.82);
  backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; }
.lightbox-dialog {
  width: min(100%, 1080px);
  max-height: 100%;
  overflow: auto;
  background: linear-gradient(180deg, rgba(16,23,35,.98), rgba(10,15,23,.98));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.lightbox-title {
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
}
.lightbox-close {
  border: 1px solid var(--border2);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  min-width: 2.2rem;
  min-height: 2.2rem;
  cursor: pointer;
  font: inherit;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.lightbox-body { padding: 1rem; }
.lightbox-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(8,12,18,.75);
}
.lightbox-caption {
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}
@media (max-width: 720px) {
  .lightbox { padding: 1rem; }
  .lightbox-head { padding: .8rem .85rem; }
  .lightbox-body { padding: .85rem; }
}


/* ══════════════════════════════════════════
   官方在线素材本地化增强
   ══════════════════════════════════════════ */
.item-media--official {
  padding: .72rem;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015)),
    rgba(8,12,18,.52);
  border: 1px solid rgba(255,255,255,.08);
}
.item-media--official img {
  max-height: 260px;
  object-fit: contain;
  border-radius: 18px;
  border: 0;
  background: rgba(7,10,16,.35);
}
.item-card--media:hover .item-media--official img {
  transform: translateY(-2px) scale(1.025);
}
.item-media--official .item-media-note::before {
  content: '来源：';
  color: var(--accent);
  font-weight: 700;
}
.compendium-thumb--official img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(7,10,16,.55);
}
.compendium-thumb--official img[src$=".jpg"] {
  image-rendering: auto;
}
.asset-source-list {
  font-size: .86rem;
  color: var(--muted);
}
.asset-source-list li { margin: .35rem 0; }


/* ══════════════════════════════════════════
   V7 作战台优化：仪表盘 / 第一局 / 流派 / 数据库 / 复盘器
   ══════════════════════════════════════════ */
.home-dashboard {
  margin: 2rem 0;
  padding: 1.35rem;
  border: 1px solid var(--border2);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(circle at 18% 0%, rgba(78,240,160,.13), transparent 34%),
    radial-gradient(circle at 92% 20%, rgba(255,187,107,.10), transparent 30%),
    var(--panel);
  box-shadow: 0 18px 60px rgba(0,0,0,.32);
}
.dashboard-head h2 { margin: .15rem 0 .35rem; }
.dashboard-head p { color: var(--muted); margin: 0 0 1rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.dash-card {
  display: block;
  padding: 1rem 1.05rem;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19,28,42,.96), rgba(13,19,29,.98));
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.dash-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--accent-dim);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.primary-dash {
  border-color: rgba(78,240,160,.45);
  background: linear-gradient(180deg, rgba(78,240,160,.13), rgba(19,28,42,.96));
}
.dash-kicker {
  display: inline-flex;
  margin-bottom: .55rem;
  padding: .14rem .48rem;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid rgba(78,240,160,.25);
  background: rgba(78,240,160,.08);
  font-size: .72rem;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.dash-card h2, .dash-card h3 { margin: 0 0 .45rem; color: var(--text); font-size: 1.05rem; }
.dash-card p { margin: 0; color: var(--muted); font-size: .9rem; }

.timeline-run {
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(19,28,42,.72);
}
.timeline-run h2 { margin-top: 0; }
.timeline-run li + li { margin-top: .45rem; }
.decision-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: .65rem;
  margin-top: 1rem;
}
.decision-strip span {
  padding: .7rem .8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(9,13,19,.38);
  color: var(--muted);
  font-size: .88rem;
}
.check-list li { margin: .4rem 0; }

.build-archetypes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.build-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19,28,42,.92), rgba(13,19,29,.98));
}
.build-card h2 { margin: .2rem 0 .75rem; font-size: 1.08rem; }
.build-card dl { margin: 0; }
.build-card dt {
  margin-top: .62rem;
  color: var(--accent);
  font-weight: 700;
  font-size: .84rem;
}
.build-card dd {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.source-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.source-card h2 { margin-top: 0; font-size: 1.05rem; }
.source-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: .25rem .35rem .25rem 0;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.source-badge.confirmed { color: #9ff6c4; border-color: rgba(78,240,160,.35); background: rgba(78,240,160,.10); }
.source-badge.inferred { color: #ffd19b; border-color: rgba(255,187,107,.35); background: rgba(255,187,107,.10); }
.source-badge.guide { color: #aecaef; border-color: rgba(132,153,184,.35); background: rgba(132,153,184,.10); }
.source-badge.pending { color: #ffb7c2; border-color: rgba(255,107,126,.35); background: rgba(255,107,126,.10); }

.codex-filters {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(130px, .9fr)) auto;
  gap: .75rem;
  align-items: end;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(19,28,42,.72);
}
.codex-filters label {
  display: grid;
  gap: .32rem;
  color: var(--muted);
  font-size: .8rem;
}
.codex-filters input,
.codex-filters select {
  min-height: 2.35rem;
  padding: .45rem .65rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--panel2);
  color: var(--text);
  font: inherit;
}
.codex-db .db-thumb { width: 84px; }
.codex-db .db-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(8,12,18,.7);
}
.codex-db td p { margin: .28rem 0 0; color: var(--muted); font-size: .82rem; }
.crash-coach {
  margin: 1.5rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(78,240,160,.28);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(78,240,160,.10), rgba(255,187,107,.04)),
    var(--panel);
}
.coach-form {
  display: grid;
  gap: .55rem;
  margin: 1rem 0;
}
.coach-form label {
  padding: .62rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9,13,19,.32);
  color: var(--muted);
}
.coach-form input { margin-right: .5rem; }
.coach-result {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(9,13,19,.42);
}
.coach-result h3 { margin-top: 0; }
@media (max-width: 820px) {
  .codex-filters { grid-template-columns: 1fr; }
}
