/* =====================================================================
   大数据平台部署与运维 · 指令闯关
   极简主题：无卡片、无边框，靠留白、字号与一条细线分层。
   答题区上下左右居中，命令按原文顺序内联填空；排行榜收在右上角浮动小框里。
   字体：拉丁走系统 UI 字体（SF Pro / Segoe UI Variable / Inter），中文走
        苹方 / 鸿蒙 / 微软雅黑，标题用负字距 + 紧行高，追求清晰、克制、耐看。
   ===================================================================== */

:root {
  /* 文字层级 */
  --ink: #1d1d1f;
  --ink-2: #3a3a3d;
  --muted: #6e6e73;
  --faint: #96969d;
  --line: #e6e6ea;
  --line-2: #f1f1f4;
  --soft: #f5f5f7;

  /* 语义色 */
  --blue: #0071e3;
  --green: #17a05a;
  --red: #e0453f;
  --violet: #6e4ff6;

  /* 渐变（首页数字、结算评级） */
  --grad: linear-gradient(120deg, #f3efff 0%, #e8f3ff 38%, #e7f8ef 70%, #fff5e8 100%);

  /* 字体栈：拉丁在前，中文在后 */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display",
    "Segoe UI", Inter, "Helvetica Neue", Arial, "PingFang SC", "HarmonyOS Sans SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", "Cascadia Mono", monospace;

  --bar: 64px;
}

* { box-sizing: border-box; }

/* 类里的 display 会盖掉浏览器默认的 [hidden]，统一兜底 */
[hidden] { display: none !important; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, dt, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

kbd {
  font-family: var(--sans);
  font-size: .78em;
  color: var(--muted);
  background: var(--soft);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: .01em;
}

/* ------------------------------------------------------------ 顶栏 */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  height: var(--bar);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 max(3.2vw, 22px);
  background: rgba(255, 255, 255, .76);
  backdrop-filter: saturate(180%) blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--grad);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07);
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--soft);
  border-radius: 11px;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 9px;
  padding: 7px 17px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.segmented button .tick { color: var(--green); margin-left: 6px; font-size: 12px; }
.segmented.tiny button { padding: 6px 14px; font-size: 14px; }

