/* Context Menu (Right Click/Select Menu) */
.ielts-context-menu {
    font-family: 'Inter', sans-serif;
    min-width: 150px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    overflow: hidden;
    z-index: var(--ielts-lms-z-popup, 10001) !important; /* Ensure on top of everything */
}

.ielts-context-menu .ielts-context-menu-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.ielts-context-menu .ielts-context-menu-item:hover {
    background-color: #f5f5f5;
}

.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;
}

/* Render editor-created tables with visible borders without requiring inline border attributes. */
.ielts-passage-content table,
.ielts-question-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 12px 0;
}

.ielts-question-content table {
    width: 100% !important;
    table-layout: fixed;
}

.ielts-passage-content table th,
.ielts-passage-content table td,
.ielts-question-content table th,
.ielts-question-content table td {
    border: 1px solid #ccc;
    padding: 6px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

/* =========================================
   2. WIDGET CORE LAYOUT (YOUR DESIGN)
   ========================================= */

/* --- 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; /* Match button height approx */
    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);
}
.ielts-header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;       /* mobile: column stack */
    gap: 10px;
}

/* Tablet (≥ 768px): restore row layout */
@media (min-width: 768px) {
    .ielts-timer-select {
        margin-right: 15px;
        margin-bottom: 0;
        width: auto;
    }
    .ielts-header-controls {
        flex-direction: row;
    }
}

/* --- 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;
}
.ielts-widget-header { text-align: center; margin-bottom: 20px; flex-shrink: 0; }
.ielts-widget-title { font-size: 28px; font-weight: 700; color: #1a202c; margin: 0; padding: 0 15px; margin-bottom: 15px; }
.ielts-start-button { background: linear-gradient(180deg,#27c184 0%,#1eb06f 100%); color: #fff; border: none; padding: 12px 30px; font-size: 18px; font-weight: 600; border-radius: 8px; cursor: pointer; min-height: var(--ielts-lms-touch-target, 44px); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform 180ms ease, box-shadow 180ms ease; 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-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-main-interface-container { display: none; flex-direction: column; padding-bottom: var(--footer-height); 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-results-nav { margin-top: 30px; display: flex; justify-content: center; gap: 15px; }

/* Mobile: single column; desktop (≥ 900px): 2-column side-by-side */
.ielts-prestart-layout {
    display: grid;
    grid-template-columns: 1fr;           /* mobile: single column */
    gap: 24px;
    align-items: start;
    max-width: 1368px;
    margin: 0 auto;
    padding: 20px 20px 24px;
}

/* Desktop (≥ 900px): 2-column layout */
@media (min-width: 900px) {
    .ielts-prestart-layout {
        grid-template-columns: minmax(0, 1.85fr) minmax(320px, 370px);
        gap: 56px;
    }
}

/* Center the prestart block vertically in standalone reading 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-right {
        max-width: 100%;
        justify-self: stretch;
    }

    .ielts-candidate-card {
        position: static;
    }
}

@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;
    }
}

/* FULL SCREEN MODE (DEFAULT) */
.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); 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: 62px;
    background: #ffffff;
    border-top: 1px solid #ececec;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    gap: 0;
    z-index: 1000;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.parts-grid {
    display: flex;
    flex-grow: 1;
    width: 100%;
    gap: 0;
    height: 100%;
    min-width: 0;
}
.part-box {
    /* Inactive part width — JS sets --inactive-part-flex from totalParts. */
    flex: var(--inactive-part-flex, 1);
    width: 0;
    min-width: 0;
    height: 100%;
    border-radius: 0;
    border: 0;
    border-right: 1px solid #d8e0e8;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: none;
    transition: flex 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s, border-color 0.25s;
}
.part-box:last-child { border-right: 0; }
.part-box:hover { background-color: #fafafa; }
.part-box.active {
    /* Active part width — JS sets --active-part-flex = (100/N + 5). */
    flex: var(--active-part-flex, 2.15);
    border-right-color: #d8e0e8;
    background: #f8fafc;
    box-shadow: none;
    justify-content: flex-start;
    cursor: default;
}
.box-summary-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 14px;
    width: 100%;
    text-align: center;
    opacity: 1;
    transition: opacity 0.2s;
}
.part-box.active .box-summary-text { display: none; opacity: 0; }
.summary-part-label {
    font-size: 18px;
    line-height: 1;
    color: #444;
}
.summary-part-progress {
    font-size: 16px;
    line-height: 1;
    color: #666;
}
.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 16px 0 14px;
    font-weight: 400;
    font-size: 18px;
    color: #444;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 0;
    height: 100%;
    display: flex;
    align-items: center;
}
.question-scroll-track {
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow-x: auto;
    height: 100%;
    padding: 0 4px 0 0;
    gap: 10px;
    -ms-overflow-style: none;
}
.question-scroll-track::-webkit-scrollbar { display: none; }
.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; }

