/* 主题令牌（取自帮助中心 index_2.3.2.css） */
/* ============================================================
   WinUI 3 / Fluent Design 主题 · 帮助文档页
   - 令牌与 changelog 页保持一致
   - 浅色强调色 #00BBFF，深色 #005FB8
   - 深色文字整体压暗
   ============================================================ */

/* ---------- 设计令牌：浅色 ---------- */
:root {
    --accent: #00AAFF;
    --accent-hover: #33BBFF;
    --accent-pressed: #0099E6;
    --text-on-accent: #1B1B1B;

    --bg: #F3F3F3;
    --bg-layer: rgba(252, 252, 252, 0.7);
    --card-bg: #FFFFFF;
    --card-hover: #F9F9F9;
    --card-pressed: #F1F1F1;
    --control-bg: rgba(255, 255, 255, 0.7);
    --control-hover: rgba(0, 0, 0, 0.037);
    --control-focus-bg: #FFFFFF;
    --dialog-bg: #FCFCFC;

    --text-primary: #1B1B1B;
    --text-secondary: #5D5D5D;
    --text-tertiary: #868686;

    --stroke: rgba(0, 0, 0, 0.0578);
    --stroke-strong: rgba(0, 0, 0, 0.16);

    --danger: #C42B1C;

    /* 顶部额外偏移：zdelauncher_pager 下由 JS 设为 44px */
    --titlebar-inset: 0px;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-xs: 2px;

    --ease: cubic-bezier(0.2, 0, 0, 1);
    --dur: 150ms;
}

/* ---------- 设计令牌：深色 ---------- */
.dark {
    --accent: #005FB8;
    --accent-hover: #1A6FC4;
    --accent-pressed: #004C93;
    --text-on-accent: #FFFFFF;

    --bg: #202020;
    --bg-layer: rgba(44, 44, 44, 0.7);
    --card-bg: rgba(255, 255, 255, 0.0512);
    --card-hover: rgba(255, 255, 255, 0.0837);
    --card-pressed: rgba(255, 255, 255, 0.0326);
    --control-bg: rgba(255, 255, 255, 0.0605);
    --control-hover: rgba(255, 255, 255, 0.0837);
    --control-focus-bg: rgba(255, 255, 255, 0.0837);
    --dialog-bg: #2B2B2B;

    --text-primary: rgba(255, 255, 255, 0.85);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.44);

    --stroke: rgba(255, 255, 255, 0.0698);
    --stroke-strong: rgba(255, 255, 255, 0.16);

    --danger: #D97A85;

    color: var(--text-primary);
    background-color: var(--bg);
    background-image: none;
}
body.dark,
.dark body {
    background-color: var(--bg);
    background-image: none;
}

/* ---------- 基础重置 ---------- */
::selection {
    background: rgba(0, 187, 255, 0.3);
    color: inherit;
}
.dark ::selection {
    background: rgba(96, 205, 255, 0.3);
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    transition: filter 0.1s;
}

body {
    margin: 0 auto;
    font-family: "Segoe UI Variable Text", "Segoe UI",
                 "Microsoft YaHei UI", "Microsoft YaHei",
                 "PingFang SC", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 50% 0,
            rgba(0, 187, 255, 0.07), rgba(0, 187, 255, 0) 70.71%),
        radial-gradient(circle at 6.7% 75%,
            rgba(0, 187, 255, 0.06), rgba(0, 187, 255, 0) 70.71%),
        radial-gradient(circle at 93.3% 75%,
            rgba(135, 100, 255, 0.05), rgba(135, 100, 255, 0) 70.71%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: "fusion-pixel";
    src: url("/assets/FusionPixelMonoPatched.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ---------- 链接 ---------- */
a, a:link, a:active, a:visited, a:hover, a:focus {
    color: var(--accent);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    outline: none;
    border: none;
    background: none;
    text-decoration: none;
}

a:focus-visible,
summary:focus-visible,
.corner_button:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* ---------- 表格 ---------- */
table {
    margin: 0 auto;
    border-collapse: collapse;
    text-align: center;
    width: 90%;
}

/* ---------- 深色遮罩（保留结构，不再叠加变暗） ---------- */
.dark::after {
    content: '';
    position: fixed;
    z-index: 99999;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
}

/* ---------- 搜索区 ---------- */
.search_box {
    z-index: 999;
    position: fixed;
    top: calc(6px + var(--titlebar-inset));
    left: 0;
    width: 100%;
    height: 44px;
    text-align: center;
    pointer-events: none;
    overflow: hidden;
}

.search_form {
    display: flex;
    align-items: center;
    margin: 0 auto;
    width: calc(100% - 20px);
    max-width: 420px;
    height: 44px;
    box-sizing: border-box;
    background-color: var(--control-bg);
    border: 1px solid var(--stroke);
    border-bottom-color: var(--stroke-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    backdrop-filter: blur(30px) saturate(150%);
    transform: translateZ(0);
    transition: background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
.search_form:focus-within {
    background-color: var(--control-focus-bg);
    border-bottom-color: var(--accent);
    box-shadow: inset 0 -1px 0 0 var(--accent),
                0 2px 8px rgba(0, 0, 0, 0.06);
}
.search_form input {
    outline: none;
    border: none;
    height: 100%;
    vertical-align: middle;
    pointer-events: auto;
}

#kw {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 4px 0 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background-color: transparent;
}
#kw::placeholder {
    color: var(--text-tertiary);
}

#btn {
    flex: 0 0 44px;
    width: 44px;
    height: 100%;
    padding: 0;
    border: none;
    outline: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background-color: transparent;
    background-image: url(../assets/img/ic_search.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
    opacity: 0.85;
    transition: background-color var(--dur) var(--ease),
                background-size 0.1s;
}
.dark #btn {
    filter: invert(1.0);
}
#btn:active {
    background-size: 14px;
    background-color: var(--card-pressed);
}

