:root {
    --custom-primary: #2F6B45;
    --custom-primary-dark: #214D34;
    --custom-primary-light: #E8F0E5;

    --custom-text: #26352B;
    --custom-muted: #657568;

    --custom-border: #D7DDCE;
    --custom-bg: #F8F5E9;
    --custom-white: #FFFEF7;

    --custom-success: #28745B;
    --custom-danger: #C94B4B;

    --custom-radius: 16px;
}

.custom-test-navbar {
    width: 100%;
    background: var(--custom-white);
    border-bottom: 1px solid var(--custom-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    width: min(1100px, calc(100% - 32px));
    min-height: 64px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    color: var(--custom-text);
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.navbar-spacer {
    flex: 1;
}

.back-btn {
    border: 0;
    background: transparent;
    color: var(--custom-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

.back-btn:hover {
    color: var(--custom-primary);
}

.custom-test-page {
    min-height: calc(100vh - 64px);
    background: var(--custom-bg);

    padding: 48px 16px 80px;

    position: relative;
}

.page-header {
    width: min(800px, 100%);
    margin: 0 auto 36px;
    text-align: center;
}

.page-eyebrow {
    display: inline-block;

    color: var(--custom-primary);
    background: var(--custom-primary-light);

    font-size: 11px;
    font-weight: 800;

    padding: 6px 10px;
    border-radius: 999px;

    letter-spacing: 0.08em;

    margin-bottom: 12px;
}

.page-header h1 {
    margin: 0;

    color: var(--custom-text);

    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.15;
}

.page-header p {
    margin: 12px 0 0;

    color: var(--custom-muted);

    font-size: 16px;
}

.wizard-progress {
    width: min(850px, 100%);
    margin: 0 auto 42px;
}

.progress-track {
    width: 100%;
    height: 5px;

    background: #E4E8D9;
    border-radius: 999px;

    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;

    background: var(--custom-primary);

    border-radius: inherit;

    transition: width 0.35s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;

    margin-top: -13px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 7px;

    color: #AAB8A4;

    min-width: 55px;
}

.step-number {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #E4E8D9;
    border: 4px solid var(--custom-bg);

    font-size: 11px;
    font-weight: 800;

    transition: 0.25s ease;
}

.step-label {
    font-size: 11px;
    font-weight: 700;
}

.progress-step.active,
.progress-step.completed {
    color: var(--custom-primary);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--custom-primary);
    color: white;
}

.progress-step.completed .step-number::after {
    content: none;
}

.progress-step.completed .step-number {
    font-size: 11px;
}

.wizard-container {
    width: min(900px, 100%);
    margin: 0 auto;
}

.wizard-step {
    display: none;

    animation: stepIn 0.25s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-heading {
    margin-bottom: 28px;
}

.step-badge {
    display: inline-block;

    color: var(--custom-primary);

    font-size: 12px;
    font-weight: 800;

    margin-bottom: 8px;
}

.step-heading h2 {
    margin: 0;

    color: var(--custom-text);

    font-size: clamp(25px, 4vw, 32px);
}

.step-heading p {
    margin: 8px 0 0;

    color: var(--custom-muted);

    font-size: 15px;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.exam-card {
    position: relative;

    min-height: 0;
    min-width: 0;
    text-align: left;

    background: var(--custom-white);

    border: 2px solid var(--custom-border);
    border-radius: var(--custom-radius);

    padding: 18px 18px 16px;

    cursor: pointer;
    overflow: hidden;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.exam-card:hover {
    transform: translateY(-2px);

    border-color: #DCE8D5;

    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.07);
}

.exam-card.selected {
    border-color: var(--custom-primary);

    box-shadow:
        0 0 0 3px rgba(108, 77, 246, 0.10),
        0 12px 30px rgba(31, 41, 55, 0.07);
}

.exam-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: var(--custom-primary-light);

    color: var(--custom-primary);

    font-size: 20px;
    font-weight: 900;

    margin-bottom: 12px;
}

.exam-card h3 {
    margin: 0;

    color: var(--custom-text);

    font-size: 18px;
}

.exam-card p {
    margin: 7px 0 0;

    color: var(--custom-muted);

    font-size: 13px;
    line-height: 1.5;
}

.card-check {
    position: absolute;

    top: 20px;
    right: 20px;

    width: 25px;
    height: 25px;

    border-radius: 50%;

    border: 2px solid var(--custom-border);

    display: flex;
    align-items: center;
    justify-content: center;

    color: transparent;

    font-size: 12px;
    font-weight: 800;
}

.exam-card.selected .card-check {
    background: var(--custom-primary);
    border-color: var(--custom-primary);

    color: white;
}

.subject-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));

    gap: 12px;
}

.subject-card {
    position: relative;

    background: white;

    border: 2px solid var(--custom-border);
    border-radius: var(--custom-radius);

    padding: 16px;
    min-width: 0;
    text-align: left;

    cursor: pointer;
    overflow: hidden;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.subject-card:hover {
    transform: translateY(-2px);

    border-color: #DCE8D5;
}

.subject-card.selected {
    border-color: var(--custom-primary);

    box-shadow:
        0 0 0 3px rgba(108, 77, 246, 0.08);
}

.subject-card-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #EEF1E4;

    color: var(--custom-primary);

    border-radius: 12px;

    font-weight: 900;

    margin-bottom: 11px;
}

.subject-card h3 {
    margin: 0;

    color: var(--custom-text);

    font-size: 15px;
    overflow-wrap: anywhere;
}

.subject-card p {
    margin: 6px 0 0;

    color: var(--custom-muted);

    font-size: 13px;
}

.subject-check {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 23px;
    height: 23px;

    border-radius: 50%;

    border: 2px solid var(--custom-border);

    display: flex;
    align-items: center;
    justify-content: center;

    color: transparent;

    font-size: 11px;
    font-weight: 900;
}

.subject-card.selected .subject-check {
    background: var(--custom-primary);
    border-color: var(--custom-primary);

    color: white;
}

.subject-config-tabs {
    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding-bottom: 6px;
    margin-bottom: 18px;

    scrollbar-width: thin;
}

.subject-config-tab {
    flex: 0 0 auto;

    border: 1px solid var(--custom-border);

    background: white;

    color: var(--custom-muted);

    border-radius: 10px;

    padding: 11px 16px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.subject-config-tab:hover {
    border-color: #DCE8D5;
}

.subject-config-tab.active {
    background: var(--custom-primary);
    border-color: var(--custom-primary);

    color: white;
}

.subject-config-card {
    background: white;

    border: 1px solid var(--custom-border);

    border-radius: var(--custom-radius);

    overflow: hidden;
}

.config-header {
    padding: 22px 24px;

    border-bottom: 1px solid var(--custom-border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.config-header h3 {
    margin: 0;

    color: var(--custom-text);

    font-size: 20px;
}

.config-header p {
    margin: 5px 0 0;

    color: var(--custom-muted);

    font-size: 13px;
}

.config-total {
    white-space: nowrap;

    background: var(--custom-primary-light);

    color: var(--custom-primary);

    border-radius: 999px;

    padding: 7px 12px;

    font-size: 12px;
    font-weight: 800;
}

.chapter-list {
    padding: 8px 24px 16px;
}

.chapter-row {
    display: grid;

    grid-template-columns: 28px minmax(0, 1fr) auto;

    align-items: center;

    gap: 14px;

    padding: 16px 0;

    border-bottom: 1px solid #F0F2E8;
}

.chapter-row:last-child {
    border-bottom: 0;
}

.chapter-checkbox {
    width: 19px;
    height: 19px;

    accent-color: var(--custom-primary);

    cursor: pointer;
}

.chapter-info {
    min-width: 0;
}

.chapter-name {
    display: block;

    color: var(--custom-text);

    font-size: 14px;
    font-weight: 700;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-available {
    display: block;

    margin-top: 4px;

    color: var(--custom-muted);

    font-size: 11px;
}

.question-counter {
    display: flex;
    align-items: center;

    border: 1px solid var(--custom-border);

    border-radius: 10px;

    overflow: hidden;

    background: white;
}

.counter-btn {
    width: 35px;
    height: 35px;

    border: 0;

    background: #F8F5E9;

    color: var(--custom-text);

    cursor: pointer;

    font-size: 18px;
    font-weight: 600;
}

.counter-btn:hover {
    background: var(--custom-primary-light);
    color: var(--custom-primary);
}

.counter-btn:disabled {
    color: #C8D4C5;
    cursor: not-allowed;
}

.counter-value {
    width: 42px;

    text-align: center;

    color: var(--custom-text);

    font-size: 13px;
    font-weight: 800;
}

.chapter-row.disabled {
    opacity: 0.55;
}

.chapter-row.disabled .question-counter {
    opacity: 0.9;
}

.empty-chapters {
    padding: 35px 20px;

    text-align: center;

    color: var(--custom-muted);

    font-size: 14px;
}

.question-summary {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 18px;
}

.summary-stat {
    background: white;

    border: 1px solid var(--custom-border);

    border-radius: 12px;

    padding: 17px;

    text-align: center;
}

.summary-label {
    display: block;

    color: var(--custom-muted);

    font-size: 11px;
    font-weight: 600;

    margin-bottom: 5px;
}

.summary-stat strong {
    color: var(--custom-text);

    font-size: 22px;
}

.time-grid {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 12px;
}

.time-card {
    border: 2px solid var(--custom-border);

    background: white;

    border-radius: 14px;

    padding: 22px 12px;

    text-align: center;

    cursor: pointer;

    transition: 0.2s ease;
}

.time-card:hover {
    border-color: #DCE8D5;
}

.time-card.selected {
    border-color: var(--custom-primary);

    background: var(--custom-primary-light);
}

.time-number {
    display: block;

    color: var(--custom-text);

    font-size: 22px;
    font-weight: 800;
}

.time-card.selected .time-number {
    color: var(--custom-primary);
}

.time-label {
    display: block;

    color: var(--custom-muted);

    font-size: 11px;
    font-weight: 600;

    margin-top: 4px;
}

.final-test-preview {
    margin-top: 24px;

    background: white;

    border: 1px solid var(--custom-border);

    border-radius: var(--custom-radius);

    overflow: hidden;
}

.preview-header {
    padding: 20px 22px;

    border-bottom: 1px solid var(--custom-border);
}

.preview-eyebrow {
    color: var(--custom-primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.08em;
}

.preview-header h3 {
    margin: 5px 0 0;

    color: var(--custom-text);

    font-size: 22px;
}

.preview-details {
    display: grid;

    grid-template-columns: repeat(3, 1fr);
}

.preview-item {
    padding: 18px 22px;

    border-right: 1px solid var(--custom-border);
}

.preview-item:last-child {
    border-right: 0;
}

.preview-item span {
    display: block;

    color: var(--custom-muted);

    font-size: 11px;

    margin-bottom: 5px;
}

.preview-item strong {
    color: var(--custom-text);

    font-size: 15px;
}

.wizard-actions {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;

    margin-top: 28px;
}

.primary-btn,
.secondary-btn {
    min-height: 46px;

    border-radius: 11px;

    padding: 0 20px;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.2s ease;
}

.primary-btn {
    border: 1px solid var(--custom-primary);

    background: var(--custom-primary);

    color: white;
}

.primary-btn:hover {
    background: var(--custom-primary-dark);

    border-color: var(--custom-primary-dark);

    transform: translateY(-1px);
}

.primary-btn:disabled {
    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}

.primary-btn span {
    margin-left: 6px;
}

.secondary-btn {
    border: 1px solid var(--custom-border);

    background: white;

    color: var(--custom-text);
}

.secondary-btn:hover {
    border-color: #DCE8D5;

    color: var(--custom-primary);
}

.start-btn {
    min-width: 220px;
}

.toast {
    position: fixed;

    left: 50%;
    bottom: 24px;

    transform: translate(-50%, 100px);

    opacity: 0;

    z-index: 1000;

    background: #26352B;

    color: white;

    padding: 12px 17px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;

    max-width: calc(100% - 30px);

    text-align: center;

    transition: 0.25s ease;

    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);

    opacity: 1;
}

.toast.error {
    background: var(--custom-danger);
}

.loading-overlay {
    position: fixed;

    inset: 0;

    z-index: 999;

    background: rgba(255, 255, 255, 0.82);

    backdrop-filter: blur(5px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay.hidden {
    display: none;
}

.loading-card {
    width: min(360px, calc(100% - 30px));

    background: white;

    border: 1px solid var(--custom-border);

    border-radius: 18px;

    padding: 30px;

    text-align: center;

    box-shadow: 0 20px 50px rgba(31, 41, 55, 0.12);
}

.loading-spinner {
    width: 38px;
    height: 38px;

    margin: 0 auto 18px;

    border: 4px solid #E8F0E5;

    border-top-color: var(--custom-primary);

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-card h3 {
    margin: 0;

    color: var(--custom-text);

    font-size: 17px;
}

.loading-card p {
    margin: 7px 0 0;

    color: var(--custom-muted);

    font-size: 13px;
}

@media (max-width: 750px) {

    .custom-test-page {
        padding-top: 32px;
    }

    .exam-grid {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
        gap: 10px;
    }

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

    .exam-card {
        padding: 14px;
    }

    .exam-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 10px;
    }

    .exam-card h3 {
        font-size: 16px;
    }

    .subject-card {
        padding: 13px;
    }

    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .question-summary {
        grid-template-columns: 1fr;
    }

    .preview-details {
        grid-template-columns: 1fr;
    }

    .preview-item {
        border-right: 0;
        border-bottom: 1px solid var(--custom-border);
    }

    .preview-item:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 520px) {

    .custom-test-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-inner {
        width: calc(100% - 24px);
    }

    .progress-steps {
        margin-top: -11px;
    }

    .step-number {
        width: 24px;
        height: 24px;

        border-width: 3px;
    }

    .step-label {
        font-size: 9px;
    }

    .wizard-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .primary-btn,
    .secondary-btn,
    .start-btn {
        width: 100%;
    }

    .config-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chapter-row {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .question-counter {
        grid-column: 2;
        justify-self: start;
    }

    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chapter-list {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.question-counter .counter-input {
    width: 64px;
    min-width: 64px;
    height: 36px;
    padding: 0 4px;
    border: 1px solid #C8D4C5;
    border-radius: 8px;
    background: #FFFEF7;
    color: #26352B;
    font: inherit;
    font-weight: 700;
    text-align: center;
    outline: none;
}
.question-counter .counter-input:focus {
    border-color: #2F6B45;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.question-counter .counter-input::-webkit-inner-spin-button,
.question-counter .counter-input::-webkit-outer-spin-button {
    opacity: 1;
}

.navbar { display:flex; justify-content:space-between; align-items:center; min-height:65px; height:65px; padding:0 2rem; background:#FFFEF7; border-bottom:1px solid #D7DDCE; position:sticky; top:0; z-index:1000; box-sizing:border-box; }
.nav-left { display:flex; align-items:center; gap:1.5rem; min-width:0; height:100%; }
.nav-brand-title { display:inline-flex; align-items:center; gap:.5rem; height:100%; color:#2F6B45; text-decoration:none; font-size:1.2rem; font-weight:800; white-space:nowrap; }
.nav-logo { width:auto; height:48px; max-width:60px; object-fit:contain; display:block; }
.nav-user-greeting { display:flex; align-items:center; min-height:30px; padding-left:1.25rem; border-left:1px solid #D7DDCE; color:#657568; font-size:.9rem; font-weight:600; }
.nav-right { flex:1; }
.exam-icon img { width:100%; height:100%; object-fit:contain; padding:5px; }
.subject-card-icon img { width:100%; height:100%; object-fit:contain; padding:4px; }
@media (max-width:600px) { .navbar { padding:0 .75rem; } .nav-left { gap:.5rem; } .nav-brand-title { font-size:1rem; } .nav-logo { height:38px; max-width:45px; } .nav-user-greeting { display:none; } }

.exam-card.is-loading::after {
    content: "";
    position: absolute;
    top: 13px;
    right: 52px;
    width: 15px;
    height: 15px;
    border: 2px solid #E7EBDD;
    border-top-color: var(--custom-primary);
    border-radius: 50%;
    animation: mini-spin .7s linear infinite;
    pointer-events: none;
}
.primary-btn.is-loading { cursor: wait; opacity: .75; }
@keyframes mini-spin { to { transform: rotate(360deg); } }

.exam-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 148px));
    justify-content: start;
    align-items: stretch;
    gap: 14px;
}
.exam-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    height: 158px;
    padding: 15px 10px 12px;
    text-align: center;
    border-width: 1px;
}
.exam-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    margin: 0 0 10px;
    border-radius: 12px;
    overflow: hidden;
}
.exam-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}
.exam-card h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}
.exam-card p {
    display: none;
}
.exam-card .card-check {
    top: 7px;
    right: 7px;
    width: 19px;
    height: 19px;
}
.exam-card.is-loading::after {
    top: 8px;
    right: 31px;
    width: 12px;
    height: 12px;
}
.subject-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 148px));
    justify-content: start;
    align-items: stretch;
    gap: 14px;
}
.subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 150px;
    padding: 15px 10px 12px;
    text-align: center;
    border-width: 1px;
}
.subject-card-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    margin: 0 0 10px;
    border-radius: 12px;
    overflow: hidden;
}
.subject-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}
.subject-card h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
}
.subject-card p {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.25;
}
.subject-card .subject-check {
    top: 7px;
    right: 7px;
    width: 18px;
    height: 18px;
}