/* --- PROFESSIONAL HEADER UPGRADE (READING) --- */
.ielts-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    background: #ffffff;
    padding: 0 14px;
    border-bottom: 1px solid #dbe4ef;
    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: #0f172a;
    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: 0;
}
.ielts-timer-display {
    background: #f8fafc;
    color: #334155;
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid #dbe4ef;
    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: 0 2px 6px rgba(15, 23, 42, 0.04);
    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;
}

@media (min-width: 769px) {
    .ielts-top-bar-right > .ielts-notes-toggle-btn { order: 0; }
    .ielts-top-bar-right > .ielts-review-button { order: 1; }
    .ielts-top-bar-right > .ielts-final-answer-button { order: 2; }
    .ielts-top-bar-right > .options-control-group { order: 3; }
}

/* --- TOOL BUTTONS (Ghost Style) --- */
.ielts-notes-toggle-btn,
.ielts-review-button,
.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;
    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: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.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;
}

.ielts-ai-trigger-btn {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.ielts-ai-trigger-btn:hover {
    background: #218838;
    border-color: #218838;
    color: #fff;
}

/* Font Control */
.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 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.ielts-options-hero-icon svg {
    width: 22px;
    height: 22px;
}
.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: 68px;
    border-radius: 14px;
}
.ielts-options-item-button {
    border: 1px solid #d1d7e0;
    background: #ffffff;
    color: #111827;
    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 120ms ease;
}
.ielts-options-item-button:hover {
    background: #f8fafc;
    border-color: #c1cad8;
    color: #0f172a;
}
.ielts-options-item-button.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.ielts-options-item-copy,
.ielts-options-item-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.ielts-options-item-copy {
    min-width: 0;
}
.ielts-options-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #b8bec8;
    flex-shrink: 0;
}
.ielts-options-item-icon svg {
    width: 22px;
    height: 22px;
}
.ielts-options-item-label {
    white-space: nowrap;
}
.ielts-options-item-state {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ielts-options-item-chevron {
    color: currentColor;
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.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: 28px;
    font-weight: 700;
    padding: 0 2px 6px;
}
.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: 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: 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 #e2e8f0;
    background: #ffffff;
    color: #334155;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    padding: 16px 18px;
    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-final-wrapper.ielts-high-contrast.focus-mode,
.ielts-final-wrapper.ielts-high-contrast .ielts-main-interface-container,
.ielts-final-wrapper.ielts-high-contrast .ielts-content-wrapper,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-container,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content,
.ielts-final-wrapper.ielts-high-contrast .ielts-pagination-footer {
    background: #101010 !important;
    color: #f5f5f5 !important;
    border-color: #4b5563 !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-content-wrapper {
    gap: 12px;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-reading-part-intro,
.ielts-final-wrapper.ielts-high-contrast .ielts-top-bar,
.ielts-final-wrapper.ielts-high-contrast .ielts-timer-display,
.ielts-final-wrapper.ielts-high-contrast .font-popup,
.ielts-final-wrapper.ielts-high-contrast .options-popup,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-panel,
.ielts-final-wrapper.ielts-high-contrast .ielts-notes-sidebar,
.ielts-final-wrapper.ielts-high-contrast .notes-sidebar-header,
.ielts-final-wrapper.ielts-high-contrast .notes-search-box,
.ielts-final-wrapper.ielts-high-contrast .part-box,
.ielts-final-wrapper.ielts-high-contrast .box-summary-text,
.ielts-final-wrapper.ielts-high-contrast .active-label {
    background: #161616 !important;
    color: #f5f5f5 !important;
    border-color: #5b6470 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-reading-part-intro-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-reading-part-intro-text,
.ielts-final-wrapper.ielts-high-contrast .summary-part-label,
.ielts-final-wrapper.ielts-high-contrast .summary-part-progress,
.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,
.ielts-final-wrapper.ielts-high-contrast .notes-sidebar-header h3,
.ielts-final-wrapper.ielts-high-contrast .note-item-text,
.ielts-final-wrapper.ielts-high-contrast .note-item-context,
.ielts-final-wrapper.ielts-high-contrast .no-notes-message,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content p,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content li,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content td,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content th,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content strong,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content h1,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content h2,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content h3,
.ielts-final-wrapper.ielts-high-contrast .ielts-final-panel-content h4,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h3,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h4,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h6,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content p,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h3 {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.ielts-high-contrast .processed-questions-container,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content .ielts-part-section,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content div[style*="background: #f9f9f9"],
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content div[style*="background:#f9f9f9"],
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content div[style*="border: 1px solid #ddd"],
.ielts-final-wrapper.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.ielts-high-contrast .ielts-question-content .ielts-part-section h3,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content .ielts-part-section h4,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content .ielts-part-section h6 {
    color: #f5f5f5 !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 .notes-search-box svg,
.ielts-final-wrapper.ielts-high-contrast .icon-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-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,
.ielts-final-wrapper.ielts-high-contrast .part-box.active,
.ielts-final-wrapper.ielts-high-contrast .part-box:hover {
    background: #1d1d1d !important;
    border-color: #737b87 !important;
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.ielts-high-contrast .font-popup,
.ielts-final-wrapper.ielts-high-contrast .font-popup.ielts-subpanel-active,
.ielts-final-wrapper.ielts-high-contrast .options-popup,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-dialog,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-panel,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-content,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-header,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-subheader,
.ielts-final-wrapper.ielts-high-contrast .ielts-preset-list {
    background: #000000 !important;
    color: #f5f5f5 !important;
    border-color: #353535 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.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.ielts-high-contrast .ielts-options-hero-icon,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-icon {
    background: transparent !important;
    color: inherit !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-button,
.ielts-final-wrapper.ielts-high-contrast .ielts-preset-item,
.ielts-final-wrapper.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.ielts-high-contrast .ielts-options-item-button:hover,
.ielts-final-wrapper.ielts-high-contrast .ielts-preset-item:hover,
.ielts-final-wrapper.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.ielts-high-contrast .ielts-preset-item.active,
.ielts-final-wrapper.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.ielts-high-contrast .ielts-options-close-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-sub-close-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-chevron,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-back-icon,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-back-btn,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-subheader-title,
.ielts-final-wrapper.ielts-high-contrast .ielts-preset-check,
.ielts-final-wrapper.ielts-high-contrast .ielts-preset-label,
.ielts-final-wrapper.ielts-high-contrast .ielts-options-item-label {
    color: #f5f5f5 !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-contrast-preview {
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-contrast-preview-bow {
    background: #ffffff !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-contrast-preview-bow span {
    background: #1a1a1a !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-contrast-preview-wob {
    background: #111111 !important;
    border-color: #5b6470 !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-contrast-preview-wob span {
    background: #ffffff !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 {
    color: #f5f5f5 !important;
    background: transparent !important;
    border-color: transparent !important;
}

.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 .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 .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 .ielts-heading-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-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-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-passage-content table,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content table th,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content 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,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-dropdown,
.ielts-final-wrapper.ielts-high-contrast .ielts-select-options {
    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-select-arrow,
.ielts-final-wrapper.ielts-high-contrast .ielts-heading-option-key,
.ielts-final-wrapper.ielts-high-contrast .list-circle {
    color: #f5f5f5 !important;
    background: #111111 !important;
    border-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-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-final-answer-button {
    background: #111111 !important;
    color: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    box-shadow: none !important;
}

.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-options-item-button,
.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-preset-item,
.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-text-size-preset,
.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-options-item-button.active,
.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-preset-item.active,
.ielts-final-wrapper.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.ielts-high-contrast #ielts-options-popup .ielts-options-item-button:hover,
.ielts-final-wrapper.ielts-high-contrast #ielts-options-popup .ielts-preset-item:hover,
.ielts-final-wrapper.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.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;
}

/* --- SUBMIT BUTTON (Primary Action) --- */
.ielts-final-answer-button {
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
    padding: 0 22px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: var(--ielts-lms-font-sans, "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: 12px;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 12px 24px 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: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;
}

.ielts-review-button .mobile-icon { display: none; }
.ielts-review-button .desktop-text { display: inline; }
.ielts-review-button .desktop-icon { display: block; }


/* --- NAVIGATION ARROWS (REDESIGNED: SMARTBOOK STYLE - White & Green) --- */
.nav-controls {
    position: fixed;
    bottom: 72px;
    right: 18px;
    z-index: 1001;
    display: flex;
    gap: 10px;
}
.ielts-final-wrapper:not(.test-started) .nav-controls { display: none !important; }

.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);
    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: #ffffff;
    box-shadow: none;
}

.nav-btn:hover { 
    background-color: #000000;
    transform: translateY(-1px);
    box-shadow: none;
    color: #ffffff;
    border-color: #000000;
}

.nav-btn:active {
    transform: translateY(0) scale(0.95);
    background-color: #1f2937;
}

.nav-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 3px;
}


/* TAB VISIBILITY ANIMATION */
.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); } }
.ielts-part-marker {
    background: #f3f4f6;
    color: #374151;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 6px;
    margin: 20px 0 15px 0;
    display: inline-block;
    font-size: 1.1em;
    border-left: 4px solid #10b981;
}

/* QUESTION NUMBERS & INPUTS */
.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-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;
    -webkit-user-select: text;
    user-select: text;
    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-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.reading-mode .ielts-passage-content,
.ielts-final-wrapper.reading-mode .ielts-question-content {
    -webkit-user-select: text;
    user-select: text;
}

/* CHOICE BUTTONS */
span.choice-group, span.choice-group-multi {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
}
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);
}
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);
}
button.choice-button.long-text { width: auto; padding: 0 16px; border-radius: 20px; }

