/* ============================================================
   TikTok 机会雷达（body.tk-page）
   ------------------------------------------------------------
   只使用 shell.css 的设计令牌 + 下方 6 个页面语义令牌；
   亮色主题（html[data-theme="gallery-paper"]）自动跟随。
   颜色从不单独表意：涨跌带 ▲/▼，竞争带「竞争低/中/高」，风险带「风险」。
   ============================================================ */

.tk-page {
  --tk-rise: var(--up);        /* ▲ 红：上涨（中国市场惯例） */
  --tk-fall: var(--down);      /* ▼ 绿：下跌 */
  --tk-risk: var(--warning);   /* 永远配「风险」二字 */
  --tk-calm: #8fb3d9;          /* 竞争低：冷灰蓝，避免与「绿 = 跌」冲突 */
  --tk-margin: var(--primary); /* 高毛利：金 */
  --tk-gap: var(--sp-4);
}
html[data-theme="gallery-paper"] .tk-page { --tk-calm: #2f5d8a; }

.tk-page .tk-num { font-family: var(--font-latin); font-variant-numeric: tabular-nums lining-nums; }
.tk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tk-na { color: var(--text-subtle); }
.tk-dim { color: var(--text-subtle); font-size: var(--fs-caption); }
/* 只锁 body：锁 html 会把 scrollY 重置为 0 */
html.tk-lock body { overflow: hidden; }

.tk-main { display: block; padding: var(--sp-4) 0 var(--sp-9); outline: none; }
.tk-wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
body.tk-has-tray .tk-main { padding-bottom: calc(var(--sp-9) + var(--tk-tray-h, 72px)); }
.tk-meta .tk-meta-cov { display: none; }
/* 桌面端：筛选下拉的标签视觉隐藏（选项文字自带含义），压缩筛选栏高度；移动端抽屉里显示 */
.tk-bar .tk-fgrid .tk-field-l, .tk-bar .tk-field--sort .tk-field-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tk-sheet-body .tk-fgrid .tk-field-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
/* 站点左下角浮动按钮（site.js 的 .ax-fab / .ax-top）在托盘出现时上移，不被托盘遮住 */
body.tk-has-tray .ax-fab, body.tk-has-tray .ax-top { translate: 0 calc(var(--tk-tray-h, 64px) * -1); }

/* ---------- 通用控件 ---------- */
.tk-page .tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 4px 12px; font: inherit; font-size: var(--fs-small); line-height: 1.3;
  color: var(--text-muted); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-1);
  cursor: pointer; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.tk-page .tk-btn:hover { color: var(--text); border-color: var(--text-subtle); }
.tk-page .tk-btn i { font-style: normal; font-size: .95em; }
.tk-page .tk-btn.is-on { color: var(--primary); border-color: var(--primary); }
.tk-page .tk-btn[aria-disabled="true"] { color: var(--disabled); border-color: var(--border); cursor: not-allowed; }
.tk-page .tk-btn:disabled { color: var(--disabled); border-color: var(--border); cursor: not-allowed; }
.tk-page .tk-btn--solid { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.tk-page .tk-btn--solid:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.tk-page .tk-btn--solid:disabled { background: transparent; color: var(--disabled); border-color: var(--border); font-weight: 400; }
.tk-page .tk-iconbtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  font: inherit; font-size: 1.15rem; line-height: 1; color: var(--text-muted);
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-1); cursor: pointer;
}
.tk-page .tk-iconbtn:hover { color: var(--text); border-color: var(--text-subtle); }
.tk-page .tk-iconbtn:disabled { color: var(--disabled); border-color: var(--border); cursor: not-allowed; }
.tk-page .tk-iconbtn--sm { width: 26px; height: 26px; font-size: 1rem; border-color: transparent; }
.tk-page .tk-link { font: inherit; font-size: var(--fs-small); color: var(--primary); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tk-page .tk-select {
  font: inherit; font-size: var(--fs-small); color: var(--text); min-height: 34px; max-width: 100%;
  padding: 4px 28px 4px 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-1);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-subtle) 50%), linear-gradient(135deg, var(--text-subtle) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 10px) 52%; background-size: 4px 4px; background-repeat: no-repeat;
}
.tk-page .tk-select:hover { border-color: var(--text-subtle); }
.tk-page .tk-select option { background: var(--surface); color: var(--text); }
.tk-page :is(.tk-btn, .tk-iconbtn, .tk-link, .tk-select, .tk-chip, .tk-achip, .tk-seg-b, .tk-card-open, input, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.tk-stamp {
  display: inline-block; padding: 2px 8px; font-size: var(--fs-caption); line-height: 1.5; letter-spacing: .04em;
  color: var(--warning); border: 1px solid var(--warning); border-radius: var(--r-1); white-space: nowrap;
}
.tk-stamp--sm { padding: 0 6px; font-size: var(--fs-label); }

/* ---------- 1. 页头 ---------- */
.tk-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--tk-gap); row-gap: var(--sp-5);
  padding: var(--sp-3) 0 var(--sp-4); align-items: end;
}
.tk-head-text { grid-column: 1 / span 10; }
.tk-head > .tk-stamp { grid-column: 11 / -1; justify-self: end; align-self: start; margin-top: var(--sp-2); }
.tk-page .tk-h1 { font-family: var(--font-display); font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem); line-height: var(--lh-tight); margin: 0 0 var(--sp-2); letter-spacing: .01em; }
.tk-page .tk-lede { margin: 0; font-size: var(--fs-body); color: var(--text-muted); }
.tk-meta {
  grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3) 0;
  padding-top: var(--sp-4); border-top: var(--hair);
}
.tk-meta > div { padding: 0 var(--sp-4); border-left: var(--hair); min-width: 0; }
.tk-meta > div:first-child { padding-left: 0; border-left: 0; }
.tk-meta dt { font-size: var(--fs-caption); color: var(--text-subtle); margin: 0 0 2px; }
.tk-meta dd { margin: 0; font-size: var(--fs-small); color: var(--text); }
.tk-meta dd[data-meta="complete"] { display: flex; align-items: center; gap: var(--sp-2); }
.tk-bar-thin { display: inline-block; width: 56px; height: 2px; background: var(--border-strong); position: relative; }
.tk-bar-thin i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); }

