/* ============================================================
   马卡龙轻量化风格 · 设计变量
   ------------------------------------------------------------
   规则：
   1) 卡片一律「纯白 + 无边框 + 极浅阴影」，靠留白和阴影分层，不靠描边；
   2) 所有彩色都从下面六组马卡龙里取，浅底配深字，不出现刺眼的饱和色；
   3) 状态色只有三档语义：ok（对/已交/优）、half（半对/待定）、bad（错/缺/待提）；
   4) 组件里不要再写死色值，一律引用这里的变量。
   ============================================================ */
:root {
  /* 底色 */
  --paper: #F7F8FA;
  --card: #ffffff;

  /* 文字（带一点蓝调，不用纯黑） */
  --ink: #232A35;
  --ink2: #667085;
  --ink3: #98A1AF;

  /* 分隔线：只用于卡片内部，不当外框 */
  --line: #EFF1F5;
  --line2: #F5F7FA;

  /* 主色 · 天空蓝 */
  --accent: #3B82F6;
  --accent-ink: #1D4ED8;
  --accent-soft: #EAF2FE;
  --warn: #E0704E;

  /* 圆角 */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;

  /* 阴影：只用这一套，别到处写 rgba(0,0,0,.0x) */
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.035);
  --shadow-lift: 0 6px 20px rgba(0, 0, 0, 0.07);

  /* 马卡龙六色 · 浅底 / 深字 */
  --mint-bg: #E2F4EA;    --mint-ink: #2C7A54;   --mint-line: #C9E8D7;
  --sakura-bg: #FCE8ED;  --sakura-ink: #B53B59; --sakura-line: #F2CBD5;
  --sky-bg: #E5F0FA;     --sky-ink: #24507F;    --sky-line: #CFE1F7;
  --taro-bg: #F1E8F7;    --taro-ink: #6A4391;   --taro-line: #E0D1EE;
  --butter-bg: #FCF4DD;  --butter-ink: #9C7A23; --butter-line: #EFE0B6;
  --peach-bg: #FCECE6;   --peach-ink: #A65033;  --peach-line: #F3D6C8;

  /* 马卡龙实心色：柱状图、折线点这类小面积用，浅底在白卡上看不清 */
  --mint: #7FC8A4;
  --sakura: #F0A0B2;
  --sky: #7FB0EE;
  --taro: #B79BD6;
  --butter: #EFD08A;
  --peach: #F2A98D;

  /* 状态语义色：对 / 半 / 错，优 / 及格 / 待提 共用 */
  --ok-bg: #E2F4EA;    --ok-ink: #2C7A54;    --ok-ink2: #4E9772;   --ok-line: #C9E8D7;
  --half-bg: #FCF4DD;  --half-ink: #9C7A23;  --half-ink2: #B08E33; --half-line: #EFE0B6;
  --bad-bg: #FCE8ED;   --bad-ink: #B53B59;   --bad-ink2: #C96079;  --bad-line: #F2CBD5;

  /* 半透明毛玻璃层：顶栏、底栏、toast（深色模式下要跟着换，不然一片白） */
  --surface-bar: rgba(247, 248, 250, 0.88);
  --surface-tab: rgba(255, 255, 255, 0.94);
  --toast-bg: rgba(35, 42, 53, 0.94);

  --tab-h: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

#app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  position: relative;
}

.page { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 24px); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: var(--surface-bar);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 19px; font-weight: 600; letter-spacing: 0.2px; flex: 1; min-width: 0; }
.topbar .sub { font-size: 12px; color: var(--ink3); font-weight: 400; display: block; margin-top: 1px; }
.topbar .spacer { flex: 1; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--ink2);
  flex: 0 0 auto;
}
.icon-btn:active { background: var(--line2); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- generic ---------- */
.content { padding: 4px 16px 0; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
  letter-spacing: 0.5px;
  margin: 22px 4px 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  background: var(--card);
  border: 0;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: scale(0.975); }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.24); }
.btn-primary:active { background: var(--accent-ink); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--accent); }
.btn-danger { color: var(--bad-ink); }
.btn-block { display: flex; width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-xs); }

.row { display: flex; align-items: center; gap: 10px; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 56px 24px 40px; }
.empty .art {
  width: 68px; height: 68px; margin: 0 auto 18px;
  border-radius: 18px; background: var(--accent-soft);
  display: grid; place-items: center;
}
.empty .art svg { width: 30px; height: 30px; color: var(--accent); }
.empty h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--ink3); line-height: 1.65; max-width: 280px; margin: 0 auto 20px; }

/* ---------- class cards ---------- */
.class-list { display: flex; flex-direction: column; gap: 10px; }

