﻿/* «Работа над ошибками» button */
.btn-mistakes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.38);
    color: #fecaca;
}
.btn-mistakes.is-hot {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28), 0 0 18px rgba(239, 68, 68, 0.22);
}
.btn-mistakes .mistakes-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
body.theme-light .btn-mistakes .mistakes-count { color: #fff; }
body.theme-light .btn-mistakes {
    background: rgba(239, 68, 68, 0.13);
    border-color: rgba(239, 68, 68, 0.34);
    color: #b91c1c;
}
body.theme-light .btn-mistakes.is-hot {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.22), 0 0 16px rgba(220, 38, 38, 0.16);
}

/* «Продолжить задачу» — quiet resume CTA pinned above the primary button.
   Shown only when a pending task is stashed in localStorage. */
.btn-resume {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--accent, #37aee2);
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent, #37aee2) 10%, transparent);
    color: var(--text, #fff);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.btn-resume:active { transform: scale(0.99); }
.btn-resume:hover  { background: color-mix(in srgb, var(--accent, #37aee2) 16%, transparent); }
.collapsible-trainer-action {
    box-sizing: border-box;
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: scale(0.995);
    transform-origin: center;
    filter: blur(3px);
    transition:
        max-height 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 1.15s ease 0.18s,
        transform 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.18s,
        filter 1.15s ease 0.18s;
}
.collapsible-trainer-action.is-visible {
    max-height: 88px;
    border-width: 1px;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    filter: blur(0);
}
.btn-resume.collapsible-trainer-action.is-visible {
    margin-bottom: 10px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.btn-mistakes.collapsible-trainer-action.is-visible {
    margin-bottom: 0 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    transition:
        max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 1.35s ease 0.32s,
        transform 1.35s cubic-bezier(0.16, 1, 0.3, 1) 0.32s,
        filter 1.35s ease 0.32s;
}
.btn-resume .resume-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent, #37aee2);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.btn-resume .resume-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    pointer-events: none;
}
.btn-resume .resume-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.btn-resume .resume-title {
    font-size: 15px;
    font-weight: 600;
}
.btn-resume .resume-sub {
    font-size: 12px;
    opacity: 0.7;
}

.trainer-hero {
    width: 100%;
    min-height: 92px;
    margin: 0 0 12px;
    padding: 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-soft));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    box-shadow: 0 12px 28px rgba(30, 111, 255, 0.28);
    cursor: pointer;
}
.trainer-hero-copy,
.trainer-soon-copy,
.trainer-mode-card {
    min-width: 0;
}
.trainer-hero-title,
.trainer-mode-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
}
.trainer-hero-sub,
.trainer-mode-sub {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.25;
}
.trainer-hero-play {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.trainer-hero-play img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    pointer-events: none;
}
.trainer-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0 12px;
}
.trainer-mode-card,
.trainer-exam-card {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text);
    padding: 15px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.trainer-mode-card:active,
.trainer-exam-card:active,
.trainer-hero:active {
    transform: scale(0.98);
}
.trainer-mode-wide {
    grid-column: 1 / -1;
}
.trainer-mode-card .trainer-mode-sub,
.trainer-exam-card .trainer-mode-sub {
    color: var(--text-hint);
}
.trainer-soon-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.trainer-exam-card {
    min-width: 0;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    min-height: 72px;
    padding: 12px 11px;
}
.trainer-soon-copy {
    display: block;
    min-width: 0;
}
.trainer-exam-card .trainer-mode-title {
    font-size: 15px;
    line-height: 1.12;
}
.trainer-exam-card .trainer-mode-sub {
    font-size: 12px;
    line-height: 1.22;
}
.trainer-soon {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.trainer-live {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}
.trainer-section-title {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}
.trainer-panel {
    margin-top: 16px;
}
.trainer-panel.is-loading {
    pointer-events: none;
    opacity: 0.72;
}
.trainer-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.trainer-panel-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--card-border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.exam-variant-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.exam-variant-empty {
    grid-column: 1 / -1;
}
.exam-variant-card {
    width: 100%;
    min-width: 0;
    min-height: 190px;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background:
        radial-gradient(circle at 95% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 38%),
        var(--card-bg);
    color: var(--text);
    padding: 13px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 24px color-mix(in srgb, #000 18%, transparent);
}
.exam-variant-card:active {
    transform: scale(0.99);
}
.exam-variant-body {
    min-height: 164px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 11px;
}
.exam-variant-heading {
    display: grid;
    gap: 7px;
    align-content: start;
}
.exam-variant-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 850;
    line-height: 1.14;
    text-wrap: balance;
}
.exam-variant-meta,
.exam-variant-result,
.exam-variant-empty {
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.35;
}
.exam-variant-meta-grid {
    display: grid;
    gap: 8px;
}
.exam-variant-meta-row {
    display: grid;
    gap: 3px;
}
.exam-variant-meta-label {
    color: var(--text-hint);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-transform: uppercase;
}
.exam-variant-meta-value {
    color: var(--text);
    font-size: 12.5px;
    font-weight: 750;
    line-height: 1.15;
}
.exam-difficulty {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.exam-difficulty-dot {
    width: 12px;
    height: 7px;
    box-sizing: border-box;
    border: 1.5px solid rgba(148, 163, 184, 0.72);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}
body.theme-light .exam-difficulty-dot {
    border-color: rgba(51, 65, 85, 0.38);
    background: rgba(51, 65, 85, 0.04);
}
.exam-difficulty-1 .exam-difficulty-dot.filled,
.exam-difficulty-2 .exam-difficulty-dot.filled {
    border-color: #00b894;
    background: #00b894;
}
.exam-difficulty-3 .exam-difficulty-dot.filled,
.exam-difficulty-4 .exam-difficulty-dot.filled {
    border-color: #f59e0b;
    background: #f59e0b;
}
.exam-difficulty-5 .exam-difficulty-dot.filled {
    border-color: #ff5f57;
    background: #ff5f57;
}
.exam-variant-result {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}
.exam-variant-result.is-empty {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
}
.exam-variant-result.is-scored {
    border: 1px solid color-mix(in srgb, var(--success) 24%, var(--card-border));
    background: color-mix(in srgb, var(--success) 9%, transparent);
    color: var(--success);
}
.exam-variant-badge {
    justify-self: start;
    padding: 6px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}
.exam-variant-footer {
    display: flex;
    align-self: end;
}
@media (max-width: 340px) {
    .exam-variant-list {
        gap: 8px;
    }
    .exam-variant-card {
        padding: 10px;
        min-height: 184px;
    }
    .exam-variant-title {
        font-size: 13px;
    }
    .exam-variant-meta-value,
    .exam-variant-result,
    .exam-variant-empty {
        font-size: 11px;
    }
    .exam-difficulty-dot {
        width: 10px;
    }
}
.exam-variant-card.is-done .exam-variant-badge {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}
.exam-variant-card.is-active .exam-variant-badge {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}
.exam-intro-shell {
    display: grid;
    gap: 14px;
    padding-bottom: calc(24px + var(--app-safe-bottom, 0px));
}
.exam-intro-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.exam-intro-heading {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.exam-intro-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.08;
    font-weight: 900;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
.exam-intro-heading span {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 750;
}
.exam-intro-card,
.exam-intro-history {
    display: grid;
    gap: 14px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.26s ease, transform 0.26s ease;
}
.exam-intro-shell.is-loading .exam-intro-card,
.exam-intro-shell.is-loading .exam-intro-history {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}
.exam-intro-shell.is-ready .exam-intro-card,
.exam-intro-shell.is-ready .exam-intro-history {
    opacity: 1;
    transform: translateY(0);
}
.exam-intro-card {
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: var(--card-bg);
    padding: 16px;
}
.exam-intro-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.exam-intro-title {
    color: var(--text);
    font-size: clamp(16px, 4.8vw, 18px);
    font-weight: 950;
    line-height: 1.15;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
.exam-intro-meta {
    margin-top: 4px;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 750;
}
.exam-intro-difficulty {
    display: grid;
    gap: 5px;
    justify-items: end;
    margin-top: 3px;
}
.exam-intro-difficulty span {
    color: var(--text-hint);
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-transform: uppercase;
}
.exam-intro-rules {
    margin-top: 4px;
    display: grid;
    gap: 8px;
}
.exam-intro-rule {
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--card-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    padding: 11px 12px;
}
.exam-intro-rule strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 1.2;
}
.exam-intro-rule span {
    display: block;
    margin-top: 4px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.35;
}
.exam-intro-start {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}
.exam-intro-start:disabled {
    cursor: wait;
    opacity: 0.72;
}
.exam-intro-error {
    margin-top: 12px;
    border: 1px solid #ef4444;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.14);
    color: #ff6b6b;
    padding: 12px;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
    text-align: center;
}
.exam-intro-error[hidden] {
    display: none;
}
.exam-intro-history-list {
    display: grid;
    gap: 8px;
}
.exam-intro-history-item {
    width: 100%;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text);
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.exam-intro-history-item.is-grade-low {
    border-color: color-mix(in srgb, var(--error) 48%, var(--card-border));
    background: color-mix(in srgb, var(--error) 8%, var(--card-bg));
}
.exam-intro-history-item.is-grade-mid {
    border-color: color-mix(in srgb, var(--warning) 48%, var(--card-border));
    background: color-mix(in srgb, var(--warning) 8%, var(--card-bg));
}
.exam-intro-history-item.is-grade-high {
    border-color: color-mix(in srgb, var(--success) 44%, var(--card-border));
    background: color-mix(in srgb, var(--success) 8%, var(--card-bg));
}
.exam-intro-history-item.is-best {
    border-color: color-mix(in srgb, #f6c343 68%, var(--card-border));
    background:
        linear-gradient(135deg, color-mix(in srgb, #f6c343 15%, transparent), transparent 48%),
        var(--card-bg);
    box-shadow: 0 10px 24px color-mix(in srgb, #f6c343 12%, transparent);
}
.exam-intro-history-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.exam-intro-history-item strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.2;
}
.exam-intro-history-crown {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 5px;
    border-radius: 999px;
    background: #f6c343;
    color: #2a1900;
    font-size: 12px;
    line-height: 1;
    vertical-align: -2px;
    box-shadow: 0 6px 14px color-mix(in srgb, #f6c343 28%, transparent);
}
.exam-intro-history-item small {
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 750;
}
.exam-intro-history-item em {
    flex: 0 0 auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
    padding: 5px 8px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}
.exam-attempt-shell {
    display: grid;
    gap: 14px;
    padding-bottom: calc(24px + var(--app-safe-bottom, 0px));
}
#screen-exam-attempt.is-starting .exam-attempt-shell {
    min-height: calc(100vh - var(--bottom-nav-height, 0px) - var(--app-safe-top, 0px));
    place-content: center;
    padding: 24px 0 calc(24px + var(--app-safe-bottom, 0px));
}
#screen-exam-attempt.is-starting .exam-attempt-topbar,
#screen-exam-attempt.is-starting .exam-attempt-number-strip,
#screen-exam-attempt.is-starting .exam-attempt-note,
#screen-exam-attempt.is-starting .exam-attempt-review,
#screen-exam-attempt.is-starting .exam-attempt-result,
#screen-exam-attempt.is-starting .ref-fab,
#screen-exam-attempt.is-starting .draft-fab {
    display: none !important;
}
#screen-exam-attempt.is-starting .exam-attempt-current-task {
    width: min(100%, 340px);
    margin: 0 auto;
}
#screen-exam-attempt.is-limit-error .exam-attempt-shell {
    min-height: calc(100vh - var(--bottom-nav-height, 0px) - var(--app-safe-top, 0px));
    place-content: center;
    padding: 24px 0 calc(24px + var(--app-safe-bottom, 0px));
}
#screen-exam-attempt.is-limit-error .exam-attempt-topbar,
#screen-exam-attempt.is-limit-error .exam-attempt-number-strip,
#screen-exam-attempt.is-limit-error .exam-attempt-note,
#screen-exam-attempt.is-limit-error .exam-attempt-review,
#screen-exam-attempt.is-limit-error .exam-attempt-result,
#screen-exam-attempt.is-limit-error .ref-fab,
#screen-exam-attempt.is-limit-error .draft-fab {
    display: none !important;
}
#screen-exam-attempt.is-limit-error .exam-attempt-current-task {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}
.exam-attempt-limit-message {
    width: min(100%, 340px);
    margin: 0 auto;
    border: 1px solid color-mix(in srgb, var(--error) 38%, var(--card-border));
    border-radius: 18px;
    background: color-mix(in srgb, var(--error) 7%, var(--card-bg));
    color: var(--error);
    padding: 24px 22px;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    display: grid;
    justify-items: center;
    gap: 16px;
}
.exam-attempt-limit-back {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, transparent);
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    min-width: 128px;
    min-height: 46px;
    padding: 12px 22px;
    box-shadow: 0 14px 26px color-mix(in srgb, var(--accent) 28%, transparent);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.exam-attempt-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: calc(-1 * var(--app-safe-top, 0px)) -12px 0;
    padding: calc(10px + var(--app-safe-top, 0px)) 12px 10px;
    background: var(--bg);
}
.exam-attempt-task-heading {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 2px;
    padding-right: 266px;
}
.exam-attempt-task-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(17px, 5vw, 22px);
    font-weight: 900;
    line-height: 1.08;
    min-width: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}
.exam-attempt-task-heading span {
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 750;
}
.exam-attempt-report {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 112, 87, 0.45);
    border-radius: 999px;
    background: rgba(255, 112, 87, 0.12);
    color: #ff7057;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.exam-attempt-report svg {
    width: 16px;
    height: 16px;
}
.exam-attempt-report:active {
    transform: scale(0.94);
    background: rgba(255, 112, 87, 0.18);
}
.exam-attempt-clock {
    flex: 0 0 118px;
    width: 118px;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--card-border);
    font-size: 13px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.exam-attempt-clock.is-warning {
    background: color-mix(in srgb, var(--error) 22%, var(--card-bg));
    color: #ffb4a8;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--error) 70%, var(--card-border)),
        0 0 0 3px color-mix(in srgb, var(--error) 14%, transparent);
}
.exam-attempt-top-controls {
    position: absolute;
    top: calc(10px + var(--app-safe-top, 0px));
    right: 12px;
    flex: 0 0 254px;
    width: 254px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.exam-attempt-submit-top {
    flex: 0 0 128px;
    width: 128px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    padding: 8px 12px;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 26%, transparent);
}
.exam-attempt-number-strip {
    display: flex;
    gap: 10px;
    margin: 0 -12px;
    padding: 2px 12px 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-color: color-mix(in srgb, var(--accent) 62%, var(--card-border)) color-mix(in srgb, var(--card-bg) 72%, transparent);
    scrollbar-width: thin;
}
.exam-attempt-number-strip::-webkit-scrollbar {
    height: 8px;
}
.exam-attempt-number-strip::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-bg) 72%, transparent);
}
.exam-attempt-number-strip::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 62%, var(--card-border));
}
.exam-attempt-number {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.exam-attempt-number.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.exam-attempt-number.is-answered:not(.is-active) {
    border-color: color-mix(in srgb, var(--success) 40%, var(--card-border));
    background: color-mix(in srgb, var(--success) 14%, var(--card-bg));
    color: var(--success);
}
#screen-exam-attempt .ref-fab {
    top: calc(var(--app-safe-top) + 140px);
}
#screen-exam-attempt .draft-fab {
    top: calc(var(--app-safe-top) + 300px);
}
.exam-attempt-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: var(--card-bg);
    padding: 16px;
}
.exam-attempt-label {
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.exam-attempt-timer {
    margin-top: 5px;
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}
.exam-attempt-pill {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.exam-attempt-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-right: 42px;
    color: var(--text-hint);
    font-size: 13px;
    line-height: 1.35;
}
.exam-attempt-note span {
    min-width: 0;
}
.exam-attempt-section-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}
.exam-attempt-current-task {
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: var(--card-bg);
    color: var(--text);
    padding: 20px;
    min-width: 0;
    overflow: visible;
}
.exam-attempt-task-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    min-width: 0;
}
.exam-attempt-current-title {
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}
.exam-attempt-current-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 650;
}
.exam-attempt-task-badges {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.exam-attempt-task-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-soft);
    font-size: 11px;
    font-weight: 900;
}
.exam-attempt-task-text {
    margin-top: 2px;
    min-width: 0;
}
.exam-attempt-task-image {
    margin-top: 14px;
}
.exam-attempt-answer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.48fr);
    gap: 10px;
    width: 100%;
    margin-top: 16px;
}
.exam-attempt-answer-input {
    min-width: 0;
    width: 100%;
    height: 54px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 72%, var(--card-bg));
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    outline: none;
}
.exam-attempt-answer-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.exam-attempt-answer-submit {
    min-width: 136px;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
.exam-attempt-answer-submit:disabled {
    opacity: 0.72;
}
.exam-attempt-answer-submit.is-saved {
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
    animation: examAnswerSaved 0.48s ease-out both;
}
.exam-attempt-upload {
    margin: 16px 0 0;
}
.exam-attempt-upload .upload-area {
    padding: 24px 14px;
}
.exam-attempt-upload .file-preview {
    margin-bottom: 10px;
}
.exam-attempt-saved-photos {
    margin: 10px 0;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 750;
}
.exam-attempt-saved-title {
    margin-bottom: 8px;
}
.exam-attempt-saved-preview-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.exam-attempt-saved-preview {
    position: relative;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
}
.exam-attempt-saved-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.exam-attempt-saved-preview-placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
        color-mix(in srgb, var(--card-bg) 82%, var(--bg));
    background-size: 180% 100%;
    animation: examSavedPreviewLoading 1s ease-in-out infinite;
}
.exam-attempt-saved-preview span {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(10, 20, 36, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}
@keyframes examSavedPreviewLoading {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}
.exam-attempt-photo-submit {
    width: 100%;
}
@keyframes examAnswerSaved {
    0% {
        transform: scale(0.98);
    }
    45% {
        transform: scale(1.035);
    }
    100% {
        transform: scale(1);
    }
}
.exam-attempt-options {
    display: grid;
    gap: 8px;
}
.exam-attempt-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 72%, var(--card-bg));
    color: var(--text);
    padding: 12px;
    font: inherit;
    font-weight: 750;
    text-align: left;
}
.exam-attempt-option.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, var(--card-bg));
}
.exam-attempt-part2-note {
    border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--card-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
    color: var(--text-hint);
    padding: 14px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
}
.exam-attempt-criteria {
    border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--card-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 7%, var(--card-bg));
    overflow: hidden;
}
.exam-attempt-criteria summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 11px 13px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    list-style: none;
}
.exam-attempt-criteria summary::-webkit-details-marker {
    display: none;
}
.exam-attempt-criteria summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.65;
    transition: transform 0.18s ease;
}
.exam-attempt-criteria[open] summary::after {
    transform: rotate(225deg);
}
.exam-attempt-criteria summary span:last-child {
    margin-left: auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent-soft);
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
}
.exam-attempt-criteria-list {
    display: grid;
    gap: 8px;
    padding: 0 13px 13px;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}