.exam-card.is-loading {
    transform: none;
}
.exam-card.is-loading::after {
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .exam-grid, .subject-grid {
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        gap: 10px;
    }
    .exam-card { height: 148px; padding: 13px 8px 10px; }
    .exam-icon { flex-basis: 52px; width: 52px; height: 52px; }
    .subject-card { height: 142px; padding: 13px 8px 10px; }
    .subject-card-icon { flex-basis: 48px; width: 48px; height: 48px; }
}

:root {
  --custom-primary: #2F6B45;
  --custom-primary-dark: #214D34;
  --custom-primary-light: #E8F0E5;
  --custom-text: #26352B;
  --custom-muted: #657568;
  --custom-border: #D7DDCE;
  --custom-bg: #F8F5E9;
  --custom-white: #FFFEF7;
  --custom-success: #28745B;
  --custom-danger: #b74750;
}
body { background: #F8F5E9; color: #26352B; }
.navbar { background: #FFFEF7; border-bottom-color: #D7DDCE; }
.nav-brand-title { color: #2F6B45; }
button.primary-btn, .primary-btn, .btn-primary { background: #2F6B45; border-color: #2F6B45; }
button.primary-btn:hover, .primary-btn:hover, .btn-primary:hover { background: #314237; border-color: #314237; }
:focus-visible { outline-color: #C8D4C5; }

@media (max-width: 900px) {
    .custom-test-page { padding: 34px 16px 56px; }
    .wizard-container { width: 100%; }
    .exam-grid, .subject-grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
    .subject-config-tabs { overflow-x: auto; max-width: 100%; }
    .subject-config-tab { flex: 0 0 auto; }
    .chapter-row { gap: 12px; }
    .question-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .time-grid { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
}

@media (max-width: 600px) {
    .navbar { padding: 0 12px; min-height: 58px; height: auto; }
    .nav-left { gap: 10px; }
    .nav-brand-title { gap: 6px; font-size: 1rem; }
    .nav-logo { height: 42px; max-width: 44px; }
    .nav-user-greeting { display: none; }
    .custom-test-page { min-height: calc(100vh - 58px); padding: 24px 12px 36px; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-size: clamp(25px, 7vw, 34px); }
    .page-header p { font-size: 14px; }
    .wizard-progress { margin-bottom: 24px; }
    .progress-steps { gap: 4px; }
    .progress-step { min-width: 0; flex: 1 1 0; }
    .step-label { font-size: 11px; }
    .step-number { width: 28px; height: 28px; }
    .wizard-container { padding: 18px 12px; border-radius: 12px; }
    .step-heading h2 { font-size: 21px; }
    .step-heading p { font-size: 13px; }
    .exam-grid, .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .exam-card { min-width: 0; }
    .subject-card { min-width: 0; }
    .subject-config-card { padding: 14px 10px; }
    .config-header { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
    .chapter-row { align-items: flex-start; flex-wrap: wrap; padding: 12px 0; }
    .chapter-info { flex: 1 1 calc(100% - 36px); min-width: 0; }
    .question-counter { margin-left: 36px; }
    .question-counter .counter-input { width: 68px; }
    .question-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .summary-stat { padding: 12px; min-width: 0; }
    .time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .final-test-preview { padding: 16px 12px; }
    .preview-details { grid-template-columns: 1fr; gap: 10px; }
    .wizard-actions { display: flex; flex-direction: column-reverse; gap: 10px; }
    .wizard-actions button, .wizard-actions .primary-btn, .wizard-actions .secondary-btn { width: 100%; min-height: 44px; }
    .toast { max-width: calc(100vw - 24px); left: 12px; right: 12px; }
}

@media (max-width: 360px) {
    .exam-grid, .subject-grid { grid-template-columns: minmax(0, 1fr); }
    .progress-step { gap: 3px; }
    .step-label { font-size: 10px; }
    .question-summary { grid-template-columns: minmax(0, 1fr); }
}
