/* ses-match 静态样稿（docs/02-site.md）：共用样式 */
:root {
  --bg: #f6f7f9; --panel: #fff; --line: #e3e6eb; --text: #1d2330; --sub: #555d6e; --faint: #7d8597;
  --brand: #2f6fde; --brand-weak: #e9f0fd; --ok: #1f9d55; --ok-weak: #e6f6ed; --ng: #d64545; --ng-weak: #fdecec;
  --warn: #c98a00; --warn-weak: #fff6dd; --case: #2f6fde; --talent: #8b5cf6; --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
  /* the same as tgkvm's console (2026-11-12, user: 字体还是不好看，tgkvm用的什么字体): rounded SF on Mac / iPhone,
     Segoe UI + Microsoft YaHei on Windows (not Yu Gothic: thin and blurry there); no web font */
  font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "PingFang SC", "Noto Sans JP", "Noto Sans SC", "Microsoft YaHei", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}
/* dark (设置 › 显示 › 主题; 35B v3's idea, 2026-11-12) */
:root[data-theme="dark"] { color-scheme: dark; --bg: #0f1218; --panel: #171b23; --line: #2a303b; --text: #e6e9ef; --sub: #a3abba; --faint: #6f7889;
  --brand: #5b8def; --brand-weak: #1c2a44; --ok: #3fbf7a; --ok-weak: #15302a; --ng: #ef6b6b; --ng-weak: #3a1c1f; --warn: #e0a83a; --warn-weak: #3a2f17;
  --shadow: none; }