/* TFNG */
.choice-label-tfng {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: inherit;
    color: #111827;
    margin: 0;
}
.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;
}
.choice-input-tfng:hover {
    border-color: #10b981;
}
.choice-input-tfng:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}
.choice-input-tfng:checked {
    border-color: #10b981;
    background-color: #ffffff;
    background-image: radial-gradient(circle, #10b981 0 42%, transparent 46%);
}
.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;
}
.choice-label-tfng:hover span {
    border-color: #d1d5db;
    background: #f9fafb;
}
.choice-input-tfng:checked + span {
    border-color: #10b981;
    background: #f0fdf4;
    color: #111827;
    font-weight: 500;
}

/* SELECT DROPDOWNS */
.ielts-select-wrapper { position: relative; display: inline-block; vertical-align: middle; min-width: 120px; margin: 0 5px; }
.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-select-trigger:hover { border-color: #059669; background-color: #ffffff; }
.ielts-select-arrow { flex-shrink: 0; margin-left: 8px; width: 14px; height: 14px; color: #059669; stroke: #059669; }
.selected-text:empty::after { content: 'Select...'; color: #6b7280; font-weight: 400; }
.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-select-wrapper.open .ielts-select-dropdown { display: block; }
.ielts-select-option {
    display: block; padding: 6px 12px; font-size: 14px; color: #374151;
    cursor: pointer; transition: background 0.1s; white-space: nowrap;
}
.ielts-select-option:hover { background: #f0fdf4; color: #059669; }
.ielts-select-option.selected { background: #ecfdf5; color: #059669; font-weight: 600; }

/* MATRIX MATCHING 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%);
}

/* LIST ITEMS (FIXED: width: fit-content) */
.ielts-list-group { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-top: 10px; 
    align-items: flex-start; /* FIX: Prevents stretching */
    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), transform 180ms cubic-bezier(0.4, 0, 0.2, 1); 
    background: #fff;
    width: fit-content; /* FIX: Snaps to content width */
    max-width: 100%; 
    box-sizing: border-box;
}

.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; }

/* REVIEW MODE */
.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; }
.review-mode .ielts-heading-drop-zone { pointer-events: none; }
.review-mode .ielts-reading-part-intro { display: 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; }
.ielts-heading-drop-zone.correct { background-color: #10b981 !important; color: white !important; border-color: #10b981 !important; }
.ielts-heading-drop-zone.incorrect { background-color: #dc3545 !important; color: white !important; border-color: #dc3545 !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; }

/* NOTES SIDEBAR & ITEMS (UPDATED) */
.ielts-content-wrapper { display: flex; position: relative; flex-grow: 1; overflow: hidden; height: 100%; min-height: 0; background: #ffffff; flex-direction: column; gap: 10px; padding: 14px 18px 18px; box-sizing: border-box; }
.ielts-reading-part-intro { display: flex; 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-reading-part-intro.intro-collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; margin: 0; border-width: 0; }
.ielts-reading-part-intro-title { font-size: 16px; font-weight: 700; line-height: 1.15; color: #111827; }
.ielts-reading-part-intro-text { margin: 0; font-size: 16px; line-height: 1.5; color: #111827; font-style: normal; }
@media (max-width: 1024px) {
    .ielts-final-wrapper.reading-mode .ielts-reading-part-intro {
        display: none !important;
    }
}
.ielts-final-container { transition: width 0.3s ease; width: 100%; height: auto; flex: 1 1 auto; display: flex; flex-direction: row; min-height: 0; background: #ffffff; align-items: stretch; } 
.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; }

/* -- NEW NOTE ITEM STYLES -- */
.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; }
.no-notes-message { padding: 20px; text-align: center; color: #94a3b8; font-size: 14px; font-style: italic; }

/* Note Action Buttons */
.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; }


/* PANEL SPLIT LOGIC (READING) */
.ielts-final-wrapper .ielts-final-panel { min-width: 150px; display: flex; flex-direction: column; background: #ffffff; min-height: 0; border: 0; }
.ielts-final-wrapper #ielts-left-panel { width: 51.2%; flex-shrink: 0; min-width: 100px; }
.ielts-final-wrapper #ielts-right-panel { flex-grow: 1; }
.ielts-final-wrapper .ielts-final-panel-header { display: none; }
.ielts-final-wrapper .ielts-final-panel-content { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 0 18px 18px 18px; overflow-y: auto; flex-grow: 1; min-height: 0; line-height: 1.68; 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-left-panel .ielts-final-panel-content { padding: 0 48px 18px 0; }
.ielts-final-wrapper #ielts-right-panel .ielts-final-panel-content { padding: 0 0 18px 24px; }
.ielts-final-wrapper .ielts-passage-content,
.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; width: 100%; max-width: 100%; overflow-x: hidden; } /* GAP REMOVED */

/* Custom Scroll for Panels */
.ielts-final-wrapper .ielts-passage-content p { max-width: none; margin: 0 0 0.95em; font-size: 15px; line-height: 1.72; color: #222; font-weight: 400; }
.ielts-final-wrapper .ielts-passage-content h3 { font-size: 17px; margin: 0 0 12px; font-weight: 700; text-align: left; }
.ielts-final-wrapper .ielts-question-content h3,
.ielts-final-wrapper .ielts-question-content h4,
.ielts-final-wrapper .ielts-question-content h6 { color: #111827; margin: 0 0 12px; }
.ielts-final-wrapper .ielts-question-content h4 { font-size: 18px; }
.ielts-final-wrapper .ielts-question-content > div {
    max-width: 100%;
    box-sizing: border-box;
}
.ielts-final-wrapper .ielts-question-content .ielts-part-section {
    width: 100%;
    max-width: 100%;
}
.ielts-final-wrapper .ielts-question-content p,
.ielts-final-wrapper .ielts-question-content li { font-size: 15px; line-height: 1.6; color: #202124; overflow-wrap: anywhere; }
.ielts-final-wrapper .ielts-question-content table { margin-top: 16px; }
.ielts-final-wrapper .ielts-question-content table th,
.ielts-final-wrapper .ielts-question-content table td {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
}
.ielts-final-wrapper .ielts-question-content table p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
}
.ielts-final-wrapper .ielts-question-content table p:last-child {
    margin-bottom: 0;
}
.ielts-final-wrapper .ielts-question-content em,
.ielts-final-wrapper .ielts-question-content i { font-style: italic; }

.ielts-final-wrapper .ielts-question-content .ielts-matrix-table {
    table-layout: auto;
    width: 100% !important;
}

.ielts-final-wrapper .ielts-question-content .ielts-matrix-table thead th:first-child,
.ielts-final-wrapper .ielts-question-content .ielts-matrix-prompt {
    width: auto;
    min-width: 0;
    text-align: left;
}

.ielts-final-wrapper .ielts-question-content .ielts-matrix-table thead th:first-child {
    padding-left: 16px;
}

.ielts-final-wrapper .ielts-question-content .ielts-matrix-prompt {
    padding-left: 16px;
    white-space: normal;
}

.ielts-final-wrapper .ielts-question-content .ielts-matrix-table thead th:not(:first-child),
.ielts-final-wrapper .ielts-question-content .ielts-matrix-cell {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    text-align: center;
}
.ielts-final-wrapper .ielts-question-content strong { font-weight: 700; }

.ielts-final-wrapper .ielts-final-panel-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.ielts-final-wrapper .ielts-final-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.ielts-final-wrapper .ielts-final-panel-content::-webkit-scrollbar-thumb {
    background: #8f8f8f;
    border-radius: 2px;
    border: 2px solid #ffffff;
    background-clip: padding-box;
}

.ielts-final-wrapper .ielts-final-panel-content::-webkit-scrollbar-thumb:hover {
    background: #767676;
}

/* DRAGGER */
.ielts-final-wrapper .ielts-final-dragger { flex-basis: 2px; flex-shrink: 0; background: #c9c9c9; cursor: col-resize; border: 0; transition: background-color .2s ease, opacity .2s ease; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: none; margin: 0; overflow: visible; }
.ielts-final-wrapper .ielts-final-dragger:hover { opacity: 1; background: #55b7ef; }
.ielts-final-wrapper .ielts-final-dragger::before { content: ''; position: absolute; top: 14%; height: 72%; width: 7px; left: 50%; transform: translateX(-50%); background: rgba(191, 191, 191, 0.92); z-index: -1; }
.ielts-final-wrapper .ielts-final-dragger::after { content: '\2194'; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; border-radius: 1px; background: #ffffff; border: 1px solid #2f2f2f; color: #111827; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55); }
.ielts-final-wrapper .ielts-final-dragger:hover::after { transform: translate(-50%, -50%) scale(1.02); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); }

/* COMMON MODAL & TOOLTIPS */
#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 UI */
.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-report-explain-btn {
    display: none;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.explanations-on .ielts-report-explain-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ielts-report-explain-btn:hover {
    background: #dbeafe;
}

.ielts-report-explain-na {
    color: #94a3b8;
    font-weight: 600;
    font-size: 12px;
}

.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;
}

.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.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.ielts-high-contrast .highlighted-text * {
    color: inherit !important;
}

.ielts-final-wrapper.ielts-high-contrast.explanations-on .ielts-expl-anchor,
.ielts-final-wrapper.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.ielts-high-contrast.explanations-on .ielts-expl-badge,
.ielts-final-wrapper.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.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.ielts-high-contrast .note-attached * {
    color: inherit !important;
}

.ielts-final-wrapper.ielts-high-contrast.annotations-hidden .highlighted-text,
.ielts-final-wrapper.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.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.ielts-high-contrast .ielts-evidence-hit * {
    color: inherit !important;
}

.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);
}

.ielts-inline-explain-btn.active {
    background: #fff7ed;
    border-color: #f59e0b;
}

.ielts-inline-bulb-glyph {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-0.5px);
}

.explanations-on .ielts-inline-bulb-glyph {
    animation: ieltsBulbBounce 1.2s ease-in-out infinite;
}

@keyframes ieltsBulbBounce {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

.ielts-explanation-rich-content {
    color: #334155;
    line-height: 1.65;
    font-size: 14px;
}

.ielts-explanation-rich-content p,
.ielts-explanation-rich-content ul,
.ielts-explanation-rich-content ol,
.ielts-explanation-rich-content table,
.ielts-explanation-rich-content blockquote,
.ielts-explanation-rich-content figure {
    margin: 0 0 12px;
}

.ielts-explanation-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ielts-explanation-rich-content table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #cbd5e1;
}

.ielts-explanation-rich-content th,
.ielts-explanation-rich-content td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    vertical-align: top;
}

.ielts-explanation-rich-content a {
    color: #1d4ed8;
    text-decoration: underline;
}

.ielts-explanation-rich-content iframe,
.ielts-explanation-rich-content video {
    max-width: 100%;
    width: 100%;
    min-height: 260px;
    border: 0;
    border-radius: 8px;
}

/* Vocabulary Mode */
.vocab-on .ielts-vocab-word {
    cursor: pointer;
    color: inherit !important;
    font: inherit;
    text-decoration: none;
    background: transparent;
    border-radius: 0;
    transition: text-decoration-color .12s ease, 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-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);
}

@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;
    }
}

#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;
}

/* --- Standardized Instruction Styles (Writing Base) --- */
.ielts-instruction-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 30px 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;
}

.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;
}


/* MOBILE SPECIFIC OVERRIDES */
@media (max-width: 768px) {
  .ielts-top-bar {
      height: 40px;
      padding: 0 8px;
      margin-bottom: 0;
      flex-wrap: nowrap;
      overflow: hidden;
  }
  /* Reduce panel side-padding on mobile to maximise reading width */
  .ielts-final-wrapper { --panel-padding: 10px; }
  
  /* 1. Timer moves left/center-left */
  .ielts-top-bar-center {
      order: 1;
      margin-right: auto;
      flex-shrink: 0; /* Stop timer from shrinking */
  }
  
  .ielts-timer-display {
      background: transparent;
      border: none;
      box-shadow: none;
      padding: 0;
      font-size: 14px; /* Reduced from 16px to fit better */
      font-weight: 600; /* Slightly lighter weight */
  }
  
  /* Reduce Timer Icon Size */
  .ielts-timer-display svg {
      width: 16px;
      height: 16px;
      margin-right: 4px; /* Tighter spacing */
  }
  
  .ielts-top-bar-left { display: none; } 

  .ielts-top-bar-center { order: 0; flex-shrink: 0; margin-right: 0; }
  .ielts-top-bar-mid { display: flex !important; order: 0; flex: 0 0 auto; gap: 4px; margin-left: 8px; }
  /* 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); }
  
  /* 2. Controls move right */
    .ielts-top-bar-right { order: 0; flex: 0 0 auto; gap: 4px; margin-left: auto; }
    .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; }
  
  /* Mobile Icon Buttons */
  .ielts-review-button { 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; order: 10; }
    #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; }
  
  /* Adjust Icon size inside buttons */
  .ielts-review-button svg { transform: scale(0.85); }

  /* Hide Text on Mobile Buttons */
  .ielts-review-button .desktop-text,
  .ielts-notes-toggle-btn { 
      display: none !important; 
  }
  
  .ielts-review-button .mobile-icon { display: block; }
  
  .ielts-final-answer-button {
      min-height: 44px;
      padding: 0 10px;
      font-size: 12px;
      white-space: nowrap;
      margin-left: 0;
  }

  /* Navigation & Footer Mobile */
  .nav-controls { bottom: 40px; right: 2px; } /* Reduced gap: 50px footer + 5px spacing */
  
  .ielts-pagination-footer {
      height: 50px; /* Force Reduced Footer Height */
  }

  .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 .part-text { display: none; }
  .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; }
  
  /* Sidebar Mobile */
  .ielts-final-wrapper #ielts-left-panel { display: none !important; }
  .ielts-final-wrapper .ielts-final-dragger { display: none !important; }
  .ielts-final-wrapper #ielts-right-panel { height: 100%; width: 100% !important; flex-grow: 1; min-height: 200px; }
  .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; }
  .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; }
  
  /* Ensure container padding also removed in mobile */
  .processed-questions-container { padding-top: 0 !important; }
  
  /* --- MOBILE SPLIT PANEL LOGIC --- */
  .ielts-final-wrapper .ielts-final-container { flex-direction: column !important; }
  
  /* Top Panel: Passage */
  .ielts-final-wrapper #ielts-left-panel { 
      display: flex !important; /* Force visible */
      height: 40%; 
      width: 100% !important; 
      flex-shrink: 0; 
      border-right: none !important; 
      border-bottom: 1px solid #e2e8f0; 
  }
  
  /* Dragger Mobile — same 6px thickness and dot orientation as PC */
  .ielts-final-wrapper .ielts-final-dragger { 
      display: flex !important; /* Force visible */
      width: 100% !important; 
      height: 6px !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: none; }
  
  /* Bottom Panel: Questions */
  .ielts-final-wrapper #ielts-right-panel { 
      height: 60%; 
      width: 100% !important; 
      flex-grow: 1; 
      min-height: 200px; 
  }

  /* --- 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), background-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; }

/* 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;
}

.ielts-heading-bank {
    margin: 16px 0 24px;
    padding: 14px;
    border: 1px solid #d8e0e8;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}

.ielts-heading-bank-title {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4b5563;
}

.ielts-heading-pool {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 0;
}

.ielts-heading-drag-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfd7df;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ielts-heading-drag-item:hover {
    border-color: #90a4b7;
    color: #111827;
    background: #fcfdff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.ielts-heading-drag-item.selected-for-drop {
    background: #ecfdf5;
    color: #111827;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.ielts-heading-option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    font-weight: 700;
    color: #6b7280;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 13px;
}

.ielts-heading-drag-item.selected-for-drop .ielts-heading-option-key {
    color: #ffffff;
    background: #10b981;
    border-color: #10b981;
}

.ielts-heading-option-text {
    color: #1f2937;
    line-height: 1.42;
}

.ielts-heading-drop-wrap {
    display: block;
    margin: 16px 0 10px;
}

.ielts-heading-drop-zone {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 58px;
    width: min(100%, 420px);
    padding: 10px 14px;
    border: 2px dashed #86efac;
    background: linear-gradient(180deg, #ffffff 0%, #f7fcf8 100%);
    border-radius: 12px;
    box-sizing: border-box;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.ielts-heading-drop-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #cfd7df;
    border-radius: 999px;
}

.ielts-heading-drop-text {
    display: block;
    width: 100%;
    font-size: 15px;
    line-height: 1.35;
    color: #6b7280;
}

.ielts-heading-drop-text:empty {
    display: none;
}

.ielts-heading-drop-zone.drag-over {
    background: #f0fdf4;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
    transform: translateY(-1px);
}

.ielts-heading-drop-zone.filled {
    display: inline-flex;
    border-style: solid;
    width: auto;
    max-width: min(100%, 560px);
    border-color: #059669;
    background: #10b981;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    justify-content: flex-start;
    box-shadow: none;
}

.ielts-heading-drop-zone.filled .ielts-heading-drop-text {
    display: block;
    width: auto;
    color: #ffffff;
}

.ielts-heading-drop-zone.filled .ielts-heading-drop-placeholder {
    display: none;
}

.ielts-heading-drop-zone.filled:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
    box-shadow: none;
}

.ielts-heading-drop-zone.filled:hover::after {
    content: none;
}

/* Drop Zones (The Blanks) */
.ielts-drop-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 40px;
    padding: 4px 10px;
    margin: 4px 4px;
    border: 2px dashed #8ac1e8;
    background: #ffffff;
    border-radius: 0;
    vertical-align: middle;
    font-size: 15px;
    line-height: 1.2;
    box-sizing: border-box;
    color: #7b8794;
    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;
}