/* ---------- 2. KPI ---------- */
.tk-kpis {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--border-strong); border-bottom: var(--hair); margin: 0 0 var(--sp-4);
}
.tk-kpi { padding: var(--sp-3) var(--sp-4); border-left: var(--hair); min-width: 0; }
.tk-kpi:first-child { border-left: 0; padding-left: 0; }
.tk-page .tk-kpi p { margin: 0; }
.tk-kpi-l { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-kpi-v { font-family: var(--font-latin); font-size: 1.75rem; line-height: 1.25; color: var(--text); margin: 2px 0 2px; white-space: nowrap; }
.tk-kpi-v small { font-family: var(--font-text); font-size: var(--fs-caption); color: var(--text-subtle); margin-left: 4px; }
.tk-kpi-v .tk-delta { font-size: inherit; }
.tk-kpi-c { font-size: var(--fs-caption); color: var(--text-subtle); line-height: 1.5; }

/* ---------- 3. 批次栏 ---------- */
.tk-rail {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5); border: var(--hair); border-radius: var(--r-1); background: var(--surface);
}
.tk-rail:empty { min-height: 88px; }
.tk-page .tk-rail p { margin: 0; }
.tk-rail-id { display: grid; grid-template-columns: auto 1fr; column-gap: var(--sp-4); align-items: baseline; min-width: 0; }
.tk-rail-k { grid-column: 1 / -1; font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-rail-no { font-family: var(--font-display); font-size: var(--fs-h4); color: var(--text); white-space: nowrap; }
.tk-rail-d { font-size: var(--fs-small); color: var(--text-muted); }
.tk-rail-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.tk-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-1); }
.tk-page .tk-seg-b {
  min-height: 34px; padding: 4px 12px; font: inherit; font-size: var(--fs-small); color: var(--text-muted);
  background: transparent; border: 0; border-left: 1px solid var(--border-strong); cursor: pointer; white-space: nowrap;
}
.tk-page .tk-seg-b:first-child { border-left: 0; }
.tk-page .tk-seg-b:hover { color: var(--text); }
.tk-page .tk-seg-b[aria-pressed="true"] { color: var(--text); background: var(--surface-raised); box-shadow: inset 0 -2px 0 var(--primary); }
.tk-step { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ---------- 4. 演示横幅 ---------- */
.tk-notice {
  margin: var(--sp-3) 0; padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--warning); background: var(--surface);
  font-size: var(--fs-small); line-height: 1.7; color: var(--text-muted);
}
.tk-notice b { color: var(--warning); font-weight: 600; margin-right: var(--sp-3); }

/* ---------- 5. AI 简报 ---------- */
.tk-ai-slot:empty { display: none; }
.tk-ai { margin: 0 0 var(--sp-4); border: var(--hair); border-radius: var(--r-1); }
.tk-ai summary { padding: var(--sp-3) var(--sp-4); cursor: pointer; font-size: var(--fs-small); color: var(--text-muted); }
.tk-ai summary:hover { color: var(--text); }
.tk-ai-list { margin: 0; padding: 0 var(--sp-4) var(--sp-3); list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--sp-3) var(--sp-5); }
.tk-ai-list li { padding-top: var(--sp-3); border-top: var(--hair); }
.tk-page .tk-ai-list p { margin: 0; }
.tk-ai-name { font-weight: 600; font-size: var(--fs-small); }
.tk-ai-name small { margin-left: var(--sp-2); font-weight: 400; color: var(--text-subtle); }
.tk-ai-why { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.6; }
.tk-ai-sc { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-ai-sc b { margin-left: 6px; color: var(--text); font-weight: 400; }
.tk-ai > .tk-dim { padding: 0 var(--sp-4) var(--sp-3); margin: 0; }

/* ---------- 6. 筛选栏 ---------- */
.tk-list { margin-top: var(--sp-4); }
.tk-bar {
  position: sticky; top: var(--header-h); z-index: var(--z-sticky);
  background: var(--bg); border-top: 1px solid var(--border-strong); border-bottom: var(--hair);
  margin: 0 0 var(--sp-5);
}
.tk-bar:empty { min-height: 96px; }
.tk-bar-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--sp-2) var(--sp-5); padding: var(--sp-2) 0; }
.tk-page .tk-filter-open { display: none; }
.tk-filters { display: grid; gap: var(--sp-2); min-width: 0; }
.tk-frow { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); align-items: center; }
.tk-chipset { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.tk-chipset .tk-field-l { margin-right: var(--sp-2); }
.tk-field-l { font-size: var(--fs-caption); color: var(--text-subtle); white-space: nowrap; }
.tk-page .tk-chip {
  min-height: 30px; padding: 2px 10px; font: inherit; font-size: var(--fs-small); color: var(--text-muted);
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-1); cursor: pointer;
}
.tk-page .tk-chip:hover { color: var(--text); border-color: var(--border-strong); }
.tk-page .tk-chip[aria-pressed="true"] { color: var(--text); border-color: var(--primary); background: var(--surface-raised); }
.tk-page .tk-chip--g { min-width: 32px; font-family: var(--font-latin); }
.tk-page .tk-watch-sheet { display: none; }
.tk-sheet-body .tk-watch-sheet { display: inline-block; align-self: flex-start; }
.tk-fgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); }
.tk-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-field .tk-select { width: 100%; }
.tk-bar-end { display: flex; align-items: end; gap: var(--sp-3); }
.tk-field--sort .tk-select { min-width: 9.5em; }
.tk-count { margin: 0; min-width: 4.5em; padding-bottom: 4px; font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; text-align: right; }
.tk-count b { color: var(--text); font-weight: 400; font-size: 1.05rem; }
.tk-badge { color: var(--primary); }
.tk-active { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); padding: 0 0 var(--sp-3); }
.tk-active[hidden] { display: none; }
.tk-page .tk-achip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 1px 8px;
  font: inherit; font-size: var(--fs-caption); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-1); cursor: pointer;
}
.tk-page .tk-achip i { font-style: normal; color: var(--text-subtle); }
.tk-page .tk-achip:hover i { color: var(--text); }

