/* 应用级样式：播放器、句子列表、题目、对齐工具。 */

/* ===================== 播放器 ===================== */

.player {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow-1);
}
.player.row1 { display: flex; align-items: center; gap: 10px; }
.player-main {
  width: 38px; height: 38px; padding: 0; justify-content: center; flex: none;
  background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 50%;
}
.player-main:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
.player-main svg { width: 20px; height: 20px; }

.player-time { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); white-space: nowrap; }
.player-time b { color: var(--text); font-weight: 600; }

.scrub { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.scrub input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; }
.scrub input[type="range"]:disabled { cursor: not-allowed; }
.scrub .locked-note { font-size: 12px; color: var(--warn); white-space: nowrap; }

/* 手动对齐工具自己拼的第二行（前进/后退、配速） */
.player.row2 {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--text-soft);
}
.player.row2 .group { display: flex; align-items: center; gap: 6px; }

/* ===================== 布局 ===================== */
/* 一屏高度都用视口算，不再拿 100vh 去减一个猜出来的常数——猜错就会把控件挤出屏幕。
   --side-h：题目页右栏（播放器 + 作答）的最大高度，减掉的 52 是那一页
             顶栏/配速条之外的页面上边距 + 标题行 + 底边距。
   --intensive-h：精听页里那一段（标题+工具栏、下面「原文」列表）的一屏高度。
             这里要扣的是页面上边距 + 面包屑 + 底边距 + 一点余量（116）；
             标题行与工具栏已经在 --intensive-h 里面了，播放器则挂在配速条里
             （配速条高度算在 --side-top 里）。扣足了页面才真的不多出一条
             滚动条（否则能往下滚出一片空白）。
   max(260px, …)：窗口矮到离谱时也保证播放器有地方站。 */
:root {
  --side-top: calc(var(--topbar-h) + var(--ratebar-h));
  --side-h: max(260px, calc(100vh - var(--side-top) - 52px));
  --intensive-h: max(260px, calc(100vh - var(--side-top) - 116px));
}
@supports (height: 100dvh) {
  :root {
    --side-h: max(260px, calc(100dvh - var(--side-top) - 52px));
    --intensive-h: max(260px, calc(100dvh - var(--side-top) - 116px));
  }
}

/* 题目页（标准模式）还是两栏：左边题干，右边播放器 + 作答，页面不滚。
   两块各自滚，滚任何一边都不会把另一边顶走——以前整页共用一个滚动条，
   滚到下面就再也看不到上面的播放器和原文了。 */
.quiz-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px; align-items: start;
}
@media (max-width: 1120px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* 精听页：标题与工具栏一行，下面就是原文列表，列表自己滚。
   播放器那一行不在这里——它挂在顶上的配速条里（#rate-value 右边）。
   整页锁一屏高（--intensive-h），页面本身不滚：页面再滚就只会滚出一片空白。 */
.intensive {
  display: flex; flex-direction: column; gap: 12px;
  height: var(--intensive-h);
}
.intensive-page { overflow: hidden; }
/* 「精听 · 整卷」+ 右侧工具栏 */
.intensive-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.intensive-title { margin: 0; }
.intensive-head .seg-toolbar { margin: 0 0 0 auto; }
/* 备用的播放器行：只在配速条不在、播放器没地方挂时才出现 */
.intensive-top { min-width: 0; }
.intensive-top .player * { min-width: 0; }

.intensive-main { display: grid; grid-template-rows: minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }

/* 题目页右栏：钉在视口里，高度锁一屏，内部滚动 */
.q-side {
  position: sticky;
  top: calc(var(--side-top) + 14px);
  max-height: var(--side-h);
  overflow-y: auto; overscroll-behavior: contain; padding-right: 4px;
  display: grid; gap: 12px; align-content: start;
}
/* 侧栏里的播放器要能缩：flex 子项的默认 min-width:auto 会按内容撑宽，
   把整栏顶出屏幕。 */
.q-side .player * { min-width: 0; }
.spacer { min-width: 0; }
/* 精听：播放器那一行住在配速条里（#rate-value 右边），所以把卡片外壳去掉，
   换成「吃掉剩余宽度」的一条，进度条永远有位置。 */
.rate-bar .player {
  flex: 1; min-width: 0;
  background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none;
}
.rate-bar .player * { min-width: 0; }
.rate-bar .player .scrub { min-width: 72px; }
.rate-bar .player .player-time { flex: none; }

/* 窄屏：回到整页滚动（这时 sticky 反而会挡住内容） */
@media (max-width: 940px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr); }
  .intensive { height: auto; }
  .intensive-page { overflow: visible; }
  .q-side { position: static; max-height: none; height: auto; overflow: visible; padding-right: 0; }
  .seg-list-x { max-height: none; overflow: visible; }
  /* 配速条里还塞着播放器，窄屏把配速滑杆收窄一点 */
  .rate-bar { gap: 8px; padding: 0 12px; }
  .rate-bar input[type="range"] { width: 118px; }
}

