/* ===== 雅思做题系统 全局样式（排课系统风格：暖米白 + 橙色主色 + 左侧边栏） ===== */
:root {
  --bg: #f4f0e8;
  --bg-elevated: #fbf8f3;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-faint: #8a847c;
  --line: #e7e0d4;
  --line-strong: #d6cec0;
  --accent: #c96442;
  --accent-hover: #b4532f;
  --accent-soft: #f3e4dc;
  --ok: #3f6f4e;
  --warn: #9a6b1f;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(28,25,23,.06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Microsoft YaHei", "微软雅黑", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* 旧名兼容映射（保留组件内引用） */
  --primary: var(--accent);
  --primary-dark: var(--accent-hover);
  --primary-soft: var(--accent-soft);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --border: var(--line);
  --success: var(--ok);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
  background:
    radial-gradient(1200px 500px at 10% -10%, #f8e8df 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #efe8dc 0%, transparent 50%),
    var(--bg);
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- 布局：左侧边栏 + 内容区 ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  /* 原 176px，按用户要求收窄四分之一 → 132px。
     收窄后同时压缩内边距/字号，避免"🗣️ 口语练习""待完成作业"等标签折行。 */
  width: 132px; flex: 0 0 132px;
  background: rgba(251,248,243,.92);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--line);
  padding: 22px 8px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 7px; padding: 0 2px 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink); }
