/* Exam + CBT gate/guide/chrome (P4 #21) */
.exam-recall-banner {
  margin: 0;
  padding: 8px 16px;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #fcd34d;
}
.exam-recall-writing .section-tabs .tab-btn:not([data-section="writing"]) {
  display: none;
}

/* ----------------------------------------------------------------
   6. Exam Page
   ---------------------------------------------------------------- */
#page-exam { min-height: 100vh; background: var(--bg); }

/* Exam header */
.exam-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface); border-bottom: 1px solid var(--bd);
  box-shadow: var(--sh-sm);
}
.exam-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 28px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-body); font-size: 0.83rem; font-weight: 500;
  color: var(--tx-2); background: none; border: 1px solid var(--bd);
  border-radius: var(--r-sm); padding: 6px 14px; cursor: pointer;
  transition: all var(--t);
}
.back-btn:hover { border-color: var(--v-teal); color: var(--v-teal); }
.exam-title {
  font-family: var(--f-display); font-size: 1.1rem; font-weight: 700;
  color: var(--tx); letter-spacing: -0.01em; margin: 0;
}
.exam-controls { display: flex; align-items: center; gap: 10px; }

/* Timer */
.timer-box {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-sm); padding: 4px 16px;
}
.timer-label { font-size: 0.6rem; color: var(--tx-3); letter-spacing: 0.04em; text-transform: uppercase; }
.timer-value {
  font-family: var(--f-mono); font-size: 1.05rem; font-weight: 500;
  color: var(--tx); letter-spacing: 0.04em;
}
.timer-warning { color: var(--v-error) !important; }

/* Section tabs */
.section-tabs {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  display: flex; gap: 0; border-top: 1px solid var(--bd);
  overflow-x: auto;
}
.tab-btn {
  background: none; border: none; border-bottom: 2.5px solid transparent;
  padding: 11px 22px; font-family: var(--f-body);
  font-size: 0.88rem; font-weight: 500;
  color: var(--tx-3); cursor: pointer; white-space: nowrap;
  transition: all var(--t);
}
.tab-btn:hover { color: var(--tx-2); }
.tab-btn.active { color: var(--v-teal); border-bottom-color: var(--v-teal); font-weight: 600; }

/* Exam main */
.exam-main { max-width: 1200px; margin: 0 auto; padding: 28px 28px 120px; }
.section-panel { display: none; }
.section-panel.active { display: block; animation: panel-in 0.22s ease; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel-header { margin-bottom: 28px; }
.panel-header h2 {
  font-family: var(--f-display); font-size: 1.6rem; font-weight: 700;
  color: var(--tx); margin-bottom: 6px;
}
.panel-note { font-size: 0.85rem; color: var(--tx-2); }

/* Listening */
.listening-section {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--r-lg); margin-bottom: 20px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.ls-header {
  padding: 16px 22px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg);
}
.ls-header h3 { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--c-listen); }
.ls-desc { font-size: 0.8rem; color: var(--tx-3); }
.ls-toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 22px; }
.audio-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--c-listen);
  color: var(--c-listen); padding: 6px 16px;
  border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--f-body); font-size: 0.8rem; font-weight: 600;
  transition: all var(--t);
}
.audio-btn:hover { background: rgba(37,99,235,0.08); }
.audio-btn.audio-playing {
  background: var(--c-listen); color: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.75; } }
.transcript-toggle {
  background: none; border: 1px solid var(--bd);
  color: var(--tx-2); padding: 6px 14px;
  border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--f-body); font-size: 0.78rem;
  transition: all var(--t);
}
.transcript-toggle:hover { border-color: var(--v-teal); color: var(--v-teal); }
.ls-transcript {
  margin: 0 22px 16px; padding: 14px 18px;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-sm); font-size: 0.86rem;
  color: var(--tx-2); line-height: 1.8;
  max-height: 220px; overflow-y: auto;
}
.ls-transcript[hidden] { display: none !important; }
.ls-questions { padding: 4px 22px 20px; }
.ls-range {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tx-2);
  margin-left: 8px;
}

/* One exam unit: Questions X–Y */
.q-block { margin-bottom: 8px; }
.q-block-hd { margin-bottom: 10px; }
.q-block-range {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--tx);
  padding: 4px 10px;
  margin-bottom: 10px;
}
.notes-example-row { margin: 0 0 4px; font-size: 0.86rem; }
.notes-line {
  margin: 0.45em 0;
  line-height: 1.75;
}

/* Listening notes sheet (PDF-like form / note completion) */
.ls-layout { margin-top: 8px; }
.notes-sheet {
  border: 1.5px solid var(--tx);
  background: var(--card);
  padding: 18px 22px 20px;
  margin-bottom: 16px;
  color: var(--tx);
  font-size: 0.92rem;
  line-height: 1.7;
}
.notes-sheet-auto { border-color: var(--bd); }
.notes-instruction {
  margin: 0 0 4px;
  font-size: 0.84rem;
  color: var(--tx-2);
}
.notes-instruction-sub {
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: var(--tx-2);
}
.notes-title {
  margin: 6px 0 16px;
  text-align: center;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tx);
}
.notes-heading {
  margin: 14px 0 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--tx);
}
.notes-heading:first-of-type { margin-top: 4px; }
.notes-list {
  margin: 0 0 4px;
  padding-left: 1.25em;
}
.notes-list li {
  margin: 0.35em 0;
  padding-left: 0.15em;
}
.notes-example {
  text-decoration: underline;
  font-weight: 600;
  text-underline-offset: 2px;
}
.notes-blank {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  vertical-align: baseline;
  margin: 0 2px;
  max-width: 100%;
}
.notes-blank-num {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-listen);
  line-height: 1;
  flex-shrink: 0;
}
.notes-blank-input {
  display: inline-block;
  width: 8.5em;
  max-width: 42vw;
  border: none;
  border-bottom: 1.5px dotted var(--tx);
  border-radius: 0;
  background: transparent;
  padding: 1px 4px 2px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--tx);
  outline: none;
  transition: border-color var(--t), background var(--t);
}
.notes-blank-input:focus {
  border-bottom-style: solid;
  border-bottom-color: var(--c-listen);
  background: rgba(37, 99, 235, 0.06);
}
.notes-blank.correct .notes-blank-input {
  border-bottom-color: var(--c-read);
  background: rgba(5, 150, 105, 0.08);
}
.notes-blank.incorrect .notes-blank-input {
  border-bottom-color: var(--v-error);
  background: rgba(192, 57, 43, 0.06);
}
.notes-blank-missing {
  color: var(--v-error);
  font-family: var(--f-mono);
  font-size: 0.8rem;
}
.ls-map {
  margin: 12px 0 16px;
  text-align: center;
}
.ls-map img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--bd);
  background: #fff;
}
.notes-options {
  list-style: none;
  padding-left: 0.5em;
  margin: 6px 0 10px;
}
.notes-options li { margin: 0.2em 0; }
.notes-qlist {
  padding-left: 1.4em;
  margin: 8px 0;
}
.notes-flow {
  border-left: 3px solid var(--bd);
  padding-left: 14px;
  margin: 10px 0 6px;
}
.notes-flow p { margin: 0.4em 0; }
.notes-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-size: 0.9rem;
}
.notes-table th, .notes-table td {
  border: 1px solid var(--bd);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}