/* ---------- 7. 卡片网格 ---------- */
.tk-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--tk-gap); }
.tk-grid > * { grid-column: span 4; min-width: 0; }

.tk-skel { border: var(--hair); border-radius: var(--r-1); padding: var(--sp-5); display: grid; gap: var(--sp-3); min-height: 380px; align-content: start; }
.tk-skel i { display: block; height: 10px; background: var(--surface-raised); border-radius: var(--r-1); }
.tk-skel i:nth-child(1) { width: 55%; height: 18px; }
.tk-skel i:nth-child(2) { width: 35%; }
.tk-skel i:nth-child(3) { height: 120px; margin-top: var(--sp-3); }
.tk-skel i:nth-child(4) { width: 80%; }

.tk-card {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-5); background: var(--surface); border: var(--hair); border-radius: var(--r-1);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.tk-card:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.tk-card:focus-within { border-color: var(--border-strong); }
.tk-card-top { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start; }
.tk-tile { width: 56px; height: 56px; display: block; }
.tk-tile-bg { fill: var(--bg-alt); stroke: var(--border); }
.tk-tile-pat line, .tk-tile-pat path, .tk-tile pattern line, .tk-tile pattern path { stroke: var(--border-strong); stroke-width: .8; }
.tk-tile pattern circle { fill: var(--border-strong); }
.tk-tile-plate { fill: var(--bg-alt); stroke: var(--border-strong); }
.tk-tile-glyph { font-family: var(--font-display); font-size: 17px; fill: var(--text-muted); }
.tk-card-id { min-width: 0; }
.tk-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tk-tag {
  display: inline-block; padding: 0 6px; font-size: var(--fs-label); line-height: 1.7; color: var(--text-subtle);
  border: var(--hair); border-radius: var(--r-1); white-space: nowrap;
}
.tk-tag.is-na { border-style: dashed; }
.tk-tag.is-warn { color: var(--warning); border-color: var(--warning); }
.tk-new {
  display: inline-block; padding: 0 6px; font-family: var(--font-latin); font-size: var(--fs-label); line-height: 1.7;
  letter-spacing: .12em; font-weight: 700; color: var(--on-primary); background: var(--primary); border: 1px solid var(--primary); border-radius: var(--r-1);
}
.tk-page .tk-card-name { margin: 0; font-family: var(--font-display); font-size: 1.125rem; line-height: var(--lh-snug); }
.tk-page .tk-card-open {
  padding: 0; margin: 0; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left;
  overflow-wrap: anywhere;
}
.tk-page .tk-card-open:hover { color: var(--primary); }
.tk-page .tk-card-en { margin: 0; font-family: var(--font-latin); font-size: var(--fs-caption); color: var(--text-subtle); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-page .tk-card-cat { margin: 2px 0 0; font-size: var(--fs-caption); color: var(--text-muted); }
.tk-mk { margin-left: 6px; font-family: var(--font-latin); font-size: var(--fs-label); color: var(--text-subtle); letter-spacing: .06em; }
.tk-card-score { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.tk-grade {
  display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px;
  font-family: var(--font-latin); font-size: var(--fs-caption); font-weight: 700; line-height: 1;
  border: 1px solid currentColor; border-radius: var(--r-1); cursor: help;
}
.tk-grade.is-a { color: var(--primary); }
.tk-grade.is-b { color: var(--text-muted); }
.tk-grade.is-c { color: var(--warning); }
.tk-grade.is-d { color: var(--text-subtle); border-style: dashed; }

/* 指标 3×3 */
.tk-metrics {
  margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--hair);
}
.tk-metrics > div { padding: var(--sp-2) var(--sp-2) var(--sp-2) 0; border-bottom: var(--hair); min-width: 0; }
.tk-metrics > div:nth-child(3n+2), .tk-metrics > div:nth-child(3n) { padding-left: var(--sp-3); border-left: var(--hair); }
.tk-metrics > .tk-m-wide { grid-column: span 2; }
.tk-metrics > .tk-m-wide + div { padding-left: var(--sp-3); border-left: var(--hair); }
.tk-metrics dt { font-size: var(--fs-label); color: var(--text-subtle); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-metrics dd { margin: 2px 0 0; font-size: var(--fs-small); color: var(--text); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-metrics dd small, .tk-kv dd small { margin-left: 3px; font-size: var(--fs-label); color: var(--text-subtle); }

.tk-delta { display: inline-flex; align-items: baseline; gap: 2px; }
.tk-delta i { font-style: normal; font-size: .72em; }
.tk-delta.is-rise { color: var(--tk-rise); }
.tk-delta.is-fall { color: var(--tk-fall); }
.tk-delta.is-flat { color: var(--text-muted); }
.tk-comp { display: inline-flex; align-items: baseline; gap: 4px; }
.tk-metrics dd .tk-comp small, .tk-comp small { margin-left: 0; }
.tk-comp.is-calm .tk-num, .tk-comp.is-calm small { color: var(--tk-calm); }
.tk-comp.is-mid small { color: var(--text-muted); }
.tk-comp.is-hot small { color: var(--tk-risk); }
.tk-page .is-margin { color: var(--tk-margin); }
.tk-page .is-loss { color: var(--error); }

.tk-ptags { display: inline-flex; flex-wrap: wrap; gap: 3px 8px; white-space: normal; }
.tk-ptag { font-size: var(--fs-caption); font-family: var(--font-latin); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-ptag i { font-style: normal; font-size: .8em; margin: 0 1px 0 3px; }
.tk-ptag.is-rise i { color: var(--tk-rise); }
.tk-ptag.is-fall i { color: var(--tk-fall); }
.tk-metrics .tk-m-wide dd { white-space: normal; }

.tk-spark { display: block; width: 100%; height: 22px; margin-top: 3px; overflow: visible; }
.tk-spark-line { fill: none; stroke: var(--text-muted); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.tk-spark-dot { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke: var(--text-muted); }
.tk-spark-dot.is-rise { stroke: var(--tk-rise); }
.tk-spark-dot.is-fall { stroke: var(--tk-fall); }

.tk-page .tk-card-line {
  margin: 0; font-size: var(--fs-caption); line-height: 1.6; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk-card-line + .tk-card-line { margin-top: calc(var(--sp-4) * -1 + var(--sp-1)); }
.tk-line-l { display: inline-block; margin-right: var(--sp-2); color: var(--text-subtle); }
.tk-line-l.is-risk { color: var(--tk-risk); }
.tk-card-acts { display: flex; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); border-top: var(--hair); }
.tk-card-acts .tk-btn { flex: 1 1 0; min-width: 0; }

/* ---------- 星盘 ---------- */
.tk-dial { position: relative; flex: 0 0 auto; }
.tk-dial--sm { width: 56px; height: 56px; }
.tk-dial--lg { width: 210px; height: 165px; }
.tk-dial-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tk-dial-track { stroke: var(--border-strong); stroke-width: .8; }
.tk-dial-ring { fill: none; stroke: var(--border-strong); stroke-width: 4; }
.tk-dial-ring.is-na { stroke-width: 1; stroke-dasharray: 3 3; }
.tk-dial-arc { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: butt; }
.tk-dial-tick { stroke: var(--text-muted); stroke-width: 3.2; stroke-linecap: butt; }
.tk-dial--lg .tk-dial-tick { stroke-width: 2.4; }
.tk-dial--lg .tk-dial-arc { stroke-width: 3; }
.tk-dial-miss { fill: none; stroke: var(--text-subtle); stroke-width: .9; }
.tk-dial-lab { font-family: var(--font-text); font-size: 8.5px; fill: var(--text-subtle); }
.tk-dial-num {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center;
  font-family: var(--font-display); font-size: 1rem; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums lining-nums;
}
.tk-dial-num.is-na { color: var(--text-subtle); font-size: 1rem; }
.tk-dial-num small { display: block; font-family: var(--font-text); font-size: 9px; margin-top: 2px; }
.tk-dial--lg .tk-dial-num { font-size: 1.75rem; }
.tk-dial--lg .tk-dial-num.is-na { font-size: 1.5rem; }
.tk-dial--lg .tk-dial-num small { font-size: 11px; }
.tk-grid.is-anim .tk-dial-arc { animation: tk-draw 600ms var(--ease-out) both; }
@keyframes tk-draw { from { stroke-dasharray: 0 100; } }
@media (prefers-reduced-motion: reduce) { .tk-grid.is-anim .tk-dial-arc { animation: none; } }

/* ---------- 状态 ---------- */
.tk-state { padding: var(--sp-7) var(--sp-4); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--r-1); margin-top: var(--sp-4); }
.tk-state[hidden] { display: none; }
.tk-grid:not(:empty) + .tk-state { border: 0; padding: var(--sp-4) 0 0; text-align: left; }
.tk-page .tk-state p { margin: 0 0 var(--sp-2); }
.tk-state-t { font-family: var(--font-display); font-size: var(--fs-h4); color: var(--text); }
.tk-state-t.is-err { color: var(--error); }
.tk-state-s { font-size: var(--fs-small); color: var(--text-subtle); }
.tk-state .tk-btn { margin-top: var(--sp-3); }

/* ---------- 8. 方法 ---------- */
.tk-method { margin: var(--sp-8) 0 var(--sp-4); border-top: 1px solid var(--border-strong); border-bottom: var(--hair); }
.tk-method > summary { padding: var(--sp-4) 0; cursor: pointer; font-family: var(--font-display); font-size: var(--fs-h4); color: var(--text); }
.tk-method-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-6) var(--tk-gap); padding: 0 0 var(--sp-6); }
.tk-method-col { grid-column: span 6; min-width: 0; }
.tk-method h3 { font-size: var(--fs-small); font-weight: 600; margin: var(--sp-5) 0 var(--sp-2); color: var(--text); }
.tk-method h3:first-child { margin-top: 0; }
.tk-method p, .tk-method li { font-size: var(--fs-small); line-height: 1.75; color: var(--text-muted); }
.tk-method p { margin: var(--sp-2) 0 0; }
.tk-dots { list-style: none; margin: 0; padding: 0; }
.tk-dots li { position: relative; padding-left: var(--sp-4); margin-bottom: 4px; font-size: var(--fs-small); line-height: 1.7; color: var(--text-muted); }
.tk-dots li::before { content: ""; position: absolute; left: 0; top: .8em; width: 6px; height: 1px; background: var(--primary); }
.tk-disclaimer { font-size: var(--fs-caption); color: var(--text-subtle); line-height: 1.7; margin: var(--sp-4) 0 0; max-width: var(--measure); }

/* 表格 */
.tk-tablewrap { overflow-x: auto; border: var(--hair); border-radius: var(--r-1); }
.tk-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.tk-table th, .tk-table td { padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; border-bottom: var(--hair); line-height: 1.55; }
.tk-table thead th { font-size: var(--fs-caption); font-weight: 400; color: var(--text-subtle); background: var(--bg-alt); white-space: nowrap; }
.tk-table tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
.tk-tablewrap .tk-table th, .tk-tablewrap .tk-table td { white-space: nowrap; }
.tk-table td { color: var(--text-muted); }
.tk-table tbody tr:last-child > * { border-bottom: 0; }
.tk-table--tight th, .tk-table--tight td { padding: 6px var(--sp-3); font-size: var(--fs-caption); }

/* ---------- 9. Dialog 通用 ---------- */
dialog:where(.tk-drawer, .tk-cmp, .tk-sheet) { color: var(--text); border: 0; padding: 0; max-width: none; max-height: none; }
dialog:where(.tk-drawer, .tk-cmp, .tk-sheet)::backdrop { background: var(--overlay); }

/* 详情抽屉 */
.tk-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(600px, 100vw); height: 100vh; height: 100dvh;
  background: var(--bg); border-left: 1px solid var(--border-strong); box-shadow: var(--sh-3);
  display: none; flex-direction: column; overflow: hidden;
}
.tk-drawer[open] { display: flex; animation: tk-slide var(--dur-base) var(--ease-out); }
@keyframes tk-slide { from { transform: translateX(24px); opacity: 0; } }
.tk-d-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5); border-bottom: var(--hair); background: var(--bg);
}
.tk-d-nav { display: flex; align-items: center; gap: var(--sp-2); }
.tk-d-pos { font-size: var(--fs-caption); color: var(--text-subtle); min-width: 4.5em; text-align: center; }
.tk-d-btns { display: flex; gap: var(--sp-2); margin-left: auto; }
.tk-d-close { flex: 0 0 auto; }
.tk-d-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-5) var(--sp-5) var(--sp-8); }
.tk-d-title { padding-bottom: var(--sp-4); }
.tk-d-title .tk-card-tags { margin-bottom: var(--sp-2); }
.tk-page .tk-d-title h2 { margin: var(--sp-1) 0 2px; font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-tight); outline: none; }
.tk-dsec { padding: var(--sp-5) 0; border-top: var(--hair); }
.tk-page .tk-dsec-h { margin: 0 0 var(--sp-3); font-family: var(--font-display); font-size: var(--fs-h4); line-height: var(--lh-snug); display: flex; align-items: baseline; gap: var(--sp-3); }
.tk-dsec-h small { font-family: var(--font-text); font-size: var(--fs-caption); color: var(--text-subtle); font-weight: 400; }
.tk-dsec p { margin: var(--sp-2) 0 0; }
.tk-kv { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-5); }
.tk-kv--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--sp-4); }
.tk-kv dt { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-kv dd { margin: 2px 0 0; font-size: var(--fs-small); color: var(--text); overflow-wrap: anywhere; }

.tk-scorebox { display: flex; align-items: center; gap: var(--sp-5); margin-bottom: var(--sp-4); }
.tk-scoreside { min-width: 0; margin: 0; display: grid; gap: var(--sp-3); }
.tk-scoreside dt { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-scoreside dd { margin: 2px 0 0; font-size: var(--fs-small); color: var(--text); }
.tk-scoreside .tk-score-conf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.tk-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.tk-sub { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) 4.5em; gap: var(--sp-3); align-items: center; }
.tk-sub-n { font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; }
.tk-sub-n small { margin-left: 6px; font-family: var(--font-latin); font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-sub-track { height: 4px; background: var(--border); position: relative; }
.tk-sub-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); }
.tk-sub-track i.is-na { width: 100%; background: none; border-top: 1px dashed var(--border-strong); top: 1px; }
.tk-sub-v { text-align: right; font-size: var(--fs-small); }
.tk-sub-v .tk-na { font-size: var(--fs-caption); }
.tk-sub-hint { grid-column: 2 / -1; font-size: var(--fs-caption); color: var(--text-subtle); margin-top: -4px; }

