/* bluebook-shell.css — Bluebook 风格考场壳 (可选模式, M-163)
 * 全部规则挂在 .bb-shell / .bb-mode-toggle / .bb-resume-card 下, 不碰共享类。
 * 移植自 clean-room 原型 styles.css, 改用站内 token 化配色。 */

.bb-shell {
  --bb-ink: #15232a;
  --bb-muted: #5e6d73;
  --bb-paper: #f7f4ed;
  --bb-surface: #fffdf8;
  --bb-line: #cbd5d5;
  --bb-teal: #075b5e;
  --bb-teal-2: #0d7778;
  --bb-amber: #e8a839;
  --bb-rose: #a33b52;
  --bb-focus: #e08b22;
  --bb-shadow: 0 16px 42px rgb(23 52 56 / 12%);
  --bb-text-scale: 1;
  --left-pane: 50%;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  width: 100%;
  color: var(--bb-ink);
  background:
    radial-gradient(circle at 10% 0%, rgb(232 168 57 / 14%), transparent 24rem),
    linear-gradient(145deg, #f7f4ed 0%, #edf4f1 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: calc(1rem * var(--bb-text-scale));
}
.bb-shell *,
.bb-shell *::before,
.bb-shell *::after {
  box-sizing: border-box;
}
.bb-shell.bb-high-contrast {
  --bb-ink: #000;
  --bb-muted: #222;
  --bb-paper: #fff;
  --bb-surface: #fff;
  --bb-line: #000;
  --bb-teal: #003b3d;
  --bb-teal-2: #005b5e;
  --bb-amber: #ffd20a;
  --bb-focus: #c65300;
  background: #fff;
}
.bb-shell [hidden] {
  display: none !important;
}
.bb-shell button,
.bb-shell input {
  font: inherit;
}
.bb-shell button {
  cursor: pointer;
}
.bb-shell button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.bb-shell button:focus-visible,
.bb-shell a:focus-visible,
.bb-shell [tabindex]:focus-visible,
.bb-shell input:focus-visible {
  outline: 3px solid var(--bb-focus);
  outline-offset: 3px;
}

/* ---- 按钮基色 ---- */
.bb-shell .bb-primary,
.bb-shell .bb-secondary,
.bb-shell .bb-ghost {
  min-height: 2.5rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.bb-shell .bb-primary {
  color: #fff;
  background: var(--bb-teal);
}
.bb-shell .bb-primary:hover {
  background: var(--bb-teal-2);
}
.bb-shell .bb-secondary {
  color: var(--bb-teal);
  background: #e6f2ef;
  border-color: #a9ceca;
}
.bb-shell .bb-ghost {
  color: var(--bb-ink);
  background: transparent;
  border-color: var(--bb-line);
}
.bb-shell .bb-ghost:hover {
  background: rgb(7 91 94 / 7%);
}
.bb-shell .bb-ghost.active,
.bb-shell .bb-ghost[aria-pressed="true"] {
  color: var(--bb-teal);
  background: #e6f2ef;
  border-color: #a9ceca;
}

/* ---- 顶栏 ---- */
.bb-shell .bb-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.6rem 1rem;
  background: rgb(255 253 248 / 96%);
  border-bottom: 1px solid var(--bb-line);
  backdrop-filter: blur(12px);
}
.bb-shell .bb-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.bb-shell .bb-title-block {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.bb-shell .bb-section-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-shell .bb-progress {
  color: var(--bb-muted);
  font-size: 0.78rem;
}
.bb-shell .bb-header-center {
  text-align: center;
}
.bb-shell .bb-timer-stack {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  min-width: 7.8rem;
}
.bb-shell .bb-timer-value {
  display: block;
  min-height: 1.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  font-size: 1.2rem;
}
.bb-shell .bb-timer-value.warn {
  color: #b91c1c;
}
.bb-shell .bb-timer-hidden-copy {
  color: var(--bb-muted);
  font-size: 0.82rem;
  min-height: 1.45rem;
  display: inline-flex;
  align-items: center;
}
.bb-shell .bb-timer-toggle {
  padding: 0.15rem 0.6rem;
  color: var(--bb-teal);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.bb-shell .bb-timer-toggle:hover {
  background: #e6f2ef;
}
.bb-shell .bb-header-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.bb-shell .bb-more-wrap {
  position: relative;
}
.bb-shell .bb-more-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.5rem;
  background: var(--bb-surface);
  border: 1px solid var(--bb-line);
  border-radius: 0.8rem;
  box-shadow: var(--bb-shadow);
}
.bb-shell .bb-menu-item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.78rem;
  color: var(--bb-ink);
  background: transparent;
  border: 0;
  border-radius: 0.55rem;
  text-align: left;
}
.bb-shell .bb-menu-item:hover,
.bb-shell .bb-menu-item:focus-visible {
  background: #edf4f1;
}
.bb-shell .bb-menu-divider {
  height: 1px;
  margin: 0.4rem 0;
  background: var(--bb-line);
}

/* ---- 主体 ---- */
.bb-shell .bb-main {
  width: 100%;
  min-width: 0;
  padding: clamp(0.8rem, 2.5vw, 1.6rem);
}
.bb-shell .bb-main:focus {
  outline: none;
}
.bb-shell .bb-workspace {
  width: min(84rem, 100%);
  margin: 0 auto;
  min-width: 0;
}
.bb-shell .bb-item-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(16rem, var(--left-pane, 50%)) 1.25rem minmax(
      16rem,
      1fr
    );
  min-height: min(36rem, calc(100vh - 12rem));
  background: var(--bb-surface);
  border: 1px solid var(--bb-line);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgb(20 49 53 / 8%);
}
.bb-shell .bb-passage-pane,
.bb-shell .bb-question-pane {
  min-width: 0;
  padding: clamp(1.1rem, 3vw, 2rem);
  line-height: 1.7;
}
.bb-shell .bb-passage-pane {
  position: relative;
}
.bb-shell .bb-passage-text {
  white-space: pre-wrap;
}
.bb-shell .bb-passage-text,
.bb-shell .bb-q-stem,
.bb-shell .bb-choice-text {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.bb-shell .bb-passage-empty-copy {
  margin: 0;
  color: var(--bb-muted);
}
.bb-shell .bb-notes-col {
  display: none;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--bb-line);
}
.bb-shell .bb-item-shell.has-notes .bb-notes-col {
  display: block;
}
.bb-shell .bb-notes-banner {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  color: #5e4713;
  background: #fff4cf;
  border: 1px solid #e7c56f;
  border-radius: 0.65rem;
  font-size: 0.86rem;
}
.bb-shell .bb-line-guide {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 48%;
  height: 3.4rem;
  pointer-events: none;
  background: rgb(232 168 57 / 20%);
  border-top: 1px solid rgb(178 118 16 / 45%);
  border-bottom: 1px solid rgb(178 118 16 / 45%);
}
.bb-shell .bb-line-guide[hidden] {
  display: none;
}
.bb-shell .bb-manual-image-warning {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #d97706;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 600;
  line-height: 1.55;
  font-size: 0.9rem;
}
.bb-shell .bb-img-section {
  margin-top: 1rem;
}
.bb-shell .bb-img-upload-btn {
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

/* ---- 分隔线 ---- */
.bb-shell .bb-pane-divider {
  position: relative;
  z-index: 5;
  min-width: 1.25rem;
  cursor: col-resize;
  touch-action: none;
  background: linear-gradient(
    90deg,
    transparent 0 0.45rem,
    var(--bb-line) 0.45rem 0.75rem,
    transparent 0.75rem
  );
}
.bb-shell .bb-divider-handle {
  position: sticky;
  top: 42%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 2.4rem;
  margin-left: -0.58rem;
  overflow: hidden;
  background: var(--bb-surface);
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgb(20 49 53 / 18%);
}
.bb-shell .bb-divider-btn {
  width: 1.15rem;
  height: 2.2rem;
  padding: 0;
  color: var(--bb-teal);
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 900;
}
.bb-shell .bb-divider-btn:hover {
  background: #edf4f1;
}

/* ---- 题目栏 ---- */
.bb-shell .bb-question-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}
.bb-shell .bb-item-number {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 850;
}
.bb-shell .bb-number-tile {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  background: var(--bb-teal);
  border-radius: 0.45rem;
}
.bb-shell .bb-wrong-count-badge,
.bb-shell .bb-repeat-badge {
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  color: var(--bb-muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.bb-shell .bb-repeat-badge {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #f2c48a;
}
.bb-shell .bb-mark-review {
  margin-left: auto;
  padding: 0.35rem 0.6rem;
  color: var(--bb-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  font-weight: 750;
  white-space: nowrap;
}
.bb-shell .bb-mark-review:hover {
  background: rgb(7 91 94 / 7%);
}
.bb-shell .bb-mark-review[aria-pressed="true"] {
  color: var(--bb-rose);
}
.bb-shell .bb-q-stem {
  margin-bottom: 1.2rem;
  white-space: pre-wrap;
}
.bb-shell .bb-choice-list {
  display: grid;
  gap: 0.7rem;
}
.bb-shell .bb-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: stretch;
  width: 100%;
}
.bb-shell .bb-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--bb-ink);
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 0.75rem;
  text-align: left;
  line-height: 1.6;
}
.bb-shell .bb-choice:hover {
  border-color: var(--bb-teal-2);
}
.bb-shell .bb-choice[aria-pressed="true"] {
  border-color: var(--bb-teal);
  box-shadow: inset 0 0 0 2px var(--bb-teal);
}
.bb-shell .bb-choice.eliminated {
  opacity: 0.52;
  text-decoration: line-through;
  cursor: not-allowed;
}
.bb-shell .bb-choice-key {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--bb-line);
  border-radius: 50%;
  font-weight: 850;
}
.bb-shell .bb-choice[aria-pressed="true"] .bb-choice-key {
  color: #fff;
  background: var(--bb-teal);
  border-color: var(--bb-teal);
}
.bb-shell .bb-choice-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bb-shell .bb-eliminate-button {
  min-width: 2.6rem;
  color: var(--bb-muted);
  background: transparent;
  border: 1px solid var(--bb-line);
  border-radius: 0.65rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.bb-shell .bb-eliminate-button[aria-pressed="true"] {
  color: var(--bb-rose);
  background: #fff0f3;
  border-color: #dca5b2;
}
.bb-shell .bb-free-response {
  display: grid;
  gap: 0.5rem;
  max-width: 22rem;
}
.bb-shell .bb-free-response-label {
  font-weight: 750;
  color: var(--bb-muted);
  font-size: 0.85rem;
}
.bb-shell .bb-free-response-input {
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--bb-line);
  border-radius: 0.6rem;
  background: #fff;
  font-size: 1.05rem;
}