.notes-table th { background: var(--bg); font-weight: 700; }
.wt-prompt-box {
  background: var(--bg);
  border: 1px solid var(--bd);
  padding: 12px 14px;
  margin: 10px 0;
  line-height: 1.65;
}
.cue-like { border-width: 2px; }
@media (max-width: 600px) {
  .notes-sheet { padding: 14px 12px 16px; }
  .notes-blank-input { width: 7em; }
}

/* Answer toggle / panel */
.answer-toggle {
  display: inline-block; background: none;
  border: 1px solid var(--bd); color: var(--c-read);
  padding: 5px 14px; border-radius: var(--r-sm);
  cursor: pointer; font-family: var(--f-body);
  font-size: 0.78rem; margin: 0 22px 14px;
  transition: all var(--t);
}
.answer-toggle:hover { background: rgba(5,150,105,0.08); border-color: var(--c-read); }
.answer-toggle-reading { color: var(--c-read); }
.answers-panel {
  margin: 0 22px 16px; padding: 12px 16px;
  background: var(--bg); border-radius: var(--r-sm);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.answers-panel-listening { border: 1px solid rgba(37,99,235,0.3); }
.answers-panel-reading   { border: 1px solid rgba(5,150,105,0.3); }
.answer-row {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 6px; padding: 4px 10px; font-size: 0.8rem;
}
.ar-num { font-weight: 700; color: var(--tx-3); font-size: 0.75rem; font-family: var(--f-mono); }
.ar-ans { color: var(--c-read); font-weight: 600; }

/* Reading */
.reading-passage {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--r-lg); margin-bottom: 24px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.rp-header {
  padding: 16px 22px; border-bottom: 1px solid var(--bd);
  background: var(--bg);
}
.rp-header h3 { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--c-read); }
.rp-title { font-size: 1.05rem; font-weight: 700; color: var(--tx); margin-top: 2px; line-height: 1.35; }
.rp-text {
  padding: 4px 4px 20px; font-size: 0.95rem; line-height: 1.85;
  color: var(--tx);
}
.rp-text p { margin-bottom: 14px; }
.rp-text .para-label { font-weight: 700; color: var(--c-read); margin-right: 4px; }
.rp-questions { padding: 4px 4px 28px; }

/* Reading split layout (CBT-style) — panes scroll independently */
body.exam-reading-layout #page-exam {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.exam-reading-layout .exam-header {
  flex: 0 0 auto;
}
body.exam-reading-layout .exam-body-row {
  flex: 1 1 auto;
  min-height: 0;
}
body.exam-reading-layout .cbt-instr-banner {
  flex: 0 0 auto;
}
body.exam-reading-layout .exam-main {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 8px 12px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.exam-reading-layout .exam-footer {
  flex: 0 0 auto;
  position: relative; /* override fixed so flex height math works */
}
body.exam-reading-layout #panel-reading.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.exam-reading-layout #panel-reading .panel-header-reading {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
  padding: 0 4px;
}
body.exam-reading-layout #panel-reading .panel-header-reading h2 {
  margin: 0;
  font-size: 1rem;
}
body.exam-reading-layout #panel-reading .panel-header-reading .panel-note {
  margin: 0;
  font-size: 0.8rem;
}

.rd-split-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.rd-sec-tabs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rd-sec-tab {
  border: 1px solid var(--bd);
  background: var(--card);
  color: var(--tx-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--f-body);
  cursor: pointer;
  transition: all var(--t);
}
.rd-sec-tab:hover { border-color: var(--c-read); color: var(--c-read); }
.rd-sec-tab.active {
  background: var(--c-read);
  border-color: var(--c-read);
  color: #fff;
}

.reading-passage.rd-split {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d8d8d8;
  box-shadow: none;
  overflow: hidden;
}
.reading-passage.rd-split.active {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.rp-pane {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 28px;
  background: #fff;
}
.rp-pane-text { flex: 1 1 52%; }
.rp-pane-qs {
  flex: 1 1 48%;
  background: #fafafa;
}
.rp-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tx);
  margin: 0 0 14px;
  line-height: 1.35;
}
.rp-splitter {
  flex: 0 0 14px;
  align-self: stretch;
  position: relative;
  cursor: col-resize;
  background: linear-gradient(#e8e8e8, #e8e8e8) center/1px 100% no-repeat;
  touch-action: none;
  user-select: none;
}
.rp-splitter:hover,
.rp-splitter:focus-visible {
  background:
    linear-gradient(rgba(37, 99, 235, 0.35), rgba(37, 99, 235, 0.35)) center/2px 100% no-repeat,
    #f3f6fb;
  outline: none;
}
.rp-splitter-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #cfd6e0;
  background: #fff;
  color: #64748b;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
body.rd-splitting {
  cursor: col-resize !important;
  user-select: none !important;
}
body.rd-splitting iframe { pointer-events: none; }

body.dark-mode .reading-passage.rd-split,
body.dark-mode .rp-pane,
body.dark-mode .rp-pane-qs {
  background: var(--card);
  border-color: var(--bd);
}
body.dark-mode .rp-pane-qs { background: var(--bg); }
body.dark-mode .rp-splitter-grip {
  background: var(--card);
  border-color: var(--bd);
  color: var(--tx-2);
}

@media (max-width: 860px) {
  body.exam-reading-layout #page-exam {
    height: auto;
    overflow: auto;
  }
  body.exam-reading-layout .exam-main {
    overflow: visible;
    padding-bottom: 100px;
  }
  body.exam-reading-layout .exam-footer {
    position: fixed;
  }
  .reading-passage.rd-split.active {
    flex-direction: column;
    min-height: 70vh;
  }
  .rp-pane-text,
  .rp-pane-qs {
    flex: 1 1 50% !important;
    max-height: 45vh;
  }
  .rp-splitter {
    flex: 0 0 10px;
    cursor: row-resize;
    background: linear-gradient(#e8e8e8, #e8e8e8) center/100% 1px no-repeat;
  }
  .rp-splitter-grip { transform: translate(-50%, -50%) rotate(90deg); }
}

/* Reading highlight / notes (同桌录屏对齐) */
.rd-hl {
  background: #ffe566;
  color: inherit;
  border-radius: 1px;
  padding: 0 1px;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.rd-hl-note {
  background: #ffd54a;
}
.rd-anno-bar {
  position: fixed;
  z-index: 12000;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 2px;
  background: #fff;
  color: #333;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  font-family: var(--f-body);
  user-select: none;
}
.rd-anno-bar[hidden] { display: none !important; }
.rd-anno-icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #444;
  width: 42px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}
.rd-anno-icon-btn:hover { background: #f2f2f2; }
.rd-anno-icon-btn[hidden] { display: none !important; }
.rd-anno-icon-danger { color: #555; }
.rd-anno-icon-btn + .rd-anno-icon-btn:not([hidden]) {
  border-left: 1px solid #e5e5e5;
}

.rd-notes-drawer {
  flex: 0 0 320px;
  width: 320px;
  max-width: 40vw;
  background: #e8f1fb;
  border-left: 1px solid #c5d6ea;
  display: none;
  flex-direction: column;
  min-height: 0;
  z-index: 50;
}
#page-exam.rd-notes-open .rd-notes-drawer:not([hidden]),
.rd-notes-drawer:not([hidden]) {
  display: flex;
}
.rd-notes-drawer[hidden] { display: none !important; }
.rd-notes-drawer-hd {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  background: #dceaf8;
  border-bottom: 1px solid #c5d6ea;
}
.rd-notes-drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
}
.rd-notes-drawer-title-cn,
.rd-note-cn,
.rd-note-show-more-cn {
  font-weight: 500;
  opacity: 0.85;
}
.rd-notes-drawer-close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.45rem;
  line-height: 1;
  color: #444;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 3px;
}
.rd-notes-drawer-close:hover { background: rgba(0,0,0,0.06); }
.rd-notes-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 24px;
}
.rd-notes-empty {
  margin: 12px 4px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.45;
}
.rd-notes-part-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #222;
  margin: 12px 2px 6px;
}
.rd-note-card {
  background: transparent;
  margin-bottom: 18px;
}
.rd-note-card.is-focus .rd-note-ta {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.rd-note-card.is-saved .rd-note-save-btn {
  background: #16a34a;
}
.rd-note-quote {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  color: #555;
  line-height: 1.45;
  margin: 0 2px 4px;
}
.rd-note-show-more {
  appearance: none;
  border: none;
  background: none;
  color: #2563eb;
  font-size: inherit;
  font-style: italic;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.rd-note-ta {
  width: 100%;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  outline: none;
  color: #111;
  background: #fff;
  box-sizing: border-box;
}
.rd-note-ta:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.rd-note-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}
.rd-note-save-btn {
  appearance: none;
  border: none;
  background: #4a4a4a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.rd-note-save-btn:hover { background: #333; }
.rd-note-delete-link {
  appearance: none;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}
.rd-note-delete-link:hover { text-decoration: underline; }

.cbt-icon-btn.is-active {
  color: #1d4ed8;
  background: #e8f0fe;
}
#page-exam.cbt-reading.rd-notes-open .exam-main {
  min-width: 0;
}
@media (max-width: 900px) {
  .rd-notes-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 86vw;
    width: 300px;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  }
  #page-exam.rd-notes-open .exam-body-row {
    position: relative;
  }
}

