/* ============================================================
   商家创作台 · 第 2 批：形状与尺度 (Shape & Scale)
   ------------------------------------------------------------
   单独一层，在 tokens.css 之后加载，覆盖 app-theme.css。
   整批回退：删掉 index.html 里这一行
        <link rel="stylesheet" href="/shape.css?v=1">
   每条都写成 var(--令牌, 原值)，原值 = 改造前的实测值。
   圆角/阴影/描边用 !important：只为压过 app.js 的行内样式；
   这三类属性本就是"形状类"，各页面不该自己乱写。
   ============================================================ */

/* ---------- 1. 圆角尺度：11 种 -> 5 档 ---------- */
.card, .panel, .section, .sg-card, .stat-card,
.single-grid .sg-card, .ks-tpl-card, .thumb-card,
.modal, .modal-content, .modal-box {
  border-radius: var(--r-lg, 14px) !important;        /* 卡片 14 -> 16 */
}
.btn, .btn-sm, .btn-out, .btn-pri, .btn-err,
input:not([type=checkbox]):not([type=radio]), select, textarea {
  border-radius: var(--r-sm, 8px) !important;         /* 按钮/输入框 8 -> 10 */
}
.cat-tag, .plat-tab, .pill, .tag, .chip { border-radius: var(--r-full, 999px) !important; }
.modal, .modal-content, .modal-box { border-radius: var(--r-xl, 20px) !important; }

/* ---------- 2. 卡片：统一描边 + 统一轻阴影（原来多数是 none） ---------- */
.card, .stat-card, .single-grid .sg-card, .panel, .section, .ks-tpl-card, .thumb-card {
  border-color: var(--c-line-2, rgba(0,0,0,.04)) !important;
  box-shadow: var(--sh-1, none) !important;
}
.card:hover, .stat-card:hover, .single-grid .sg-card:hover, .ks-tpl-card:hover {
  box-shadow: var(--sh-2, none) !important;
}

/* ---------- 3. 描边色统一：4 种近似灰 -> 1 种 ---------- */
.card, .stat-card, .sg-card, .panel,
input:not([type=checkbox]):not([type=radio]), select, textarea,
th, td, .main-header {
  border-color: var(--c-line-2, #e6ebf3) !important;
}

/* ---------- 4. 按钮：统一尺寸/字重（不加 !important，避免压掉有意的小按钮） ---------- */
.btn {
  height: var(--btn-h, 30px);
  font-size: var(--fs-btn, 12px);
  font-weight: 600;
  padding-left: var(--btn-px, 10px);
  padding-right: var(--btn-px, 10px);
}

/* ---------- 5. 输入框：统一高度与字号（原 38px / 16px，16px 显得笨重） ---------- */
input:not([type=checkbox]):not([type=radio]), select, textarea {
  height: var(--inp-h, 38px);
  font-size: var(--fs-inp, 16px);
}

/* ---------- 6. 标题层级：主标题收一点，区块标题提一点 ---------- */
.page-head h1 { font-size: var(--fs-h1, 24px); }
.section-header h2,
.main-content > .panel > .section .section-header h2,
.main-content > .panel > .section .section-header > h2 {
  font-size: var(--fs-h2, 15px);
  font-weight: var(--fw-h2, 650);
}

/* ---------- 7. 留白节奏（卡片内边距由 app.js 逐块写死，故意不动） ---------- */
.main-content { padding: var(--sp-main, 32px 40px 48px); }
.stat-card { padding: var(--sp-card-2, 16px 18px); }
.sidebar-item { height: var(--sp-nav, 40px); }

/* ---------- 8. 移动端：还原成原来的值，避免压掉移动端规则 ---------- */
@media (max-width: 768px) {
  .main-content { padding: var(--sp-main-m, 16px 16px 32px); }
  .main-header { padding-left: 16px; padding-right: 16px; }
  .card, .stat-card, .sg-card, .panel, .section,
  .single-grid .sg-card, .ks-tpl-card, .thumb-card { border-radius: var(--r-md, 14px) !important; }
  .btn { height: auto; }
}
