/* 柳市六中教师工具站 · 应用样式（基于判定通过的设计稿体系） */
:root { --acc:#BE123C; --acc-d:#9F1239; --acc-soft:rgba(190,18,60,.09); --acc-fg:#fff; }
/* 覆盖 tokens 浅色主题的靛蓝 --acc（教训：必须覆盖到 prefers-color-scheme 分支） */
:root[data-theme="light"] { --acc:#BE123C; --acc-d:#9F1239; --acc-soft:rgba(190,18,60,.09); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --acc:#BE123C; --acc-d:#9F1239; --acc-soft:rgba(190,18,60,.09);
} }
* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body { background:var(--bg); color:var(--text); font-family:var(--font); font-size:14px; line-height:1.6; -webkit-tap-highlight-color:transparent; }
button { font-family:var(--font); cursor:pointer; }
.wrap { max-width:520px; margin:0 auto; min-height:100dvh; display:flex; flex-direction:column; }
@media(min-width:960px){ body{ background:linear-gradient(180deg,#EDEDEFF2,var(--bg)); } .wrap{ box-shadow:0 0 0 1px var(--line),0 10px 40px rgba(0,0,0,.06); } }

.appbar { background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:var(--acc-fg); padding:18px 18px 16px; }
.appbar .row { display:flex; align-items:center; gap:10px; }
.appbar .bt { font-size:19px; font-weight:800; letter-spacing:.5px; flex:1; overflow-wrap:anywhere; }
.appbar .bs { font-size:12px; opacity:.88; margin-top:3px; }
.iconbtn { background:rgba(255,255,255,.16); color:#fff; border:0; border-radius:10px; padding:7px 10px; font-size:13px; font-weight:700; }
.iconbtn.plain { background:transparent; border:1.5px solid rgba(255,255,255,.55); }

.main { padding:14px; flex:1; }
.h { font-size:13px; color:var(--t2); font-weight:800; margin:16px 0 8px; }
.h:first-child { margin-top:0; }

.term { background:var(--island); border-radius:16px; padding:14px 16px; margin-bottom:4px; box-shadow:0 1px 3px rgba(0,0,0,.05); display:flex; align-items:center; gap:14px; }
.term .big { font-size:40px; font-weight:800; color:var(--acc-d); font-family:var(--mono); line-height:1; }
.term .big small { font-size:14px; font-weight:700; color:var(--t3); margin-left:2px; }
.term .k { font-size:12px; color:var(--t3); margin-top:4px; }
.term .right { margin-left:auto; text-align:right; display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
.cd { font-size:11.5px; background:var(--acc-soft); color:var(--acc-d); border-radius:16px; padding:4px 10px; }
.cd b { font-family:var(--mono); }

.card { background:var(--island); border-radius:14px; padding:13px 14px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); display:flex; align-items:center; gap:12px; }
.card .ic { width:40px; height:40px; border-radius:12px; background:var(--acc-soft); display:flex; align-items:center; justify-content:center; font-size:20px; flex:none; }
.card .nm { font-weight:700; font-size:14.5px; }
.card .one { font-size:12px; color:var(--t3); margin-top:2px; }
.card .go { margin-left:auto; color:var(--acc); font-weight:800; flex:none; }
.card.ext .ic { background:var(--island-2); }
.card.tappable { cursor:pointer; }
.foot { text-align:center; font-size:11px; color:var(--t3); padding:12px 0 4px; }
.foot a { color:var(--acc-d); }
.empty { text-align:center; padding:30px 10px; color:var(--t3); font-size:13px; }

.lbl { font-size:12.5px; color:var(--t2); font-weight:700; margin:14px 0 6px; }
.lbl:first-child { margin-top:0; }
.ta { width:100%; border:1px solid var(--line-2); border-radius:12px; padding:11px 12px; font-size:13px; font-family:var(--mono); color:var(--text); background:var(--island); outline:none; resize:vertical; }
.ta:focus { border-color:var(--acc); }
.input, .select { border:1px solid var(--line-2); border-radius:10px; padding:8px 10px; font-size:14px; background:var(--island); color:var(--text); outline:none; font-family:var(--font); }
.input:focus, .select:focus { border-color:var(--acc); }
.row2 { display:flex; gap:10px; align-items:center; margin:10px 0 0; font-size:12.5px; color:var(--t2); flex-wrap:wrap; }
.err { color:var(--bad); font-size:12.5px; margin-top:8px; }
.kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:12px; }
.kpi { background:var(--island); border-radius:12px; padding:10px 6px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.kpi .v { font-size:20px; font-weight:800; font-family:var(--mono); overflow-wrap:anywhere; }
.kpi .k { font-size:11px; color:var(--t3); margin-top:2px; }
.rate { display:flex; gap:8px; margin-top:8px; }
.rate .r { flex:1; background:var(--island); border-radius:12px; padding:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.rate .rv { font-weight:800; font-size:18px; }
.rate .rk { font-size:11px; color:var(--t3); }
.rate .bar { height:6px; border-radius:3px; background:var(--island-2); margin-top:8px; overflow:hidden; }
.rate .bar i { display:block; height:100%; background:var(--acc); border-radius:3px; }
.dist { background:var(--island); border-radius:12px; padding:10px 12px; margin-top:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.dist .d { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--t2); padding:3px 0; }
.dist .d span { width:52px; flex:none; text-align:right; }
.dist .d .db { flex:1; background:var(--island-2); border-radius:3px; height:10px; overflow:hidden; }
.dist .d .db i { display:block; height:100%; background:var(--acc); opacity:.78; }
.dist .d b { width:28px; flex:none; font-family:var(--mono); text-align:right; }
.rktable { background:var(--island); border-radius:12px; padding:6px 12px; margin-top:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); max-height:340px; overflow:auto; }
.rankrow { display:flex; gap:10px; font-size:12.5px; padding:6px 0; border-top:1px solid var(--line); }
.rankrow:first-child { border-top:0; }
.rankrow b { width:34px; flex:none; font-family:var(--mono); }
.rankrow .n { flex:1; overflow-wrap:anywhere; }
.rankrow .s { font-family:var(--mono); font-weight:700; }
.table { background:var(--island); border-radius:12px; padding:10px 12px; margin-top:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.table .tt { font-size:12px; color:var(--t3); margin-bottom:6px; font-weight:700; }
.table .names { display:flex; flex-wrap:wrap; gap:6px; }
.table .names span { font-size:12px; background:var(--acc-soft); color:var(--acc-d); border-radius:14px; padding:4px 10px; overflow-wrap:anywhere; }
.bigbtn { display:block; width:100%; border:0; border-radius:14px; background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:var(--acc-fg); font-size:16px; font-weight:800; padding:13px; margin-top:14px; box-shadow:0 8px 20px rgba(190,18,60,.3); }
.bigbtn[disabled] { opacity:.5; }
.ghostbtn { display:block; width:100%; border:1.5px solid var(--acc); background:var(--island); color:var(--acc-d); border-radius:14px; font-size:14.5px; font-weight:700; padding:11px; margin-top:10px; }
.notice { font-size:12.5px; color:var(--t3); margin-top:8px; }
.toast { position:fixed; left:50%; bottom:80px; transform:translateX(-50%); background:#16171B; color:#fff; font-size:13px; border-radius:22px; padding:9px 18px; z-index:99; max-width:86vw; text-align:center; }
[hidden] { display:none !important; }

/* 打印态（R-604）：只留打印区 */
.printarea { background:var(--island); border:1px dashed var(--line-2); border-radius:12px; padding:14px; margin-top:10px; }
.printarea .p-hd { text-align:center; font-weight:800; font-size:15px; margin-bottom:10px; }
.printarea .p-sub { text-align:center; font-size:11px; color:var(--t3); margin-bottom:10px; }
.pgrid { display:grid; gap:4px 14px; }
.pgrid .pr { display:flex; gap:6px; font-size:12px; border-bottom:1px solid var(--line); padding:5px 0; color:var(--text); align-items:center; }
.pgrid .pr i { font-style:normal; width:22px; color:var(--t3); font-family:var(--mono); }
.pgrid .pr .nm { flex:1; overflow-wrap:anywhere; }
.pgrid .pr .ck { width:14px; height:14px; border:1px solid var(--t3); border-radius:3px; flex:none; }
.pgrid.seats .pr { border:1px solid var(--line-2); border-radius:6px; justify-content:center; padding:8px 4px; text-align:center; }
.pdir { text-align:center; font-size:10.5px; color:var(--t3); margin-top:8px; }
@media print {
  body * { visibility:hidden; }
  .printarea, .printarea * { visibility:visible; }
  .printarea { position:absolute; left:0; top:0; width:100%; border:0; }
  .pgrid .pr { border-bottom-color:#999; }
  .pgrid.seats .pr { border-color:#999; }
}
@media print { body:not(:has(.printarea)) * { visibility:visible; } } /* 复核 P2：无打印区时不许打白纸 */
.scrim { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:50; display:flex; align-items:center; justify-content:center; padding:20px; }
.dialog { background:var(--island); border-radius:16px; padding:20px; max-width:340px; width:100%; }
.dialog h3 { margin:0 0 8px; font-size:16px; }
.dialog p { margin:0 0 16px; font-size:13.5px; color:var(--t2); }
.dialog .dops { display:flex; gap:10px; }
.dialog .dops button { flex:1; border-radius:10px; padding:10px; font-size:14px; font-weight:700; border:1px solid var(--line-2); background:var(--island); color:var(--t2); }
.dialog .dops .ok { border:0; background:var(--bad); color:#fff; }
:root { --sel: rgba(190,18,60,.25); }