/* Writing */
.writing-task {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--r-lg); margin-bottom: 20px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.wt-header {
  padding: 16px 22px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg);
}
.wt-header h3 { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--c-write); }
.wt-badge {
  font-size: 0.74rem; color: var(--c-write);
  background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.2);
  border-radius: 20px; padding: 3px 12px; font-weight: 500;
}
.wt-body { padding: 20px 22px; }
.chart-desc {
  background: var(--bg); border: 1.5px dashed var(--bd);
  border-radius: var(--r-sm); padding: 14px 16px;
  font-size: 0.84rem; color: var(--tx-2); margin-bottom: 16px;
  font-style: italic; line-height: 1.6;
}
.wt-prompt { font-size: 0.9rem; color: var(--tx); margin-bottom: 16px; line-height: 1.75; }
.wt-prompt strong { color: var(--c-write); }
.writing-textarea {
  width: 100%; min-height: 200px;
  background: var(--bg); border: 1.5px solid var(--bd);
  border-radius: var(--r-sm); padding: 14px 16px;
  font-size: 0.9rem; color: var(--tx); font-family: var(--f-body);
  resize: vertical; transition: border-color var(--t); line-height: 1.75;
  outline: none;
}
.writing-textarea:focus { border-color: var(--c-write); box-shadow: 0 0 0 3px rgba(217,119,6,0.1); }
.word-count { font-size: 0.76rem; color: var(--tx-3); margin-top: 6px; text-align: right; font-family: var(--f-mono); }
.wt-tips {
  margin-top: 12px; padding: 10px 14px;
  background: var(--bg); border-radius: var(--r-sm);
  font-size: 0.8rem; color: var(--tx-2); border-left: 3px solid rgba(217,119,6,0.3);
}

/* Speaking */
.speaking-part {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--r-lg); margin-bottom: 20px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.sp-header {
  padding: 16px 22px; border-bottom: 1px solid var(--bd);
  background: var(--bg);
}
.sp-header h3 { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--c-speak); }
.sp-desc { font-size: 0.8rem; color: var(--tx-2); margin-top: 3px; }
.sp-body { padding: 20px 22px; }
.cue-card {
  background: var(--bg); border: 2px solid rgba(124,58,237,0.2);
  border-radius: var(--r-sm); padding: 18px; margin-bottom: 16px;
}
.cue-card h4 { font-family: var(--f-display); font-size: 1rem; font-weight: 700; color: var(--c-speak); margin-bottom: 10px; }
.cue-card ul { padding-left: 20px; }
.cue-card ul li { font-size: 0.88rem; margin-bottom: 6px; color: var(--tx); }
.cue-note { font-size: 0.8rem; color: var(--tx-3); margin-top: 10px; font-style: italic; }
.speaking-q-list { list-style: none; padding: 0; }
.speaking-q-item {
  padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--r-sm);
  margin-bottom: 10px; font-size: 0.88rem; color: var(--tx);
  display: flex; gap: 12px; align-items: flex-start;
}
.q-num { font-weight: 700; color: var(--c-speak); min-width: 24px; font-family: var(--f-mono); font-size: 0.82rem; }
.speaking-notes {
  width: 100%; min-height: 80px; background: var(--bg);
  border: 1.5px solid var(--bd); border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 0.86rem; color: var(--tx);
  font-family: var(--f-body); resize: vertical; margin-top: 14px;
  transition: border-color var(--t); outline: none;
}
.speaking-notes:focus { border-color: var(--c-speak); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

/* Questions (shared) */
.question-block {
  margin-bottom: 18px; padding: 16px 18px;
  background: var(--bg); border-radius: var(--r-sm);
  border: 1px solid var(--bd);
}
.question-block.correct { border-color: var(--c-read); background: rgba(5,150,105,0.05); }
.question-block.incorrect { border-color: var(--v-error); background: rgba(192,57,43,0.05); }
.q-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  color: var(--tx-3); margin-bottom: 7px; letter-spacing: 0.06em;
  font-family: var(--f-mono);
}
.q-text { font-size: 0.9rem; color: var(--tx); margin-bottom: 12px; line-height: 1.65; }
.q-options { display: flex; flex-direction: column; gap: 8px; }
.q-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border: 1.5px solid var(--bd);
  border-radius: var(--r-sm); cursor: pointer;
  transition: all var(--t); font-size: 0.88rem;
  background: var(--card); color: var(--tx);
}
.q-option:hover { border-color: var(--v-teal); background: var(--v-teal-lt); }
.q-option input[type="radio"] { accent-color: var(--v-teal); flex-shrink: 0; }
.q-option.selected { border-color: var(--v-teal); background: var(--v-teal-lt); }
.q-option.correct-answer { border-color: var(--c-read) !important; background: rgba(5,150,105,0.08) !important; }
.q-option.wrong-answer   { border-color: var(--v-error) !important; background: rgba(192,57,43,0.06) !important; }
.q-input {
  width: 100%; padding: 9px 13px;
  background: var(--card); border: 1.5px solid var(--bd);
  border-radius: var(--r-sm); font-size: 0.9rem;
  color: var(--tx); font-family: var(--f-body);
  transition: border-color var(--t); outline: none;
}
.q-input:focus { border-color: var(--v-teal); box-shadow: 0 0 0 3px var(--v-teal-lt); }
.q-feedback { margin-top: 8px; font-size: 0.8rem; font-weight: 600; }
.q-feedback.correct   { color: var(--c-read); }
.q-feedback.incorrect { color: var(--v-error); }

