/* 盘活儿标注平台。层次靠背景明度（VQ-01），数字等宽（VQ-06），聚焦用双环阴影（VQ-02）。 */
:root {
  --bg0: #161616; --bg1: #1c1c1c; --bg2: #222; --bg3: #2a2a2a;
  --text: #e4e4e4; --muted: #8b8f9a; --accent: #4cc9f0; --ok: #57d68d; --warn: #ff7a59; --yellow: #ffd166;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg0); color: var(--text); font: 14px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { font-weight: 360; display: flex; flex-direction: column; }
b, strong, h1, h2, h3 { font-weight: 560; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p, li { text-wrap: pretty; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.err { color: var(--warn); white-space: pre-wrap; }
.good { color: var(--ok); }

header#top { position: sticky; top: 0; z-index: 10; display: flex; gap: 18px; align-items: center; padding: 10px 20px; background: var(--bg2); }
.brand { color: var(--text); font-weight: 560; }
#nav { display: flex; gap: 14px; }
#nav a { color: var(--muted); }
#nav a.on { color: var(--text); }
#who { margin-left: auto; color: var(--muted); display: flex; gap: 10px; align-items: center; }
#banner { padding: 10px 20px; background: #3a1d14; color: var(--warn); white-space: pre-wrap; }
main#app { padding: 20px; width: 100%; max-width: 1100px; margin: 0 auto; flex: 1 0 auto; }
main#app.full { max-width: none; padding: 0; flex: 1 1 0; min-height: 0; overflow: hidden; }

h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 15px; margin: 22px 0 10px; }
button { background: var(--bg3); color: var(--text); border: 0; border-radius: 6px; padding: 6px 14px; font: inherit; cursor: pointer; }
button:hover:not(:disabled) { background: #333; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: #1f4a5a; color: #dff6ff; }
button.primary:hover:not(:disabled) { background: #26596b; }
button.danger { color: var(--warn); }
input { background: var(--bg1); color: var(--text); border: 0; border-radius: 6px; padding: 8px 10px; font: inherit; box-shadow: inset 0 0 0 1px #333; }
input:focus, button:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px rgba(76, 201, 240, .25); }

.card { background: var(--bg1); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.card .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.card .title { font-weight: 560; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--bg3); color: var(--muted); font-size: 12px; }
.tag.ok { background: #1d3a2a; color: var(--ok); }
.tag.warn { background: #3a2a14; color: var(--yellow); }
.videos { margin-top: 8px; display: grid; gap: 6px; }
.video { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.spacer { flex: 1; }
.empty { color: var(--muted); padding: 20px 0; }
table.plain { border-collapse: collapse; width: 100%; }
table.plain th, table.plain td { text-align: left; padding: 6px 10px; }
table.plain th { color: var(--muted); font-weight: 400; }
table.plain tr:nth-child(even) td { background: var(--bg1); }

.login { max-width: 360px; margin: 80px auto; display: grid; gap: 12px; }

/* 标注页：平台外壳 + 类型组件 */
.work { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.work-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 8px 16px; background: var(--bg1); font-size: 13px; }
.work-body { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; min-height: 0; }
.stage { position: relative; overflow: hidden; background: var(--bg0); }
.guide { width: 320px; overflow: auto; background: var(--bg1); padding: 12px 16px; font-size: 13px; white-space: pre-wrap; }
.guide[hidden] { display: none; }
.pick { max-width: 720px; margin: 40px auto; }

/* 教程页（guide.js）和标注页右侧说明：guide.md 渲染成 HTML */
.guide-md { white-space: normal; }
.guide-md h1 { font-size: 17px; margin: 0 0 8px; }
.guide-md ul { padding-left: 20px; margin: 6px 0; }
.guide-md li { margin: 3px 0; }
pre.keys { white-space: pre-wrap; font: 12px/1.6 ui-monospace, Menlo, monospace; color: var(--muted); margin: 6px 0 10px; }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.example { margin: 0; display: grid; gap: 6px; align-content: start; }
.ex-media { display: grid; gap: 6px; }
.ex-media canvas, .ex-media video { width: 100%; border-radius: 4px; background: #000; display: block; }
.ex-answer { color: var(--yellow); font-weight: 560; }
.practice-stage { height: 70vh; min-height: 420px; border-radius: var(--radius); margin: 8px 0; }
.practice-stage[hidden] { display: none; }
.practice-result .card.ok { box-shadow: inset 3px 0 0 var(--ok); }
.practice-result .card.bad { box-shadow: inset 3px 0 0 var(--warn); }
.practice-result .card { display: grid; gap: 6px; justify-items: start; }
.answer-img { max-width: 640px; width: 100%; }
.ex-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px; }
.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .88); display: grid; place-items: center; cursor: zoom-out; padding: 24px; }
.lightbox canvas, .lightbox video { max-width: 100%; max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; background: #000; }
.lightbox canvas { width: min(100%, calc((100vh - 80px) * 16 / 9)); }
.lightbox video { width: min(100%, calc((100vh - 80px) * 16 / 9)); cursor: default; }
.lightbox-hint { color: var(--muted); font-size: 12px; position: absolute; bottom: 12px; }