.brand-logo { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: block; }
.brand-wordmark { height: 16px; width: auto; flex: 0 0 auto; display: block; }
.brand-mark {
  align-self: flex-start;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12px;
  padding: 3px 7px; border-radius: 8px; letter-spacing: .5px;
}
.brand-name {
  /* 贴近 logo 里「来思教育」的字形：细黑体 + 加大字距 */
  font-family: "Microsoft YaHei Light", "DengXian Light", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  font-size: 14px; font-weight: 300; letter-spacing: .18em; color: #2b2b2b; white-space: nowrap;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  display: block; width: 100%; text-align: left;
  padding: 10px 9px; border-radius: 10px;
  background: transparent; color: var(--ink); border: 0;
  font-weight: 500; font-size: 13px; margin-bottom: 3px;
  /* 单行显示：不折行、超长省略（标签本身都在 96px 以内，仅作兜底） */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-btn:hover { background: var(--bg-elevated); color: var(--ink); }
.nav-btn.active { background: var(--accent); color: #fff; }
.side-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.content { flex: 1; padding: 22px 26px 60px; min-width: 0; }
/* 作答页（听力/阅读/写作）：隐藏左侧菜单栏，题目区占满整行，视觉更聚焦。
   注意：不要改 .content 的 padding —— .exam/.writing 用负 margin 抵消它（-22/-26/-60）。 */
body.wide-mode .sidebar { display: none; }

/* ---- 难度标记（入门/基础/进阶/挑战） ---- */
.diff-dots { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.diff-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #2b6cb0; flex: 0 0 auto; }
.lib-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.lib-filter-row .lib-filter { margin: 0; }
.diff-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.diff-filter-label { font-size: 12px; color: var(--ink-faint); margin-right: 2px; }
.diff-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 36px; border: 1px solid #dcbba9; background: #e8c9bb; color: #8f3d22;
  font-weight: 600; cursor: pointer; padding: 4px 12px; border-radius: 12px; font-size: 12px;
  line-height: 1.25; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.diff-btn-label { display: block; }
.diff-dots-legend { height: 5px; }
.diff-btn.is-on .diff-dot { background: #245e94; }
.diff-btn:hover { background: #e3c1b2; border-color: #d3ae9b; }
.diff-btn.is-on { border-color: #b87456; box-shadow: 0 0 0 1px #b87456 inset, 0 0 0 1px #b87456; color: #7a2f16; font-weight: 700; }

/* ---- 页脚（备案号） ---- */
.site-foot { margin-top: 28px; padding: 12px 0 2px; border-top: 1px solid var(--line);
  text-align: center; font-size: 12px; color: var(--ink-faint); }
.site-foot a { color: var(--ink-faint); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }

/* ---- 通用卡片 ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.page-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
/* 题库页顶部区域缩小三分之一（用户要求） */
/* 整行上移，落在顶部区域的垂直中间（上少下多） */
.page-head.compact { margin: -8px 0 12px; gap: 8px; }
.page-head.compact .page-title { margin-bottom: 0; }
.page-head.compact .btn { padding: 5px 11px; }
.page-sub { color: var(--ink-soft); margin-bottom: 20px; }
/* 返回按钮 + 主标题 + 副标题并排一行（节约版面，字号/颜色都不变） */
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 10px; }
.page-head .page-title, .page-head .page-sub { margin: 0; }

/* ---- 按钮（排课风格：胶囊圆角） ---- */.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; transition: .15s;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset;
}
.btn:hover { background: var(--bg-elevated); border-color: var(--accent); color: var(--accent); }
/* 比主题橙淡一档的实底按钮（加入作业） */
.btn-accent-soft { background: #d98667; border-color: #d98667; color: #fff; }
.btn-accent-soft:hover { background: #cf7756; border-color: #cf7756; color: #fff; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg-elevated); border-color: transparent; color: var(--ink); }
.btn-gray { background: #8a8783; border-color: #8a8783; color: #fff; }
.btn-gray:hover { background: #75716d; border-color: #75716d; color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #fdf0ee; color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- 表单 ---- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--ink-soft); }
/* 表单标题用灰色胶囊（与剑雅真题卡片的书名胶囊同一套视觉） */
.field label.field-pill { display: inline-block; background: #cfe3f7; color: #1f4a72;
  border-radius: 999px; padding: 6px 16px; font-size: 15px; font-weight: 800;
  letter-spacing: .3px; margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px #b9d6f2; }
.input, .textarea, select.input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink); outline: none;
}
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }

/* ---- 列表 ---- */
.grid { display: grid; gap: 14px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.test-card { padding: 18px; }
.test-card h3 { font-size: 16px; margin-bottom: 6px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; font-weight: 600; }
.tag-gray { background: #eeebe4; color: var(--ink-soft); }
.tag-green { background: #e4f2e8; color: var(--ok); }
.tag-red { background: #fbecea; color: var(--danger); }
.muted { color: var(--ink-soft); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt { margin-top: 14px; } .mt-0 { margin-top: 0; } .mt-lg { margin-top: 24px; }

/* ---- 空状态 ---- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty .empty-title { font-size: 17px; color: var(--ink); margin-bottom: 6px; }

/* ---- 表格 ---- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--ink-soft); font-weight: 600; background: var(--bg-elevated); }
.table tr:hover td { background: var(--bg-elevated); }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #1c1917; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(28,25,23,.28); }

/* ---- 模块导航 ---- */
.module-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.module-tabs a { padding: 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; }
.module-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- 登录 ---- */
/* ---- 登录页（laisijy.com 首屏） ---- */
.login-page { min-height: calc(100vh - 90px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 20px 16px; }
.login-card2 { width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 36px 34px 30px;
  box-shadow: 0 10px 30px rgba(28, 25, 23, .06); }
.login-brand2 { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
/* 登录页用完整版 logo（含底部 NICE Education 字样），不能用圆形裁切，否则底部文字被切掉 */
.login-logo { width: 96px; height: auto; display: block; }
.login-wordmark { height: 20px; width: auto; display: block; }
.login-title { font-size: 26px; font-weight: 800; text-align: center; margin: 0 0 6px;
  color: var(--ink); letter-spacing: .18em; }
.login-sub { text-align: center; font-size: 12px; color: var(--ink-faint); margin: 16px 0 0; }
.login-btn { width: 100%; justify-content: center; margin-top: 4px; padding: 11px 16px;
  font-size: 15px; letter-spacing: .18em; }
.login-hint { text-align: center; font-size: 12px; color: var(--ink-faint); margin: 4px 0 0; }

.login-wrap { display: flex; justify-content: center; padding: 8vh 16px; }
.login-card { width: 100%; max-width: 380px; padding: 32px 28px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 700; }

/* ---- 用户菜单 ---- */
/* 侧栏收窄到 132px 后，用户名可能超宽：单行省略，完整名字见 title 提示 */
.user-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; max-width: 100%; box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip-role { font-style: normal; font-size: 10px; color: var(--accent); background: var(--accent-soft); padding: 1px 5px; border-radius: 999px; font-weight: 500; flex: 0 0 auto; }

/* ---- 做题界面（官方机考风格） ---- */
.exam { display: flex; flex-direction: column; height: 100vh; margin: -22px -26px -60px; }
.exam-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); gap: 16px; flex-wrap: wrap; }
.exam-title { font-size: 15px; font-weight: 700; }
.exam-mod { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.exam-top-left { display: flex; align-items: center; flex-wrap: nowrap; gap: 12px; }
.exam-top-left .exam-title { white-space: nowrap; }
.exam-top-left .btn { margin-left: 8px; }
.exam-top-right { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; justify-content: flex-end; }
.exam-mode { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.exam-mode input { flex-shrink: 0; }
.exam-timer { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 84px; text-align: center; }
.exam-timer.warn { color: var(--danger); }
.exam-body { flex: 1; display: flex; overflow: hidden; }
/* 左右分栏拖拽分割线（阅读原文/题目、写作题面/作答） */
.split { width: 7px; flex-shrink: 0; cursor: col-resize; position: relative; z-index: 6; }
.split::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--line); transition: background .15s; }
.split:hover::after, .split.dragging::after { background: var(--accent); width: 3px; }
.exam-main { flex: 1; display: flex; flex-direction: column; padding: 14px 18px; overflow-y: auto; min-width: 0; }
.exam-audio { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px; }
/* 自定义音频条（替换原生 controls：喇叭/三点菜单） */
.audio-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.audio-play { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.audio-play:hover { background: var(--accent-hover); }
.audio-seek { flex: 1; min-width: 0; accent-color: var(--accent); cursor: pointer; }
.audio-time { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.audio-speed { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.audio-speed:hover { border-color: var(--accent); color: var(--accent); }
.audio-speed-wrap { position: relative; flex-shrink: 0; }
.audio-speed-menu { position: absolute; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 70px; z-index: 50; }
.audio-speed-menu[hidden] { display: none; }
.audio-speed-menu button { border: none; background: transparent; padding: 5px 10px; text-align: left; cursor: pointer; border-radius: 5px; font-size: 13px; color: var(--ink); }
.audio-speed-menu button:hover { background: var(--accent-soft); color: var(--accent); }

.exam-audio-parts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.exam-page { text-align: center; }
.exam-page-img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.exam-pagenav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; }
.exam-side { width: 300px; flex-shrink: 0; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.exam-side-title { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.exam-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.palette-tile { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }
.palette-tile.done { background: #d6e8f7; border-color: #9fc3e2; color: #1c4d78; }
.palette-tile.flagged { box-shadow: 0 0 0 2px #d3212c; }
.exam-answers { flex: 1; overflow-y: auto; padding: 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.answer-cell { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--bg-elevated); }
.answer-cell-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.answer-q { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.flag-btn { font-size: 10px; border: none; background: none; color: var(--ink-soft); cursor: pointer; padding: 2px 4px; }
.flag-btn.flagged { color: var(--warn); font-weight: 700; }
.answer-input { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; font-size: 14px; background: #fff; }
.answer-input.flagged-input { border-color: var(--warn); background: #fdf6e8; }
.exam-result { max-width: 860px; margin: 0 auto; }
.result-score { text-align: right; }
.result-raw { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.result-band { font-size: 20px; font-weight: 700; }

/* ---------- 官方机考对齐布局 v2 ---------- */
.exam-art { width: 42%; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--bg-elevated); overflow-y: auto; padding: 14px 16px; box-sizing: border-box; }
.exam-art-title { font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.artpage { margin-bottom: 14px; }
.artpage img { width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: block; }
.exam-ques { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.exam-ques-head { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; }
.exam-ques-head .exam-side-title { padding: 0 0 8px; border-bottom: none; }
.exam-ques-head .exam-palette { border-bottom: none; padding: 0; }
.exam-pages { flex: 1; overflow-y: auto; padding: 14px 18px; }
.qpage { margin-bottom: 18px; }
.qpage-head { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.qpage-imgwrap { position: relative; display: inline-block; max-width: 100%; }
.qpage-img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: block; }
.answer-input.overlay { position: absolute; width: 130px; height: 30px; font-size: 13px; padding: 0 8px; border: 1.5px solid var(--accent); border-radius: 6px; background: rgba(255,255,255,.96); box-sizing: border-box; }
.answer-input.overlay:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(201,100,66,.2); }
.flag-btn.overlay { position: absolute; width: 26px; height: 30px; font-size: 13px; line-height: 1; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink-soft); padding: 0; }
.flag-btn.overlay.flagged { color: var(--warn); border-color: var(--warn); }
.qpage-inputs { margin-top: 8px; }
.qpage-fallback-title { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.fallback-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin: 0 6px 6px 0; background: #fff; }
.fallback-item b { min-width: 20px; text-align: right; }
.fallback-item .answer-input { width: 130px; height: 28px; font-size: 13px; box-sizing: border-box; }
.qpage-answerlist { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
/* 写作左右分栏 */
.writing { display: flex; flex-direction: column; height: 100vh; margin: -22px -26px -60px; }
.writing-body { flex: 1; display: flex; overflow: hidden; }
.writing-left { width: 60%; flex-shrink: 0; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; display: flex; flex-direction: column; box-sizing: border-box; }
.writing-prompt { padding: 16px; flex: 1; }
.writing-instr { font-size: 15px; line-height: 1.9; white-space: normal; color: var(--ink); }
.writing-chart { margin-top: 14px; }
.writing-chart img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); display: block; }
.writing-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.writing-text { flex: 1; min-height: 240px; border: none; border-radius: 0; padding: 18px; font-size: 15px; line-height: 1.8; resize: none; background: #fff; }
.writing-text:focus { outline: none; }
.writing-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; }
#wTimer.warn { background: #d3212c; color: #fff; }
/* ---------- 文字层渲染（题目文字 + 嵌入作答横线） ---------- */
.tpage { margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.tpage-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }
.tpage-line { font-size: 15px; line-height: 1.9; margin: 3px 0; color: #2b2b2b; word-break: break-word; }
.tpage-line.t-head { font-weight: 700; margin-top: 12px; color: #1f1f1f; }
.tpage-line.t-instr { font-style: italic; color: #8a7f72; font-size: 13px; }
.qn { color: var(--accent); font-weight: 700; margin-right: 2px; }
.qinput { border: 1.5px solid #c9c1b4; border-radius: 4px; background: #fff; font-size: 15px; padding: 4px 8px; margin: 0 3px; text-align: center; box-sizing: border-box; color: #222; vertical-align: middle; transition: border-color .15s, box-shadow .15s; }
.qinput:focus { outline: none; border-color: var(--accent); background: #fff8f0; box-shadow: 0 0 0 2px rgba(201, 100, 66, 0.15); }
.art-cols { display: flex; gap: 16px; }
.art-col { flex: 1; min-width: 0; font-size: 14px; line-height: 1.75; color: #333; }
.art-col .tpage-line { font-size: 14px; }
.tp-origimg { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; box-shadow: var(--shadow); }
.exam-ques-foot { padding: 12px 16px; font-size: 13px; color: var(--ink-soft); }
.exam-art { width: 38%; }
.exam-ques { flex: 1; }

/* ===== 阅读 passage 版面（v38）：左文章单栏 / 右题目 / 单选点选 / 底部导航 ===== */
.artpage { margin-bottom: 2px; padding: 4px 2px 8px; border: none; box-shadow: none; background: transparent; }
.artpage-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.artpage-body { padding-right: 6px; }
.art-para { font-size: 14.5px; line-height: 1.9; margin: 0 0 26px; text-align: justify; color: #2b2b2b; }
.art-mark { font-weight: 800; font-size: 17px; color: var(--accent); margin: 10px 0 6px; border-bottom: 1px dashed #e8dfd2; padding-bottom: 2px; }
/* 篇章小节标题（"Section A"…"Section F"，剑7 t2 阅读 Passage 3 的版式）：
   官方是加粗、独立成行的小标题；不这样做会并进正文，段落字母与正文连成一句。 */
.art-sec { font-weight: 700; font-size: 15px; color: #33302c; margin: 18px 0 4px; }
/* [SUB:xxx] 显式小节标题（剑6 t3 P2 的 THE CHALLENGE / KEY POINT ONE）：与 art-sec 同款 */
.art-section { font-weight: 700; font-size: 15px; color: #33302c; margin: 18px 0 4px; }
/* [SUBTITLE:xxx] 显式斜体副标题（剑6 t3 P3 的 'In government laboratories...'） */
.art-subtitle { font-style: italic; color: #6f675c; text-align: center; margin: 6px 18px 10px; }
/* List of Headings 页的例题框（Example / Answer 两栏，官方是实线方框）：
   只作示例展示，不参与作答（没有 data-q，不会被判分）。 */
.exam-ex { border: 1px solid #d9cdbb; border-radius: 4px; padding: 7px 14px; margin: 8px 0 14px; max-width: 460px; background: #fdfbf7; }
.exam-ex-row { display: flex; gap: 18px; font-size: 13.5px; line-height: 1.7; }
.exam-ex-row > span { flex: 1 1 0; }
.exam-ex-head { font-style: italic; color: #6b6257; }
.exam-ex-ans { font-weight: 700; color: #33302c; }
/* heading 题：选项池 + 拖拽/输入槽 */
.hd-opts { background: #faf7f2; border: 1px solid #efe8dd; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hd-opt { background: #fff; border: 1px solid #e5dccf; border-radius: 8px; padding: 6px 9px; font-size: 13px; cursor: grab; user-select: none; display: flex; gap: 6px; align-items: baseline; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.hd-opt:active { cursor: grabbing; }
.hd-opt b { color: var(--accent); font-weight: 800; min-width: 20px; }
.hd-opt.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,100,66,.25); }
.hd-line { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14.5px; font-weight: 600; }
.hd-line .qinput { width: 92px; font-weight: 600; text-align: center; border: 1.5px solid #d8cfc2; border-radius: 8px; padding: 5px 8px; font-size: 14px; }
.hd-line .qinput.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,100,66,.25); }
.exam-art .tp-origimg { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; box-shadow: var(--shadow); }
.qstem { font-weight: 600; }
.note-h { font-weight: 700; }
.qradio { display: block; margin: 5px 0 5px 6px; cursor: pointer; font-size: 15px; color: #2b2b2b; line-height: 1.55; }
.qradio input { margin-right: 8px; accent-color: var(--accent); width: 15px; height: 15px; vertical-align: -2px; cursor: pointer; }
.qradio:hover span { color: var(--accent); }
.qradio-group { margin: 4px 0 10px; padding: 8px 12px; background: #faf7f2; border: 1px solid #efe8dd; border-radius: 8px; }
/* 多选点选：题号槽 + checkbox 选项组（官方机考版式） */
.qmc-slots { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.qmc-slot { width: 44px; text-align: center; font-weight: 700; color: var(--accent); background: #fff7ed; border: 1.5px solid #f0d3ae; border-radius: 8px; }
.qmc-group { margin: 6px 0 12px; padding: 10px 12px; background: #faf7f2; border: 1px solid #efe8dd; border-radius: 8px; }
.qmc-opt { display: flex; align-items: baseline; gap: 7px; margin: 4px 0; cursor: pointer; font-size: 15px; color: #2b2b2b; line-height: 1.5; }
.qmc-opt input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.qmc-opt b { color: var(--accent); font-weight: 800; min-width: 16px; }
.qmc-opt:hover span { color: var(--accent); }
.qmc-opt.off { opacity: .45; }
.read-nav { background: #fff; border-top: 1px solid var(--line); padding: 8px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.read-nav-p { display: flex; gap: 4px; }
.read-nav-p button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-weight: 600; color: var(--ink-soft); transition: all .15s; }
.read-nav-p button:hover { border-color: var(--accent); color: var(--accent); }
.read-nav-p button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.read-nav-q { display: flex; gap: 3px; flex-wrap: wrap; max-height: 60px; overflow-y: auto; }
.read-nav-tile { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 12px; cursor: pointer; color: var(--ink-soft); padding: 0; transition: all .15s; }
.read-nav-tile:hover { border-color: var(--accent); color: var(--accent); }
.read-nav-tile.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.read-nav-tile.done { background: #d6e8f7; border-color: #9fc3e2; color: #1c4d78; }

/* ===== 题目标记旗（机考风格：悬停显示白旗，点击变红旗，题号同步标记） ===== */
.tpage-line { position: relative; }
.qflag { visibility: hidden; background: none; border: 0; padding: 0; margin: 0 0 0 8px; cursor: pointer; line-height: 0; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); }
.qflag svg { display: block; }
.qflag svg path { fill: #fff; stroke: #b9b2a6; stroke-width: 1.4; stroke-linejoin: round; transition: fill .12s, stroke .12s; }
.qflag:hover svg path { stroke: #8a847c; }
.qflag.on { visibility: visible; }
.qflag.on svg path { fill: #d3212c; stroke: #d3212c; }
/* 笔记/表格题：图标不贴行尾，而是紧跟在作答框右边（悬停整行可见） */
.tpage-line > .qflag.qflag-inline, td > .qflag.qflag-inline {
  position: static; transform: none; margin: 0 0 0 6px; vertical-align: middle;
}
.tpage-line > .qflag, td > .qflag { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
td:has(> .qflag) { position: relative; }
.tpage-line:hover > .qflag, td:hover > .qflag, .answer-cell:hover .qflag { visibility: visible; }
.answer-cell-head .qflag { position: static; }
.palette-tile, .read-nav-tile { position: relative; }
/* 已标记：题号上方（隔开一点）一个红色实心圆点 */
.palette-tile.flagged::after, .read-nav-tile.flagged::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  top: -6px; width: 7px; height: 7px; border-radius: 50%;
  background: #d3212c; box-shadow: 0 0 0 1.5px #fff; pointer-events: none;
}

/* ===== 听力笔记题官方版式（Complete the notes：居中标题 + 外框 + 标签列对齐） ===== */
.t-title { text-align: center; font-weight: 700; font-size: 16px; margin: 12px 0 10px; color: #1f1f1f; }
.note-box {
  border: 1px solid #b9b2a6; border-radius: 4px; background: #fff;
  padding: 12px 16px; margin: 6px 0 14px;
  display: grid; grid-template-columns: max-content 1fr;
  column-gap: 16px; row-gap: 4px; align-items: baseline;
}
.note-box .tpage-line { margin: 0; }
.note-label { font-weight: 700; white-space: nowrap; }
.note-content { min-width: 0; }
.note-span { grid-column: 1 / -1; }
.note-bullet { padding-left: 20px; text-indent: -13px; }
.note-dash { padding-left: 40px; text-indent: -13px; }  /* 短横线子项：短横线悬挂，文字比圆点项更深 */
.note-cont { padding-left: 20px; }   /* 笔记圆点项的续行：与圆点后文字对齐（不悬挂） */
.note-sub { font-weight: 700; margin: 10px 0 2px; }   /* 笔记盒内小节标题（[SUB:xxx]） */
.note-exlabel { color: var(--ink-soft); font-size: 13px; }

/* ===== 表格填空题（Complete the table） ===== */
.qtable-wrap { margin: 10px 0; overflow-x: auto; }
.qtable { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.qtable th, .qtable td { border: 1px solid #c9c2b4; padding: 8px 10px; vertical-align: top; text-align: left; line-height: 1.5; }
.qtable th { background: #f5f0e6; font-weight: 700; font-size: 14px; }
.qtable td { min-width: 100px; }
.qtable td .qcell { white-space: normal; }
.qtable td .qinput { width: 90px; margin: 0 4px; }
.hd-title { font-weight: bold; font-size: 16px; margin: 0 0 10px; color: #333; text-align: center; }

/* ===== 流程图填空题（Complete the flowchart） ===== */
.flow-box { border: 1.5px solid #c9c2b4; border-radius: 8px; padding: 10px 14px; margin: 0 auto; max-width: 520px; background: #fff; line-height: 1.6; }
.flow-arrow { text-align: center; font-size: 20px; color: var(--ink-soft); margin: 4px 0; line-height: 1; }

.tpage-line:has(.example-answer) { margin-top: 12px; }

.tpage-line { margin-top: 4px; }

.art-intro { font-style: italic; color: #8a7f72; }

.art-fn { font-size: 11px; color: #8a7f72; margin-top: 16px; }

.art-title { text-align: center; font-weight: bold; margin: 10px 0; }

.pmatch-table { width:100%; border-collapse:collapse; margin:8px 0; } .pmatch-table td { border:1px solid #ccc; padding:8px; } .pmatch-opt { cursor:pointer; } .pmatch-opt input { margin:0; }

.comp-input { display:inline-block; width:120px; border:none; border-bottom:1px solid #333; background:transparent; padding:2px; }

.hd-input { display:inline-block; min-width:140px; padding:4px 8px; border:1px solid #999; border-radius:3px; background:#fafafa; width:auto; }

/* 听力地图题：地图图块级全宽，卡片高度随图自然撑开，不溢出卡片底边 */
.map-img { display: block; width: 100%; max-width: 640px; margin: 4px 0 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.map-img + .tpage-line, .map-img ~ .tpage-line { overflow: hidden; }

/* 地图题：地图在左、作答矩阵在右（窄屏自动改为上下）
   align-items:start —— 图片顶部对齐，避免垂直居中时高图下缘被容器裁掉
   （剑9 t2 p27 地图底部 Refreshments/入口曾看不到）；gap 收紧让矩阵贴近地图。 */
.map-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr); gap: 4px;
  align-items: start; margin: 6px 0 14px; }
.map-split-left { min-width: 0; display: flex; justify-content: flex-end; }
.map-split-left .tpage-line { margin: 0; }
.map-split-left .map-img { margin: 0 0 6px; width: 100%; height: auto; max-width: 100%; }
.map-split-right { min-width: 0; }
@media (max-width: 860px) {
  .map-split { grid-template-columns: 1fr; align-items: start; gap: 6px; justify-items: center; padding-left: 0; }
  .map-split-left { justify-content: center; }
}

/* 地图题作答矩阵：行 = 地点（15 Scarecrow…），列 = 地图上的字母（A-I）
   与官方答题卡一致：每行每题只在对应字母列点一个单选 */
.map-ans-wrap { margin: 0; overflow-x: auto; }
.map-ans { border-collapse: collapse; background: #fff; font-size: 14px; }
.map-ans th, .map-ans td { border: 1px solid var(--line); padding: 7px 10px; text-align: center; }
.map-ans thead th { background: var(--bg-elevated); font-weight: 600; min-width: 34px; }
.map-ans .map-ans-corner { background: #fff; border-left: 0; border-top: 0; min-width: 190px; }
.map-ans .map-ans-name { text-align: left; white-space: nowrap; font-weight: 500; min-width: 190px; }
.map-ans .map-ans-name .qn { color: var(--accent); margin-right: 4px; }
.map-ans td input[type="radio"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.map-ans tbody tr:hover { background: #fdfaf6; }

/* flowchart 与选项池/作答矩阵的分栏
   · 有矩阵：三栏（流程｜选项｜矩阵）
   · 无矩阵：两栏（流程在左、选项池在右）
   两种情况都用 align-items:center，让右栏相对左侧流程框**垂直居中**（用户要求）。 */
.fc-split { display: flex; gap: 4px; align-items: center; margin: 6px 0 16px; }
/* 左栏按流程框实际宽度固定（.flow-box 最大 520px）：
   若用 flex:1 撑满整行，框会被 margin:auto 居中在超宽栏里，两侧留白，
   选项池被顶到最右边 —— 这就是"gap 改到 4px 仍然觉得远"的原因。 */
.fc-left { flex: 0 0 520px; max-width: 100%; min-width: 0; }
.fc-left .flow-box { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }
.fc-mid { flex: 0 0 150px; min-width: 0; }
.fc-right { flex: 0 0 auto; min-width: 0; }
.fc-mid .hd-opts, .fc-right .hd-opts { margin: 0; }
.fc-matrix { margin: 0; }
.fc-matrix .map-ans th, .fc-matrix .map-ans td { padding: 6px 9px; }
.fc-matrix .map-ans .map-ans-corner,
.fc-matrix .map-ans .map-ans-name { min-width: 0; }
.flow-title { text-align: center; font-weight: 700; margin: 10px 0 8px; }
@media (max-width: 1100px) {
  .fc-split { flex-direction: column; align-items: stretch; }
  .fc-mid, .fc-right { flex: 0 0 auto; width: 100%; }
}

/* 匹配/选词题：题目在左、选项池在右（左右结构）
   用户要求：① 题目区**靠左对齐**（整块不再居中）
             ② 池贴近题目区（只留小间距，不被推到最右）
             ③ 池加宽让每个选项尽量一行显示完整
             ④ 池与题目区垂直中线对齐
   → flex + justify-content:flex-start：题目区从左边起排，池紧随其后；
     池固定宽 420px（上限 45vw）。窄屏自动上下。 */
.qpool-split { display: flex; justify-content: flex-start; align-items: center; gap: 16px; }
/* 同页多题组：选项池顶部对齐（否则垂直居中会落到最后一组旁边） */
.qpool-split.qpool-top { align-items: flex-start; }
/* 多题组页面再往上提一点：与题干列的标题行（如 'Footwear'）齐平 */
.qpool-split.qpool-top .qpool-right { margin-top: -22px; }
.qpool-left { flex: 0 1 auto; min-width: 0; }
.qpool-right { flex: 0 0 420px; max-width: 45vw; min-width: 0; }
.qpool-right .hd-opts { margin: 0; }
@media (max-width: 1100px) {
  .qpool-split { flex-direction: column; align-items: stretch; gap: 12px; }
  .qpool-right { flex: 0 0 auto; max-width: 100%; }
}

.hd-input { min-width:140px; max-width:100%; box-sizing:border-box; white-space:nowrap; }
.hd-input::placeholder { color:#999; font-weight:normal; }
.hd-opts.drag-over { border-color: var(--accent); background:#fff6ee; }
.hd-input.drag-src { opacity:.5; }

.summary-title { text-align:center; font-weight:bold; margin:10px 0; }

/* ===== fallback answer strip (questions not covered by text render / image mode) ===== */
.exam-answers.inline { flex: none; overflow: visible; padding: 0; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.exam-answers-title { grid-column: 1 / -1; font-weight: 700; font-size: 13px; color: var(--ink-soft); margin: 8px 0 2px; }

/* ===== 剑雅阅读：按题型 / 按场景 标签卡片（图标 + 名称 + 下部计数） ===== */
.lib-tag { position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 5px; padding: 6px 14px; text-align: center; border-radius: 999px; border: 1px solid #dcdce0; background: #f1f2f4; color: var(--ink); transition: background .15s, border-color .15s; }
.lib-tag:hover { background: #e6e6e8; border-color: #c9c9cd; }
.lib-tag-icon { font-size: 15px; line-height: 1; }
.lib-tag-label { font-weight: 700; color: #000; font-size: 13px; }
.lib-tag-count { font-size: 10px; font-weight: 400; color: var(--ink-faint, #999); }

/* ===== 剑雅阅读：按套筛选的书标签（橙色实心白字） ===== */
.lib-book, .lib-book:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lib-book .lib-tag-label, .lib-book:hover .lib-tag-label { color: #fff; }

/* ===== 专项页筛选区块标题：天蓝色胶囊 ===== */
.lib-filter { display: inline-block; padding: 5px 16px; margin: 0 0 12px; border-radius: 999px; background: #e0f1ff; color: #1269c7; font-size: 14px; font-weight: 700; line-height: 1.4; border: 1px solid #bcdcf5; }

/* ===== 按套筛选：一本书 + 它的 Test 1-4 直达入口 =====
   配色：统一到主题橙的暖色系——书名用暖灰浅底（低饱和、不抢眼），
   Test 用白底 + 橙描边 + 橙字，hover 才填实心橙（橙色只做描边，不占面积）。 */
.lib-book-block { display: inline-flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 9px 10px 10px; border: 1px solid #f0e8e3; border-radius: 12px; background: #fffdfc; }
.lib-book-name, .lib-book-name:hover { background: var(--accent-soft); color: #a8482a; border-color: #ecd3c6; cursor: default; font-weight: 700; }
.lib-book-name .lib-tag-label, .lib-book-name:hover .lib-tag-label { color: #a8482a; font-weight: 700; }
/* 写作页的两行标签：T 前缀 11px、Task 文案 9px，保证 4 个 / 行放得下 */
.lib-test-tag.lib-test-tag-w { flex-direction: row; gap: 0; font-size: 11px; padding: 4px 2px; letter-spacing: -.2px; }
.lib-test-tag.lib-test-tag-w .wt-label { font-size: 9px; }
/* Task 1 那一行灰底更深一档（Task 2 保持原灰） */
.lib-test-tag.lib-test-tag-w1 { background: #d5d6dc; border-color: #c2c3ca; }
.lib-test-tag.lib-test-tag-w1:hover { background: #cbccd2; border-color: #b5b6be; }
.lib-test-tag.lib-test-tag-p { font-size: 11px; padding: 4px 2px; letter-spacing: -.2px; }
.lib-book-tests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.lib-test-tag { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 5px 4px; border-radius: 8px; border: 1px solid #dcdce0; background: #f1f2f4; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.lib-test-tag:hover { background: #e6e6e8; border-color: #c9c9cd; color: var(--ink); }

/* ===== 题型/场景 详情页：紧凑题组卡片（书标题加粗加色，字号小） ===== */
.lib-qk { padding: 10px 12px !important; }
.lib-qk-book { font-weight: 700; color: var(--accent); font-size: 13px; line-height: 1.3; }
.lib-qk-test { font-weight: 600; color: var(--ink); font-size: 12px; line-height: 1.4; }

/* ===== 表格里的操作按钮：一排灰色小胶囊（作业列表 查看/导出PDF/删除） ===== */
.act-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.act-pill { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px;
  border-radius: 999px; border: 1px solid #dcdce0; background: #f1f2f4; color: var(--ink);
  font-size: 12px; font-weight: 600; line-height: 1.25; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s; }
.act-pill:hover { background: #e6e6e8; border-color: #c9c9cd; }
.act-pill:active { background: #dcdce0; }

/* ===== 最后一级菜单（按题型/场景/主题/图类）的条目：第一行橙色胶囊，后两行浅灰文字 ===== */
.lib-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 5px 9px; border: 1px solid #e6e6e9; border-radius: 12px; background: #fff;
  text-decoration: none; text-align: center; transition: border-color .15s, box-shadow .15s; }
.lib-chip:hover { border-color: #d8d8dd; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.lib-chip-book { display: inline-flex; align-items: center; justify-content: center; padding: 4px 11px;
  border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
  line-height: 1.2; transition: background .15s; }
.lib-chip:hover .lib-chip-book { background: var(--accent-hover); }
.lib-chip-test { font-weight: 600; font-size: 12px; line-height: 1.25; color: var(--ink-soft); }
.lib-chip-meta { font-size: 11px; line-height: 1.25; color: var(--ink-faint); }

/* ===== 最后一级菜单按难度分块（入门 → 基础 → 进阶 → 挑战） =====
   每块一个彩色难度标签 + 计数，下面复用 .lib-chip 卡片网格。 */
.diff-block { margin-bottom: 26px; }
.diff-block:last-child { margin-bottom: 0; }
.diff-block-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line); }
/* 难度块标签：沿用 .lib-filter 的浅蓝系配色，四档统一颜色避免撞色 */
.diff-block-label { display: inline-flex; align-items: center; gap: 7px; padding: 4px 15px;
  border-radius: 999px; background: #c8e2fb; color: #0d5aa8; border: 1px solid #a4cdf3;
  font-size: 14px; font-weight: 700; line-height: 1.45; }
.diff-block-count { font-size: 12px; color: var(--ink-faint); }
.diff-block-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

/* 剑雅真题卡片：每行 5 张卡；胶囊按钮（书名灰 / Test 橙 / 模块浅蓝） */
.grid.suite-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1500px) { .grid.suite-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .grid.suite-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 880px)  { .grid.suite-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .grid.suite-cards { grid-template-columns: 1fr; } }

.suite-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
/* 5 列布局下卡片较窄：内边距收紧，给胶囊留出宽度 */
.grid.suite-cards .test-card { padding: 12px; }
.grid.suite-cards { gap: 10px; }
.suite-pill { display: block; text-align: center; padding: 8px 6px; border-radius: 999px;
  font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: filter .15s, transform .1s; }
.suite-pill:hover { filter: brightness(0.94); }
.suite-pill:active { transform: scale(0.98); }
.suite-pill.suite-title { background: #d9d9d9; color: #2f2f2f; font-weight: 700; font-size: 14px; padding: 9px 10px; }
.suite-pill.suite-test  { background: #bf5f37; color: #fff; font-weight: 700; }
.suite-pill.suite-mod   { background: #cfe3f7; color: #1f4a72;
  font-size: 12px; padding: 8px 2px; letter-spacing: -0.2px; }   /* 小一号，保证 "Listening" 不被截断 */

/* ---------- 截止日期：自定义日历弹层（月份旁带「确定」） ---------- */
.dp-wrap { position: relative; }
.dp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  width: 268px; padding: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); }
.dp-head { display: flex; align-items: center; gap: 6px; }
.dp-nav { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; line-height: 1; font-size: 15px; color: var(--ink-soft); }
.dp-nav:hover { border-color: var(--accent); color: var(--accent); }
.dp-title { flex: 1; text-align: center; font-size: 13px; font-weight: 700; }
.dp-ok { border: 0; border-radius: 999px; padding: 5px 14px; background: var(--accent);
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.dp-ok:hover { filter: brightness(0.94); }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 8px; }
.dp-week span { text-align: center; font-size: 11px; color: var(--ink-soft); }
.dp-day { text-align: center; padding: 6px 0; border-radius: 8px; font-size: 12px; cursor: pointer; }
.dp-day:hover { background: #f2f2f2; }
.dp-day.today { color: var(--accent); font-weight: 700; }
.dp-day.on { background: var(--accent); color: #fff; font-weight: 700; }
.dp-day.empty { visibility: hidden; cursor: default; }
.dp-time { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.dp-time select { width: 80px; }
.dp-foot { margin-top: 8px; text-align: right; }

/* ---------- 试卷回放（原文 / 题目 / 学生作答） ---------- */
.pa-doc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.pa-page + .pa-page { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pa-head { font-weight: 700; font-size: 14px; margin: 14px 0 8px; color: #1f4a72; }
.pa-line { font-size: 14px; line-height: 1.9; color: #222; }
.pa-q { display: inline-block; min-width: 18px; padding: 0 4px; margin: 0 2px;
  background: #eef3fa; color: #1f4a72; border-radius: 4px; font-size: 12px; font-weight: 700; }
.pa-a { display: inline-block; min-width: 40px; padding: 0 8px; margin: 0 2px;
  border-bottom: 2px solid #bbb; font-weight: 700; }
.pa-a.pa-ok { color: #137333; border-bottom-color: #137333; }
.pa-a.pa-bad { color: #c5221f; border-bottom-color: #c5221f; }
.pa-a.pa-none { color: #8a8a8a; border-bottom-color: #ddd; font-weight: 400; }

/* ---------- 试卷回放：作答标色（正确绿 / 错误红 / 未作答灰） ---------- */
input.rv-ok, label.rv-ok { background: #e6f4ea !important; border-color: #137333 !important; color: #137333 !important; }
input.rv-bad, label.rv-bad { background: #fce8e6 !important; border-color: #c5221f !important; color: #c5221f !important; }
input.rv-none, label.rv-none { background: #f3f3f3 !important; }
label.rv-ok span, label.rv-bad span { font-weight: 700; }

/* ---------- 打印 / 另存为 PDF：只留试卷本体 ---------- */
@media print {
  .sidebar, .topbar, .read-nav, .exam-top, .exam-audio, .split { display: none !important; }
  .exam, .exam-body, .exam-main, .exam-ques { height: auto !important; overflow: visible !important; }
  .exam-pages, .exam-art { overflow: visible !important; height: auto !important; max-height: none !important; }
  .artpage, .tpage { display: block !important; break-inside: avoid; page-break-inside: avoid; }
  body, html { background: #fff !important; }
  .btn { display: none !important; }
}

/* 图片 + 定位作答框（Complete the diagram：整图截图，作答框按百分比覆盖在图上） */
/* 左列作答 + 右侧整图（Complete the diagram） */
.ovl-wrap { display: flex; align-items: center; gap: 18px; margin: 8px 0 4px; }
.ovl-side { flex: 0 0 170px; display: flex; flex-direction: column; gap: 34px; padding-left: 4px; }
.ovl-line { display: flex; align-items: center; gap: 8px; }
.ovl-line .qn { color: var(--accent); min-width: 22px; }
.ovl-img { flex: 1 1 40%; min-width: 170px; }
.ovl-img > img { width: 100%; max-width: 100%; height: auto; display: block; }


/* ===== 听力原文：与题号同一行的入口 + 整页阅读 ===== */
.script-toggle { margin-left: 16px; margin-right: 0; white-space: nowrap;
  border-radius: 999px; background: #f2f1ee; border: 1px solid var(--line);
  color: var(--ink-soft); padding: 5px 14px; font-size: 13px; }
.script-toggle:hover { background: #e9e7e2; color: var(--ink); }
.script-page { position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; }
/* hidden 属性必须真的隐藏：author 的 display:flex 会覆盖 UA 的 [hidden]{display:none} */
.script-page[hidden] { display: none !important; }
.script-page-head { display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); background: var(--surface); }
.script-page-title { font-weight: 700; color: var(--ink); }
.script-page-body { flex: 1; overflow: auto; width: 100%; max-width: 960px; margin: 0 auto;
  padding: 22px 24px 60px; white-space: pre-wrap; font-size: 15px; line-height: 1.85;
  color: var(--ink-soft); }