.exam-attempt-criteria-list div {
    border-top: 1px solid color-mix(in srgb, var(--card-border) 72%, transparent);
    padding-top: 8px;
}
.exam-attempt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.exam-attempt-loading {
    grid-column: 1 / -1;
    position: relative;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-hint);
    padding: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 750;
}
.exam-attempt-loading.is-error {
    border-color: color-mix(in srgb, var(--error) 42%, var(--card-border));
    color: var(--error);
}
.exam-attempt-retry {
    margin: 12px auto 0;
}
.exam-attempt-task {
    min-height: 118px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
    font-weight: 850;
    text-align: left;
    padding: 12px;
}
.exam-attempt-task.is-answered {
    border-color: color-mix(in srgb, var(--success) 42%, var(--card-border));
    background: color-mix(in srgb, var(--success) 12%, var(--card-bg));
}
.exam-attempt-task-main {
    display: grid;
    gap: 4px;
}
.exam-attempt-task-number {
    color: var(--text);
    font-size: 18px;
    line-height: 1;
}
.exam-attempt-task-title {
    min-height: 30px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.25;
}
.exam-attempt-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.exam-attempt-task-meta span,
.exam-attempt-task-status {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    min-height: 22px;
    padding: 4px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 850;
}
.exam-attempt-task-status {
    background: color-mix(in srgb, var(--text-muted) 16%, transparent);
    color: var(--text-hint);
}
.exam-attempt-task.is-answered .exam-attempt-task-status {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}
.exam-attempt-submit {
    margin-top: 4px;
}
.exam-attempt-review {
    display: grid;
    gap: 14px;
}
.exam-attempt-review-head {
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: var(--card-bg);
    padding: 14px;
}
.exam-attempt-review-subtitle {
    margin-top: 4px;
    color: var(--text-hint);
    font-size: 13px;
    line-height: 1.35;
}
.exam-attempt-review-list {
    display: grid;
    gap: 12px;
}
.exam-attempt-review-group {
    display: grid;
    gap: 8px;
}
.exam-attempt-review-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}
.exam-attempt-review-group-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 950;
}
.exam-attempt-review-group-count {
    border-radius: 999px;
    padding: 5px 9px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
    font-size: 11px;
    font-weight: 900;
}
.exam-attempt-review-group-list {
    display: grid;
    gap: 8px;
}
.exam-attempt-review-item {
    display: grid;
    gap: 7px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    padding: 10px 12px;
    color: var(--text);
}
.exam-attempt-review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.exam-attempt-review-title {
    font-size: 14px;
    font-weight: 900;
}
.exam-attempt-review-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 7px;
    background: color-mix(in srgb, var(--text-muted) 16%, transparent);
    color: var(--text-hint);
    font-size: 10px;
    font-weight: 900;
}
.exam-attempt-review-item.is-filled .exam-attempt-review-status {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}
.exam-attempt-review-answer {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.exam-attempt-review-empty {
    color: var(--text-hint);
}
.exam-attempt-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.exam-attempt-review-photo {
    position: relative;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: color-mix(in srgb, var(--card-bg) 76%, var(--text-muted));
}
.exam-attempt-review-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.exam-attempt-review-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--text-muted) 12%, transparent) 0%,
        color-mix(in srgb, var(--text-muted) 26%, transparent) 45%,
        color-mix(in srgb, var(--text-muted) 12%, transparent) 90%
    );
}
.exam-attempt-review-photo span {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(10, 18, 32, 0.78);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}
.exam-attempt-submit-final {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 18px;
    background: var(--accent);
    color: #fff;
    padding: 16px;
    font: inherit;
    font-size: 16px;
    font-weight: 950;
    box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 32%, transparent);
}
.exam-attempt-submit-final:disabled {
    opacity: 0.68;
}
.exam-attempt-result {
    display: grid;
    gap: 14px;
}
.exam-attempt-result-card {
    border: 1px solid var(--card-border);
    border-radius: 20px;
    background: var(--card-bg);
    padding: 18px;
    color: var(--text);
}
.exam-attempt-result-card.is-ready {
    border-color: color-mix(in srgb, var(--success) 34%, var(--card-border));
}
.exam-attempt-result-status {
    font-size: 20px;
    line-height: 1.15;
    font-weight: 950;
}
.exam-attempt-result-subtitle {
    margin-top: 8px;
    color: var(--text-hint);
    font-size: 13px;
    line-height: 1.35;
}
.exam-attempt-result-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 12px;
}
.exam-attempt-result-score strong {
    color: var(--accent);
    font-size: 32px;
    line-height: 1;
}
.exam-attempt-result-score span {
    color: var(--text-hint);
    font-size: 13px;
    font-weight: 800;
}
.exam-attempt-result-duration {
    margin-top: 8px;
    display: inline-flex;
    justify-self: start;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-soft);
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 900;
}
.exam-attempt-advice {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.exam-attempt-advice-toggle {
    width: 100%;
    min-height: 48px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--card-border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}
.exam-attempt-advice-toggle .ai-hint-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    flex: 0 0 auto;
}
.exam-attempt-advice-body {
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--card-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    color: var(--text);
    padding: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.exam-attempt-result-list {
    display: grid;
    gap: 8px;
}
.exam-attempt-result-row {
    display: grid;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    overflow: hidden;
}
.exam-attempt-result-row-main {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 10px 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.exam-attempt-result-row-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}
.exam-attempt-result-part {
    border-radius: 999px;
    padding: 3px 7px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent-soft);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}