/* ---------- 主内容 ---------- */
#main {
    max-width: 1200px;
    min-height: calc(100vh - 142px);
    margin: auto;
    margin-top: 58px;
}

hr {
    border: none;
    height: 1px;
    margin: 8px 0;
    background-color: var(--stroke);
}

.maps {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ---------- 列表卡片 ---------- */
.list, .middle {
    width: calc(100% - 20px);
    max-width: 800px;
    margin: 0 auto 10px;
    padding: 10px 16px;
    box-sizing: border-box;
    line-height: 1.7;
    font-size: 14px;
    border-radius: var(--radius);
}

.list {
    background-color: var(--card-bg);
    border: 1px solid var(--stroke);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
.list:active {
    background-color: var(--card-pressed);
}

.list .title {
    line-height: 32px;
}
.list .title strong {
    color: var(--danger);
    font-weight: 600;
}

.version {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 展开内容 ---------- */
.content {
    list-style-type: none;
    counter-reset: sectioncounter;
    margin: 0;
    padding: 0 0 0 22px;
    display: none;
    font-size: 14px;
    max-height: calc(90vh - 94px);
    overflow-y: auto;
}

.content div {
    color: var(--text-secondary);
    text-indent: 0;
    font-size: 13px;
}

.content img {
    border-radius: var(--radius-sm);
    max-width: 100%;
}

.arrow {
    color: var(--accent);
    margin-right: 5px;
}

.highlight {
    padding: 2px 4px;
    border-radius: var(--radius-xs);
    background: rgba(0, 187, 255, 0.15);
    color: #0077A8;
}
.dark .highlight {
    background: rgba(96, 205, 255, 0.16);
    color: #7BD7FF;
}

/* ---------- 加载层 ---------- */
#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
}
#loading img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25%;
    max-width: 195px;
}

/* ---------- 悬浮按钮 ---------- */
.corner_button {
    z-index: 999;
    position: fixed;
    right: 16px;
    bottom: 64px;
    width: 36px;
    height: 36px;
    line-height: 34px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: background-color var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}
#old_page {
    bottom: 150px;
    line-height: 16px;
    width: 32px;
    height: 32px;
    padding: 4px;
    font-size: 12px;
}
#theme {
    bottom: 105px;
}
#theme img {
    width: 60%;
    margin: 20%;
}
.dark #theme img {
    filter: invert(1.0);
}
.corner_button:active {
    transform: scale(0.92);
    background-color: var(--card-pressed);
}

/* ---------- 页脚 ---------- */
#copyright {
    padding: 24px 30px;
    line-height: 22px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    background: #1A1C26;
    text-align: center;
}
.dark #copyright {
    background: #16181F;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- 对话框遮罩（结构保留） ---------- */
.shadow {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

/* ============================================================
   悬停态
   ============================================================ */
@media (any-hover: hover) {
    .content::-webkit-scrollbar {
        width: 12px;
        background-color: transparent;
    }
    .content::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border: 4px solid transparent;
        background-clip: padding-box;
        border-radius: 8px;
        transition: background 0.1s;
    }
    .content:hover::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.35);
        background-clip: padding-box;
        border-width: 3px;
    }
    .dark .content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        background-clip: padding-box;
    }
    .dark .content:hover::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.35);
        background-clip: padding-box;
    }

    #btn:hover {
        background-color: var(--control-hover);
        transition: background-color 0.2s var(--ease);
    }

    .list:hover {
        background-color: var(--card-hover);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    }

    .corner_button:hover {
        background-color: var(--card-hover);
    }
}
/* ============================================================
   Mica 背景层  — DSH 2026-10-23 追加
   替代原来的纯色 / 彩色光晕，贴合 WinUI 3 的窗口底
   ============================================================ */
