/* ==========================================================================
   《马克思主义基本原理》在线刷题与模拟考试系统 - 高校学术风样式表
   纯静态零外部依赖 · 响应式适配 PC / 平板 / 手机端
   ========================================================================== */

:root {
  --brand-crimson: #8b1e24;
  --brand-crimson-hover: #70161b;
  --brand-crimson-soft: #fdf2f2;
  --brand-crimson-border: #f3d0d2;
  --brand-navy: #1b2a4a;
  --brand-navy-soft: #eef2f8;
  --brand-gold: #c69214;
  --brand-gold-soft: #fef9ec;

  --bg-page: #f5f4f0;
  --bg-surface: #ffffff;
  --bg-subtle: #f9f8f6;
  --border-light: #e6e4dd;
  --border-strong: #d1cec4;

  --text-primary: #1c2026;
  --text-secondary: #4e5663;
  --text-muted: #7b8391;

  --success: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --shadow-sm: 0 1px 3px rgba(27, 42, 74, 0.06);
  --shadow-md: 0 4px 14px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 12px 32px rgba(27, 42, 74, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
}

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

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Top Academic Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1b2a4a 0%, #24365c 55%, #6e1920 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.18);
  border-bottom: 3px solid var(--brand-gold);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 20px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}

.brand-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffd97d;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  color: #ffffff;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.autosave-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.autosave-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
}

.header-util-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.header-util-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Primary Mode Tabs */
.mode-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 2px;
}

.mode-nav::-webkit-scrollbar {
  display: none;
}

.mode-tab {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.mode-tab.active {
  background: var(--bg-page);
  color: var(--brand-crimson);
  border-color: var(--bg-page);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 700;
}

.mode-tab.active .tab-badge {
  background: var(--brand-crimson);
  color: #ffffff;
}

.mode-tab .tab-badge.wrong-badge {
  background: #ef4444;
  color: #ffffff;
}

/* Secondary Sub-bar (Paper selector / Mode filters / Timer) */
.sub-toolbar-wrap {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.sub-toolbar {
  max-width: 1360px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.paper-pills, .filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  appearance: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-btn:hover {
  border-color: var(--brand-crimson);
  color: var(--brand-crimson);
  background: var(--brand-crimson-soft);
}

.pill-btn.active {
  background: var(--brand-crimson);
  color: #ffffff;
  border-color: var(--brand-crimson);
  font-weight: 600;
}

.pill-sub-meta {
  font-size: 11px;
  opacity: 0.86;
}

.toolbar-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Countdown Timer Pill */
.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  border: 1px solid #cbd5e1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.timer-box.urgent {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
  animation: pulseBorder 1.2s infinite;
}

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.25); }
  50% { box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12); }
}

/* Main Two-Column Layout (Left Question Area + Right Fixed Sticky Answer Nav) */
.workspace-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 22px;
  align-items: start;
}

.main-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Score Report Banner (Displayed upon submission) */
.score-report-card {
  background: linear-gradient(135deg, #ffffff 0%, #fcfaf5 100%);
  border: 1px solid var(--brand-crimson-border);
  border-left: 5px solid var(--brand-crimson);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-md);
}

.score-report-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.score-headline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.score-big-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-crimson);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-total-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.score-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.metric-box .m-label {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-box .m-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.report-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Section Info Header */
.section-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.section-banner-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--brand-navy);
}

.section-banner-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Question Card */
.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  scroll-margin-top: calc(var(--header-offset, 82px) + 14px);
}

.question-card.active-focus {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.question-card.highlight-pulse {
  animation: cardLocatePulse 1.1s ease;
}

@keyframes cardLocatePulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 30, 36, 0.38); border-color: var(--brand-crimson); }
  70% { box-shadow: 0 0 0 8px rgba(139, 30, 36, 0); border-color: var(--brand-crimson); }
  100% { box-shadow: var(--shadow-sm); }
}