/* ---- 数学工具停靠 (复用站内 .exam-workspace/.exam-tool-dock 布局) ---- */
.bb-shell .bb-workspace.is-tool-open:not(.is-tool-flow) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(
      320px,
      var(--exam-tool-width, 420px)
    );
  gap: 0.8rem;
  align-items: stretch;
}
.bb-shell .bb-workspace.is-tool-open:not(.is-tool-flow) > .bb-item-shell {
  grid-column: 1;
  min-width: 0;
}
.bb-shell .bb-tool-dock {
  grid-column: 2;
  border-radius: 1rem;
  border: 1px solid var(--bb-line);
  box-shadow: 0 10px 30px rgb(20 49 53 / 8%);
}
.bb-shell .bb-workspace.is-tool-phone .bb-item-shell {
  grid-template-columns: 1fr;
}

/* ---- 底栏 ---- */
.bb-shell .bb-nav {
  position: sticky;
  z-index: 15;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
  padding: 0.6rem 1rem;
  background: rgb(255 253 248 / 96%);
  border-top: 1px solid var(--bb-line);
  backdrop-filter: blur(12px);
}
.bb-shell .bb-nav-left {
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.bb-shell .bb-time-spent {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bb-shell .bb-time-alert {
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  max-width: 14rem;
}
.bb-shell .exam-question-time-hidden {
  visibility: hidden;
}
.bb-shell .bb-nav-center {
  position: relative;
  justify-self: center;
}
.bb-shell .bb-nav-right {
  justify-self: end;
  display: flex;
  gap: 0.6rem;
}
.bb-shell .bb-qnav-popover {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  width: min(30rem, calc(100vw - 2rem));
  padding: 1rem;
  background: var(--bb-surface);
  border: 1px solid var(--bb-line);
  border-radius: 0.9rem;
  box-shadow: var(--bb-shadow);
  transform: translateX(-50%);
}
.bb-shell .bb-qnav-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.bb-shell .bb-qnav-title {
  margin: 0;
  font-size: 1rem;
}
.bb-shell .bb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0.8rem 0 0;
  color: var(--bb-muted);
  font-size: 0.82rem;
}
.bb-shell .bb-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.bb-shell .bb-legend-mark {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid var(--bb-line);
  border-radius: 0.2rem;
}
.bb-shell .bb-legend-mark.current {
  background: var(--bb-teal);
}
.bb-shell .bb-legend-mark.answered {
  box-shadow: inset 0 -3px 0 var(--bb-amber);
}
.bb-shell .bb-legend-mark.reviewed {
  border: 2px solid var(--bb-rose);
}
.bb-shell .bb-qnav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.9rem;
  max-height: 16rem;
  overflow: auto;
}
.bb-shell .bb-qnav-dot {
  min-height: 2.6rem;
  color: var(--bb-ink);
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 0.55rem;
  font-weight: 800;
}
.bb-shell .bb-qnav-dot.current {
  color: #fff;
  background: var(--bb-teal);
}
.bb-shell .bb-qnav-dot.reviewed {
  border: 2px solid var(--bb-rose);
}
.bb-shell .bb-qnav-dot.answered {
  box-shadow: inset 0 -4px 0 var(--bb-amber);
}
.bb-shell .bb-qnav-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

