/* ═══════════════════════════════════════════════════════════
   AI 星图 · 工具速查卡样式
   ───────────────────────────────────────────────────────────
   设计目标：屏幕好读 + 打印好排版。
   屏幕用卡片式，打印切换成紧凑表格式，A4 多页自动分栏。
   ═══════════════════════════════════════════════════════════ */

:root{
  --brand:#0da56b;
  --brand-deep:#0a8a58;
  --gold:#d99a1c;
  --text:#16301f;
  --text-dim:#5d7465;
  --text-faint:#94a99b;
  --stroke:#e2ebe5;
  --stroke-strong:#cddfd2;
  --bg:#f6f9f7;
  --bg2:#edf4ef;
  --white:#fff;
  --radius:10px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --mono:"SF Mono",Menlo,Consolas,"Courier New",monospace;
  --grad:linear-gradient(135deg,#0da56b,#1fbf7e);
  --sh:0 1px 2px rgba(22,48,31,.04),0 4px 16px rgba(22,48,31,.05);
  --sh2:0 2px 6px rgba(22,48,31,.06),0 12px 32px rgba(22,48,31,.08);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--font);font-size:15px;line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{margin:0;font-weight:700;line-height:1.3}
button{font-family:inherit;cursor:pointer}
input{font-family:inherit}

/* ── 页头 ─────────────────────────────────────────────── */
.ch-header{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;gap:18px;flex-wrap:wrap;
  max-width:1440px;margin:0 auto;padding:12px 26px;
  background:rgba(246,249,247,.92);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--stroke);
}
.ch-logo{display:flex;align-items:center;gap:9px;color:var(--text)}
.ch-logo:hover{text-decoration:none}
.ch-logo-mark{
  width:30px;height:30px;border-radius:8px;background:var(--grad);
  color:#fff;font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;letter-spacing:-.02em;
}
.ch-logo-txt{font-size:15px;font-weight:700}
.ch-logo-txt small{font-size:12px;font-weight:500;color:var(--text-faint);margin-left:3px}
.ch-nav{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}
.ch-nav a{
  padding:5px 11px;border-radius:7px;font-size:13.5px;
  color:var(--text-dim);transition:all .15s ease;white-space:nowrap;
}
.ch-nav a:hover{background:var(--bg2);color:var(--text);text-decoration:none}
.ch-nav a.is-on{background:var(--brand);color:#fff}

/* ── 主体 ─────────────────────────────────────────────── */
.ch-main{max-width:1440px;margin:0 auto;padding:26px 26px 40px}

/* ── 开场 ─────────────────────────────────────────────── */
.ch-hero{margin-bottom:22px}
.ch-hero h1{font-size:26px;margin-bottom:9px}
.ch-lead{margin:0;font-size:14.5px;color:var(--text-dim);max-width:660px}
.ch-lead strong{color:var(--text)}
.ch-stat{
  display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;
}
.ch-stat span{
  font-size:12.5px;color:var(--text-dim);
  background:var(--white);border:1px solid var(--stroke);
  border-radius:6px;padding:4px 10px;
}
.ch-stat b{color:var(--brand);font-weight:700}

/* ── 工具栏 ───────────────────────────────────────────── */
.ch-toolbar{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:15px;box-shadow:var(--sh);
  margin-bottom:18px;
}
.ch-search-wrap{position:relative;margin-bottom:11px}
.ch-search-box,.ch-search-wrap{
  display:block;
}
.ch-search-wrap{
  display:flex;align-items:center;gap:9px;
  background:var(--bg2);border:1.5px solid var(--stroke-strong);
  border-radius:9px;padding:0 13px;height:46px;
  transition:all .16s ease;
}
.ch-search-wrap:focus-within{
  background:var(--white);border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(13,165,107,.1);
}
.ch-search-ico{font-size:14px;opacity:.5;flex:0 0 auto}
.ch-search-wrap input{
  flex:1;min-width:0;border:none;background:none;outline:none;
  font-size:14.5px;color:var(--text);
}
.ch-search-wrap input::placeholder{color:var(--text-faint)}
.ch-clear{
  flex:0 0 auto;background:none;border:none;color:var(--text-faint);
  font-size:14px;padding:2px 4px;border-radius:4px;
}
.ch-clear:hover{color:var(--text)}

.ch-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:11px}
.ch-chip{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--bg2);border:1px solid transparent;border-radius:20px;
  padding:5px 12px;font-size:13px;color:var(--text-dim);
  transition:all .15s ease;
}
.ch-chip em{font-style:normal;font-size:11.5px;color:var(--text-faint)}
.ch-chip:hover{border-color:var(--stroke-strong);color:var(--text)}
.ch-chip.is-on{background:var(--brand);color:#fff;border-color:var(--brand)}
.ch-chip.is-on em{color:rgba(255,255,255,.75)}

.ch-acts{display:flex;gap:9px;flex-wrap:wrap}
.ch-btn{
  background:var(--grad);color:#fff;border:none;border-radius:8px;
  padding:9px 18px;font-size:13.5px;font-weight:600;
  transition:opacity .15s ease,transform .12s ease;
}
.ch-btn:hover{opacity:.92}
.ch-btn:active{transform:translateY(1px)}
.ch-btn-ghost{
  background:var(--white);color:var(--text-dim);
  border:1px solid var(--stroke-strong);font-weight:500;
}
.ch-btn-ghost:hover{background:var(--bg2);opacity:1;color:var(--text)}

/* ── 场景目录 ─────────────────────────────────────────── */
.ch-toc{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:15px 17px;margin-bottom:22px;
}
.ch-toc-h{font-size:14px;margin-bottom:10px;color:var(--text-dim)}
.ch-toc-list{display:flex;gap:7px;flex-wrap:wrap}
.ch-toc-item{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--bg);border:1px solid var(--stroke);border-radius:7px;
  padding:5px 11px;font-size:13px;color:var(--text-dim);
  transition:all .15s ease;
}
.ch-toc-item:hover{border-color:var(--brand);color:var(--brand);text-decoration:none}
.ch-toc-item i{
  font-style:normal;font-size:11.5px;color:var(--text-faint);
  background:var(--bg2);border-radius:4px;padding:1px 6px;
}

