/* ==========================================================================
   学伯乐 · 界面样式
   设计基调：干净、留白、圆润、低饱和主题色 + 明快点缀色
   ========================================================================== */

:root{
  --bg:#f4f6fb;
  --bg-soft:#eef2fa;
  --card:#ffffff;
  --ink:#1d2330;
  --ink-2:#525d73;
  --ink-3:#8892a6;
  --line:#e5e9f2;
  --line-2:#eef1f7;

  --brand:#4c6ef5;
  --brand-d:#3b5bdb;
  --brand-l:#e8edff;
  --violet:#7c5cff;
  --pink:#f06595;
  --orange:#f59f00;
  --green:#2f9e44;
  --red:#e03131;
  --cyan:#15aabf;

  --radius:18px;
  --radius-s:12px;
  --radius-xs:9px;
  --shadow:0 8px 28px rgba(29,42,68,.07);
  --shadow-h:0 16px 40px rgba(29,42,68,.12);
  --shadow-s:0 2px 10px rgba(29,42,68,.06);

  --max:1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }

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

body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, #e9efff 0%, rgba(233,239,255,0) 60%),
    radial-gradient(900px 500px at 100% 0%, #fdeef6 0%, rgba(253,238,246,0) 55%),
    var(--bg);
  line-height:1.65;
  font-size:15px;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

h1,h2,h3,h4,p,ul,ol,figure{ margin:0; }
ul,ol{ padding:0; list-style:none; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; font-size:inherit; cursor:pointer; }
img,svg{ display:block; max-width:100%; }
input,select,textarea{ font-family:inherit; font-size:inherit; color:inherit; }

::selection{ background:#cfdaff; }

/* 去掉点击页面后 main 上出现的黑色焦点边框 */
#view, #view:focus, #view:focus-visible, main:focus,
body:focus, html:focus{ outline:none !important; }
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:2px solid rgba(76,110,245,.55);
  outline-offset:2px;
}

.wrap{ width:100%; max-width:var(--max); margin:0 auto; padding:0 22px; }
main.wrap{ flex:1 0 auto; padding-top:26px; padding-bottom:60px; }

/* ------------------------------- 顶栏 ---------------------------------- */
.topbar{
  position:sticky; top:0; z-index:60;
  background:rgba(255,255,255,.82);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid rgba(229,233,242,.9);
}
.topbar-in{ display:flex; align-items:center; gap:22px; height:66px; }

.brand{ display:flex; align-items:center; gap:11px; flex:0 0 auto; }
.brand-mark{
  width:38px; height:38px; flex:0 0 auto; border-radius:12px; display:block;
  overflow:hidden; box-shadow:0 6px 16px rgba(76,110,245,.32);
}
.brand-mark svg{ width:100%; height:100%; display:block; }
.brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand-text b{ font-size:16px; letter-spacing:.3px; }
.brand-text i{ font-style:normal; font-size:11px; color:var(--ink-3); letter-spacing:.4px; }

.nav{ display:flex; align-items:center; gap:4px; margin-left:8px; flex:1 1 auto; }
.nav a{
  padding:8px 14px; border-radius:10px; font-size:14.5px; color:var(--ink-2);
  transition:background .18s ease, color .18s ease; white-space:nowrap;
}
.nav a:hover{ background:var(--bg-soft); color:var(--ink); }
.nav a.active{ background:var(--brand-l); color:var(--brand-d); font-weight:600; }

.topbar-right{ display:flex; align-items:center; gap:10px; }
.user-slot{ display:flex; align-items:center; gap:8px; }

.avatar{
  width:32px; height:32px; border-radius:50%;
  display:grid; place-items:center; font-size:13px; font-weight:700; color:#fff;
  background:linear-gradient(135deg,#4c6ef5,#7c5cff);
}
.user-name{ font-size:14px; color:var(--ink-2); max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.icon-btn{
  border:1px solid var(--line); background:#fff; color:var(--ink-2);
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  transition:.18s;
}
.icon-btn:hover{ border-color:#cfd8ea; color:var(--ink); }
.menu-btn{ display:none; }

/* ------------------------------- 按钮 ---------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border:1px solid transparent; border-radius:11px;
  padding:9px 17px; font-size:14.5px; font-weight:600; line-height:1.2;
  transition:transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px) scale(.995); }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

.btn-primary{ background:linear-gradient(135deg,#5b7cfa,#4c6ef5); color:#fff; box-shadow:0 8px 18px rgba(76,110,245,.28); }
.btn-primary:hover{ box-shadow:0 12px 24px rgba(76,110,245,.36); }
.btn-ghost{ background:#fff; border-color:var(--line); color:var(--ink-2); }
.btn-ghost:hover{ border-color:#cdd8ee; color:var(--ink); background:#fbfcff; }
.btn-soft{ background:var(--brand-l); color:var(--brand-d); }
.btn-soft:hover{ background:#dde5ff; }
.btn-danger{ background:#fff1f1; color:#c92a2a; border-color:#ffd9d9; }
.btn-danger:hover{ background:#ffe3e3; }
.btn-sm{ padding:6px 12px; font-size:13px; border-radius:9px; }
.btn-lg{ padding:12px 24px; font-size:16px; border-radius:13px; }
.btn-block{ width:100%; }

/* ------------------------------- 首页 ---------------------------------- */
.hero{
  position:relative; overflow:hidden;
  border-radius:26px;
  padding:44px 40px 38px;
  background:
    radial-gradient(700px 400px at 85% 15%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(120deg,#eef3ff 0%,#f6f0ff 48%,#fff1f6 100%);
  border:1px solid #e9eefc;
  box-shadow:var(--shadow);
}
.hero::after{
  content:""; position:absolute; right:-70px; bottom:-90px; width:280px; height:280px;
  border-radius:50%; background:radial-gradient(circle at 30% 30%, #ffd8e6, #ffe9c9);
  opacity:.75; filter:blur(2px); pointer-events:none;
}
.hero-badge{
  display:inline-flex; align-items:center; gap:8px;
  background:#fff; border:1px solid #e4e9fb; color:var(--brand-d);
  font-size:12.5px; font-weight:600; letter-spacing:.5px;
  padding:5px 12px; border-radius:999px; box-shadow:var(--shadow-s);
}
.hero h1{
  margin:16px 0 10px; font-size:40px; line-height:1.25; letter-spacing:-.5px; font-weight:800;
}
.hero h1 em{ font-style:normal; color:var(--brand); }
.hero p.lead{ font-size:16px; color:var(--ink-2); max-width:600px; }
.hero-actions{ display:flex; gap:12px; margin-top:24px; flex-wrap:wrap; }

.grade-chips{ display:flex; flex-wrap:wrap; gap:9px; margin-top:26px; position:relative; z-index:1; }
.grade-chip{
  background:#fff; border:1px solid #e6ebf7; border-radius:13px;
  padding:10px 16px; font-size:14px; color:var(--ink-2); font-weight:600;
  display:flex; flex-direction:column; align-items:center; gap:1px; min-width:82px;
  box-shadow:var(--shadow-s); transition:.18s;
}
.grade-chip span{ font-size:11px; font-weight:500; color:var(--ink-3); }
.grade-chip:hover{ transform:translateY(-2px); border-color:#cfdbff; color:var(--brand-d); box-shadow:var(--shadow); }

.section{ margin-top:46px; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-head h2{ font-size:23px; letter-spacing:-.2px; }
.section-head p{ font-size:13.5px; color:var(--ink-3); margin-top:3px; }
.section-head .more{ font-size:13.5px; color:var(--brand); font-weight:600; }

.grid{ display:grid; gap:16px; }
.grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.auto-grid{ grid-template-columns:repeat(auto-fill,minmax(248px,1fr)); }

.subject-card{
  position:relative; overflow:hidden; background:var(--card); border-radius:var(--radius);
  border:1px solid var(--line); padding:24px 22px; box-shadow:var(--shadow-s);
  transition:.2s; display:flex; flex-direction:column; gap:8px; min-height:150px;
}
.subject-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow); border-color:#dbe3f5; }
.subject-card .sc-icon{
  width:46px; height:46px; border-radius:14px; display:grid; place-items:center;
  font-size:24px; margin-bottom:4px;
}
.subject-card h3{ font-size:18px; }
.subject-card p{ font-size:13px; color:var(--ink-3); }
.subject-card .sc-go{ margin-top:auto; font-size:12.5px; color:var(--brand); font-weight:600; }
.sc-cn .sc-icon{ background:#ffe9ef; }
.sc-cn h3{ color:#c2255c; }
.sc-ma .sc-icon{ background:#e7f2ff; }
.sc-ma h3{ color:#1864ab; }
.sc-en .sc-icon{ background:#e9fbf1; }
.sc-en h3{ color:#2b8a3e; }

.tile{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-s);
  padding:14px 16px; display:flex; align-items:center; gap:12px; transition:.18s;
}
.tile:hover{ border-color:#d5dff7; box-shadow:var(--shadow-s); transform:translateY(-1px); }
.tile .t-emoji{ font-size:20px; }
.tile b{ font-size:14.5px; font-weight:600; display:block; }
.tile small{ color:var(--ink-3); font-size:12px; }

.feature{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-s); }
.feature .f-num{
  width:30px; height:30px; border-radius:9px; background:var(--brand-l); color:var(--brand-d);
  display:grid; place-items:center; font-weight:800; font-size:14px; margin-bottom:12px;
}
.feature h4{ font-size:15.5px; margin-bottom:6px; }
.feature p{ font-size:13px; color:var(--ink-3); line-height:1.7; }

/* ------------------------------ 过滤条 --------------------------------- */
.filterbar{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; box-shadow:var(--shadow-s); display:flex; flex-wrap:wrap; gap:14px 18px; align-items:flex-end;
}
.filterbar .f-item{ display:flex; flex-direction:column; gap:6px; min-width:132px; }
.filterbar label{ font-size:12px; color:var(--ink-3); font-weight:600; letter-spacing:.3px; }
.seg{ display:flex; background:var(--bg-soft); border-radius:10px; padding:3px; gap:2px; }
.seg button{
  border:0; background:transparent; color:var(--ink-2); padding:6px 13px; border-radius:8px;
  font-size:13.5px; font-weight:600; transition:.16s;
}
.seg button.on{ background:#fff; color:var(--brand-d); box-shadow:var(--shadow-s); }

select.input, input.input{
  border:1px solid var(--line); background:#fff; border-radius:10px; padding:9px 12px;
  font-size:14px; outline:none; transition:.16s; min-height:40px;
}
select.input:focus, input.input:focus, textarea.input:focus{ border-color:#a9bdff; box-shadow:0 0 0 3px rgba(76,110,245,.12); }
textarea.input{ border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:14px; outline:none; resize:vertical; }

/* ------------------------------ 单元列表 -------------------------------- */
.unit-list{ display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.unit-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-s); overflow:hidden;
  transition:.18s;
}
.unit-card:hover{ border-color:#d8e1f6; box-shadow:var(--shadow-s); }
.unit-head{ display:flex; align-items:center; gap:14px; padding:16px 18px; cursor:pointer; }
.unit-no{
  width:38px; height:38px; flex:0 0 auto; border-radius:11px; display:grid; place-items:center;
  background:var(--brand-l); color:var(--brand-d); font-weight:800; font-size:15px;
}
.unit-head h4{ font-size:15.5px; font-weight:700; }
.unit-head small{ display:block; color:var(--ink-3); font-size:12.5px; font-weight:500; margin-top:2px; }
.unit-head .u-arrow{ margin-left:auto; color:var(--ink-3); transition:.2s; font-size:13px; }
.unit-card.open .u-arrow{ transform:rotate(90deg); }
.unit-body{ display:none; border-top:1px dashed var(--line); padding:14px 18px 18px; background:#fcfdff; }
.unit-card.open .unit-body{ display:block; }

.lesson-row{
  display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:9px; transition:.15s;
}
.lesson-row:hover{ background:#f2f6ff; }
.lesson-row .l-no{ font-size:12px; color:var(--ink-3); width:38px; flex:0 0 auto; }
.lesson-row .l-t{ font-size:14px; flex:1 1 auto; }
.lesson-row .l-acts{ display:flex; gap:6px; opacity:.35; transition:.15s; }
.lesson-row:hover .l-acts{ opacity:1; }

.tag{
  display:inline-flex; align-items:center; gap:4px; font-size:11.5px; font-weight:600;
  padding:3px 9px; border-radius:999px; background:#f1f4fb; color:#5d6b87;
}
.tag.blue{ background:#e8f0ff; color:#3b5bdb; }
.tag.pink{ background:#ffecf2; color:#c2255c; }
.tag.green{ background:#e7f8ee; color:#2b8a3e; }
.tag.orange{ background:#fff3e0; color:#b35c00; }

/* ------------------------------ 卡片网格 -------------------------------- */
.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-s);
  padding:18px; box-shadow:var(--shadow-s); transition:.18s; display:flex; flex-direction:column; gap:8px;
}
.card:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:#dbe3f5; }
.card h4{ font-size:15px; }
.card p{ font-size:12.8px; color:var(--ink-3); line-height:1.65; }
.card .c-foot{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:8px; }
.card .c-emoji{ font-size:22px; }
.card .c-meta{ font-size:11.5px; color:var(--ink-3); }

/* ------------------------------- 页面头 -------------------------------- */
.page-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.page-head h1{ font-size:27px; letter-spacing:-.3px; }
.page-head p{ color:var(--ink-3); font-size:13.5px; margin-top:4px; }

.breadcrumb{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-3); margin-bottom:14px; flex-wrap:wrap; }
.breadcrumb a:hover{ color:var(--brand); }
.breadcrumb i{ font-style:normal; opacity:.6; }

.toolbar{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:#fff; border:1px solid var(--line); border-radius:14px; padding:10px 12px;
  box-shadow:var(--shadow-s); margin-bottom:18px;
}
.toolbar .spacer{ flex:1 1 auto; }
.toolbar .tb-title{ font-size:14px; font-weight:600; }

.print-tip{ font-size:12px; color:var(--ink-3); margin:-8px 0 14px; padding-left:2px; line-height:1.7; }

.search-box{ position:relative; display:flex; align-items:center; }
.search-box input{ padding-left:34px; min-width:210px; }
.search-box::before{ content:"🔍"; position:absolute; left:11px; font-size:13px; opacity:.6; }

/* -------------------------------- 表单 --------------------------------- */
.form{ display:flex; flex-direction:column; gap:16px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field > label{ font-size:13px; font-weight:600; color:var(--ink-2); }
.field .tip{ font-size:11.5px; color:var(--ink-3); }
.field .err{ font-size:12px; color:var(--red); display:none; }
.field.invalid .err{ display:block; }
.field.invalid .input{ border-color:#ffb3b3; background:#fff8f8; }

.auth-wrap{ display:flex; justify-content:center; padding:34px 0 10px; }
.auth-card{
  width:100%; max-width:430px; background:#fff; border:1px solid var(--line);
  border-radius:24px; padding:32px 30px; box-shadow:var(--shadow);
}
.auth-card h2{ font-size:23px; }
.auth-card > p.sub{ color:var(--ink-3); font-size:13px; margin-top:4px; }
.auth-card .form{ margin-top:22px; }
.tabs{ display:flex; gap:6px; background:var(--bg-soft); padding:4px; border-radius:12px; margin-top:20px; }
.tabs button{
  flex:1; border:0; background:transparent; padding:8px; border-radius:9px;
  font-size:13.5px; font-weight:600; color:var(--ink-2);
}
.tabs button.on{ background:#fff; color:var(--brand-d); box-shadow:var(--shadow-s); }

/* -------------------------------- 弹窗 --------------------------------- */
.modal-root{ position:fixed; inset:0; z-index:200; display:none; }
.modal-root.show{ display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-mask{ position:absolute; inset:0; background:rgba(22,29,45,.42); backdrop-filter:blur(3px); }
.modal{
  position:relative; z-index:1; width:min(560px, calc(100vw - 32px));
  margin:0; max-height:88vh; display:flex; flex-direction:column;
  background:#fff; border-radius:20px; box-shadow:0 30px 70px rgba(15,23,42,.28);
  overflow:hidden; animation:pop .18s ease-out;
}
.modal-body{ overflow:auto; }
@keyframes pop{ from{ transform:translateY(10px) scale(.98); opacity:0 } to{ transform:none; opacity:1 } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--line-2); }
.modal-head h3{ font-size:16.5px; }
.modal-body{ padding:20px 22px; max-height:70vh; overflow:auto; }
.modal-foot{ padding:14px 22px; border-top:1px solid var(--line-2); display:flex; justify-content:flex-end; gap:10px; background:#fcfdff; }

.modal .choice-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.choice{
  border:1px solid var(--line); border-radius:11px; padding:10px 12px; background:#fff;
  text-align:left; font-size:13.5px; color:var(--ink-2); transition:.15s;
}
.choice:hover{ border-color:#c8d6ff; }
.choice.on{ border-color:var(--brand); background:#f3f6ff; color:var(--brand-d); font-weight:600; box-shadow:0 0 0 3px rgba(76,110,245,.09); }

/* -------------------------------- Toast -------------------------------- */
.toast{
  position:fixed; left:50%; bottom:38px; transform:translate(-50%,20px);
  background:#1d2330; color:#fff; padding:11px 20px; border-radius:12px;
  font-size:13.5px; opacity:0; pointer-events:none; transition:.24s; z-index:400;
  box-shadow:0 12px 30px rgba(0,0,0,.25); max-width:80vw; text-align:center;
}
.toast.show{ opacity:1; transform:translate(-50%,0); }
.toast.ok{ background:#237a3b; }
.toast.err{ background:#b02a2a; }

/* 打印容器：屏幕不显示，打印时由 print.css 打开 */
#print-root{ display:none; }
#print-root .paper-sheet{ margin:0 auto; }

/* -------------------------------- 在线答题 ------------------------------- */
.quiz-wrap{ max-width:880px; margin:0 auto; }
.quiz-head{ margin-bottom:18px; }
.quiz-head h1{ font-size:24px; margin:8px 0 4px; }
.quiz-head p{ font-size:13.5px; color:var(--ink-3); }

.quiz-sec{ margin-top:22px; }
.quiz-sec h3{ font-size:16.5px; margin-bottom:10px; }
.quiz-sec h3 .pts{ font-size:11.5px; font-weight:400; color:var(--ink-3); margin-left:6px; }

.qz-q{
  background:#fff; border:1px solid var(--line); border-radius:14px;
  padding:16px 18px; margin-bottom:12px; box-shadow:var(--shadow-s);
}
.qz-stem{ font-size:16px; line-height:2; }
.qz-no{
  display:inline-grid; place-items:center; width:24px; height:24px; margin-right:8px;
  border-radius:8px; background:var(--brand-l); color:var(--brand-d);
  font-size:12.5px; font-weight:800; vertical-align:1px;
}
.qz-opts{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.qz-opt{
  display:flex; align-items:center; gap:9px; text-align:left; width:100%;
  border:1px solid var(--line); background:#fcfdff; border-radius:11px;
  padding:10px 12px; font-size:14.5px; color:var(--ink-2); transition:.15s;
  min-height:46px; line-height:1.5;
}
.qz-opt b{
  flex:0 0 auto; width:24px; height:24px; border-radius:7px; display:grid; place-items:center;
  background:#eef1f7; color:var(--ink-2); font-size:12.5px;
}
.qz-opt:hover{ border-color:#c9d6ff; background:#f7f9ff; }
.qz-opt.on{ border-color:var(--brand); background:#eff3ff; color:var(--ink); box-shadow:0 0 0 3px rgba(76,110,245,.1); }
.qz-opt.on b{ background:var(--brand); color:#fff; }
.qz-judge{ grid-template-columns:repeat(2,minmax(0,1fr)); max-width:300px; }

.qz-input, .qz-textarea{
  width:100%; margin-top:12px; border:1px solid var(--line); border-radius:11px;
  padding:11px 13px; font-size:16px; outline:none; background:#fcfdff; transition:.15s;
}
.qz-input:focus, .qz-textarea:focus{ border-color:#a9bdff; box-shadow:0 0 0 3px rgba(76,110,245,.1); background:#fff; }
.qz-textarea{ resize:vertical; line-height:1.9; min-height:90px; }

.qz-art{ margin-top:12px; }
.qz-art svg{ max-width:100%; height:auto; margin:0 auto; }
.qz-cap{ font-size:12px; color:var(--ink-3); text-align:center; margin-top:4px; }

.qz-passage{
  border:1px solid var(--line); background:#fbfcff; border-radius:11px;
  padding:12px 14px; margin-top:12px; font-size:14px; line-height:2; color:var(--ink-2);
}
.qz-passage b{ display:block; text-align:center; color:var(--ink); margin-bottom:4px; }
.qz-passage p{ text-indent:2em; }
.qz-sub{ margin-top:12px; }
.qz-sub-q{ font-size:15px; line-height:1.9; }
.qz-sub .qz-opts{ margin-top:8px; }
.qz-sub .qz-input{ margin-top:8px; }

.quiz-submit{
  position:sticky; bottom:0; z-index:20; margin-top:22px; padding:14px 0;
  background:linear-gradient(to top, rgba(244,246,251,1) 60%, rgba(244,246,251,0));
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.qz-tip{ font-size:12px; color:var(--ink-3); }
@media (max-width:640px){
  .quiz-submit{ background:var(--bg); border-top:1px solid var(--line); padding:12px 0; }
  .qz-opt{ font-size:15px; }
}

/* 批改结果 */
.quiz-result{ max-width:880px; margin:0 auto; }
.qr-card{
  display:flex; align-items:center; gap:22px; background:#fff; border:1px solid var(--line);
  border-radius:18px; padding:22px 24px; box-shadow:var(--shadow-s);
}
.qr-score{ display:flex; align-items:baseline; gap:4px; color:var(--brand-d); }
.qr-score b{ font-size:44px; line-height:1; }
.qr-score span{ font-size:16px; color:var(--ink-3); }
.qr-meta h3{ font-size:18px; }
.qr-meta p{ font-size:13px; color:var(--ink-3); margin-top:4px; }
.qr-actions{ display:flex; gap:10px; flex-wrap:wrap; margin:16px 0; }
.qr-list{ display:flex; flex-direction:column; gap:8px; }
.qr-item{
  display:flex; align-items:flex-start; gap:12px; background:#fff; border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; font-size:13.5px;
}
.qr-item.bad{ border-color:#ffd0d0; background:#fffafa; }
.qr-item.ok{ border-color:#d3f0dc; background:#fafffc; }
.qr-item.self{ border-color:#ffe6bf; background:#fffdf7; }
.qr-no{ flex:0 0 auto; font-weight:800; color:var(--ink-3); width:22px; }
.qr-body{ flex:1 1 auto; min-width:0; }
.qr-line{ line-height:1.85; word-break:break-word; }
.qr-line i{ font-style:normal; color:var(--ink-3); }
.qr-mark{ flex:0 0 auto; font-weight:800; }
.qr-item.ok .qr-mark{ color:var(--green); }
.qr-item.bad .qr-mark{ color:var(--red); }
.qr-item.self .qr-mark{ color:var(--orange); font-size:12px; }

/* 错题本 */
.attempt{
  display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line);
  border-radius:14px; padding:14px 16px; margin-bottom:10px;
}
.attempt .a-main{ flex:1 1 auto; min-width:0; }
.attempt b{ display:block; font-size:14.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attempt small{ color:var(--ink-3); font-size:12px; }
.attempt .a-score{ flex:0 0 auto; font-size:13px; color:var(--ink-2); }
.attempt .a-score b{ display:inline; color:var(--red); font-size:16px; }
.attempt .a-acts{ display:flex; gap:8px; flex-wrap:wrap; }
.wrong-item{ border-bottom:1px dashed var(--line); padding:10px 0; font-size:13.5px; line-height:1.9; }
.wrong-item:last-child{ border-bottom:0; }
.wrong-item .wi-a{ color:var(--red); }
.wrong-item .wi-b{ color:var(--green); }
@media (max-width:640px){
  .attempt{ flex-wrap:wrap; }
  .attempt .a-acts{ width:100%; justify-content:flex-end; }
  .qz-opts{ grid-template-columns:1fr; }
  .qz-judge{ grid-template-columns:1fr; }
}
.boot-error{ position:fixed; left:16px; right:16px; bottom:16px; z-index:999; display:none; pointer-events:none; }
.boot-error .be-item{
  pointer-events:auto; background:#b02a2a; color:#fff; border-radius:11px;
  padding:10px 14px; font-size:13px; line-height:1.7; margin-top:8px;
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}
.boot-error b{ margin-right:2px; }

/* -------------------------------- 空状态 ------------------------------- */
.empty{
  text-align:center; padding:56px 20px; background:#fff; border:1px dashed #dbe2f0;
  border-radius:var(--radius); color:var(--ink-3);
}
.empty .e-emoji{ font-size:38px; margin-bottom:10px; }
.empty b{ display:block; color:var(--ink-2); font-size:15px; margin-bottom:4px; }
.empty p{ font-size:13px; }

/* ------------------------------- 记录列表 ------------------------------ */
.record{
  display:flex; align-items:center; gap:14px; padding:14px 16px; background:#fff;
  border:1px solid var(--line); border-radius:var(--radius-s); transition:.16s;
}
.record + .record{ margin-top:10px; }
.record:hover{ border-color:#d7e0f5; box-shadow:var(--shadow-s); }
.record .r-ico{
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  font-size:20px; background:var(--bg-soft); flex:0 0 auto;
}
.record .r-main{ flex:1 1 auto; min-width:0; }
.record .r-main b{ font-size:14.5px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.record .r-main small{ color:var(--ink-3); font-size:12px; }
.record .r-acts{ display:flex; gap:8px; flex:0 0 auto; }

.pill-group{ display:flex; gap:8px; flex-wrap:wrap; }

/* -------------------------------- 页脚 --------------------------------- */
.foot{ border-top:1px solid var(--line); background:rgba(255,255,255,.6); margin-top:30px; }
.foot-in{ display:grid; grid-template-columns:1.4fr 1fr; gap:16px; padding-top:30px; padding-bottom:30px; }
.foot-main b{ font-size:15px; }
.foot-main p{ font-size:12.5px; color:var(--ink-3); margin-top:3px; }
.foot-links{ display:flex; gap:18px; flex-wrap:wrap; align-content:flex-start; font-size:13px; color:var(--ink-2); }
.foot-links a:hover{ color:var(--brand); }
.foot-copy{ grid-column:1/-1; font-size:12px; color:var(--ink-3); padding-top:14px; border-top:1px solid var(--line-2); }

/* ------------------------------- 响应式 -------------------------------- */
@media (max-width:1000px){
  .grid-4{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-3{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:860px){
  .nav{
    position:fixed; inset:66px 0 auto 0; background:#fff; flex-direction:column; align-items:stretch;
    padding:12px 18px 18px; gap:2px; border-bottom:1px solid var(--line); display:none;
    box-shadow:0 18px 30px rgba(20,29,48,.08); z-index:55;
  }
  .nav.open{ display:flex; }
  .nav a{ padding:12px 12px; border-radius:10px; }
  .menu-btn{ display:grid; }
  .brand-text i{ display:none; }
  .hero{ padding:32px 22px 28px; border-radius:20px; }
  .hero h1{ font-size:29px; }
  .hero p.lead{ font-size:14.5px; }
  main.wrap{ padding-left:14px; padding-right:14px; }
  .wrap{ padding-left:16px; padding-right:16px; }
  .foot-in{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .grid-4,.grid-3,.grid-2,.auto-grid{ grid-template-columns:1fr; }
  .grade-chip{ min-width:calc(33.333% - 6px); padding:8px 10px; }
  .page-head h1{ font-size:22px; }
  .filterbar{ gap:10px; }
  .filterbar .f-item{ min-width:calc(50% - 10px); flex:1 1 auto; }
  .modal .choice-grid{ grid-template-columns:1fr; }
  .record{ flex-wrap:wrap; }
  .record .r-acts{ width:100%; justify-content:flex-end; }
}