/* Exam footer */
.exam-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface); border-top: 1px solid var(--bd);
  box-shadow: 0 -4px 20px rgba(24,39,58,0.08);
}
.exam-footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 28px; display: flex; justify-content: flex-end;
}
.submit-btn {
  background: var(--v-ink); color: var(--v-cream);
  border: none; padding: 12px 28px;
  border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--f-body); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.02em; transition: all var(--t);
  position: relative; overflow: hidden;
}
.submit-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.submit-btn:hover {
  background: var(--v-teal); transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--v-teal-glow);
}
#page-cbt-gate {
  min-height: 100vh;
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}
#page-cbt-gate.active { display: flex; }

.cbt-scene {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 28, 48, 0.35) 0%, rgba(12, 28, 48, 0.15) 40%, rgba(20, 60, 40, 0.25) 100%),
    radial-gradient(ellipse at 50% 0%, #7eb6d9 0%, #4a7fa3 35%, transparent 60%),
    linear-gradient(180deg, #8ec5e8 0%, #c5dff0 28%, #dce9c8 55%, #6b9b4a 78%, #3d6b2e 100%);
  z-index: 0;
}
.cbt-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 65%, rgba(255, 220, 120, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle at 45% 80%, rgba(255, 255, 255, 0.1) 0 2px, transparent 3px);
  opacity: 0.7;
  pointer-events: none;
}

.cbt-shell {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1a1a1a;
}

.cbt-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4a9fd8;
  color: #fff;
  padding: 6px 10px;
  font-size: 0.82rem;
}
.cbt-close {
  border: none;
  background: #e25555;
  color: #fff;
  width: 22px;
  height: 20px;
  line-height: 18px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.cbt-close:hover { background: #c94444; }

.cbt-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid #d8d8d8;
  background: #f7f7f7;
}
.cbt-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 6px 10px 8px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 0.72rem;
  cursor: default;
  border-bottom: 2px solid transparent;
}
.cbt-tab.active {
  color: #1a6fb5;
  border-bottom-color: #1a6fb5;
  font-weight: 600;
}
.cbt-tab-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e4e4e4;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #555;
}
.cbt-tab.active .cbt-tab-ico {
  background: #d6ebf8;
  color: #1a6fb5;
}
.cbt-tabs-trail {
  margin-left: auto;
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
  opacity: 0.55;
  font-size: 0.9rem;
}

.cbt-body {
  padding: 28px 36px 20px;
  min-height: 340px;
}
.cbt-h {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}
.cbt-sub {
  margin: 0 0 22px;
  color: #666;
  font-size: 0.92rem;
}
.cbt-field {
  display: grid;
  grid-template-columns: 88px minmax(160px, 280px) 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cbt-field label {
  font-size: 0.95rem;
  color: #333;
}
.cbt-input {
  height: 34px;
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  padding: 0 10px;
  font-size: 0.95rem;
  font-family: inherit;
}
.cbt-input:focus {
  outline: 2px solid #4a9fd8;
  outline-offset: 1px;
  border-color: #4a9fd8;
}
.cbt-hint {
  color: #8a8a8a;
  font-size: 0.88rem;
}
.cbt-warn {
  color: #d32f2f;
  font-size: 0.88rem;
  margin: 18px 0 10px;
  line-height: 1.5;
}
.cbt-center-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.cbt-btn {
  min-width: 120px;
  height: 36px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background: #ececec;
  color: #333;
  font-size: 0.95rem;
  cursor: pointer;
}
.cbt-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cbt-btn:not(:disabled):hover {
  background: #e0e0e0;
}
.cbt-btn-next {
  border-radius: 18px;
  padding: 0 22px;
  min-width: 96px;
}

.cbt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #ddd;
  background: #fafafa;
}
.cbt-skip-link {
  border: none;
  background: none;
  color: #1a6fb5;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.cbt-skip-link:hover { color: #0d4f86; }

.cbt-status-red {
  color: #d32f2f;
  font-size: 0.9rem;
  font-weight: 600;
}
.cbt-info-box {
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  padding: 0 0 20px;
}
.cbt-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5e5;
  background: #f9f9f9;
  font-size: 0.95rem;
}
.cbt-video-mock {
  margin: 18px 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 28px 24px;
  text-align: left;
}
.cbt-video-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 18px;
}
.cbt-tips {
  font-size: 0.92rem;
  color: #333;
  line-height: 1.55;
}
.cbt-tips ul {
  margin: 6px 0 12px 1.2em;
  padding: 0;
}
.cbt-confirm-prompt {
  text-align: center;
  margin: 8px 20px 14px;
  color: #444;
}
.cbt-confirm-btn {
  display: block;
  margin: 0 auto;
  min-width: 140px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: #2f2f2f;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.cbt-confirm-btn:hover { background: #1f1f1f; }

@media (max-width: 720px) {
  .cbt-body { padding: 20px 16px; min-height: 280px; }
  .cbt-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cbt-tabs-trail { display: none; }
}

/* ----------------------------------------------------------------
   CBT Guide — post-pincode orientation dashboard
   ---------------------------------------------------------------- */
#page-cbt-guide {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: #ececec;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1a1a1a;
}
#page-cbt-guide.active { display: flex; }

.cbt-guide-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #d0d0d0;
}
.cbt-guide-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  min-height: 52px;
  flex-wrap: wrap;
}
.cbt-guide-top-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  flex: 1 1 240px;
  min-width: 0;
  font-size: 0.82rem;
  color: #222;
}
.cbt-guide-brand {
  font-weight: 700;
  color: #c41e2a;
  letter-spacing: 0.02em;
}
.cbt-guide-taker,
.cbt-guide-paper { font-weight: 600; white-space: nowrap; }
.cbt-guide-timer {
  font-variant-numeric: tabular-nums;
  color: #333;
  white-space: nowrap;
}
.cbt-guide-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.cbt-guide-finish-btn {
  min-width: 108px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #222;
  border-radius: 2px;
  background: #fff;
  color: #111;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cbt-guide-finish-btn:hover { background: #f5f5f5; }
.cbt-guide-finish-btn.is-ready {
  border-color: #2e7d32;
  background: #2e7d32;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.22);
  animation: cbt-guide-finish-pulse 2s ease-in-out infinite;
}
.cbt-guide-finish-btn.is-ready:hover { background: #256b28; }
@keyframes cbt-guide-finish-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.12); }
}
.cbt-guide-panel--all-done .cbt-guide-mock-note {
  color: #2e7d32;
  font-weight: 600;
}
.cbt-guide-icon { opacity: 0.55; font-size: 0.95rem; }
.cbt-guide-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #444;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.cbt-guide-icon-btn:disabled { opacity: 0.45; cursor: default; }

.cbt-guide-main {
  flex: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 16px 32px;
}
.cbt-guide-panel {
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  overflow: hidden;
}
.cbt-guide-section {
  padding: 16px 22px 18px;
  border-bottom: 1px solid #e2e2e2;
}
.cbt-guide-section:last-child { border-bottom: none; }
.cbt-guide-section--video { padding-bottom: 14px; }

.cbt-guide-pretest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cbt-guide-pretest-head-text { flex: 1; min-width: 0; }
.cbt-guide-pretest-check {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1;
}
.cbt-guide-pretest-check[hidden] { display: none !important; }
.cbt-guide-pretest.is-complete .cbt-guide-pretest-head {
  padding-bottom: 0;
}
.cbt-guide-pretest.is-complete {
  padding-bottom: 14px;
}
.cbt-guide-pretest.is-complete .cbt-guide-pretest-body {
  display: none !important;
  margin: 0;
}
.cbt-guide-pretest-body {
  margin-top: 10px;
}