/* ── 场景卡片 ─────────────────────────────────────────── */
.ch-scene{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);box-shadow:var(--sh);
  margin-bottom:18px;overflow:hidden;
  scroll-margin-top:70px;
}
.ch-scene-head{
  padding:15px 18px 13px;border-bottom:1px solid var(--stroke);
  background:linear-gradient(180deg,#fbfdfc,#fff);
}
.ch-scene-title{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin-bottom:6px;
}
.ch-scene-title h2{font-size:16.5px}
.ch-scene-n{
  font-size:12px;font-weight:700;color:#fff;background:var(--grad);
  border-radius:5px;padding:2px 8px;letter-spacing:.01em;
}
.ch-scene-count{font-size:12.5px;color:var(--text-faint);margin-left:auto}
.ch-scene-ask{margin:0 0 8px;font-size:13.5px;color:var(--text-dim)}
.ch-scene-tip{
  margin:0;font-size:13px;color:var(--text-dim);
  background:rgba(13,165,107,.05);border-left:3px solid var(--brand);
  border-radius:0 6px 6px 0;padding:8px 12px;
}
.ch-scene-tip b{color:var(--brand-deep);font-weight:600}

/* ── 工具列表 ─────────────────────────────────────────── */
.ch-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
.ch-item{
  display:flex;flex-direction:column;gap:5px;
  padding:13px 18px;border-bottom:1px solid var(--stroke);
  border-right:1px solid var(--stroke);
  transition:background .14s ease;
}
.ch-item:nth-child(2n){border-right:none}
.ch-item:nth-last-child(-n+2){border-bottom:none}
.ch-item:last-child:nth-child(odd){border-bottom:none}
.ch-item:hover{background:var(--bg)}
.ch-item-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.ch-item-name{font-size:14.5px;font-weight:600}
.ch-item-name a{color:var(--text)}
.ch-item-name a:hover{color:var(--brand)}
.ch-item-desc{margin:0;font-size:12.5px;color:var(--text-dim);line-height:1.55}
.ch-item-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:2px}
.ch-item-why{
  font-size:12px;color:var(--text-dim);margin-top:3px;
  padding-top:5px;border-top:1px dashed var(--stroke);
}

