.quiz-shell {
    --quiz-primary: #1546d8;
    --quiz-primary-dark: #0f37ad;
    --quiz-success: #58cc02;
    --quiz-success-dark: #46a302;
    --quiz-error: #ff4b4b;
    --quiz-error-dark: #d93434;
    --quiz-border: #e5e7eb;
    --quiz-text: #25324a;
    --quiz-muted: #6f7b91;
    width: min(980px, calc(100% - 24px));
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 14px 0 132px;
    color: var(--quiz-text);
}
.quiz-shell__top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0 18px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
}
.quiz-shell__close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #a0a8b8;
    text-decoration: none;
}
.quiz-shell__close:hover { background: #f4f6f9; color: #5f6b7d; }
.quiz-shell__progress {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ecf2;
}
.quiz-shell__progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1546d8, #1cb0f6);
    transition: width .22s ease;
}
.quiz-shell__position {
    min-width: 54px;
    color: #8a94a6;
    font-size: .82rem;
    font-weight: 900;
    text-align: right;
}
.quiz-workspace__content {
    width: min(720px, 100%);
    margin: 30px auto 0;
}
.quiz-mode {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--quiz-primary);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.quiz-workspace h1 {
    margin: 0;
    color: #24324a;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 900;
}
.quiz-instruction {
    margin: 8px 0 24px;
    color: var(--quiz-muted);
    font-size: .98rem;
    font-weight: 600;
}
.quiz-audio {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}
.quiz-audio__button {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 18px;
    background: #1cb0f6;
    color: #fff;
    font-size: 1.9rem;
    box-shadow: 0 5px 0 #1499d8;
}
.quiz-audio__button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #1499d8;
}
.quiz-wave {
    display: flex;
    gap: 5px;
    align-items: center;
    height: 42px;
}
.quiz-wave span {
    width: 5px;
    height: 12px;
    border-radius: 999px;
    background: #9bddfb;
}
.quiz-wave.is-playing span { animation: quiz-wave .65s ease-in-out infinite alternate; }
.quiz-wave.is-playing span:nth-child(2) { animation-delay: .08s; }
.quiz-wave.is-playing span:nth-child(3) { animation-delay: .16s; }
.quiz-wave.is-playing span:nth-child(4) { animation-delay: .24s; }
.quiz-wave.is-playing span:nth-child(5) { animation-delay: .32s; }
@keyframes quiz-wave { to { height: 34px; } }
.quiz-repeat {
    display: grid;
    gap: 4px;
}
.quiz-repeat label {
    color: #8993a5;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.quiz-repeat select {
    min-width: 110px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #fff;
    color: #40506a;
    font-weight: 800;
}
.quiz-answer-zone {
    min-height: 98px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    padding: 16px;
    border-bottom: 2px solid #e5e7eb;
}
.quiz-answer-zone:empty::before {
    content: "Your answer";
    color: #b2bac7;
    font-weight: 700;
}
.quiz-word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 110px;
    padding: 20px 0;
}
.quiz-token {
    min-height: 44px;
    padding: 8px 14px;
    border: 2px solid #d9dee7;
    border-bottom-width: 4px;
    border-radius: 12px;
    background: #fff;
    color: #324158;
    font-weight: 800;
    line-height: 1.25;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.quiz-token:hover { border-color: #b8c7de; background: #f9fbff; }
.quiz-token:active { transform: translateY(2px); border-bottom-width: 2px; }
.quiz-options {
    display: grid;
    gap: 12px;
}
.quiz-option {
    width: 100%;
    min-height: 58px;
    padding: 14px 16px;
    border: 2px solid #d9dee7;
    border-bottom-width: 4px;
    border-radius: 13px;
    background: #fff;
    color: #334158;
    text-align: left;
    font-weight: 800;
}
.quiz-option:hover { border-color: #b7c8e5; background: #f8fbff; }
.quiz-option.is-selected {
    border-color: #55baf0;
    background: #eef9ff;
    color: #1769a8;
}
.quiz-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 92px;
    padding: 16px max(20px, calc((100vw - 980px) / 2));
    border-top: 1px solid #e5e7eb;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(12px);
}
.quiz-footer.is-correct { background: #f1fae9; border-top-color: #b8e28d; }
.quiz-footer.is-wrong { background: #fff1f1; border-top-color: #ffc1c1; }
.quiz-footer__feedback {
    display: flex;
    gap: 12px;
    align-items: center;
}
.quiz-footer__feedback strong {
    display: block;
    color: #30415b;
    font-size: 1rem;
    font-weight: 900;
}
.quiz-footer__feedback p {
    margin: 2px 0 0;
    color: #6d7787;
    font-size: .86rem;
    font-weight: 700;
}
.quiz-feedback-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 900;
}
.quiz-footer.is-correct .quiz-feedback-icon { background: #58cc02; color: #fff; }
.quiz-footer.is-wrong .quiz-feedback-icon { background: #ff4b4b; color: #fff; }
.quiz-footer__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.quiz-action {
    min-width: 118px;
    min-height: 46px;
    padding: 9px 18px;
    border-radius: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.quiz-action--primary {
    border: 0;
    background: var(--quiz-primary);
    color: #fff;
    box-shadow: 0 4px 0 var(--quiz-primary-dark);
}
.quiz-action--primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--quiz-primary-dark);
}
.quiz-action--secondary {
    border: 2px solid #d9dee7;
    background: #fff;
    color: #6d7787;
}
.quiz-state {
    min-height: 360px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
}
.quiz-state--error { color: #b42318; }
.quiz-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dce4ef;
    border-top-color: var(--quiz-primary);
    border-radius: 50%;
    animation: quiz-spin .8s linear infinite;
}
@keyframes quiz-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
    .quiz-shell { padding-bottom: 170px; }
    .quiz-audio { grid-template-columns: auto 1fr; }
    .quiz-repeat { grid-column: 1 / -1; grid-template-columns: auto 110px; align-items: center; }
    .quiz-footer {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    .quiz-footer__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .quiz-footer__actions .quiz-action { width: 100%; min-width: 0; }
    #quizNext { grid-column: 1 / -1; }
}



/* ==========================================================================
   NEVILIX QUIZ HOME V3
   Modern learning-app style. Public /quiz only.
   ========================================================================== */
.quiz-home {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 54px;
    color: #22304a;
}
.quiz-home__hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 220px;
    padding: 30px 34px;
    border: 1px solid #dbe7f6;
    border-radius: 24px;
    background:
        radial-gradient(circle at 82% 18%, rgba(28, 176, 246, .18), transparent 24%),
        linear-gradient(135deg, #f5f9ff 0%, #ffffff 54%, #eef6ff 100%);
    box-shadow: 0 18px 50px rgba(27, 68, 122, .08);
}
.quiz-home__hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(21, 70, 216, .07);
}
.quiz-home__hero-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
}
.quiz-home__eyebrow,
.quiz-home__section-kicker {
    color: #1557a6;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.quiz-home__hero h1 {
    margin: 8px 0 10px;
    color: #123f7f;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -.03em;
}
.quiz-home__hero p {
    max-width: 700px;
    margin: 0;
    color: #67758a;
    font-size: 1rem;
    line-height: 1.65;
}
.quiz-home__hero-badge {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 150px;
    padding: 18px;
    border: 1px solid #d4e4f8;
    border-radius: 20px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 30px rgba(28, 82, 150, .08);
    backdrop-filter: blur(8px);
}
.quiz-home__hero-badge i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #1546d8;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(21, 70, 216, .18);
}
.quiz-home__hero-badge span {
    color: #3f4f67;
    font-size: .8rem;
    font-weight: 900;
}
.quiz-home__section {
    margin-top: 24px;
}
.quiz-home__section-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 14px;
}
.quiz-home__section-heading h2 {
    margin: 3px 0 0;
    color: #243550;
    font-size: 1.45rem;
}
.quiz-home__section-meta {
    color: #7c8798;
    font-size: .78rem;
    font-weight: 800;
}
.quiz-home__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.quiz-mode-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e1e7ef;
    border-bottom-width: 5px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(28, 65, 113, .06);
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}
.quiz-mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(28, 75, 135, .11);
}
.quiz-mode-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.quiz-mode-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 1.35rem;
}
.quiz-mode-card__label {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.quiz-mode-card__body {
    margin-top: 22px;
}
.quiz-mode-card__body h3 {
    margin: 0 0 8px;
    color: #27364e;
    font-size: 1.25rem;
    line-height: 1.3;
}
.quiz-mode-card__body p {
    margin: 0;
    color: #748095;
    font-size: .9rem;
    line-height: 1.6;
}
.quiz-mode-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    padding-top: 24px;
}
.quiz-mode-card__hint {
    color: #8a95a6;
    font-size: .72rem;
    font-weight: 800;
}
.quiz-mode-card__start {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 15px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 900;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .14);
}
.quiz-mode-card__start:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .14);
}
.quiz-mode-card--word {
    border-color: #cbdcff;
}
.quiz-mode-card--word .quiz-mode-card__icon {
    background: #e9f1ff;
    color: #1546d8;
}
.quiz-mode-card--word .quiz-mode-card__label {
    background: #edf3ff;
    color: #1546d8;
}
.quiz-mode-card--word .quiz-mode-card__start {
    background: #1546d8;
}
.quiz-mode-card--listen {
    border-color: #c7ebfb;
}
.quiz-mode-card--listen .quiz-mode-card__icon {
    background: #e9f8ff;
    color: #109cd8;
}
.quiz-mode-card--listen .quiz-mode-card__label {
    background: #eefaff;
    color: #148ab9;
}
.quiz-mode-card--listen .quiz-mode-card__start {
    background: #1cb0f6;
}
.quiz-mode-card--vocab {
    border-color: #cde9d5;
}
.quiz-mode-card--vocab .quiz-mode-card__icon {
    background: #eefaf2;
    color: #2e9f56;
}
.quiz-mode-card--vocab .quiz-mode-card__label {
    background: #f1faf4;
    color: #26874a;
}
.quiz-mode-card--vocab .quiz-mode-card__start {
    background: #37a85d;
}
@media (max-width: 900px) {
    .quiz-home__grid {
        grid-template-columns: 1fr;
    }
    .quiz-mode-card {
        min-height: 230px;
    }
}
@media (max-width: 640px) {
    .quiz-home {
        width: min(100% - 18px, 1180px);
        padding-top: 14px;
    }
    .quiz-home__hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 22px 18px;
        border-radius: 18px;
    }
    .quiz-home__hero-badge {
        display: none;
    }
    .quiz-home__hero h1 {
        font-size: 1.85rem;
    }
    .quiz-home__section-heading {
        align-items: center;
    }
    .quiz-mode-card {
        min-height: 220px;
        padding: 17px;
        border-radius: 17px;
    }
}