.class-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--card);
  border-radius: var(--radius);
  border: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition: transform 0.12s ease;
}
.class-card:active { transform: scale(0.985); }
.class-card .bar { width: 4px; flex: 0 0 4px; background: var(--c, var(--accent)); }
.class-card .body { flex: 1; padding: 14px 14px 14px 15px; min-width: 0; }
.class-card .name { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.class-card .meta { font-size: 12.5px; color: var(--ink3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.class-card .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.class-card .chev { display: grid; place-items: center; padding-right: 14px; color: var(--ink3); }
.class-card .chev svg { width: 16px; height: 16px; }

/* ---------- segmented tabs ---------- */
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--line2);
  border-radius: var(--radius-sm);
  margin: 6px 0 14px;
}
.seg button {
  flex: 1;
  height: 34px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink2);
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button.active { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ---------- search ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--card);
  border: 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.search svg { width: 16px; height: 16px; color: var(--ink3); flex: 0 0 auto; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 14px; min-width: 0; }

/* ---------- student rows ---------- */
.stu-list { background: var(--card); border-radius: var(--radius); border: 0; box-shadow: var(--shadow); overflow: hidden; }
.stu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line2);
  background: var(--card);
}
.stu-row:last-child { border-bottom: 0; }
.stu-row:active { background: var(--accent-soft); }
.sid {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink3);
  min-width: 30px;
  max-width: 7.5em;
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 2px;
}
/* 头像：正圆，颜色由名字哈希决定（见 util.js 的 toneOf），六组马卡龙轮转 */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 0 0 32px;
  background: var(--m-bg, var(--accent-soft));
  color: var(--m-ink, var(--accent-ink));
  user-select: none;
}
.stu-row .nm { flex: 1; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--line2);
  color: var(--ink2);
  font-weight: 500;
  flex: 0 0 auto;
}
/* 状态标签：全部走马卡龙浅底 + 深字，只保留这三种语义 */
.tag.ok   { background: var(--ok-bg);   color: var(--ok-ink); }
.tag.half { background: var(--half-bg); color: var(--half-ink); }
.tag.bad,
.tag.warn { background: var(--bad-bg);  color: var(--bad-ink); }
.tag.info { background: var(--sky-bg);  color: var(--sky-ink); }
.tag.taro { background: var(--taro-bg); color: var(--taro-ink); }

/* ---------- seat map ---------- */
.seat-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.seat-toolbar .seg { margin: 0; flex: 0 0 auto; padding: 2px; }
.seat-toolbar .seg button { height: 30px; font-size: 12.5px; padding: 0 12px; flex: 0 0 auto; }

.podium {
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 3px;
  color: var(--ink3);
  padding: 6px 0 12px;
  position: relative;
}
.podium::before {
  content: "";
  display: block;
  width: 92px; height: 3px;
  margin: 0 auto 7px;
  border-radius: 2px;
  background: var(--line);
}

.seat-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; }
.seat-grid {
  display: grid;
  gap: 6px;
  min-width: min-content;
  touch-action: pan-x pan-y;
}
.seat {
  position: relative;
  min-height: 46px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 2px;
  overflow: hidden;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
  user-select: none;
}
.seat.empty { border-style: dashed; border-color: #D7DDE6; background: transparent; }
.seat .n { font-size: 12px; line-height: 1.15; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.seat .s { font-size: 9.5px; color: rgba(0,0,0,0.42); font-variant-numeric: tabular-nums; line-height: 1.1; }
.seat.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.seat.dragging { opacity: 0.35; }
.seat.drop-hint { border-color: var(--accent); background: var(--accent-soft); }
.seat.m { background: var(--sky-bg); color: var(--sky-ink); }
.seat.f { background: var(--sakura-bg); color: var(--sakura-ink); }
.seat.u { background: var(--line2); color: var(--ink2); }

.seat-legend { display: flex; gap: 12px; margin: 12px 2px 0; font-size: 11.5px; color: var(--ink3); justify-content: center; flex-wrap: wrap; }
.seat-legend span { white-space: nowrap; }
.seat-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }

.unseated { margin-top: 20px; }
.unseated .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
}
.chip.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip:active { background: var(--line2); }

/* ---------- info list ---------- */
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line2); font-size: 14px; align-items: center; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink2); flex: 0 0 auto; }
.kv .v { color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.color-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 15px; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 2px solid transparent;
  position: relative;
}
.swatch.on::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 7px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 760px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--surface-tab);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 0;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.04);
  z-index: 40;
}
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--ink3);
  transition: color 0.15s ease;
}
.tabbar button svg { width: 21px; height: 21px; }
.tabbar button.active { color: var(--accent); }

/* ---------- floating action ---------- */
.fab {
  position: fixed;
  right: max(18px, calc(50% - 380px + 18px));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 18px);
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.26);
  z-index: 35;
}
.fab:active { transform: scale(0.96); }
.fab svg { width: 17px; height: 17px; }

/* ---------- sheet ---------- */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(28, 27, 24, 0.38);
  animation: fade 0.2s ease;
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  animation: up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } }

.sheet-head {
  display: flex;
  align-items: center;
  padding: 16px 16px 10px;
  gap: 10px;
}
.sheet-head h2 { flex: 1; font-size: 16px; font-weight: 600; }
.sheet-body { padding: 4px 16px 8px; overflow-y: auto; }
.sheet-foot { padding: 12px 16px 16px; display: flex; gap: 10px; }

@media (min-width: 640px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 18px; max-height: 84vh; padding-bottom: 0; }
  .sheet-foot { padding-bottom: 18px; }
}

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; padding-left: 2px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="time"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 15px;
  outline: 0;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { height: auto; min-height: 132px; padding: 12px 13px; resize: vertical; line-height: 1.6; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { font-size: 11.5px; color: var(--ink3); margin-top: 6px; padding-left: 2px; line-height: 1.5; }

.opt-row { display: flex; gap: 8px; }
.opt-row button {
  flex: 1;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
  color: var(--ink2);
}
.opt-row button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 26px);
  transform: translate(-50%, 10px);
  background: var(--toast-bg);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 200;
  max-width: 84vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 带「撤销」按钮的提示条：要能点，所以单独打开 pointer-events */