/* 1. Restore Boldness */
.ielts-final-wrapper b, 
.ielts-final-wrapper strong {
    font-weight: 700 !important;
    color: inherit;
}

/* 2. Restore Heading Hierarchy (Standard Academic Sizes) */
.ielts-passage-content h1, .ielts-question-content h1 { font-size: 2.2em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; line-height: 1.2; }
.ielts-passage-content h2, .ielts-question-content h2 { font-size: 1.8em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; line-height: 1.2; }
.ielts-passage-content h3, .ielts-question-content h3 { font-size: 1.5em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; line-height: 1.3; }
.ielts-passage-content h4, .ielts-question-content h4 { font-size: 1.3em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; line-height: 1.4; }
.ielts-passage-content h5, .ielts-question-content h5 { font-size: 1.1em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; }
.ielts-passage-content h6, .ielts-question-content h6 { font-size: 1.0em !important; font-weight: 700 !important; margin-bottom: 0.5em !important; display: block !important; }

/* 3. Paragraph Spacing (Prevents text from looking like a giant block) */
.ielts-passage-content p, 
.ielts-question-content p {
    margin-bottom: 1.2em !important;
    line-height: 1.7 !important;
    display: block !important;
}

/* 4. List Visibility (Fixes missing bullets) */
.ielts-passage-content ul, .ielts-question-content ul {
    list-style-type: disc !important;
    margin-left: 20px !important;
    margin-bottom: 1em !important;    display: block !important;
}

