/* 家政职业能力考试系统 · 样式 */
:root {
  color-scheme: light;
  --brand: #0f766e;
  --brand-dark: #0b5750;
  --brand-soft: #e6f4f2;
  --brand-line: #bfe0db;
  --amber: #d97706;
  --amber-soft: #fdf3e3;
  --blue: #1d4ed8;
  --blue-soft: #e8eefc;
  --green: #12805c;
  --green-soft: #e5f5ee;
  --red: #d64545;
  --red-soft: #fdecec;
  --ink: #17282a;
  --ink-2: #40565a;
  --muted: #7b9296;
  --line: #e2eae9;
  --bg: #f2f6f6;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16, 50, 50, .06), 0 8px 24px -12px rgba(16, 50, 50, .18);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .2px; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(120deg, #0b5750 0%, #0f766e 55%, #14867c 100%);
  color: #fff;
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(11, 87, 80, .25);
}
.topbar .wrap { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; letter-spacing: 0;
  flex: 0 0 auto;
}
.brand-text { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 12px; opacity: .78; letter-spacing: 1.5px; }
.topbar .spacer { flex: 1; }
.topbar-user { font-size: 13px; opacity: .92; text-align: right; line-height: 1.35; }
.topbar-user b { display: block; font-size: 15px; }

/* ---------- 通用元件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .16s; font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: #b86305; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: .15s; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input::placeholder { color: #a9bcbe; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.alert {
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px;
  margin-bottom: 14px; display: none; border: 1px solid transparent;
}
.alert.show { display: block; }
.alert-error { background: var(--red-soft); color: #9c2b2b; border-color: #f4cdcd; }
.alert-ok { background: var(--green-soft); color: #0d6a4b; border-color: #bfe5d6; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-line); }

.section-title { display: flex; align-items: center; gap: 9px; margin: 30px 0 14px; }
.section-title h2 { font-size: 17px; }
.section-title .bar { width: 4px; height: 17px; border-radius: 2px; background: var(--brand); }
.section-title .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 2px; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge-amber { background: var(--amber-soft); color: #97530a; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: #eef2f2; color: var(--muted); }

.empty {
  text-align: center; color: var(--muted); font-size: 13.5px;
  padding: 34px 16px; background: #fafcfc; border: 1px dashed var(--line); border-radius: 12px;
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(circle at 12% 8%, #dff0ee 0%, transparent 46%),
    radial-gradient(circle at 88% 92%, #fdf1e0 0%, transparent 44%),
    var(--bg);
}
.login-card { width: 100%; max-width: 440px; padding: 34px 32px 28px; }
.login-logo {
  width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 16px;
  background: linear-gradient(140deg, #0f766e, #13a08f);
  color: #fff; font-size: 21px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px -8px rgba(15, 118, 110, .7);
}
.login-title { text-align: center; font-size: 21px; }
.login-sub { text-align: center; font-size: 13px; color: var(--muted); margin: 6px 0 24px; }
.cloud-tip { margin: -8px 0 18px; padding: 12px 14px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }
.cloud-tip.hidden { display: none; }
.cloud-tip-t { font-size: 12.5px; color: #92400e; line-height: 1.55; margin-bottom: 10px; }
.cloud-tip-t b { color: #b45309; }
.login-foot { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); text-align: center; }
.login-foot a { font-weight: 600; }

/* ---------- 概览数字 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 17px;
}
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 25px; font-weight: 700; line-height: 1.25; margin-top: 2px; color: var(--brand-dark); }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }

.hello {
  background: linear-gradient(120deg, #0d6a62, #12897d);
  color: #fff; border-radius: var(--radius); padding: 22px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 10px 26px -16px rgba(13, 106, 98, .9);
}
.hello .who { font-size: 20px; font-weight: 700; }
.hello .meta { font-size: 13px; opacity: .85; margin-top: 3px; }
.hello .spacer { flex: 1; }
.hello .pill {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 10px; padding: 8px 14px; text-align: center; min-width: 78px;
}
.hello .pill b { display: block; font-size: 19px; line-height: 1.2; }
.hello .pill span { font-size: 11.5px; opacity: .82; }

/* ---------- 热门 ---------- */
/* 紧凑宫格：10 个科目排两行（每行 5 个），🔥 = 爆款标识，下面只跟科目名 */
.hot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.hot-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px 11px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 6px;
  transition: .16s; cursor: pointer;
}
.hot-card:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); }
/* 🔥 即爆款：放大做主标识，不配文字 */
.hot-flag {
  font-size: 30px; line-height: 1; pointer-events: none;
  filter: saturate(1.1) drop-shadow(0 2px 4px rgba(234, 88, 12, .18));
  transition: transform .16s;
}
.hot-card:hover .hot-flag { transform: scale(1.12); }
.hot-card .name {
  font-weight: 700; font-size: 13.5px; line-height: 1.3;
  display: flex; align-items: center; min-height: 20px;
}