:root[data-theme="dark"] .top, :root[data-theme="dark"] .chathead, :root[data-theme="dark"] .composer, :root[data-theme="dark"] .side,
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea, :root[data-theme="dark"] button,
:root[data-theme="dark"] .ai .body, :root[data-theme="dark"] .me.paste, :root[data-theme="dark"] .raw, :root[data-theme="dark"] .score::before { background: var(--panel); color: var(--text); }
:root[data-theme="dark"] .convs { background: #12161d; }
:root[data-theme="dark"] .tag, :root[data-theme="dark"] .skill, :root[data-theme="dark"] .hint, :root[data-theme="dark"] .cond .c { background: #232937; color: var(--sub); }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] button.primary { background: var(--brand); color: #fff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn.primary, button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--sub); }
.btn.sm, button.sm { padding: 3px 9px; font-size: 12px; }
.btn.danger { color: var(--ng); border-color: #f2c4c4; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; color: var(--text); }
textarea { resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--sub); }
label.f > input, label.f > select, label.f > textarea { font-size: 14px; color: var(--text); }
.muted { color: var(--sub); } .faint { color: var(--faint); } .small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
h1 { font-size: 20px; margin: 0 0 12px; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 14px; margin: 0 0 8px; }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 52px; }
.logo { font-weight: 700; font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo i { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #2f6fde, #8b5cf6); display: inline-block; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--sub); border-bottom: 2px solid transparent; }
.nav a.on { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.nav a:hover { text-decoration: none; color: var(--text); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #dfe6f3; display: grid; place-items: center; font-weight: 600; color: #42506b; font-size: 13px; }
.lang { font-size: 12px; color: var(--sub); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: inline-flex; }
.lang span { padding: 2px 8px; } .lang span.on { background: var(--brand-weak); color: var(--brand); font-weight: 600; }
.badge-dot { position: relative; } .badge-dot::after { content: ""; position: absolute; top: -2px; right: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--ng); }

.page { max-width: 1240px; margin: 0 auto; padding: 20px 18px 40px; }

/* tags */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef1f5; color: #3d4659; white-space: nowrap; }
.tag.case { background: var(--brand-weak); color: var(--case); } .tag.talent { background: #f1ebfe; color: var(--talent); }
.tag.ok { background: var(--ok-weak); color: var(--ok); } .tag.ng { background: var(--ng-weak); color: var(--ng); }
.tag.warn { background: var(--warn-weak); color: var(--warn); } .tag.line { background: #fff; border: 1px solid var(--line); }
.skill { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; background: #f1f3f7; margin: 0 4px 4px 0; }
.skill.must { background: #e3ecfc; color: #1f4fa8; } .skill.hit { background: var(--ok-weak); color: var(--ok); } .skill.miss { background: var(--ng-weak); color: var(--ng); text-decoration: line-through; }

/* score */
.score { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none;
  background: conic-gradient(var(--c, var(--ok)) calc(var(--v) * 1%), #e9ecf1 0); position: relative; }
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.score span { position: relative; }

/* list cards */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
.item .title { font-weight: 600; font-size: 15px; color: var(--text); }
.item .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--sub); font-size: 12px; margin: 4px 0 6px; }
.item .side { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

/* filter bar */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px; margin-bottom: 14px; }
.layout2 { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
@media (max-width: 960px) { .layout2 { grid-template-columns: 1fr; } }

/* key-value */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--sub); } .kv dd { margin: 0; }
.kv .q { color: var(--warn); cursor: help; }
.raw { white-space: pre-wrap; background: #fafbfc; border: 1px dashed var(--line); border-radius: 8px; padding: 12px; font-size: 13px; max-height: 360px; overflow: auto; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 8px 14px; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--sub); font-weight: 500; background: #fafbfc; white-space: nowrap; }

/* switch */
.sw { width: 36px; height: 20px; border-radius: 999px; background: #cfd5df; position: relative; display: inline-block; cursor: pointer; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.sw.on { background: var(--brand); } .sw.on::after { left: 18px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 30, .35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; }

/* admin */
.admin .top { background: #1d2330; border-bottom-color: #1d2330; }
.admin .top .logo, .admin .nav a.on { color: #fff; } .admin .nav a { color: #aab2c3; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; } .stat b { font-size: 24px; display: block; } .stat span { color: var(--sub); font-size: 12px; }

/* note on mockup */
.mock-note { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: #1d2330; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; opacity: .85; z-index: 60; }
.mock-note a { color: #9ec1ff; }

.nav a, .top .right a { white-space: nowrap; }
@media (max-width: 720px) {
  .top { gap: 8px; padding: 0 10px; }
  .logo { font-size: 0; gap: 0; } .logo span { display: none; }
  .nav a { padding: 0 7px; }
  .top .right .lang, .top .right a { display: none; }
  .mock-note { top: calc(58px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .item { flex-direction: column; } .item .side { margin-left: 0; align-items: flex-start; text-align: left; }
  .kv { grid-template-columns: 90px 1fr; }
}

/* the site (2026-11-12): what the mockup's pages had inline */
.empty-note { padding: 30px; text-align: center; color: var(--sub); }
.err { color: var(--ng); font-size: 13px; }
.spin::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: #1d2330; color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 80; max-width: 90vw; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
:root[data-theme="dark"] .tbl th { background: #1b2029; }
:root[data-theme="dark"] .tag.line { background: transparent; }
.checks { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: var(--sub); }
.checks .y::before { content: "✓ "; color: var(--ok); } .checks .x::before { content: "✗ "; color: var(--ng); } .checks .x { color: var(--ng); }
/* the lists: the title row and the filters stay at the top on a wide screen (2026-11-12, user: 最上面一行滚动时隐藏了，
   可以同检索条件一起固定); on a phone they would take the screen */
@media (min-width: 721px) {
  /* it starts right under the top bar (the page's 20px top padding taken into it), so it never moves before it sticks */
  .listhead { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding-top: 20px; margin-top: -20px; }
  .listhead .filters { margin-bottom: 12px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); padding: 12px 14px; }
}

/* the admin's lists (body.fill, 2026-11-12, user: 后台的检索等header固定，滚动条只滚动一览内容): on a wide screen the
   title, the words and the filters stay; only the part below scrolls, its tables' heads at its top. A phone: as before */
@media (min-width: 721px) {
  body.fill { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.fill > .page { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding-bottom: 0; }
  body.fill .listtop { flex: none; }
  body.fill .listtop .filters { margin-bottom: 12px; }
  body.fill .scroll { flex: 1; min-height: 0; overflow: auto; padding-bottom: 24px; }
  body.fill .scroll .tbl-wrap { overflow: visible; }
  body.fill .scroll .tbl th { position: sticky; top: 0; z-index: 2; }
}