.ielts-passage-content ol, .ielts-question-content ol {
    list-style-type: decimal !important;
    margin-left: 20px !important;
    margin-bottom: 1em !important;
    display: block !important;
}

.ielts-passage-content li, .ielts-question-content li {
    margin-bottom: 0.45em !important;
    display: list-item !important;
}

.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h3,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h4,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h5,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content h6,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h1,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h2,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h3,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h4,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h5,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content h6,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content p,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content li,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content ul,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content ol,
.ielts-final-wrapper.ielts-high-contrast .ielts-passage-content strong,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content p,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content li,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content ul,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content ol,
.ielts-final-wrapper.ielts-high-contrast .ielts-question-content strong {
    color: #f5f5f5 !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: 6px !important;
        flex-basis: 6px !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: none;
    }

    span.choice-group-tfng {
        margin-left: 12px;
        max-width: calc(100% - 12px);
    }
}

@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-candidate-card {
        padding: 16px 12px;
    }

    .ielts-pagination-footer {
        padding: 0 6px;
    }

    .parts-grid {
        gap: 3px;
    }

    .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;
    }

    .nav-controls {
        right: 6px;
        bottom: 64px;
        gap: 8px;
    }

    .nav-btn {
        width: 42px;
        height: 42px;
    }

    .nav-btn svg {
        width: 22px;
        height: 22px;
    }

    .ielts-notes-sidebar {
        width: 100vw;
        right: -100vw;
        max-width: none;
    }
}