.tk-explain { margin-top: var(--sp-4); border: var(--hair); border-radius: var(--r-1); }
.tk-explain > summary { padding: var(--sp-3) var(--sp-4); cursor: pointer; font-size: var(--fs-small); color: var(--text-muted); }
.tk-explain > summary:hover { color: var(--text); }
.tk-explain-body { padding: 0 var(--sp-4) var(--sp-4); }
.tk-ex { padding: var(--sp-3) 0; border-top: var(--hair); }
.tk-page .tk-ex h4 { margin: 0; font-size: var(--fs-small); font-weight: 600; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }
.tk-ex h4 small { font-weight: 400; color: var(--text-subtle); font-size: var(--fs-caption); }
.tk-dsec .tk-ex > p { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.6; margin: 4px 0 var(--sp-2); }
.tk-ex-miss { font-size: var(--fs-caption); color: var(--warning); }
.tk-ex-f { display: grid; grid-template-columns: 6.5em 1fr; gap: var(--sp-3); font-size: var(--fs-caption); color: var(--text-muted); padding-top: var(--sp-2); border-top: var(--hair); }
.tk-ex-f span:first-child { color: var(--text-subtle); }
.tk-ex-f code { font-family: var(--font-latin); font-size: var(--fs-caption); overflow-wrap: anywhere; }