.cbt-guide-confirm {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e8e8e8;
}
.cbt-guide-confirm[hidden] { display: none !important; }
.cbt-guide-confirm-text {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #222;
  line-height: 1.45;
}
.cbt-guide-confirm-yes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.cbt-guide-confirm-yes input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.cbt-guide-next-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 8px;
}
.cbt-guide-next-row[hidden] { display: none !important; }
.cbt-guide-next-btn {
  min-width: 88px;
  height: 34px;
  padding: 0 18px;
  border: none;
  border-radius: 2px;
  background: #3a3a3a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-family: inherit;
}
.cbt-guide-next-btn:hover { background: #222; }

.cbt-guide-skill-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.cbt-guide-skill-head-text { flex: 1; min-width: 0; }
.cbt-guide-skill-check {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1;
}
.cbt-guide-skill.is-complete .cbt-guide-skill-head {
  padding-bottom: 0;
}

.cbt-guide-info {
  margin-bottom: 14px;
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  background: #fafafa;
}
.cbt-guide-info-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.cbt-guide-info-summary::-webkit-details-marker { display: none; }
.cbt-guide-info-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d32f2f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cbt-guide-info-badge.is-confirmed { color: #2e7d32; }
.cbt-guide-info-content {
  padding: 0 14px 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #444;
}
.cbt-guide-info-content p { margin: 0; }

.cbt-guide-skill-inner {
  border: 1px solid #e2e2e2;
  background: #fafafa;
}
.cbt-guide-skill-inner .cbt-guide-info {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid #e8e8e8;
}
.cbt-guide-skill-inner .cbt-guide-info-content {
  background: #fff;
}
.cbt-guide-skill-inner .cbt-guide-player-mount {
  padding: 12px;
  margin: 0;
  background: #fff;
}
.cbt-guide-skill-inner .cbt-guide-vid {
  border: none;
}
.cbt-guide-skill-inner .cbt-guide-ready {
  margin: 0;
  padding: 14px 12px 16px;
  border-top: 1px solid #e8e8e8;
  background: #fff;
}
.cbt-guide-skill-inner .cbt-guide-confirm-btn {
  border-color: #333;
  background: #3a3a3a;
  color: #fff;
}
.cbt-guide-skill-inner .cbt-guide-confirm-btn:hover {
  background: #222;
}
.cbt-guide-skill-inner .cbt-guide-confirm-btn.is-pressed {
  border-color: #2e7d32;
  background: #2e7d32;
}
.cbt-guide-skill-check[hidden] { display: none !important; }
.cbt-guide-skill.is-guide-confirmed .cbt-guide-skill-guide-media,
.cbt-guide-skill.is-guide-confirmed .cbt-guide-ready {
  display: none !important;
}
.cbt-guide-start-row[hidden] {
  display: none !important;
}
.cbt-guide-start-row.is-visible,
.cbt-guide-skill.is-guide-confirmed .cbt-guide-start-row,
.cbt-guide-skill.is-guide-confirmed .cbt-guide-start-row[hidden] {
  display: block !important;
}
.cbt-guide-skill-inner.is-guide-confirmed .cbt-guide-info {
  border-bottom: none;
}
.cbt-guide-start-row {
  padding: 12px 12px 14px;
  background: #fff;
}
.cbt-guide-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: none;
  border-radius: 2px;
  background: #222;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cbt-guide-start-btn:hover { background: #111; }
.cbt-guide-start-btn-arrow {
  font-size: 1rem;
  line-height: 1;
}
.cbt-guide-skill.is-expanded .cbt-guide-skill-head {
  margin-bottom: 0;
}

.cbt-guide-player-mount { margin-top: 4px; }

.cbt-guide-ready {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e8e8e8;
}
.cbt-guide-ready-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
}
.cbt-guide-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  background: #fff;
  color: #333;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cbt-guide-confirm-btn:hover { border-color: #888; }
.cbt-guide-confirm-btn.is-pressed {
  border-color: #2e7d32;
  background: #2e7d32;
  color: #fff;
}

.cbt-guide-skill.is-expanded {
  cursor: default;
  background: #fff;
}
.cbt-guide-skill.is-expanded .cbt-guide-skill-head { pointer-events: none; }
.cbt-guide-skill-body {
  margin-top: 12px;
  padding-top: 4px;
}
.cbt-guide-skill:not(.is-expanded) .cbt-guide-skill-body { display: none !important; }
.cbt-guide-panel:not(.cbt-guide-panel--pretest-done) .cbt-guide-skill {
  cursor: default;
  opacity: 0.72;
}
.cbt-guide-panel:not(.cbt-guide-panel--pretest-done) .cbt-guide-skill:hover {
  background: transparent;
}
.cbt-guide-panel.cbt-guide-panel--pretest-done:not(.cbt-guide-panel--listening-exam-done) .cbt-guide-skill[data-guide-skill="reading"],
.cbt-guide-panel.cbt-guide-panel--pretest-done:not(.cbt-guide-panel--listening-exam-done) .cbt-guide-skill[data-guide-skill="writing"] {
  cursor: default;
  opacity: 0.72;
}
.cbt-guide-panel.cbt-guide-panel--pretest-done:not(.cbt-guide-panel--listening-exam-done) .cbt-guide-skill[data-guide-skill="reading"]:hover,
.cbt-guide-panel.cbt-guide-panel--pretest-done:not(.cbt-guide-panel--listening-exam-done) .cbt-guide-skill[data-guide-skill="writing"]:hover {
  background: transparent;
}
.cbt-guide-panel.cbt-guide-panel--listening-exam-done:not(.cbt-guide-panel--reading-exam-done) .cbt-guide-skill[data-guide-skill="writing"] {
  cursor: default;
  opacity: 0.72;
}
.cbt-guide-panel.cbt-guide-panel--listening-exam-done:not(.cbt-guide-panel--reading-exam-done) .cbt-guide-skill[data-guide-skill="writing"]:hover {
  background: transparent;
}

.cbt-guide-card-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.cbt-guide-status {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d32f2f;
}
.cbt-guide-status.is-done { color: #2e7d32; }
.cbt-guide-timing {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: #333;
}

.cbt-guide-skill {
  min-height: 108px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cbt-guide-skill:hover,
.cbt-guide-skill.is-active { background: #fafafa; }
.cbt-guide-skill:focus-visible {
  outline: 2px solid #4a9fd8;
  outline-offset: -2px;
}

.cbt-guide-mock-note {
  margin: 12px 4px 0;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

.cbt-guide-vid {
  position: relative;
  border: 1px solid #e0e0e0;
  background: #fff;
  overflow: hidden;
}
.cbt-guide-vid-el {
  display: none;
  width: 100%;
  max-height: 320px;
  background: #111;
  object-fit: contain;
}
.cbt-guide-vid.is-playing .cbt-guide-vid-el { display: block; }

.cbt-guide-vid-poster {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #ececec;
  font-family: inherit;
}
.cbt-guide-vid.is-playing .cbt-guide-vid-poster,
.cbt-guide-vid.is-missing .cbt-guide-vid-poster,
.cbt-guide-vid.is-ended .cbt-guide-vid-poster { display: none; }

.cbt-guide-vid-ended {
  display: none;
  padding: 16px 18px 12px;
  background: #fff;
  min-height: 180px;
}
.cbt-guide-vid.is-ended .cbt-guide-vid-ended { display: block; }
.cbt-guide-vid.is-ended .cbt-guide-vid-el { display: none; }
.cbt-guide-vid.is-ended .cbt-guide-vid-play { display: none; }

.cbt-guide-vid-ended-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
}
.cbt-guide-vid-ended-tips {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #333;
}
.cbt-guide-vid-ended-tips p { margin: 0 0 8px; }
.cbt-guide-vid-ended-tips ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
}
.cbt-guide-vid-ended-tips li { margin-bottom: 4px; }
.cbt-guide-vid-ended-warn {
  color: #c41e2a !important;
  font-weight: 600;
}

.cbt-guide-vid-poster-art {
  display: grid;
  grid-template-columns: minmax(200px, 42%) 1fr;
  align-items: stretch;
  min-height: 168px;
  position: relative;
}
.cbt-guide-vid-poster-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 18px 20px;
  background: #c41e2a;
  color: #fff;
  text-align: left;
}
.cbt-guide-vid-poster-kicker {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}
.cbt-guide-vid-poster-title {
  font-size: 1rem;
  font-weight: 700;
}
.cbt-guide-vid-poster-sub {
  font-size: 0.92rem;
  font-weight: 600;
}
.cbt-guide-vid-poster-desc {
  margin-top: 4px;
  font-size: 0.76rem;
  line-height: 1.35;
  max-width: 240px;
  opacity: 0.95;
}
.cbt-guide-vid-poster-play {
  position: absolute;
  left: 21%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #c41e2a;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.cbt-guide-vid-missing {
  display: none;
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: #666;
  font-size: 0.88rem;
  background: #f7f7f7;
  min-height: 168px;
  align-items: center;
  justify-content: center;
}
.cbt-guide-vid.is-missing .cbt-guide-vid-missing { display: flex; }
.cbt-guide-vid.is-missing .cbt-guide-vid-controls { display: none; }

.cbt-guide-vid-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}
.cbt-guide-vid-lock {
  flex: 0 0 auto;
  width: 32px;
  height: 28px;
  border: none;
  border-radius: 2px;
  background: #1e6fd6;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: default;
  padding: 0;
}
.cbt-guide-vid-play {
  min-width: 56px;
  height: 28px;
  border: 1px solid #8ebfe0;
  border-radius: 2px;
  background: #e8f4fc;
  color: #1a6fb5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: inherit;
}
.cbt-guide-vid-seek {
  flex: 1 1 auto;
  accent-color: #4a9fd8;
  min-width: 0;
}
.cbt-guide-vid-time {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #555;
  white-space: nowrap;
  min-width: 88px;
  text-align: center;
}
.cbt-guide-vid-vol {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .cbt-guide-top-left { font-size: 0.76rem; }
  .cbt-guide-section { padding: 14px 14px 16px; }
  .cbt-guide-vid-poster-art {
    grid-template-columns: 1fr;
    min-height: 140px;
  }
  .cbt-guide-vid-poster-copy { min-height: 120px; }
  .cbt-guide-vid-poster-play {
    left: 50%;
    top: 38%;
  }
  .cbt-guide-skill { min-height: 92px; }
}

/* ================================================
   CBT chrome (同桌风格机考壳 — 听力 / 阅读)
   ================================================ */
#page-exam.cbt-listening .exam-header-classic,
#page-exam.cbt-listening .exam-footer-classic,
#page-exam.cbt-listening .panel-header-listening-classic,
#page-exam.cbt-reading .exam-header-classic,
#page-exam.cbt-reading .exam-footer-classic,
#page-exam.cbt-reading .panel-header-reading,
#page-exam.cbt-writing .exam-header-classic,
#page-exam.cbt-writing .exam-footer-classic,
#page-exam.cbt-writing .panel-header-writing {
  display: none !important;
}
#page-exam.cbt-listening .exam-header-cbt,
#page-exam.cbt-listening .exam-footer-cbt,
#page-exam.cbt-reading .exam-header-cbt,
#page-exam.cbt-reading .exam-footer-cbt,
#page-exam.cbt-writing .exam-header-cbt,
#page-exam.cbt-writing .exam-footer-cbt {
  display: block !important;
}
#page-exam.cbt-listening .cbt-rail {
  display: flex !important;
}
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .exam-header-cbt,
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .exam-footer-cbt,
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .cbt-rail,
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .cbt-instr-banner,
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .cbt-skill-bar {
  display: none !important;
}
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .exam-header-classic,
#page-exam:not(.cbt-listening):not(.cbt-reading):not(.cbt-writing) .exam-footer-classic {
  display: block;
}