/* 徽标 */
.ch-badge{
  font-size:10.5px;font-weight:700;letter-spacing:.04em;
  border-radius:4px;padding:1px 6px;flex:0 0 auto;
}
.ch-badge-top{background:var(--gold);color:#fff}
.ch-badge-new{background:#e84a7a;color:#fff}
.ch-badge-ab{background:rgba(13,165,107,.12);color:var(--brand-deep)}

/* 标签 */
.ch-tag{
  font-size:11.5px;border-radius:4px;padding:1.5px 7px;
  background:var(--bg2);color:var(--text-dim);white-space:nowrap;
}
.ch-tag-free{background:rgba(13,165,107,.12);color:var(--brand-deep)}
.ch-tag-paid{background:rgba(217,154,28,.14);color:#a8760d}
.ch-tag-open{background:rgba(45,120,200,.12);color:#2d6fb8}
.ch-tag-oversea{background:rgba(217,74,74,.1);color:#c0392b}
.ch-tag-easy{background:rgba(13,165,107,.08);color:var(--brand-deep)}
.ch-tag-score{background:var(--bg2);color:var(--text-faint);font-variant-numeric:tabular-nums}
.ch-tag-cat{background:transparent;color:var(--text-faint);border:1px solid var(--stroke)}

/* ── 空状态 ───────────────────────────────────────────── */
.ch-empty{
  text-align:center;padding:56px 20px;
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);
}
.ch-empty-t{font-size:15px;font-weight:600;margin:0 0 6px}
.ch-empty-s{margin:0;font-size:13.5px;color:var(--text-faint)}

/* ── 使用说明 ─────────────────────────────────────────── */
.ch-note{
  background:var(--white);border:1px solid var(--stroke);
  border-radius:var(--radius);padding:17px 19px;margin-top:4px;
}
.ch-note h2{font-size:14.5px;margin-bottom:10px}
.ch-note ul{margin:0;padding-left:19px}
.ch-note li{font-size:13.5px;color:var(--text-dim);margin-bottom:7px}
.ch-note li:last-child{margin-bottom:0}
.ch-note strong{color:var(--text)}

/* ── 页脚 ─────────────────────────────────────────────── */
.ch-footer{
  max-width:1440px;margin:0 auto;padding:22px 26px 34px;
  border-top:1px solid var(--stroke);
}
.ch-foot-links{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.ch-foot-links a{font-size:13.5px;color:var(--text-dim)}
.ch-foot-links a:hover{color:var(--brand)}
.ch-beian{
  display:flex;gap:8px 16px;flex-wrap:wrap;
  margin:0;font-size:12px;color:var(--text-faint);
}
.ch-beian a{color:var(--text-faint)}
.ch-beian a:hover{color:var(--brand)}

/* ── 提示条 ───────────────────────────────────────────── */
.ch-toast{
  position:fixed;left:50%;bottom:32px;transform:translateX(-50%) translateY(14px);
  background:var(--text);color:#fff;font-size:13.5px;
  border-radius:8px;padding:10px 20px;z-index:99;
  opacity:0;pointer-events:none;transition:all .22s ease;
  box-shadow:var(--sh2);
}
.ch-toast.is-on{opacity:1;transform:translateX(-50%) translateY(0)}

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width:760px){
  .ch-header{padding:10px 14px;gap:10px}
  .ch-nav{width:100%;margin-left:0;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .ch-main{padding:20px 14px 32px}
  .ch-hero h1{font-size:22px}
  .ch-list{grid-template-columns:1fr}
  .ch-item{border-right:none}
  .ch-item:nth-last-child(-n+2){border-bottom:1px solid var(--stroke)}
  .ch-item:last-child{border-bottom:none}
  .ch-acts .ch-btn{flex:1;min-width:120px}
  .ch-scene-count{margin-left:0;width:100%}
}

/* ═══════════════════════════════════════════════════════════
   打印样式：A4 紧凑版，去掉交互元素，加大对比度
   ═══════════════════════════════════════════════════════════ */
@media print{
  @page{size:A4;margin:11mm 10mm}
  .no-print,.ch-nav,.ch-acts,.ch-footer{display:none !important}
  body{background:#fff;font-size:10pt;line-height:1.4;color:#000}
  .ch-header{
    position:static;max-width:none;padding:0 0 6px;margin-bottom:8px;
    border-bottom:1.5pt solid #000;background:none;backdrop-filter:none;
  }
  .ch-logo-mark{background:#000;color:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ch-main{max-width:none;padding:0}
  .ch-hero{margin-bottom:8px}
  .ch-hero h1{font-size:14pt}
  .ch-lead{font-size:9pt;max-width:none}
  .ch-stat{margin-top:5px}
  .ch-stat span{font-size:8pt;padding:1px 6px;border-color:#bbb}

  .ch-toc{
    padding:6px 8px;margin-bottom:8px;border:0.5pt solid #999;page-break-inside:avoid;
  }
  .ch-toc-h{font-size:9pt;margin-bottom:4px;color:#000}
  .ch-toc-item{font-size:8pt;padding:1px 6px;border-color:#bbb}
  .ch-toc-item i{font-size:7.5pt}

  .ch-scene{
    break-inside:auto;page-break-inside:auto;
    border:0.5pt solid #999;box-shadow:none;margin-bottom:6px;border-radius:0;
  }
  .ch-scene-head{padding:5px 8px;page-break-after:avoid;break-after:avoid;background:none;border-bottom:0.5pt solid #999}
  .ch-scene-title{margin-bottom:2px;gap:6px}
  .ch-scene-title h2{font-size:10.5pt}
  .ch-scene-n{
    background:#fff;color:#000;border:0.5pt solid #000;font-size:8pt;padding:0 4px;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
  .ch-scene-count{font-size:8pt;color:#666}
  .ch-scene-ask{font-size:8.5pt;margin-bottom:3px;color:#333}
  .ch-scene-tip{
    font-size:8.5pt;padding:3px 6px;border-left:2pt solid #000;background:#f2f2f2;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }

  .ch-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ch-item{padding:4px 7px;gap:1px;border-color:#ddd;break-inside:avoid;page-break-inside:avoid}
  .ch-item:hover{background:none}
  .ch-item-name{font-size:9pt}
  .ch-item-desc{font-size:7.5pt;color:#333}
  .ch-item-why{font-size:7.5pt;padding-top:2px;margin-top:1px}
  .ch-item-meta{gap:3px;margin-top:1px}
  .ch-badge{font-size:7pt;padding:0 3px;border:0.4pt solid #000;background:#fff !important;color:#000 !important}
  .ch-tag{
    font-size:7.5pt;padding:0 4px;border:0.4pt solid #999;background:#fff !important;color:#000 !important;
  }
  .ch-empty{display:none !important}
  .ch-note{
    border:0.5pt solid #999;padding:6px 9px;margin-top:6px;break-inside:avoid;
  }
  .ch-note h2{font-size:9.5pt;margin-bottom:4px}
  .ch-note li{font-size:8pt;margin-bottom:2px}
  .ch-toast{display:none !important}
}