/* Mobile overflow containment for runtime navigation and inline answer fields. */
@media (max-width: 768px) {
    .ielts-final-wrapper.reading-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.reading-mode.test-started .parts-grid,
    .ielts-final-wrapper.reading-mode.test-started .part-box,
    .ielts-final-wrapper.reading-mode.test-started .box-questions-area {
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .ielts-final-wrapper.reading-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.reading-mode.test-started .palette-btn {
        flex: 0 0 28px !important;
        width: 28px !important;
        height: 28px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .palette-btn.current {
        flex-basis: 30px !important;
        width: 30px !important;
        height: 30px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-gap-fill {
        max-width: min(100%, 8.5rem);
        margin-left: 3px;
        margin-right: 3px;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content,
    .ielts-final-wrapper.reading-mode.test-started .processed-questions-container {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel {
        min-height: 0 !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .ielts-final-panel-content {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .processed-questions-container,
    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .ielts-part-section {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        touch-action: pan-y;
    }
}

/* Reading mobile/tablet full-width stacked split.
   Keep the footer navigation untouched; only remove desktop panel gutters. */
@media (max-width: 1024px) {
    .ielts-final-wrapper.reading-mode.test-started .ielts-content-wrapper {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 12px 12px 16px !important;
        gap: 0 !important;
        overflow: hidden !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-final-container {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel,
    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel {
        box-sizing: border-box !important;
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-basis: auto !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel {
        height: 40%;
        border-right: 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        flex-shrink: 0 !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-final-dragger {
        display: flex !important;
        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.reading-mode.test-started .ielts-final-dragger::before {
        transform: translate(-50%, -50%) !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 12px !important;
        overflow-x: hidden !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .processed-questions-container,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content .ielts-part-section {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* Reading mobile/tablet panel polish. Header/footer stay unchanged. */
@media (max-width: 1024px) {
    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel {
        height: 42%;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content {
        padding: 12px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content p {
        font-size: 15px !important;
        line-height: 1.65 !important;
        margin-bottom: 0.78em !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content h1,
    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content h2,
    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content h3 {
        text-align: center !important;
        font-size: clamp(21px, 5.8vw, 25px) !important;
        line-height: 1.22 !important;
        margin: 4px 0 12px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content h3,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content h4,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content h5,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content h6 {
        margin: 8px 0 8px !important;
        line-height: 1.25 !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content p {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started span.choice-group,
    .ielts-final-wrapper.reading-mode.test-started span.choice-group-multi,
    .ielts-final-wrapper.reading-mode.test-started span.choice-group-tfng,
    .ielts-final-wrapper.reading-mode.test-started .ielts-list-group {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-list-option,
    .ielts-final-wrapper.reading-mode.test-started .choice-label-tfng,
    .ielts-final-wrapper.reading-mode.test-started .choice-label-tfng span,
    .ielts-final-wrapper.reading-mode.test-started button.choice-button.long-text,
    .ielts-final-wrapper.reading-mode.test-started .ielts-heading-bank,
    .ielts-final-wrapper.reading-mode.test-started .ielts-heading-drag-item,
    .ielts-final-wrapper.reading-mode.test-started .ielts-heading-drop-wrap,
    .ielts-final-wrapper.reading-mode.test-started .ielts-heading-drop-zone {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-list-option,
    .ielts-final-wrapper.reading-mode.test-started .choice-label-tfng span {
        padding: 10px 12px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-final-dragger {
        position: relative;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-final-dragger::before {
        content: '\2195' !important;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 30px;
        height: 30px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        transform: translate(-50%, -50%);
        background: #ffffff;
        border: 1px solid #2f2f2f;
        border-radius: 1px;
        color: #111827;
        font-size: 15px;
        font-weight: 700;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
        z-index: 1;
    }

    .ielts-final-wrapper.reading-mode.test-started .ielts-final-dragger::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: -12px;
        bottom: -12px;
        width: auto;
        height: auto;
        background: transparent;
        border: 0;
        color: transparent;
        box-shadow: none;
        border-radius: 0;
        transform: none;
    }

    .ielts-final-wrapper.reading-mode.test-started .nav-controls {
        right: 10px;
        bottom: calc(var(--ielts-app-footer-height, 56px) + var(--ielts-safe-bottom, 0px) + 14px);
    }
}

@media (max-width: 480px) {
    .ielts-final-wrapper.reading-mode.test-started .ielts-content-wrapper {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel {
        height: 45%;
    }

    .ielts-final-wrapper.reading-mode.test-started #ielts-left-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started #ielts-right-panel .ielts-final-panel-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-passage-content,
    .ielts-final-wrapper.reading-mode.test-started .ielts-question-content {
        padding: 10px !important;
    }

    .ielts-final-wrapper.reading-mode.test-started .nav-controls {
        right: 8px;
        bottom: calc(var(--ielts-app-footer-height, 56px) + var(--ielts-safe-bottom, 0px) - 4px);
    }
}