/* Quiz Sets: appended without changing the locked Quiz runner styles. */
.quiz-home__set-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.quiz-set-card { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:14px; align-items:center; min-height:82px; padding:16px 18px; border:1px solid #dce7f5; border-radius:17px; background:#fff; color:#21324d; text-decoration:none; box-shadow:0 8px 24px rgba(24,62,112,.06); }
.quiz-set-card:hover,.quiz-set-card:focus-visible { border-color:#9dc2f4; color:#1546d8; box-shadow:0 12px 30px rgba(21,70,216,.11); outline:none; }
.quiz-set-card__icon { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:#eef5ff; color:#1546d8; font-size:1.25rem; }
.quiz-set-card__content { display:grid; gap:3px; }
.quiz-set-card__content strong { font-size:1rem; }
.quiz-set-card__content small { color:#718096; }
@media (max-width:767.98px){.quiz-home__set-grid{grid-template-columns:1fr;}}

/* ========================================================================== 
   NEVILIX QUIZ RUNNER V4 — SCORE, REVIEW, AUDIO REPEAT & LEARNING PROGRESS
   ========================================================================== */
.quiz-shell__close > span {
    display: block;
    margin-top: -2px;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
}
.quiz-state__warning {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 1.15rem;
    font-weight: 900;
}
.quiz-learning-progress {
    width: min(720px, 100%);
    margin: 12px auto 0;
    padding: 14px 16px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #fbfdff;
}
.quiz-learning-progress__head {
    display: flex;
    gap: 16px;
    align-items: end;
    justify-content: space-between;
    padding-bottom: 11px;
    border-bottom: 1px solid #e9eef5;
}
.quiz-learning-progress__head > div {
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.quiz-learning-progress__head span,
.quiz-learning-progress__head small {
    color: #748197;
    font-size: .76rem;
    font-weight: 800;
}
.quiz-learning-progress__head strong {
    color: var(--quiz-primary);
    font-size: 1.05rem;
    font-weight: 950;
}
.quiz-learning-progress__stats,
.quiz-results__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 11px;
}
.quiz-learning-progress__stats > span,
.quiz-results__stats > span {
    display: flex;
    gap: 6px;
    align-items: baseline;
    justify-content: center;
    min-width: 0;
}
.quiz-learning-progress__stats small,
.quiz-results__stats small {
    color: #8390a3;
    font-size: .7rem;
    font-weight: 800;
}
.quiz-learning-progress__stats strong,
.quiz-results__stats strong {
    color: #33435a;
    font-size: .95rem;
    font-weight: 950;
}
.quiz-learning-progress__stats .is-correct strong,
.quiz-results__stats .is-correct strong {
    color: #3f9e00;
}
.quiz-learning-progress__stats .is-wrong strong,
.quiz-results__stats .is-wrong strong {
    color: #dc3c3c;
}
.quiz-audio__button {
    position: relative;
}
.quiz-audio__icon {
    width: 32px;
    height: 32px;
    pointer-events: none;
}
.quiz-audio__icon[hidden] {
    display: none !important;
}
.quiz-audio__button.is-playing {
    background: #1546d8;
    box-shadow: 0 5px 0 #0f37ad;
}
.quiz-audio__button.is-playing:active {
    box-shadow: 0 2px 0 #0f37ad;
}
.quiz-option:disabled,
.quiz-token:disabled {
    cursor: default;
}
.quiz-option.is-correct {
    border-color: #83ca4d;
    background: #f1fae9;
    color: #367f00;
}
.quiz-option.is-wrong {
    border-color: #ff9c9c;
    background: #fff1f1;
    color: #b92e2e;
}
.quiz-results {
    width: min(820px, 100%);
    margin: 18px auto 0;
    padding: 0 0 52px;
}
.quiz-results__card {
    padding: 28px;
    border: 1px solid #dce6f3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(23, 58, 116, .09);
}
.quiz-results__eyebrow {
    color: var(--quiz-primary);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.quiz-results h1 {
    margin: 4px 0 20px;
    color: #26364f;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 950;
}
.quiz-results__score {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 24px 18px;
    border: 1px solid #d9e8fb;
    border-radius: 20px;
    background: linear-gradient(135deg, #f4f9ff, #eef7ff);
}
.quiz-results__score strong {
    color: #1546d8;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 950;
    line-height: 1;
}
.quiz-results__score span {
    color: #5f6f86;
    font-weight: 850;
}
.quiz-results__stats {
    margin: 14px 0 0;
    padding: 15px;
    border: 1px solid #e3e9f2;
    border-radius: 16px;
    background: #fbfcfe;
}
.quiz-results__wrong {
    margin-top: 24px;
}
.quiz-results__wrong-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.quiz-results__wrong-head span {
    color: #8a95a6;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.quiz-results__wrong-head h2 {
    margin: 2px 0 0;
    color: #2e3c52;
    font-size: 1.2rem;
    font-weight: 950;
}
.quiz-results__wrong-head > strong {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #fff0f0;
    color: #d63c3c;
    font-weight: 950;
}
.quiz-wrong-list {
    display: grid;
    gap: 12px;
}
.quiz-wrong-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, .85fr);
    gap: 12px;
    padding: 15px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    background: #fff;
}
.quiz-wrong-item__head {
    min-width: 0;
}
.quiz-wrong-item__head span {
    display: block;
    margin-bottom: 4px;
    color: #8a95a6;
    font-size: .7rem;
    font-weight: 850;
}
.quiz-wrong-item__head strong {
    display: block;
    overflow-wrap: anywhere;
    color: #34445b;
    font-size: .92rem;
    font-weight: 900;
}

.quiz-wrong-item__listen {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    width: max-content;
    min-height: 36px;
    margin-top: 10px;
    padding: 7px 11px;
    border: 1px solid #bcd4f5;
    border-radius: 10px;
    background: #f3f8ff;
    color: #1858b8;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease,
        transform .16s ease;
}
.quiz-wrong-item__listen:hover,
.quiz-wrong-item__listen:focus-visible {
    border-color: #79a8ea;
    background: #eaf3ff;
    color: #0f479c;
    outline: none;
}
.quiz-wrong-item__listen:focus-visible {
    box-shadow: 0 0 0 3px rgba(21, 70, 216, .13);
}
.quiz-wrong-item__listen:active {
    transform: translateY(1px);
}
.quiz-wrong-item__listen.is-playing {
    border-color: #1546d8;
    background: #1546d8;
    color: #fff;
}
.quiz-wrong-item__listen-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    pointer-events: none;
}
.quiz-wrong-item__listen-icon[hidden] {
    display: none !important;
}
.quiz-wrong-item__answer {
    min-width: 0;
    padding: 10px 11px;
    border-radius: 11px;
}
.quiz-wrong-item__answer small {
    display: block;
    margin-bottom: 3px;
    font-size: .68rem;
    font-weight: 900;
}
.quiz-wrong-item__answer p {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .85rem;
    font-weight: 800;
    line-height: 1.45;
}
.quiz-wrong-item__answer.is-wrong {
    background: #fff2f2;
    color: #ad3434;
}
.quiz-wrong-item__answer.is-correct {
    background: #f2faec;
    color: #347a04;
}
.quiz-results__perfect {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #cbe8ad;
    border-radius: 16px;
    background: #f3faec;
    text-align: center;
}
.quiz-results__perfect strong {
    display: block;
    color: #397f07;
    font-size: 1.1rem;
    font-weight: 950;
}
.quiz-results__perfect p {
    margin: 4px 0 0;
    color: #668052;
    font-weight: 700;
}
.quiz-results__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}
.quiz-results__actions .quiz-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
@media (max-width: 720px) {
    .quiz-learning-progress {
        margin-top: 4px;
        padding: 12px;
    }
    .quiz-learning-progress__head {
        align-items: flex-start;
    }
    .quiz-learning-progress__head > div {
        display: grid;
        gap: 1px;
    }
    .quiz-learning-progress__stats,
    .quiz-results__stats {
        gap: 5px;
    }
    .quiz-learning-progress__stats > span,
    .quiz-results__stats > span {
        display: grid;
        gap: 1px;
        justify-items: center;
    }
    .quiz-wrong-item {
        grid-template-columns: 1fr;
    }
    .quiz-results__card {
        padding: 18px 14px;
        border-radius: 18px;
    }
    .quiz-results__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .quiz-results__actions .quiz-action {
        width: 100%;
    }
}

/* ==========================================================================\n   QUIZ V3 — Grammar Question Bank runner\n   ========================================================================== */
.quiz-grammar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}
.quiz-grammar-meta[hidden] { display: none; }
.quiz-grammar-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #dbe5f3;
    border-radius: 999px;
    background: #f7faff;
    color: #496078;
    font-size: .75rem;
    font-weight: 800;
}
.quiz-hint {
    margin: -4px 0 16px;
    padding: 10px 12px;
    border-left: 3px solid #1cb0f6;
    border-radius: 8px;
    background: #f2f9ff;
    color: #51667d;
    font-size: .86rem;
    font-weight: 700;
}
.quiz-text-answer {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}
.quiz-text-answer[hidden] { display: none; }
.quiz-text-answer label {
    color: #4c5d73;
    font-size: .82rem;
    font-weight: 900;
}
.quiz-text-answer textarea {
    width: 100%;
    min-height: 112px;
    resize: vertical;
    padding: 14px 15px;
    border: 2px solid #dce3ed;
    border-radius: 14px;
    background: #fff;
    color: #25324a;
    font: inherit;
    line-height: 1.5;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.quiz-text-answer textarea:focus {
    border-color: #6aa8ff;
    box-shadow: 0 0 0 4px rgba(21, 70, 216, .08);
}
.quiz-text-answer textarea:disabled {
    background: #f5f7fa;
    color: #66758a;
}
.quiz-matching {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}
.quiz-matching[hidden] { display: none; }
.quiz-matching__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #fff;
}
.quiz-matching__left {
    color: #30415b;
    font-weight: 800;
}
.quiz-matching__arrow {
    color: #97a4b7;
    text-align: center;
    font-weight: 900;
}
.quiz-matching select {
    width: 100%;
    min-height: 44px;
    padding: 8px 34px 8px 10px;
    border: 2px solid #dce3ed;
    border-radius: 10px;
    background: #fff;
    color: #30415b;
    font: inherit;
    font-weight: 700;
}
.quiz-option__meta {
    margin-left: auto;
    color: #8190a5;
    font-size: .72rem;
    font-weight: 800;
}
@media (max-width: 640px) {
    .quiz-matching__row {
        grid-template-columns: 1fr;
    }
    .quiz-matching__arrow {
        transform: rotate(90deg);
    }
}
