/* --- NEW: TIMER SELECT STYLES --- */
.ielts-timer-select {
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    color: #374151;
    margin-right: 0;             /* mobile: no right margin */
    margin-bottom: 10px;         /* mobile: stack gap */
    width: 100%;                 /* mobile: full-width */
    cursor: pointer;
    /* Scoped — no transition:all */
    transition: border-color 120ms ease, box-shadow 120ms ease;
    font-family: 'Inter', sans-serif;
    height: 46px; 
    box-sizing: border-box;
}
.ielts-timer-select:hover { border-color: #007bff; }
.ielts-timer-select:focus { outline: none; border-color: #007bff; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1); }

/* Tablet (≥ 768px): restore inline styling */
@media (min-width: 768px) {
    .ielts-timer-select { margin-right: 15px; margin-bottom: 0; width: auto; }
}

.ielts-header-candidate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ielts-header-candidate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    line-height: 1;
}

.ielts-header-candidate-icon svg {
    display: block;
}

.ielts-header-candidate-text {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* --- BASE STYLES --- */
.ielts-final-wrapper {
  --footer-height: 80px; 
  --panel-padding: 25px;
  --mobile-footer-height: 50px; 
  --mobile-panel-padding: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-user-select: none;
  user-select: none;
  padding: 10px;
  background-color: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* --- Standardized Instruction Styles (Writing Base) --- */
.ielts-instruction-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: block;
}

#ielts-instruction-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 24px;
    min-height: var(--ielts-lms-touch-target, 44px);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    /* Scoped — no transition:all */
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
    margin-bottom: 10px;
    gap: 8px;
}

#ielts-instruction-toggle:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}
#ielts-instruction-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}
#ielts-instruction-toggle:active { background-color: #f1f5f9; }

.ielts-instruction-box {
    text-align: left;
    margin-top: 15px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-family: 'Inter', sans-serif !important;
    display: none;
}

.ielts-instruction-box h3 {
    margin-top: 0 !important;
    font-size: 18px !important; /* Matches Writing Base */
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 12px !important;
}

.ielts-instruction-box ul {
    padding-left: 20px !important;
    margin: 0 !important;
    color: #475569 !important;
    line-height: 1.6 !important; /* Standardized spacing */
    list-style-type: disc !important;
}

.ielts-instruction-box ul li {
    font-size: 16px !important; /* Compact scale for Reading fix */
    margin-bottom: 8px !important;
}

.ielts-instruction-box ul li:last-child {
    margin-bottom: 0 !important;
}

/* Render editor-created tables with visible borders without requiring inline border attributes. */
.ielts-question-content table,
#ielts-audio-script-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 12px 0;
}

.ielts-question-content table th,
.ielts-question-content table td,
#ielts-audio-script-content table th,
#ielts-audio-script-content table td {
    border: 1px solid #ccc;
    padding: 6px;
    vertical-align: top;
}

.ielts-instruction-box strong {
    font-weight: 600 !important;
    color: #1e293b !important;
}

.ielts-warning-text {
    color: #dc3545 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-top: 12px !important;
    display: block !important;
}