#page-exam.cbt-listening,
#page-exam.cbt-reading,
#page-exam.cbt-writing {
  background: #fff;
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#page-exam.cbt-listening.active,
#page-exam.cbt-reading.active,
#page-exam.cbt-writing.active {
  display: flex;
}

.exam-header-cbt {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #fff;
  border-bottom: 1px solid #d0d0d0;
}
.cbt-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 12px;
  min-height: 52px;
  flex-wrap: wrap;
}
.cbt-brand {
  flex: 0 0 auto;
  font-size: 1.05rem;
  font-weight: 800;
  color: #c41e2a;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding-top: 4px;
  white-space: nowrap;
}
.cbt-brand[hidden] { display: none !important; }
.cbt-status-icons {
  display: none;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 0.95rem;
}
.cbt-status-ico { line-height: 1; }
#page-exam.cbt-reading .cbt-status-icons { display: inline-flex; }
#page-exam.cbt-reading .cbt-top {
  align-items: center;
  padding: 8px 16px;
  flex-wrap: nowrap;
}
#page-exam.cbt-reading .cbt-top-left {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.82rem;
}
#page-exam.cbt-reading .cbt-brand {
  display: block !important;
  flex: 0 0 auto;
  margin-right: 12px;
  padding-top: 2px;
  font-size: 1.1rem;
}
#page-exam.cbt-reading .cbt-top {
  flex-wrap: nowrap;
}
#page-exam.cbt-reading .cbt-top > .cbt-brand {
  align-self: center;
}
#page-exam.cbt-reading .cbt-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  min-width: 0;
}
#page-exam.cbt-reading .cbt-taker,
#page-exam.cbt-reading .cbt-paper-title {
  display: inline;
  font-size: 0.82rem;
  font-weight: 600;
  color: #222;
  max-width: none;
  white-space: normal;
}
#page-exam.cbt-reading .cbt-paper-title::before {
  content: ' ';
}
#page-exam.cbt-reading .cbt-timer-text {
  width: auto;
  flex-basis: auto;
  padding-left: 0;
  margin-top: 0;
  font-size: 0.82rem;
  color: #333;
}
.cbt-top-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1 1 220px;
  min-width: 0;
  font-size: 0.82rem;
  color: #222;
}
.cbt-meta-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.cbt-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f87171, #c41e2a 70%);
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.cbt-taker { font-weight: 600; white-space: nowrap; }
.cbt-subject-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: #e11d2e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 2px;
  line-height: 1.4;
}
.cbt-paper-title {
  font-weight: 700;
  color: #222;
  max-width: 28vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cbt-timer-text {
  font-variant-numeric: tabular-nums;
  color: #333;
  white-space: nowrap;
}
#page-exam.cbt-reading .cbt-timer-text {
  width: 100%;
  flex-basis: 100%;
  padding-left: 38px;
  margin-top: -4px;
}
.cbt-timer-text.is-warning,
#cbtTimerText.is-warning { color: #c41e2a; font-weight: 700; }

