/* ==========================================================
   攻略模块样式（移动端密度优先）
   ----------------------------------------------------------
   尺寸照 DQM2SP 实测规格，配色沿用 DQM4 变量体系：
     金 = 主操作/重点 · 蓝 = 结构/术语 · 正文不用纯白
   ========================================================== */

/* ---------- 顶栏 ---------- */
.gd-topbar{
  display:flex;align-items:center;gap:5px;padding:4px 8px;
  border-bottom:1px solid var(--line);background:var(--bg2);
  position:sticky;top:0;z-index:20;flex-wrap:nowrap;
}
.gd-h1{font-size:12px;font-weight:800;color:var(--label);white-space:nowrap}
.gd-stat{font-size:8.5px;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.gd-ibtn{
  flex:0 0 auto;height:22px;min-width:22px;padding:0 6px;border-radius:5px;
  background:var(--bg3);border:1px solid var(--border);color:var(--text2);
  font-family:inherit;font-size:10px;cursor:pointer;position:relative;
}
.gd-ibtn:active{color:var(--accent2);border-color:var(--accent3)}
.gd-ibtn i{
  position:absolute;top:-4px;right:-3px;font-size:7.5px;font-style:normal;font-weight:800;
  background:var(--num);color:#2b1d08;border-radius:6px;padding:0 3px;line-height:10px;
}

/* ---------- 搜索 ---------- */
.gd-searchbar{
  display:flex;align-items:center;gap:5px;padding:3px 8px 4px;
  background:var(--bg2);border-bottom:1px solid var(--line);position:sticky;top:30px;z-index:19;
}
.gd-searchbar span{font-size:11px;opacity:.7}
.gd-searchbar input{
  flex:1;min-width:0;height:20px;background:none;border:none;outline:none;
  color:var(--text);font-size:11px;font-family:inherit;
}
.gd-clr{background:none;border:none;color:var(--text2);font-size:14px;cursor:pointer;padding:0 3px}

/* ---------- 分类卡（3 列，一屏看全） ---------- */
.gd-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;padding:6px 8px 10px;
}
.gd-card{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;
  min-height:64px;padding:7px 7px 6px;border-radius:9px;cursor:pointer;
  background:linear-gradient(160deg,rgba(40,52,68,.92),rgba(26,34,44,.92));
  border:1px solid rgba(124,196,255,.30);
  font-family:inherit;text-align:left;
}
.gd-card:active{filter:brightness(1.18);transform:scale(.97)}
.gd-card-ic{font-size:17px;line-height:1.1}
.gd-card-tt{
  font-size:11.5px;font-weight:800;color:#eaf4ff;line-height:1.3;
  margin-top:2px;word-break:break-all;
}
.gd-card-sub{font-size:8.5px;color:var(--text2);margin-top:auto;padding-top:3px}
.gd-card-badge{
  position:absolute;top:5px;right:6px;font-size:8px;font-weight:800;
  color:var(--num);border:1px solid rgba(255,207,110,.5);border-radius:8px;
  padding:0 4px;line-height:12px;
}
.gd-card-ar{position:absolute;right:5px;bottom:4px;font-size:11px;color:var(--accent2);opacity:.8}

/* ---------- 文章列表 ---------- */
.gd-list{padding:5px 8px 12px;display:flex;flex-direction:column;gap:5px}
.gd-art{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;
  width:100%;padding:7px 9px 7px 11px;border-radius:9px;cursor:pointer;
  background:var(--bg2);border:1px solid var(--border);
  font-family:inherit;text-align:left;overflow:hidden;
}
.gd-art:active{background:var(--bg3)}
.gd-art-bar{position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent3)}
.gd-art-tt{
  font-size:11.5px;font-weight:700;color:var(--text);line-height:1.45;
  padding-right:26px;word-break:break-all;
}
.gd-art-sub{font-size:8.5px;color:var(--text2);margin-top:3px}
.gd-art-star{
  position:absolute;top:5px;right:8px;font-size:14px;line-height:1;
  color:var(--text2);opacity:.5;
}
.gd-art-star.on{color:var(--num);opacity:1}
.gd-empty{
  padding:26px 14px;text-align:center;font-size:11px;color:var(--text2);line-height:1.75;
}
.gd-empty span{font-size:9.5px;color:var(--accent2)}

