/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--primary-deep); text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.ico { flex: none; display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ 应用外框 ============ */
.app {
  --app-max: 480px;
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(40, 37, 51, 0.03), 0 30px 80px rgba(41, 45, 50, 0.10);
}
.app--wide { --app-max: 720px; }

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 8px;
}
.screen--with-bar { padding-bottom: 104px; }
.screen__body { flex: 1; padding: 4px var(--pad) 24px; display: flex; flex-direction: column; gap: 14px; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(10px + var(--safe-top)) var(--pad) 10px;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar__row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.topbar__mark {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-deep);
}
.topbar__titles { flex: 1; min-width: 0; }
.topbar__title {
  font-size: 19px; font-weight: 700; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 学校 + 班级全称：窄屏允许换行，不截断 */
.topbar__title--name {
  white-space: normal; overflow: visible; text-overflow: clip;
  line-height: 1.3; word-break: keep-all;
}
.topbar__title--name .nowrap { white-space: nowrap; }
.topbar__sub {
  font-size: 13px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__sub--tags {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  white-space: normal; overflow: visible;
}
.topbar__right { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar__back { margin-left: -8px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; letter-spacing: 0.2px;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.975); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn--primary {
  background: var(--primary); color: var(--ink);
  box-shadow: 0 6px 16px rgba(255, 214, 0, 0.35);
}
.btn--primary:active { background: #e6c200; }
.btn--soft { background: var(--primary-soft); color: var(--primary-deep); }
/* 022-A：查看类操作按钮（标记已查看 / 我已查看）独立蓝色样式，不影响黄色主按钮与下载按钮 */
.btn.btn--view {
  background: #2563eb; color: #fff; border-color: #2563eb;
  font-size: 17px; font-weight: 600; min-height: 48px;
}
.btn.btn--view svg { color: #fff; }
.btn.btn--view:disabled { background: #2563eb; color: #fff; opacity: 1; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .btn.btn--view:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
}
.btn.btn--view:active:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
.btn.btn--view { width: 100%; }
@media (min-width: 1024px) {
  .hw-card__foot .btn--view { width: auto; min-width: 168px; max-width: 320px; }
  .screen .btn--view.btn--block { max-width: 420px; }
}
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--danger { background: var(--danger); color: #fff; box-shadow: 0 6px 16px rgba(200, 69, 47, 0.22); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--xs { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%; color: var(--ink);
  background: transparent; transition: background 0.16s;
}
.icon-btn:active { background: rgba(40, 37, 51, 0.06); }
.icon-btn--soft { background: #fff; border: 1px solid var(--line); }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.card--tight { padding: 12px; }
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.card--tap { transition: transform 0.12s ease, box-shadow 0.16s; }
.card--tap:active { transform: scale(0.99); }

.section { display: flex; flex-direction: column; gap: 10px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.section__title { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.section__extra { font-size: 13px; color: var(--muted); }

.divider { height: 1px; background: var(--line); margin: 2px 0; }

/* ============ 标签 / 徽标 ============ */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  background: #fff; color: var(--muted);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.chip--active { background: var(--primary); color: var(--ink); border-color: var(--primary); font-weight: 600; }
.chip--plain { background: transparent; border-color: transparent; }
.chip .ico { width: 13px; height: 13px; }

.tag {
  display: inline-flex; align-items: center; gap: 3px;
  height: 22px; padding: 0 8px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
}
.tag .ico { width: 12px; height: 12px; }
.tag--print { background: var(--blue); color: #24507a; }
.tag--read { background: var(--mint); color: #24604a; }
.tag--answer { background: var(--cream); color: #6d5410; }
.tag--notice { background: var(--primary-soft); color: #6d5410; }
.tag--important { background: var(--cream); color: #6d5410; }
.tag--new { background: var(--danger-soft); color: var(--danger); }
.tag--updated { background: var(--danger-soft); color: var(--danger); }
.tag--expire { background: var(--danger-soft); color: var(--danger); }
.tag--withdrawn { background: #f1f1ee; color: var(--muted); }
.tag--ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.tag--demo { background: #F7F7F5; color: var(--muted); border: 1px dashed var(--line-strong); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }

/* 学科色 */
.s-chinese { --subj: var(--c-chinese); }
.s-math { --subj: var(--c-math); }
.s-english { --subj: var(--c-english); }
.s-politics { --subj: var(--c-politics); }
.s-geography { --subj: var(--c-geography); }
.s-biology { --subj: var(--c-biology); }
.s-history { --subj: var(--c-history); }
.s-notice { --subj: var(--c-notice); }

.subj-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: 9px;
  background: var(--subj, var(--lilac));
  color: var(--ink); font-size: 13px; font-weight: 600;
}

/* 008：教师身份标签（与作业学科色分开计算） */
.role-tag {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border-radius: 7px;
  background: var(--subj, var(--c-head));
  color: var(--ink); font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.role-tag--head { background: var(--c-head); }

/* 008：学科图标底色（仅小面积，不染整页） */
.subject-cell__icon {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--subj, var(--c-notice)); color: var(--ink);
  margin-bottom: 1px;
}
.subject-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subject-now__label { font-size: 12px; color: var(--muted); }

/* 状态点（文字 + 图标，不单靠颜色） */
.status-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted);
}
.status-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: 0.9; flex: none;
}
.status--unpublished { color: #8a8496; }
.status--todo { color: var(--danger); }
.status--partial { color: var(--warn); }
.status--complete { color: var(--ok); }
.status--none { color: var(--neutral); }

/* ============ 顶部身份 ============ */
.identity {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--lilac); color: var(--ink); font-weight: 700; font-size: 15px;
}
.avatar--sm { width: 30px; height: 30px; font-size: 12px; }
.avatar--head { background: var(--c-head); }
.avatar--subject { background: var(--subj, var(--c-head)); }
.identity__main { flex: 1; min-width: 0; }
.identity__name { font-weight: 700; font-size: 15px; }
.identity__meta { font-size: 12px; color: var(--muted); }

/* ============ 分段控件 ============ */
.segmented {
  display: flex; gap: 4px; padding: 4px;
  background: #fff; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
}
.segmented__item {
  flex: 1; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background 0.16s, color 0.16s;
}
.segmented__item.is-active { background: var(--primary); color: var(--ink); box-shadow: 0 4px 12px rgba(255, 214, 0, 0.28); }

/* ============ 日期条 ============ */
.date-strip {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: var(--radius-lg);
  padding: 8px; box-shadow: var(--shadow-card);
}
.date-strip__nav {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: var(--ink);
  background: var(--primary-soft);
}
.date-strip__nav[disabled] { opacity: 0.35; pointer-events: none; }
.date-strip__center { flex: 1; text-align: center; min-width: 0; }
.date-strip__main { font-size: 16px; font-weight: 700; }
.date-strip__sub { font-size: 12px; color: var(--muted); }

/* ============ 时段选择 ============ */
.period-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 4px; margin: 0 -2px;
  scrollbar-width: none;
}
.period-scroll::-webkit-scrollbar { display: none; }
.period-pill {
  flex: none; min-height: 44px; padding: 6px 14px;
  border-radius: 14px; background: #fff; border: 1px solid var(--line);
  text-align: left; transition: border-color 0.16s, background 0.16s;
}
.period-pill__name { font-size: 14px; font-weight: 700; }
.period-pill__meta { font-size: 11px; color: var(--muted); }
.period-pill.is-active { border-color: var(--primary); background: var(--primary-soft); }
.period-pill.is-active .period-pill__name { color: var(--primary-deep); }

/* ============ 栏目网格 ============ */
.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.subject-cell {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 62px; padding: 9px 8px 7px;
  border-radius: 16px; background: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s, border-color 0.16s, background 0.16s;
  text-align: left;
}
.subject-cell:active { transform: scale(0.97); }
.subject-cell.is-active { border-color: var(--primary); background: var(--primary-soft); }
.subject-cell__name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.subject-cell__dot { width: 8px; height: 8px; border-radius: 3px; background: var(--subj); }
.subject-cell__status { font-size: 11px; color: var(--muted); line-height: 1.3; }
.subject-cell__count {
  position: absolute; top: 7px; right: 7px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--primary); color: var(--ink);
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ============ 作业卡片 ============ */
.hw-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: inset 3px 0 0 0 var(--subj, transparent), var(--shadow-card);
  padding: 14px;
  display: flex; flex-direction: column; gap: 9px;
  transition: transform 0.12s;
}
.hw-card:active { transform: scale(0.994); }
.hw-card__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hw-card__title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.hw-card__body {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hw-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.hw-card__foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 9px; border-top: 1px solid var(--line); }
.hw-card__grow { flex: 1; }

/* ============ 附件行 ============ */
.att-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 14px;
  background: #FFFDF5; border: 1px solid var(--line);
}
.att-row__thumb {
  width: 48px; height: 60px; flex: none;
  border-radius: 9px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); position: relative;
}
.att-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-row__thumb--pdf { display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); }
.att-row__main { flex: 1; min-width: 0; }
.att-row__title { font-size: 14px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row__meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.att-row__state { font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.att-row__meta .tag--wrap {
  flex: none; max-width: 100%; height: auto; min-height: 22px;
  padding: 2px 8px; white-space: normal; line-height: 1.45; align-items: flex-start;
}
.att-row__meta .tag--wrap .ico { margin-top: 2px; }
.att-row__actions { display: flex; flex-direction: column; gap: 6px; flex: none; }

.checkbox {
  width: 26px; height: 26px; flex: none; border-radius: 9px;
  border: 2px solid var(--line-strong); background: #fff;
  display: grid; place-items: center; color: transparent;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.checkbox.is-on { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.checkbox[disabled] { opacity: 0.4; pointer-events: none; }

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.field__hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.input, .textarea, .select {
  width: 100%; min-height: 46px;
  padding: 11px 13px;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink);
  font-size: 15px;
  transition: border-color 0.16s, box-shadow 0.16s;
  appearance: none;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.32);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input-row .input { flex: 1 1 120px; min-width: 0; }

.switch {
  position: relative; width: 46px; height: 28px; flex: none;
  border-radius: var(--radius-pill); background: var(--line-strong);
  transition: background 0.18s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s;
}
.switch.is-on { background: var(--primary); }
.switch.is-on::after { transform: translateX(18px); }

.stepper { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
.stepper button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }
.stepper span { min-width: 28px; text-align: center; font-size: 14px; font-weight: 700; }

/* ============ 列表行 ============ */
.list-row {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; background: #fff;
  border-radius: 16px; box-shadow: var(--shadow-card);
}
.list-row--plain { box-shadow: none; border: 1px solid var(--line); }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.list-row__title--tags { flex-wrap: wrap; gap: 5px; }
.list-row__desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-row__action { flex: none; display: flex; gap: 4px; }

/* ============ 提示条 ============ */
.banner {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 12px 13px; border-radius: 15px;
  font-size: 13px; line-height: 1.55;
}
.banner__ico { flex: none; margin-top: 1px; }
.banner__title { font-weight: 700; font-size: 13.5px; }
.banner--info { background: var(--primary-soft); color: var(--ink); }
.banner--warn { background: var(--warn-soft); color: #6d5010; }
.banner--danger { background: var(--danger-soft); color: #8c3624; }
.banner--ok { background: var(--ok-soft); color: #235f43; }
.banner--plain { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.banner--test-fill {
  background: var(--primary-soft); border: 1px dashed #e3cd74; color: var(--ink);
  margin-top: 10px;
}

.notice-card {
  background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
  border: 1px solid #f6e6bd;
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  display: flex; gap: 10px; align-items: flex-start;
}
.notice-card__ico { color: #a37b16; flex: none; margin-top: 2px; }
.notice-card__title { font-size: 15px; font-weight: 700; }
.notice-card__text { font-size: 13px; color: #7a6234; margin-top: 3px; line-height: 1.55; }

/* ============ 进度 ============ */
.progress { height: 8px; border-radius: 4px; background: #F7F7F5; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 4px; background: var(--primary); transition: width 0.4s ease; }
.progress__bar--mint { background: #63b48c; }

/* ============ 统计小块 ============ */
.stat-row { display: flex; gap: 8px; }
.stat {
  flex: 1; padding: 11px 12px; border-radius: 14px; background: #FFFDF5;
  border: 1px solid var(--line);
}
.stat__value { font-size: 20px; font-weight: 700; line-height: 1.2; }
.stat__label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ 空状态 ============ */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 42px 24px;
}
.empty__ico {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  background: #fff; color: var(--faint); box-shadow: var(--shadow-card);
}
.empty__title { font-size: 15px; font-weight: 700; }
.empty__desc { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 260px; }

/* ============ 底部操作栏 ============ */
.bottom-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  width: 100%; max-width: var(--app-max); margin-inline: auto;
  padding: 10px var(--pad) calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-bar);
  display: flex; align-items: center; gap: 10px;
}
.bottom-bar__info { flex: 1; min-width: 0; }
.bottom-bar__count { font-size: 15px; font-weight: 700; }
.bottom-bar__sub { font-size: 11.5px; color: var(--muted); }

/* ============ 弹层 ============ */
.layer-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(41, 45, 50, 0.36);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
  pointer-events: auto;
}
.scrim.is-in { opacity: 1; }
.sheet {
  width: 100%; max-width: var(--app-max, 480px);
  max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  transform: translateY(16px); opacity: 0.6;
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s;
  padding-bottom: calc(8px + var(--safe-bottom));
}
.scrim.is-in .sheet { transform: translateY(0); opacity: 1; }
.sheet__grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 9px auto 2px; flex: none; }
.sheet__head { display: flex; align-items: flex-start; gap: 8px; padding: 8px 16px 4px; flex: none; }
.sheet__head > div { flex: 1; min-width: 0; }
.sheet__title { font-size: 17px; font-weight: 700; }
.sheet__sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sheet__body { padding: 8px 16px 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet__footer { padding: 10px 16px 6px; display: flex; gap: 8px; flex: none; border-top: 1px solid var(--line); }

.confirm { display: flex; flex-direction: column; gap: 14px; }
.confirm__msg { font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.confirm__actions { display: flex; gap: 8px; }
.confirm__actions .btn { flex: 1; }

/* ============ Toast ============ */
.toast-root {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  width: max-content; max-width: min(88vw, 400px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; border-radius: 14px;
  background: rgba(40, 37, 51, 0.93); color: #fff;
  font-size: 13.5px; line-height: 1.45;
  box-shadow: var(--shadow-float);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast__ico { color: var(--primary); display: flex; }
.toast--ok .toast__ico { color: #9fe3c0; }
.toast--warn .toast__ico { color: #ffd77a; }
.toast--error .toast__ico { color: #ffb3a4; }

/* ============ 预览 ============ */
.preview-stage {
  background: var(--line); border-radius: 16px; padding: 14px;
  display: grid; place-items: center; min-height: 240px;
}
.preview-stage img {
  max-height: 58dvh; width: auto; max-width: 100%;
  border-radius: 8px; box-shadow: 0 6px 20px rgba(40, 37, 51, 0.16);
  transition: transform 0.24s ease;
}
.preview-tools { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.preview-tools .btn { flex: none; }

/* ============ 演示面板 ============ */
.demo-panel {
  border: 1px dashed var(--line-strong); background: #FFFDF5;
  border-radius: 16px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 8px;
}
.demo-panel__head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.demo-panel__row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ 教师端 ============ */
.tabs { display: flex; gap: 4px; background: #fff; border-radius: 14px; padding: 4px; box-shadow: var(--shadow-card); }
.tabs__item { flex: 1; min-height: 40px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs__item.is-active { background: var(--primary); color: var(--ink); }

.table-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); padding: 0 4px; }

.teacher-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 14px; }
.teacher-card__head { display: flex; align-items: center; gap: 10px; }
.teacher-card__name { font-size: 15px; font-weight: 700; }
.teacher-card__title { font-size: 12px; color: var(--muted); }
.subject-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.subject-toggle {
  height: 32px; padding: 0 11px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600;
  background: #F7F7F5; color: var(--faint); border: 1px solid transparent;
}
.subject-toggle.is-on { background: var(--primary-soft); color: var(--ink); border-color: #f0df8e; }
.subject-toggle[disabled] { opacity: 0.6; }

.invite-box {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 21px; font-weight: 700; letter-spacing: 2px;
  background: var(--primary-soft); color: var(--primary-deep);
  border-radius: 12px; padding: 12px; text-align: center;
}

/* ============ 窄屏适配（320px） ============ */
@media (max-width: 359px) {
  :root { --pad: 13px; }
  .app { --app-max: 100%; }
  .subject-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .subject-cell { min-height: 58px; padding: 8px 6px 6px; }
  .subject-cell__name { font-size: 13px; }
  .subject-cell__status { font-size: 10px; }
  .topbar__title { font-size: 17px; }
  .hw-card__title { font-size: 15px; }
  .stat__value { font-size: 18px; }
  .bottom-bar { gap: 8px; }
  .bottom-bar__count { font-size: 14px; }
  .btn { padding: 0 14px; font-size: 14px; }
  .segmented__item { font-size: 13px; }
}

@media (min-width: 560px) {
  .app { border-radius: 0; }
  body { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ 补充：布局与细节 ============ */
.stack { display: flex; flex-direction: column; gap: 10px; }
.hw-list { display: flex; flex-direction: column; gap: 10px; }
.chip-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; }
.chip.is-locked { opacity: 0.62; color: var(--faint); }
.hint-row { display: flex; flex-wrap: wrap; gap: 6px; }
.link-btn { color: var(--primary-deep); font-weight: 600; background: none; padding: 4px 2px; }
.fine-print { font-size: 12px; color: var(--faint); line-height: 1.6; padding: 0 4px; }
.req { color: var(--danger); font-weight: 600; font-size: 12px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.att-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.att-row__top { display: flex; align-items: center; gap: 8px; }
.att-row__top .att-row__title { flex: 1; white-space: normal; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); min-height: 32px; }
.date-input-hidden { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; }
.date-strip__center { position: relative; cursor: pointer; background: var(--primary); border-radius: 12px; padding: 4px 6px; }
.date-strip__center .date-strip__sub { color: rgba(41, 45, 50, 0.68); }

/* 作业详情 */
.detail-title { font-size: 20px; font-weight: 700; line-height: 1.4; }
.detail-body { font-size: 15px; line-height: 1.8; color: var(--ink); white-space: pre-wrap; }
.kv { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.kv__k { flex: none; width: 76px; color: var(--muted); }
.kv__v { flex: 1; color: var(--ink); word-break: break-all; line-height: 1.55; }

/* 发齐状态行 */
.status-row { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row__name { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.status-row__state { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* 下载名单 */
.name-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.name-chip { font-size: 12.5px; padding: 5px 9px; border-radius: 9px; background: #F7F7F5; color: var(--ink); }
.name-chip--old { background: var(--danger-soft); color: var(--danger); }
.progress-label { font-size: 12.5px; color: var(--muted); }
.progress-pct { font-size: 13px; font-weight: 700; color: var(--primary-deep); }

/* 结果状态 */
.result-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; }
.result-ico--ok { background: var(--ok-soft); color: var(--ok); }
.result-ico--err { background: var(--danger-soft); color: var(--danger); }

/* 折叠区 */
.details-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.details-summary::-webkit-details-marker { display: none; }

/* PDF 预览 */
.pdf-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pdf-page img { width: 100%; border-radius: 10px; box-shadow: 0 4px 16px rgba(40, 37, 51, 0.14); }
.pdf-page__label { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 5px; }

/* 首页 / 登录 */
.join-hero { background: #fff; }
.join-hero__school { font-size: 12.5px; color: var(--muted); }
.join-hero__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.join-hero__slogan {
  font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: 1.5px; margin: 8px 0 2px;
}
.join-hero__title { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: 0.3px; }
.join-hero__desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-top: 6px; }
.join-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.join-form { display: flex; flex-direction: column; gap: 12px; }
.list-row.is-active { border: 1px solid var(--primary); background: var(--primary-soft); }
.hw-card.is-muted { opacity: 0.72; }
.banner__desc { opacity: 0.8; margin-top: 2px; }
.table-head { padding-top: 2px; }

/* ============ Star 吉祥物（004） ============ */
.star-img {
  display: block; object-fit: contain; flex: none;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.star-img--join { width: 136px; height: auto; margin: 0 auto 10px; }
.star-img--home { width: 72px; height: auto; }
.star-img--teacher { width: 88px; height: auto; }
.star-img--empty { width: 84px; height: auto; margin: 0 auto 6px; }
.teacher-star { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0 4px; }
.teacher-star__text { font-size: 12px; color: var(--muted); }

.welcome-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--yellow-grad);
  border: 1px solid #f0dc8a;
  box-shadow: 0 6px 18px rgba(255, 214, 0, 0.18);
}
.welcome-card__main { flex: 1; min-width: 0; }
.welcome-card__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.welcome-card__meta { font-size: 12.5px; color: rgba(41, 45, 50, 0.72); margin-top: 3px; }
.welcome-card__slogan {
  font-size: 12.5px; color: #3f4247;
  letter-spacing: 0.6px; margin-top: 3px;
}

/* 班主任：激活码与设备 */
.student-card__head { display: flex; align-items: center; gap: 10px; }
.code-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--primary-soft); border-radius: 12px; padding: 8px 10px;
}
.code-row .kv__k { white-space: nowrap; }
.code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; font-weight: 600; letter-spacing: 1px; color: var(--primary-deep);
}
.code-value.is-masked { color: var(--muted); letter-spacing: 2px; }
.device-list { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.device-list__item { display: flex; justify-content: space-between; gap: 8px; }
.device-list__id { font-family: ui-monospace, Menlo, monospace; color: var(--faint); }

@media (max-width: 360px) {
  .star-img--join { width: 96px; }
  .star-img--home { width: 56px; }
  .star-img--teacher { width: 72px; }
  .welcome-card { padding: 10px 12px; }
  .welcome-card__title { font-size: 14px; }
}

/* ============ 005：红绿点、置顶通知、确认 ============ */
.subject-cell.is-red .subject-cell__dot { background: var(--danger); }
.subject-cell.is-green .subject-cell__dot { background: var(--ok); }
.subject-cell.is-neutral .subject-cell__dot { background: var(--neutral); }
.subject-cell.is-amber .subject-cell__dot { background: #e0a23a; }
.subject-cell.is-red .subject-cell__status { color: var(--danger); }
.subject-cell.is-green .subject-cell__status { color: var(--ok); }
.subject-cell.is-amber .subject-cell__status { color: #a4741d; }

.grid-legend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 2px 2px 6px; font-size: 11.5px; color: var(--muted);
}
.grid-legend__item { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-dot.is-red { background: var(--danger); }
.legend-dot.is-green { background: var(--ok); }
.legend-dot.is-neutral { background: var(--neutral); }
.grid-legend__note { flex-basis: 100%; font-size: 11px; color: var(--faint); }

.complete-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 2px 2px; font-size: 12px; color: var(--muted);
}
.complete-line__names { font-weight: 600; color: var(--text); }

.pin-banner {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  min-height: 52px; max-height: 64px; padding: 8px 12px;
  background: linear-gradient(135deg, #fff9db 0%, #ffe977 100%);
  border: 1px solid #f2dc86; border-radius: 16px;
  color: var(--ink); margin-bottom: 8px;
}
.pin-banner__tag {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--ink);
  background: var(--primary); border-radius: 999px; padding: 3px 7px;
}
.pin-banner__main { flex: 1; min-width: 0; }
.pin-banner__title {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pin-banner__meta { font-size: 11.5px; color: #5b5f66; margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.pin-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pin-dot.is-red { background: var(--danger); }
.pin-dot.is-green { background: var(--ok); }
.pin-check { color: var(--ok); display: inline-flex; align-items: center; }
.pin-banner__arrow { flex: none; color: #8a7a2a; display: inline-flex; }

.ack-card { border: 1px solid var(--line); }
.ack-done { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.dev-panel { border: 1px dashed #e3cd74; background: #FFFDF5; }


/* 010：教师预览提示条 */
.preview-bar{position:sticky;top:0;z-index:60;display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:8px 12px;background:#fff5cc;border-bottom:1px solid #f2e3a0;color:#292d32;font-size:12px}
.preview-bar__text{display:flex;gap:6px;align-items:center;font-weight:600;min-width:0}
.preview-bar__actions{display:flex;gap:6px;flex-wrap:wrap}
.preview-entry{margin:8px 0 4px}

/* ============ 011-A：学生端视觉与全站字号 ============ */
body { font-size: var(--font-body); line-height: 1.6; }
.screen--with-bar { padding-bottom: 118px; }
.topbar__title { font-size: var(--font-page); line-height: 1.35; }
.topbar__sub,
.section__extra,
.field__hint,
.card-sub,
.fine-print,
.list-row__desc,
.identity__meta,
.hw-card__meta,
.att-row__meta,
.att-row__state,
.date-strip__sub,
.period-pill__meta,
.grid-legend,
.grid-legend__note,
.complete-line,
.device-list,
.pdf-page__label,
.stat__label,
.table-head,
.progress-label,
.name-chip,
.sheet__sub,
.bottom-bar__sub,
.preview-bar { font-size: var(--font-meta); line-height: 1.5; }

.btn { min-height: 46px; font-size: var(--font-button); }
.btn--sm { min-height: 42px; font-size: var(--font-button); }
.btn--xs { min-height: 38px; padding-inline: 12px; font-size: 15px; }
.section__title,
.card-title,
.hw-card__title,
.teacher-card__name,
.empty__title { font-size: var(--font-title); line-height: 1.45; }
.card-sub,
.list-row__desc,
.field__hint { line-height: 1.6; }
.list-row__title,
.att-row__title { font-size: var(--font-body); line-height: 1.5; }
.banner { font-size: 16px; line-height: 1.6; }
.banner__title { font-size: var(--font-body); }
.tag { height: auto; min-height: 26px; padding-block: 2px; font-size: var(--font-meta); }
.subj-badge { height: auto; min-height: 30px; font-size: 15px; }
.role-tag { font-size: var(--font-meta); }
.chip,
.tabs__item { min-height: 44px; font-size: var(--font-button); }
.chip { height: auto; }
.input,
.textarea,
.select { min-height: 50px; font-size: var(--font-body); line-height: 1.55; }
.field__label { font-size: 15px; }
.textarea { min-height: 124px; }
.detail-title { font-size: var(--font-page); line-height: 1.45; }
.detail-body,
.hw-card__body,
.confirm__msg { font-size: var(--font-body); line-height: 1.7; }
.hw-card__body { -webkit-line-clamp: 3; }
.kv { font-size: 15px; }
.kv__v { line-height: 1.65; }
.stat__value { font-size: var(--font-page); }
.empty__desc { font-size: 15px; }
.sheet__title { font-size: var(--font-page); }
.toast { font-size: 15px; }
.bottom-bar__count { font-size: var(--font-body); }
.date-strip__main { font-size: var(--font-title); }
.period-pill__name { font-size: var(--font-body); }
.status-row__name { font-size: var(--font-button); }
.name-chip { padding: 6px 10px; }
.demo-panel__head,
.switch-row,
.code-value { font-size: 15px; }
.teacher-card__title,
.subject-now__label,
.status-dot { font-size: var(--font-meta); }
.subject-toggle { min-height: 38px; height: auto; font-size: var(--font-meta); }

/* 日常 / 周末 / 假期：黄色边框选中，不使用黄色实心滑块 */
.segmented__item {
  min-height: 48px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: var(--font-body);
  font-weight: 600;
  transition: none;
}
.segmented__item .ico { width: 23px; height: 23px; }
.segmented__item.is-active {
  border-color: var(--primary);
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}

/* 重要通知：深空灰横幅、白色文字、红黄绿状态清晰分层 */
.pin-banner {
  min-height: 70px;
  max-height: none;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 0;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}
.pin-banner__icon,
.pin-banner__arrow { flex: none; display: inline-flex; color: var(--primary); }
.pin-banner__main { flex: 1; min-width: 0; }
.pin-banner__head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.pin-banner__tag {
  flex: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
}
.pin-banner__title {
  margin-top: 3px;
  color: #fff;
  font-size: var(--font-body);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-banner__status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: var(--font-meta);
  font-weight: 700;
  line-height: 1.3;
}
.pin-banner__status.is-pending { background: var(--danger); }
.pin-banner__status.is-ack { background: var(--ok-deep); }
.pin-check { display: inline-flex; color: #fff; }

/* 学科：右上角按作业条目计数，名称前不再重复显示红绿点 */
.subject-cell {
  min-height: 106px;
  gap: 4px;
  padding: 10px 8px 9px;
}
.subject-cell__icon { width: 27px; height: 27px; }
.subject-cell__name {
  display: block;
  max-width: 100%;
  color: var(--ink);
  font-size: var(--font-title);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.subject-cell__status { font-size: var(--font-meta); line-height: 1.4; }
.subject-cell__count {
  top: 7px;
  right: 7px;
  min-width: 26px;
  width: auto;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: var(--font-meta);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.subject-cell__count.is-pending { background: var(--danger); }
.subject-cell__count.is-done { background: var(--ok); }
.subject-cell__count .ico { width: 15px; height: 15px; }

/* Dr. Star 与名称形成组合，口号留在原欢迎区域 */
.join-hero__school { font-size: var(--font-meta); line-height: 1.5; }
.join-hero__brand { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.join-hero__identity { flex: 1; min-width: 0; }
.join-hero__title { margin: 0; font-size: var(--font-page); line-height: 1.35; }
.join-hero__slogan {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: var(--font-slogan);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}
.join-hero__desc { margin-top: 14px; font-size: var(--font-body); line-height: 1.65; }
.star-img--join { width: 120px; margin: 0; }
.star-img--home { width: 76px; }
.teacher-star__text { font-size: var(--font-button); }
.welcome-card { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px; }
.welcome-card__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.welcome-card__main { flex: 1; min-width: 0; }
.welcome-card__title { font-size: 20px; line-height: 1.35; }
.welcome-card__slogan {
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--font-slogan);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}
.welcome-card__meta {
  margin-top: 0;
  color: rgba(41, 45, 50, 0.78);
  font-size: var(--font-meta);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 359px) {
  .subject-cell { min-height: 110px; padding: 9px 6px 8px; }
  .subject-cell__name { font-size: var(--font-title); }
  .subject-cell__status { font-size: var(--font-meta); }
  .subject-cell__count { top: 6px; right: 6px; }
  .topbar__title { font-size: var(--font-page); }
  .hw-card__title { font-size: var(--font-title); }
  .bottom-bar__count { font-size: var(--font-button); }
  .btn { padding-inline: 13px; font-size: var(--font-button); }
  .segmented__item { gap: 4px; font-size: var(--font-button); }
  .join-hero__brand { gap: 10px; }
  .star-img--join { width: 96px; }
  .star-img--home { width: 64px; }
  .welcome-card { padding: 13px 12px; }
  .welcome-card__brand { gap: 10px; }
  .welcome-card__title { font-size: var(--font-title); }
  .pin-banner { gap: 8px; padding-inline: 10px; }
  .pin-banner__head { gap: 5px; }
  .pin-banner__status { padding-inline: 7px; }
}

/* ============ 012：应用名称与信息层次 ============ */
.topbar__sub--class {
  margin-top: 2px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.topbar--wrap-title .topbar__title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.join-hero__title { font-size: var(--font-title); }

/* ============ 013：学生首页五层、轻量筛选与次要打印包 ============ */
.topbar__sub--identity {
  margin-top: 2px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: var(--font-meta);
  line-height: 1.4;
}
.welcome-card { padding: 12px 14px; }
.time-selector { display: flex; align-items: center; gap: 8px; min-width: 0; }
.time-selector .date-strip { flex: 1; min-width: 0; }
.time-selector__today { flex: none; padding-inline: 11px; white-space: nowrap; }

.subject-all {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 44px; padding: 0 12px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  color: var(--muted); font-size: var(--font-meta); font-weight: 600;
  white-space: nowrap;
}
.subject-all.is-active { border-color: var(--primary); color: var(--ink); background: #fff; }
.subject-cell { border: 2px solid transparent; box-shadow: 0 3px 12px rgba(41, 45, 50, 0.06); }
.subject-cell.is-active { border-color: var(--primary); background: #fff; }
.subject-cell.is-active .subject-cell__name { font-weight: 800; }
.subject-cell__name { max-width: 100%; overflow-wrap: anywhere; }

.filter-panel { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.filter-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filter-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 13px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  color: var(--muted); background: #fff;
  font-size: var(--font-button); font-weight: 600;
}
.filter-toggle.is-active { border-color: var(--primary); color: var(--ink); background: #fff; }
.filter-refresh { width: 44px; height: 44px; }
.filter-condition { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filter-condition__text { color: var(--muted); font-size: var(--font-meta); line-height: 1.5; }
.filter-condition__clear { flex: none; min-height: 38px; font-size: var(--font-meta); }

.hw-card { border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(41, 45, 50, 0.07); }
.hw-card__summary { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hw-card__body.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.hw-card__expand { min-height: 34px; padding: 0; font-size: var(--font-meta); }
.home-atts { display: flex; flex-direction: column; }
.home-att {
  display: flex; flex-direction: column; gap: 8px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.home-att__main { min-width: 0; }
.home-att__title {
  color: var(--ink); font-size: var(--font-body); font-weight: 600; line-height: 1.5;
  white-space: normal; overflow-wrap: anywhere;
}
.home-att__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; color: var(--muted); font-size: var(--font-meta); }
.home-att__state { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.home-att__error { margin-top: 6px; color: var(--danger); font-size: var(--font-meta); line-height: 1.5; overflow-wrap: anywhere; }
.home-att__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.home-att__actions .btn { min-height: 42px; }
.home-att__print {
  min-height: 42px; padding: 0 6px;
  color: var(--muted); background: transparent;
  font-size: var(--font-meta); text-decoration: underline; text-underline-offset: 3px;
}
.home-att__print[aria-pressed="true"] { color: var(--ok); font-weight: 700; }
.home-att__print[disabled] { opacity: 0.45; }
.bottom-bar { gap: 6px; }
.bottom-bar__clear { flex: none; padding-inline: 9px; }
.bottom-bar__preview { flex: none; padding-inline: 12px; }
.bottom-bar__sub { line-height: 1.4; }

/* ============ 015 品牌 Logo ============ */
.brand-logo {
  display: block; flex: none; object-fit: contain;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.topbar__brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.topbar__brand .topbar__titles { flex: 1; min-width: 0; }

/* ============ 015 激活成功欢迎卡片 ============ */
.activation {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(41, 45, 50, 0.55);
  opacity: 0; transition: opacity 0.18s ease;
  pointer-events: auto; /* layer-root 默认 none，此处恢复可点击，否则关闭按钮失效 */
}
.activation.is-in { opacity: 1; }
.activation__panel {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 360px; max-height: calc(100dvh - 32px);
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(41, 45, 50, 0.28);
  transform: translateY(8px); transition: transform 0.2s ease;
}
.activation.is-in .activation__panel { transform: none; }
.activation__close {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  display: grid; place-items: center;
  color: var(--ink); background: rgba(255, 255, 255, 0.72);
}
.activation__scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 24px 22px 6px; text-align: center;
  background: linear-gradient(180deg, #fff8d8 0%, #fffdf4 46%, #ffffff 100%);
}
.activation__media { display: flex; justify-content: center; }
.activation__ip { display: block; width: 160px; max-width: 64%; height: auto; object-fit: contain; }
.activation__state { margin-top: 10px; font-size: var(--font-meta); font-weight: 700; letter-spacing: 0.5px; color: var(--ok); }
.activation__title {
  margin-top: 8px; font-size: 22px; font-weight: 700; line-height: 1.4;
  color: var(--ink); overflow-wrap: anywhere;
}
.activation__desc { margin-top: 8px; font-size: var(--font-body); line-height: 1.65; color: var(--muted); }
.activation__hint { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.activation__footer { flex: none; padding: 14px 22px calc(18px + var(--safe-bottom)); background: #fff; }

@media (max-width: 359px) {
  .welcome-card { padding: 11px 12px; }
  .time-selector { gap: 6px; }
  .time-selector__today { padding-inline: 8px; }
  .subject-all { padding-inline: 9px; }
  .filter-toggle { padding-inline: 10px; }
  .home-att__actions { gap: 6px; }
  .home-att__actions .btn { padding-inline: 11px; }
  .bottom-bar__preview { padding-inline: 10px; }
}