/* ---- 对话框 ---- */
.bb-shell .bb-dialog-mask {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(10 31 34 / 58%);
}
.bb-shell .bb-dialog {
  width: min(38rem, 100%);
  max-height: min(42rem, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.4rem;
  color: var(--bb-ink);
  background: var(--bb-surface);
  border-radius: 1rem;
  box-shadow: var(--bb-shadow);
}
.bb-shell .bb-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.bb-shell .bb-dialog-title {
  margin: 0;
  font-size: 1.3rem;
}
.bb-shell .bb-dialog-title:focus {
  outline: none;
}
.bb-shell .bb-dialog p,
.bb-shell .bb-dialog li {
  color: var(--bb-muted);
  line-height: 1.6;
}
.bb-shell .bb-dialog-close {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--bb-ink);
  background: transparent;
  border: 1px solid var(--bb-line);
  border-radius: 50%;
}
.bb-shell .bb-dialog-status {
  margin: 0.8rem 0 1rem;
  padding: 0.65rem 0.8rem;
  color: #6f4800;
  background: #fff4cf;
  border: 1px solid #e7c56f;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.bb-shell .bb-shortcut-scroll {
  max-height: 26rem;
  overflow: auto;
  border: 1px solid var(--bb-line);
  border-radius: 0.75rem;
}
.bb-shell .bb-shortcut-table {
  width: 100%;
  border-collapse: collapse;
}
.bb-shell .bb-shortcut-table th,
.bb-shell .bb-shortcut-table td {
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--bb-line);
  text-align: left;
  font-weight: 500;
}
.bb-shell .bb-shortcut-table th {
  width: 11rem;
}
.bb-shell .bb-shortcut-table kbd {
  padding: 0.2rem 0.42rem;
  background: #edf4f1;
  border: 1px solid var(--bb-line);
  border-radius: 0.3rem;
  font-family: inherit;
}
.bb-shell .bb-topic-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 0.38fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.bb-shell .bb-topic-list {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}
.bb-shell .bb-topic-btn {
  padding: 0.55rem 0.7rem;
  color: var(--bb-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  text-align: left;
}
.bb-shell .bb-topic-btn[aria-pressed="true"] {
  color: var(--bb-teal);
  background: #e6f2ef;
  border-color: #a9ceca;
  font-weight: 780;
}
.bb-shell .bb-topic-panel {
  min-height: 12rem;
  padding: 1rem;
  background: #f1f5f3;
  border-radius: 0.75rem;
}
.bb-shell .bb-topic-panel h3 {
  margin-top: 0;
}
.bb-shell .bb-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--bb-line);
}
.bb-shell .bb-line-reader-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.bb-shell .bb-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