/* --- HEADER LAYOUT --- */
.ielts-widget-header { 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 20px; margin-bottom: 25px; flex-shrink: 0; width: 100%;
}
.ielts-widget-title { font-size: 28px; font-weight: 700; color: #1a202c; margin: 0; padding: 0 15px; width: 100%; line-height: 1.3; }
.ielts-header-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 15px; width: 100%; }
.ielts-start-button { 
    background: linear-gradient(180deg,#27c184 0%,#1eb06f 100%); color: #fff; border: none; padding: 0 25px; height: 46px; 
    min-height: var(--ielts-lms-touch-target, 44px);
    font-size: 16px; font-weight: 600; border-radius: 8px; cursor: pointer; 
    transition: transform 180ms ease, box-shadow 180ms ease; display: inline-flex; 
    align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 10px 24px rgba(30,176,111,.22);
}
.ielts-start-button:hover { background: linear-gradient(180deg,#27c184 0%,#1eb06f 100%); box-shadow: 0 12px 26px rgba(30,176,111,.26); transform: translateY(-1px); }
.ielts-start-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(30,176,111,0.40); transform: translateY(-1px); }
.ielts-start-button:active { transform: scale(0.97); box-shadow: 0 4px 12px rgba(30,176,111,.18); }
.ielts-start-button:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }
.ielts-attempt-badge { margin-left: 0 !important; height: 44px; display: inline-flex !important; }

.ielts-loading-container { display: none; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; color: #4a5568; font-size: 18px; font-weight: 500; }
.ielts-loading-container .spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto 20px; }
@keyframes spin { 0% { transform: rotate(0) } 100% { transform: rotate(360deg) } }
.ielts-listening-play-gate { display: none; position: fixed; inset: 0; z-index: 1200; padding: 24px; background: rgba(17, 24, 39, 0.72); align-items: center; justify-content: center; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ielts-listening-play-gate.active { display: flex; }
.ielts-listening-play-gate-card { width: min(100%, 720px); display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; color: #ffffff; }
.ielts-listening-play-gate-icon { width: 110px; height: 110px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; }
.ielts-listening-play-gate-icon svg { width: 84px; height: 84px; }
.ielts-listening-play-gate-copy { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.ielts-listening-play-gate-title { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.ielts-listening-play-gate-text { margin: 0; font-size: 23px; line-height: 1.6; color: rgba(255, 255, 255, 0.96); }
.ielts-listening-play-btn { min-width: 160px; min-height: 54px; border: 0; border-radius: 8px; background: #111111; color: #ffffff; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
.ielts-listening-play-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28); }
.ielts-listening-play-btn:disabled { opacity: 0.7; cursor: wait; transform: none; }
.ielts-listening-play-btn-icon { width: 30px; height: 30px; border-radius: 999px; background: #ffffff; color: #111111; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ielts-listening-play-btn-icon svg { width: 14px; height: 14px; margin-left: 2px; }
.ielts-listening-play-gate-error { min-height: 20px; margin: 0; font-size: 15px; font-weight: 600; color: #fecaca; }
.ielts-main-interface-container { display: none; flex-direction: column; padding-bottom: var(--footer-height, 45px); flex-grow: 1; min-height: 0; overflow: hidden; box-sizing: border-box; }
.ielts-final-wrapper:not(.test-started) .ielts-pagination-footer { display: none !important; }
.ielts-final-wrapper.test-loading .ielts-widget-header,
.ielts-final-wrapper.test-loading .ielts-prestart-screen { display: none; }
.ielts-final-wrapper.test-loading .ielts-loading-container { display: flex; }
.ielts-final-wrapper.test-started .ielts-widget-header, .ielts-final-wrapper.test-started .ielts-loading-container, .ielts-final-wrapper.test-started .ielts-prestart-screen { display: none; }
.ielts-final-wrapper.test-started .ielts-main-interface-container { display: flex; max-height: none; min-height: 0; }
.ielts-final-wrapper.test-started .ielts-pagination-footer { display: flex; }
.ielts-results-container { display: none; text-align: center; padding: 20px; flex-shrink: 0; padding-bottom: 60px; }
.ielts-final-wrapper.test-completed .ielts-main-interface-container, .ielts-final-wrapper.test-completed .ielts-pagination-footer, .ielts-final-wrapper.test-completed .ielts-widget-header, .ielts-final-wrapper.test-completed .ielts-loading-container, .ielts-final-wrapper.test-completed .ielts-prestart-screen { display: none; }
.ielts-final-wrapper.test-completed .ielts-results-container { display: block; }
.ielts-results-title { font-size: 28px; font-weight: 700; color: #1a202c; margin-bottom: 20px; }
.ielts-final-score-box { font-size: 22px; margin: 20px auto 25px; line-height: 1.6; padding: 20px; background: #f7f8fa; border: 1px solid #e2e8f0; border-radius: 8px; max-width: 400px; }
.ielts-final-score-box .band-score { font-size: 1.3em; font-weight: bold; color: #007BFF; display: block; margin-top: 8px; }
.ielts-detailed-report-wrapper { margin-top: 20px; max-height: 400px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.ielts-report-table { width: 100%; border-collapse: collapse; text-align: left; }
.ielts-report-table th, .ielts-report-table td { padding: 12px 15px; border-bottom: 1px solid #e2e8f0; }
.ielts-report-table th { background: #f7f8fa; font-size: 14px; font-weight: 600; color: #4a5568; }
.ielts-report-table td { font-size: 15px; color: #2d3748; }
.ielts-report-table td.status-correct { color: #28a745; font-weight: bold; }
.ielts-report-table td.status-incorrect { color: #dc3545; font-weight: bold; }
.ielts-prestart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    max-width: 1368px;
    margin: 0 auto;
    padding: 20px 20px 24px;
}

@media (min-width: 900px) {
    .ielts-prestart-layout {
        grid-template-columns: minmax(0, 1.85fr) minmax(320px, 370px);
        gap: 56px;
    }
}

@media (max-width: 768px) {
    .ielts-listening-play-gate { padding: 20px; }
    .ielts-listening-play-gate-card { gap: 18px; }
    .ielts-listening-play-gate-icon { width: 88px; height: 88px; }
    .ielts-listening-play-gate-icon svg { width: 68px; height: 68px; }
    .ielts-listening-play-gate-title { font-size: 28px; }
    .ielts-listening-play-gate-text { font-size: 18px; line-height: 1.5; }
    .ielts-listening-play-btn { min-width: 144px; min-height: 50px; font-size: 17px; }
}

/* Center the prestart block vertically in standalone listening view. */
body.ielts-standalone-mode .ielts-prestart-layout,
body.ielts-standalone-preview .ielts-prestart-layout {
    min-height: calc(100vh - 120px);
    align-content: center;
}

.ielts-prestart-left {
    min-width: 0;
}

.ielts-prestart-layout--mock {
    display: block;
    max-width: 740px;
    gap: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.ielts-prestart-layout--mock .ielts-prestart-left {
    max-width: 100%;
    padding: 34px 34px 36px;
}

.ielts-prestart-mock-card-top {
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 18px 18px 17px;
    text-align: center;
}

.ielts-prestart-mock-actions {
    max-width: 100%;
    margin: 30px auto 0;
    text-align: center;
}

.ielts-prestart-mock-callout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 18px;
    color: #2563eb;
    font-size: 14px;
    line-height: 1.6;
}

.ielts-prestart-mock-callout:before {
    content: 'i';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.ielts-prestart-layout--mock .ielts-candidate-error {
    text-align: center;
}

.ielts-prestart-layout--mock .ielts-start-button {
    width: auto;
    min-width: 180px;
    margin: 0 auto;
}

.ielts-prestart-layout--mock .ielts-prestart-heading {
    display: block;
    margin-bottom: 26px;
}

.ielts-prestart-layout--mock .ielts-prestart-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.ielts-prestart-layout--mock .ielts-prestart-subtitle {
    font-size: 14px;
    color: #334155;
    max-width: none;
}

.ielts-prestart-layout--mock .ielts-instruction-section {
    background: transparent;
    border-left: 0;
    padding: 0;
    margin-bottom: 26px;
}

.ielts-prestart-layout--mock .ielts-instruction-section:last-of-type {
    margin-bottom: 0;
}

.ielts-prestart-layout--mock .ielts-instruction-section h3 {
    margin-bottom: 16px;
}

.ielts-prestart-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.ielts-prestart-title {
    text-align: left;
    padding: 0;
    margin-bottom: 0;
    font-size: clamp(2rem, 3vw, 2.55rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0f2f63;
}

.ielts-prestart-subtitle {
    color: #475569;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    text-align: left;
    flex-basis: 100%;
    max-width: 620px;
}

.ielts-prestart-heading .ielts-attempt-badge {
    margin-left: 0;
}

.ielts-instruction-section {
    background: #f8fafc;
    border-left: 4px solid #0f3d75;
    padding: 30px 32px;
    margin-bottom: 20px;
    text-align: left;
}

.ielts-instruction-section h3 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.3;
    color: #123a75;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ielts-instruction-section ul {
    margin: 0;
    padding-left: 20px;
    color: #1f2937;
}

.ielts-instruction-section li {
    margin-bottom: 18px;
    line-height: 1.75;
}

.ielts-instruction-section li:last-child {
    margin-bottom: 0;
}

.ielts-prestart-right {
    width: 100%;
    max-width: 370px;
    justify-self: end;
}

.ielts-candidate-card {
    background: #ffffff;
    border: 1px solid #d9e1ea;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    padding: 32px 30px;
    text-align: left;
    position: sticky;
    top: 24px;
}

.ielts-candidate-card h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 800;
    color: #102a43;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.ielts-candidate-fields label {
    display: block;
    margin-bottom: 18px;
}

.ielts-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.ielts-candidate-name,
.ielts-candidate-id,
.ielts-prestart-screen .ielts-timer-select {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    box-sizing: border-box;
    background: #ffffff;
    height: 48px;
}

.ielts-prestart-screen .ielts-start-button {
    width: 100%;
    min-height: 44px;
    padding: 15px 18px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(180deg,#27c184 0%,#1eb06f 100%);
    border-radius: 6px;
}

.ielts-prestart-screen .ielts-start-button:hover {
    background: linear-gradient(180deg,#27c184 0%,#1eb06f 100%);
}

.ielts-candidate-error {
    margin: 4px 0 14px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
}

.ielts-prestart-support {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    max-width: 270px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .ielts-prestart-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ielts-prestart-right {
        max-width: 100%;
        justify-self: stretch;
    }

    .ielts-candidate-card {
        position: static;
    }
}

/* Active test page refresh: listening runtime, including review */
.ielts-final-wrapper.listening-mode.test-started.focus-mode {
    background: #f3f4f6;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-main-interface-container {
    background: #f3f4f6;
    padding-bottom: calc(var(--footer-height, 45px) + 14px);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar {
    height: 44px;
    background: #ffffff;
    border-bottom: 1px solid #d9dde3;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    padding: 0 14px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar-title {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-timer-display {
    background: #ffffff;
    color: #111827;
    border: 1px solid #dbe1e8;
    box-shadow: none;
    padding: 4px 12px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-notes-toggle-btn,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-review-button,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .icon-btn-toggle {
    background: #ffffff;
    border-color: #dbe1e8;
    color: #111827;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-notes-toggle-btn:hover,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-review-button:hover,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .icon-btn-toggle:hover {
    background: #f9fafb;
    border-color: #cfd6df;
    color: #111827;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-ai-trigger-btn {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-ai-trigger-btn:hover {
    background: #218838;
    border-color: #218838;
    color: #fff;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .volume-popup {
    background: #ffffff;
    border-color: #dbe1e8;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-content-wrapper,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-final-container {
    background: #f3f4f6;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-content-wrapper {
    box-sizing: border-box;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode:not(.review-mode):not(.test-completed) .ielts-listening-part-intro {
    display: flex;
    margin: -18px -14px 18px -14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-right-panel {
    border: 0;
    background: transparent;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-right-panel .ielts-final-panel-content {
    background: #ffffff;
    border: 0;
    padding: 18px 14px 132px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-processed-questions {
    max-width: none;
    margin: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-processed-questions .ielts-part-section {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content {
    color: #1f2937;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827;
    margin-bottom: 10px !important;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content p,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content li,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content td,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-question-content th {
    line-height: 1.8 !important;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-pagination-footer {
    height: 68px;
    background: #ffffff;
    border-top: 1px solid #d9dde3;
    box-shadow: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 8px 14px 10px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .parts-grid {
    gap: 12px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box {
    border-color: #d9dde3;
    background: #ffffff;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box:hover {
    border-color: #cfd6df;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box.active {
    border-color: #d0d7e0;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .active-label {
    color: #374151;
    border-right-color: #e5e7eb;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-controls {
    bottom: 90px;
    right: 16px;
    gap: 12px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn {
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.98);
    border-color: #5eead4;
    color: #10b981;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn:hover {
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.14);
}

@media (max-width: 768px) {
    .ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-right-panel .ielts-final-panel-content {
        padding: 12px 10px 110px;
    }

    .ielts-final-wrapper.listening-mode.test-started.focus-mode #ielts-processed-questions .ielts-part-section {
        padding: 0;
    }

    .ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-pagination-footer {
        height: 58px;
    }
}

@media (max-width: 768px) {
    body.ielts-standalone-mode .ielts-prestart-layout,
    body.ielts-standalone-preview .ielts-prestart-layout {
        min-height: 0;
        align-content: start;
    }

    .ielts-prestart-layout {
        gap: 20px;
        padding: 12px 0 8px;
    }

    .ielts-prestart-heading {
        gap: 10px;
        margin-bottom: 20px;
    }

    .ielts-candidate-card {
        padding: 26px 22px;
    }

    .ielts-instruction-section {
        padding: 24px 20px;
    }
}
.ielts-results-nav { margin-top: 30px; display: flex; justify-content: center; gap: 15px; }

/* FULL SCREEN MODE */
.ielts-final-wrapper.focus-mode { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100svh; max-width: none; margin: 0; background: #f7f8fa; z-index: var(--ielts-lms-z-focus, 9999); padding: 0; box-sizing: border-box; border: none; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; }
.ielts-final-wrapper.focus-mode .ielts-main-interface-container { height: 100%; max-height: none; flex-grow: 1; display: flex; flex-direction: column; padding-bottom: var(--footer-height, 45px); min-height: 0; box-sizing: border-box; }
.ielts-final-wrapper.focus-mode .ielts-main-interface-container,
.ielts-final-wrapper.focus-mode .ielts-final-container {
    width: 100%;
    border-radius: 0 !important;
}

.ielts-final-wrapper.focus-mode .ielts-top-bar,
.ielts-final-wrapper.focus-mode .ielts-widget-header {
    margin-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.ielts-final-wrapper.focus-mode {
    inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
}

.ielts-final-wrapper.focus-mode.test-completed {
    overflow: auto;
}

/* Hide overflow in runtime shell fullscreen mode only */
body.ielts-mock-standalone--runtime.ielts-focus-active { overflow: hidden; }
/* Allow scrolling in shortcode and hub contexts */
body.ielts-focus-active:not(.ielts-mock-standalone--runtime) { overflow: auto; }

/* FIXED GRID FOOTER */
.ielts-pagination-footer { position: fixed; bottom: 0; left: 0; width: 100%; height: 72px; background: #f8fafc; border-top: 1px solid #dbe4ef; box-shadow: 0 -18px 40px rgba(15,23,42,0.18); display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 12px; gap: 10px; z-index: 1000; border-top-left-radius: 22px; border-top-right-radius: 22px; box-sizing: border-box; }
.parts-grid { display: flex; flex-grow: 1; width: 100%; gap: 10px; height: 100%; min-width: 0; }
.part-box { flex: var(--inactive-part-flex, 3); width: 0; min-width: 0; height: 100%; border-radius: 999px; border: 1px solid #dbe4ef; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,0.9); transition: flex 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s, border-color 0.25s, box-shadow 0.25s; }
.part-box:hover { background-color: #ffffff; border-color: #cbd5e1; box-shadow: 0 8px 18px rgba(15,23,42,0.08); }
.part-box.active { flex: var(--active-part-flex, 4); border-color: #cbd5e1; box-shadow: 0 10px 26px rgba(15,23,42,0.1); justify-content: flex-start; cursor: default; }
.box-summary-text { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; width: 100%; text-align: center; opacity: 1; transition: opacity 0.2s; }
.summary-part-label { font-size: 18px; line-height: 1; color: #444; }
.summary-part-progress { font-size: 16px; line-height: 1; color: #666; }
.part-box.active .box-summary-text { display: none; opacity: 0; }
.box-questions-area { display: none; width: 100%; height: 100%; align-items: center; opacity: 0; transition: opacity 0.4s ease 0.1s; }
.part-box.active .box-questions-area { display: flex; opacity: 1; }
.active-label { padding: 0 12px; font-weight: 700; font-size: 14px; color: #475569; white-space: nowrap; flex-shrink: 0; border-right: 1px solid #e2e8f0; height: 100%; display: flex; align-items: center; }
.question-scroll-track { flex-grow: 1; display: flex; align-items: center; overflow-x: auto; overflow-y: hidden; height: 100%; padding: 0 5px; gap: 2px; -ms-overflow-style: none; }
.question-scroll-track::-webkit-scrollbar { width: 0; height: 0; display: none; background: transparent; }
.palette-btn { width: 24px; height: 28px; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 400; color: #111; background: transparent; border: 1px solid transparent; cursor: pointer; flex-shrink: 0; position: relative; transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.palette-btn::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 24px; height: 4px; background: #e5e7eb; border-radius: 999px; }
.palette-btn:hover,
.palette-btn:focus-visible { background-color: #eef4fa; border-color: #9ec8e7; color: #0f172a; box-shadow: 0 8px 18px rgba(88, 174, 227, 0.18); transform: translateY(-1px); outline: none; }
.palette-btn.current { background: #ffffff; border-color: #418fc6; color: #0f172a; font-weight: 500; box-shadow: 0 0 0 1px rgba(65, 143, 198, 0.18), 0 8px 18px rgba(65, 143, 198, 0.14); }
.palette-btn.current:hover,
.palette-btn.current:focus-visible { background: #f7fbff; border-color: #3279ab; color: #0f172a; box-shadow: 0 0 0 1px rgba(65, 143, 198, 0.22), 0 10px 20px rgba(65, 143, 198, 0.18); }
.palette-btn.answered { color: #166534; background-color: #f2fbf5; border-color: #96d9ad; box-shadow: 0 0 0 1px rgba(32, 177, 90, 0.1); }
.palette-btn.answered:hover,
.palette-btn.answered:focus-visible { color: #14532d; background-color: #ecf9f0; border-color: #58bf7f; box-shadow: 0 0 0 1px rgba(32, 177, 90, 0.14), 0 8px 16px rgba(32, 177, 90, 0.14); }
.palette-btn.current.answered { background: #ffffff; border-color: #418fc6; color: #0f172a; box-shadow: 0 0 0 1px rgba(65, 143, 198, 0.18), 0 8px 18px rgba(65, 143, 198, 0.14); }
.palette-btn.answered::before { background: #20b15a; }
.palette-btn.flagged::after { content: ''; position: absolute; top: -13px; right: 1px; width: 10px; height: 14px; background: #ef4444; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%); border-radius: 1px 1px 0 0; box-shadow: 0 2px 6px rgba(239, 68, 68, 0.24); }
.palette-btn.current.flagged::after,
.palette-btn.flagged:hover::after,
.palette-btn.flagged:focus-visible::after { background: #dc2626; }
.palette-btn.correct { background-color: #28a745 !important; color: white !important; }
.palette-btn.incorrect { border: 2px solid #dc3545 !important; color: #dc3545 !important; }

/* --- HEADER & TOOLBAR --- */
.ielts-top-bar { display: flex; justify-content: space-between; align-items: center; height: 48px; background: #0c1628; padding: 0 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.14); box-shadow: none; position: relative; z-index: 50; gap: 12px; font-family: var(--ielts-lms-font-sans, 'Inter', sans-serif); margin-bottom: 0; flex-shrink: 0; }
.ielts-top-bar-left { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ielts-top-bar-title { font-size: 15px; font-weight: 700; color: #e5edf8; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ielts-top-bar-brandline { display: flex; align-items: center; gap: 14px; min-width: 0; max-width: 100%; }
.ielts-top-bar-brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.ielts-top-bar-brand-image { display: block; width: auto; max-width: 92px; max-height: 27px; object-fit: contain; }
.ielts-top-bar-brandline .ielts-top-bar-title { display: block; min-width: 0; }
.ielts-top-bar-center { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; }
.ielts-top-bar-mid { flex: 1; display: flex; justify-content: flex-end; align-items: center; min-width: 180px; }
.ielts-timer-display { background: #0a1324; color: #f8fafc; padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.22); font-size: 15px; font-weight: 700; font-family: var(--ielts-lms-font-mono, 'Roboto Mono', monospace); display: flex; align-items: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); transform: none; }
.ielts-timer-display svg { stroke: #ef4444; width: 18px; height: 18px; }
.ielts-top-bar-right { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; z-index: 20; }

.ielts-notes-toggle-btn, .ielts-review-button, .icon-btn-toggle { min-height: 38px; background: rgba(15, 23, 42, 0.12); border: 1px solid rgba(148, 163, 184, 0.18); color: #f8fafc; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 0 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 180ms ease, box-shadow 180ms ease; box-shadow: none; }
.ielts-notes-toggle-btn:hover, .ielts-review-button:hover, .icon-btn-toggle:hover { background: rgba(255,255,255,0.06); border-color: rgba(148, 163, 184, 0.34); color: #ffffff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2, 6, 23, 0.22); }
.ielts-notes-toggle-btn:focus-visible, .ielts-review-button:focus-visible, .icon-btn-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }
.ielts-notes-toggle-btn:active, .ielts-review-button:active, .icon-btn-toggle:active { transform: scale(0.97); }
.ielts-notes-toggle-btn svg, .ielts-review-button svg { width: 16px; height: 16px; stroke-width: 2px; }

/* Note Notification Dot (INSERTED HERE) */
.ielts-notes-toggle-btn {
    position: relative;
}

.ielts-notes-toggle-btn.has-new-notes::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background-color: #dc3545; /* Red */
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.ielts-ai-trigger-btn {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.ielts-ai-trigger-btn:hover {
    background: #218838;
    border-color: #218838;
    color: #fff;
}

/* Control Groups */
.control-group { position: relative; display: flex; align-items: center; }
#font-toggle-btn { width: 34px; padding: 0; border-radius: 50%; }
.icon-btn-menu .ielts-options-icon { width: 18px; height: 18px; }
.ielts-options-icon-moon,
.ielts-options-icon-sun { display: none; }
.font-popup { display: none; position: fixed; inset: 0; background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 32px 20px; align-items: flex-start; justify-content: center; overflow-y: auto; z-index: 1000; }
.font-popup.active { display: flex; }
.options-popup { min-width: 0; width: 100%; }
.ielts-options-dialog { width: min(100%, 700px); display: flex; flex-direction: column; gap: 22px; }
.ielts-options-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ielts-options-title { margin: 0; flex: 1; text-align: center; font-size: 25px; font-weight: 500; color: #111827; }
.ielts-options-close-btn { width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: #111827; font-size: 34px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ielts-options-content { display: flex; flex-direction: column; gap: 16px; }
.ielts-options-panel { display: none; flex-direction: column; gap: 14px; width: 100%; }
.ielts-options-panel.active { display: flex; }
.ielts-options-hero-button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 72px; padding: 18px 24px; border: 0; border-radius: 6px; background: #ea1636; color: #ffffff; font: inherit; font-size: 20px; font-weight: 500; cursor: pointer; box-shadow: 0 18px 38px rgba(234, 22, 54, 0.22); }
.ielts-options-hero-icon { width: 38px; height: 38px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ielts-options-hero-icon svg { width: 20px; height: 20px; }
.ielts-options-hero-label { flex: 1; text-align: left; }
.ielts-options-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 72px; border-radius: 14px; }
.ielts-options-item-button { border: 1px solid #dbe4ef; background: #ffffff; color: #0f172a; font: inherit; font-size: 18px; font-weight: 500; padding: 18px 24px; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 180ms ease, transform 180ms ease; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06); }
.ielts-options-item-button:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1); }
.ielts-options-item-button.active { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ielts-options-item-copy { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ielts-options-item-icon { width: 38px; height: 38px; border-radius: 999px; background: #eef4fa; color: #0f172a; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ielts-options-item-icon svg { width: 20px; height: 20px; }
.ielts-options-item-label { white-space: nowrap; }
.ielts-options-item-meta { display: inline-flex; align-items: center; gap: 12px; color: #64748b; }
.ielts-options-item-state { color: #64748b; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.ielts-options-item-chevron { font-size: 26px; line-height: 1; color: currentColor; }
.ielts-options-back-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 0; border: 0; background: transparent; color: #0f172a; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ielts-options-back-icon { font-size: 18px; line-height: 1; }
.ielts-options-subtitle { color: #0f172a; font-size: 20px; font-weight: 700; padding: 0 2px 4px; }
.ielts-options-subheader { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 520px; margin: 0 auto; }
.ielts-options-subheader-title { flex: 1; text-align: center; font-size: 18px; font-weight: 500; color: #111827; margin: 0; }
.ielts-sub-close-btn { width: 28px; height: 28px; font-size: 24px; }
.ielts-preset-list { display: flex; flex-direction: column; width: 100%; max-width: 520px; margin: 0 auto; border: 1px solid #d1d7e0; border-radius: 10px; overflow: hidden; }
.font-popup.ielts-subpanel-active { padding: 0; background: #ffffff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.font-popup.ielts-subpanel-active .ielts-options-dialog { width: 100%; max-width: none; gap: 0; }
.font-popup.ielts-subpanel-active .ielts-options-header { display: none; }
.font-popup.ielts-subpanel-active .ielts-options-content { gap: 0; }
.font-popup.ielts-subpanel-active .ielts-options-panel.active { gap: 16px; }
.font-popup.ielts-subpanel-active .ielts-options-subheader { width: 100%; max-width: none; min-height: 80px; margin: 0; padding: 0 13px 0 0; box-sizing: border-box; gap: 12px; align-items: flex-start; }
.font-popup.ielts-subpanel-active .ielts-options-subheader-title { align-self: flex-start; margin-top: 21px; font-size: 27.2px; font-weight: 400; line-height: 1.15; }
.font-popup.ielts-subpanel-active .ielts-options-back-btn { align-self: flex-start; margin-top: 16px; gap: 8px; padding: 0 0 0 2px; font-size: 27.2px; font-weight: 400; line-height: 1; }
.font-popup.ielts-subpanel-active .ielts-options-back-icon { font-size: 27.2px; line-height: 1; }
.font-popup.ielts-subpanel-active .ielts-sub-close-btn { align-self: flex-start; width: 66.6667px; height: 66.6667px; font-size: 26.6667px; line-height: 1; }
.font-popup.ielts-subpanel-active .ielts-preset-list { width: 100%; max-width: 700px; margin: 0 auto; }
.ielts-preset-item { display: flex; align-items: center; gap: 16px; width: 100%; padding: 25px 34px; border: none; border-bottom: 1px solid #e5e7eb; background: #ffffff; color: #111827; font: inherit; font-size: 17px; font-weight: 400; text-align: left; cursor: pointer; transition: background-color 120ms ease; }
.ielts-preset-item:last-child { border-bottom: none; }
.ielts-preset-item:hover { background: #f3f4f6; }
.ielts-preset-check { display: none; font-size: 18px; font-weight: 900; color: #111827; width: 24px; flex-shrink: 0; }
.ielts-preset-check { display: none; font-size: 21px; font-weight: 700; color: #111827; width: auto; flex-shrink: 0; }
.ielts-preset-item.active .ielts-preset-check { display: inline-block; }
.ielts-preset-item.active { background: #ffffff; color: #111827; border-color: transparent; border-bottom: 1px solid #e5e7eb; }
.ielts-preset-item.active:last-child { border-bottom: none; }
.ielts-preset-label { flex: 1; }
.ielts-contrast-preview { display: flex; flex-direction: column; gap: 4px; width: 48px; height: 36px; border-radius: 4px; padding: 7px 6px; justify-content: center; flex-shrink: 0; border: 1px solid #d1d7e0; }
.ielts-contrast-preview { display: flex; flex-direction: column; gap: 4px; width: 57px; height: 38px; box-sizing: border-box; border-radius: 4px; padding: 6px 7px; justify-content: center; flex-shrink: 0; border: 1px solid #d1d7e0; }
.ielts-contrast-preview span { display: block; height: 3px; border-radius: 2px; }
.ielts-contrast-preview-bow { background: #ffffff; }
.ielts-contrast-preview-bow span { background: #333333; }
.ielts-contrast-preview-wob { background: #1a1a1a; border-color: #1a1a1a; }
.ielts-contrast-preview-wob span { background: #ffffff; }
.ielts-text-size-list { display: flex; flex-direction: column; gap: 10px; }
.ielts-text-size-preset { border: 1px solid #dbe4ef; background: #ffffff; color: #334155; font: inherit; font-size: 18px; font-weight: 700; text-align: left; padding: 18px 20px; border-radius: 14px; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.font-popup.ielts-subpanel-active .ielts-text-size-preset { border: none; border-radius: 0; background: #ffffff; color: #111827; font-size: 17px; font-weight: 400; padding: 25px 34px; }
.ielts-text-size-preset:hover { background: #f8fafc; border-color: #dbe4ef; color: #0f172a; }
.ielts-text-size-preset.active { background: #ffffff; border-color: transparent; color: #111827; border-bottom: 1px solid #e5e7eb; }
.ielts-text-size-preset.active:last-child { border-bottom: none; }

.ielts-final-wrapper.ielts-high-contrast .ielts-top-bar,
.ielts-final-wrapper.ielts-high-contrast .ielts-timer-display,
.ielts-final-wrapper.ielts-high-contrast .options-popup,
.ielts-final-wrapper.ielts-high-contrast .volume-popup {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
    box-shadow: none !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content {
    background: #101010 !important;
    color: #f5f5f5 !important;
    border-color: #4b5563 !important;
    box-shadow: none;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-top-bar-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-timer-display,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-back-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-subtitle,
.ielts-final-wrapper.ielts-high-contrast .ielts-notes-toggle-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-review-button,
.ielts-final-wrapper.ielts-high-contrast .icon-btn-toggle {
    color: #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-notes-toggle-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-review-button,
.ielts-final-wrapper.ielts-high-contrast .icon-btn-toggle,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.ielts-high-contrast .ielts-text-size-preset {
    background: #1d1d1d !important;
    border-color: #737b87 !important;
    color: #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-gap-fill,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-trigger,
.ielts-final-wrapper.ielts-high-contrast .ielts-list-option,
.ielts-final-wrapper.ielts-high-contrast .ielts-drop-zone,
.ielts-final-wrapper.ielts-high-contrast button.choice-button,
.ielts-final-wrapper.ielts-high-contrast .choice-label-tfng span,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-dropdown,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-options,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drop-zone,
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-table,
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-table th,
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-table td,
.ielts-final-wrapper.ielts-high-contrast .ielts-drag-pool,
.ielts-final-wrapper.ielts-high-contrast .ielts-drag-item,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drag-item,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-bank {
    background: #1a1a1a !important;
    color: #f5f5f5 !important;
    border-color: #8d99a8 !important;
    box-shadow: none !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-table thead th,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-bank-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-drag-item:hover,
.ielts-final-wrapper.ielts-high-contrast .ielts-drag-item.selected-for-drop,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-option,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-option:hover,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-option.selected {
    background: #242424 !important;
    color: #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-option-text,
.ielts-final-wrapper.ielts-high-contrast .list-text,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drop-text,
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-prompt,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-state {
    color: #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content table,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content table th,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content table td,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content table,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content table th,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content table td {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drop-placeholder,
.ielts-final-wrapper.ielts-high-contrast .ielts-drop-zone.filled,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drop-zone.filled,
.ielts-final-wrapper.ielts-high-contrast .ielts-list-option.selected,
.ielts-final-wrapper.ielts-high-contrast button.choice-button.selected,
.ielts-final-wrapper.ielts-high-contrast .choice-input-tfng:checked + span,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-trigger.correct,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-trigger.incorrect {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: inset 0 0 0 1px #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drag-item.selected-for-drop,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-drop-zone.drag-over,
.ielts-final-wrapper.ielts-high-contrast .ielts-drop-zone.drag-over,
.ielts-final-wrapper.ielts-high-contrast .ielts-list-option:hover,
.ielts-final-wrapper.ielts-high-contrast button.choice-button:hover,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-trigger:hover {
    background: #262626 !important;
    border-color: #f5f5f5 !important;
    color: #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-dot {
    border-color: #f5f5f5 !important;
    background: #101010 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-matrix-input:checked + .ielts-matrix-dot {
    border-color: #f5f5f5 !important;
    background-color: #101010 !important;
    background-image: radial-gradient(circle, #f5f5f5 0 42%, transparent 46%) !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-button.active,
.ielts-final-wrapper.ielts-high-contrast .ielts-text-size-preset.active,
.ielts-final-wrapper.ielts-high-contrast .palette-btn.current,
.ielts-final-wrapper.ielts-high-contrast .question-anchor-number,
.ielts-final-wrapper.ielts-high-contrast .palette-btn.active,
.ielts-final-wrapper.ielts-high-contrast .palette-btn.highlight,
.ielts-final-wrapper.ielts-high-contrast .ielts-top-bar .active {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: inset 0 0 0 1px #f5f5f5 !important;
}
.ielts-final-wrapper.ielts-high-contrast .palette-btn,
.ielts-final-wrapper.ielts-high-contrast .palette-btn:hover { color: #f5f5f5 !important; background: transparent !important; border-color: transparent !important; }
.ielts-final-wrapper.ielts-high-contrast .palette-btn::before { background: #6b7280; }
.ielts-final-wrapper.ielts-high-contrast .palette-btn.answered { color: #f5f5f5 !important; background: rgba(34, 197, 94, 0.18) !important; border-color: #22c55e !important; box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35) !important; }
.ielts-final-wrapper.ielts-high-contrast .palette-btn.answered::before { background: #22c55e; }
.ielts-final-wrapper.ielts-high-contrast .palette-btn:hover,
.ielts-final-wrapper.ielts-high-contrast .palette-btn:focus-visible { color: #f5f5f5 !important; background: rgba(255, 255, 255, 0.14) !important; border-color: #f5f5f5 !important; box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.35) !important; transform: translateY(-1px); outline: none; }
.ielts-final-wrapper.ielts-high-contrast .ielts-options-dialog,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-close-btn { color: #f5f5f5 !important; }
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content::-webkit-scrollbar-track {
    background: #111827;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content::-webkit-scrollbar-thumb {
    background: #6b7280;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-final-answer-button {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: none !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-final-answer-button:hover,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-answer-button:focus-visible {
    background: #1f1f1f !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}
.ielts-final-wrapper.ielts-high-contrast #ielts-notes-search {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
}
.ielts-final-wrapper.ielts-high-contrast .ielts-content-wrapper {
    gap: 12px;
}

/* Volume Control (Desktop) */
.volume-control-group { display: flex; align-items: center; }
.volume-control-group .icon-btn-toggle { display: none; } 
.volume-popup { background: #f8fafc; border: 1px solid #e2e8f0; padding: 0 12px; height: 40px; border-radius: 20px; display: flex; align-items: center; gap: 8px; }
.volume-popup { background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); padding: 0 14px; height: 42px; border-radius: 999px; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1); }
.volume-popup input[type=range] { -webkit-appearance: none; appearance: none; width: 100px; height: 6px; background: #e2e8f0; border-radius: 5px; outline: none; cursor: pointer; }
.volume-popup input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #007BFF; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* Submit Button */
.ielts-final-answer-button { -webkit-appearance: none; appearance: none; min-height: 42px; padding: 0 20px; background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); color: #ffffff; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 15px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; border: 1px solid #1d4ed8; border-radius: 10px; cursor: pointer; margin-left: 8px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none; box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24); transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.ielts-final-answer-button { min-height: 44px; padding: 0 22px; font-family: var(--ielts-lms-font-sans, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif); border-radius: 12px; box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24); }
.ielts-final-answer-button:hover { background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%); border-color: #1e40af; box-shadow: 0 14px 28px rgba(30, 64, 175, 0.28); transform: translateY(-1px); }
.ielts-final-answer-button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.22); outline-offset: 2px; }

/* REVIEW BUTTON (Desktop) */
.ielts-review-button .mobile-icon { display: none; }
.ielts-review-button .desktop-text { display: inline; }
.ielts-review-button .desktop-icon { display: block; }

/* --- NAVIGATION ARROWS (SMARTBOOK STYLE) --- */
.nav-controls { position: fixed; bottom: 96px; right: 18px; z-index: 1001; display: flex; gap: 14px; }
.ielts-final-wrapper:not(.test-started) .nav-controls { display: none !important; }
.nav-btn { width: 52px; height: 52px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.96); border: 2px solid #34d399; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 180ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 180ms cubic-bezier(0.25, 0.8, 0.25, 1), color 180ms cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 180ms cubic-bezier(0.25, 0.8, 0.25, 1), transform 180ms cubic-bezier(0.25, 0.8, 0.25, 1); color: #10b981; box-shadow: 0 12px 24px rgba(2,6,23,0.2); }
.nav-btn:hover { background-color: #ffffff; transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22), 0 6px 14px rgba(2,6,23,0.16); color: #059669; border-color: #10b981; }
.nav-btn:active { transform: translateY(0) scale(0.95); background-color: #f0fdf4; }
.nav-btn svg { width: 30px; height: 30px; stroke-width: 3px; }

/* TAB VISIBILITY */
.ielts-part-section { display: none; }
.ielts-part-section[style*="display: block"] { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* QUESTIONS & INPUTS */
.question-anchor-number { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; background-color: #facc15; color: #111827; border-radius: 50%; font-weight: 800; font-size: 13px; margin-right: 8px; vertical-align: middle; line-height: 1; box-shadow: none; }
.ielts-gap-fill { display: inline-block; width: auto; min-width: 64px; height: 30px; padding: 3px 10px; border: 2px solid #facc15; border-radius: 5px; background: #fffdf3; font-family: inherit; font-size: 15px; font-weight: 600; color: #1f2937; -webkit-user-select: text; user-select: text; margin: 5px 6px; vertical-align: middle; line-height: 1.2; box-sizing: border-box; transition: border-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.ielts-gap-fill:focus { outline: none; border-color: #f59e0b; background-color: #ffffff; transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12); }

/* Choice Groups (Checkbox/Radio Lookalikes) */
span.choice-group, span.choice-group-tfng, span.choice-group-multi { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
button.choice-button { font-family: inherit; font-weight: 600; width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 14px; color: #4b5563; background: #ffffff; border: 1.5px solid #e5e7eb; cursor: pointer; transition: background-color 180ms cubic-bezier(0.4, 0, 0.2, 1), border-color 180ms cubic-bezier(0.4, 0, 0.2, 1), color 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1), transform 180ms cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
button.choice-button:hover { border-color: #10b981; color: #10b981; background-color: #f0fdf4; }
button.choice-button.selected { background: #10b981; color: #ffffff; border-color: #10b981; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }

/* True/False/Not Given */
.choice-label-tfng { display: inline-flex; align-items: center; cursor: pointer; font-size: inherit; color: #4b5563; margin: 0; }
.choice-input-tfng { display: none; }
.choice-label-tfng span { display: inline-block; font-weight: 600; font-size: 13px; padding: 8px 18px; border: 1.5px solid #e5e7eb; border-radius: 50px; background: #ffffff; line-height: 1; transition: border-color 180ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms cubic-bezier(0.4, 0, 0.2, 1), color 180ms cubic-bezier(0.4, 0, 0.2, 1), transform 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.choice-label-tfng:hover span { border-color: #10b981; color: #10b981; background-color: #f0fdf4; }
.choice-input-tfng:checked + span { background: #10b981; color: #ffffff; border-color: #10b981; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }

/* SELECT DROPDOWNS */
.ielts-select-wrapper { position: relative; display: inline-flex; vertical-align: middle; min-width: 44px; margin: 5px 6px; }
.ielts-select-trigger { display: inline-flex; align-items: center; justify-content: space-between; padding: 7px 10px; min-height: 40px; min-width: 48px; background: #fffdf3; border: 2px solid #facc15; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: #1f2937; transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease; }
.ielts-select-trigger:hover { border-color: #f59e0b; background-color: #ffffff; }
.ielts-select-arrow { flex-shrink: 0; margin-left: 4px; width: 14px; height: 14px; color: #fde68a; stroke: #fde68a; }
.selected-text:empty { display: inline-block; min-height: 1em; width: 5px; }
.ielts-select-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 120px; max-height: 200px; overflow-y: auto; background: #ffffff; border: 1px solid #dbe4ef; border-radius: 10px; box-shadow: 0 18px 40px rgba(2,6,23,0.16); z-index: 1000; margin-top: 6px; padding: 4px 0; }
.ielts-select-wrapper.open .ielts-select-dropdown { display: block; }
.ielts-select-option { display: block; padding: 8px 12px; font-size: 14px; color: #1f2937; cursor: pointer; transition: background 0.1s, color 0.1s; white-space: nowrap; }
.ielts-select-option:hover { background: #fffbeb; }
.ielts-select-option.selected { background: #fef3c7; color: #92400e; font-weight: 600; }

/* LIST ITEMS */
.ielts-list-group { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; width: 100%; }
.ielts-list-option { display: flex; align-items: flex-start; padding: 10px 15px; border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer; transition: border-color 180ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1); background: #fff; max-width: 100%; box-sizing: border-box; width: fit-content; }
.ielts-list-option:hover { border-color: #10b981; background: #f0fdf4; }
.ielts-list-option.selected { background: #ecfdf5; border-color: #10b981; box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1); }
.ielts-list-option .list-circle { width: 24px; height: 24px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-right: 12px; flex-shrink: 0; transition: background-color 150ms ease, color 150ms ease; }
.ielts-list-option.selected .list-circle { background: #10b981; color: #fff; }
.ielts-list-option .list-text { font-size: 15px; color: #374151; line-height: 1.4; word-break: break-word; }

/* MATRIX TABLE */
.ielts-matrix-wrapper { --ielts-matrix-flag-gap: 40px; margin-top: 14px; overflow-x: auto; box-sizing: border-box; padding-right: var(--ielts-matrix-flag-gap); }
.ielts-matrix-table { width: 100%; min-width: 0; table-layout: auto; border-collapse: collapse; background: #ffffff; border: 1px solid #d1d5db; }
.ielts-matrix-table th, .ielts-matrix-table td { border: 1px solid #d1d5db; padding: 10px 8px; text-align: center; vertical-align: middle; }
.ielts-matrix-table thead th { background: #f9fafb; color: #111827; font-size: 14px; font-weight: 700; }
.ielts-matrix-table thead th:first-child { width: 100%; min-width: clamp(320px, 62%, 620px); }
.ielts-matrix-table thead th:not(:first-child) { width: 42px; min-width: 42px; max-width: 42px; padding: 10px 4px; }
.ielts-matrix-prompt { width: 100%; min-width: clamp(320px, 62%, 620px); padding: 12px 14px; text-align: left; color: #111827; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: normal; }
.ielts-matrix-qnum { font-weight: 700; margin-right: 6px; }
.ielts-matrix-cell { width: 42px; min-width: 42px; max-width: 42px; padding: 10px 4px; }
.ielts-matrix-choice { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.ielts-matrix-choice:hover { background: #f0fdf4; }
.ielts-matrix-input { position: absolute; opacity: 0; pointer-events: none; }
.ielts-matrix-dot { width: 14px; height: 14px; border: 2px solid #9ca3af; border-radius: 50%; background: #ffffff; transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
.ielts-matrix-choice:hover .ielts-matrix-dot { border-color: #10b981; }
.ielts-matrix-input:checked + .ielts-matrix-dot { border-color: #059669; background-color: #ffffff; background-image: radial-gradient(circle, #059669 0 42%, transparent 46%); }

/* REVIEW MODE - STATUS COLORS */
.review-mode button.choice-button { pointer-events: none; opacity: 0.7; }
.review-mode button.choice-button.selected { opacity: 1; }
.review-mode .choice-label-tfng { pointer-events: none; opacity: 0.7; }
.review-mode .choice-input-tfng:checked + span { opacity: 1; }
.review-mode .ielts-select-wrapper { pointer-events: none; }
.review-mode .ielts-list-option { pointer-events: none; }
.review-mode .ielts-matrix-choice { pointer-events: none; }

button.choice-button.correct, .choice-label-tfng.correct span { background: #10b981 !important; color: #fff !important; border-color: #10b981 !important; opacity: 1 !important; }
button.choice-button.incorrect, .choice-label-tfng.incorrect span { background: #dc3545 !important; color: #fff !important; border-color: #dc3545 !important; opacity: 1 !important; }
.ielts-select-trigger.correct { border-color: #28a745 !important; background-color: #f0fff4 !important; color: #28a745; }
.ielts-select-trigger.incorrect { border-color: #dc3545 !important; background-color: #fff5f5 !important; color: #dc3545; }
.ielts-list-option.correct { border-color: #28a745 !important; background: #f0fff4 !important; }
.ielts-list-option.correct .list-circle { background: #28a745 !important; color: #fff; }
.ielts-list-option.incorrect { border-color: #dc3545 !important; background: #fff5f5 !important; }
.ielts-list-option.incorrect .list-circle { background: #dc3545 !important; color: #fff; }
.ielts-matrix-choice.correct .ielts-matrix-dot { border-color: #28a745 !important; background-image: radial-gradient(circle, #28a745 0 42%, transparent 46%) !important; }
.ielts-matrix-choice.incorrect .ielts-matrix-dot { border-color: #dc3545 !important; background-image: radial-gradient(circle, #dc3545 0 42%, transparent 46%) !important; }
.review-mode button.choice-button.correct:not(.selected) { background: transparent !important; color: #10b981 !important; border: 2px dashed #10b981 !important; }

/* REVIEW MODAL */
.ielts-review-modal-content { max-width: 800px !important; width: 90%; max-height: 85vh; padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.review-modal-header { padding: 20px; border-bottom: 1px solid #e2e8f0; position: relative; text-align: center; }
.review-modal-header h3 { margin: 0; font-size: 20px; font-weight: 700; color: #1a202c; }
.review-subtitle { font-size: 13px; color: #718096; text-align: center; margin: 10px 0 0; font-style: italic; padding: 0 20px; }
.review-grid-container { display: grid; grid-template-columns: repeat(4, 1fr); overflow-y: auto; padding: 20px; border-bottom: 1px solid #e2e8f0; }
.review-grid-item { border: 1px solid #e2e8f0; padding: 10px; font-size: 14px; color: #2d3748; background: #fff; display: flex; align-items: center; margin-right: -1px; margin-bottom: -1px; }
.review-q-num { font-weight: 600; color: #718096; margin-right: 8px; min-width: 30px; }
.review-user-ans { font-weight: 500; color: #2d3748; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-modal-footer { padding: 15px; text-align: center; background: #f7f8fa; }
.review-close-btn { background-color: #319795 !important; border: none; margin-top: 0 !important; padding: 10px 30px; }

/* LISTENING PANEL LOGIC */
.ielts-final-wrapper .ielts-final-panel { min-width: 150px; display: flex; flex-direction: column; background: #fff; min-height: 0; }
.ielts-final-wrapper.listening-mode:not(.review-mode) #ielts-left-panel,
.ielts-final-wrapper.listening-mode:not(.review-mode) #ielts-dragger { display: none !important; }
.ielts-final-wrapper.listening-mode #ielts-right-panel { width: 100% !important; flex-grow: 1; border: none; }
.ielts-final-wrapper.listening-mode.review-mode #ielts-left-panel { display: flex !important; width: 50%; border-right: 1px solid #e2e8f0; flex-shrink: 0; }
.ielts-final-wrapper.listening-mode.review-mode #ielts-right-panel { width: auto; flex-grow: 1; }
.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1180px) {
    .ielts-final-wrapper.listening-mode.focus-mode:not(.review-mode) .ielts-final-container {
        justify-content: flex-start;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }

    .ielts-final-wrapper.listening-mode.focus-mode:not(.review-mode) #ielts-right-panel {
        width: 100% !important;
        max-width: none;
        flex: 1 1 auto;
        margin-inline: 0;
    }

    .ielts-final-wrapper.listening-mode.focus-mode:not(.review-mode) #ielts-right-panel .ielts-final-panel-content {
        padding-left: 32px;
        padding-right: 0;
    }
}

/* DRAGGER (match reading module) */
.ielts-final-wrapper .ielts-final-dragger { flex-basis: 12px; flex-shrink: 0; background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%); cursor: col-resize; border-left: 1px solid rgba(255,255,255,0.08); border-right: 1px solid rgba(2,6,23,0.45); transition: background-color .2s ease; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.ielts-final-wrapper .ielts-final-dragger:hover { background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%); }
.ielts-final-wrapper .ielts-final-dragger::before { content: ''; position: absolute; width: 3px; height: 56px; border-radius: 999px; background: rgba(255,255,255,0.9); box-shadow: 0 0 0 1px rgba(15,23,42,0.18); opacity: 0.9; transition: opacity 0.2s, transform 0.2s; }
.ielts-final-wrapper .ielts-final-dragger:hover::before { opacity: 1; transform: scaleY(1.08); }
.ielts-final-wrapper .ielts-final-panel-content { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 18px var(--panel-padding) 20px var(--panel-padding); overflow-y: auto; overflow-x: hidden; flex-grow: 1; line-height: 1.72; color: #1f2937; -webkit-user-select: text; user-select: text; font-size: 16px; transition: font-size .2s ease; box-sizing: border-box; background: #ffffff; }
.ielts-final-wrapper .ielts-final-panel,
.ielts-final-wrapper #ielts-left-panel,
.ielts-final-wrapper #ielts-right-panel { background: #ffffff; border: 1px solid #dbe4ef; }
.ielts-final-wrapper .ielts-question-content,
.ielts-final-wrapper .ielts-final-panel-content p,
.ielts-final-wrapper .ielts-final-panel-content li,
.ielts-final-wrapper .ielts-final-panel-content td,
.ielts-final-wrapper .ielts-final-panel-content th,
.ielts-final-wrapper .ielts-final-panel-content strong,
.ielts-final-wrapper .ielts-final-panel-content h1,
.ielts-final-wrapper .ielts-final-panel-content h2,
.ielts-final-wrapper .ielts-final-panel-content h3,
.ielts-final-wrapper .ielts-final-panel-content h4 { color: inherit; }
.ielts-question-content { scroll-padding-bottom: 80px; }
.processed-questions-container { padding-bottom: 120px; padding-top: 0; }

/* LISTENING AUDIO PLAYER (Sticky in Header) */
.ielts-audio-player-wrapper {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 5px 15px;
    gap: 10px;
}
.audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.audio-status {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}
.audio-status.playing {
    color: #10b981;
    animation: pulse 2s infinite;
}
.audio-timer {
    font-size: 14px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    color: #1e293b;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

/* NOTES SIDEBAR */
.ielts-content-wrapper { display: flex; position: relative; flex-grow: 1; overflow-x: hidden; overflow-y: hidden; height: 100%; min-height: 0; background: #0a1324; flex-direction: column; }
.ielts-listening-part-intro { display: none; flex-direction: column; gap: 4px; padding: 12px 16px; background: #f1f2ec; border: 1px solid #d5d5d5; border-radius: 2px; flex-shrink: 0; transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, margin 0.3s ease, border-width 0.3s ease; max-height: 120px; overflow: hidden; }
.ielts-listening-part-intro.intro-collapsed { max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; opacity: 0; margin-top: 0 !important; margin-bottom: 0 !important; border-width: 0 !important; }
.ielts-listening-part-intro-title { font-size: 16px; font-weight: 700; line-height: 1.15; color: #111827; }
.ielts-listening-part-intro-text { margin: 0; font-size: 16px; line-height: 1.5; color: #111827; font-style: normal; }
.ielts-final-container { transition: width 0.3s ease; width: 100%; flex: 1 1 auto; display: flex; flex-direction: row; min-height: 0; background: #0a1324; } 
.ielts-notes-sidebar { position: absolute; top: 0; right: -320px; width: 300px; height: 100%; background: #ffffff; border-left: 1px solid #e2e8f0; box-shadow: -2px 0 10px rgba(0,0,0,0.05); z-index: 900; transition: right 0.3s ease; display: flex; flex-direction: column; }
.ielts-notes-sidebar.open { right: 0; }
.notes-sidebar-header { padding: 15px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
.notes-sidebar-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #1e293b; }
#ielts-notes-close-btn { background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; line-height: 1; }
.notes-search-box { padding: 10px 15px; border-bottom: 1px solid #e2e8f0; position: relative; }
#ielts-notes-search { width: 100%; padding: 8px 10px 8px 30px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.notes-search-box svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.notes-list-container { flex-grow: 1; overflow-y: auto; padding: 0; }
.note-item { padding: 15px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.15s; display: flex; justify-content: space-between; align-items: center; }
.note-item:hover { background-color: #f8fafc; }
.note-content { flex-grow: 1; overflow: hidden; }
.note-item-text { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item-context { font-size: 12px; color: #64748b; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-actions { display: flex; gap: 5px; flex-shrink: 0; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.6; transition: opacity 0.2s; padding: 2px; }
.icon-btn:hover { opacity: 1; }
.edit-btn { color: #007bff; }
.del-btn { color: #dc3545; }
.no-notes-message { padding: 20px; text-align: center; color: #94a3b8; font-size: 14px; font-style: italic; }

/* MODALS & HIGHLIGHTS */
#text-action-popup { position: fixed; display: none; background: #333; border-radius: 5px; padding: 5px; z-index: var(--ielts-lms-z-popup, 10001); gap: 5px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
#text-action-popup button { background: #555; color: #fff; border: none; padding: 8px 12px; border-radius: 3px; cursor: pointer; font-size: 14px; }
#text-action-popup button:hover { background: #007BFF; }
#note-display-tooltip { position: fixed; display: none; background: #222; color: #fff; padding: 10px; border-radius: 5px; font-size: 14px; max-width: 300px; z-index: var(--ielts-lms-z-popup, 10001); pointer-events: none; }
.highlighted-text { background-color: #FFF8A1 !important; color: #111827 !important; display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.note-attached { background-color: #bae6fd !important; color: #1e293b !important; border-bottom: 2px solid #0ea5e9; cursor: help; display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.annotations-hidden .highlighted-text,
.annotations-hidden .note-attached { background-color: transparent !important; color: inherit !important; border-bottom: none !important; box-shadow: none !important; }
.ielts-note-header { font-size: 22px; margin-top: 0; }
#ielts-note-modal .ielts-note-modal-content { position: absolute; max-width: 350px; padding: 0; box-shadow: 0 4px 15px rgba(0, 0, 0, .15); }
.ielts-note-header { margin: 0; padding: 10px 15px; font-size: 16px; font-weight: 600; background: #f7f7f7; border-bottom: 1px solid #eee; cursor: move; }
.ielts-note-header.drag-handle { cursor: grab; }
.ielts-note-header.drag-handle:active { cursor: grabbing; }
#ielts-note-textarea { width: auto; height: 120px; border: none; border-bottom: 1px solid #eee; border-radius: 0; padding: 15px; font-size: 15px; resize: vertical; margin: 0; }
.ielts-note-buttons { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 15px; background: #f7f7f7; }
.ielts-note-button { border: none; border-radius: 5px; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; }
.ielts-note-button.save { background: #007BFF; color: #fff; }
.correct-answer-tooltip { color: #28a745; font-weight: bold; font-size: .9em; margin-left: 4px; display: inline-block; vertical-align: middle; }

/* Explanation/Vocab Review Controls */
.ielts-explanations-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid #22c55e;
    border-radius: 999px;
    background: #f3f4f6;
    height: 28px;
    box-sizing: border-box;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.ielts-explanations-toggle-wrap:hover {
    background: #eef2f7;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.ielts-explanations-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}

/* Desktop/mobile label switch — toggled in the mobile breakpoint */
.ielts-hlbl-mob { display: none; }
.ielts-hlbl-dsk { display: inline; }

.ielts-explanations-toggle {
    width: 36px;
    height: 18px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.ielts-explanations-toggle:hover {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.ielts-explanations-toggle .ielts-explanations-knob {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform .2s ease;
}

.ielts-explanations-toggle.active {
    background: #22c55e;
}

.ielts-explanations-toggle.active .ielts-explanations-knob {
    transform: translateX(18px);
}

.ielts-inline-explain-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 4px;
    margin-right: 8px;
}

.ielts-inline-flag-wrap {
    position: absolute;
    top: 2px;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.ielts-flag-host {
    position: relative;
    padding-right: 34px;
}

.ielts-flag-host.is-current-question .ielts-inline-flag-wrap {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.ielts-flag-host--matrix-group {
    padding-right: var(--ielts-matrix-flag-gap);
}

.ielts-flag-host--matrix-group .ielts-inline-flag-wrap {
    top: var(--ielts-matrix-flag-top, 72px);
    right: 10px;
    z-index: 4;
}

.ielts-flag-host--matrix-group.is-current-question .ielts-inline-flag-wrap {
    transform: translateY(0);
}

@media (min-width: 769px) {
    .ielts-matrix-wrapper {
        overflow-x: visible;
        overflow-y: visible;
    }
}

.ielts-inline-flag-btn {
    width: 18px;
    height: 22px;
    border-radius: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: #9ca3af;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .15s ease, opacity .15s ease, transform .15s ease;
}

.ielts-inline-flag-btn:hover,
.ielts-inline-flag-btn:focus-visible {
    background: transparent;
    border-color: transparent;
    color: #6b7280;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: none;
    outline: none;
}

.ielts-inline-flag-btn.active {
    background: transparent;
    border-color: transparent;
    color: #ef4444;
    opacity: 1;
}

.ielts-inline-flag-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 22px;
    line-height: 1;
}

.ielts-inline-flag-glyph svg {
    width: 18px;
    height: 22px;
    display: block;
}

.ielts-inline-flag-glyph path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.ielts-inline-flag-btn.active .ielts-inline-flag-glyph path {
    fill: currentColor;
    stroke: currentColor;
}

.ielts-final-wrapper.review-mode .ielts-inline-flag-wrap,
.ielts-final-wrapper.test-completed .ielts-inline-flag-wrap {
    display: none !important;
}

.ielts-inline-explain-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #b45309;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.ielts-inline-explain-btn:hover {
    background: #ffedd5;
    transform: translateY(-1px);
    border-color: #fde68a;
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.16);
}

.vocab-on .ielts-vocab-word {
    cursor: pointer;
    color: inherit !important;
    text-decoration: none;
    transition: text-decoration-color .12s ease;
}

.vocab-on .ielts-vocab-word:hover,
.vocab-on .ielts-vocab-word:focus {
    color: inherit !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    text-decoration-color: #6366f1;
    outline: none;
}

.ielts-listening-review-transcript {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 0 var(--panel-padding) 20px var(--panel-padding);
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.7;
    color: #334155;
}

.ielts-listening-review-transcript .ielts-part-section {
    display: none;
}

.ielts-listening-review-transcript .ielts-part-section:first-child {
    display: block;
}

#ielts-vocab-modal {
    z-index: var(--ielts-lms-z-vocab, 10002);
    background: rgba(15, 23, 42, 0.34);
    -webkit-backdrop-filter: blur(1.8px);
    backdrop-filter: blur(1.8px);
}

#ielts-vocab-modal-card {
    max-width: 430px;
    width: 92vw;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    background: #ffffff;
    color: #0f172a;
    overflow: hidden;
    text-align: left;
    padding: 0;
    border: 1px solid #e5e7eb;
}

.ielts-vocab-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 24px 0;
}

.ielts-vocab-pos-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf2ff;
    color: #4f46e5;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ielts-vocab-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ielts-vocab-icon-btn {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 28px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ielts-vocab-icon-btn:hover {
    color: #64748b;
}

.ielts-vocab-main {
    padding: 8px 24px 0;
}

.ielts-vocab-word-title {
    margin: 0;
    font-size: 46px;
    line-height: 0.98;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #0f172a;
}

.ielts-vocab-pronounce-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}

#ielts-vocab-phonetic {
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
    font-size: 17px;
    letter-spacing: 0.01em;
}

.ielts-vocab-audio-inline-btn {
    border: 0;
    background: transparent;
    color: #4f46e5;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ielts-vocab-audio-inline-btn:hover {
    color: #4338ca;
}

#ielts-vocab-modal-body {
    padding: 18px 24px 16px;
}

.ielts-vocab-section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 900;
    color: #94a3b8;
    margin-bottom: 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ielts-vocab-section-label::before {
    content: '';
    width: 11px;
    height: 11px;
    border: 1.6px solid #a8b4c7;
    border-radius: 2px;
    display: inline-block;
    box-sizing: border-box;
}

.ielts-vocab-section-label.is-syn {
    color: #059669;
}

.ielts-vocab-section-label.is-syn::before {
    border-color: #10b981;
    border-radius: 999px;
}

.ielts-vocab-section-label.is-ant {
    color: #f43f5e;
}

.ielts-vocab-section-label.is-ant::before {
    border-color: #f43f5e;
    border-radius: 999px;
}

.ielts-vocab-definition {
    color: #334155;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
    margin-bottom: 18px;
}

.ielts-vocab-example-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f5f7fb;
    padding: 14px 14px;
    margin-bottom: 18px;
}

.ielts-vocab-example-text {
    color: #475569;
    font-size: 15px;
    line-height: 1.55;
    font-style: italic;
}

.ielts-vocab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ielts-vocab-grid.single-col {
    grid-template-columns: 1fr;
}

.ielts-vocab-col {
    min-width: 0;
}

.ielts-vocab-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ielts-vocab-footer {
    background: #f2f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 14px 16px;
}

.ielts-vocab-gotit-btn {
    width: 100%;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(90deg, #4f46e5, #4338ca);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 15px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ielts-vocab-gotit-btn:hover {
    filter: brightness(1.04);
}

#ielts-vocab-modal .spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

.vocab-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 9px;
    border: 1px solid;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.vocab-chip--syn {
    border-color: #86efac;
    background: #ecfdf3;
    color: #047857;
}

.vocab-chip--ant {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

@media (max-width: 640px) {
    #ielts-vocab-modal-card {
        width: 95vw;
        border-radius: 20px;
    }

    .ielts-vocab-word-title {
        font-size: 40px;
    }

    #ielts-vocab-phonetic {
        font-size: 16px;
    }

    .ielts-vocab-head,
    .ielts-vocab-main,
    #ielts-vocab-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ielts-vocab-footer {
        padding: 12px;
    }

    .ielts-vocab-grid {
        grid-template-columns: 1fr;
    }

    .ielts-vocab-gotit-btn {
        border-radius: 14px;
        font-size: 16px;
        padding: 14px 14px;
    }
}

/* MOBILE OVERRIDES */
@media (max-width: 768px) {
  .ielts-top-bar { height: 40px; padding: 0 8px; margin-bottom: 0; flex-wrap: nowrap; overflow: hidden; }
  .ielts-top-bar-center { order: 0; flex-shrink: 0; margin-right: 0; }
  .ielts-audio-player-wrapper { border: none; background: transparent; padding: 0; }
  .ielts-top-bar-left { display: none; } 
  .ielts-top-bar-mid { display: flex !important; order: 0; flex: 0 0 auto; gap: 4px; margin-left: 8px; }
  /* Reduce panel side-padding on mobile to maximise reading width */
  .ielts-final-wrapper { --panel-padding: 10px; }
  /* Compact review controls on mobile */
  .ielts-hlbl-dsk { display: none; }
  .ielts-hlbl-mob { display: inline-flex; align-items: center; }
  #ielts-ai-feedback-btn-top { padding: 0 9px; font-size: 12px; min-height: 36px; height: 36px; border-radius: 6px; }
  .ielts-explanations-toggle-wrap { padding: 2px 6px; height: 28px; gap: 4px; }
  .ielts-explanations-toggle { width: 28px; height: 14px; }
  .ielts-explanations-toggle .ielts-explanations-knob { width: 10px; height: 10px; top: 2px; left: 2px; }
  .ielts-explanations-toggle.active .ielts-explanations-knob { transform: translateX(14px); }
  .ielts-top-bar-right { order: 0; flex: 0 0 auto; gap: 4px; margin-left: auto; }
  .ielts-top-bar-right > .volume-control-group { display: none !important; }
  .ielts-top-bar-right > .options-control-group { order: 0 !important; }
  .ielts-top-bar-right > .ielts-review-button { order: 1 !important; }
  .ielts-top-bar-right > .ielts-final-answer-button { order: 2 !important; }
  .ielts-review-button, #volume-toggle-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center; }
    #font-toggle-btn { display: inline-flex !important; width: 44px; height: 44px; padding: 0; }
  #font-toggle-btn .ielts-options-icon-menu { display: none; }
  #font-toggle-btn .ielts-options-icon-moon { display: block; }
  #font-toggle-btn .ielts-options-icon-sun { display: none; }
  .ielts-final-wrapper.ielts-high-contrast #font-toggle-btn .ielts-options-icon-moon { display: none; }
  .ielts-final-wrapper.ielts-high-contrast #font-toggle-btn .ielts-options-icon-sun { display: block; }
  .ielts-review-button svg, #volume-toggle-btn svg { transform: scale(0.85); }
  .ielts-review-button .desktop-text, .ielts-notes-toggle-btn { display: none !important; }
  .ielts-review-button .mobile-icon { display: block; }
  
  /* Mobile Volume Popup */
  .volume-popup { display: none; position: absolute; top: 50px; right: 0; background: white; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; z-index: 100; padding: 10px 15px; border-radius: 8px; min-width: 160px; justify-content: center; }
  .volume-popup.active { display: flex; }
  
    .ielts-final-answer-button { min-height: 44px; padding: 0 10px; font-size: 12px; white-space: nowrap; margin-left: 0; }
  .nav-controls { bottom: 40px; right: 2px; } 
  .ielts-pagination-footer { height: 50px; }
  .part-box { display: none !important; }
  .part-box.active { display: flex !important; width: 100% !important; flex: 1 1 100% !important; overflow: visible !important; margin-top: 5px; }
  .active-label { position: absolute; top: -10px; left: 12px; background-color: #fff; padding: 0 8px; font-size: 12px; line-height: 1; height: auto; border: none; color: #10b981; z-index: 10; }
  .box-summary-text { font-size: 14px; font-weight: bold; padding: 0; }
  .question-scroll-track { padding: 0 5px !important; gap: 1px !important; justify-content: space-between; }
  .palette-btn { width: 32px !important; height: 32px !important; font-size: 12px !important; }
  .ielts-final-wrapper .ielts-final-container { flex-direction: column !important; }
  .ielts-final-wrapper { padding: 0 !important; border: none !important; border-radius: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
  .ielts-final-container { border-radius: 0 !important; box-shadow: none !important; border: none !important; margin: 0 !important; width: 100% !important; }
  .ielts-final-wrapper.test-started .ielts-main-interface-container { padding-bottom: var(--mobile-footer-height) !important; }

  /* --- MOBILE / TABLET SPLIT PANEL LOGIC --- */
  /* Left Panel: Transcript stacks on top */
  .ielts-final-wrapper #ielts-left-panel {
      display: flex !important;
      height: 40%;
      width: 100% !important;
      flex-shrink: 0;
      border-right: none !important;
      border-bottom: 1px solid #e2e8f0;
  }

  /* Dragger: horizontal resize handle */
  .ielts-final-wrapper .ielts-final-dragger {
      display: flex !important;
      width: 100% !important;
      height: 20px !important;
      cursor: row-resize !important;
      border-left: none !important;
      border-right: none !important;
      border-top: 1px solid #e5e7eb;
      border-bottom: 1px solid #e5e7eb;
      touch-action: none;
      z-index: 50;
  }
  .ielts-final-wrapper .ielts-final-dragger::before { transform: rotate(90deg); }

  /* Right Panel: Questions below */
  .ielts-final-wrapper #ielts-right-panel {
      height: 60%;
      width: 100% !important;
      flex-grow: 1;
      min-height: 200px;
  }
  .ielts-notes-sidebar { width: 280px; }
  .ielts-review-modal-content { width: 95%; max-height: 90vh; }
  .review-grid-container { grid-template-columns: repeat(2, 1fr); padding: 10px; }
  .ielts-review-button { padding: 6px 10px; font-size: 12px; }
  .processed-questions-container { padding-top: 0 !important; }
  /* Mobile Header Override */
  .ielts-widget-header { margin-bottom: 15px; gap: 15px; }
  .ielts-header-controls { flex-direction: column; width: 100%; gap: 10px; }
  .ielts-timer-select { width: 100%; }
  .ielts-start-button { width: 100%; }

  /* --- INSTRUCTION ACCORDION MOBILE BOX FIXES (UPDATED) --- */
  .ielts-instruction-wrapper {
      padding: 0 10px !important;
      box-sizing: border-box !important;
      max-width: 100% !important;
      margin-bottom: 15px !important;
  }

  #ielts-instruction-toggle {
      display: flex !important;
      width: 100% !important;
      margin-top: 10px !important;
      height: auto !important;
      min-height: 44px;
      padding: 8px 15px;
      justify-content: center !important;
      background: #ffffff;
      font-size: 13px !important;
      border: 1.5px solid #e5e7eb;
      border-radius: 8px !important; /* Force rounded corners */
  }

  .ielts-instruction-box { 
      padding: 15px !important; 
      width: 100% !important; 
      box-sizing: border-box !important; 
  }
  
  .ielts-instruction-box h3 { font-size: 16px !important; }
  .ielts-instruction-box li { font-size: 14px !important; line-height: 1.5 !important; }
}

/* --- DRAG & DROP MODULE --- */

/* The Container for Options */
.ielts-drag-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8fafc; /* Matches light backgrounds */
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    margin-bottom: 25px;
}

/* ---- Word-bank drag pool: dock the options as a vertical box to the right ----
   Two real-world authoring patterns are handled:
   1. A bare [options:] tag -> the pool itself becomes the floated box.
   2. [options:] wrapped in its own styled <div> (common in summary tasks)
      -> that wrapper becomes the floated box and the pool fills it.
   Heading pools ("List of Headings") keep their full-width layout and are
   excluded throughout. */

/* Case 1: a bare pool floats itself and stacks its items vertically. */
.ielts-drag-pool:not(.ielts-heading-pool) {
    float: right;
    clear: right;
    position: relative;
    z-index: 3;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: clamp(260px, 40%, 380px);
    margin: 0 0 20px 28px;
}

.ielts-drag-pool:not(.ielts-heading-pool) .ielts-drag-item {
    width: 100%;
    box-sizing: border-box;
}

/* Case 2: the wrapper div around the pool floats instead; the pool then fills
   it and drops its own box so only the wrapper's border shows. The part-section
   is excluded so the whole question column is never floated. */
#ielts-processed-questions div:not(.ielts-part-section):has(> .ielts-drag-pool:not(.ielts-heading-pool)) {
    float: right;
    clear: right;
    position: relative;
    z-index: 3;
    width: clamp(260px, 40%, 380px);
    margin: 0 0 20px 28px;
}

#ielts-processed-questions div:not(.ielts-part-section):has(> .ielts-drag-pool:not(.ielts-heading-pool)) .ielts-drag-pool:not(.ielts-heading-pool) {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Contain the floated box within its question-group card. */
#ielts-processed-questions div:has(.ielts-drag-pool:not(.ielts-heading-pool)) {
    display: flow-root;
}

/* Keep the drag task at a comfortable reading width so the options box sits
   close to the questions instead of hugging the far edge of a wide test panel. */
#ielts-processed-questions .ielts-part-section:has(.ielts-drag-pool:not(.ielts-heading-pool)),
#ielts-processed-questions div:has(.ielts-drag-pool:not(.ielts-heading-pool)) {
    max-width: 880px;
}

/* The part-section is shown via an inline display value, so flow-root cannot
   apply to it; clear its floats with a pseudo-element instead. */
#ielts-processed-questions .ielts-part-section::after {
    content: "";
    display: block;
    clear: both;
}

/* Narrow viewports: drop the float and stack the box above the questions. */
@media (max-width: 768px) {
    .ielts-drag-pool:not(.ielts-heading-pool),
    #ielts-processed-questions div:not(.ielts-part-section):has(> .ielts-drag-pool:not(.ielts-heading-pool)) {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px;
    }
}

/* Draggable Items */
.ielts-drag-item {
    background: #ffffff;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: grab;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 180ms cubic-bezier(0.4, 0, 0.2, 1), color 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1), transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-select: none;
    user-select: none;
}

.ielts-drag-item:hover {
    border-color: #10b981; /* Primary Green */
    color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.ielts-drag-item:active { cursor: grabbing; }

/* ===== EXPLANATION LOCATION LOGIC STYLES ===== */

.ielts-explain-action {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* Scoped — no transition:all */
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ielts-explanation-menu {
    animation: ieltsExplainMenuIn .16s ease-out;
    transform-origin: top center;
}

.ielts-explanation-menu::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: translateX(-50%) rotate(45deg);
    box-sizing: border-box;
}

.ielts-explanation-menu.is-below::before {
    top: -6px;
}

.ielts-explanation-menu.is-above::before {
    bottom: -6px;
    transform: translateX(-50%) rotate(225deg);
}

@keyframes ieltsExplainMenuIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ielts-explain-action:hover {
    background: #f8fafc;
}

.ielts-explain-action.locate {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.ielts-explain-action.locate:hover {
    background: #4338ca;
}

.ielts-explain-action.logic {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.ielts-explain-action .action-icon {
    font-size: 12px;
    line-height: 1;
}

.ielts-expl-anchor {
    transition: background-color .3s ease, box-shadow .3s ease;
    border-radius: 4px;
    padding: 1px 2px;
}

.ielts-expl-badge {
    display: none;
    margin-right: 6px;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 6px;
    vertical-align: middle;
}

.explanations-on .ielts-expl-anchor {
    background: #eff6ff;
    box-shadow: inset 0 -2px 0 #bfdbfe;
}

.explanations-on .ielts-expl-badge {
    display: inline-block;
}

.ielts-evidence-hit {
    background: #fde68a !important;
    box-shadow: 0 0 0 2px #f59e0b !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .highlighted-text {
    background-color: #facc15 !important;
    color: #111827 !important;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.48), 0 0 14px rgba(250, 204, 21, 0.26);
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .highlighted-text * {
    color: inherit !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast.explanations-on .ielts-expl-anchor,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .explanations-on .ielts-expl-anchor {
    background: rgba(250, 204, 21, 0.18);
    color: #f8fafc;
    box-shadow: inset 0 -2px 0 #facc15, 0 0 0 1px rgba(250, 204, 21, 0.32);
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast.explanations-on .ielts-expl-badge,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .explanations-on .ielts-expl-badge {
    display: inline-block;
    background: #facc15;
    color: #111827;
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.28);
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .note-attached {
    background-color: #bae6fd !important;
    color: #0f172a !important;
    border-bottom-color: #38bdf8 !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 0 12px rgba(56, 189, 248, 0.18);
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .note-attached * {
    color: inherit !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast.annotations-hidden .highlighted-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast.annotations-hidden .note-attached {
    background-color: transparent !important;
    color: inherit !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-evidence-hit {
    background: #facc15 !important;
    color: #111827 !important;
    box-shadow: 0 0 0 2px #f59e0b, 0 0 18px rgba(250, 204, 21, 0.34) !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-evidence-hit * {
    color: inherit !important;
}

/* ===== REVIEW MODE AUDIO PLAYER STYLES ===== */

.ielts-review-audio-player {
    display: none;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

.audio-player-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
}

.audio-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #10b981;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    /* Scoped — no transition:all */
    transition: background-color 120ms ease, box-shadow 120ms ease, transform 180ms ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.audio-play-btn:hover {
    background: #059669;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}

.audio-play-btn:active {
    transform: scale(0.95);
}

.audio-time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Monaco', 'Courier New', monospace;
}

.audio-time-display .audio-time-current,
.audio-time-display .audio-time-total {
    min-width: 40px;
}
.audio-time-display .audio-time-current {
    text-align: right;
}
.audio-time-display .audio-time-separator {
    color: #cbd5e1;
}

.audio-progress-container {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    margin: 0;
    min-width: 100px;
    transition: height 0.2s ease;
}

.audio-progress-container:hover {
    height: 8px;
    background: #cbd5e1;
}

.audio-progress-container:hover #ielts-review-audio-progress .progress-handle {
    opacity: 1 !important;
}

#ielts-review-audio-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #10b981;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.audio-speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.audio-speed-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    /* Scoped — no transition:all */
    transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
    min-width: 45px;
}

.audio-speed-btn:hover {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdf4;
}

.audio-speed-btn:active {
    transform: scale(0.95);
}

.speed-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 60px;
    top: 100%;
    right: 0;
    margin-top: 4px;
}

.speed-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    /* Scoped — no transition:all */
    transition: background-color 120ms ease, color 120ms ease;
}

.speed-menu button:hover {
    background: #f8fafc;
    color: #10b981;
}

.speed-menu button:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.speed-menu button[style*="background: #f0f9ff"] {
    background: #f0f9ff !important;
    font-weight: 600;
    color: #10b981;
}

@media (max-width: 768px) {
    .audio-player-wrapper {
        gap: 12px;
    }

    .audio-play-btn {
        width: 40px;
        height: 40px;
    }

    .audio-time-display {
        font-size: 12px;
    }

    .audio-speed-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 40px;
    }

    .speed-menu button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Hiding Logic (Critical) */
.ielts-drag-item.is-hidden {
    display: none !important;
}

/* Selected State (For Mobile Click-to-Drop) */
.ielts-drag-item.selected-for-drop {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

/* Drop Zones (The Blanks) */
.ielts-drop-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 34px;
    padding: 5px 10px;
    margin: 5px 6px;
    border: 2px dashed #a8d5be;
    background: #ffffff;
    border-radius: 8px;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.2;
    box-sizing: border-box;
    color: #94a3b8;
    position: relative; /* anchor for the absolutely-positioned hover "(Remove)" tooltip */
    /* Scoped — no transition:all */
    transition: background-color 120ms ease, border-color 120ms ease, transform 180ms ease;
}

/* Hover/Active State */
.ielts-drop-zone.drag-over {
    background: #f3fbf6;
    border-color: #5ab88a;
    transform: scale(1.02);
}

/* Filled State */
.ielts-drop-zone.filled {
    border-style: solid;
    border-color: #7ccfaf;
    background: #f7fcf8;
    color: #2f8f64;
    font-weight: 700;
    cursor: pointer;
}

.ielts-drop-zone.filled:hover {
    background: #fdf3f2;
    border-color: #e8a29b;
    color: #b85b52;
}
.ielts-drop-zone.filled:hover::after {
    /* Tooltip overlay — must NOT affect layout. Hover-injected inline content
       at a line-wrap boundary causes a hover/no-hover oscillation ("vibration"). */
    content: "Remove";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    opacity: 1;
}

/* Grading States */
.ielts-drop-zone.correct {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.ielts-drop-zone.incorrect {
    background-color: #dc3545 !important; /* Red */
    color: white !important;
    border-color: #dc3545 !important;
}

/* --- DRAG & DROP REVIEW MODE LOCKS --- */

/* Disable cursor and interactions in Review Mode */
.review-mode .ielts-drag-item {
    cursor: default !important;
    pointer-events: none;
    opacity: 0.6;
}

.review-mode .ielts-drop-zone {
    cursor: default !important;
    pointer-events: none;
}

/* Remove the "Remove" hover effect during review */
.review-mode .ielts-drop-zone.filled:hover {
    background: #f0fdf4 !important; /* Keep original green tint */
    border-color: #10b981 !important;
    color: #059669 !important;
}

.review-mode .ielts-drop-zone.filled:hover::after {
    content: "" !important; /* Hide the "(Remove)" text */
}

/* Ensure graded states take priority */
.review-mode .ielts-drop-zone.correct {
    background-color: #10b981 !important;
    border-style: solid !important;
}

.review-mode .ielts-drop-zone.incorrect {
    background-color: #dc3545 !important;
    border-style: solid !important;
}

/* --- IELTS PRO LISTENING MODULE TYPOGRAPHY FIX --- */

/* 1. FORCE BOLDNESS
   Ensures text marked as bold in the editor is truly bold on the live site. 
*/
.ielts-final-wrapper.listening-mode b, 
.ielts-final-wrapper.listening-mode strong {
    font-weight: 700 !important;
    display: inline;
}

/* 2. HEADING (H4, H5, H6) REFINEMENT
   Specifically targets these sizes to prevent the theme from flattening them.
*/
.ielts-final-wrapper.listening-mode .ielts-question-content h4 { 
    font-size: 1.3em !important; 
    font-weight: 700 !important; 
    margin-bottom: 0.8em !important; 
    display: block !important; 
    line-height: 1.4 !important;
}

.ielts-final-wrapper.listening-mode .ielts-question-content h5 { 
    font-size: 1.1em !important; 
    font-weight: 700 !important; 
    margin-bottom: 0.8em !important; 
    display: block !important; 
}

.ielts-final-wrapper.listening-mode .ielts-question-content h6 { 
    font-size: 1.0em !important; 
    font-weight: 700 !important; 
    margin-bottom: 0.8em !important; 
    display: block !important; 
}

/* 3. PARAGRAPH SPACING
   Maintains clean layout around bold text and headers.
*/
.ielts-final-wrapper.listening-mode .ielts-question-content p {
    margin-bottom: 1.2em !important;
    line-height: 1.7 !important;
    display: block !important;
}

@media (max-width: 1024px) {
    .ielts-prestart-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 100%;
        padding: 16px 16px 20px;
    }

    body.ielts-standalone-mode .ielts-prestart-layout,
    body.ielts-standalone-preview .ielts-prestart-layout {
        min-height: 0;
        align-content: start;
    }

    .ielts-prestart-right {
        max-width: 100%;
        justify-self: stretch;
    }

    .ielts-candidate-card {
        position: static;
        top: auto;
        max-width: 100%;
    }

    .ielts-top-bar {
        height: auto;
        min-height: 48px;
        padding: 8px 12px;
        gap: 12px;
        flex-wrap: wrap;
    }

    @media (max-width: 768px) {
        .ielts-top-bar {
            height: 40px !important;
            min-height: 40px !important;
            padding: 0 8px !important;
            gap: 4px !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
        }
        .ielts-top-bar-right {
            flex-wrap: nowrap !important;
            gap: 4px !important;
        }
    }

    .ielts-top-bar-left,
    .ielts-top-bar-mid,
    .ielts-top-bar-right {
        min-width: 0;
    }

    .ielts-top-bar-title {
        font-size: 16px;
    }

    .ielts-timer-display {
        font-size: 15px;
        padding: 3px 12px;
    }

    .ielts-top-bar-right {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .ielts-header-controls {
        gap: 8px;
        padding: 0 12px;
    }

    .ielts-pagination-footer {
        height: 64px;
        padding: 0 12px;
    }

    .parts-grid {
        height: 48px;
        gap: 6px;
    }

    .review-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .ielts-prestart-layout {
        gap: 18px;
        padding: 10px 0 14px;
    }

    .ielts-prestart-layout--mock .ielts-prestart-left {
        padding: 24px 18px 26px;
    }

    .ielts-candidate-card {
        padding: 20px 18px;
    }

    .ielts-pagination-footer {
        height: 50px;
        padding: 0 10px;
    }

    .parts-grid {
        height: 44px;
        gap: 5px;
    }

    .nav-controls {
        right: 12px;
        bottom: 76px;
        gap: 10px;
    }

    .nav-btn {
        width: 46px;
        height: 46px;
    }

    .nav-btn svg {
        width: 26px;
        height: 26px;
    }

    .ielts-notes-sidebar {
        width: 86vw;
        right: -86vw;
        max-width: 320px;
    }

    .ielts-final-wrapper .ielts-final-dragger {
        display: flex !important;
        width: 100% !important;
        height: 20px !important;
        flex-basis: 20px !important;
        cursor: row-resize !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }

    .ielts-final-wrapper .ielts-final-dragger::before {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .ielts-prestart-layout {
        gap: 14px;
        padding: 8px 0 12px;
    }

    .ielts-prestart-layout--mock .ielts-prestart-left {
        padding: 20px 12px 22px;

        .ielts-top-bar {
            height: 38px !important;
            min-height: 38px !important;
            padding: 0 6px !important;
            gap: 3px !important;
            flex-wrap: nowrap !important;
        }

        .ielts-top-bar-title {
            font-size: 12px;
            max-width: 120px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ielts-timer-display {
            font-size: 12px;
            padding: 2px 8px;
        }

        .ielts-top-bar-right,
        .ielts-header-controls {
            gap: 4px;
        }

        .ielts-header-controls {
            padding: 0 6px;
        }

        .ielts-pagination-footer {
            height: 46px;
            padding: 0 4px;
        }

        .parts-grid {
            height: 40px;
            gap: 2px;
        }

        .review-grid-container {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            padding: 8px;
        }

        .ielts-notes-sidebar {
            width: 100vw;
            right: -100vw;
            max-width: none;
        }
    }

    .ielts-candidate-card {
        padding: 16px 12px;
    }

    .ielts-pagination-footer {
        padding: 0 6px;
    }

    .parts-grid {
        gap: 3px;
    }

    .nav-controls {
        right: 8px;
        bottom: 70px;
    }
}

/* Reading parity for active listening test page */
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar {
    height: 48px;
    background: #ffffff;
    padding: 0 14px;
    border-bottom: 1px solid #dbe4ef;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar-mid {
    min-width: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-timer-display {
    background: #f8fafc;
    color: #334155;
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid #dbe4ef;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-notes-toggle-btn,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-review-button,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .icon-btn-toggle {
    min-height: 38px;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    padding: 0 12px;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-notes-toggle-btn:hover,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-review-button:hover,
.ielts-final-wrapper.listening-mode.test-started.focus-mode .icon-btn-toggle:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-ai-trigger-btn {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}
.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-ai-trigger-btn:hover {
    background: #218838;
    border-color: #218838;
    color: #fff;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .volume-popup {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-pagination-footer {
    height: 62px;
    background: #ffffff;
    border-top: 1px solid #ececec;
    box-shadow: none;
    padding: 0 10px;
    gap: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .parts-grid {
    gap: 0;
    height: 100%;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box {
    flex: 1;
    border-radius: 0;
    border: 0;
    border-right: 1px solid #efefef;
    background: transparent;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box:last-child {
    border-right: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box:hover {
    background-color: #fafafa;
    border-color: #efefef;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .part-box.active {
    flex: 2.15;
    border-color: transparent;
    box-shadow: none;
    justify-content: flex-start;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .box-summary-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    padding: 0 14px;
    text-align: center;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .active-label {
    padding: 0 16px 0 14px;
    font-weight: 400;
    font-size: 18px;
    color: #444;
    border-right: 0;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .question-scroll-track {
    padding: 0 4px 0 0;
    gap: 10px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-controls {
    position: fixed;
    bottom: 72px;
    right: 18px;
    gap: 10px;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn {
    width: 54px;
    height: 46px;
    border-radius: 4px;
    background-color: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(17, 24, 39, 0.92);
    color: #ffffff;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn:hover {
    background-color: #000000;
    border-color: #000000;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn:active {
    transform: translateY(0) scale(0.95);
    background-color: #1f2937;
}

.ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 3px;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast,
.ielts-final-wrapper.listening-mode.ielts-high-contrast.focus-mode,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-main-interface-container,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-content-wrapper,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-container,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-pagination-footer {
    background: #101010 !important;
    color: #f5f5f5 !important;
    border-color: #4b5563 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-listening-part-intro {
    background: #161616 !important;
    border-color: #5b6470 !important;
}
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-listening-part-intro-title,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-listening-part-intro-text {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-top-bar,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-timer-display,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .options-popup,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-dialog,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-panel,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-content,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-header,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-subheader,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-list,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-notes-sidebar,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .notes-sidebar-header,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .notes-search-box,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .part-box,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .box-summary-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .summary-part-label,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .summary-part-progress,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .active-label,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .volume-popup {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-top-bar-title,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-timer-display,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-back-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-subtitle,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-notes-toggle-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-review-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .icon-btn-toggle,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .notes-sidebar-header h3,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .note-item-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .note-item-context,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .no-notes-message,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content p,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content li,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content td,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content th,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content strong,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content h1,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content h2,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content h3,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content h4,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content h3,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content h4,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content h6 {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .processed-questions-container,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content .ielts-part-section,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content div[style*="background: #f9f9f9"],
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content div[style*="background:#f9f9f9"],
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content div[style*="border: 1px solid #ddd"],
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content div[style*="border:1px solid #ddd"] {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content table,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content table th,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-question-content table td,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content table,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content table th,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content table td {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-notes-search {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .notes-search-box svg {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-notes-toggle-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-review-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .icon-btn-toggle,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-text-size-preset,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .part-box.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .part-box:hover {
    background: #1d1d1d !important;
    border-color: #737b87 !important;
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup.ielts-subpanel-active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .options-popup,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-dialog,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-panel,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-content,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-header,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-subheader,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-list {
    background: #000000 !important;
    color: #f5f5f5 !important;
    border-color: #353535 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-hero-button {
    background: #2bd4c3 !important;
    border: 1px solid #2bd4c3 !important;
    color: #000000 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-hero-icon,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-icon {
    background: transparent !important;
    color: inherit !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-item,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup.ielts-subpanel-active .ielts-text-size-preset {
    background: #000000 !important;
    color: #f5f5f5 !important;
    border-color: #353535 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-button:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-item:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup.ielts-subpanel-active .ielts-text-size-preset:hover {
    background: #0f0f0f !important;
    border-color: #4b4b4b !important;
    box-shadow: none !important;
    transform: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-item.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .font-popup.ielts-subpanel-active .ielts-text-size-preset.active {
    background: #000000 !important;
    color: #f5f5f5 !important;
    border-color: #353535 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-close-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-sub-close-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-chevron,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-back-icon,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-title,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-back-btn,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-subheader-title,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-check,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-preset-label,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-label {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-contrast-preview {
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-contrast-preview-bow {
    background: #ffffff !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-contrast-preview-bow span {
    background: #1a1a1a !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-contrast-preview-wob {
    background: #111111 !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-contrast-preview-wob span {
    background: #ffffff !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-button.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-text-size-preset.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn.current,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .question-anchor-number,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn.highlight,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-top-bar .active {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: inset 0 0 0 1px #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn {
    color: #f5f5f5 !important;
    background: transparent !important;
    border-color: transparent !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn:focus-visible {
    color: #f5f5f5 !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: #f5f5f5 !important;
    box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.35) !important;
    transform: translateY(-1px);
    outline: none;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn::before {
    background: #6b7280;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn.answered {
    color: #f5f5f5 !important;
    background: rgba(34, 197, 94, 0.18) !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35) !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .palette-btn.answered::before {
    background: #22c55e;
}

@media (max-width: 768px) {
    .ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-pagination-footer {
        height: 50px;
        padding: 0 6px;
    }

    .ielts-final-wrapper.listening-mode.test-started.focus-mode .nav-controls {
        bottom: 40px;
        right: 2px;
    }
}

/* Reading parity: listening question input styling */
.ielts-final-wrapper.listening-mode .question-anchor-number {
    display: inline;
    width: auto;
    height: auto;
    background: transparent;
    color: #111827;
    border-radius: 0;
    font-weight: 700;
    font-size: 16px;
    margin-right: 8px;
    vertical-align: baseline;
    line-height: inherit;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode .ielts-gap-fill {
    display: inline-block;
    width: auto;
    min-width: 64px;
    height: 30px;
    padding: 3px 10px;
    border: 2px solid #10b981;
    border-radius: 5px;
    background: #f0fdf4;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 5px 6px;
    vertical-align: middle;
    line-height: 1.2;
    box-sizing: border-box;
    transition: border-color 180ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 180ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ielts-final-wrapper.listening-mode .ielts-gap-fill:focus {
    outline: none;
    border-color: #059669;
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.ielts-final-wrapper.listening-mode span.choice-group,
.ielts-final-wrapper.listening-mode span.choice-group-multi {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.ielts-final-wrapper.listening-mode span.choice-group-tfng {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 0 34px;
    align-items: flex-start;
    width: fit-content;
    max-width: calc(100% - 34px);
}

.ielts-final-wrapper.listening-mode .choice-label-tfng {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: inherit;
    color: #111827;
    margin: 0;
}

.ielts-final-wrapper.listening-mode .choice-input-tfng {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    background-color: #ffffff;
    background-image: none;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ielts-final-wrapper.listening-mode .choice-input-tfng:hover {
    border-color: #10b981;
}

.ielts-final-wrapper.listening-mode .choice-input-tfng:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.ielts-final-wrapper.listening-mode .choice-input-tfng:checked {
    border-color: #10b981;
    background-color: #ffffff;
    background-image: radial-gradient(circle, #10b981 0 42%, transparent 46%);
}

.ielts-final-wrapper.listening-mode .choice-label-tfng span {
    display: inline-block;
    font-weight: 500;
    font-size: inherit;
    color: #111827;
    line-height: 1.2;
    padding: 8px 14px;
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    box-shadow: none;
}

.ielts-final-wrapper.listening-mode .choice-label-tfng:hover span {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #111827;
}

.ielts-final-wrapper.listening-mode .choice-input-tfng:checked + span {
    border-color: #10b981;
    background: #f0fdf4;
    color: #111827;
    font-weight: 500;
    box-shadow: none;
    transform: none;
}

.ielts-final-wrapper.listening-mode .ielts-select-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    min-width: 120px;
    margin: 0 5px;
}

.ielts-final-wrapper.listening-mode .ielts-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    min-height: 32px;
    min-width: 120px;
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.ielts-final-wrapper.listening-mode .ielts-select-trigger:hover {
    border-color: #059669;
    background-color: #ffffff;
}

.ielts-final-wrapper.listening-mode .ielts-select-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    width: 14px;
    height: 14px;
    color: #059669;
    stroke: #059669;
}

.ielts-final-wrapper.listening-mode .selected-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.ielts-final-wrapper.listening-mode .selected-text:empty::after {
    content: 'Select...';
    color: #6b7280;
    font-weight: 400;
}

.ielts-final-wrapper.listening-mode .ielts-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 4px;
    padding: 0;
}

.ielts-final-wrapper.listening-mode .ielts-select-wrapper.open .ielts-select-dropdown {
    display: block;
}

.ielts-final-wrapper.listening-mode .ielts-select-option {
    display: block;
    padding: 6px 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}

.ielts-final-wrapper.listening-mode .ielts-select-option:hover {
    background: #f0fdf4;
    color: #059669;
}

.ielts-final-wrapper.listening-mode .ielts-select-option.selected {
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
}

/* Reading parity: listening high-contrast answer/input styling */
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-gap-fill,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-trigger,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-list-option,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drop-zone,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drop-zone,
.ielts-final-wrapper.listening-mode.ielts-high-contrast button.choice-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .choice-label-tfng span,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-table,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-table th,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-table td,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drag-pool,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drag-item,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drag-item,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-bank,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-dropdown,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-options {
    background: #1a1a1a !important;
    color: #f5f5f5 !important;
    border-color: #8d99a8 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-table thead th,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-bank-title,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drag-item:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drag-item.selected-for-drop,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-option,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-option:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-option.selected {
    background: #242424 !important;
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-arrow,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .list-circle,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .choice-input-tfng {
    color: #f5f5f5 !important;
    background: #111111 !important;
    border-color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-option-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .list-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drop-text,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-prompt,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-options-item-state {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drop-placeholder,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-list-option.selected,
.ielts-final-wrapper.listening-mode.ielts-high-contrast button.choice-button.selected,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .choice-input-tfng:checked + span,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-trigger.correct,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-trigger.incorrect,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drop-zone.filled,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drop-zone.filled {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: inset 0 0 0 1px #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drag-item.selected-for-drop,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-heading-drop-zone.drag-over,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-drop-zone.drag-over,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-list-option:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast button.choice-button:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-select-trigger:hover {
    background: #262626 !important;
    border-color: #f5f5f5 !important;
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-dot {
    border-color: #f5f5f5 !important;
    background: #101010 !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-options-item-button,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-preset-item,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-text-size-preset,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-options-item-button.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-preset-item.active,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-text-size-preset.active {
    background: #000000 !important;
    color: #f5f5f5 !important;
    border-color: #353535 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-options-item-button:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-preset-item:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast #ielts-options-popup .ielts-text-size-preset:hover {
    background: #0f0f0f !important;
    color: #f5f5f5 !important;
    border-color: #4b4b4b !important;
    box-shadow: none !important;
    transform: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-matrix-input:checked + .ielts-matrix-dot {
    border-color: #f5f5f5 !important;
    background-color: #101010 !important;
    background-image: radial-gradient(circle, #f5f5f5 0 42%, transparent 46%) !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-answer-button {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-answer-button:hover,
.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-answer-button:focus-visible {
    background: #1f1f1f !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content::-webkit-scrollbar-track {
    background: #111827;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-final-panel-content::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.ielts-final-wrapper.listening-mode.ielts-high-contrast .ielts-content-wrapper {
    gap: 12px;
}

/* Mobile overflow containment for listening runtime content and navigation. */
@media (max-width: 768px) {
    .ielts-final-wrapper.listening-mode.test-started .ielts-pagination-footer {
        box-sizing: border-box !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        overflow: hidden !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .parts-grid,
    .ielts-final-wrapper.listening-mode.test-started .part-box,
    .ielts-final-wrapper.listening-mode.test-started .box-questions-area {
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .question-scroll-track {
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
    }

    .ielts-final-wrapper.listening-mode.test-started .palette-btn {
        flex: 0 0 28px !important;
        width: 28px !important;
        height: 28px !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-listening-part-intro {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-question-content,
    .ielts-final-wrapper.listening-mode.test-started .processed-questions-container {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-question-content table,
    .ielts-final-wrapper.listening-mode.test-started #ielts-audio-script-content table {
        max-width: 100%;
        table-layout: fixed;
        overflow-wrap: anywhere;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-question-content th,
    .ielts-final-wrapper.listening-mode.test-started .ielts-question-content td,
    .ielts-final-wrapper.listening-mode.test-started #ielts-audio-script-content th,
    .ielts-final-wrapper.listening-mode.test-started #ielts-audio-script-content td {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-gap-fill {
        max-width: min(100%, 8.5rem);
        margin-left: 3px;
        margin-right: 3px;
    }
}

/* Listening review split handle parity with Reading. */
.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger {
    flex-basis: 2px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    margin: 0 !important;
    overflow: visible !important;
    cursor: col-resize !important;
    background: #c9c9c9 !important;
    border: 0 !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, opacity 0.2s ease !important;
}

.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger:hover {
    opacity: 1 !important;
    background: #55b7ef !important;
}

.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger::before {
    content: '' !important;
    position: absolute !important;
    top: 14% !important;
    left: 50% !important;
    width: 7px !important;
    height: 72% !important;
    border-radius: 0 !important;
    background: rgba(191, 191, 191, 0.92) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: translateX(-50%) !important;
    z-index: -1 !important;
}

.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger::after {
    content: '\2194' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translate(-50%, -50%) !important;
    background: #ffffff !important;
    border: 1px solid #2f2f2f !important;
    border-radius: 1px !important;
    color: #111827 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    z-index: 1 !important;
}

.ielts-final-wrapper.listening-mode.review-mode #ielts-dragger:hover::after {
    transform: translate(-50%, -50%) scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14) !important;
}

@media (max-width: 768px) {
    .ielts-final-wrapper.listening-mode.test-started.review-mode #ielts-dragger {
        width: 100% !important;
        height: 2px !important;
        flex: 0 0 2px !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
        cursor: row-resize !important;
        touch-action: none;
    }

    .ielts-final-wrapper.listening-mode.test-started.review-mode #ielts-dragger::before {
        content: '\2195' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transform: translate(-50%, -50%) !important;
        background: #ffffff !important;
        border: 1px solid #2f2f2f !important;
        border-radius: 1px !important;
        color: #111827 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) !important;
        z-index: 1 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started.review-mode #ielts-dragger::after {
        content: '' !important;
        position: absolute !important;
        inset: -12px 0 !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        border: 0 !important;
        color: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        transform: none !important;
    }
}

/* Listening mobile header parity with Reading. */
@media (max-width: 768px) {
    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar,
    .ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-top-bar {
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 8px !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        align-items: center !important;
        background: #ffffff !important;
        border-bottom: 1px solid #e5e7eb !important;
        box-shadow: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-left {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-center {
        order: 0 !important;
        flex: 0 0 auto !important;
        margin-right: 0 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-timer-display,
    .ielts-final-wrapper.listening-mode.test-started.focus-mode .ielts-timer-display {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: #111827 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        gap: 4px !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-timer-display svg {
        width: 16px !important;
        height: 16px !important;
        margin-right: 4px !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-mid {
        display: flex !important;
        order: 0 !important;
        flex: 0 0 auto !important;
        gap: 4px !important;
        margin-left: 8px !important;
        min-width: 0 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-right {
        order: 0 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        margin-left: auto !important;
        min-width: 0 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-right > .volume-control-group,
    .ielts-final-wrapper.listening-mode.test-started .ielts-notes-toggle-btn {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-right > .options-control-group {
        order: 0 !important;
        display: flex !important;
        flex: 0 0 auto !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-right > .ielts-review-button {
        order: 1 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-top-bar-right > .ielts-final-answer-button {
        order: 2 !important;
    }

    .ielts-final-wrapper.listening-mode.test-started #font-toggle-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #0f172a !important;
        box-shadow: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started #font-toggle-btn .ielts-options-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .ielts-final-wrapper.listening-mode.test-started #font-toggle-btn .ielts-options-icon-menu {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started #font-toggle-btn .ielts-options-icon-moon {
        display: block !important;
    }

    .ielts-final-wrapper.listening-mode.test-started #font-toggle-btn .ielts-options-icon-sun {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started.ielts-high-contrast #font-toggle-btn .ielts-options-icon-moon {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started.ielts-high-contrast #font-toggle-btn .ielts-options-icon-sun {
        display: block !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-review-button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #0f172a !important;
        box-shadow: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-review-button .desktop-text {
        display: none !important;
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-review-button .mobile-icon {
        display: block !important;
        transform: scale(0.85);
    }

    .ielts-final-wrapper.listening-mode.test-started .ielts-final-answer-button {
        min-height: 44px !important;
        height: 44px !important;
        padding: 0 10px !important;
        margin-left: 0 !important;
        white-space: nowrap !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
    }

    .ielts-top-bar-brand {
        display: none !important;
    }
}