.tk-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-5); }
.tk-chart { margin: 0; min-width: 0; }
.tk-chart-h { font-size: var(--fs-small); color: var(--text); display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.tk-chart-h small { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-page .tk-chart-stats { margin: 2px 0 6px; display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); font-size: var(--fs-label); color: var(--text-subtle); }
.tk-chart-stats b { font-weight: 400; color: var(--text-muted); }
.tk-chart-svg { display: block; width: 100%; height: 72px; overflow: visible; }
.tk-chart-axis { stroke: var(--border); stroke-width: 1; }
.tk-chart-line { fill: none; stroke: var(--text-muted); stroke-width: 1.25; stroke-linejoin: round; }
.tk-chart-dot { stroke: var(--primary); stroke-width: 5; stroke-linecap: round; fill: none; }
.tk-page .tk-chart-range { margin: 4px 0 0; display: flex; justify-content: space-between; font-size: var(--fs-label); color: var(--text-subtle); }
.tk-page .tk-chart-note { margin: 2px 0 0; font-size: var(--fs-label); color: var(--text-subtle); }
.tk-page .tk-nodata {
  margin: var(--sp-2) 0 0; padding: var(--sp-4); text-align: center; font-size: var(--fs-caption); color: var(--text-subtle);
  border: 1px dashed var(--border-strong); border-radius: var(--r-1);
}

.tk-st { display: inline-block; padding: 0 6px; font-size: var(--fs-label); line-height: 1.7; border: var(--hair); border-radius: var(--r-1); color: var(--text-subtle); white-space: nowrap; }
.tk-st.is-demo { color: var(--warning); border-color: var(--warning); }
.tk-st.is-pending { border-style: dashed; }
.tk-st.is-live { color: var(--success); border-color: var(--success); }

.tk-risks { list-style: none; margin: 0; padding: 0; }
.tk-risks li { padding: var(--sp-2) 0; border-bottom: var(--hair); font-size: var(--fs-small); color: var(--text-muted); line-height: 1.6; }
.tk-risks li:last-child { border-bottom: 0; }

/* 利润计算器 */
.tk-calc-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.tk-cfield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-cfield span { font-size: var(--fs-caption); color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-cfield small { margin-left: 4px; font-family: var(--font-latin); }
.tk-page .tk-cfield input {
  width: 100%; min-height: 36px; padding: 4px 10px; font-family: var(--font-latin); font-size: var(--fs-small);
  font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-1);
}
.tk-page .tk-cfield input:hover { border-color: var(--text-subtle); }
.tk-page .tk-cfield input[aria-invalid="true"] { border-color: var(--error); }
.tk-calc-out { margin-top: var(--sp-4); padding: var(--sp-4); background: var(--surface); border: var(--hair); border-radius: var(--r-1); }
.tk-kv--calc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-kv--calc .is-key dd { font-size: 1.125rem; }
.tk-calc-err { color: var(--error); font-size: var(--fs-small); }
.tk-calc-warn { list-style: none; margin: var(--sp-3) 0 0; padding: 0; font-size: var(--fs-caption); color: var(--text-muted); }
.tk-calc-warn b { color: var(--warning); margin-right: var(--sp-2); font-weight: 600; }
.tk-calc-acts { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-3); }
.tk-page .tk-calc-note { margin: 0; font-size: var(--fs-caption); color: var(--text-subtle); line-height: 1.5; }