.exam-attempt-result-row-feedback {
    margin-top: 3px;
    color: var(--text-hint);
    font-size: 12px;
    line-height: 1.3;
}
.exam-attempt-result-row-score {
    border-radius: 999px;
    padding: 5px 8px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}
.exam-attempt-result-row-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}
.exam-attempt-result-row-toggle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--card-border));
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    position: relative;
    flex: 0 0 auto;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.exam-attempt-result-row-toggle::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--accent-soft);
    border-bottom: 2px solid var(--accent-soft);
    transform: rotate(45deg);
}
.exam-attempt-result-row.is-open .exam-attempt-result-row-toggle {
    transform: rotate(180deg);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--card-border));
}
.exam-attempt-result-row.is-unanswered {
    border-color: color-mix(in srgb, var(--accent) 58%, var(--card-border));
}
.exam-attempt-result-row.is-unanswered .exam-attempt-result-row-score {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-soft);
}
.exam-attempt-result-row.is-zero .exam-attempt-result-row-score {
    background: color-mix(in srgb, var(--error) 12%, transparent);
    color: var(--error);
}
.exam-attempt-result-row.is-zero {
    border-color: color-mix(in srgb, var(--error) 58%, var(--card-border));
}
.exam-attempt-result-row.is-partial {
    border-color: color-mix(in srgb, var(--warning) 50%, var(--card-border));
}
.exam-attempt-result-row.is-partial .exam-attempt-result-row-score {
    background: color-mix(in srgb, var(--warning) 16%, transparent);
    color: var(--warning);
}
.exam-attempt-result-row.is-full {
    border-color: color-mix(in srgb, var(--success) 44%, var(--card-border));
}
.exam-attempt-result-row.is-full .exam-attempt-result-row-score {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}
.exam-attempt-result-details {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--card-border);
    padding: 12px;
}
.exam-attempt-result-zappi-btn {
    margin: 0;
    height: 48px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(30, 111, 255, 0.18);
}
.exam-attempt-result-detail-block {
    display: grid;
    gap: 4px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}