.cbt-skill-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f0f0f0;
  border-bottom: 1px solid #d0d0d0;
  flex: 0 0 auto;
}
#page-exam.cbt-listening .cbt-skill-bar,
#page-exam.cbt-reading .cbt-skill-bar,
#page-exam.cbt-writing .cbt-skill-bar {
  display: flex !important;
}
.cbt-skill-bar[hidden] { display: none !important; }
.cbt-skill-btn {
  appearance: none;
  border: 1px solid #bbb;
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 2px;
  cursor: pointer;
}
.cbt-skill-btn:hover { background: #f5f5f5; }
.cbt-skill-btn.is-active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}
.cbt-skill-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: #777;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .cbt-skill-hint { display: none; }
}

.cbt-player {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 420px;
  min-width: 200px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
}
.cbt-player[hidden] { display: none !important; }
.cbt-player-btn,
.cbt-player-vol {
  appearance: none;
  border: 1px solid #ccc;
  background: #fafafa;
  width: 30px;
  height: 28px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
}
.cbt-player-btn:hover,
.cbt-player-vol:hover { background: #eee; }
.cbt-player-track { flex: 1; min-width: 0; }
.cbt-player-seek {
  width: 100%;
  height: 4px;
  margin: 0;
  cursor: pointer;
  accent-color: #2b6cb0;
}
.cbt-player-times {
  display: flex;
  gap: 4px;
  font-size: 0.68rem;
  color: #666;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.cbt-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
.cbt-action-btn {
  appearance: none;
  border: 1px solid #333;
  background: #fff;
  color: #222;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
}
.cbt-action-btn:hover { background: #f3f3f3; }
.cbt-action-primary {
  background: #fff;
  border-color: #333;
  color: #222;
}
.cbt-action-primary:hover { background: #f3f3f3; filter: none; }
.cbt-action-btn:disabled { opacity: 0.5; cursor: default; }
.cbt-icon-btn {
  appearance: none;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #444;
  font-size: 1rem;
  cursor: default;
  border-radius: 3px;
}
#page-exam.exam-vocab-mode.cbt-listening .hw-word,
#page-exam.exam-vocab-mode.cbt-reading .hw-word,
#page-exam.exam-vocab-mode.cbt-writing .hw-word {
  cursor: pointer;
  border-bottom: 1px dotted rgba(37, 99, 235, 0.35);
}
#page-exam.exam-vocab-off.cbt-listening .hw-word,
#page-exam.exam-vocab-off.cbt-reading .hw-word,
#page-exam.exam-vocab-off.cbt-writing .hw-word {
  border-bottom: none;
}
#cbtVocabBtn:not(:disabled),
#cbtNotesBtn:not(:disabled) {
  cursor: pointer;
}

.cbt-instr-banner {
  display: none;
  align-items: baseline;
  gap: 18px;
  padding: 12px 24px;
  background: #e8e8e8;
  border-bottom: 1px solid #d0d0d0;
  flex: 0 0 auto;
}
#page-exam.cbt-reading .cbt-instr-banner:not([hidden]) {
  display: flex;
}
.cbt-instr-part {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  flex: 0 0 auto;
}
.cbt-instr-text {
  font-size: 0.88rem;
  font-style: italic;
  color: #333;
  font-weight: 400;
}

.exam-body-row {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}
#page-exam.cbt-listening .exam-body-row,
#page-exam.cbt-reading .exam-body-row,
#page-exam.cbt-writing .exam-body-row {
  flex: 1;
  min-height: 0;
}
.cbt-rail {
  width: 44px;
  flex: 0 0 44px;
  background: #2c2c2c;
  display: none;
  padding: 10px 0;
}
#page-exam.cbt-listening .cbt-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cbt-rail-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #ddd;
  cursor: default;
  font-size: 0.85rem;
}

#page-exam.cbt-listening .exam-main {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 18px 28px 100px;
  background: #fff;
}
#page-exam.cbt-listening .listening-section {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
#page-exam.cbt-listening .ls-header,
#page-exam.cbt-listening .ls-toolbar,
#page-exam.cbt-listening .ls-transcript {
  display: none !important;
}
#page-exam.cbt-listening .ls-questions { padding: 0; }
#page-exam.cbt-listening .ls-layout { margin: 0; }
#page-exam.cbt-listening .notes-sheet {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 820px;
}
#page-exam.cbt-listening .notes-blank-input {
  border: 1px solid #9bb7d4;
  border-radius: 2px;
  background: #fff;
  min-height: 1.6em;
  padding: 2px 6px;
  width: 7.5em;
}
#page-exam.cbt-listening .notes-blank-input:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  border-color: #3b82f6;
}
#page-exam.cbt-listening .listening-part {
  display: none;
}
#page-exam.cbt-listening .listening-part.is-active {
  display: block;
}