.q-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.q-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.q-index-badge {
  background: var(--brand-navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.q-paper-tag {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-size: 12px;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
}

.q-type-tag {
  background: var(--brand-crimson-soft);
  color: var(--brand-crimson);
  border: 1px solid var(--brand-crimson-border);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
}

.q-type-tag.multi-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.q-type-tag.subj-tag {
  background: var(--brand-gold-soft);
  color: #92400e;
  border-color: #fde68a;
}

.q-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-btn {
  appearance: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.flag-btn:hover {
  border-color: var(--brand-gold);
  color: #92400e;
}

.flag-btn.flagged {
  background: var(--warning-bg);
  color: #b45309;
  border-color: #f59e0b;
  font-weight: 600;
}

/* Stem & Materials */
.q-stem {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 18px;
  white-space: pre-line;
}

.materials-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.material-passage {
  background: #faf9f5;
  border: 1px solid #e5e2d9;
  border-left: 4px solid var(--brand-navy);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.78;
  color: #2c333e;
  white-space: pre-line;
}

.sub-questions-box {
  background: var(--brand-navy-soft);
  border: 1px solid #d5dfed;
  border-radius: var(--radius-md);
  padding: 13px 16px;
  margin-bottom: 16px;
}

.sub-questions-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.sub-question-item {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.65;
  margin-bottom: 6px;
}

.sub-question-item:last-child {
  margin-bottom: 0;
}

/* Options List (Supports 4 Options A~D and 5 Options A~E seamlessly) */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

@media (hover: hover) {
  .option-item:hover:not(.locked) {
    border-color: var(--brand-navy);
    background: #f2f5fa;
  }
}

.option-item:active:not(.locked) {
  transform: scale(0.992);
}

.option-key {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s ease;
}

.option-item.multi-opt .option-key {
  border-radius: 6px;
}

.option-item.selected {
  border-color: var(--brand-navy);
  background: var(--brand-navy-soft);
}

.option-item.selected .option-key {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
}

/* Answer Revealed / Submitted Option Highlighting */
.option-item.opt-correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.option-item.opt-correct .option-key {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.option-item.opt-wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.option-item.opt-wrong .option-key {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.option-item.opt-missed {
  border-color: var(--success);
  border-style: dashed;
  background: #f0fdf4;
}

.option-item.opt-missed .option-key {
  border-color: var(--success);
  color: var(--success);
  background: #ffffff;
}

.option-text {
  flex: 1;
  word-break: break-word;
}

.option-state-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tag-hit {
  background: #dcfce7;
  color: #166534;
}

.tag-miss {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.tag-err {
  background: #fee2e2;
  color: #991b1b;
}

.multi-selection-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: -6px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Subjective Note / Draft Input Area */
.subjective-draft-box {
  margin-bottom: 16px;
}

.draft-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.draft-textarea {
  width: 100%;
  min-height: 115px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fcfbf9;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.draft-textarea:focus {
  outline: none;
  border-color: var(--brand-navy);
  background: #ffffff;
}

.mastery-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mastery-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.mastery-btn {
  appearance: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mastery-btn.active-mastered {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.mastery-btn.active-review {
  background: var(--warning-bg);
  border-color: #f59e0b;
  color: var(--warning);
}

/* Card Action Footer (Prev / Show Answer / Next) */
.q-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.footer-left-btns, .footer-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
  border: 1px solid transparent;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
  background: var(--brand-navy-soft);
}

.btn-primary {
  background: var(--brand-crimson);
  color: #ffffff;
  border-color: var(--brand-crimson);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-crimson-hover);
}

.btn-navy {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.btn-navy:hover:not(:disabled) {
  background: #121d35;
}

.btn-reveal {
  background: var(--brand-gold-soft);
  color: #92400e;
  border-color: #f59e0b;
}

.btn-reveal:hover {
  background: #fef0c7;
}

.btn-reveal.revealed {
  background: #92400e;
  color: #ffffff;
  border-color: #92400e;
}

.btn-danger-soft {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger-soft:hover {
  background: #fee2e2;
}

/* Answer & Explanation Box */
.answer-panel {
  margin-top: 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--brand-navy);
  padding: 16px 18px;
  animation: fadeSlideDown 0.18s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.answer-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}

.ans-kv-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ans-kv {
  font-size: 14px;
  color: var(--text-secondary);
}

.ans-kv strong {
  font-size: 16px;
  font-weight: 800;
  margin-left: 4px;
}

.ans-official {
  color: var(--success);
}

.ans-user-right {
  color: var(--success);
}

.ans-user-wrong {
  color: var(--danger);
}

.judge-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.judge-pill.correct {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.judge-pill.wrong {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.judge-pill.neutral {
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
}

.topic-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.analysis-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: #27303f;
}

.answer-points-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.answer-point-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14.5px;
  line-height: 1.72;
  color: #1e293b;
}

.point-bullet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-crimson-soft);
  color: var(--brand-crimson);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Right Fixed Sticky Answer Navigation Sidebar (答题导航页)
   ========================================================================== */
.nav-sidebar {
  position: sticky;
  top: calc(var(--header-offset, 76px) + 14px);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  max-height: calc(var(--real-vh, 1vh) * 100 - var(--header-offset, 76px) - 28px);
  overflow: hidden;
}

.nav-sidebar-header {
  padding: 14px 16px 12px;
  background: #faf9f6;
  border-bottom: 1px solid var(--border-light);
}

.nav-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.nav-title {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.locate-btn {
  appearance: none;
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.locate-btn:hover {
  background: var(--brand-navy);
  color: #ffffff;
}

/* Progress Bar */
.progress-bar-wrap {
  margin-bottom: 10px;
}

.progress-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.progress-track {
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-crimson));
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Nav Status Filter Tabs (全部 / 未答 / 已答 / 已标记) */
.nav-status-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #eeece6;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.nav-filter-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-filter-btn.active {
  background: #ffffff;
  color: var(--brand-crimson);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Legend Row */
.nav-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-muted);
  background: #ffffff;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
}

.legend-swatch.sw-answered {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

.legend-swatch.sw-flagged {
  background: #fffbeb;
  border-color: #f59e0b;
}

.legend-swatch.sw-correct {
  background: var(--success);
  border-color: var(--success);
}

.legend-swatch.sw-wrong {
  background: var(--danger);
  border-color: var(--danger);
}

/* Scrollable Question Number Grid */
.nav-sections-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-group-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-num-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.nav-num-btn {
  position: relative;
  appearance: none;
  height: 34px;
  border-radius: 6px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
  font-variant-numeric: tabular-nums;
}

.nav-num-btn:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}

/* Answered State: Clearly Highlighted! */
.nav-num-btn.is-answered {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
  font-weight: 700;
}

/* Subjective Mastered / Review tint in Subjectives Mode */
.nav-num-btn.is-mastered {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
}

/* Post-Submit Right / Wrong Colors */
.nav-num-btn.is-correct {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.nav-num-btn.is-wrong {
  background: var(--danger);
  border-color: var(--danger);
}

/* Active Current Question Focus Ring */
.nav-num-btn.is-current {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--brand-crimson);
  z-index: 2;
}

/* Flagged Corner Badge */
.nav-flag-corner {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 9px;
  line-height: 13px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Sidebar Bottom Submit / Reset Actions */
.nav-sidebar-footer {
  padding: 12px 16px;
  background: #faf9f6;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-sidebar-footer .btn {
  width: 100%;
}

/* Empty State Card */
.empty-state-card {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* Custom Modal & Toast (Canvas Sandbox Safe: No alert/confirm) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideDown 0.18s ease;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-navy);
}

.modal-body {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  background: rgba(27, 42, 74, 0.94);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeSlideDown 0.2s ease;
}

/* Mobile Floating Answer Sheet Toggle */
.mobile-sheet-fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 150;
  background: var(--brand-crimson);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 190;
}

/* Touch & Mobile Utility Helpers */
button, .option-item, .mode-tab, .pill-btn, .nav-num-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.show-on-mobile {
  display: none;
}

.sheet-drag-bar {
  display: none;
}

.mobile-bottom-bar {
  display: none;
}

.swipe-tip-banner {
  display: none;
}

/* JS Real-time Viewport Tier + Media Query Dual Adaptation */
html[data-viewport-tier="tablet"] .workspace-container,
html[data-viewport-tier="mobile"] .workspace-container,
html[data-viewport-tier="xs"] .workspace-container {
  grid-template-columns: 1fr;
}

/* Short Landscape Phone Auto-Adaptation */
html[data-landscape-short="true"] .site-header {
  position: relative;
}
html[data-landscape-short="true"] .nav-sidebar {
  max-height: calc(var(--real-vh, 1vh) * 90);
}

/* Tablet & Mobile Shared Breakpoint (<= 1080px) */
@media (max-width: 1080px) {
  .workspace-container {
    grid-template-columns: 1fr;
    padding: 14px 14px 84px;
  }

  .nav-sidebar {
    position: fixed;
    top: 0;
    right: -380px;
    bottom: 0;
    width: min(350px, 88vw);
    max-height: 100vh;
    border-radius: 14px 0 0 14px;
    z-index: 210;
    transition: right 0.25s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-sidebar.mobile-open {
    right: 0;
  }

  .mobile-drawer-backdrop.open {
    display: block;
  }

  .mobile-sheet-fab {
    display: inline-flex;
  }
}

/* Dedicated Phone Adaptation (<= 768px) */
@media (max-width: 768px) {
  body {
    font-size: 14.5px;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: inline !important;
  }

  /* 1. Ultra-compact Sticky Header */
  .site-header {
    border-bottom-width: 2px;
  }

  .header-inner {
    padding: 8px 12px 0;
  }

  .brand-row {
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 7px;
  }

  .brand-title-group {
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .brand-emblem {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .brand-emblem svg {
    width: 18px;
    height: 18px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text h1 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtitle,
  .autosave-pill {
    display: none;
  }

  .header-meta-right {
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }

  .header-util-btn {
    padding: 4px 8px;
    font-size: 11.5px;
    border-radius: 6px;
  }

  /* Horizontal Swipe Mode Tabs */
  .mode-nav {
    gap: 5px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0;
  }

  .mode-tab {
    padding: 7px 11px;
    font-size: 12.5px;
    border-radius: 8px 8px 0 0;
    gap: 4px;
    scroll-snap-align: start;
  }

  .tab-badge {
    font-size: 10.5px;
    padding: 1px 5px;
  }

  /* 2. Single-row Horizontal Swipe Sub-toolbar */
  .sub-toolbar {
    padding: 8px 12px;
    gap: 7px;
    flex-direction: column;
    align-items: stretch;
  }

  .paper-pills,
  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }

  .paper-pills::-webkit-scrollbar,
  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex-shrink: 0;
    padding: 5px 11px;
    font-size: 12.5px;
  }

  .timer-box {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 12.5px;
  }

  .toolbar-right-controls {
    width: 100%;
    justify-content: space-between;
    border-top: 1px dashed var(--border-light);
    padding-top: 6px;
    gap: 6px;
  }

  /* 3. Workspace & Question Cards */
  .workspace-container {
    padding: 10px 10px 18px;
    gap: 10px;
  }

  .main-column {
    gap: 10px;
  }

  .section-banner {
    padding: 9px 12px;
    gap: 4px;
  }

  .section-banner-title {
    font-size: 14px;
  }

  .section-banner-desc {
    font-size: 11.5px;
  }

  .question-card {
    padding: 14px 13px;
    border-radius: 12px;
    scroll-margin-top: 96px;
  }

  .q-card-header {
    gap: 6px;
    margin-bottom: 11px;
  }

  .q-badges {
    gap: 5px;
  }

  .q-index-badge {
    font-size: 11.5px;
    padding: 2px 8px;
  }

  .q-paper-tag,
  .q-type-tag {
    font-size: 11px;
    padding: 2px 7px;
  }

  .flag-btn {
    padding: 4px 9px;
    font-size: 12px;
  }

  .q-stem {
    font-size: 15.5px;
    line-height: 1.68;
    margin-bottom: 14px;
  }

  .material-passage {
    padding: 11px 12px;
    font-size: 13.8px;
    line-height: 1.7;
  }

  .sub-questions-box {
    padding: 10px 12px;
  }

  .sub-question-item {
    font-size: 14px;
  }

  .options-list {
    gap: 9px;
    margin-bottom: 14px;
  }

  .option-item {
    min-height: 46px;
    padding: 10px 11px;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .option-key {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .multi-selection-hint {
    font-size: 12px;
    background: var(--bg-subtle);
    padding: 6px 10px;
    border-radius: 6px;
    margin: -4px 0 12px;
  }

  /* 16px font-size prevents iOS Safari automatic zoom on textarea focus */
  .draft-textarea {
    font-size: 16px;
    min-height: 110px;
    padding: 10px 12px;
  }

  .mastery-bar {
    gap: 6px;
  }

  .mastery-btn {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 13px;
  }

  .q-card-footer {
    padding-top: 12px;
    gap: 8px;
  }

  /* Hide duplicate card prev/next buttons when fixed bottom thumb bar is active in single mode */
  .q-card-footer .footer-right-btns {
    display: none;
  }

  .q-card-footer .footer-left-btns {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .q-card-footer .footer-left-btns .btn {
    flex: 1;
    padding: 9px 12px;
  }

  .swipe-tip-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    padding: 2px 0 4px;
  }

  /* Answer Panel Mobile Fit */
  .answer-panel {
    padding: 13px 13px;
    margin-top: 13px;
  }

  .ans-kv {
    font-size: 13px;
  }

  .ans-kv strong {
    font-size: 15px;
  }

  .analysis-body,
  .answer-point-item {
    font-size: 14px;
    line-height: 1.68;
  }

  /* Score Report Mobile 2-Column Grid */
  .score-report-card {
    padding: 14px;
  }

  .score-big-num {
    font-size: 28px;
  }

  .score-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-box {
    padding: 8px 10px;
  }

  .metric-box .m-val {
    font-size: 13.5px;
  }

  .report-actions-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .report-actions-bar .btn {
    padding: 8px 10px;
    font-size: 12.5px;
    width: 100%;
  }

  /* 4. Native Bottom-Sheet Answer Navigation Drawer on Phones */
  .mobile-sheet-fab {
    display: none !important;
  }

  .nav-sidebar {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(var(--real-vh, 1vh) * 82);
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.24);
  }

  .nav-sidebar.mobile-open {
    right: 0;
    transform: translateY(0);
  }

  .sheet-drag-bar {
    display: flex;
    justify-content: center;
    padding: 8px 0 2px;
    background: #faf9f6;
    cursor: pointer;
  }

  .sheet-drag-bar span {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .nav-sidebar-header {
    padding: 8px 14px 10px;
  }

  .nav-filter-btn {
    padding: 6px 4px;
    font-size: 12px;
  }

  .nav-sections-scroll {
    padding: 10px 14px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-num-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }

  .nav-num-btn {
    height: 38px;
    font-size: 13.5px;
  }

  .nav-sidebar-footer {
    flex-direction: row;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .nav-sidebar-footer .btn {
    flex: 1;
    padding: 9px 10px;
    font-size: 13px;
  }

  /* 5. Fixed Bottom Thumb Bar */
  .mobile-bottom-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 170;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-bar.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mbar-btn {
    appearance: none;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    color: var(--text-primary);
    border-radius: 9px;
    height: 40px;
    padding: 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    cursor: pointer;
  }

  .mbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .mbar-btn.mbar-primary {
    background: var(--brand-crimson);
    border-color: var(--brand-crimson);
    color: #ffffff;
  }

  .mbar-btn.mbar-navy {
    background: var(--brand-navy-soft);
    border-color: #cbd5e1;
    color: var(--brand-navy);
  }

  .mbar-btn.mbar-reveal-on {
    background: #92400e;
    border-color: #92400e;
    color: #ffffff;
  }

  /* Modal & Toast Mobile Positioning */
  .modal-backdrop {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-dialog {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-actions .btn {
    flex: 1;
    padding: 10px 12px;
  }

  .toast-container {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 28px);
    align-items: center;
  }

  .toast-msg {
    font-size: 12.5px;
    padding: 8px 14px;
    text-align: center;
  }
}

@media (max-width: 375px) {
  .brand-text h1 {
    font-size: 14px;
  }
  .nav-num-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .mbar-btn {
    font-size: 12px;
    padding: 0 4px;
  }
}

/* ==========================================================================
   v2.0 Full Bank Expansion Styles (Source Tags, Past Exam Pills, Paginators)
   ========================================================================== */
.pill-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-navy);
  background: var(--brand-navy-soft);
  border: 1px solid #d5dfed;
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-group-label.zhenti-label {
  color: var(--brand-crimson);
  background: var(--brand-crimson-soft);
  border-color: var(--brand-crimson-border);
}

.pill-group-divider {
  color: var(--border-strong);
  font-size: 13px;
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
}

.pill-btn.zhenti-pill {
  border-color: #f3c6c6;
  background: #fffafa;
  color: #7f1d1d;
}

.pill-btn.zhenti-pill:hover {
  border-color: var(--brand-crimson);
  background: var(--brand-crimson-soft);
  color: var(--brand-crimson);
}

.pill-btn.zhenti-pill.active {
  background: var(--brand-crimson);
  border-color: var(--brand-crimson);
  color: #ffffff;
}

/* Source Filter Select Dropdown */
.source-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231b2a4a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 28px 5px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-navy);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.source-select:hover,
.source-select:focus {
  outline: none;
  border-color: var(--brand-crimson);
}

/* Aggregated Deduplicated Source Tags on Question Cards */
.q-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.q-source-tag.is-zhenti {
  color: var(--brand-crimson);
  background: #fef2f2;
  border-color: #fecaca;
}

/* 100-Question Range Tabs inside Right Answer Navigation Card */
.nav-range-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px dashed var(--border-light);
  flex-shrink: 0;
}

.nav-range-tabs::-webkit-scrollbar {
  height: 4px;
}

.nav-range-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.nav-range-btn {
  appearance: none;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.14s ease;
}

.nav-range-btn:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}

.nav-range-btn.active {
  background: var(--brand-crimson);
  border-color: var(--brand-crimson);
  color: #ffffff;
}

/* Full-List Pagination Bar (>60 items) */
.list-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}

.list-page-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.list-page-info strong {
  color: var(--brand-navy);
}

@media (max-width: 768px) {
  .pill-group-label {
    font-size: 11px;
    padding: 3px 7px;
  }

  /* 16px font-size prevents iOS Safari automatic zoom when tapping select */
  .source-select {
    font-size: 16px;
    padding: 4px 26px 4px 10px;
    max-width: 196px;
  }

  .q-source-tag {
    font-size: 11px;
    padding: 2px 7px;
  }

  .nav-range-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-range-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-range-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .list-pagination-bar {
    padding: 9px 12px;
    gap: 8px;
  }

  .list-page-info {
    font-size: 12px;
  }
}