/* ---------- 置顶推荐卡（高薪阿姨职业素养测评） ---------- */
.feat-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #fff8ee 0%, #fffdf9 60%, #ffffff 100%);
  border: 1px solid #f2ddc2; border-radius: 14px;
  padding: 16px 20px; margin-bottom: 22px;
  cursor: pointer; transition: .16s;
}
.feat-card:hover { border-color: #e8b47a; transform: translateY(-1px); box-shadow: var(--shadow); }
/* 置顶卡同样用 🔥 表达爆款，字号再大一档 */
.feat-card .fire {
  flex: 0 0 auto; width: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; line-height: 1; font-weight: 400;
  filter: saturate(1.1) drop-shadow(0 3px 6px rgba(234, 88, 12, .16));
}
.feat-main { min-width: 0; }
.feat-card .feat-name { font-size: 16.5px; font-weight: 800; color: var(--ink); letter-spacing: .2px; }
.feat-card .feat-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.feat-card .feat-tag { font-size: 12px; color: var(--amber); font-weight: 700; margin-top: 5px; }
.feat-go {
  margin-left: auto; flex: 0 0 auto;
  background: #fff; border: 1px solid #e8b47a; color: var(--amber);
  font-size: 13px; font-weight: 700; padding: 8px 15px; border-radius: 9px; white-space: nowrap;
}
.feat-card:hover .feat-go { background: var(--amber); border-color: var(--amber); color: #fff; }

@media (max-width: 700px) {
  .feat-card { padding: 14px 16px; gap: 12px; align-items: flex-start; }
  .feat-card .fire { width: 34px; font-size: 28px; }
  .feat-card .feat-name { font-size: 15px; line-height: 1.3; }
  .feat-card .feat-desc { font-size: 12px; }
  .feat-go { padding: 7px 11px; font-size: 12px; align-self: center; }
}

/* ---------- 专区（养老照护） ---------- */
.zone-panel {
  margin: 22px 0 6px; padding: 18px 20px 20px;
  border: 1px solid #ecd3ae; border-radius: 16px;
  background: linear-gradient(135deg, #fffaf2 0%, #ffffff 62%);
  box-shadow: var(--shadow);
}
.zone-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.zone-flag {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(140deg, #f59e0b, #ea580c); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
}
.zone-head h3 { font-size: 17px; }
.zone-head p { font-size: 12.6px; color: var(--ink-2); margin-top: 3px; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 14px; }
.zone-card {
  display: flex; align-items: center; gap: 13px; cursor: pointer;
  background: #fff; border: 1px solid #f1e0c7; border-radius: 12px;
  padding: 14px 16px; transition: .16s;
}
.zone-card:hover { transform: translateY(-2px); border-color: #e2b57a; box-shadow: var(--shadow); }
.zone-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #8a4b08;
  background: linear-gradient(140deg, #fde8c8, #fbd9a6);
}
.zone-name { font-weight: 700; font-size: 15.5px; }
.zone-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.zone-meta { font-size: 12px; color: var(--amber); font-weight: 600; margin-top: 5px; }
.zone-go { margin-left: auto; font-size: 13px; font-weight: 700; color: #b45309; white-space: nowrap; }

@media (max-width: 700px) {
  .zone-panel { padding: 15px 15px 16px; }
  .zone-grid { grid-template-columns: 1fr; gap: 10px; }
  .zone-head { align-items: flex-start; }
  .zone-go { font-size: 12.5px; }
}

/* ---------- 科目卡 ---------- */
.cat-block { margin-bottom: 22px; }
.cat-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.cat-head h3 { font-size: 15.5px; color: var(--brand-dark); }
.cat-head span { font-size: 12.5px; color: var(--muted); }
.cat-caret { display: none; }
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.subject {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; transition: .16s;
}
.subject:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.subject-top { display: flex; gap: 12px; align-items: center; }
.subj-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(140deg, #0f766e, #16a394);
}
.cat-yuying .subj-ico { background: linear-gradient(140deg, #1d4ed8, #4f7ff0); }
.cat-jishi .subj-ico { background: linear-gradient(140deg, #a1610a, #d99325); }
.subject .name { font-weight: 700; font-size: 15.5px; }
.subject .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.level-row { display: flex; gap: 8px; margin-top: 14px; }
.level-chip {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px;
  border: 1px solid var(--line); background: #fafcfc; cursor: pointer;
  transition: .15s; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.level-chip:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.level-chip .done {
  display: block; font-size: 11px; font-weight: 600; color: var(--green); margin-top: 1px;
}
.level-chip.has-record { border-color: var(--brand-line); background: var(--brand-soft); }

/* ---------- 高薪专区（金色高亮，单列宽卡） ---------- */
.cat-block.cat-gaoxin {
  background: linear-gradient(160deg, #fffaf1 0%, #fff6e4 100%);
  border: 1px solid #f2ddaf; border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: 0 8px 22px -16px rgba(180, 120, 20, .55);
}
.cat-gaoxin .cat-head { border-bottom-color: #f0dcae; }
.cat-gaoxin .cat-head h3 { color: #9a3412; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-badge {
  font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, #c2410c, #f59e0b);
  padding: 2px 9px; border-radius: 999px; letter-spacing: .3px;
}
.cat-gaoxin .subject-grid { grid-template-columns: 1fr; }
.cat-gaoxin .subject { border-color: #f0dcb4; background: #fff; }
.cat-gaoxin .subj-ico { background: linear-gradient(140deg, #9a3412, #f59e0b); }
.cat-gaoxin .level-chip {
  background: linear-gradient(120deg, #fff7e8, #fdf0d8);
  border-color: #eecf95; color: #9a3412; font-weight: 700;
}
.cat-gaoxin .level-chip:hover { border-color: #d99b1a; background: #fdeed2; }
.cat-gaoxin .level-chip.has-record { border-color: #e6c07a; background: #fdf3e0; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 960px; }
table.tbl th {
  text-align: left; padding: 11px 14px; background: #f7fbfa; color: var(--ink-2);
  font-weight: 600; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid #f1f6f5; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #fafdfd; }
.score-num { font-weight: 700; font-size: 15px; }
.score-good { color: var(--green); }
.score-mid { color: var(--amber); }

/* ---------- 答题页 ---------- */
.exam-head {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 13px 0; box-shadow: 0 6px 18px -14px rgba(16, 50, 50, .5);
}
.exam-head .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.exam-head .t { font-weight: 700; font-size: 16px; }
.exam-head .t span { font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 7px; }
.exam-head .spacer { flex: 1; }
.countdown {
  font-size: 13px; font-weight: 600; color: var(--amber);
  background: var(--amber-soft); border: 1px solid #f2ddb8; border-radius: 9px; padding: 6px 12px;
}
.countdown.urgent { color: var(--red); background: var(--red-soft); border-color: #f4cdcd; }

.q-card { padding: 26px 28px; margin-top: 20px; }
.q-index { font-size: 12.5px; font-weight: 600; color: var(--brand); letter-spacing: .6px; }
.q-text { font-size: 18px; font-weight: 600; line-height: 1.65; margin: 10px 0 20px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 16px; margin-bottom: 11px; cursor: pointer; transition: .15s; background: #fff;
}
.opt:hover { border-color: var(--brand-line); background: #fafdfd; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt-key {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.opt.sel .opt-key { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt-txt { padding-top: 1px; }
/* 多选题：选项框改为小方框，选中显示对勾，和单选区分开 */
.opt.opt-multi .opt-key { border-radius: 5px; }
.opt.opt-multi.sel .opt-key { font-size: 0; }
.opt.opt-multi.sel .opt-key::after { content: '✓'; font-size: 14px; line-height: 1; }

.exam-foot {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 18px -20px 22px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px -16px rgba(16, 50, 50, .55);
}
.exam-foot .spacer { flex: 1; }

.sheet { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin-top: 12px; }
.sheet-btn {
  aspect-ratio: 1/1; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
  font-family: inherit; transition: .15s;
}
.sheet-btn:hover { border-color: var(--brand); }
.sheet-btn.answered { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }
.sheet-btn.current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 成绩页 ---------- */
.result-hero { text-align: center; padding: 34px 24px 28px; }
.ring {
  width: 168px; height: 168px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.ring-inner {
  width: 138px; height: 138px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-inner b { font-size: 46px; line-height: 1; font-weight: 700; }
.ring-inner span { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.result-title { font-size: 20px; font-weight: 700; }
.result-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; text-align: left; }
.result-grid .cell { background: #fafcfc; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.result-grid .cell .k { font-size: 12px; color: var(--muted); }
.result-grid .cell .v { font-weight: 700; font-size: 15px; margin-top: 2px; }

/* ---------- 后台 ---------- */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; flex-wrap: wrap; }
.admin-tab {
  padding: 9px 16px; border-radius: 10px 10px 0 0; cursor: pointer; font-size: 14px;
  font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; transition: .15s;
}
.admin-tab:hover { color: var(--brand); }
.admin-tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); background: #f7fbfa; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-item .bl-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.bar-item .bl-top b { font-weight: 600; }
.bar-item .bl-top span { color: var(--muted); font-size: 12.5px; }
.bar-track { height: 9px; border-radius: 6px; background: #eef4f3; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #14a394, #0f766e); transition: width .5s; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; font-family: inherit; outline: none; background: #fff; color: var(--ink);
}
.toolbar input { flex: 1; min-width: 180px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand); }
.toolbar .spacer { flex: 1; }
.count-note { font-size: 12.5px; color: var(--muted); }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(12, 40, 40, .45);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.mask.hidden { display: none; }
.modal { width: 100%; max-width: 460px; padding: 26px 26px 22px; }
.modal h3 { font-size: 18px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.modal .modal-foot { display: flex; gap: 10px; margin-top: 20px; }
.modal .modal-foot .spacer { flex: 1; }
.pick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pick {
  display: flex; align-items: center; gap: 13px; border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 16px; cursor: pointer; transition: .15s; background: #fff;
}
.pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.pick b { font-size: 15px; }
.pick small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pick .arrow { margin-left: auto; color: var(--muted); }
.pick .ok { margin-left: auto; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #123c3a; color: #fff; padding: 11px 20px; border-radius: 11px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 90;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.foot-note { text-align: center; color: var(--muted); font-size: 12.5px; padding: 34px 20px 30px; }
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  /* 热门宫格保持 5 列（卡片本身已经是小图标+名称，不再降列） */
  .hot-grid { gap: 9px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-caret { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .wrap, .wrap-narrow { padding: 0 14px; }
  .subject-grid { grid-template-columns: 1fr; gap: 10px; }
  .q-card { padding: 20px 18px; }
  .q-text { font-size: 16.5px; }
  .card-pad { padding: 18px 16px; }
  .login-card { padding: 26px 20px 22px; }
  .hello { padding: 18px 18px; gap: 12px; }
  .hello .who { font-size: 18px; }
  /* 统计 8 项：grid 精确排 4 列 × 2 排（隐藏桌面端的右对齐占位符） */
  .hello { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; align-items: center; }
  .hello .spacer { display: none; }
  .hello .who, .hello .meta, .hello > div:first-child { grid-column: 1 / -1; }
  .hello .pill { min-width: 0; padding: 7px 4px; }
  .hello .pill b { font-size: 17px; }
  .hello .pill span { font-size: 10.5px; }
  .exam-head .t { font-size: 15px; }
  .sheet { grid-template-columns: repeat(6, 1fr); }
  .topbar-user { display: none; }
  .admin-tab { padding: 8px 12px; font-size: 13.5px; }

  /* --- 手机端瘦身 --- */
  .section-title { margin: 22px 0 12px; }
  .section-title h2 { white-space: nowrap; flex: 0 0 auto; }
  .section-title .sub { min-width: 0; }

  /* 热门区：10 个科目排两行（每行 5 个）紧凑宫格 */
  .hot-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 7px; margin: 0; padding: 0;
  }
  .hot-card { gap: 6px; padding: 12px 2px 8px; }
  .hot-flag { font-size: 24px; }
  .hot-card .name { font-size: 10.5px; line-height: 1.25; min-height: 26px; }

  /* 科目卡与等级按钮压缩留白 */
  .subject { padding: 13px 14px; }
  .subj-ico { width: 36px; height: 36px; font-size: 15px; }
  .subject .name { font-size: 14.5px; }
  .subject .desc { font-size: 12px; }
  .level-row { margin-top: 10px; gap: 6px; }
  .level-chip { padding: 8px 2px; font-size: 12.5px; }
  .stat { padding: 12px 13px; }
  .stat .v { font-size: 21px; }

  /* 系列折叠：点标题展开 / 收起，收起时只留一行标题 */
  .cat-block { margin-bottom: 14px; }
  .cat-block.cat-gaoxin { padding: 13px 13px 15px; }
  .cat-head { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; padding-bottom: 8px; margin-bottom: 10px; }
  .cat-head:active { opacity: .7; }
  .cat-head span { flex: 1; }
  .cat-caret {
    display: block; flex: 0 0 auto; margin-left: 4px;
    color: var(--muted); font-size: 13px; font-style: normal;
    transition: transform .2s ease;
  }
  .cat-block.collapsed .cat-caret { transform: rotate(-90deg); }
  .cat-block.collapsed .subject-grid { display: none; }
}