.exam-attempt-result-detail-label {
    color: var(--text-hint);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.exam-attempt-result-solution-text {
    color: var(--text);
}
.exam-attempt-result-task-text {
    color: var(--text);
}
.exam-attempt-result-task-img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}
.exam-attempt-result-solution-img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}
@media (max-width: 380px) {
    .exam-attempt-clock {
        flex-basis: 104px;
        width: 104px;
        font-size: 12px;
        padding-inline: 8px;
    }
    .exam-attempt-topbar {
        gap: 8px;
    }
    .exam-attempt-top-controls {
        top: calc(10px + var(--app-safe-top, 0px));
        flex-basis: 222px;
        width: 222px;
        gap: 6px;
    }
    .exam-attempt-submit-top {
        flex-basis: 112px;
        width: 112px;
        min-height: 32px;
        padding: 8px 9px;
        font-size: 10px;
    }
    .exam-attempt-task-heading {
        padding-right: 230px;
    }
    .exam-attempt-answer-row {
        grid-template-columns: minmax(0, 1fr) minmax(126px, 0.5fr);
        gap: 8px;
    }
    .exam-attempt-answer-submit {
        min-width: 128px;
        font-size: 12px;
    }
}
body.trainer-intro.trainer-loading #screen-categories > .home-status-bar,
body.trainer-intro.trainer-loading #screen-categories > .xp-progress-card,
body.trainer-intro.trainer-loading #screen-categories > .trainer-hero,
body.trainer-intro.trainer-loading #screen-categories > .trainer-mode-grid,
body.trainer-intro.trainer-loading #screen-categories > .trainer-soon-grid,
body.trainer-intro.trainer-loading #screen-categories > .trainer-panel,
body.trainer-intro.trainer-loading #screen-categories > .home-bottom-nav {
    opacity: 0;
    transform: translateY(8px);
}
body.trainer-intro.trainer-ready #screen-categories > .home-status-bar,
body.trainer-intro.trainer-ready #screen-categories > .xp-progress-card,
body.trainer-intro.trainer-ready #screen-categories > .trainer-hero,
body.trainer-intro.trainer-ready #screen-categories > .trainer-mode-grid,
body.trainer-intro.trainer-ready #screen-categories > .trainer-soon-grid,
body.trainer-intro.trainer-ready #screen-categories > .trainer-panel,
body.trainer-intro.trainer-ready #screen-categories > .home-bottom-nav {
    animation: trainerBlockIn 0.34s ease-out both;
}
body.trainer-intro.trainer-ready #screen-categories > .xp-progress-card { animation-delay: 0.04s; }
body.trainer-intro.trainer-ready #screen-categories > .trainer-hero { animation-delay: 0.08s; }
body.trainer-intro.trainer-ready #screen-categories > .trainer-mode-grid { animation-delay: 0.14s; }
body.trainer-intro.trainer-ready #screen-categories > .trainer-soon-grid { animation-delay: 0.18s; }
body.trainer-intro.trainer-ready #screen-categories > .trainer-panel { animation-delay: 0.2s; }
body.trainer-intro.trainer-ready #screen-categories > .home-bottom-nav { animation-delay: 0.22s; }