.seg-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }

/* 原文列表：自己滚。精听页的 flex 已经把「剩下的高度」给了它这一格，
   这里只要允许它缩到 0 并出滚动条（高度由外面给，不再自己算）。 */
.intensive-main { min-width: 0; }
.seg-list-x {
  display: grid; gap: 4px; align-content: start;
  min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 4px 2px 0; scroll-behavior: smooth;
}

/* 时间轴里的 Section 分隔标题行 */
.seg-sec-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 14px 0 4px; padding: 6px 10px;
  background: var(--accent-soft); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--accent-text);
}
.seg-sec-head:first-child { margin-top: 0; }
.seg-sec-head .spacer { flex-grow: 1; }
/* 题目面板里的节小标题 */
.qz-sec-head {
  font-weight: 700; font-size: 15px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 4px 10px; margin: 6px 0 2px;
}

.seg {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: start;
  padding: 8px 10px 8px 8px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: background .1s, border-color .1s;
}
.seg:hover { background: var(--surface-2); border-color: var(--border); }
.seg.current { background: var(--accent-soft); border-color: var(--accent); }
.seg.evidence { box-shadow: inset 3px 0 0 var(--warn); }
.seg.dim { opacity: .55; }

.seg-time { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); padding-top: 3px; }
.seg-body { min-width: 0; }
/* 原文放大：这是精听时眼睛停留最久的地方 */
.seg-en { font-family: var(--font-en); font-size: 17px; line-height: 1.6; }
.seg-zh { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
/* 「显示中文」开关：默认隐藏，开关打开才显示（.seg-list-x.show-zh） */
.seg-list-x:not(.show-zh) .seg-zh { display: none; }
.seg-zh:empty { display: none; }
.seg-speaker {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  background: var(--surface-3); color: var(--text-soft); border-radius: 3px; padding: 0 4px; margin-right: 6px;
  vertical-align: 1px;
}
.seg-kind {
  display: inline-block; font-size: 10.5px; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; margin-right: 6px; vertical-align: 1px;
}
.seg-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.seg:hover .seg-tools, .seg.current .seg-tools { opacity: 1; }
.seg-tools button { padding: 1px 5px; font-size: 11px; color: var(--text-faint); border-color: transparent; background: transparent; }
.seg-tools button:hover { color: var(--text); background: var(--surface-3); }
.seg-tools button.on { color: var(--warn); }

.seg-caret { color: var(--accent); font-size: 12px; }

/* ===================== 题目 ===================== */
/* 字号整体调大了：这块是真正要读的内容，之前偏小。 */
.q-list { display: grid; gap: 14px; }
.q { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.q.correct { border-left: 3px solid var(--ok); }
.q.wrong { border-left: 3px solid var(--bad); }

.q-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.q-no {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-sm); padding: 2px 9px; flex: none;
}
.q-stem { font-family: var(--font-en); font-size: 17px; line-height: 1.55; flex: 1; }

.q-options { display: grid; gap: 6px; margin: 4px 0 0 0; }
.opt {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px 8px 8px; cursor: pointer; transition: background .1s, border-color .1s;
  /* 隐藏的 radio 是绝对定位：标签不给定位上下文的话，它会以整个视口为基准，
     把 <html> 的可滚区域一直撑到页面下面（能滚出一大片空白）。 */
  position: relative;
}
.opt:hover { background: var(--surface-2); border-color: var(--border-strong); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .key {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-align: center;
  background: var(--surface-3); color: var(--text-soft); border-radius: 4px; line-height: 24px; height: 24px;
}
.opt .text { font-family: var(--font-en); font-size: 16.5px; line-height: 1.55; }
.opt.chosen { border-color: var(--accent); background: var(--accent-soft); }
.opt.chosen .key { background: var(--accent); color: #fff; }
.opt.is-answer { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-answer .key { background: var(--ok); color: #fff; }
.opt.is-wrong-pick { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-wrong-pick .key { background: var(--bad); color: #fff; }

.q-verdict { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 13px; flex-wrap: wrap; }
.q-verdict .mark { font-weight: 700; }
.q-verdict .mark.ok { color: var(--ok); }
.q-verdict .mark.bad { color: var(--bad); }

/* 解析块：结构固定成「答案句 / 推理 / 同义替换 / 排除」，两种模式共用。
   长度因此看起来一致，也不会和上面的答案行挤成一坨。 */
.explain { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 13px; line-height: 1.72; }
.explain-locate { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.explain-quote { color: var(--text-soft); font-family: var(--font-mono); font-size: 12.5px; }
.explain-time { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; }
.explain-line { margin: 0 0 6px; color: var(--text); }
.explain-line:last-child { margin-bottom: 0; }
.explain-group { display: flex; gap: 8px; margin-top: 6px; align-items: baseline; }
.explain-body { color: var(--text-soft); }
.explain-tag {
  flex: none; font-size: 11px; border-radius: 3px; padding: 1px 6px;
  background: var(--accent-soft); color: var(--accent-text); white-space: nowrap;
}
.explain-tag.para { background: var(--ok-soft); color: var(--ok); }
.explain-tag.excl { background: var(--bad-soft); color: var(--bad); }
.qz .explain { border-top: none; padding-top: 6px; margin-top: 6px; font-size: 12.5px; }

/* 题干：六级卷面只印选项，题干在录音里念。作答前只显示这句提示，提交后才放出题干。 */
.q-stem.stem-hold { font-family: var(--font); font-size: 13.5px; color: var(--text-faint); }
.stem-tag {
  display: inline-block; font-family: var(--font); font-size: 11px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: 3px; padding: 0 6px; margin-right: 8px; vertical-align: 1px;
}

/* ===================== 精听里的作答面板 ===================== */
/* 整栏已经是一屏高、自己滚，这里不再套第三层滚动条；题目列表放开高度，
   由外层右栏统一滚（滚到下面时播放器仍然钉在最上面）。 */
.qz-list { display: grid; gap: 14px; }
.qz { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 15px; background: var(--surface-2); font-size: 16px; }
.qz.correct { border-left: 3px solid var(--ok); }
.qz.wrong { border-left: 3px solid var(--bad); }
.qz-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.qz-head .q-no { font-size: 15px; padding: 2px 10px; }
.qz-head button.small { padding: 3px 10px; font-size: 13px; }
.qz-mark { font-weight: 700; font-size: 14px; }
.qz-mark.ok { color: var(--ok); }
.qz-mark.bad { color: var(--bad); }
.qz .q-options { gap: 6px; }
.qz .opt { grid-template-columns: 30px 1fr; gap: 10px; padding: 7px 11px 7px 6px; }
.qz .opt .key { font-size: 15px; line-height: 24px; height: 24px; }
.qz .opt .text { font-size: 17px; line-height: 1.55; }
.qz-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); display: grid; gap: 7px; font-size: 15px; }
.qz-foot .small { font-size: 14.5px; }
.qz-foot button.small { font-size: 13px; }
.qz-line { display: flex; gap: 8px; align-items: center; }
.qz-stem {
  font-family: var(--font-en); font-size: 17px; line-height: 1.55;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
}
.qz-stem-tag {
  display: inline-block; font-family: var(--font); font-size: 12px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}
/* 解析块跟着面板一起放大 */
.qz .explain { font-size: 15px; line-height: 1.65; }
.qz .explain .explain-tag { font-size: 12.5px; }
.qz-explain summary { cursor: pointer; font-size: 13.5px; color: var(--text-soft); }
.qz-explain .tiny { margin-top: 4px; color: var(--text-soft); line-height: 1.6; }

.q-side { display: grid; gap: 12px; align-content: start; }
.score-big { font-family: var(--font-mono); font-size: 34px; font-weight: 700; line-height: 1.1; }
.score-big small { font-size: 15px; color: var(--text-faint); font-weight: 500; }

.section-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.section-tabs button { padding: 5px 13px; border-radius: 999px; }
.section-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===================== 卷面（仿真考卷版式） ===================== */
.exam-sheet {
  max-width: 860px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 56px 56px;
  font-family: 'Times New Roman', Georgia, 'Nimbus Roman', serif;
  font-size: 17px; line-height: 1.6; color: var(--text);
}
.exam-part-row { display: flex; gap: 8px; font-weight: 700; font-size: 1.2em; margin-bottom: 6px; }
.exam-part-row .spacer { flex-grow: 1; }
.exam-sec-head { font-weight: 700; font-size: 1.1em; margin: 26px 0 10px; display: flex; align-items: center; gap: 14px; }
.exam-sec-head .spacer { flex-grow: 1; }
.exam-sec-play {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font); font-size: 12px; padding: 3px 11px; border-radius: 999px;
}
.exam-sec-play.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.exam-directions { font-style: italic; text-align: justify; margin: 0 0 26px; }
.exam-piece { margin-bottom: 30px; }
.exam-piece-head { display: flex; align-items: baseline; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.exam-piece-head .spacer { flex-grow: 1; }
.exam-listen { white-space: nowrap; font-family: var(--font); font-size: 12px; }
.exam-q { display: flex; gap: 12px; margin-bottom: 16px; }
.exam-qn { white-space: nowrap; min-width: 30px; }
.exam-opts { flex: 1; display: grid; gap: 5px; align-content: start; }
.exam-opt { display: flex; gap: 10px; align-items: baseline; border-radius: 4px; padding: 1px 6px; margin-left: -6px; }
/* 标准模式：选项可点 */
label.exam-opt { cursor: pointer; }
label.exam-opt:hover { background: var(--surface-2); }
label.exam-opt input { accent-color: var(--accent); margin: 0; transform: translateY(2px); }
label.exam-opt.chosen { background: var(--accent-soft); }
label.exam-opt.is-answer { background: var(--ok-soft, rgba(47, 158, 96, 0.14)); }
label.exam-opt.is-wrong-pick { background: var(--bad-soft, rgba(214, 69, 69, 0.12)); }
.exam-key { white-space: nowrap; }
.exam-verdict { display: flex; gap: 12px; align-items: baseline; margin-top: 7px; font-size: 14px; font-family: var(--font); }
.exam-verdict .mark.ok { color: var(--ok, #2f9e60); font-weight: 650; }
.exam-verdict .mark.bad { color: var(--bad, #d64545); font-weight: 650; }
.exam-stem { margin-top: 7px; font-family: var(--font); font-size: 13.5px; color: var(--text-soft); }
.exam-stem-tag {
  display: inline-block; font-size: 11px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: 3px; padding: 0 5px; margin-right: 6px; vertical-align: 1px;
}
/* 批改后的解析块直接排进卷面，字号略收 */
.exam-opts .explain { font-family: var(--font); font-size: 13.5px; margin-top: 8px; }

/* 标准模式控制栏：吸顶一条，播放/暂停各节录音 + 进度 + 提交/清空 */
.exam-toolbar {
  position: sticky; top: calc(var(--topbar-h, 56px) + 8px); z-index: 30;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: 980px; margin: 0 auto 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 14px; box-shadow: var(--shadow-1);
  font-size: 13.5px;
}
.exam-tb-label { color: var(--text-soft); font-weight: 600; }
.exam-tb-sec { display: inline-flex; align-items: center; gap: 4px; padding: 4px 13px; border-radius: 999px; }
.exam-tb-sec.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.exam-tb-progress { color: var(--text-soft); font-family: var(--font-mono); font-size: 12.5px; }
.exam-tb-score b { font-family: var(--font-mono); font-size: 15px; }
.exam-tb-actions { display: flex; gap: 8px; align-items: center; }

/* ===================== 对齐工具 ===================== */
.align-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .align-grid { grid-template-columns: minmax(0, 1fr); } }

.wave-wrap { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.wave-wrap canvas { display: block; width: 100%; height: 96px; cursor: crosshair; }
.wave-wrap .playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--bad); pointer-events: none; }
.wave-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-faint); margin-top: 6px; flex-wrap: wrap; }

.cue-list { display: grid; gap: 3px; max-height: 460px; overflow-y: auto; }
.cue {
  display: grid; grid-template-columns: 62px 1fr; gap: 9px; align-items: start;
  padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent;
}
.cue:hover { background: var(--surface-2); border-color: var(--border); }
.cue.active { background: var(--accent-soft); border-color: var(--accent); }
.cue.done .cue-time { color: var(--ok); }
.cue.pending .cue-time { color: var(--text-faint); }
.cue-time { font-family: var(--font-mono); font-size: 12px; padding-top: 1px; }
.cue-text { font-family: var(--font-en); font-size: 14.5px; line-height: 1.5; }
.cue.missing .cue-text { color: var(--text-faint); }

.align-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.align-stats b { font-family: var(--font-mono); font-size: 15px; }

.kbd-hint { font-size: 12.5px; color: var(--text-soft); line-height: 2; }
.kbd-hint kbd {
  font-family: var(--font-mono); font-size: 11px; background: var(--surface-3);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; margin-right: 4px;
}

.sticky-actions {
  position: sticky; bottom: 0; background: var(--surface);
  border-top: 1px solid var(--border); padding: 10px 0 0; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}

/* ===================== 学习助手 ===================== */
.vocab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font-size: 12.5px; font-family: var(--font-en);
}
.chip button { border: 0; background: transparent; padding: 0; color: var(--text-faint); cursor: pointer; }
.chip button:hover { color: var(--bad); }

.spark { display: block; width: 100%; height: 96px; }
.steps { counter-reset: step; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 14px; }
/* 标题与说明要在同一行：display:grid 会把 <strong> 与后面的文字当成两个
   匿名项各排一行，窄侧栏里 14px 的中文就变成一个词一行（看上去像竖排）。
   一起放进第 2 列即可。 */
.steps li > .step-body { grid-column: 2; grid-row: 1; min-width: 0; }
.steps li::before {
  content: counter(step); font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  background: var(--accent-soft); color: var(--accent-text); border-radius: 50%;
  width: 22px; height: 22px; display: grid; place-items: center; margin-top: 2px;
}

.drop-hint { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-soft); font-size: 13.5px; }

/* ===================== 继续上次练习 ===================== */
.resume-card { border-left: 3px solid var(--accent); margin-bottom: 16px; }
.resume-card .card-head h3 { display: flex; align-items: center; gap: 6px; }

kbd.inline { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

/* ===================== 用户码 ===================== */
/* 顶栏右侧：它是身份入口，不是页面导航，所以跟 .tabs 分开推到最后 */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.usercode-btn { display: inline-flex; align-items: center; gap: 6px; }

.usercode-card { max-width: 520px; width: 100%; max-height: 86vh; overflow: auto; }
.usercode-card .card-head h3 { display: flex; align-items: center; gap: 6px; }

.usercode-value {
  flex: 1; min-width: 0;
  font-size: 19px; font-weight: 650; letter-spacing: 1.5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; user-select: all; word-break: break-all;
}

.usercode-row { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.usercode-input {
  flex: 1; min-width: 0; font-size: 15px; letter-spacing: 1px; text-transform: uppercase;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.usercode-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.usercode-warn {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--warn-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; margin: 10px 0;
  font-size: 12.5px; line-height: 1.55; color: var(--text);
}
.usercode-warn svg { flex: none; margin-top: 2px; color: var(--warn); }

.usercode-switch { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.usercode-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }

/* 打印/窄屏小修 */
@media (max-width: 720px) {
  .view { padding: 14px 12px 50px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-text { display: none; }
  .usercode-btn span { display: none; }
  .seg { grid-template-columns: 46px 1fr; }
  .seg-tools { display: none; }
  /* 配速条里那一行播放器：窄屏把两个时间读数让出来给进度条 */
  .rate-bar .player .player-time { display: none; }
  .usercode-row { flex-wrap: wrap; }
  .usercode-value { font-size: 16px; letter-spacing: 1px; }
}