.toast.has-act {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
  text-align: left;
}
.toast-act {
  flex: none;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.toast-act:active { background: rgba(255, 255, 255, 0.3); }

.muted { color: var(--ink3); font-size: 12.5px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }

@media (min-width: 900px) {
  #app { max-width: 840px; }
  .seat { min-height: 58px; border-radius: 11px; }
  .seat .n { font-size: 13px; }
  .seat .s { font-size: 10.5px; }
  .topbar { padding-top: 18px; }
  .topbar h1 { font-size: 20px; }
  .content { padding-left: 20px; padding-right: 20px; }
  .seat-scroll { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .page { padding-bottom: calc(var(--tab-h) + 40px); }
}

/* 弹层打开时，提示条挪到顶部，别挡住正在填的内容 */
body:has(.sheet-wrap) .toast {
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  bottom: auto;
}

/* ---------- 首次打开：底部「装到手机」条 ---------- */
.pwa-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px 11px 14px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(28, 40, 58, .13);
  backdrop-filter: blur(10px);
  animation: pwa-in .28s ease-out;
}
@keyframes pwa-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pwa-bar .ico {
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  background: var(--accent-soft, #e8f0fa);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.pwa-bar .ico svg { width: 18px; height: 18px; }
.pwa-bar .tx { flex: 1; min-width: 0; }
.pwa-bar .tx b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.pwa-bar .tx span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.pwa-bar .go {
  flex: none; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 8px 15px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .26);
}
.pwa-bar .go:active { opacity: .88; }
.pwa-bar .no {
  flex: none; width: 26px; height: 26px;
  border: 0; background: none; color: var(--ink3);
  display: flex; align-items: center; justify-content: center;
}
.pwa-bar .no svg { width: 15px; height: 15px; }

/* ---------- 点名 / 考勤 ---------- */

.att-entry {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-align: left;
}
.att-entry .ic {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); flex: 0 0 auto;
}
.att-entry .ic svg { width: 17px; height: 17px; }
.att-entry .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-entry .tx b { font-size: 15px; font-weight: 600; }
.att-entry .tx i {
  font-style: normal; font-size: 12.5px; color: var(--ink3); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-entry .go { color: var(--ink3); display: flex; }
.att-entry .go svg { width: 16px; height: 16px; }
.att-entry.done { border-color: var(--sky-line); background: var(--sky-bg); }
.att-entry.done .ic { background: var(--accent); color: #fff; }

.att-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.att-head input[type="date"] {
  flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); font-size: 14px; color: var(--ink);
}
.att-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); white-space: nowrap; }

.att-sum { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); margin-bottom: 10px; }
.att-sum .c { display: inline-flex; align-items: center; gap: 5px; }
.att-sum .n { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.att-sum i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.att-grid.only .att-chip:not(.on) { display: none; }
.att-only-none { margin: 14px 0 0; font-size: 13px; text-align: center; }
.att-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 10px; border-radius: var(--radius-sm); border: 0;
  background: var(--card); box-shadow: var(--shadow-sm);
  font-size: 13.5px; line-height: 1.2; text-align: left;
  transition: background .16s ease, box-shadow .16s ease, transform .12s ease;
}
.att-chip:active { transform: scale(.97); }
.att-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.att-chip .st { flex: 0 0 auto; font-size: 12px; font-weight: 600; opacity: .45; transition: opacity .16s ease; }
.att-chip.on { background: var(--ab); box-shadow: inset 0 0 0 1px var(--ac); }
.att-chip.on .st { opacity: 1; }

.att-warn {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--peach-bg);
  border: 0; box-shadow: var(--shadow-sm); color: var(--peach-ink); font-size: 13px; margin-bottom: 12px;
}
.att-warn > div { display: flex; flex-direction: column; gap: 2px; }
.att-warn svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.att-warn b { font-weight: 600; }

.att-foot { margin-top: 14px; }
.att-hist.cur { background: var(--accent-soft); }

/* ---------- 打印成绩单 ---------- */

#print-area { display: none; }