.tk-steps { list-style: none; margin: 0; padding: 0; }
.tk-steps li { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-2); align-items: start; padding: var(--sp-2) 0; border-bottom: var(--hair); }
.tk-steps li:last-child { border-bottom: 0; }
.tk-page .tk-steps input { width: 16px; height: 16px; margin: 4px 0 0; accent-color: var(--primary); }
.tk-steps label { font-size: var(--fs-small); color: var(--text-muted); line-height: 1.6; cursor: pointer; }
.tk-steps input:checked + label { color: var(--text-subtle); text-decoration: line-through; }

/* 对比弹窗 */
.tk-cmp {
  position: fixed; margin: auto; width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-2); box-shadow: var(--sh-3);
  display: none; flex-direction: column; overflow: hidden;
}
.tk-cmp[open] { display: flex; }
.tk-cmp-head { display: flex; align-items: baseline; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: var(--hair); }
.tk-page .tk-cmp-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--fs-h4); }
.tk-cmp-head .tk-dim { margin: 0; flex: 1 1 auto; }
.tk-cmp-scroll { overflow: auto; flex: 1 1 auto; }
.tk-cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-small); }
.tk-cmp-table th, .tk-cmp-table td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; border-bottom: var(--hair); min-width: 180px; }
.tk-cmp-table thead th { position: sticky; top: 0; background: var(--bg-alt); z-index: 1; font-weight: 400; }
.tk-cmp-name { display: block; font-family: var(--font-display); font-size: var(--fs-small); color: var(--text); }
.tk-cmp-table thead small { font-size: var(--fs-caption); color: var(--text-subtle); }
.tk-cmp-table tbody th, .tk-cmp-table .tk-cmp-corner { min-width: 7.5em; white-space: nowrap; position: sticky; left: 0; background: var(--bg); width: 124px; font-weight: 400; font-size: var(--fs-caption); color: var(--text-subtle); border-right: var(--hair); }
.tk-cmp-table thead .tk-cmp-corner { z-index: 2; background: var(--bg-alt); }
.tk-cmp-table td { color: var(--text-muted); }
.tk-cmp-table td small { display: block; margin-top: 2px; }
.tk-cmp-table td.is-best { color: var(--text); font-weight: 700; }
.tk-bestdot { color: var(--primary); font-size: .6rem; margin-right: 6px; vertical-align: 2px; }
.tk-cmp-tags { margin-top: 4px; font-weight: 400; }
.tk-cmp-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-top: var(--hair); }