/* ---------- 分类浮层 ---------- */
.gd-sheet-host{position:fixed;inset:0;z-index:180;display:none}
.gd-sheet-host.on{display:block}
.gd-sheet-mask{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.gd-sheet{
  position:absolute;left:0;right:0;bottom:0;height:50%;
  display:flex;flex-direction:column;
  background:linear-gradient(180deg,rgba(24,30,38,.99),rgba(16,21,28,.99));
  border-top:1px solid rgba(255,207,110,.55);border-radius:12px 12px 0 0;
  box-shadow:0 -8px 28px rgba(0,0,0,.55);
  animation:gdSheetIn .18s ease-out;
}
@keyframes gdSheetIn{from{transform:translateY(28px);opacity:.4}}
.gd-sheet-grip{height:14px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none}
.gd-sheet-grip i{width:36px;height:4px;border-radius:2px;background:rgba(255,207,110,.75)}
.gd-sheet-head{display:flex;align-items:center;gap:6px;padding:0 11px 7px}
.gd-sheet-ic{font-size:16px}
.gd-sheet-tt{font-size:12px;font-weight:800;color:var(--num)}
.gd-sheet-n{font-size:9px;color:var(--text2)}
.gd-sheet-x{
  margin-left:auto;width:22px;height:22px;border-radius:50%;
  background:var(--bg3);border:1px solid var(--border);color:var(--text2);
  font-size:11px;cursor:pointer;font-family:inherit;line-height:1;
}
.gd-sheet-body{flex:1;min-height:0;overflow-y:auto;padding:0 9px 10px;display:flex;flex-direction:column;gap:5px}

/* ---------- 正文 ---------- */
.gd-rtop{
  display:flex;align-items:center;gap:6px;padding:3px 8px;
  position:sticky;top:0;z-index:20;
  background:linear-gradient(180deg,var(--bg2),var(--bg));
  border-bottom:1px solid var(--line);
}
.gd-back{
  flex:0 0 auto;font-family:inherit;font-size:9.5px;font-weight:800;
  padding:3px 8px;border-radius:6px;cursor:pointer;
  color:var(--num);background:rgba(255,207,110,.16);
  border:1px solid rgba(255,207,110,.5);
}
.gd-rtt{
  flex:1;min-width:0;font-size:12px;font-weight:800;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.gd-rstar{
  flex:0 0 auto;background:none;border:none;font-size:15px;cursor:pointer;
  color:var(--text2);opacity:.55;padding:0 3px;font-family:inherit;
}
.gd-rstar.on{color:var(--num);opacity:1}

.gd-rbody{
  padding:10px 11px 60px;font-size:12.5px;line-height:1.72;color:#c9d1d9;
  word-wrap:break-word;overflow-wrap:anywhere;
}
.gd-rbody p{margin:6px 0}
.gd-h2{
  font-size:13.5px;font-weight:800;color:var(--num);line-height:1.45;
  margin:16px 0 7px;padding:5px 9px;border-radius:0 7px 7px 0;
  background:linear-gradient(90deg,rgba(255,207,110,.16),rgba(255,207,110,.02));
  border-left:3px solid var(--num);
}
.gd-h3{
  font-size:12.5px;font-weight:800;color:var(--accent2);line-height:1.5;
  margin:13px 0 5px;padding-left:8px;border-left:3px solid var(--accent2);
}
.gd-h4{font-size:12px;font-weight:700;color:var(--text);margin:11px 0 4px}
.gd-table{margin:7px 0;border:1px solid var(--border);border-radius:6px;overflow:hidden}
.gd-tr{display:flex;gap:6px;padding:4px 7px;border-bottom:1px solid var(--line);font-size:11px}
.gd-tr:last-child{border-bottom:none}
.gd-tr:nth-child(odd){background:rgba(255,255,255,.025)}
.gd-tr span:first-child{flex:0 0 auto;min-width:56px;color:var(--label);font-weight:700}
.gd-tr span:last-child{flex:1;min-width:0;color:var(--text)}
.gd-imgs{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.gd-img{
  max-width:100%;max-height:240px;object-fit:contain;border-radius:6px;
  background:var(--bg3);cursor:zoom-in;display:block;margin:0 auto;
}

/* ---------- 图片全屏 ---------- */
.gd-lb-host{position:fixed;inset:0;z-index:3000;display:none}
.gd-lb-host.on{display:block}
.gd-lb-mask{position:absolute;inset:0;background:rgba(0,0,0,.93)}
.gd-lb-img{
  position:absolute;left:0;right:0;top:45px;bottom:45px;
  width:100%;height:calc(100% - 90px);object-fit:contain;
  touch-action:pinch-zoom;
}
.gd-lb-bar{
  position:absolute;left:0;right:0;top:0;height:40px;display:flex;align-items:center;
  padding:0 12px;color:var(--text);font-size:11px;
}
.gd-lb-bar span{flex:1}
.gd-lb-x{
  width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.3);color:#fff;font-size:14px;cursor:pointer;
  font-family:inherit;line-height:1;
}
.gd-lb-prev,.gd-lb-next{
  position:absolute;top:50%;transform:translateY(-50%);
  width:36px;height:52px;border-radius:8px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.24);
  color:#fff;font-size:22px;cursor:pointer;font-family:inherit;line-height:1;
}
.gd-lb-prev{left:6px}
.gd-lb-next{right:6px}

/* ---------- 目录抽屉 ---------- */
.gd-drawer-host{position:fixed;inset:0;z-index:200;display:none}
.gd-drawer-host.on{display:block}
.gd-dr-mask{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.gd-dr{
  position:absolute;left:0;top:0;bottom:0;width:min(84%,300px);
  display:flex;flex-direction:column;
  background:var(--bg2);border-right:1px solid var(--border);
  animation:gdDrIn .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes gdDrIn{from{transform:translateX(-100%)}}
.gd-dr-h{
  display:flex;align-items:center;padding:9px 11px;font-size:12px;font-weight:800;
  color:var(--num);border-bottom:1px solid var(--line);
}
.gd-dr-x{
  margin-left:auto;width:22px;height:22px;border-radius:50%;background:var(--bg3);
  border:1px solid var(--border);color:var(--text2);font-size:11px;
  cursor:pointer;font-family:inherit;line-height:1;
}
.gd-dr-body{flex:1;min-height:0;overflow-y:auto;padding:6px 0 20px}
.gd-dr-grp{margin-bottom:8px}
.gd-dr-gh{
  display:flex;align-items:center;gap:5px;padding:6px 11px;
  font-size:11px;font-weight:800;color:var(--label);
  border-left:3px solid transparent;
}
.gd-dr-gh span{margin-left:auto;font-size:9px;font-weight:400;color:var(--text2)}
.gd-dr-it{
  display:block;width:100%;text-align:left;padding:5px 11px 5px 18px;
  background:none;border:none;color:var(--text);font-size:11px;
  line-height:1.5;cursor:pointer;font-family:inherit;
}
.gd-dr-it:active{background:rgba(88,166,255,.16);color:var(--accent2)}

/* ---------- 木纹主题 ---------- */
body.theme-wood .gd-card{
  background-image:linear-gradient(180deg,rgba(44,32,18,.94),rgba(28,20,12,.95)),url('../img/ui/win_std_wood_01.png');
  background-repeat:no-repeat,repeat;background-size:auto,150px 150px;
  border-color:#8a6d2c;
}
body.theme-wood .gd-card-tt{color:#fff3cf}
body.theme-wood .gd-sheet{
  background-image:linear-gradient(180deg,rgba(30,21,12,.99),rgba(20,14,8,.99)),url('../img/ui/win_std_wood_01.png');
  background-repeat:no-repeat,repeat;background-size:auto,150px 150px;
}
body.theme-wood .gd-rbody{color:#f0e3c4}
body.theme-wood .gd-h2{color:#ffd968;background:linear-gradient(90deg,rgba(255,217,104,.16),rgba(255,217,104,.02));border-left-color:#ffd968}

/* 列表模式：分类标题行 */
.gd-cat-h{
  display:flex;align-items:center;gap:5px;
  font-size:11px;font-weight:800;color:var(--label);
  padding:7px 2px 4px;border-bottom:1px dashed var(--line);margin-top:3px;
}
.gd-cat-n{margin-left:auto;font-size:8.5px;font-weight:400;color:var(--text2)}