:root{
    --mica-tint: rgba(0, 120, 212, 0.035);
    --mica-vignette: rgba(0, 0, 0, 0.022);
}
.dark{
    --mica-tint: rgba(96, 205, 255, 0.035);
    --mica-vignette: rgba(0, 0, 0, 0.22);
}
body, body.dark, .dark body{
    background-image:
        url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='160'%20height='160'%20filter='url(%23n)'%20opacity='0.05'/%3E%3C/svg%3E"),
        radial-gradient(1100px 620px at 50% -18%, var(--mica-tint), transparent 72%),
        radial-gradient(140% 120% at 50% 50%, transparent 52%, var(--mica-vignette) 100%);
    background-attachment: fixed;
}

/* ===== wiki 布局与组件样式（与 0vej wiki 一致） ===== */
/* 零维E界 Wiki · 只读资料库
   配色令牌复用 /help/index_2.3.2.css，这里只写布局 */
*{ box-sizing: border-box; }
body{
  margin:0; padding:0; background: var(--bg); color: var(--text-primary);
  font-family:"Segoe UI Variable Text","Segoe UI",system-ui,"Microsoft YaHei UI","Microsoft YaHei",sans-serif;
  font-size:14px; line-height:1.7;
}
a{ color: var(--accent); text-decoration:none; }
.wrap{ max-width: 1120px; margin: 0 auto; padding: 0 12px 48px; }

/* 顶栏 */
.top{ position: sticky; top:0; z-index: 20; background: var(--card-bg);
      border-bottom: 1px solid var(--stroke); backdrop-filter: blur(12px); }