.home-status-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
    margin: 0 -16px 22px;
    padding: 8px 16px;
    background: var(--bg);
}
.home-status-bar > * {
    min-width: 0;
}
.subject-switcher-wrap {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: flex-start;
}
.subject-switcher {
    flex: 0 0 auto;
    width: auto;
    min-width: 36px;
    height: 30px;
    min-height: 30px;
    padding: 0 6px 0 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}
.subject-switcher:disabled {
    cursor: default;
    opacity: 1;
}
.subject-icon {
    width: 28px;
    height: 28px;
    display: block;
    flex: 0 0 26px;
    object-fit: contain;
}
.subject-grade-label {
    display: inline-block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.subject-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 80;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--bg-secondary);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}
.subject-menu button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.subject-menu button:active {
    background: var(--card-bg);
}
.home-status-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    min-width: 52px;
    height: 30px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.home-status-item.stat-streak-value {
    display: inline-flex;
}
.home-status-item.is-metric-animating,
.xp-progress-card.is-metric-animating {
    animation: metricPop 0.42s ease-out both;
}
.home-status-item .stat-ico,
.home-status-item .stat-flame {
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 26px;
    min-height: 26px;
}
.home-status-item.stat-streak-value .stat-flame {
    filter: drop-shadow(0 0 7px rgba(255, 145, 0, 0.65));
}
.home-status-item.stat-streak-value .flame-outer {
    fill: #ff6d00;
}
.home-status-item.stat-streak-value .flame-mid {
    fill: #ff9a26;
}
.home-status-item.stat-streak-value .flame-inner {
    fill: #ffd54f;
}
.crystal-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(47, 128, 237, 0.35));
}
.xp-progress-card {
    margin: -12px 0 16px;
}
.xp-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 700;
}
.xp-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-hint) 18%, transparent);
}
.xp-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f80ed, #56ccf2);
    box-shadow: 0 0 14px rgba(47, 128, 237, 0.45);
    transition: width 2.4s cubic-bezier(0.2, 0.85, 0.2, 1);
}
@keyframes metricPop {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