/* 对比托盘 */
.tk-tray {
  position: fixed; left: 0; right: 0; bottom: var(--tk-consent-h, 0px); z-index: var(--z-overlay);
  background: var(--bg); border-top: 1px solid var(--border-strong); box-shadow: var(--sh-2);
}
.tk-tray[hidden] { display: none; }
.tk-tray-in { max-width: var(--content); margin: 0 auto; padding: var(--sp-3) var(--gutter); display: flex; align-items: center; gap: var(--sp-4); }
.tk-page .tk-tray-n { margin: 0; font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; }
.tk-tray-n b { color: var(--text); font-weight: 400; }
.tk-tray-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-2); flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.tk-tray-item { display: inline-flex; align-items: center; gap: 2px; padding-left: 10px; border: var(--hair); border-radius: var(--r-1); font-size: var(--fs-caption); white-space: nowrap; }
.tk-tray-item small { margin-left: 6px; font-family: var(--font-latin); color: var(--text-subtle); }
.tk-tray-acts { display: flex; gap: var(--sp-2); flex: 0 0 auto; }

/* Toast */
.tk-toasts { position: fixed; left: 50%; bottom: calc(var(--tk-consent-h, 0px) + var(--sp-5)); transform: translateX(-50%); z-index: var(--z-toast); display: grid; gap: var(--sp-2); width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
body.tk-has-tray .tk-toasts { bottom: calc(var(--tk-consent-h, 0px) + var(--tk-tray-h, 64px) + var(--sp-4)); }
.tk-toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4); font-size: var(--fs-small); color: var(--text);
  background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--r-1); box-shadow: var(--sh-2);
  animation: tk-pop var(--dur-base) var(--ease-out);
}
@keyframes tk-pop { from { opacity: 0; transform: translateY(6px); } }