:root{ --top-ctl-h: 38px; }   /* 顶栏控件统一高度 */
.top-in{ max-width:1120px; margin:0 auto; padding: 10px 16px; display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.brand{ display:inline-flex; align-items:center; gap:8px; font-size:17px; font-weight:600;
        color: var(--text-primary); white-space:nowrap; }
.brand:hover{ text-decoration:none; }
.brand-logo{ width:26px; height:26px; border-radius: var(--radius-sm); object-fit:cover; display:block; }
.brand em{ color: var(--accent); font-style:normal; }
.nav{ display:flex; gap:14px; font-size:14px; flex-wrap:wrap; }
.nav a{ color: var(--text-secondary); }
.nav a.cur{ color: var(--accent); font-weight:600; }
/* 搜索：WinUI3 风格，整块是一个输入框，按钮内嵌在右侧 */
.top .search{
  margin-left:auto; display:flex; align-items:center; gap:0;
  height: var(--top-ctl-h); padding:0; overflow:hidden;
  background: var(--control-bg);
  border:1px solid var(--stroke); border-bottom-color: var(--stroke-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.top .search:focus-within{
  background: var(--control-focus-bg);
  border-bottom-color: var(--accent);
  box-shadow: inset 0 -1px 0 0 var(--accent), 0 2px 8px rgba(0,170,255,.18);
}
.top .search input{
  width: 210px; height:100%; padding:0 4px 0 12px; font-size:13px; outline:none;
  color: var(--text-primary); background: transparent; border:none; border-radius:0;
}
.top .search input::placeholder{ color: var(--text-tertiary); }
.top .search button{
  flex:0 0 34px; width:34px; height:100%; margin:0; padding:0;
  border:none; border-radius:0; background-color:transparent;
  background-image: url('/assets/img/ic_search.png');
  background-position: center; background-repeat:no-repeat; background-size:15px;
  opacity:.8; cursor:pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.top .search button:hover{ background-color: var(--control-hover); opacity:1; }
.top .search button:active{ background-color: var(--card-pressed); background-size:13px; }
body.dark .top .search button{ filter: invert(1); opacity:.72; }
body.dark .top .search button:hover{ opacity:.95; }

/* 顶栏窄屏：品牌 + 问答一行，搜索框独占一行（占满宽度），导航最后一行可横滑 */
@media (max-width: 600px){
  .top-in{
    display:grid; gap:8px; padding:8px 12px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand brand" "search qa" "nav nav";
  }
  .brand{ grid-area:brand; font-size:16px; }
  .nav{ grid-area:nav; flex-wrap:nowrap; overflow-x:auto; gap:12px;
        padding-bottom:2px; -webkit-overflow-scrolling:touch; }
  .nav::-webkit-scrollbar{ display:none; }
  .top .search{ grid-area:search; margin:0; width:100%; }
  .top .search input{ width:auto; flex:1 1 auto; min-width:0; }
  .top .search button{ flex:0 0 34px; padding:0; }
  .qa_btn{ grid-area:qa; margin:0 0 0 8px; padding:0; width: var(--top-ctl-h);
           height: var(--top-ctl-h); align-self:center; }
  /* pager 里品牌行不显示，栅格也跟着少一行 */
  body.in-launcher .top-in, body.pager-shift .top-in{ grid-template-areas: "search qa" "nav nav"; }
}

/* 浅色模式的卡片与顶栏也给半透明 + 模糊（深色早就有了，之前两边视觉不统一） */
body:not(.dark) .card{ background: rgba(255, 255, 255, 0.78); }
body.dark .card{ background: rgba(255, 255, 255, 0.084); }
body .card{ -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); }
/* 顶栏跟 changelog 的 switchbar 完全一致：--bg-layer + blur(30px) saturate(160%) */
body .top{
  background: var(--bg-layer);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  backdrop-filter: blur(30px) saturate(160%);
}

/* 通用块 */
.card{ background: var(--card-bg); border:1px solid var(--stroke); border-radius: var(--radius);
       padding:16px 18px; margin-top:14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
h1{ font-size:24px; line-height:1.3; margin:18px 0 6px; }
h2{ font-size:16px; margin:0 0 10px; padding-bottom:8px; border-bottom:1px solid var(--stroke); }
h3{ font-size:14px; margin:16px 0 8px; color: var(--text-secondary); }
.sub{ color: var(--text-tertiary); font-size:12.5px; }
.grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap:8px; }
.tile{ display:flex; align-items:center; gap:8px; padding:8px; border-radius:8px;
       border:1px solid var(--stroke); background: transparent; }
.tile:hover{ background: var(--control-hover); text-decoration:none; }
.tile img{ width:38px; height:38px; image-rendering: pixelated;
           object-fit: cover; object-position: left center;   /* 图标是 128×64 两帧，只显示左半帧 */ }
.tile .no{ color: var(--text-tertiary); font-size:11.5px; font-variant-numeric: tabular-nums; }
.tile .nm{ font-size:13.5px; color: var(--text-primary); }

/* 属性徽章 */
.tb{ display:inline-block; padding:1px 9px 1px 5px; margin:1px 2px 1px 0; border-radius: 10px;
     font-size:12px; line-height:19px; color:#fff; white-space:nowrap; }
.tb .tico{ width:14px; height:14px; vertical-align:-2px; margin-right:3px; }
/* 裁好的属性徽章图 */
.tbimg{ height:20px; width:auto; vertical-align:-4px; margin:1px 3px 1px 0; }
.card h2 .tbimg{ height:26px; vertical-align:-6px; }
.catimg{ height:20px; width:auto; vertical-align:-4px; }

/* 图片 */
.art{ width:160px; height:160px; object-fit:contain; image-rendering:pixelated; }
.iart{ width:48px; height:48px; object-fit:contain; image-rendering:pixelated; }
.iico{ width:24px; height:24px; object-fit:contain; image-rendering:pixelated;
       vertical-align:middle; margin-right:6px; display:inline-block; }
/* 宝可梦小图标（128×64 两帧，只取左半帧） */
.mini{ width:32px; height:32px; image-rendering:pixelated; vertical-align:middle;
       object-fit:cover; object-position:left center; margin-right:6px; display:inline-block; }
/* 道具图标 + 名字排一行（训练家携带、训练家自带道具） */
.itemcell{ display:inline-flex; align-items:center; gap:4px; margin-right:10px; }
.itemcell .iico{ width:22px; height:22px; margin-right:0; }
.tcard-line .iico{ width:22px; height:22px; margin-right:0; }

/* 种族值 */
.stats{ display:grid; grid-template-columns: 64px 1fr 42px; gap:4px 10px; align-items:center; max-width:520px; }
.stats .k{ color: var(--text-secondary); font-size:13px; }
.stats .bar{ height:7px; border-radius:4px; background: var(--control-hover); overflow:hidden; }
.stats .bar i{ display:block; height:100%; background: var(--accent); border-radius:4px; }
.stats .v{ text-align:right; font-variant-numeric: tabular-nums; font-size:13px; }

/* 数据表 */
table{ border-collapse: collapse; width:100%; font-size:13.5px; margin:0; }
th,td{ border-bottom:1px solid var(--stroke); padding:6px 10px; text-align:left; vertical-align:top; }
th{ font-weight:600; color: var(--text-secondary); background: var(--control-hover); }
tr:last-child td{ border-bottom:none; }

/* 招式表 */
.moves{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:2px 14px; font-size:13.5px; }
.moves .lv{ color: var(--text-tertiary); font-variant-numeric: tabular-nums; display:inline-block; width:44px; }

/* 训练家 */
.filter{ display:flex; gap:10px; align-items:center; margin:10px 0 0; }
.filter select{ padding:5px 8px; border:1px solid var(--stroke-strong); border-radius: var(--radius-sm);
                background: var(--card-bg); color: var(--text-primary); font-size:13px; }
.tart{ width:110px; height:110px; object-fit:contain; image-rendering:pixelated;
       border:1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--card-bg); }
.tart-empty{ display:flex; align-items:center; justify-content:center; }
.tart-empty span{ font-size:12px; color: var(--text-tertiary); }
.tgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:12px; }
.tcard{ border:1px solid var(--stroke); border-radius: var(--radius-sm); padding:10px 12px; background: var(--card-bg); }
.tcard-head{ display:flex; gap:10px; align-items:center; }
.tcard-head img{ width:48px; height:48px; flex:0 0 48px; image-rendering:pixelated;
                 object-fit:cover; object-position:left center; }
.tcard-ph{ display:block; width:48px; height:48px; flex:0 0 48px; }
.tcard-name{ font-size:14.5px; font-weight:600; }
.tcard-name .lv{ font-weight:400; font-size:12px; color: var(--text-tertiary); }
.tcard-meta{ margin-top:3px; }
.tag{ display:inline-block; margin-right:4px; padding:0 6px; border-radius:8px; font-size:11.5px;
      color: var(--text-secondary); background: var(--control-hover); }
.tcard-line{ font-size:12.5px; color: var(--text-secondary); margin-top:6px; display:flex; gap:6px; }
.tcard-line .k{ color: var(--text-tertiary); flex:0 0 auto; }
.mvtags{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
a.mvtag{ font-size:11.5px; color: var(--text-secondary); border:1px solid var(--stroke);
         border-left-width:3px; border-radius:8px; padding:1px 7px; }
a.mvtag:hover{ background: var(--control-hover); color: var(--text-primary); }

/* 说明条 */
.note{ margin-top:12px; padding:9px 12px; border-radius: var(--radius-sm);
       border:1px solid var(--stroke); background: var(--card-bg);
       font-size:13px; color: var(--text-secondary); line-height:1.6; }
.note b{ color: var(--text-primary); }

/* 唱片自定义播放器 */
.cd-player{ display:flex; align-items:center; gap:10px; margin:2px 0 8px; }
.cd-play{ flex:0 0 auto; width:34px; height:34px; padding:0; font-size:13px; line-height:1;
          cursor:pointer; color:#fff; background: var(--accent); border:none;
          border-radius:50%; display:flex; align-items:center; justify-content:center; }
.cd-play:hover{ background: var(--accent-hover); }
.cd-play:active{ transform: scale(.94); }
.cd-meter{ position:relative; flex:1 1 auto; height:6px; min-width:80px; cursor:pointer;
           background: var(--control-hover); border-radius:3px; overflow:hidden; }
.cd-fill{ width:0; height:100%; background: var(--accent); border-radius:3px; }
.cd-time{ flex:0 0 auto; font-size:12px; color: var(--text-tertiary);
          font-variant-numeric: tabular-nums; }
.cd-name{ font-size:13px; color: var(--text-secondary); }
#cd_audio{ display:none; }

/* 异色 / 超闪标识 */
.art-badge{ display:block; width:16px; height:16px; margin:4px auto 0; }
.art-badge.is-empty{ visibility:hidden; }
.tico{ position:relative; display:inline-block; line-height:0; flex:0 0 auto; }
.tico > img:first-child{ display:block; }
.tico .sbadge{ position:absolute; right:-3px; bottom:-3px; width:14px; height:14px;
               image-rendering:pixelated; pointer-events:none; }

/* 页脚版权（启动器内隐藏；pager 内整体下移 40px） */
.foot-copy{ margin-top:8px; font-size:11.5px; line-height:1.7; color: var(--text-tertiary); }
body.in-launcher .foot{ display:none; }
/* 启动器内嵌页：页面底色透明，露出启动器背景 */
body.pager-shift{ background: transparent; }
/* 启动器内已经有自己的标题栏，顶栏的 logo + 品牌名不重复显示 */
/* 启动器内不显示顶栏的图标 + 标题行（启动器自己有标题栏） */
body.in-launcher .brand, body.pager-shift .brand{ display: none; }

/* 顶栏是 sticky：用自身 padding-top 让出标题栏高度，滚动后也不会和标题栏重叠 */
body.pager-shift .top{ top:0; padding-top:50px; }
/* 启动器内不提供主题切换（跟随启动器） */
body.in-launcher #theme_toggle{ display:none; }

/* 右下角按钮组：主题切换 + 返回顶部（样式对齐 help 页的 corner_button） */
.corner_dock{ position:fixed; right:16px; bottom:16px; z-index:900;
              display:flex; flex-direction:column; gap:10px; }
/* 与顶栏控件同款：同高、同底色、同描边、同圆角
   <button> 要额外关掉系统原生外观，否则会和 <a> 的玻璃底不一致 */
.wb_btn{ width: var(--top-ctl-h); height: var(--top-ctl-h); padding:0; box-sizing:border-box; cursor:pointer;
                display:flex; align-items:center; justify-content:center;
                color: var(--text-primary); font-size:16px; line-height:1; text-decoration:none;
                -webkit-appearance:none; appearance:none;
                background-color: var(--control-bg); background-image:none;
                border:1px solid var(--stroke); border-bottom-color: var(--stroke-strong);
                border-radius: var(--radius-sm);
                -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.wb_btn:hover{ background-color: var(--control-hover); }
.wb_btn:active{ transform: scale(.96); }
.wb_btn img{ width:18px; height:18px; display:block; }
body.dark .wb_btn img{ filter: invert(1); }
#to_top{ opacity:0; pointer-events:none; transition: opacity .18s ease; }
#to_top.show{ opacity:1; pointer-events:auto; }
@media (max-width: 600px){
  .corner_dock{ right:12px; bottom:12px; gap:8px; }
}

/* 帮助中心 FAQ 折叠条目 */
.faq{ border-bottom:1px solid var(--stroke); padding:9px 0; }
.faq:last-child{ border-bottom:none; }
.faq summary{ position:relative; padding-left:18px; cursor:pointer; font-size:14.5px; font-weight:600;
              color: var(--text-primary); list-style:none; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::before{ content:'▸'; position:absolute; left:2px; color: var(--text-tertiary);
                      transition: transform .15s; }
.faq[open] summary::before{ transform: rotate(90deg); }
.faq-body{ padding:8px 0 2px 18px; font-size:13.5px; color: var(--text-secondary); }
.faq-body > div{ margin:6px 0; }
.faq-body img{ max-width:100%; height:auto; }
.faq-body table{ font-size:12.5px; }

/* 问答按钮 + 弹窗（iframe 嵌 /help/qa.php） */
.qa_btn{ flex:0 0 auto; margin-left:8px; padding:0; width: var(--top-ctl-h); height: var(--top-ctl-h);
         align-self:center; display:flex; align-items:center; justify-content:center;
         color:#fff; background: var(--accent); border:1px solid transparent;
         border-radius: var(--radius-sm); cursor:pointer; }
.qa_btn svg{ display:block; }
.qa_btn:hover{ background: var(--accent-hover); }
.qa_btn:active{ transform: scale(.96); }

#qa_modal{ display:none; }
#qa_modal.show{ display:block; }
#qa_modal .qa_mask{ position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.32);
                    -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
#qa_modal .qa_dialog{ position:fixed; z-index:1001; right:16px; bottom:16px;
                      width:min(560px, calc(100vw - 32px)); height:min(680px, calc(100vh - 110px));
                      display:flex; flex-direction:column; overflow:hidden;
                      background: var(--bg); border:1px solid var(--stroke-strong);
                      border-radius: var(--radius); box-shadow:0 12px 40px rgba(0,0,0,.22); }
#qa_modal .qa_bar{ flex:0 0 auto; display:flex; align-items:center; justify-content:space-between;
                   height:42px; padding:0 8px 0 14px; font-size:14px; font-weight:600;
                   color: var(--text-primary); border-bottom:1px solid var(--stroke);
                   background: var(--card-bg); }
#qa_modal .qa_close{ width:28px; height:28px; border:none; background:transparent; cursor:pointer;
                     font-size:14px; color: var(--text-secondary); border-radius: var(--radius-sm); }
#qa_modal .qa_close:hover{ background: var(--control-hover); }
#qa_modal iframe{ flex:1 1 auto; width:100%; border:none; background: var(--bg); }
@media (max-width: 600px){
  #qa_modal .qa_dialog{ left:10px; right:10px; top:48px; bottom:10px; width:auto; height:auto; }
}

/* 图鉴编号：横排小标签 */
.dexpills{ display:flex; flex-wrap:wrap; gap:6px; }
.dexpill{ padding:2px 9px; border-radius:10px; font-size:12.5px; line-height:1.7;
          color: var(--text-secondary); background: var(--control-hover); }
.dexpill b{ color: var(--text-primary); font-weight:600; font-variant-numeric: tabular-nums; }

/* 详情页图片一排：普通 / 异色 / 超闪（放不下时左右滑动，不换行） */
.art-row{ display:flex; gap:22px; flex-wrap:nowrap; align-items:flex-end;
          margin:10px 0 6px; overflow-x:auto; overflow-y:hidden;
          -webkit-overflow-scrolling:touch; padding-bottom:4px; }
.artfig{ margin:0; text-align:center; flex:0 0 auto; }
.artfig .art{ display:block; width:150px; height:150px; object-fit:contain; image-rendering:pixelated; }
.artfig figcaption{ font-size:11.5px; color: var(--text-tertiary); margin-top:2px; }
@media (max-width: 600px){
  .art-row{ gap:14px; }
  .artfig .art{ width:132px; height:132px; }
  .artfig figcaption{ font-size:11px; }
}

/* 进化路线（带图标） */
.evo-group{ margin-bottom:10px; }
.evo-group .sub{ display:block; margin-bottom:4px; }
.evo-row{ display:flex; align-items:center; gap:8px; padding:2px 0; }
.evo-ico{ width:40px; height:40px; flex:0 0 40px; image-rendering:pixelated;
          object-fit:cover; object-position:left center; }
.evo-name{ font-size:13.5px; }
.evo-cond{ font-size:12.5px; color: var(--text-tertiary); }
.evo-arrow{ font-size:12.5px; color: var(--text-tertiary); }

/* 详情页属性相性（三行：属性 / LA / 传统） */
.type-head{ display:flex; gap:6px; flex-wrap:wrap; }
.mt-wrap{ overflow-x:auto; }
table.mt3{ width:auto; min-width:0; border-collapse:separate; border-spacing:2px 0; font-size:13px; }
table.mt3 th.rowlbl{
  position:sticky; left:0; z-index:1; white-space:nowrap; text-align:left;
  padding:6px 10px 6px 0; font-weight:600; color: var(--text-secondary);
  background: var(--card-bg); border:none; width:48px;
}
table.mt3 .tcell{
  padding:3px 1px; text-align:center; white-space:nowrap; vertical-align:middle;
  border:none; font-variant-numeric: tabular-nums;
}
table.mt3 .tbimg{ height:17px; width:auto; vertical-align:middle; margin:0; }
table.mt3 tr:nth-child(1) .tcell{ padding-bottom:2px; }
table.mt3 tr:nth-child(2) .tcell{ padding-top:2px; }
table.mt3 .up{ color:#1B7F3B; font-weight:700; }
table.mt3 .down{ color:#C42B1C; font-weight:700; }
/* 深色下这两色对比度不够，提亮一档 */
body.dark table.mt3 .up{ color:#7BE495; }
body.dark table.mt3 .down{ color:#FF8A80; }
table.mt3 .m0{ color: var(--text-tertiary); font-weight:700; }

/* 招式详情页「谁能学」 */
.learners{ display:grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap:2px 10px; font-size:13px; }
.learner{ display:flex; align-items:center; gap:5px; padding:2px 4px; border-radius:6px; color: var(--text-primary); }
.learner:hover{ background: var(--control-hover); text-decoration:none; }
.learner .lico{ width:30px; height:30px; flex:0 0 30px; image-rendering:pixelated;
                object-fit:cover; object-position:left center; }
.learner .lv{ color: var(--text-tertiary); font-size:11.5px; font-variant-numeric: tabular-nums; min-width:34px; }
.learner .nm{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 图例 */
.kv{ display:grid; grid-template-columns: 88px 1fr; gap:6px 14px; font-size:13.5px; }
.kv .k{ color: var(--text-secondary); }

.pager{ display:flex; gap:6px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.pager a, .pager span{ min-width:34px; height:32px; padding:0 10px; display:inline-flex;
  align-items:center; justify-content:center; border:1px solid var(--stroke);
  border-radius: var(--radius-xs); font-size:13px; }
.pager span.cur{ background: var(--accent); color:#fff; border-color: var(--accent); }
.pager .pinfo{ min-width:0; padding:0 6px; border:none; background:transparent;
                     color: var(--text-tertiary); font-size:12.5px; }
.pager .gap{ min-width:0; padding:0 2px; border:none; background:transparent;
             color: var(--text-tertiary); }
.pager .off{ color: var(--text-tertiary); opacity:.55; cursor:default; }
.pager a:hover{ background: var(--control-hover); }


.foot{ text-align:center; color: var(--text-tertiary); font-size:12px; padding:28px 0 8px; line-height:1.9; }
.foot a{ color: var(--text-secondary); }

/* 首页入口 */
.entries{ display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap:8px; }
.entry{ display:flex; align-items:baseline; gap:8px; padding:7px 12px;
        border:1px solid var(--stroke); border-radius: var(--radius-sm);
        color: var(--text-primary); min-width:0; }
.entry:hover{ background: var(--control-hover); text-decoration:none; }
.entry b{ flex:0 0 auto; font-size:14px; font-weight:600; }
.entry small{ flex:1 1 auto; min-width:0; font-size:12px; color: var(--text-tertiary);
              white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.chips{ display:flex; gap:6px; flex-wrap:wrap; margin:8px 0 4px; }
.chip{ padding:3px 10px; border:1px solid var(--stroke-strong); border-radius: 12px;
       font-size:12.5px; color: var(--text-secondary); }
.chip.cur{ background: var(--accent); color:#fff; border-color: var(--accent); }
.table-wrap{ overflow-x:auto; }
@media (max-width: 640px){ .table-wrap table{ min-width: 360px; } }

@media (max-width: 640px){
  .top .search{ width:100%; margin-left:0; }
  .top .search input{ flex:1 1 auto; width:auto; }
  h1{ font-size:20px; }
  .kv{ grid-template-columns: 76px 1fr; }
}

/* ---------- 室外地图 ---------- */
.mapview {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.mapview img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 8px;
  image-rendering: pixelated;
}
.mapmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mapmark {
  position: absolute;
  width: 5%;
  height: 7.5%;
  /* 放大到 1.5 格，往左上偏移半格以保持居中 */
  transform: translate(-16.7%, -16.7%);
  background: rgba(0, 255, 255, .45);
  box-shadow: inset 0 0 0 2px #00ffff, 0 0 12px rgba(0, 255, 255, .95);
  border-radius: 3px;
  animation: mapmark-blink 1.3s ease-in-out infinite;
}

@keyframes mapmark-blink {
  0%, 100% {
    opacity: 1;
    background: rgba(0, 255, 255, .45);
    box-shadow: inset 0 0 0 2px #00ffff, 0 0 10px rgba(0, 255, 255, .95);
  }
  50% {
    opacity: .2;
    background: rgba(0, 255, 255, .08);
    box-shadow: inset 0 0 0 2px rgba(0, 255, 255, .45), 0 0 3px rgba(0, 255, 255, .3);
  }
}
.maplist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 14px 0 8px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}
.mapcard {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  color: inherit;
}
.mapcard:hover { border-color: rgba(0, 170, 255, .5); background: var(--control-hover); }
.mapcard small { color: var(--text-tertiary); font-size: 12px; }


@media (prefers-reduced-motion: reduce) {
  .mapmark { animation: none; }
}

/* ---------- 抽奖稀有度配色 ---------- */
.chip.rar { color: #fff; border-color: transparent; font-weight: 600; }
.chip.rar-n   { background: #9aa0a6; }
.chip.rar-r   { background: #2f7fd8; }
.chip.rar-sr  { background: #8e44d0; }
.chip.rar-ssr { background: #c9971c; }
.chip.rar-ur  { background: linear-gradient(90deg, #ff9ad5, #ff4fa3); }

/* 地图页道具行：图标与名称垂直居中 */
.item-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.item-cell .ico { display: block; flex: none; }

/* ---------- 右下角按钮：统一半透明玻璃底 ---------- */
/* 顶栏的 --control-bg 是 70% 白，在最右下方几乎看不出透明，这里单独降低不透明度 */
.corner_dock .wb_btn{
  background-color: rgba(255, 255, 255, .42);
  background-image: none;
  border: 1px solid rgba(0, 0, 0, .16);
  box-shadow: none;
}
.corner_dock .wb_btn:hover{
  background-color: rgba(255, 255, 255, .62);
  border-color: rgba(0, 0, 0, .24);
}
body.dark .corner_dock .wb_btn{
  background-color: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .2);
}
body.dark .corner_dock .wb_btn:hover{
  background-color: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .3);
}

/* 特殊获取的版本标记 */
.tag-new { color: #fff; background: var(--accent); }
.tag-old { color: var(--text-secondary); background: var(--control-hover); }

/* 训练家列表头像 */
.t-row{ display:inline-flex; align-items:center; gap:8px; }
.t-ico{ width:32px; height:32px; flex:none; object-fit:contain; image-rendering:pixelated; }
.t-ico-empty{ display:inline-block; width:32px; height:32px; border-radius:6px;
              background: rgba(127,127,127,.14); }

/* 野生分布表格：固定布局，宽度统一铺满卡片 */
.enc-table{ table-layout:fixed; width:100%; }
.enc-table th, .enc-table td{ overflow-wrap:anywhere; }
.enc-table th:nth-child(1), .enc-table td:nth-child(1){ width:auto; }
.enc-table th:nth-child(2), .enc-table td:nth-child(2){ width:72px; }
.enc-table th:nth-child(3), .enc-table td:nth-child(3){ width:60px; }
.enc-table .mini{ margin-right:4px; }

/* 定点教学 */
.tut-rooms{ display:grid; grid-template-columns:repeat(auto-fit,minmax(330px,1fr)); gap:22px 26px; }
.tut-roomwrap{ border:1px solid var(--stroke); border-radius:10px; padding:10px 12px 12px; }
.tut-side{ font-size:13px; font-weight:600; color: var(--text-secondary); margin:0 0 7px; }
.tut-room{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tut-spot{ border:1px solid var(--stroke); border-radius: var(--radius-sm); padding:7px 9px; min-width:0; }
.tut-head{ font-size:12px; font-weight:600; color: var(--text-secondary); margin-bottom:4px; }
.tut-mv{ display:grid; grid-template-columns:1fr 1fr; gap:1px 6px; font-size:12.5px; line-height:1.55; }
.tut-mv span{ min-width:0; }
table.tut-table{ width:auto; min-width:460px; }
table.tut-table th.num, table.tut-table td.num{ text-align:right; font-variant-numeric: tabular-nums; white-space:nowrap; }
@media (max-width:640px){
  .tut-rooms{ grid-template-columns:1fr; gap:14px; }
  .tut-roomwrap{ padding:9px 10px 10px; }
  table.tut-table{ min-width:0; width:100%; }
}
@media (max-width:420px){
  .tut-mv{ grid-template-columns:1fr; }
}
/* 特殊获取（传说 / 幻兽） */
.src-list{ margin:0; padding-left:18px; font-size:13.5px; line-height:1.8; }
.src-list li{ margin:2px 0; }

/* 详情页头部（名称 + 副标题 / 图标），顶部间距跟 h1 默认一致 */
.mon-head{ margin:18px 0 0; }
.ihead{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin:18px 0 0; }