/* ---- CBT Reading layout ---- */
body.exam-reading-layout #page-exam.cbt-reading {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
#page-exam.cbt-reading .exam-main {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #fff;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-exam.cbt-reading #panel-reading.active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
#page-exam.cbt-reading .rd-sec-tabs {
  display: none !important;
}
#page-exam.cbt-reading .rd-split-root {
  flex: 1;
  min-height: 0;
  gap: 0;
  padding: 0;
}
#page-exam.cbt-reading .reading-passage.rd-split {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
#page-exam.cbt-reading .rp-pane {
  padding: 20px 28px 48px;
  background: #fff;
}
#page-exam.cbt-reading .rp-pane-qs {
  background: #fff;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
}
#page-exam.cbt-reading .rp-questions {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#page-exam.cbt-reading .rp-title {
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
#page-exam.cbt-reading .rp-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.98rem;
  line-height: 1.7;
  text-align: justify;
  color: #1a1a1a;
}
#page-exam.cbt-reading .rp-splitter {
  flex: 0 0 16px;
  background: linear-gradient(#cfcfcf, #cfcfcf) center/1px 100% no-repeat;
  background-color: #f3f3f3;
}
#page-exam.cbt-reading .rp-splitter-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  border: 1px solid #bbb;
  border-radius: 2px;
  font-size: 0.7rem;
  color: #555;
  line-height: 1;
}
#page-exam.cbt-reading .notes-blank {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  margin: 0 2px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}
#page-exam.cbt-reading .notes-blank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
  background: #f5f5f5;
  border-right: 1px solid #ddd;
}
#page-exam.cbt-reading .notes-blank-input {
  border: none;
  border-radius: 0;
  background: transparent;
  min-height: 1.7em;
  padding: 2px 8px;
  width: 8em;
  box-shadow: none;
}
#page-exam.cbt-reading .notes-blank:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.rp-pane-nav {
  display: none;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 4px 4px;
}
.rp-qs-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}
#page-exam.cbt-reading .rp-pane-nav {
  display: none !important;
}
.rp-pane-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.rp-pane-nav-btn:hover { background: #f3f3f3; }

.exam-footer-cbt {
  position: sticky;
  bottom: 0;
  z-index: 110;
  background: #f5f5f5;
  border-top: 1px solid #ccc;
  padding: 0;
}
.cbt-footer-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px 10px;
  max-width: 100%;
  overflow-x: auto;
}
#page-exam.cbt-reading .cbt-footer-inner {
  align-items: flex-end;
  padding: 10px 16px 12px;
}
.cbt-nav-arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 36px;
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  align-self: center;
}
#page-exam.cbt-reading .cbt-nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.35rem;
  align-self: flex-end;
  margin-left: 4px;
}
#page-exam.cbt-reading .cbt-nav-arrow.is-disabled {
  background: #ececec;
  border-color: #d0d0d0;
  color: #aaa;
  cursor: default;
}
#page-exam.cbt-reading .cbt-nav-arrow-next:not(.is-disabled) {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}
#page-exam.cbt-reading .cbt-part-block:not(.is-active) {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
#page-exam.cbt-reading .cbt-part-block:not(.is-active) .cbt-part-label {
  display: inline;
  margin-bottom: 0;
  font-size: 0.78rem;
}
#page-exam.cbt-reading .cbt-part-block:not(.is-active) .cbt-part-compact {
  font-size: 0.78rem;
  font-weight: 600;
  color: #444;
}
#page-exam.cbt-reading .cbt-part-block.is-active .cbt-part-label {
  color: #111;
  font-size: 0.78rem;
  margin-bottom: 6px;
}
#page-exam.cbt-reading .cbt-qnum {
  min-width: 28px;
  height: 26px;
  font-size: 0.75rem;
  border-radius: 3px;
}
#page-exam.cbt-reading .cbt-qnum.is-current {
  background: #fff;
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
  color: #111;
}
.cbt-parts {
  display: flex;
  gap: 18px;
  flex: 1;
  min-width: 0;
  align-items: flex-end;
}
.cbt-part-block {
  flex: 0 0 auto;
}
.cbt-part-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 4px;
}
.cbt-part-block.is-active .cbt-part-label { color: #1d4ed8; }
.cbt-part-compact {
  display: none;
  font-size: 0.78rem;
  color: #444;
  font-weight: 600;
  white-space: nowrap;
}
#page-exam.cbt-reading .cbt-part-block:not(.is-active) .cbt-qnums {
  display: none;
}
#page-exam.cbt-reading .cbt-part-block:not(.is-active) .cbt-part-compact {
  display: inline;
}
#page-exam.cbt-reading .cbt-part-block.is-active .cbt-part-compact {
  display: none;
}
#page-exam.cbt-writing .cbt-part-block .cbt-qnums {
  display: none !important;
}
#page-exam.cbt-writing .cbt-part-block:not(.is-active) .cbt-part-compact {
  display: inline;
}
#page-exam.cbt-writing .cbt-part-block.is-active .cbt-part-compact {
  display: none;
}
#page-exam.cbt-listening .cbt-part-compact {
  display: none !important;
}

/* ---- CBT Writing layout ---- */
body.exam-reading-layout #page-exam.cbt-writing {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
#page-exam.cbt-writing .exam-main {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #f3f3f3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-exam.cbt-writing #panel-writing.active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
.wt-split-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#page-exam.cbt-writing .wt-split-root {
  gap: 0;
}
.writing-task.wt-split {
  display: none;
  flex: 1;
  min-height: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}
.writing-task.wt-split.active {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
#page-exam.cbt-writing .wt-pane-prompt {
  flex: 1 1 48%;
  background: #fff;
  padding: 20px 24px 28px;
}
#page-exam.cbt-writing .wt-pane-editor {
  flex: 1 1 52%;
  background: #f7f7f7;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
}
#page-exam.cbt-writing .rp-splitter {
  flex: 0 0 16px;
  background: linear-gradient(#cfcfcf, #cfcfcf) center/1px 100% no-repeat;
  background-color: #ececec;
}
#page-exam.cbt-writing .rp-splitter-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  border: 1px solid #bbb;
  border-radius: 2px;
  font-size: 0.7rem;
  color: #555;
  line-height: 1;
}
.wt-task-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111;
}
.wt-spend {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #333;
}
.wt-prompt-box {
  border: 1px solid #222;
  padding: 14px 16px;
  margin: 0 0 12px;
  background: #fff;
}
.wt-prompt-box .wt-prompt,
.wt-prompt-box em.wt-prompt {
  margin: 0;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #222;
  display: block;
}
.wt-min-words {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #222;
}
.wt-editor-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#page-exam.cbt-writing .wt-cbt-textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  background: #fff;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #111;
  box-shadow: none;
  font-family: Georgia, 'Times New Roman', serif;
}
#page-exam.cbt-writing .wt-cbt-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
  outline: none;
}
#page-exam.cbt-writing .wt-cbt-wordcount {
  margin-top: 8px;
  text-align: right;
  font-size: 0.82rem;
  color: #555;
  font-family: inherit;
}
#page-exam.cbt-writing .cbt-action-btn[hidden] {
  display: none !important;
}
#page-exam.cbt-writing .wt-prompt-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}
#page-exam.cbt-writing .wt-prompt-body th,
#page-exam.cbt-writing .wt-prompt-body td {
  border: 1px solid #333;
  padding: 6px 8px;
  text-align: left;
}
#page-exam.cbt-writing .wt-prompt-body th {
  background: #e8e8e8;
}
@media (max-width: 900px) {
  #page-exam.cbt-writing .wt-pane-prompt,
  #page-exam.cbt-writing .wt-pane-editor {
    padding: 12px;
  }
}
.cbt-qnums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cbt-qnum {
  appearance: none;
  min-width: 26px;
  height: 24px;
  padding: 0 4px;
  border: 1px solid #b0b0b0;
  background: #fff;
  color: #222;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
}
.cbt-qnum:hover { border-color: #3b82f6; }
.cbt-qnum.is-current {
  outline: 2px solid #3b82f6;
  outline-offset: 0;
  border-color: #3b82f6;
}
.cbt-qnum.is-answered {
  background: #dbeafe;
  border-color: #93c5fd;
}
.cbt-part-block:not(.is-active) .cbt-qnums { opacity: 0.85; }

.cbt-pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cbt-pause-overlay[hidden] { display: none !important; }
.cbt-pause-card {
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.cbt-pause-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}
.cbt-pause-desc {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: #555;
}

.cbt-finish-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cbt-finish-overlay[hidden] { display: none !important; }
.cbt-finish-dialog {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid #d0d0d0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.cbt-finish-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e5e5;
}
.cbt-finish-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.cbt-finish-dialog-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.cbt-finish-dialog-text {
  margin: 0;
  padding: 18px 18px 22px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #333;
}
.cbt-finish-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}
.cbt-finish-dialog-btn {
  min-width: 108px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #333;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cbt-finish-dialog-btn-primary {
  background: #222;
  color: #fff;
}
.cbt-finish-dialog-btn:hover { opacity: 0.92; }

.cbt-skill-btn.is-locked,
.cbt-skill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .cbt-top { padding: 8px; }
  .cbt-paper-title { max-width: 40vw; }
  .cbt-timer-text { padding-left: 0; }
  .cbt-player { max-width: none; flex: 1 1 100%; order: 3; }
  .cbt-top-actions { width: 100%; justify-content: flex-end; order: 2; }
  #page-exam.cbt-listening .exam-main { padding: 14px 14px 90px; }
  #page-exam.cbt-listening .cbt-rail { display: none; }
  #page-exam.cbt-reading .rp-pane { padding: 14px 14px 40px; }
  #page-exam.cbt-reading .cbt-instr-banner { padding: 10px 14px; flex-wrap: wrap; gap: 6px; }
}
