/* KL8 V6 研选通用基线。基础变量仅在此定义。 */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --card: #fff;
  --text: #202b35;
  --muted: #727c88;
  --line: #e7eaf0;
  --accent: #c43c35;
  --accent-light: #fff0ed;
  --green: #287666;
  --green-light: #edf6f2;
  --blue: #507bac;
  --blue-border: #a8d4c2;
  --shadow: 0 5px 22px #263b5010;
  --accent-glow-1: #fff8f7;
  --accent-glow-2: #ffe8e6;
  --accent-glow-3: #ffd1cd;
  --accent-soft-bg: #fbeaea;
  --accent-soft-border: #e8b6b0;
  --gold-bg: #fff4d6;
  --gold-text: #815b06;
  --gold-border: #e8c54a;
  --gold-cell: #fdf6e0;
  --silver-cell: #f0f2f5;
  --bronze-cell: #f8ece1;
  --metal-text: #1f2430;
  --miss-bg: #f0f4f8;
  --locked-bg: #fbfbfc;
  --locked-icon: #d1d5db;
  /* 2026-10-21 补：3d.css 里引用的这几个变量之前没有定义 → color:var(--ink) 属非法值，
     颜色声明被静默丢弃（标题/输入框/错误提示全部继承父色）。
     --ink 在跨工具基线 cpwiner-base.css 里的值是 #202b35，与本文件的 --text 同值，
     所以 3d.css 统一改用 --text；--accent-deep 取 3d.css 原有的 fallback 值 #a02e28，
     保证原本带 fallback 的 4 处用法渲染结果完全不变。
     下面这组是「战绩卡 P3 复刻块」用到的中性色/蓝调色，原来全是硬编码 hex，
     现统一收进变量（值与原 hex 逐一相同，视觉零变化）。 */
  --accent-deep: #a02e28;
  --fc3d-white: #fff;
  --fc3d-summary-bg: #fafbfc;
  --fc3d-miss-border: #dfe3e9;
  --fc3d-hit-bg: #fdf1f0;
  --fc3d-tag-bg: #e4e8ee;
  --fc3d-tag-text: #5a6473;
  --fc3d-part-bg: #e8eef5;
  --fc3d-part-text: #3d5a80;
  --fc3d-part-border: #c3d2e2;
  --fc3d-miss-text: #a8b0ba;
  --fc3d-miss-bg: #f5f6f8;
  --rgb-white: 255,255,255;
  --rgb-accent: 196,60,53;
  --shadow-white-90: rgba(255,255,255,.9);
  --shadow-white-60: rgba(255,255,255,.6);
  --shadow-accent-18: rgba(196,60,53,.18);
  --shadow-accent-25: rgba(196,60,53,.25);
  --shadow-accent-5: rgba(196,60,53,.05);
  --shadow-ring: 0 0 0 2px var(--accent-light);
  --shadow-none: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.65; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p + p, details p, details h3 { margin-top: 8px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select { max-width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }
input { min-width: 0; }
.muted, .tiny { color: var(--muted); font-size: 12px; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; flex: none; }
.skip-link { position: fixed; top: -80px; left: 14px; z-index: 40; padding: 8px; background: var(--card); }
.skip-link:focus { top: 8px; }
.topbar { height: 48px; position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line); z-index: 10; }
.top-inner { max-width: 1100px; height: 100%; margin: auto; padding: 0 14px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--card); font-weight: 700; }
.brand-name { font-size: 15px; font-weight: 700; }
.brand small { display: block; font-size: 9px; color: var(--muted); line-height: 1.2; }
.tabs { display: flex; gap: 4px; margin: auto; }
.tabs button { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.tabs button.active { color: var(--accent); background: var(--accent-light); }
.header-member, .subtle { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 12px; }
.container { max-width: 1100px; margin: auto; padding: 14px; }
.page-head, .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-label { display: flex; align-items: center; gap: 6px; }
.section-icon, .eyebrow { color: var(--accent); }
.page-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.eyebrow { font-size: 10px; }
.card { padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.pill, .tags > span { display: inline-flex; padding: 2px 6px; border-radius: 6px; background: var(--green-light); color: var(--green); font-size: 11px; }
.pill.neutral, .pill.replay, .tags > span { background: var(--bg); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.primary, .secondary { min-height: 32px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.primary { background: var(--accent); color: var(--card); border-color: var(--accent); }
.secondary { background: var(--bg); color: var(--text); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
.actions label { max-width: 100%; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.segmented button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--muted); }
.segmented button.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.info-note { padding-left: 8px; border-left: 2px solid var(--line); margin-top: 10px; color: var(--muted); font-size: 12px; }
.table-scroll { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: var(--bg); font-weight: 500; }
th:first-child, td:first-child { text-align: left; }
.table-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); margin-top: 10px; font-size: 11px; }
.empty { padding: 14px; text-align: center; color: var(--muted); }
summary { cursor: pointer; padding: 4px 0; font-weight: 600; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; border-radius: 6px; background: var(--bg); max-height: 200px; overflow: auto; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 14px; color: var(--muted); font-size: 11px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--card); max-width: 90vw; z-index: 40; box-shadow: var(--shadow); }

@media (max-width: 700px) {
  .top-inner { gap: 8px; }
  .header-member > span { display: none; }
  .tabs { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); z-index: 20; }
  .tabs button { flex-direction: column; gap: 4px; padding: 7px 4px; font-size: 10px; border-radius: 8px; }
  .container { padding: 14px 10px calc(95px + env(safe-area-inset-bottom)); }
  .actions input { width: 100%; }
  #toast { bottom: calc(85px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
