/* ============================================================
   全站设计统一层 · v71（精准版）
   ------------------------------------------------------------
   与粗暴覆盖的区别：
   · 只统一「跨页面重复出现的设计元素」——头部、页脚、卡片外壳、
     区块标题、按钮、输入框、表单标签
   · 不碰各页面自己定义的功能组件（图片预览、日历格、棋盘等）
   · 用「限定选择器 + 适度优先级」而非全站 !important

   加载：所有页面 </head> 前，在 ds.css 之后
   ============================================================ */

/* ============================================================
   一、字号阶梯
   ------------------------------------------------------------
   全站收敛到：11 / 12 / 13.5 / 15 / 17 / 20 / 26 / 34
   ============================================================ */
:root{
  --fs-2xs:11px; --fs-xs:12px; --fs-sm:13.5px; --fs-base:15px;
  --fs-md:17px; --fs-lg:20px; --fs-xl:26px; --fs-2xl:34px;
}

/* 区块标题：全站统一 20px */
.section-head h2,
.sec-head h2,
.sec-head h3,
.card > h2,
.suggest h2,
.aside h2,
.tg-head h2,
.dialog h2,
.lb-head h2,
.soon-box h3,
#suggest h2{
  font-size:var(--fs-lg);
  font-weight:800;
  letter-spacing:-.25px;
  line-height:1.3;
}

/* 页面主标题：统一 26px */
.tool-intro h2,
.page-hero h2{
  font-size:var(--fs-xl);
  font-weight:800;
  letter-spacing:-.5px;
  line-height:1.2;
}

/* 卡片标题：统一 15px */
.tool-card h3,
.test-card h3,
.gitem-name,
.cat b,
.test b,
.gl-name{
  font-size:var(--fs-sm);
  font-weight:700;
  line-height:1.35;
}

/* 正文说明：统一 13.5px */
.card p,
.card .hint,
.result .r-soft,
.tool-card p,
.test-card p,
.gitem-desc,
.cat span,
.sg-body,
.hintbar,
.dialog p,
.foot{
  font-size:var(--fs-sm);
  line-height:1.65;
}

/* 次要信息：统一 12px */
.pf-best,
.badge .bn small,
.r-cap,
.sg-count,
.sg-time,
.sg-hint,
.kv span,
.lb-state,
.tool-card h3 small,
.test-card h3 small{
  font-size:var(--fs-xs);
}

/* 微标签：统一 11px */
.lb-rank,
.badge .bn,
.quick-head h2,
.seg button,
.tabs button,
.counter .cap,
.lb-mode{
  font-size:var(--fs-2xs);
  letter-spacing:.3px;
}

/* 表单标签统一 */
.field label,
.fld label{
  font-size:var(--fs-xs);
  font-weight:700;
  color:var(--ink-faint);
  letter-spacing:.2px;
}

/* ============================================================
   二、圆角阶梯
   ------------------------------------------------------------
   6（小元件）/ 9（输入与按钮）/ 12（卡片）/ 16（大区块与弹窗）/ 999（胶囊）
   ============================================================ */

/* 卡片 → 12 */
.tool-card,
.test-card,
.game-card,
.cat,
.test,
.toolstrip,
.profile,
.suggest,
.quick-col{
  border-radius:12px;
}

/* 大区块与弹窗 → 16 */
.dialog,
.holiday,
.gcard-lead,
.drop,
.result,
.board-wrap{
  border-radius:16px;
}

/* 输入与按钮 → 9 */
.btn,
.inp,
.ta,
.input,
.textarea,
.select,
.nick-input,
.sg-input,
.searchbar,
.seg,
.tabs,
.chk{
  border-radius:9px;
}

/* 小元件 → 6 */
.tag,
.chip,
.kv,
.gc-tag,
.tc-tag,
.counter,
.badge,
.lb-mode{
  border-radius:6px;
}

/* ============================================================
   三、卡片外壳归一
   ------------------------------------------------------------
   旧页面里卡片有：有边框无底色 / 有底色无边框 / 双无 / 带阴影
   统一为：白底 + 1px 浅线 + 无阴影（悬停才给柔和阴影）
   ============================================================ */
.tool-card,
.test-card,
.game-card,
.cat,
.test,
.profile,
.suggest,
.toolstrip,
.quick-col{
  background:var(--bg-raised);
  border:1px solid var(--line);
  box-shadow:none;
  transition:background 170ms var(--ease,ease),
             border-color 170ms var(--ease,ease),
             transform 170ms var(--ease,ease),
             box-shadow 170ms var(--ease,ease);
}

.tool-card:hover,
.game-card:hover,
.gcard-lead:hover{
  border-color:var(--line-strong);
  box-shadow:var(--sh-2);
}
.cat:hover,
.test:hover,
.test-card:hover{
  border-color:var(--line-strong);
  background:var(--bg-tint);
}

/* 卡片内边距统一 */
.tool-card{padding:14px 14px;}
.test-card{padding:16px 14px;}
.cat{padding:16px 14px;}
.test{padding:11px 16px;}
.profile,.suggest{padding:20px;}

/* ============================================================
   四、按钮归一
   ============================================================ */
.btn{
  font-size:var(--fs-sm);
  font-weight:700;
  border-radius:9px;
  transition:background 170ms ease, border-color 170ms ease,
             color 170ms ease, transform 120ms ease, box-shadow 170ms ease;
}

/* ============================================================
   五、输入归一
   ============================================================ */
.inp,.ta,.input,.textarea,.select,.nick-input,.sg-input{
  font-size:var(--fs-sm);
  padding:10px 13px;
  border:1px solid var(--line);
  background:var(--bg-raised);
  color:var(--ink);
  border-radius:9px;
  outline:none;
  transition:border-color 170ms ease, box-shadow 170ms ease;
}
.inp:hover,.ta:hover,.input:hover,.textarea:hover,
.nick-input:hover,.sg-input:hover{
  border-color:var(--line-strong);
}
.inp:focus,.ta:focus,.input:focus,.textarea:focus,.select:focus,
.nick-input:focus,.sg-input:focus{
  border-color:var(--brand);
  box-shadow:var(--sh-focus);
  outline:none;
}

/* ============================================================
   六、表格统一
   ============================================================ */
.tbl th{
  font-size:var(--fs-2xs);
  font-weight:800;
  color:var(--ink-faint);
  text-transform:uppercase;
  letter-spacing:.4px;
}
.tbl td{
  font-size:var(--fs-xs);
  border-bottom:1px solid var(--line);
}

/* ============================================================
   七、区块间距统一
   ============================================================ */
.blk,.sec{margin-top:40px;}
.tgroup{margin-top:32px;}
.card + .card,
.result + .card{margin-top:20px;}
.section-head{margin-bottom:20px;}

/* ============================================================
   八、焦点与动效统一
   ============================================================ */
:focus-visible{
  outline:2px solid var(--brand-deep);
  outline-offset:2px;
}
[data-theme="dark"] :focus-visible{outline-color:var(--brand)}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

/* ============================================================
   九、移动端统一
   ============================================================ */
@media (max-width:720px){
  .section-head h2,.sec-head h2,.card > h2,.suggest h2,
  .aside h2,.tg-head h2,.dialog h2,.lb-head h2{
    font-size:var(--fs-md);
  }
  .tool-intro h2,.page-hero h2{font-size:var(--fs-lg);}
  .blk,.sec{margin-top:32px;}
}