.topright { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.who { display: flex; align-items: center; gap: 12px; }
.who-name {
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plain {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 450;
  padding: 5px 2px;
  transition: color .18s;
}
.plain:hover { color: var(--ink); }
.plain.strong { color: var(--ink); font-weight: 550; }
.plain:disabled { opacity: .38; cursor: not-allowed; }
.plain kbd { margin-right: 3px; }

/* ------------------------------------------------------------ 右上角浮动小框 */

.corner {
  position: fixed;
  top: calc(var(--bar) + 22px);
  right: max(3.2vw, 22px);
  z-index: 20;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 13.5px;
}
.corner h2 {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .09em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.corner .live {
  color: var(--green);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 550;
  margin-left: 6px;
}
.corner .live::before { content: "●"; font-size: 7px; vertical-align: 2px; margin-right: 4px; }

.board li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: baseline;
  gap: 9px;
  padding: 6px 0;
  font-size: 14px;
}
.board li + li { border-top: 1px solid var(--line-2); }
.board .no { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.board .nm { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .nm small { color: var(--faint); font-size: 11.5px; margin-left: 6px; }
.board .vl { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.board li.me .nm { color: var(--ink); font-weight: 600; }
.board li.me .no { color: var(--blue); font-weight: 650; }
/* 空状态是整行文字，不能套三列网格，否则会被挤成竖排 */
.board li.empty { display: block; padding: 5px 0; color: var(--faint); }
.board li.empty + li { border-top: 0; }

.corner-foot { color: var(--faint); font-size: 12.5px; margin-top: 10px; }

.corner-mine .mine { display: flex; flex-direction: column; gap: 9px; }
.corner-mine .mine > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.corner-mine dt { color: var(--muted); font-size: 13px; }
.corner-mine dd { color: var(--ink); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ 主区（居中） */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--bar) + 32px) max(3.2vw, 22px) 32px;
}

.screen { width: 100%; }
.center { display: flex; flex-direction: column; align-items: center; }

/* ------------------------------------------------------------ 首页 */

.landing { max-width: 700px; padding: 0 8px; }

.landing h1,
.intro h1,
.result h1 {
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1.14;
  letter-spacing: -.038em;
  font-weight: 650;
  text-align: center;
}
.landing h1 { margin-bottom: 22px; }

.sub {
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.65;
  letter-spacing: -.005em;
  text-align: center;
  max-width: 42ch;
  margin: 0 auto;
}

.landing .btn-fill { margin-top: 32px; }

.facts {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.facts div { text-align: center; }
.facts dt {
  font-size: clamp(26px, 2.9vw, 36px);
  font-weight: 660;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.facts dd {
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 9px;
}

/* ------------------------------------------------------------ 开始一关 */

.intro { max-width: 760px; }

.eyebrow {
  font-size: 18px;
  font-weight: 650;
  color: var(--blue);
  letter-spacing: .01em;
  margin-bottom: 18px;
  text-align: center;
}
.intro h1 { margin-bottom: 22px; }
.intro .btn-fill { margin-top: 38px; }
.intro-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 30px;
  margin-top: 28px;
  font-size: 19px;
  color: var(--ink-2);
}
.intro-meta li::before { content: "· "; color: var(--faint); }
.fineprint {
  font-size: 16px;
  color: var(--faint);
  margin-top: 20px;
  text-align: center;
}

/* ------------------------------------------------------------ 答题 */

.quiz { text-align: center; }

.counter {
  font-size: 15.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  margin-bottom: clamp(30px, 6vh, 64px);
}
.counter b { color: var(--ink); font-weight: 650; font-size: 18px; }
.counter .of { margin-left: 4px; }

/* 中文要求：一句话，居中，字号比正文大一档 */
.ask {
  font-size: clamp(26px, 3.3vw, 42px);
  font-weight: 650;
  line-height: 1.36;
  letter-spacing: -.028em;
  text-align: center;
  max-width: 22ch;
  margin: 0 auto clamp(30px, 6vh, 62px);
}

/* 命令片段与填空按模板顺序排列，标点两侧不额外添加空格。 */
.cmd {
  width: min(1100px, 100%);
  margin: 0 auto;
  font-family: var(--mono);
  font-size: clamp(24px, 3.1vw, 44px);
  line-height: 1.65;
  letter-spacing: -.018em;
  text-align: center;
}
.cmd-text:empty { display: none; }
.blanks {
  display: block;
  width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.seg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.blank-field {
  display: inline-block;
  vertical-align: baseline;
  min-width: 3ch;
  max-width: 100%;
}

.blank-field input {
  width: 100%;
  min-width: 3ch;
  max-width: 100%;
  border: 0;
  border-bottom: 3px solid #cdcdd4;
  background: transparent;
  border-radius: 0;
  outline: none;
  text-align: center;
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 500;
  line-height: 1.12;
  padding: 0 8px 6px;
  color: var(--ink);
  transition: border-color .18s, color .18s;
  caret-color: var(--blue);
}
.blank-field input::placeholder { color: #c7c7ce; font-weight: 400; }
.blank-field.active input { border-bottom-color: var(--ink); }
.blank-field.ok input { border-bottom-color: var(--green); color: var(--green); }
.blank-field.bad input { border-bottom-color: var(--red); color: var(--red); }
.blank-field.bad { animation: shake .34s cubic-bezier(.36, .07, .19, .97); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-7px); }
  46% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
}

.quiz.solved .cmd { animation: pop .5s cubic-bezier(.2, .8, .25, 1); }
@keyframes pop { 38% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* ------------------------------------------------------------ 反馈 */

.feedback {
  margin: clamp(34px, 6vh, 62px) auto 0;
  max-width: 720px;
  animation: rise .26s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.fb-verdict { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.feedback.good .fb-verdict { color: var(--green); }
.feedback.bad .fb-verdict { color: var(--red); }

.fb-answer {
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 16px 0 14px;
  overflow-x: auto;
  white-space: pre;
}

.fb-explain {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-2);
  text-align: left;
}

.feedback .btn-fill { margin-top: 26px; }

/* ------------------------------------------------------------ 操作行 */

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: clamp(36px, 7vh, 76px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  width: min(720px, 100%);
}

/* ------------------------------------------------------------ 结算 */

.grade {
  font-size: clamp(56px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}
.result { max-width: 780px; }
.result h1 { font-size: clamp(30px, 3.6vw, 46px); }
.result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  margin: 38px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.result-stats div { text-align: center; }
.result-stats dt {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 660;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.result-stats dd { font-size: 14px; color: var(--muted); margin-top: 7px; }

.result-wrong { margin-top: 48px; width: 100%; text-align: left; }
.result-wrong h3 { font-size: 15px; font-weight: 650; margin-bottom: 16px; letter-spacing: -.01em; }
.wrong-item { padding: 18px 0; border-top: 1px solid var(--line); }
.wrong-item b { font-size: 16px; }
.wrong-item code {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--green);
  margin: 10px 0 8px;
}
.wrong-item p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.result-actions { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 46px; }

/* ------------------------------------------------------------ 按钮 */

.btn-fill {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 18px 42px;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -.01em;
  transition: transform .18s, background .18s, opacity .18s;
}
.btn-fill:hover { background: #000; transform: translateY(-1px); }
.btn-fill:active { transform: none; }
.btn-fill:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------ 弹层 */

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 22, .34);
  backdrop-filter: blur(9px);
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: relative;
  width: min(460px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 40px 38px 32px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .2);
  animation: rise .22s cubic-bezier(.2, .8, .25, 1);
  text-align: left;
}
.sheet-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
}
.sheet-close:hover { background: var(--soft); color: var(--ink); }
.sheet h2 { font-size: 27px; font-weight: 650; letter-spacing: -.03em; }
.sheet-sub { font-size: 15px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.sheet .segmented { margin: 26px 0 24px; width: 100%; }
.sheet .segmented button { flex: 1; }
.sheet .btn-fill { width: 100%; margin-top: 8px; }

.form label { display: block; margin-bottom: 18px; }
.form label > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.form input {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  font-size: 17px;
  outline: none;
  transition: border-color .18s;
}
.form input:focus { border-bottom-color: var(--ink); }
.form-error { color: var(--red); font-size: 14px; margin: 6px 0 12px; }

.help-list { counter-reset: step; margin: 24px 0 10px; }
.help-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.help-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  display: grid;
  place-items: center;
}
.sheet h3 {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--faint);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 28px 0 12px;
}
.keys { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: var(--ink-2); }
.red { color: var(--red); font-weight: 600; }
.green { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------ 提示条 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  z-index: 80;
  background: rgba(29, 29, 31, .93);
  color: #fff;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 15.5px;
  letter-spacing: -.005em;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .2);
  animation: rise .2s ease;
}
.toast.bad { background: rgba(190, 40, 40, .95); }
.toast.good { background: rgba(20, 130, 75, .95); }

#fx { position: fixed; inset: 0; z-index: 50; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ------------------------------------------------------------ 响应式 */

/* 窄屏放不下右上角小框，收成一条横向条，避免压住题目 */
@media (max-width: 1200px) {
  .corner {
    position: static;
    width: min(760px, 100%);
    margin: 0 auto;
    flex-direction: row;
    gap: 48px;
    padding: calc(var(--bar) + 30px) 22px 0;
  }
  .corner > section { flex: 1; }
  .corner:not([hidden]) + .page { min-height: auto; padding-top: 48px; }
}

@media (max-width: 860px) {
  :root { --bar: 58px; }
  .landing h1 { font-size: clamp(38px, 10vw, 56px); }
  .ask { font-size: clamp(28px, 7vw, 40px); max-width: none; }
  .cmd { font-size: clamp(22px, 4.8vw, 36px); }
  .facts { gap: 40px; margin-top: 52px; }
  .result-stats { gap: 32px; }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 12px 18px;
    grid-template-columns: auto 1fr;
    row-gap: 12px;
    position: static;
  }
  .segmented { grid-column: 1 / -1; order: 3; overflow-x: auto; justify-self: center; }
  .segmented button { padding: 7px 13px; font-size: 13.5px; }
  .page { padding: 32px 20px 56px; min-height: auto; }
  .corner { flex-direction: column; gap: 26px; padding: 26px 20px 0; }
  .facts { gap: 30px; }
  .facts dt { font-size: 38px; }
  .quiz-actions { gap: 18px; flex-wrap: wrap; }
  .sheet { padding: 32px 24px 26px; border-radius: 20px; }
  .btn-fill { padding: 15px 30px; font-size: 16px; }
}

/* 排行榜：昵称与真实姓名分行，长名称省略并保留完整文本。 */
.board .nm { white-space: normal; min-width: 0; }
.rank-nickname, .rank-real-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-real-name { font-size: 12px; color: var(--muted); font-weight: 400; }

/* 前十名独立滚动，固定侧栏不会把个人数据挤出视口。 */
.corner { max-height: calc(100dvh - var(--bar) - 44px); }
.board { max-height: min(480px, 48dvh); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1200px) { .corner { max-height: none; } }

/* 输入时仅标色，避免逐字触发抖动。长命令可在输入框中横向滚动。 */
.blank-field.live-bad input { color: var(--red); border-bottom-color: var(--red); }
.blank-field { max-width: 100%; min-width: 0; }
.blank-field input { max-width: min(100%, 76vw); }

/* 保留原排行榜排版，只在累计题量右侧增加本周一列。 */
.board li { grid-template-columns: 18px minmax(0, 1fr) auto auto; }
.board .weekly-vl { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .vl { white-space: nowrap; }

/* ===== 2026-10-31 顶栏与弹窗改进 ===== */

/* 关卡标签真正居中：以前靠 grid 的 1fr auto 1fr，右侧按钮一多就被挤偏 */
.topbar > .segmented {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(52vw, 760px);
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 2;
}
.topbar > .segmented::-webkit-scrollbar { display: none; }

/* 滑动指示条：选中项后面那块白色药丸会平滑移动（参考官网导航的过渡手感） */
.segmented { position: relative; }
.segmented .nav-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .12);
  transition: transform .34s cubic-bezier(.22, .61, .36, 1),
              width .34s cubic-bezier(.22, .61, .36, 1),
              opacity .18s ease;
  z-index: 0;
  pointer-events: none;
}
.segmented button { position: relative; z-index: 1; }
.topbar .segmented button { transition: color .2s ease, transform .2s ease; }
.topbar .segmented button:hover { color: var(--ink); transform: translateY(-1px); }
.topbar .segmented button.on { background: transparent; box-shadow: none; }
.topbar .segmented button.on:hover { transform: none; }

@media (max-width: 1080px) { .topbar > .segmented { max-width: 44vw; } }
@media (max-width: 720px) {
  .topbar > .segmented {
    position: static;
    transform: none;
    max-width: none;
    justify-self: center;
    overflow-x: auto;
  }
}

/* 通关弹窗右上角关闭：关掉就能看到后面的作答详情，并且不再自动进入下一关 */
#round-choice { position: relative; }
#round-choice .choice-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
#round-choice .choice-close:hover { background: var(--line); color: var(--ink); transform: scale(1.06); }

/* 排行榜以"今日作答"排序，所以把今日这一列做成主数据 */
.board .weekly-vl { color: var(--ink); font-size: 13.5px; font-weight: 650; }
.board .vl { color: var(--faint); }

/* ===== 2026-10-31 单词大全 / 例句对照 / 关卡手柄 ===== */

/* 方向卡片上的"单词大全"入口 */
.category-wordbook {
  display: inline-block;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.category-wordbook:hover { color: var(--ink); }

/* 例句下面的中文：词义 + 译文（或逐词对照） */
.word-gloss { color: #5b6b7a; font-size: 13px; line-height: 1.75; word-break: break-word; }
#word-zh { color: var(--ink-2); }

/* 单词大全整屏 */
#wordbook { display: block; max-width: 1080px; margin: 0 auto; padding: 118px 24px 70px; text-align: left; }
.wordbook-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.wordbook-head h1 { font-size: clamp(26px, 4vw, 34px); margin: 0; }
.wordbook-count { color: var(--faint); font-size: 13px; }
#wordbook-sub { margin: 8px 0 0; }
.wordbook-tools { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 6px; }
.wordbook-tools input, .wordbook-tools select {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.wordbook-tools input { flex: 1 1 260px; min-width: 200px; }
.wordbook-list { margin-top: 18px; display: flex; flex-direction: column; gap: 22px; }
.wordbook-level h2 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 10px; letter-spacing: .01em; }
.wordbook-words {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
}
.wordbook-words li {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.wordbook-words b { font-size: 16px; color: var(--ink); }
.wb-phon { color: var(--faint); font-size: 12px; }
.wb-zh { color: var(--ink-2); font-size: 13px; }
.wb-example { flex-basis: 100%; color: var(--faint); font-size: 12px; line-height: 1.5; }

/* 关卡侧栏折叠手柄：收起来、再点同一位点展开 */
.lessons-handle {
  position: fixed; left: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 68px; z-index: 46;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--muted); font-size: 12px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 40, 70, .08);
  transition: left .24s ease, background .18s ease, color .18s ease;
}
.lessons-handle:hover { background: var(--soft); color: var(--ink); }
body.has-lessons.lessons-open .lessons-handle { left: 246px; }
@media (max-width: 1099px) { body.has-lessons.lessons-open .lessons-handle { left: 8px; } }
@media (max-width: 720px) { #wordbook { padding: 130px 16px 60px; } }