@media print {
  body.printing { background: #fff; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block !important; }
  @page { size: A4 portrait; margin: 12mm; }
  .print-sheet { color: #000; font-size: 12px; }
  .print-sheet h2 { font-size: 17px; margin: 0 0 6px; font-weight: 600; }
  .print-meta { font-size: 11.5px; color: #444; margin-bottom: 10px; }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table th,
  .print-table td { border: 1px solid #bbb; padding: 3px 5px; text-align: center; font-size: 11px; }
  .print-table th { background: #f0f0f0; font-weight: 600; }
  .print-table tr { page-break-inside: avoid; }
  .print-foot { margin-top: 10px; font-size: 10.5px; color: #666; }
}

/* ---------- 排名 / 正确率 / 走势 ---------- */

.rank-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line2);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row .no {
  width: 22px; flex: 0 0 auto; text-align: center; font-size: 12.5px;
  color: var(--ink3); font-variant-numeric: tabular-nums;
}
.rank-row .no.top { color: var(--accent); font-weight: 700; }
.rank-row .nm {
  flex: 0 1 auto; min-width: 62px; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; flex-direction: column; line-height: 1.25;
}
.rank-row .nm .sub { font-style: normal; font-size: 11px; color: var(--ink3); }
.rank-row .bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; background: var(--accent); opacity: .55; }
.rank-row .val {
  flex: 0 0 auto; margin-left: auto; font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.acc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.acc-row .no { width: 24px; font-size: 12px; color: var(--ink3); text-align: right; }
.acc-row .bar2 { flex: 1; height: 7px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.acc-row .bar2 i { display: block; height: 100%; border-radius: 4px; }
.acc-row .pct { width: 40px; font-size: 12px; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; }

.trend-svg { width: 100%; height: 92px; display: block; }
.trend-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); padding: 2px 4px 0; }

/* ---------- 备份提醒 / 随机抽人 ---------- */

.backup-tip {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 13px; margin-bottom: 10px; border-radius: var(--radius-sm);
  background: var(--butter-bg); border: 0; box-shadow: var(--shadow-sm);
  color: var(--butter-ink); font-size: 12.5px; line-height: 1.5;
}
.backup-tip svg { width: 16px; height: 16px; flex: 0 0 auto; }
.backup-tip span { flex: 1; min-width: 180px; }
.backup-tip .btn { flex: 0 0 auto; }

.pick-box {
  padding: 26px 16px 22px; text-align: center;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border-radius: 12px;
}
.pick-name {
  font-size: 34px; font-weight: 700; letter-spacing: 2px;
  color: var(--ink); line-height: 1.3; word-break: break-all;
}
.pick-sub { margin-top: 8px; font-size: 13px; color: var(--ink3); }

@keyframes pickPop {
  0% { transform: scale(.86); opacity: .3; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}
.pick-name.pop { animation: pickPop .38s ease-out; }

/* ---------- 深色模式 ---------- */

html[data-theme="dark"] {
  --paper: #14161A;
  --card: #1C1F25;
  --ink: #E8EAEE;
  --ink2: #9AA1AF;
  --ink3: #6B7280;
  --line: #262A31;
  --line2: #202329;
  --accent: #6FA5F7;
  --accent-ink: #A9C9FB;
  --accent-soft: #1B2A42;
  --warn: #E08B62;

  --shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.18);
  --shadow-lift: 0 6px 20px rgba(0, 0, 0, 0.3);

  /* 深色下马卡龙反相：深底 + 浅字，保持同一组色相 */
  --mint-bg: #1B3328;    --mint-ink: #7FCFA6;   --mint-line: #2A4738;
  --sakura-bg: #35222A;  --sakura-ink: #EFA2B4; --sakura-line: #4A2C34;
  --sky-bg: #1B2A3D;     --sky-ink: #8FBEF5;    --sky-line: #2B4560;
  --taro-bg: #2B2339;    --taro-ink: #C0A6E0;   --taro-line: #3E3352;
  --butter-bg: #302B1B;  --butter-ink: #E3C77A; --butter-line: #46401F;
  --peach-bg: #33241D;   --peach-ink: #EBA98C;  --peach-line: #4A3428;

  --ok-bg: #1B3328;    --ok-ink: #7FCFA6;    --ok-ink2: #6FBF97;   --ok-line: #2A4738;
  --half-bg: #302B1B;  --half-ink: #E3C77A;  --half-ink2: #C9AB54; --half-line: #46401F;
  --bad-bg: #35222A;   --bad-ink: #EFA2B4;   --bad-ink2: #D98098;  --bad-line: #4A2C34;

  --surface-bar: rgba(20, 22, 26, 0.86);
  --surface-tab: rgba(28, 31, 37, 0.94);
  --toast-bg: rgba(60, 66, 78, 0.96);
}
html[data-theme="dark"] body,
html[data-theme="dark"] #app { background: var(--paper); }
html[data-theme="dark"] .att-entry.done { background: var(--sky-bg); }
html[data-theme="dark"] .podium,
html[data-theme="dark"] .seat.empty { background: #23262c; color: var(--ink3); }
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .sheet-body { background: var(--card); }
html[data-theme="dark"] .pick-box { background: linear-gradient(180deg, #202c3a, transparent); }

/* ---------- 答题卡预览 ---------- */
.card-tpl-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  line-height: 0;
}
.card-tpl-preview img { width: 100%; height: auto; display: block; }

/* ---------- 扫完一张的成绩卡 ---------- */
.quick-card { text-align: center; padding: 6px 4px 2px; }
.quick-card .nm { font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.quick-card .meta { font-size: 12.5px; color: var(--ink3); margin-top: 3px; }
.quick-card .sc { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.quick-card .sc b { font-size: 40px; font-weight: 650; letter-spacing: -.02em; color: var(--accent); line-height: 1; }
.quick-card .sc span { font-size: 13px; color: var(--ink3); }
.quick-card .thumb {
  width: 58px; height: 76px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); float: left; margin: 2px 12px 0 0;
}
.quick-card .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.quick-card .badge { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; background: var(--line2); color: var(--ink2); }
.quick-card .badge.warn { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- 拖文件导入 ---------- */
.drop-zone {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
  text-align: center;
  background: var(--line2);
  transition: border-color .15s, background .15s;
}
.drop-zone b { display: block; font-size: 13.5px; font-weight: 600; }
.drop-zone span { display: block; font-size: 12.5px; color: var(--ink2); margin-top: 4px; }
.drop-zone i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink3); margin-top: 6px; line-height: 1.6; }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.link-btn {
  border: 0; background: none; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}
body.dropping::after {
  content: "松手就导入名单";
  position: fixed; inset: 12px; z-index: 300;
  border: 2px dashed var(--accent); border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ---------- 内嵌浏览器（微信等）提示 ---------- */
.mm-tip {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 10px 14px 0;
  padding: 12px 12px 12px 13px;
  border-radius: var(--radius-sm);
  background: var(--butter-bg);
  border: 0;
  box-shadow: var(--shadow-sm);
  color: var(--butter-ink);
  font-size: 13px;
  line-height: 1.68;
}
.mm-tip .mm-ico { flex: 0 0 20px; color: var(--butter-ink); margin-top: 1px; opacity: .85; }
.mm-tip .mm-ico svg { width: 19px; height: 19px; display: block; }
.mm-tip .mm-body { flex: 1; min-width: 0; }
.mm-tip b { color: var(--butter-ink); font-weight: 650; }
.mm-tip .mm-link {
  padding: 0; margin-top: 4px; border: 0; background: none;
  color: var(--butter-ink); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px;
}
.mm-tip .mm-x { flex: 0 0 22px; color: var(--butter-ink); opacity: .6; padding: 2px; }
.mm-tip .mm-x svg { width: 14px; height: 14px; display: block; }

/* ---------- 同步码 ---------- */
.sync-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
  letter-spacing: .1em;
  text-align: center;
  padding: 18px 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  word-break: break-all;
  user-select: all;
}
.note-warn {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--peach-bg);
  border: 0;
  box-shadow: var(--shadow-sm);
  color: var(--peach-ink);
  font-size: 13px;
  line-height: 1.75;
}
.note-warn b { color: var(--peach-ink); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* ---------- 错题集 ---------- */
.wb-chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 2px; scrollbar-width: none; }
.wb-chips::-webkit-scrollbar { display: none; }
.wb-chip {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink2); white-space: nowrap;
}
.wb-chip.on { background: var(--accent-soft); border-color: var(--sky-line); color: var(--accent-ink); font-weight: 600; }
.wb-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 15px 12px; margin-bottom: 10px;
}
.wb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wb-top .no { font-size: 15px; font-weight: 650; }
.wb-top .rate { font-size: 12.5px; color: var(--ink2); }
.wb-bar { height: 5px; border-radius: 3px; background: var(--line2); margin: 9px 0 8px; overflow: hidden; }
.wb-bar i { display: block; height: 100%; border-radius: 3px; background: var(--warn); opacity: .55; }
.wb-names { font-size: 13px; color: var(--ink2); line-height: 1.65; }
.wb-acts { display: flex; gap: 8px; margin-top: 10px; }
.wb-acts .btn { flex: 1; }

/* ---------- 变式题输出 ---------- */
.var-out {
  margin-top: 14px; padding: 13px 14px;
  background: var(--grey-soft, #F2F4F8);
  border-radius: 12px;
  font-size: 13.5px; line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow: auto;
  color: var(--ink);
}
#fb-cv { width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line); }

/* ---------- 统考成绩分析 ---------- */
.ut-drop {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 26px 16px; margin-top: 8px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: var(--card); text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
body.dropping .ut-drop { border-color: var(--accent); background: var(--accent-soft); }
.ut-drop-ic { color: var(--accent); width: 30px; height: 30px; }
.ut-drop-ic svg { width: 100%; height: 100%; }
.ut-drop b { font-size: 15px; font-weight: 600; }
.ut-drop-sub { font-size: 12.5px; color: var(--ink2); }
.ut-drop-btn {
  margin-top: 6px; font-style: normal; font-size: 13px;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 5px 16px;
}

.ut-card { display: flex; align-items: center; gap: 10px; padding: 13px 14px; margin-bottom: 9px; cursor: pointer; }
.ut-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ut-card-main b { font-size: 14.5px; font-weight: 600; }
.ut-meta { font-size: 12px; color: var(--ink3); }

.ut-sum { padding: 14px 10px 4px; }
.ut-sum-row { display: flex; }
.ut-sum-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ut-sum-i b { font-size: 21px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ut-sum-i span { font-size: 11.5px; color: var(--ink2); }
.ut-cal { margin: 8px 0 0; border-top: 1px dashed var(--line); padding: 10px 4px 8px; }

.ut-hint { font-size: 11.5px; color: var(--ink3); padding: 0 4px 8px; }

.ut-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.ut-tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.ut-tbl th, .ut-tbl td {
  padding: 9px 10px; text-align: center; white-space: nowrap;
  font-weight: 400; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line2);
}
.ut-tbl tbody tr:last-child th, .ut-tbl tbody tr:last-child td { border-bottom: 0; }
.ut-tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--line2); color: var(--ink2);
  font-size: 12px; font-weight: 600;
}
.ut-tbl .ut-th { text-align: left; left: 0; z-index: 3; }
.ut-rowh {
  position: sticky; left: 0; z-index: 1;
  text-align: left; font-weight: 600; color: var(--ink);
  background: var(--card);
}
.ut-cell { cursor: pointer; }
.ut-cell:active { background: var(--accent-soft); }
.ut-best { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.ut-grade th, .ut-grade td { background: var(--line2); font-weight: 650; }
.ut-n { color: var(--ink3); font-size: 12px; }

.ut-stu tr { cursor: pointer; }
.ut-stu tr:active { background: var(--accent-soft); }
.ut-name { display: flex; align-items: center; gap: 6px; }
.ut-sid { font-style: normal; font-size: 11px; color: var(--ink3); font-weight: 400; }
.ut-stu .ut-rowh svg { width: 14px; height: 14px; color: var(--ink3); }

.ut-sub { padding: 13px 15px 14px; margin-bottom: 9px; }
.ut-sub-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ut-sub-h b { font-size: 15px; font-weight: 650; }
.ut-sub-meta { font-size: 11.5px; color: var(--ink3); white-space: nowrap; }
.ut-nums {
  display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px;
  font-size: 12.5px; color: var(--ink2);
}
.ut-nums b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.ut-nums-wrap { margin-top: 2px; }

.ut-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; margin-top: 11px; }
.ut-bar i { display: block; min-width: 0; }
.ut-b0 { background: var(--sakura); }
.ut-b1 { background: var(--peach); }
.ut-b2 { background: var(--butter); }
.ut-b3 { background: var(--mint); }
.ut-b4 { background: var(--sky); }
.ut-legend {
  display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 7px;
  font-size: 11.5px; color: var(--ink2);
}
.ut-legend b { color: var(--ink); font-weight: 600; }
.ut-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; vertical-align: 0; }
.ut-empty-band { font-size: 12.5px; color: var(--ink3); margin-top: 10px; }

.ut-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ut-acts .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

.ut-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ut-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13px; color: var(--ink2); cursor: pointer;
}
.ut-chip i { font-style: normal; font-size: 11px; color: var(--ink3); }
.ut-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.ut-chip.on i { color: var(--accent); }

.ut-chip-static {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--line2); border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 6px 4px 10px; font-size: 13px;
}
.ut-full {
  width: 54px; padding: 3px 4px; text-align: center;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--card); font-size: 12.5px;
}
.ut-chip-x {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
  color: var(--ink3);
}
.ut-chip-x:hover { background: var(--line); color: var(--warn); }
.ut-more { margin-top: 9px; font-size: 12.5px; color: var(--ink3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ut-add {
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
  border: 1px dashed var(--line); color: var(--ink2); background: transparent;
}

.ut-ok {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 10px; padding: 9px 12px; margin: 12px 0; font-size: 13px;
}
.ut-ok b { font-size: 13.5px; font-weight: 650; }

.ut-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 14px; }
.ut-map label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); }
.ut-map select {
  width: 100%; padding: 7px 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
}