/* 移动端筛选抽屉 */
.tk-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100vw; max-height: 86vh; max-height: 86dvh;
  background: var(--bg); border-top: 1px solid var(--border-strong); border-radius: var(--r-2) var(--r-2) 0 0; box-shadow: var(--sh-3);
  display: none; flex-direction: column; overflow: hidden;
}
.tk-sheet[open] { display: flex; animation: tk-up var(--dur-base) var(--ease-out); }
@keyframes tk-up { from { transform: translateY(24px); opacity: 0; } }
.tk-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-4); border-bottom: var(--hair); }
.tk-page .tk-sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--fs-h4); }
.tk-sheet-body { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-4); overscroll-behavior: contain; }
.tk-sheet-body .tk-filters { gap: var(--sp-4); }
.tk-sheet-body .tk-frow { flex-direction: column; align-items: stretch; gap: var(--sp-4); }
.tk-sheet-body .tk-chipset .tk-field-l { flex: 0 0 100%; margin: 0 0 4px; }
.tk-sheet-body .tk-chip { min-height: 40px; padding: 4px 14px; }
.tk-sheet-body .tk-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.tk-sheet-body .tk-select { min-height: 42px; }
.tk-sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); border-top: var(--hair); background: var(--bg); }
.tk-sheet-foot .tk-btn { min-height: 44px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1279px) {
  .tk-fgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .tk-grid > * { grid-column: span 6; }
  .tk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-kpi:nth-child(4) { border-left: 0; padding-left: 0; }
  .tk-kpi:nth-child(n+4) { border-top: var(--hair); }
  .tk-bar-main { grid-template-columns: 1fr; }
  .tk-bar-end { justify-content: flex-end; }
}
@media (max-width: 760px) {
  .tk-main { padding-top: var(--sp-3); }
  .tk-head { row-gap: var(--sp-3); padding: var(--sp-2) 0 var(--sp-3); }
  .tk-head-text { grid-column: 1 / span 9; }
  .tk-head > .tk-stamp { grid-column: 10 / -1; margin-top: 4px; }
  .tk-page .tk-h1 { font-size: 1.75rem; margin-bottom: 4px; }
  .tk-page .tk-lede { font-size: var(--fs-small); line-height: 1.6; }
  /* 页头元信息：紧凑 2 列；覆盖市场 + 覆盖平台合成一行；「今日新增」与 KPI 重复，手机端省略 */
  .tk-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); padding-top: var(--sp-3); }
  .tk-meta > div, .tk-meta > div:first-child { padding: 0; border-left: 0; }
  .tk-meta .tk-meta-wide { display: none; }
  .tk-meta .tk-meta-cov { display: block; grid-column: 1 / -1; order: -1; }
  .tk-meta dt { font-size: var(--fs-label); margin: 0; line-height: 1.5; }
  .tk-meta dd { font-size: var(--fs-caption); line-height: 1.5; }
  .tk-bar-thin { width: 40px; }
  /* KPI：紧凑 3×2 */
  .tk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--sp-3); }
  .tk-kpi, .tk-kpi:first-child { padding: var(--sp-2) var(--sp-2); border-left: var(--hair); border-top: 0; }
  .tk-kpi:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .tk-kpi:nth-child(4) { border-left: 0; padding-left: 0; }
  .tk-kpi:nth-child(n+4) { border-top: var(--hair); }
  .tk-kpi-l { font-size: var(--fs-label); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tk-kpi-v { font-size: 1.125rem; margin: 0; }
  .tk-kpi-v small { font-size: var(--fs-label); margin-left: 2px; }
  .tk-kpi-c { font-size: var(--fs-label); line-height: 1.35; }
  .tk-notice { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-caption); }
  .tk-list { margin-top: var(--sp-3); }
  .tk-bar { margin-bottom: var(--sp-3); }
  .tk-rail { padding: var(--sp-3); gap: var(--sp-2); }
  .tk-rail-id { grid-template-columns: 1fr; }
  .tk-rail-ctl { gap: var(--sp-2); }
  .tk-rail-ctl { width: 100%; justify-content: space-between; }
  .tk-seg { flex: 1 1 100%; }
  .tk-page .tk-seg-b { flex: 1 1 50%; min-height: 40px; }
  .tk-step { flex: 1 1 100%; }
  .tk-step .tk-select { flex: 1 1 auto; min-height: 40px; }
  .tk-step .tk-iconbtn { width: 40px; height: 40px; }

  .tk-bar-main { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: var(--sp-2) 0; gap: var(--sp-2); }
  .tk-page .tk-filter-open { display: inline-flex; min-height: 40px; }
  .tk-filters-slot { display: none; }
  .tk-bar-end { gap: var(--sp-2); justify-content: flex-end; min-width: 0; }
  .tk-page .tk-watch-only { display: none; }
  .tk-field--sort .tk-field-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tk-field--sort .tk-select { min-width: 0; min-height: 40px; width: 9.5em; }
  .tk-count { padding-bottom: 0; min-width: 0; }
  .tk-active { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--sp-2); }
  .tk-achip { flex: 0 0 auto; min-height: 32px; }
  .tk-page .tk-btn { min-height: 40px; }
  .tk-page .tk-iconbtn { width: 40px; height: 40px; }

  .tk-grid > * { grid-column: 1 / -1; }
  .tk-page .tk-card-open { display: inline-block; padding: 8px 0; margin: -8px 0; min-height: 40px; }
  /* 演示横幅移到 KPI 上方 */
  .tk-wrap { display: flex; flex-direction: column; }
  .tk-wrap > .tk-head { order: -2; }
  .tk-wrap > .tk-notice { order: -1; margin-top: 0; }
  .tk-card { padding: var(--sp-4); }
  .tk-skel { min-height: 300px; }

  .tk-drawer { width: 100vw; border-left: 0; }
  .tk-d-head { padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); flex-wrap: wrap; }
  .tk-d-btns { order: 3; width: 100%; margin-left: 0; }
  .tk-d-btns .tk-btn { flex: 1 1 0; }
  .tk-d-close { margin-left: auto; }
  .tk-d-body { padding: var(--sp-4) var(--sp-4) var(--sp-8); }
  .tk-kv--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-charts { grid-template-columns: 1fr; }
  .tk-scorebox { gap: var(--sp-3); }
  .tk-dial--lg { width: 176px; height: 138px; }
  .tk-sub { grid-template-columns: 7.5em minmax(0, 1fr) 4em; gap: var(--sp-2); }
  .tk-calc-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-kv--calc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-calc-acts { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }

  .tk-cmp { width: 100vw; max-height: 100vh; height: 100dvh; border-radius: 0; margin: 0; inset: 0; }
  .tk-cmp-head { flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); }
  .tk-cmp-head .tk-dim { order: 3; flex-basis: 100%; }
  .tk-cmp-head .tk-d-close { margin-left: auto; }
  .tk-cmp-table th, .tk-cmp-table td { min-width: 150px; padding: var(--sp-2) var(--sp-3); }
  .tk-cmp-table tbody th, .tk-cmp-table .tk-cmp-corner { min-width: 6em; width: auto; }

  .tk-tray-in { flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) var(--sp-4) calc(var(--sp-2) + env(safe-area-inset-bottom, 0px)); }
  .tk-tray-list { order: 3; flex-basis: 100%; }
  .tk-tray-acts { margin-left: auto; }

  .tk-method-col { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-drawer[open], .tk-sheet[open], .tk-toast { animation: none; }
}