/* ---- 目录页开关 + Module X 继续作答卡 ---- */
.bb-mode-toggle {
  margin: 10px auto 0;
  max-width: 720px;
  padding: 10px 14px;
  border: 1px solid #a9ceca;
  border-radius: 12px;
  background: #f1f7f5;
}
.bb-mode-toggle.is-on {
  border-color: #075b5e;
  box-shadow: inset 0 0 0 1px #075b5e;
}
.bb-mode-toggle-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  cursor: pointer;
}
.bb-mode-toggle-input {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  accent-color: #075b5e;
}
.bb-mode-toggle-title {
  font-weight: 800;
  color: #075b5e;
}
.bb-mode-toggle-desc {
  font-size: 12px;
  color: #5e6d73;
  line-height: 1.5;
}
.bb-resume-card {
  margin: 12px auto 0;
  max-width: 720px;
  padding: 14px 16px;
  border: 1px solid #e7c56f;
  border-radius: 12px;
  background: #fff8e1;
}
.bb-resume-title {
  font-weight: 800;
  margin-bottom: 4px;
}
.bb-resume-meta {
  font-size: 13px;
  color: #5e6d73;
  margin-bottom: 10px;
}
.bb-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bb-resume-error {
  margin-top: 8px;
  color: #b91c1c;
  font-size: 13px;
}