.ut-full-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.ut-full-row span { flex: 1; font-size: 13.5px; }
.ut-full-row input {
  width: 80px; padding: 6px 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}

.ut-prev-t { font-size: 12.5px; }
.ut-prev-t th, .ut-prev-t td { padding: 6px 8px; border-bottom: 1px solid var(--line2); }

html[data-theme="dark"] .ut-b0 { background: #C97F93; }
html[data-theme="dark"] .ut-b1 { background: #C98B72; }
html[data-theme="dark"] .ut-b2 { background: #C4A85F; }
html[data-theme="dark"] .ut-b3 { background: #6BAF8A; }
html[data-theme="dark"] .ut-b4 { background: #5E8FCB; }
html[data-theme="dark"] .ut-best { background: #1B2A42; color: #A9C9FB; }
html[data-theme="dark"] .ut-tbl thead th,
html[data-theme="dark"] .ut-grade th,
html[data-theme="dark"] .ut-grade td { background: #262a31; }

/* ============================================================
   马卡龙轻量化 · 统一覆盖层
   放在最后，用来收掉早期散落的描边和硬色值。
   ============================================================ */

/* ---- 六色轮转：给任意元素套 .mk-0 ~ .mk-5，内部用 --m-bg / --m-ink ---- */
.mk-0 { --m-bg: var(--mint-bg);   --m-ink: var(--mint-ink); }
.mk-1 { --m-bg: var(--sakura-bg); --m-ink: var(--sakura-ink); }
.mk-2 { --m-bg: var(--sky-bg);    --m-ink: var(--sky-ink); }
.mk-3 { --m-bg: var(--taro-bg);   --m-ink: var(--taro-ink); }
.mk-4 { --m-bg: var(--butter-bg); --m-ink: var(--butter-ink); }
.mk-5 { --m-bg: var(--peach-bg);  --m-ink: var(--peach-ink); }

/* ---- 卡片类容器：一律无边框 + 极浅阴影 ---- */
.att-entry,
.wb-row,
.card-tpl-preview,
.ut-scroll,
.pwa-bar,
.quick-card {
  border: 0;
  box-shadow: var(--shadow);
  background: var(--card);
}
.ut-scroll { border-radius: var(--radius); }

/* ---- 输入与小控件：去掉描边，改用浅灰填充 ---- */
.field textarea,
.field input,
.ut-map select,
.ut-full,
.ut-full-row input {
  border: 0;
  background: var(--line2);
  box-shadow: none;
}
.field textarea:focus,
.field input:focus,
.ut-map select:focus,
.ut-full:focus,
.ut-full-row input:focus {
  background: var(--card);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-sm);
  outline: 0;
}
.opt-row button,
.wb-chip,
.ut-chip,
.ut-chip-static,
.att-chip,
.chip {
  border: 0;
  background: var(--line2);
  box-shadow: none;
}
.opt-row button.on,
.ut-chip.on,
.chip.sel,
.att-chip.on {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.ut-chip-static { padding: 4px 10px; border-radius: var(--radius-xs); }

/* ---- 座位格：浅底 + 无描边，空位用虚线 ---- */
.seat {
  border: 0;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-xs);
}

/* ---- 等级标签：优 / 及格 / 待提 ---- */
.lvl {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.lvl.a { background: var(--ok-bg);   color: var(--ok-ink); }
.lvl.b { background: var(--half-bg); color: var(--half-ink); }
.lvl.c { background: var(--bad-bg);  color: var(--bad-ink); }

/* ---- 柱状条：分数段 / 正确率 / 错题排行共用三档 ---- */
.bar2 i.f-ok   { background: var(--mint); }
.bar2 i.f-mid  { background: var(--butter); }
.bar2 i.f-low  { background: var(--sakura); }
.bar2 i.f-info { background: var(--sky); }
.bar2 i.f-peach { background: var(--peach); }
.dist-row .bar i.f-ok    { background: var(--mint); }
.dist-row .bar i.f-mid   { background: var(--butter); }
.dist-row .bar i.f-low   { background: var(--sakura); }
.dist-row .bar i.f-info  { background: var(--sky); }
.dist-row .bar i.f-peach { background: var(--peach); }

/* ---- 统考分数段五色（从低到高）---- */
.ut-b0 { background: var(--sakura); }
.ut-b1 { background: var(--peach); }
.ut-b2 { background: var(--butter); }
.ut-b3 { background: var(--mint); }
.ut-b4 { background: var(--sky); }

/* ---- 分数段/正确率横条的底槽也柔化 ---- */
.acc-row .bar2,
.dist-row .bar { background: var(--line2); }

/* ---- 走势图 ---- */
.trend-svg { width: 100%; height: 92px; display: block; overflow: visible; }

/* ---- 我的页分组标题：加一点主色小竖条，层级更清楚 ---- */
.section-title { color: var(--ink3); }

/* ---- 提示条统一样式 ---- */
.mm-tip,
.backup-tip,
.att-warn,
.note-warn {
  border-radius: var(--radius-sm);
  border: 0;
}

/* ---- 「我的」页 kv 行里的小图标：以前没约束尺寸，SVG 会撑成默认 300×150 ---- */
.kv .k {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.kv .k svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--ink3);
}

/* ---- 各类提示条统一到马卡龙浅底，去掉描边 ---- */
.att-warn {
  background: var(--peach-bg);
  color: var(--peach-ink);
  border: 0;
}
.backup-tip {
  background: var(--butter-bg);
  color: var(--butter-ink);
  border: 0;
}
.mm-tip {
  background: var(--butter-bg);
  color: var(--butter-ink);
  border: 0;
}
.note-warn {
  background: var(--peach-bg);
  color: var(--peach-ink);
  border: 0;
}

/* ---- 空座位：白卡上要看得出来，用浅灰填充代替虚线框（不能用 --line2，那个和页面底色几乎一样） ---- */
.seat.empty {
  background: #E9EDF3;
  box-shadow: none;
  border: 0;
}
html[data-theme="dark"] .seat.empty {
  background: #262B34;
}

/* ============================================================
   马卡龙收尾（v18）
   1) 卡面 / 行 / 瓷片：去描边，只用 --shadow-sm
   2) 输入类控件：去描边，改浅灰填充，聚焦时才出主色浅环
   3) 还没换干净的暖米色、灰红、高饱和图表色 → 六色板
   ============================================================ */

/* 1) 卡面去描边 */
.att-entry,
.wb-chip,
.wb-row,
.ut-scroll,
.ut-chip,
.ut-chip-static,
.chip,
.tile,
.pwa-bar,
.card-tpl-preview,
.quick-card .thumb,
.radar-pick,
.item-chip,
.type-chip,
.exam-card,
.stat-hero,
.tpl-card,
.scan-hero,
.scan-toggle,
.scan-pick,
.scan-log-row,
.res-ident,
.pending-row,
.shot-thumb {
  border: 0;
}
.att-entry,
.wb-chip,
.wb-row,
.ut-scroll,
.chip,
.tile,
.item-chip,
.type-chip,
.exam-card,
.stat-hero,
.tpl-card,
.scan-hero,
.scan-toggle,
.scan-pick,
.scan-log-row,
.res-ident,
.pending-row {
  box-shadow: var(--shadow-sm);
}
.att-entry.done {
  background: var(--sky-bg);
  box-shadow: none;
}
.ut-chip-static {
  background: var(--line2);
}

/* 2) 输入控件：浅灰填充代替描边，聚焦才亮主色 */
.field input,
.field textarea,
.field select,
.att-head input[type="date"],
.score-input,
.ut-map select,
.ut-full-row input,
.ut-full,
.stepper {
  border: 0;
  background: var(--line2);
  transition: background .16s ease, box-shadow .16s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus,
.att-head input[type="date"]:focus,
.score-input:focus,
.ut-map select:focus,
.ut-full-row input:focus,
.ut-full:focus {
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  outline: none;
}

/* 3) 错题排行右边的小号 AI 按钮 */
.mm-ai-btn {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mm-ai-btn svg { width: 13px; height: 13px; }
.mm-ai-btn:active { transform: scale(.96); }

/* 学生页底部的反馈图入口 */
.fb-cta { text-align: center; }
.fb-cta p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; }
.fb-cta .btn { gap: 6px; }
.fb-cta .btn svg { width: 16px; height: 16px; }

/* 学情长图：宽高随内容长，别在弹层里被压成一团 */
#fb-cv {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 0;
  box-shadow: var(--shadow);
  background: #fff;
  display: block;
}

/* 点名牌：v17 里被铺平成灰底无阴影，这里拉回「白卡 + 柔和阴影」，
   异常状态仍用内联的 --ab 浅底，名字取对应深色，和头像那套色一致 */
.att-chip {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.att-chip.on {
  background: var(--ab);
  color: var(--ac);
  box-shadow: inset 0 0 0 1.5px var(--ac);
}
.att-chip.on .nm { color: var(--ac); }

/* ============================================================
   我的课表
   ------------------------------------------------------------
   网格用 CSS Grid：第一列是节次，后面每天一列。
   格子底色只取马卡龙六色（按科目固定），保证整张表看起来是一套东西，
   而不是一行行随手挑的颜色。
   ============================================================ */

/* 顶部「正在上 / 下一节」 */
.tt-now {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  margin: 6px 0 12px;
  width: 100%;
  text-align: left;
}
.tt-now.on { background: var(--accent-soft); box-shadow: none; }
.tt-now.empty { box-shadow: var(--shadow-sm); }
.tt-now.empty .k { font-size: 13.5px; color: var(--ink2); }
.tt-now.empty .v { margin-left: auto; font-size: 12px; color: var(--ink3); }
.tt-now .tag {
  flex: 0 0 auto;
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink3);
}
.tt-now.on .tag { background: var(--accent); color: #fff; }
.tt-now-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.tt-now-main b { font-size: 15.5px; font-weight: 500; letter-spacing: .3px; }
.tt-now-main i {
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-now-tail { margin-left: auto; flex: 0 0 auto; font-size: 11.5px; color: var(--ink3); }

/* 空表提示 */
.tt-hint {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tt-hint b { font-size: 13.5px; font-weight: 500; }
.tt-hint span { font-size: 12px; color: var(--ink3); line-height: 1.65; }

/* 网格 */
.tt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tt-grid { display: grid; gap: 5px; min-width: 320px; }
.tt-corner { height: 30px; }
.tt-day {
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
  padding-bottom: 2px;
  line-height: 1.15;
}
.tt-day b { display: block; font-weight: 400; font-size: 12px; }
.tt-day i { display: block; font-style: normal; font-size: 9px; color: var(--ink3); }
.tt-day.we { opacity: .7; }
.tt-day.on b { color: var(--accent-ink); font-weight: 500; }
.tt-day.on i { color: var(--accent); }

.tt-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.1;
}
.tt-side b { font-size: 13px; font-weight: 500; color: var(--ink2); }
.tt-side i { font-style: normal; font-size: 9px; color: var(--ink3); }

.tt-cell {
  position: relative;
  min-height: 56px;
  border-radius: var(--radius-xs);
  padding: 7px 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  transition: transform .12s ease;
}
.tt-cell:active { transform: scale(.96); }
.tt-cell.empty { background: var(--line2); }
.tt-cell.empty.today { background: var(--accent-soft); }
.tt-cell .sub { font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-cell .rm,
.tt-cell .rm2 {
  font-size: 9px;
  opacity: .78;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-cell .rm2 { opacity: .6; }
.tt-cell.off { opacity: .42; }
.tt-cell.now { outline: 2px solid var(--accent); outline-offset: -2px; }
.tt-tag {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .62);
  color: inherit;
}

.tt-cell.c-mint { background: var(--mint-bg); color: var(--mint-ink); }
.tt-cell.c-sky { background: var(--sky-bg); color: var(--sky-ink); }
.tt-cell.c-sakura { background: var(--sakura-bg); color: var(--sakura-ink); }
.tt-cell.c-taro { background: var(--taro-bg); color: var(--taro-ink); }
.tt-cell.c-butter { background: var(--butter-bg); color: var(--butter-ink); }
.tt-cell.c-peach { background: var(--peach-bg); color: var(--peach-ink); }

.tt-footnote { font-size: 11.5px; color: var(--ink3); text-align: center; margin-top: 14px; line-height: 1.6; }

/* 弹层内部 */
.tt-sheet-sub { font-size: 12.5px; color: var(--ink3); margin-bottom: 12px; }
.tt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tt-pick {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--line2);
  font-size: 13px;
  color: var(--ink2);
}
.tt-pick.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.tt-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink3);
}
.tt-days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tt-daybtn {
  flex: 1 1 52px;
  padding: 8px 0;
  border-radius: var(--radius-xs);
  background: var(--line2);
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.25;
}
.tt-daybtn i { display: block; font-style: normal; font-size: 9.5px; color: var(--ink3); }
.tt-daybtn.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.tt-daybtn.disabled { opacity: .35; }

html[data-theme="dark"] .tt-tag { background: rgba(0, 0, 0, .3); }
html[data-theme="dark"] .tt-now.empty { background: var(--card); }

/* 下拉框去掉原生外观后没有小箭头，看起来像一行纯文字，补一个 */
.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398A1AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5 12 15.5 18 9.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 36px;
}

/* 课表「每节单独」时间表 */
.tt-times { display: flex; flex-direction: column; gap: 6px; }
.tt-trow { display: flex; align-items: center; gap: 6px; }
.tt-tno { flex: 0 0 34px; font-size: 12px; color: var(--ink3); }
.tt-tin {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
  text-align: center;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  font-variant-numeric: tabular-nums;
}
.tt-tin:focus { border-color: var(--accent); }
.tt-tsep { flex: 0 0 auto; font-size: 12px; color: var(--ink3); }
.tt-tlen { flex: 0 0 40px; text-align: right; font-size: 11px; color: var(--ink3); }
.tt-tbtns { display: flex; gap: 8px; margin-top: 10px; }
.tt-tbtns button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  background: var(--line2);
  font-size: 13px;
  color: var(--ink2);
}
.tt-tbtns button:active { opacity: .7; }

/* 12 节课的表：上午 / 下午 / 晚上 分隔行 */
.tt-grp {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 1px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink3);
}
.tt-grp::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 7 天 × 12 节的紧凑模式：格子窄，字号和留白一起收 */
.tt-grid.tt-dense .tt-cell {
  min-height: 46px;
  padding: 5px 2px 4px;
  font-size: 11px;
  gap: 0;
}
.tt-grid.tt-dense .tt-cell .sub { font-size: 11px; letter-spacing: 0; }
.tt-grid.tt-dense .tt-cell .rm { font-size: 8.5px; }
.tt-grid.tt-dense .tt-cell .rm2 { display: none; }
.tt-grid.tt-dense .tt-side b { font-size: 12px; }
.tt-grid.tt-dense .tt-side i { font-size: 8.5px; }
.tt-grid.tt-dense .tt-day { font-size: 11px; }

/* ============================================================
   教学事务列表（教研 / 比赛 / 培训 / 备课）
   ============================================================ */
.teach-list { padding: 2px 14px; }
.teach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--line2);
}
.teach-row:last-child { border-bottom: 0; }
.teach-row:active { opacity: .65; }
.t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t-title {
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: .2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t-meta {
  font-size: 11.5px;
  color: var(--ink3);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t-tag {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  white-space: nowrap;
}
.t-date {
  flex: 0 0 40px;
  text-align: right;
  font-size: 11.5px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
