/* =====================================================================
   课文背诵点亮墙 · Cloudflare Workers 版 样式
   视觉沿用桌面版：浅色清爽风格 + 点亮动效
   ===================================================================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
:root {
  --bg: #eef2f8;
  --surface: #ffffff;
  --line: #e3e8f0;
  --ink: #1e2939;
  --muted: #6b7688;
  --brand: #2563eb;
  --brand-soft: #e8efff;
  --dim-bg: #e6ebf3;
  --dim-text: #93a0b5;
  --dim-line: #d8e0ea;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(16,32,64,.06), 0 2px 8px rgba(16,32,64,.05);
  --shadow-md: 0 8px 24px rgba(16,32,64,.10);
  --shadow-lg: 0 30px 70px -20px rgba(12,24,48,.35);
  --radius: 16px;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 12% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    radial-gradient(900px 500px at 100% 0%, #eaf1ff 0%, rgba(234,241,255,0) 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ================= 通用控件 ================= */
.btn {
  border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 11px;
  padding: 9px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  box-shadow: 0 1px 2px rgba(16,32,64,.05);
}
.btn:hover { background: #f7faff; border-color: #c9d6ea; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: linear-gradient(135deg,#3b82f6,#2563eb); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(37,99,235,.9); }
.btn.primary:hover { background: linear-gradient(135deg,#2f74ee,#1d4ed8); }
.btn.danger { color: var(--danger); border-color: #f3c9c9; background: #fff7f7; }
.btn.danger:hover { background: #fdecec; border-color: #eeb4b4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f2f5fa; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; justify-content: center; }

input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fbfcfe; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; min-height: 150px; line-height: 1.75; font-family: inherit; }
label.fld { display: block; margin-bottom: 14px; }
label.fld > span { display: block; font-size: 13px; font-weight: 800; color: #475569; margin-bottom: 6px; }
.sub { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ================= 布局外壳 ================= */
.app-root { display: flex; flex-direction: column; min-height: 100%; }
.appbar {
  position: sticky; top: 0; z-index: 40; flex: none;
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px clamp(12px,1.6vw,26px);
}
.logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg,#60a5fa,#2563eb);
  display: grid; place-items: center; color: #fff; font-size: 20px;
  box-shadow: 0 6px 14px -6px rgba(37,99,235,.7); cursor: pointer;
}
.brand-title { font-size: 16px; font-weight: 900; letter-spacing: .2px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted); }
.appbar .spacer { flex: 1; }
.who {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: #334155; background: #f4f7fb; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 99px;
}
.who i { font-style: normal; color: var(--muted); font-weight: 600; }
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(14px,2vw,28px); }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--brand); text-decoration: none; font-weight: 700; cursor: pointer; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep2 { color: #c3cbd9; }

h1.ph { margin: 0 0 4px; font-size: clamp(20px,2.4vw,28px); font-weight: 900; letter-spacing: .2px; }
p.ph-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

.section-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 900; }
.section-head .spacer { flex: 1; }

/* ================= 班级卡片 ================= */
.cgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.ccard {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .16s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.ccard::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg,#60a5fa,#2563eb); opacity: 0; transition: opacity .2s;
}
.ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cdd8e8; }
.ccard:hover::before { opacity: 1; }
.ccard .school { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .3px; }
.ccard .cname { font-size: 19px; font-weight: 900; letter-spacing: .3px; }
.ccard .meta { display: flex; gap: 14px; font-size: 13px; color: #475569; font-weight: 700; }
.ccard .meta b { color: var(--brand); font-variant-numeric: tabular-nums; }
.ccard .goals-mini { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--dim-line); padding-top: 10px; line-height: 1.8; }
.ccard .goals-mini em { font-style: normal; color: #8b95a6; }
.ccard.newclass {
  align-items: center; justify-content: center; text-align: center;
  border-style: dashed; color: var(--brand); font-weight: 800; min-height: 150px;
  background: linear-gradient(180deg,#fbfdff,#f3f7ff);
}
.ccard.newclass .plus { font-size: 30px; line-height: 1; margin-bottom: 6px; }

/* ================= 面板 ================= */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 900; }
.panel-head .spacer { flex: 1; }

/* ================= 成员 ================= */
.chipwrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; background: #f2f6fd;
  border: 1px solid #dde7f6; border-radius: 99px; padding: 5px 12px; font-size: 13px;
  color: #334155; font-weight: 700;
}
.pchip.off { background: #f6f7f9; border-color: #e6e9ee; color: #9aa4b4; text-decoration: line-through; }
.pchip .rm { cursor: pointer; color: #a3adbd; font-size: 14px; line-height: 1; padding: 0 2px; }
.pchip .rm:hover { color: var(--danger); }
.pchip .revive { cursor: pointer; color: var(--brand); font-size: 11px; }

/* ================= 目标行 ================= */
.goal-list { display: flex; flex-direction: column; gap: 12px; }
.goal-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.goal-row:hover { border-color: #cdd8e8; box-shadow: var(--shadow-md); }
.goal-row.archived { opacity: .62; }
.goal-row .gtitle { font-size: 16px; font-weight: 900; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.goal-row .gmeta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.goal-row .gbar { height: 8px; border-radius: 99px; background: #e6ebf3; overflow: hidden; max-width: 420px; }
.goal-row .gbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#34d399,#22c55e,#16a34a); transition: width .5s cubic-bezier(.3,1,.4,1); }
.goal-row .gacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge2 { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #eafaf0; color: var(--ok); }
.badge2.open { background: #fff7e6; color: var(--warn); }
.badge2.arch { background: #f1f3f7; color: #6b7688; }
.badge2.lock { background: var(--brand-soft); color: #1d4ed8; }

/* ================= 提示条 ================= */
.banner {
  display: flex; align-items: flex-start; gap: 12px; border-radius: 14px; padding: 13px 16px;
  font-size: 13px; line-height: 1.7; margin-bottom: 14px;
  background: linear-gradient(135deg,#fffaf0,#fff6e5); border: 1px solid #fde7bd; color: #7c4a03;
}
.banner.info { background: linear-gradient(135deg,#f2f7ff,#eaf2ff); border-color: #cfe0fb; color: #1e40af; }
.banner.good { background: linear-gradient(135deg,#f2fdf6,#e9fbf0); border-color: #c3ecd4; color: #14532d; }
.banner .bico { font-size: 18px; line-height: 1.2; flex: none; }
.banner .bmain { flex: 1; min-width: 0; }
.banner b { font-weight: 900; }
.banner .bacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }

.empty2 { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty2 h3 { font-size: 17px; color: #475569; margin: 0 0 8px; }

/* ================= 点亮墙 ================= */
.wall-wrap { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.wall-top {
  position: sticky; top: 0; z-index: 30; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px clamp(12px,1.6vw,26px);
}
.wall-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wall-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
input.inline {
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  font: inherit; color: inherit; padding: 2px 6px; min-width: 0; outline: none;
  transition: background .15s, border-color .15s;
}
input.inline:hover { background: #f3f6fb; border-color: var(--line); }
input.inline:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
#wallTitle { font-size: 16px; font-weight: 900; letter-spacing: .2px; width: 22em; max-width: 46vw; }
#wallClass { font-size: 13px; font-weight: 600; color: var(--muted); width: 20em; }

.stats { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.counter { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.counter .n { font-size: clamp(20px,2vw,30px); font-weight: 900; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--brand); }
.counter .sl { color: #c3cbd9; font-weight: 800; font-size: clamp(14px,1.3vw,20px); }
.counter .d { font-size: clamp(16px,1.5vw,22px); font-weight: 800; color: var(--muted); }
.counter.bump .n { animation: bump .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes bump { 0% { transform: scale(1) } 35% { transform: scale(1.32) } 100% { transform: scale(1) } }
.progress-wrap { display: flex; align-items: center; gap: 10px; }
.bar { width: clamp(120px,14vw,260px); height: 10px; border-radius: 99px; background: #e6ebf3; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg,#34d399,#22c55e,#16a34a); transition: width .5s cubic-bezier(.3,1,.4,1); }
.pct { font-size: 14px; font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; min-width: 3.4em; }
.hint { font-size: 12px; color: var(--muted); background: #f4f7fb; border: 1px dashed var(--dim-line); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
@media (max-width: 1100px) { .hint { display: none; } }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

.wall-main { flex: 1; min-height: 0; overflow: auto; padding: clamp(10px,1.4vw,22px); scroll-behavior: smooth; }
.grid { display: grid; gap: clamp(8px,1vw,16px); grid-template-columns: repeat(auto-fill, minmax(clamp(120px,9.5vw,175px), 1fr)); align-content: start; }

.card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--dim-line); background: var(--dim-bg); color: var(--dim-text);
  min-height: clamp(76px,12.4vh,146px);
  display: grid; place-items: center; padding: 8px 10px;
  font-weight: 800; letter-spacing: .08em;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: background .25s, border-color .25s, color .25s, transform .16s, box-shadow .2s;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.card:hover { border-color: #cdd8e8; color: #8d97a9; background: #eef2f8; }
.card:active { transform: scale(.985); }
.card .name { position: relative; z-index: 2; font-size: clamp(19px,1.75vw,36px); line-height: 1.1; text-align: center; pointer-events: none; }
.card.len4 .name { font-size: clamp(16px,1.45vw,30px); }
.card.len6 .name { font-size: clamp(13px,1.15vw,24px); }
.card .fill { position: absolute; inset: 0; z-index: 1; opacity: 0; transform: scale(.65); background: linear-gradient(135deg, var(--c1,#60a5fa), var(--c2,#2563eb)); transition: opacity .3s ease, transform .42s cubic-bezier(.2,1.5,.4,1); }
.card .fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg,transparent 32%,rgba(255,255,255,.75) 50%,transparent 68%); transform: translateX(-130%); animation: none; }
.card .badge, .card .meta { position: absolute; z-index: 3; opacity: 0; transform: scale(.4) rotate(-30deg); transition: opacity .25s .12s, transform .4s .12s cubic-bezier(.2,1.7,.4,1); }
.card .badge { top: 8px; right: 8px; min-width: clamp(22px,1.9vw,34px); height: clamp(22px,1.9vw,34px); padding: 0 5px; border-radius: 99px; background: rgba(255,255,255,.94); color: var(--c2,#1d4ed8); display: grid; place-items: center; font-size: clamp(11px,1vw,17px); font-weight: 900; letter-spacing: 0; box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.card .meta { left: 0; right: 0; bottom: 6px; text-align: center; font-size: clamp(9px,.72vw,12px); font-weight: 700; letter-spacing: .06em; color: rgba(255,255,255,.92); }
.card .hold { position: absolute; left: 0; bottom: 0; z-index: 4; height: 6px; width: 100%; opacity: 0; background: linear-gradient(90deg,#7dd3fc,#2563eb); border-radius: 0 4px 4px 0; transform: scaleX(0); transform-origin: left center; transition: opacity .15s; }
.card.holding { transform: scale(1.045); border-color: #93b8f5; color: #64748b; background: #f3f7ff; box-shadow: 0 0 0 3px rgba(37,99,235,.18), 0 14px 30px -14px rgba(37,99,235,.55); }
.card.holding .hold { opacity: 1; will-change: transform; }
.card.lit { border-color: transparent; color: #fff; background: var(--dim-bg); box-shadow: 0 12px 26px -12px var(--c2,#1d4ed8), 0 2px 6px rgba(16,32,64,.08); animation: pop .62s cubic-bezier(.2,1.7,.4,1); }
.card.lit .fill { opacity: 1; transform: scale(1); }
.card.lit .fill::after { animation: sheen .95s .08s ease-out; }
.card.lit .badge, .card.lit .meta { opacity: 1; transform: scale(1) rotate(0); }
.card.lit .name { text-shadow: 0 2px 10px rgba(0,0,0,.24); }
.card.no-anim { animation: none !important; }
.card.no-anim .fill::after { animation: none !important; }
.card.no-anim .badge, .card.no-anim .meta { transition: none; }
.card.no-anim .fill { transition: none; }
.card.departed { opacity: .55; border-style: dashed; }
.card.departed::after {
  content: '已离班';
  position: absolute; left: 6px; bottom: 6px; z-index: 3;
  font-size: 10px; font-weight: 800; letter-spacing: 0; line-height: 1.5;
  color: #b45309; background: #fff7e6; border: 1px solid #fde7bd;
  padding: 0 6px; border-radius: 99px; pointer-events: none;
}
.card.departed .name { opacity: .8; }
.nudge { animation: nudge .32s ease; }
@keyframes nudge { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
@keyframes pop { 0% { transform: scale(1) } 34% { transform: scale(1.14) } 62% { transform: scale(.972) } 100% { transform: scale(1) } }
@keyframes sheen { to { transform: translateX(130%) } }

.fx-layer { position: fixed; pointer-events: none; z-index: 60; overflow: visible; }
.ripple { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; border: 3px solid currentColor; opacity: 0; animation: ripple .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes ripple { 0% { transform: scale(.18); opacity: .9 } 70% { opacity: .35 } 100% { transform: scale(2.5); opacity: 0 } }
.dot { position: absolute; left: 50%; top: 50%; border-radius: 50%; animation: dotfly .85s cubic-bezier(.15,.7,.3,1) forwards; box-shadow: 0 0 10px rgba(255,255,255,.6); }
@keyframes dotfly { 0% { transform: translate(-50%,-50%) scale(1); opacity: 1 } 100% { transform: translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(0); opacity: 0 } }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti-layer i { position: absolute; top: -12vh; display: block; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { 0% { transform: translateY(0) rotate(0) } 100% { transform: translateY(126vh) rotate(880deg) } }

.dock { flex: none; background: #fff; border-top: 1px solid var(--line); padding: 9px clamp(12px,1.6vw,26px); display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); min-height: 44px; }
.dock .tag { flex: none; font-weight: 800; color: var(--warn); background: #fff7e6; border: 1px solid #fde7bd; padding: 3px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.dock .tag.ok { color: var(--ok); background: #eafaf0; border-color: #c3ecd4; }
.dock .who-list { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.6; }
.dock .who-list b { color: #475569; font-weight: 700; }

/* ================= 弹窗 ================= */
.mask { position: fixed; inset: 0; z-index: 100; background: rgba(19,29,48,.42); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 20px; }
.mask.show { display: flex; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); width: min(720px,100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; animation: riseIn .24s cubic-bezier(.2,1.2,.4,1); }
.modal.sm { width: min(460px,100%); }
.modal.lg { width: min(900px,100%); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px) scale(.97) } to { opacity: 1; transform: none } }
.modal header { padding: 18px 22px 12px; display: flex; align-items: center; gap: 10px; }
.modal header h2 { margin: 0; font-size: 18px; font-weight: 900; flex: 1; }
.modal header .x { border: none; background: #f2f5fa; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; color: #64748b; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.modal header .x:hover { background: #e6ecf5; color: var(--ink); }
.modal .body { padding: 0 22px 6px; overflow: auto; flex: 1; }
.modal footer { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.row2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row2 > * { flex: 1; min-width: 150px; }
.sep2 { height: 1px; background: var(--line); margin: 18px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: #fbfcfe; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: #475569; cursor: pointer; }
.chip:hover { background: #eef4ff; border-color: #bcd2f7; color: #1d4ed8; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #334155; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

/* ================= 报表 ================= */
.report { margin: 0; font-size: 14px; }
.report h1 { font-size: 22px; margin: 6px 0 4px; letter-spacing: 1px; }
.report .rmeta { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; margin: 14px 0 18px; }
.report .rmeta div { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.report .rmeta span { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.report .rmeta b { font-size: 16px; font-weight: 800; }
.report h3 { font-size: 15px; margin: 20px 0 8px; padding-left: 10px; border-left: 4px solid var(--brand); }
.report table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th, .report td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.report th { background: #f4f7fc; font-weight: 800; color: #475569; }
.report td.num { width: 60px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.report .undone { color: var(--warn); }
#printArea { display: none; }
@media print {
  body { background: #fff; }
  .appbar, .dock, .wall-top, .wall-main, .mask, .fx-layer, .confetti-layer, #toast, .page { display: none !important; }
  #printArea { display: block !important; padding: 0; }
  .report { font-size: 12px; }
  .report .rmeta div { background: #fff; }
  .report h1 { font-size: 19px; }
  @page { size: A4; margin: 14mm; }
}

/* ================= toast ================= */
#toast { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 950; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast .t { background: rgba(23,35,58,.93); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); animation: toastIn .3s cubic-bezier(.2,1.4,.4,1); max-width: 82vw; }
#toast .t.hide { animation: toastOut .35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.96) } }

/* ================= 登录 ================= */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px,100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 30px 28px; }
.auth-card .alog { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg,#60a5fa,#2563eb); display: grid; place-items: center; color: #fff; font-size: 26px; margin: 0 auto 16px; box-shadow: 0 10px 24px -10px rgba(37,99,235,.85); }
.auth-card h1 { margin: 0 0 4px; font-size: 21px; font-weight: 900; text-align: center; }
.auth-card .asub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-err { background: #fff7f7; border: 1px solid #f3c9c9; color: var(--danger); font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 10px; margin-bottom: 14px; display: none; }
.auth-err.show { display: block; }
.auth-tip { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.8; background: #f7f9fc; border: 1px dashed var(--dim-line); border-radius: 12px; padding: 11px 13px; }
.auth-tip code { background: #eef2f8; padding: 1px 6px; border-radius: 5px; font-size: 11.5px; font-family: Consolas, "Courier New", monospace; }

.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); font-size: 14px; gap: 12px; }
.spinner { width: 30px; height: 30px; border: 3px solid #dfe6f1; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

.kv { font-family: Consolas, "Courier New", monospace; font-size: 12px; word-break: break-all; background: #f4f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: #334155; }
.matrix-wrap { overflow: auto; max-height: 60vh; }
.matrix { border-collapse: collapse; font-size: 12px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 6px 9px; white-space: nowrap; }
.matrix th { background: #f4f7fc; font-weight: 800; color: #475569; position: sticky; top: 0; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: #fff; font-weight: 700; }
.matrix th:first-child { background: #f4f7fc; }
.matrix td.yes { color: var(--ok); font-weight: 700; }