/* ---- 移动端堆叠 ---- */
@media (max-width: 760px) {
  .bb-shell .bb-header {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    min-height: auto;
    padding: 0.5rem 0.7rem;
  }
  .bb-shell .bb-header-center {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .bb-shell .bb-header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .bb-shell .bb-directions-button,
  .bb-shell .bb-notes-button,
  .bb-shell .bb-font-ctrl {
    display: none;
  }
  .bb-shell .bb-timer-stack {
    min-width: 5.8rem;
  }
  .bb-shell .bb-main {
    padding: 0.6rem;
  }
  .bb-shell .bb-item-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .bb-shell .bb-passage-pane {
    border-bottom: 1px solid var(--bb-line);
  }
  .bb-shell .bb-pane-divider {
    display: none;
  }
  .bb-shell .bb-passage-pane,
  .bb-shell .bb-question-pane {
    padding: 1rem;
  }
  .bb-shell .bb-nav {
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.55rem 0.6rem;
  }
  .bb-shell .bb-nav-left {
    display: none;
  }
  .bb-shell .bb-nav-center {
    justify-self: stretch;
    text-align: center;
  }
  .bb-shell .bb-qnav-trigger {
    width: 100%;
  }
  .bb-shell .bb-nav-right {
    gap: 0.35rem;
  }
  .bb-shell .bb-nav-btn {
    padding-inline: 0.7rem;
  }
  .bb-shell .bb-topic-layout {
    grid-template-columns: 1fr;
  }
  .bb-shell .bb-topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bb-shell .bb-choice-row {
    grid-template-columns: minmax(0, 1fr) 2.6rem;
  }
  .bb-shell .bb-workspace.is-tool-open:not(.is-tool-flow) {
    grid-template-columns: 1fr;
  }
  .bb-shell .bb-tool-dock {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-shell *,
  .bb-shell *::before,
  .bb-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
