/*
 * 试卷页 app 版 (App\Support\PaperAppUi, papers-show-app): only the preview
 * accounts load this, over paper-ui-a.css. Reworked step by step with the owner.
 *
 * Step 1 (2026-11-16): 练习模式 is plain white. No cream page behind the card
 * and no cream tiles: the options are white with a light grey outline.
 * Light theme only; dark mode stays as it is.
 */
:root:not([data-theme="dark"]) body.pui-app.is-practice {
    --pa-bg: #ffffff;
    --pa-soft: #ffffff;
    --pa-soft-hover: #f7f7f7;
    --pa-line: #ececec;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option {
    box-shadow: inset 0 0 0 1.5px #e8e8e8;
}
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option:has(:checked),
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option.is-correct,
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option.is-wrong {
    box-shadow: none;
}
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option-letter {
    box-shadow: inset 0 0 0 1.5px #e8e8e8;
}
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option:has(:checked) .paper-option-letter,
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option.is-correct .paper-option-letter,
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-option.is-wrong .paper-option-letter {
    box-shadow: none;
}
:root:not([data-theme="dark"]) body.pui-app.is-practice .pm-sound,
:root:not([data-theme="dark"]) body.pui-app.is-practice .pm-progress { background: #f2f2f2; }

/*
 * Step 2 (2026-11-16): 练习模式 has one header row, in this order:
 * back, n/40 pill, progress bar, sound, language. The title, timer,
 * full-screen button, the thin progress line under the header and the
 * streak are hidden while practising (exam mode and the start screen keep
 * the header as it is). #pmTop sits in the header in papers-show-app.
 */
body.pui-app.is-practice .content-header { gap: 10px; padding: 0 14px; }
body.pui-app.is-practice .content-header h1,
body.pui-app.is-practice #timerControl,
body.pui-app.is-practice .header-fullscreen-btn,
body.pui-app.is-practice .pm-streak { display: none !important; }
body.pui-app.is-practice .content-header::after { display: none; }
body.pui-app .content-header .pm-top { flex: 1; min-width: 0; gap: 10px; margin: 0; }
body.pui-app .content-header .pm-top[hidden] { display: none; }
body.pui-app.is-practice .content-header .icon-btn:first-child { flex: none; }
body.pui-app.is-practice .paper-progress-pill { flex: none; }
body.pui-app.is-practice .content-header-actions { flex: none; }

/* Step 3 (2026-11-16): the language button looks like the sound button (grey, 36px, 12px corners),
   also when the questions are translated (was peach). The "EN" code stays beside the icon. */
body.pui-app.is-practice .translate-btn,
body.pui-app.is-practice .translate-control.is-translated .translate-btn {
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.is-practice .translate-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
/* Icon only, the same square as the sound button (the language code is not shown). */
body.pui-app.is-practice .translate-btn { width: 36px; padding: 0; justify-content: center; }
body.pui-app.is-practice .translate-btn-code { display: none; }

/*
 * Step 4 (2026-11-16): on phones the language menu is a bottom sheet: full
 * width, stuck to the bottom, rounded top with a grab handle. It slides up
 * over a dimmed page; tapping the dimmed page closes it (paper-header.js
 * closes the menu on any tap outside it). Larger screens keep the dropdown.
 */
.pa-sheet-handle,
.pa-sheet-backdrop { display: none; }
@media all {
    body.pui-app .pa-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 205;
        background: rgba(0, 0, 0, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    body.pui-app:has(.translate-control.open) .pa-sheet-backdrop { opacity: 1; pointer-events: auto; }

    body.pui-app .translate-menu.paper-lang-menu {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: 85vh;
        padding: 8px 0 calc(16px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 22px 22px 0 0;
        background: var(--pa-card, #fff);
        box-shadow: none;
        opacity: 1;
        transform: translateY(105%);
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
        visibility: hidden;
        z-index: 210;
    }
    body.pui-app .translate-control.open .translate-menu.paper-lang-menu {
        transform: translateY(0);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1);
        visibility: visible;
    }
    /* Stays visible while it slides away, hidden only after. */
    body.pui-app .translate-menu.paper-lang-menu { transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s; }
    body.pui-app .translate-control.open .translate-menu.paper-lang-menu { transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s; }

    body.pui-app .pa-sheet-handle { display: block; width: 40px; height: 5px; margin: 2px auto 10px; border-radius: 999px; background: #e2e2e2; }
    body.pui-app .paper-lang-menu .translate-group-label { padding: 0 20px 6px; font-size: 15px; font-weight: 700; color: var(--pa-ink); }
    body.pui-app .paper-lang-list { gap: 8px; padding: 6px 16px 10px; }
    body.pui-app .paper-lang-opt { padding: 15px 16px; border-radius: 14px; font-size: 15.5px; }
    body.pui-app .paper-lang-both { padding: 8px 20px 0; }

    /* (The options' rise-in lives in Step 52 now: once per opening, see .pa-enter.) */
}
@keyframes pa-sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    body.pui-app .translate-menu.paper-lang-menu,
    body.pui-app .pa-sheet-backdrop { transition: none !important; }
}

/*
 * Step 5 (2026-11-16): leaving a practice asks first (js/paper-app.js). The
 * phone's back button or the ✕ (the back arrow becomes ✕ while practising)
 * opens a full-screen dark, blurred layer: "要退出这次练习吗？", progress is
 * saved, 继续练习 / 退出.
 */
.pa-back-close { display: none; }
body.pui-app.is-practice .pa-back .pa-back-arrow { display: none; }
body.pui-app.is-practice .pa-back .pa-back-close { display: inline-block; }

.pa-leave {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
    background: rgba(12, 12, 14, 0.55);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.pa-leave[hidden] { display: none; }
.pa-leave.is-on { opacity: 1; }
.pa-leave-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 360px;
    color: #fff;
    text-align: center;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-leave.is-on .pa-leave-box { transform: none; }
.pa-leave-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    --icon-size: 32px;
    font-size: 32px;
}
.pa-leave h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.35; }
.pa-leave p { margin: 8px 0 28px; color: rgba(255, 255, 255, 0.75); font-size: 15px; line-height: 1.55; }
.pa-leave-stay,
.pa-leave-go {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
.pa-leave-stay { background: #fff; color: #23232b; }
.pa-leave-go { margin-top: 10px; background: transparent; color: rgba(255, 255, 255, 0.85); }
.pa-leave-stay:active,
.pa-leave-go:active { transform: scale(0.98); }
.pa-leave-go:hover { background: rgba(255, 255, 255, 0.08); }
@media (prefers-reduced-motion: reduce) {
    .pa-leave,
    .pa-leave-box { transition: none; }
}

/* The ✕ while practising: the same grey square as the sound and language buttons. */
body.pui-app.is-practice .pa-back {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.is-practice .pa-back .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }

/*
 * Step 6 (2026-11-16): the 练习模式 header is ✕, ⚙, progress bar. Sound and
 * question language moved into one settings sheet that ⚙ opens: the language
 * menu (now a bottom sheet at every width, centred and at most 480px wide on
 * large screens) with a "设置" title and a sound switch on top. Outside
 * practice the menu is just the language list.
 */
.pa-settings-btn,
.pa-sheet-title,
.pa-sound-row { display: none; }
body.pui-app.is-practice .paper-progress-pill,
body.pui-app.is-practice .pm-sound,
body.pui-app.is-practice .translate-btn { display: none !important; }
body.pui-app.is-practice .pa-settings-btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.is-practice .pa-settings-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pui-app.is-practice .pa-sheet-title { display: block; padding: 0 20px 8px; color: var(--pa-ink); font-size: 18px; font-weight: 700; }
body.pui-app.is-practice .pa-sound-row { display: flex; padding: 8px 20px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--pa-line); }
body.pui-app.is-practice .paper-lang-menu .translate-group-label { padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--pa-muted); }
body.pui-app .translate-menu.paper-lang-menu { margin: 0 auto; max-width: 480px; }
@media (min-width: 721px) {
    body.pui-app .translate-menu.paper-lang-menu { border-radius: 22px 22px 0 0; }
}

/*
 * Step 7 (2026-11-16): while a practice is going (body.pa-practising, set by
 * js/paper-app.js until it is handed in) the bottom bar is one wide grey
 * 继续 that can't be tapped, like Duolingo. Answering slides the feedback
 * card (unchanged) up over it, with the live 继续. The AI Tutor, question
 * grid, next-unanswered and 交卷 buttons are hidden meanwhile: the last
 * answer hands the paper in by itself.
 */
.pa-bar-continue { display: none; }
body.pui-app.pa-practising .paper-bar > :not(.pa-bar-continue) { display: none !important; }
body.pui-app.pa-practising .paper-bar {
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #efefef;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}
body.pui-app.pa-practising .pa-bar-continue {
    display: block;
    width: 100%;
    max-width: 720px;
    height: 52px;
    margin: 0 auto;
    border: 0;
    border-radius: 16px;
    background: #ececec;
    color: #ababab;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: not-allowed;
}
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar { border-top-color: transparent; background: var(--pa-bg); }
:root[data-theme="dark"] body.pui-app.pa-practising .pa-bar-continue { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.35); }

/* Step 8 (2026-11-16): tapping the progress bar (its whole stretch of the header) opens the question-number sheet. */
body.pui-app.pa-practising .content-header .pm-top { align-self: stretch; cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.pui-app.pa-practising .content-header .pm-top:active .pm-progress { transform: scaleY(1.25); }
body.pui-app.pa-practising .content-header .pm-top:focus-visible { outline: 2px solid var(--pa-accent); outline-offset: -6px; border-radius: 12px; }
body.pui-app .content-header .pm-progress { transition: transform 0.15s ease; }

/* Step 9 (2026-11-16): the "做过 N 次 · 最近 · 最好" line is not shown at all in this version. */
body.pui-app #paperAttemptHistory { display: none !important; }

/*
 * Step 10 (2026-11-16): 继续 stays put in the bottom bar. Answering turns the
 * bar and its button the answer's colour (green / pink), and the card with
 * the verdict rises from behind the bar, sitting right on top of it (the
 * bar is the upper layer). --pa-bar-h is the bar's height (js/paper-app.js).
 */
body.pui-app.pa-practising .content-panel { position: relative; }
body.pui-app.pa-practising .paper-bar {
    position: relative;
    z-index: 32;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
body.pui-app.pa-practising .pa-bar-continue {
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.12s ease;
}
body.pui-app.pa-practising .pa-bar-continue[aria-disabled="false"] { cursor: pointer; }
body.pui-app.pa-practising .pa-bar-continue[aria-disabled="false"]:active { transform: scale(0.98); }
body.pui-app.pa-practising:has(#pmFeedback.is-open[data-kind="right"]) .paper-bar { border-top-color: transparent; background: #e6f4ec; }
body.pui-app.pa-practising:has(#pmFeedback.is-open[data-kind="wrong"]) .paper-bar { border-top-color: transparent; background: #fbe9ec; }
body.pui-app.pa-practising:has(#pmFeedback.is-open[data-kind="right"]) .pa-bar-continue { background: #8fd3ae; color: #134a2c; }
body.pui-app.pa-practising:has(#pmFeedback.is-open[data-kind="wrong"]) .pa-bar-continue { background: #f3c7d0; color: #6b1e30; }

/* The card: icon + verdict only, above the bar and under it in the stacking order, so it slides out from behind. */
body.pui-app.pa-practising .pm-feedback {
    bottom: var(--pa-bar-h, 76px);
    z-index: 31;
    flex-wrap: nowrap;
    padding: 18px 20px 6px;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
body.pui-app.pa-practising .pm-feedback-icon { width: 40px; height: 40px; --icon-size: 24px; font-size: 24px; }
:root[data-theme="dark"] body.pui-app.pa-practising:has(#pmFeedback.is-open) .paper-bar { background: var(--pa-bg); }

/* Step 11 (2026-11-16): no line along the top of the bottom bar; the verdict card rises with a little spring (overshoots, settles). */
body.pui-app.pa-practising .paper-bar { border-top: 0; }
body.pui-app.pa-practising .pm-feedback { transition: transform 0.5s cubic-bezier(0.34, 1.45, 0.64, 1); }
@media (prefers-reduced-motion: reduce) {
    body.pui-app.pa-practising .pm-feedback { transition: none; }
}
/* The card reaches 20px down behind the bar, so the overshoot never opens a gap above the bar. */
body.pui-app.pa-practising .pm-feedback { bottom: calc(var(--pa-bar-h, 76px) - 20px); padding-bottom: 26px; }
/*
 * Faster spring (0.32s), and no gap ever: the card now reaches all the way
 * down behind the bar (its bottom is the screen's bottom; the bar's height
 * is padding), so however far the spring overshoots, the bar still covers
 * the card's lower edge.
 */
body.pui-app.pa-practising .pm-feedback {
    bottom: 0;
    padding-bottom: calc(var(--pa-bar-h, 76px) + 6px);
    transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@media (prefers-reduced-motion: reduce) {
    body.pui-app.pa-practising .pm-feedback { transition: none; }
}

/* Step 12 (2026-11-16): a flag on the right of the verdict card reports the question; it takes the card's colour. */
.pa-feedback-flag { display: none; }
body.pui-app.pa-practising .pa-feedback-flag {
    display: grid;
    flex: none;
    place-items: center;
    align-self: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    opacity: 0.75;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}
body.pui-app.pa-practising .pa-feedback-flag .material-symbols-outlined { --icon-size: 22px; font-size: 22px; }
body.pui-app.pa-practising .pa-feedback-flag:hover,
body.pui-app.pa-practising .pa-feedback-flag:focus-visible { opacity: 1; }
body.pui-app.pa-practising .pm-feedback[data-kind="right"] .pa-feedback-flag:active { background: #c9ebd8; }
body.pui-app.pa-practising .pm-feedback[data-kind="wrong"] .pa-feedback-flag:active { background: #f6d6dd; }
body.pui-app.pa-practising .pa-feedback-flag.is-reported { opacity: 1; }
body.pui-app.pa-practising .pa-feedback-flag.is-reported .material-symbols-outlined { font-variation-settings: 'FILL' 1; }

/*
 * Step 13 (2026-11-16): the report form, simple version (partials/question-report-sheet with
 * reportSimple): a native-looking sheet — grab handle, title, five reasons as a plain list with a
 * tick, a small details box, the reward line as one quiet line, one wide 提交. Slides up; tapping
 * the dimmed page closes it (no 取消 button).
 */
.qr-simple .pp-sheet-panel {
    max-width: 520px;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    animation: qr-sheet-up 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.qr-simple .pp-sheet-dim { animation: qr-dim-in 0.25s ease; }
@keyframes qr-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes qr-dim-in { from { opacity: 0; } to { opacity: 1; } }
.qr-simple .qr-handle { display: block; width: 40px; height: 5px; margin: 2px auto 14px; border-radius: 999px; background: #e2e2e2; }
.qr-simple h3 { margin: 0 4px 10px; font-size: 18px; font-weight: 700; }
.qr-simple .qr-num { display: none; }
.qr-simple .qr-reasons { flex-direction: column; flex-wrap: nowrap; gap: 0; margin: 0 0 12px; }
.qr-simple .qr-reason { display: flex; align-items: center; min-height: 52px; padding: 0 6px; border-bottom: 1px solid #f1f1f1; }
.qr-simple .qr-reason:last-child { border-bottom: 0; }
.qr-simple .qr-reason span:not(.qr-tick) {
    flex: 1;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #23232b;
    font-size: 16px;
    font-weight: 500;
}
.qr-simple .qr-reason input:checked + span { border: 0; background: none; color: #c2510a; font-weight: 600; }
.qr-simple .qr-reason:active span:not(.qr-tick) { transform: none; }
.qr-simple .qr-reason:active { background: #fafafa; }
.qr-simple .qr-tick { --icon-size: 22px; color: #f26a1b; font-size: 22px; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.qr-simple .qr-reason input:checked ~ .qr-tick { opacity: 1; transform: none; }
.qr-simple .pp-field { margin-bottom: 10px; }
.qr-simple .pp-field > span { display: none; }
.qr-simple .pp-field textarea { padding: 12px 14px; border: 0; border-radius: 14px; background: #f4f4f4; font-size: 15px; }
.qr-simple .qr-reward { align-items: center; margin: 0 4px 12px; padding: 0; background: none; color: #8a8a8a; font-size: 12.5px; }
.qr-simple .qr-reward .material-symbols-outlined { --icon-size: 16px; font-size: 16px; color: #f2a07b; }
.qr-simple .pp-sheet-actions { display: block; }
.qr-simple .pp-sheet-actions .pp-btn.is-primary { width: 100%; height: 52px; border-radius: 16px; font-size: 16px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
    .qr-simple .pp-sheet-panel,
    .qr-simple .pp-sheet-dim { animation: none; }
}
:root[data-theme="dark"] .qr-simple .qr-reason { border-bottom-color: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .qr-simple .qr-reason span:not(.qr-tick) { color: var(--text, #eee); }
:root[data-theme="dark"] .qr-simple .pp-field textarea { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .qr-simple .qr-reason:active { background: rgba(255, 255, 255, 0.04); }
.qr-simple .qr-reason .qr-tick { display: inline-block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; }

/* Step 14 (2026-11-16): the report sheet slides back down when it closes (question-report.js adds .is-closing for 260ms). */
.qr-simple.is-closing .pp-sheet-panel { animation: qr-sheet-down 0.26s cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.qr-simple.is-closing .pp-sheet-dim { animation: qr-dim-out 0.26s ease forwards; }
@keyframes qr-sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes qr-dim-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .qr-simple.is-closing .pp-sheet-panel,
    .qr-simple.is-closing .pp-sheet-dim { animation: none; }
}

/* Step 15 (2026-11-16): while practising, the flag on the question itself is gone; reporting is the flag on the verdict card (which still uses that hidden button). */
body.pui-app.pa-practising .paper-question .paper-report-btn { display: none; }
body.pui-app.pa-practising .paper-question .paper-favorite-btn { margin-left: auto; }

/* Step 16 (2026-11-16): the answer + explanation box on a light grey rounded panel (the practice page is all white otherwise). */
:root:not([data-theme="dark"]) body.pui-app.is-practice .paper-answer {
    padding: 16px 18px;
    border-radius: 16px;
    background: #f4f4f5;
}

/*
 * Step 17 (2026-11-16): 问 AI. Before an answer the bottom bar is a white,
 * outlined "✦ 问 AI" (a secondary look, so it doesn't read as the main
 * step) in place of the grey 继续; once the answer is marked it swaps for
 * the coloured 继续. The verdict card has its own small "✦ 问 AI" beside
 * the flag (that one also sends what they picked and the right option).
 */
.pa-ask-ai,
.pa-feedback-ai { display: none; }
body.pui-app.pa-practising .paper-bar > #paAskAi {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 720px;
    height: 52px;
    margin: 0 auto;
    border: 1.5px solid #e6e6e6;
    border-radius: 16px;
    background: #fff;
    color: #33333d;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pui-app.pa-practising .paper-bar > #paAskAi .material-symbols-outlined { --icon-size: 20px; font-size: 20px; color: #f26a1b; font-variation-settings: 'FILL' 1; }
body.pui-app.pa-practising .paper-bar > #paAskAi:active { transform: scale(0.98); background: #fafafa; }
body.pui-app.pa-practising:has(#pmFeedback.is-open) .paper-bar > #paAskAi { display: none !important; }
body.pui-app.pa-practising:not(:has(#pmFeedback.is-open)) .paper-bar > #pmContinue { display: none !important; }

body.pui-app.pa-practising .pa-feedback-ai {
    display: inline-flex;
    flex: none;
    align-items: center;
    align-self: center;
    gap: 4px;
    height: 34px;
    padding: 0 12px 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: inherit;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}
body.pui-app.pa-practising .pa-feedback-ai .material-symbols-outlined { --icon-size: 16px; font-size: 16px; font-variation-settings: 'FILL' 1; }
body.pui-app.pa-practising .pa-feedback-ai:active { transform: scale(0.96); }
body.pui-app.pa-practising .pa-feedback-flag { margin-left: -2px; }
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi { border-color: rgba(255, 255, 255, 0.12); background: transparent; color: var(--text, #eee); }

/*
 * Step 18 (2026-11-16): the bar's 问 AI is a small input box (same size as
 * before): ✦, a text field, a round send button. Typing and sending asks the
 * AI Tutor straight away with this question quoted; sending it empty just
 * opens the tutor. The bar is transparent now, with a white fade above it,
 * so the question runs softly into it instead of stopping at an edge.
 */
body.pui-app.pa-practising .paper-bar { background: #fff; }
body.pui-app.pa-practising .paper-bar::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 36px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
body.pui-app.pa-practising:has(#pmFeedback.is-open) .paper-bar::before { display: none; }
body.pui-app.pa-practising .paper-bar > #paAskAi {
    gap: 6px;
    padding: 0 6px 0 14px;
    cursor: text;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:active { transform: none; background: #fff; }
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within { border-color: #f2a07b; }
body.pui-app.pa-practising .pa-ask-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #23232b;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    outline: none;
}
body.pui-app.pa-practising .pa-ask-input::placeholder { color: #9a9aa2; font-weight: 600; }
body.pui-app.pa-practising .pa-ask-send {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f26a1b;
    color: #fff;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pui-app.pa-practising .pa-ask-send .material-symbols-outlined { --icon-size: 20px; font-size: 20px; color: #fff; font-variation-settings: 'FILL' 0, 'wght' 600; }
body.pui-app.pa-practising .pa-ask-send:active { transform: scale(0.94); background: #e35d10; }
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar::before { background: linear-gradient(to bottom, transparent, var(--pa-bg)); }
:root[data-theme="dark"] body.pui-app.pa-practising .pa-ask-input { color: var(--text, #eee); }
body.pui-app.pa-practising .paper-bar > #paAskAi #paAskSend .material-symbols-outlined { color: #fff; font-variation-settings: 'FILL' 0, 'wght' 600; }

/*
 * Step 19 (2026-11-16): the 问 AI box when typing — a gradient ring in the
 * brand oranges that slowly turns (Cerdek orange → peach → pale apricot), and
 * a faint warm wash inside. No shadow, no purple. Resting state: the plain
 * grey hairline. The ring is the box's border-box background (padding-box white).
 */
@property --pa-ring { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
body.pui-app.pa-practising .paper-bar > #paAskAi {
    border: 1.5px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(#e6e6e6, #e6e6e6) border-box;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within {
    border-color: transparent;
    background:
        linear-gradient(100deg, #fff 30%, #fff6ef) padding-box,
        conic-gradient(from var(--pa-ring), #f26a1b, #ffa36b, #ffd9c2, #ffb38a, #f26a1b) border-box;
    animation: pa-ring-turn 3.2s linear infinite;
}
@keyframes pa-ring-turn { to { --pa-ring: 360deg; } }
body.pui-app.pa-practising .paper-bar > #paAskAi .pa-ask-icon { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within .pa-ask-icon { transform: rotate(18deg) scale(1.12); }
body.pui-app.pa-practising .paper-bar > #paAskAi #paAskSend { background: linear-gradient(135deg, #ff8a3d, #f26a1b); }
@media (prefers-reduced-motion: reduce) {
    body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within { animation: none; }
}
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi {
    background: linear-gradient(var(--pa-bg), var(--pa-bg)) padding-box, linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)) border-box;
}
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within {
    background: linear-gradient(var(--pa-bg), var(--pa-bg)) padding-box, conic-gradient(from var(--pa-ring), #f26a1b, #ffa36b, #ffd9c2, #ffb38a, #f26a1b) border-box;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within { border-width: 2px; padding-left: 13.5px; padding-right: 5.5px; }

/* Step 20 (2026-11-16): the verdict card's 问 AI is just the ✦ icon, styled exactly like the flag beside it. */
body.pui-app.pa-practising .pa-feedback-ai {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    gap: 0;
    border-radius: 12px;
    background: transparent;
    opacity: 0.75;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}
body.pui-app.pa-practising .pa-feedback-ai .material-symbols-outlined { --icon-size: 22px; font-size: 22px; font-variation-settings: 'FILL' 0; }
body.pui-app.pa-practising .pa-feedback-ai:hover,
body.pui-app.pa-practising .pa-feedback-ai:focus-visible { opacity: 1; }
body.pui-app.pa-practising .pa-feedback-ai:active { transform: none; }
body.pui-app.pa-practising .pm-feedback[data-kind="right"] .pa-feedback-ai:active { background: #c9ebd8; }
body.pui-app.pa-practising .pm-feedback[data-kind="wrong"] .pa-feedback-ai:active { background: #f6d6dd; }
body.pui-app.pa-practising .pa-feedback-flag { margin-left: -6px; }

/* Step 21 (2026-11-16): 同时显示原文 — the original first, as the main text; the picked language under it, quieter (paper-ui-a.css has it the other way round). */
body.pui-app .translate-mode-stacked .translate-block-original { order: 0; margin: 0; padding: 0; border: 0; color: inherit; font-size: 1em; }
body.pui-app .translate-mode-stacked .translate-block-translated { order: 1; margin: 0; padding-left: 10px; border-left: 2px solid var(--pa-line); color: var(--pa-muted); font-size: 0.92em; }

/*
 * Step 22 (2026-11-16): the AI Tutor, app version.
 * Phones: a bottom sheet (to 92% of the screen) that springs up over a
 * dimmed page — tap the dim, ✕ or the phone's back button to close; it
 * slides back down. Everywhere in this version: the long greeting becomes
 * ✦ + one line + three ready questions; the student's bubble is Cerdek
 * orange; the quote is a quiet grey card; messages rise in; the composer
 * matches the 问 AI box (grey hairline, turning orange ring while typing).
 */
body.pui-app .pa-tutor-dim { display: none; }
@media (max-width: 720px) {
    body.pui-app .pa-tutor-dim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 199;
        background: rgba(15, 15, 18, 0.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    body.pui-app:has(#tutorPanel:not(.collapsed)) .pa-tutor-dim { opacity: 1; pointer-events: auto; }

    body.pui-app .tutor-panel,
    body.pui-app .tutor-panel.collapsed {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        height: 92dvh;
        border-radius: 24px 24px 0 0;
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        opacity: 1;
        overflow: hidden;
    }
    body.pui-app .tutor-panel {
        transform: translateY(0);
        visibility: visible;
        transition: transform 0.42s cubic-bezier(0.32, 1.12, 0.48, 1), visibility 0s linear 0s;
    }
    body.pui-app .tutor-panel.collapsed {
        transform: translateY(102%);
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.3s;
    }
    /* The spring overshoots upwards: white below the sheet so no gap shows at the bottom edge. */
    body.pui-app .tutor-panel::after { content: ""; position: absolute; top: 100%; right: 0; left: 0; height: 40px; background: #fff; }
    body.pui-app .tutor-header { position: relative; min-height: 0; padding: 22px 14px 10px 20px; border-bottom: 0; }
    body.pui-app .tutor-header::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 5px;
        margin-left: -20px;
        border-radius: 999px;
        background: #e2e2e2;
    }
}

/* Header: ✦ AI Tutor; the buttons are the page's grey squares. */
body.pui-app .tutor-header-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: #23232b; }
body.pui-app .tutor-header-title::before {
    content: "auto_awesome";
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    font-weight: normal;
    line-height: 1;
    color: #f26a1b;
    font-variation-settings: 'FILL' 1;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
}
body.pui-app .tutor-header-actions { gap: 6px; }
body.pui-app .tutor-header-actions .icon-btn { width: 36px; height: 36px; border-radius: 12px; background: #f2f2f2; color: #5c5a55; }
body.pui-app .tutor-header-actions .icon-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }

/* Empty state: the long greeting goes; ✦, one line, three questions. */
body.pui-app #tutorScroll > .tutor-turn-assistant { display: none; }
body.pui-app .pa-tutor-empty { display: flex; flex-direction: column; align-items: center; padding: 28px 8px 8px; text-align: center; animation: pa-msg-in 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
body.pui-app:has(#tutorMessages > *) .pa-tutor-empty { display: none; }
body.pui-app .pa-tutor-empty-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff1e6, #ffe0cc);
    color: #f26a1b;
    --icon-size: 28px;
    font-size: 28px;
    font-variation-settings: 'FILL' 1;
}
body.pui-app .pa-tutor-empty-title { margin: 14px 0 18px; color: #23232b; font-size: 17px; font-weight: 700; }
body.pui-app .pa-tutor-chips { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; }
body.pui-app .pa-tutor-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1.5px solid #ececec;
    border-radius: 16px;
    background: #fff;
    color: #33333d;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
    animation: pa-msg-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.pui-app .pa-tutor-chip:nth-child(2) { animation-delay: 0.05s; }
body.pui-app .pa-tutor-chip:nth-child(3) { animation-delay: 0.1s; }
body.pui-app .pa-tutor-chip .material-symbols-outlined { --icon-size: 20px; font-size: 20px; color: #f26a1b; }
body.pui-app .pa-tutor-chip:active { transform: scale(0.98); background: #fff7f1; border-color: #ffd7c2; }

/* Messages. */
body.pui-app .tutor-scroll { padding: 8px 18px 16px; }
body.pui-app #tutorMessages > .tutor-turn { animation: pa-msg-in 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pa-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.pui-app .tutor-user-bubble {
    padding: 11px 15px;
    border-radius: 20px 20px 6px 20px;
    background: linear-gradient(135deg, #ff8a3d, #f26a1b);
    color: #fff;
    font-size: 15px;
    line-height: 1.55;
}
body.pui-app .tutor-user-reference {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: #f4f4f5;
    color: #6b6b74;
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
    white-space: normal;
}
body.pui-app .tutor-assistant-content { color: #23232b; font-size: 15px; line-height: 1.75; }
body.pui-app .follow-up-item { border-radius: 14px; }

/* Composer: the 问 AI box's look. */
body.pui-app .tutor-input-area { padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; }
body.pui-app .tutor-input-shell {
    border: 1.5px solid transparent;
    border-radius: 20px;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(#e6e6e6, #e6e6e6) border-box;
    box-shadow: none;
}
body.pui-app .tutor-input-shell:focus-within {
    border-width: 2px;
    background: linear-gradient(100deg, #fff 30%, #fff6ef) padding-box, conic-gradient(from var(--pa-ring), #f26a1b, #ffa36b, #ffd9c2, #ffb38a, #f26a1b) border-box;
    animation: pa-ring-turn 3.2s linear infinite;
}
body.pui-app #tutorInput { font-size: 16px; }
body.pui-app .tutor-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff8a3d, #f26a1b);
    color: #fff;
}
body.pui-app .tutor-send-btn .material-symbols-outlined { color: #fff; }
body.pui-app .tutor-attach-btn { border-radius: 12px; background: #f2f2f2; color: #5c5a55; }
body.pui-app .tutor-reference-chip { margin: 8px 8px 0; padding: 8px 10px; border: 0; border-radius: 12px; background: #fff4ec; color: #8a4116; font-style: normal; }
body.pui-app .tutor-reference-chip-text { font-style: normal; -webkit-line-clamp: 2; }
body.pui-app .tutor-disclaimer { margin-top: 6px; color: #a8a8b0; font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) {
    body.pui-app .tutor-panel, body.pui-app .tutor-panel.collapsed, body.pui-app .pa-tutor-dim { transition: none; }
    body.pui-app #tutorMessages > .tutor-turn, body.pui-app .pa-tutor-empty, body.pui-app .pa-tutor-chip { animation: none; }
    body.pui-app .tutor-input-shell:focus-within { animation: none; }
}
/* The quote: at most three lines, fading out, never a half-cut fourth. */
body.pui-app .tutor-user-reference {
    display: block;
    -webkit-line-clamp: unset;
    max-height: calc(3 * 1.5em + 20px);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
    mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
body.pui-app .tutor-user-reference { max-height: calc(3 * 1.5em + 10px); padding-bottom: 0; }

/*
 * Step 23 (2026-11-16): the 问 AI box, calmer at rest. Nothing typed: a light
 * grey send button with a grey arrow, a lighter placeholder, a smaller ✦.
 * Once there is text the button fills with the orange gradient and pops a
 * little — so the orange appears only when there is something to send.
 */
body.pui-app.pa-practising .paper-bar > #paAskAi { border-radius: 18px; }
body.pui-app.pa-practising .paper-bar > #paAskAi .pa-ask-icon { --icon-size: 18px; font-size: 18px; }
body.pui-app.pa-practising .pa-ask-input { font-weight: 500; }
body.pui-app.pa-practising .pa-ask-input::placeholder { color: #a3a3ab; font-weight: 500; }
body.pui-app.pa-practising .paper-bar > #paAskAi #paAskSend {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f1f1f2;
    transition: background-color 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.pui-app.pa-practising .paper-bar > #paAskAi #paAskSend .material-symbols-outlined { color: #b4b4bb; transition: color 0.2s ease; }
body.pui-app.pa-practising .paper-bar > #paAskAi:has(.pa-ask-input:not(:placeholder-shown)) #paAskSend {
    background: linear-gradient(135deg, #ff8a3d, #f26a1b);
    transform: scale(1.04);
}
body.pui-app.pa-practising .paper-bar > #paAskAi:has(.pa-ask-input:not(:placeholder-shown)) #paAskSend .material-symbols-outlined { color: #fff; }

/*
 * Step 24 (2026-11-16): the 问 AI box, plain and flat. No ✦; no turning
 * gradient ring and no warm wash when typing — just the hairline turning a
 * soft solid orange; the send button a flat orange once there is text.
 * The AI Tutor's own composer follows the same rule.
 */
body.pui-app.pa-practising .paper-bar > #paAskAi .pa-ask-icon { display: none; }
body.pui-app.pa-practising .paper-bar > #paAskAi { padding-left: 18px; }
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within {
    border-width: 1.5px;
    border-color: #f2a07b;
    padding-left: 18px;
    padding-right: 6px;
    background: #fff;
    animation: none;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:has(.pa-ask-input:not(:placeholder-shown)) #paAskSend {
    background: #f26a1b;
    transform: none;
}
body.pui-app .tutor-input-shell { border: 1.5px solid #e6e6e6; background: #fff; }
body.pui-app .tutor-input-shell:focus-within { border-width: 1.5px; border-color: #f2a07b; background: #fff; animation: none; }
body.pui-app .tutor-send-btn { background: #f26a1b; }
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi,
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within { background: var(--pa-bg); }

/* Step 25 (2026-11-16): the AI Tutor sheet drags down to close (js/paper-app.js); its 翻译记录 button is hidden. */
body.pui-app #tutorTranslationsBtn { display: none; }
@media (max-width: 720px) {
    body.pui-app .tutor-header { touch-action: none; cursor: grab; }
}

/* Step 26 (2026-11-16): no ✦ beside "AI Tutor" or above the empty state's line. */
body.pui-app .tutor-header-title::before { content: none; display: none; }
body.pui-app .pa-tutor-empty-icon { display: none; }
body.pui-app .pa-tutor-empty { padding-top: 36px; }
body.pui-app .pa-tutor-empty-title { margin-top: 0; }

/*
 * Step 27 (2026-11-16): nothing hides behind the composer any more — it sits
 * in the sheet's flow (under the chat) instead of floating over the chat's
 * last lines. A short white fade above it keeps the soft edge. The suggested
 * follow-up questions use the home chat's simple pills (quiz-card.css
 * .follow-ups-row.is-pills): rounded, wrapping, no icons.
 */
body.pui-app .tutor-panel { display: flex; flex-direction: column; }
body.pui-app .tutor-scroll { flex: 1; min-height: 0; padding-bottom: 20px; }
body.pui-app .tutor-input-area { position: relative; flex: none; pointer-events: auto; background: #fff; }
body.pui-app .tutor-input-area::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 24px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
body.pui-app .follow-ups-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; border: 0; border-radius: 0; overflow: visible; }
body.pui-app .follow-ups-row .follow-up-item,
body.pui-app .follow-ups-row .follow-up-item:first-child {
    width: auto;
    max-width: 100%;
    padding: 8px 13px;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    background: #fff;
    color: #33333d;
    font-size: 13.5px;
    line-height: 1.4;
    animation: pa-msg-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.pui-app .follow-ups-row .follow-up-item:nth-child(2) { animation-delay: 0.05s; }
body.pui-app .follow-ups-row .follow-up-item:nth-child(3) { animation-delay: 0.1s; }
body.pui-app .follow-ups-row .follow-up-item:active { background: #f6f6f6; }
body.pui-app .follow-ups-row .follow-up-item .material-symbols-outlined { display: none; }
body.pui-app .follow-ups-row.follow-ups-skeleton .follow-up-item { width: 30%; min-width: 90px; }
:root[data-theme="dark"] body.pui-app .tutor-input-area { background: var(--bg); }
:root[data-theme="dark"] body.pui-app .tutor-input-area::before { background: linear-gradient(to bottom, transparent, var(--bg)); }
:root[data-theme="dark"] body.pui-app .follow-ups-row .follow-up-item { border-color: rgba(255, 255, 255, 0.12); background: transparent; color: var(--text); }

/*
 * Step 28 (2026-11-16): the bar's 问 AI is a plain button again — light grey,
 * no border, no icon; a tap opens the AI Tutor sheet on this question. Press:
 * it sinks a little and darkens, then springs back.
 */
body.pui-app.pa-practising .paper-bar > #paAskAi,
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #f2f2f3;
    color: #33333d;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    animation: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:active {
    transform: scale(0.96);
    background: #e7e7e9;
    transition: transform 0.08s ease, background-color 0.08s ease;
}
body.pui-app.pa-practising .paper-bar > #paAskAi:focus-visible { outline: 2px solid #f2a07b; outline-offset: 2px; }
:root[data-theme="dark"] body.pui-app.pa-practising .paper-bar > #paAskAi { background: rgba(255, 255, 255, 0.08); color: var(--text, #eee); }

/* Step 29 (2026-11-16): 问 AI in the bar is for phones only. On a computer the AI Tutor is already open on the
   right, so the bar keeps the grey, untappable 继续 until an answer is marked (then the coloured one). */
@media (min-width: 721px) {
    body.pui-app.pa-practising .paper-bar > #paAskAi,
    body.pui-app.pa-practising .paper-bar > #paAskAi:focus-within { display: none !important; }
    body.pui-app.pa-practising:not(:has(#pmFeedback.is-open)) .paper-bar > #pmContinue { display: block !important; }
}

/* Step 30 (2026-11-16): no transitions while the page loads (body.pa-loading, removed by js/paper-app.js once
   settled) — the AI Tutor sheet used to slide down on every refresh as the phone script closed it. */
body.pa-loading *,
body.pa-loading *::before,
body.pa-loading *::after { transition: none !important; }
/* …and on phones the sheet (always shut on load) stays out of sight until then, instead of showing for a frame or two before paper-tutor.js shuts it. */
@media (max-width: 720px) {
    body.pa-loading .tutor-panel { visibility: hidden !important; transform: translateY(102%) !important; }
    body.pa-loading .pa-tutor-dim { opacity: 0 !important; }
}

/* Step 31 (2026-11-16): the AI composer, balanced — + and send are the same 40px rounded squares, 8px from
   each edge, and one line of text sits on their centre line (both buttons stay at the bottom as it grows). */
body.pui-app .tutor-input-inner { align-items: flex-end; gap: 8px; padding: 8px; }
body.pui-app .tutor-attach-btn,
body.pui-app .tutor-send-btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
}
body.pui-app .tutor-attach-btn { background: #f2f2f3; color: #5c5a55; }
body.pui-app .tutor-attach-btn:active { background: #e7e7e9; }
body.pui-app .tutor-attach-btn .material-symbols-outlined,
body.pui-app .tutor-send-btn .material-symbols-outlined { --icon-size: 22px; font-size: 22px; }
body.pui-app .tutor-input-inner textarea { min-height: 40px; padding: 9px 4px; line-height: 22px; box-sizing: border-box; }

/*
 * Step 32 (2026-11-16): the milestone page (every 5 right in a row / every 10 answered).
 * A white page springs up from the bottom; the kancil pops in and then bobs; ribbons
 * and a chime (PracticeFx); title, one line, two numbers counting up; an orange 继续.
 * Leaving: it fades and drops a little.
 */
.pa-cheer {
    position: fixed;
    inset: 0;
    z-index: 350;
    display: flex;
    flex-direction: column;
    padding: max(24px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
    background: #fff;
    transform: translateY(100%);
}
.pa-cheer[hidden] { display: none; }
.pa-cheer.is-on { transform: none; transition: transform 0.5s cubic-bezier(0.32, 1.15, 0.5, 1); }
.pa-cheer.is-leaving { transform: translateY(24px); opacity: 0; transition: transform 0.26s ease, opacity 0.26s ease; }
.pa-cheer-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pa-cheer-mascot {
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
    margin-bottom: 26px;
    border-radius: 50%;
    background: #fff0e6;
}
.pa-cheer-mascot img { width: 150px; height: 150px; border-radius: 50%; }
.pa-cheer.is-on .pa-cheer-mascot { animation: pa-cheer-pop 0.6s cubic-bezier(0.34, 1.6, 0.6, 1) 0.15s both, pa-cheer-bob 2.4s ease-in-out 0.9s infinite; }
@keyframes pa-cheer-pop { 0% { transform: scale(0.3) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.08) rotate(4deg); opacity: 1; } 100% { transform: none; } }
@keyframes pa-cheer-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.pa-cheer-title { margin: 0; color: #23232b; font-size: 28px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.pa-cheer-sub { margin: 10px 0 28px; color: #7a7a85; font-size: 16px; }
.pa-cheer.is-on .pa-cheer-title { animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }
.pa-cheer.is-on .pa-cheer-sub { animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both; }
.pa-cheer.is-on .pa-cheer-stats { animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.46s both; }
@keyframes pa-cheer-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pa-cheer-stats { display: flex; gap: 12px; }
.pa-cheer-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 112px; padding: 14px 16px; border-radius: 18px; background: #f4f4f5; }
.pa-cheer-stat strong { color: #23232b; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pa-cheer-stat span { color: #7a7a85; font-size: 13px; font-weight: 600; }
.pa-cheer-go {
    width: 100%;
    max-width: 720px;
    height: 52px;
    margin: 0 auto;
    border: 0;
    border-radius: 16px;
    background: #f26a1b;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
}
.pa-cheer-go:active { transform: scale(0.97); background: #e35d10; transition-duration: 0.08s; }
@media (prefers-reduced-motion: reduce) {
    .pa-cheer.is-on, .pa-cheer.is-leaving { transition: none; }
    .pa-cheer.is-on .pa-cheer-mascot, .pa-cheer.is-on .pa-cheer-title, .pa-cheer.is-on .pa-cheer-sub, .pa-cheer.is-on .pa-cheer-stats { animation: none; }
}
:root[data-theme="dark"] .pa-cheer { background: var(--pa-bg, #1f1e1c); }
:root[data-theme="dark"] .pa-cheer-title, :root[data-theme="dark"] .pa-cheer-stat strong { color: var(--text, #eee); }
:root[data-theme="dark"] .pa-cheer-stat { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .pa-cheer-mascot { background: rgba(242, 106, 27, 0.16); }

/*
 * Step 33 (2026-11-16): the simple result page (body.pa-result, set by js/paper-app.js while the
 * result is up). White page; header ✕ · title · ⚙; the kancil and "完成了！"; the percentage big
 * with "27 / 40" under it; one grey line for counts and one for the save state; the 3 topics where
 * most was lost as plain rows; 复习错题 (orange) and 再做一次 (grey). Filters and the bottom bar go.
 * The marked questions below stay for review, in the practice look.
 */
.pa-result-hero { display: none; }
:root:not([data-theme="dark"]) body.pui-app.pa-result {
    --pa-bg: #ffffff;
    --pa-soft: #ffffff;
    --pa-soft-hover: #f7f7f7;
    --pa-line: #ececec;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
:root:not([data-theme="dark"]) body.pui-app.pa-result .paper-option:not(.is-correct):not(.is-wrong) { box-shadow: inset 0 0 0 1.5px #e8e8e8; }

/* Header: ✕, the title, ⚙ (language). */
body.pui-app.pa-result .content-header { gap: 10px; padding: 0 14px; }
body.pui-app.pa-result .paper-progress-pill,
body.pui-app.pa-result #timerControl,
body.pui-app.pa-result .header-fullscreen-btn,
body.pui-app.pa-result .translate-btn { display: none !important; }
body.pui-app.pa-result .content-header::after { display: none; }
body.pui-app.pa-result .pa-back .pa-back-arrow { display: none; }
body.pui-app.pa-result .pa-back .pa-back-close { display: inline-block; }
body.pui-app.pa-result .pa-back,
body.pui-app.pa-result .pa-settings-btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.pa-result .pa-settings-btn { order: 3; }
body.pui-app.pa-result .content-header h1 { font-size: 15px; font-weight: 600; text-align: center; }
body.pui-app.pa-result .content-header-actions { flex: none; }
body.pui-app.pa-result .pa-sheet-title,
body.pui-app.pa-result .pa-sound-row { display: none; }

/* The result card itself: no card, centred. */
body.pui-app.pa-result .paper-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 28px;
    padding: 8px 4px 0;
    border: 0;
    background: transparent;
    text-align: center;
}
body.pui-app.pa-result .pa-result-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
body.pui-app.pa-result .pa-result-mascot { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; background: #fff0e6; animation: pa-cheer-pop 0.6s cubic-bezier(0.34, 1.6, 0.6, 1) both, pa-cheer-bob 2.6s ease-in-out 0.8s infinite; }
body.pui-app.pa-result .pa-result-mascot img { width: 100px; height: 100px; border-radius: 50%; }
body.pui-app.pa-result .pa-result-done { margin: 14px 0 0; color: #23232b; font-size: 22px; font-weight: 800; }
body.pui-app.pa-result .paper-result-head { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px 0 0; padding: 0; border: 0; }
body.pui-app.pa-result .paper-result-score { display: flex; flex-direction: column; align-items: center; gap: 0; }
body.pui-app.pa-result .paper-result-score span { order: -1; padding: 0; background: none; color: #f26a1b; font-size: 56px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
body.pui-app.pa-result .paper-result-score[data-level="high"] span { color: #2f9e62; }
body.pui-app.pa-result .paper-result-score strong { color: #5c5a55; font-size: 16px; font-weight: 700; }
body.pui-app.pa-result .paper-result-counts { margin: 2px 0 0; color: #9a9aa2; font-size: 13.5px; }

/* Save state: one quiet line; its button (去错题本) as a text link. */
body.pui-app.pa-result .paper-sync { justify-content: center; margin: 12px 0 0; padding: 0; border: 0; background: none; color: #9a9aa2; font-size: 13px; }
body.pui-app.pa-result .paper-sync .material-symbols-outlined { --icon-size: 16px; font-size: 16px; }
body.pui-app.pa-result .paper-sync button { padding: 0; border: 0; background: none; color: #c2510a; font-size: 13px; font-weight: 700; text-decoration: none; }

/* Topics: the 3 where most was lost, as plain rows (name · score · 练这个考点). */
body.pui-app.pa-result .paper-topics { margin: 24px 0 0; padding: 0; border: 0; background: none; text-align: left; }
body.pui-app.pa-result .paper-topics-title { margin: 0 0 6px; color: #9a9aa2; font-size: 13px; font-weight: 700; }
body.pui-app.pa-result .paper-topic-list { display: flex; flex-direction: column; gap: 0; }
body.pui-app.pa-result .paper-topic {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}
body.pui-app.pa-result .paper-topics:not(:has(#paperTopicsMore[data-open="1"])) .paper-topic:nth-child(n+4) { display: none; }
body.pui-app.pa-result .paper-topic[hidden] { display: none; }
body.pui-app.pa-result .paper-topic-name { overflow: hidden; color: #23232b; font-size: 14.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
body.pui-app.pa-result .paper-topic-score { grid-row: span 2; color: #7a7a85; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.pui-app.pa-result .paper-topic[data-level="low"] .paper-topic-score { color: #b0485f; }
body.pui-app.pa-result .paper-topic-bar,
body.pui-app.pa-result .paper-topic-hint { display: none; }
body.pui-app.pa-result .paper-topic-link { justify-self: start; color: #c2510a; font-size: 13px; font-weight: 700; text-decoration: none; }
body.pui-app.pa-result .paper-topics-more { margin-top: 6px; padding: 6px 0; border: 0; background: none; color: #7a7a85; font-size: 13px; font-weight: 700; text-decoration: none; }

/* Next steps. */
body.pui-app.pa-result .paper-filter,
body.pui-app.pa-result .paper-bar,
body.pui-app.pa-result .sponsor-slot { display: none !important; }
body.pui-app.pa-result .pa-review-wrong,
body.pui-app.pa-result .paper-retry-btn {
    width: 100%;
    height: 52px;
    margin: 0;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
}
body.pui-app.pa-result .pa-review-wrong { margin-top: 26px; background: #f26a1b; color: #fff; }
body.pui-app.pa-result .pa-review-wrong[hidden] { display: none; }
body.pui-app.pa-result .pa-review-wrong span { opacity: 0.8; font-weight: 700; }
body.pui-app.pa-result .paper-retry-btn { margin-top: 10px; background: #f2f2f3; color: #33333d; }
body.pui-app.pa-result .pa-review-wrong[hidden] + .paper-retry-btn { margin-top: 26px; }
body.pui-app.pa-result .pa-review-wrong:active,
body.pui-app.pa-result .paper-retry-btn:active { transform: scale(0.97); transition-duration: 0.08s; }
body.pui-app.pa-result .content-scroll { padding-bottom: 40px; }
@media (prefers-reduced-motion: reduce) {
    body.pui-app.pa-result .pa-result-mascot, body.pui-app.pa-result .paper-result-score span { animation: none; }
}
/* Order: kancil, score, save line, the two buttons (on the first screen), then the topics. */
body.pui-app.pa-result .pa-result-hero { order: 0; }
body.pui-app.pa-result .paper-result-head { order: 1; }
body.pui-app.pa-result .paper-sync { order: 2; }
body.pui-app.pa-result .pa-review-wrong { order: 3; margin-top: 22px; }
body.pui-app.pa-result .paper-retry-btn { order: 4; }
body.pui-app.pa-result .pa-review-wrong[hidden] + .paper-retry-btn { margin-top: 22px; }
body.pui-app.pa-result .paper-topics { order: 5; margin-top: 30px; }
/* Save line: icon + text + link on one centred line, wrapping as a whole. */
body.pui-app.pa-result .paper-sync { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; text-align: center; }
body.pui-app.pa-result .paper-sync > span:not(.material-symbols-outlined) { flex: 0 1 auto; }

/*
 * Step 34 (2026-11-16): the streak on the progress bar (js/paper-app.js sets body[data-streak-level]).
 * 1 (2–3 right): brighter orange, a sheen on every right answer. 2 (4–6): orange → gold, the fire and
 * its count beside the bar, popping on each. 3 (7+): the gold moves like flame, the bar glows, sparks
 * keep rising. A wrong answer puts the fire out (it shrinks away) and the bar goes back to plain.
 */
body.pui-app .content-header .pm-top { position: relative; }
body.pui-app .pm-progress { position: relative; transition: box-shadow 0.4s ease; }
body.pui-app .pm-progress i { position: relative; overflow: hidden; transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease; }
body.pui-app[data-streak-level="1"] .pm-progress i { background: #ff7a1a; }
body.pui-app[data-streak-level="2"] .pm-progress i { background: linear-gradient(90deg, #ff7a1a, #ffb020); }
body.pui-app[data-streak-level="3"] .pm-progress i {
    background: linear-gradient(90deg, #ff5a00, #ffb020, #ff7a1a, #ffd000, #ff5a00);
    background-size: 300% 100%;
    animation: pa-flame-flow 1.6s linear infinite;
}
body.pui-app[data-streak-level="3"] .pm-progress { box-shadow: 0 0 0 3px rgba(255, 150, 30, 0.18), 0 0 14px rgba(255, 140, 20, 0.45); }
@keyframes pa-flame-flow { to { background-position: -300% 0; } }

/* The sheen: a bright band sweeping along the filled part. */
body.pui-app .pm-progress i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
    transform: translateX(-120%);
}
body.pui-app .pm-top.is-sheen .pm-progress i::after { animation: pa-sheen 0.7s ease-out; }
body.pui-app[data-streak-level="2"] .pm-progress i::after,
body.pui-app[data-streak-level="3"] .pm-progress i::after { animation: pa-sheen 1.8s ease-in-out infinite; }
@keyframes pa-sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

/* Sparks off the bar's tip. */
body.pui-app .pa-spark {
    position: absolute;
    z-index: 2;
    width: var(--sz, 3px);
    height: var(--sz, 3px);
    margin: calc(var(--sz, 3px) / -2) 0 0 calc(var(--sz, 3px) / -2);
    border-radius: 50%;
    background: #ffc233;
    box-shadow: 0 0 6px #ff9a1a;
    pointer-events: none;
    animation: pa-spark 0.75s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes pa-spark {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}

/* The fire and its count. */
body.pui-app .pa-streak { display: inline-flex; flex: none; align-items: center; gap: 2px; color: #f26a1b; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.pui-app .pa-streak[hidden] { display: none; }
body.pui-app .pa-streak img { width: 22px; height: 22px; transform-origin: 50% 90%; }
body.pui-app .pa-streak.is-pop { animation: pa-streak-pop 0.45s cubic-bezier(0.34, 1.6, 0.6, 1); }
body.pui-app .pa-streak.is-out { animation: pa-streak-out 0.4s ease forwards; }
@keyframes pa-streak-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes pa-streak-out { to { transform: scale(0.2); opacity: 0; } }
body.pui-app[data-streak-level="3"] .pa-streak img { width: 26px; height: 26px; animation: pa-flicker 0.9s ease-in-out infinite; }
@keyframes pa-flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08, 0.95) rotate(-4deg); } 60% { transform: scale(0.96, 1.06) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) {
    body.pui-app .pm-progress i, body.pui-app .pm-progress i::after, body.pui-app .pa-streak, body.pui-app .pa-streak img { animation: none !important; }
}

/* Step 35 (2026-11-16): the cheer (js/paper-app.js playPop) — a white page with the kancil's four drawings
   stacked (only .is-on shows) and the words above; all motion is done in script. */
.pa-pop { position: fixed; inset: 0; z-index: 360; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.pa-pop[hidden] { display: none; }
.pa-pop-text { margin: 0 0 6px; color: #f26a1b; font-size: 34px; font-weight: 800; opacity: 0; }
.pa-pop-text.is-blue { color: #3aa0d8; }
.pa-pop-text.is-pink { color: #ec5f93; }
.pa-pop-char { position: relative; width: min(64vw, 280px); aspect-ratio: 1; transform-origin: 50% 100%; will-change: transform; }
.pa-pop-char img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.pa-pop-char img.is-on { opacity: 1; }
:root[data-theme="dark"] .pa-pop { background: var(--pa-bg, #1f1e1c); }

/* Step 36 (2026-11-16): the cheer no longer brings its own white page — the question page itself slides out and
   the next one in (js/paper-app.js); this layer is see-through, under the header, and only catches taps. */
.pa-pop { top: var(--header-height, 64px); background: transparent; }
:root[data-theme="dark"] .pa-pop { background: transparent; }
.pa-pop-text, .pa-pop-char { will-change: transform, opacity; }
body.pui-app .content-scroll, body.pui-app #paperBar, body.pui-app #pmFeedback { backface-visibility: hidden; }

/*
 * Step 37 (2026-11-16): the result page, redone simpler — one screen: the kancil (pom-poms up) and
 * "完成了！", three numbers (正确率 · 答对 · 最长连对) counting up, then 完成 (back to the papers),
 * 复习错题 (grey; only then do the marked questions show, the wrong ones) and a small 再做一次.
 * Gone: the score line, the topic list, the "saved" line (kept only when something needs the
 * student: failed / sign in).
 */
body.pui-app.pa-result .paper-result {
    min-height: calc(100dvh - var(--header-height, 64px) - 40px);
    margin-bottom: 0;
    padding: 12px 0 8px;
}
body.pui-app.pa-result .paper-result-head,
body.pui-app.pa-result .paper-topics { display: none !important; }
body.pui-app.pa-result .paper-sync[data-state="saved"],
body.pui-app.pa-result .paper-sync[data-state="saving"] { display: none !important; }
body.pui-app.pa-result .pa-result-hero { order: 0; margin: auto 0 0; }
body.pui-app.pa-result .pa-result-mascot { width: 168px; height: 168px; border-radius: 0; background: none; }
body.pui-app.pa-result .pa-result-mascot img { width: 168px; height: 168px; border-radius: 0; }
body.pui-app.pa-result .pa-result-done { margin-top: 8px; font-size: 26px; }
body.pui-app.pa-result .pa-result-stats {
    order: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0 auto;
}
body.pui-app.pa-result .pa-result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 6px;
    border-radius: 16px;
    background: #f4f4f5;
    animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.pui-app.pa-result .pa-result-stat:nth-child(1) { animation-delay: 0.25s; }
body.pui-app.pa-result .pa-result-stat:nth-child(2) { animation-delay: 0.33s; }
body.pui-app.pa-result .pa-result-stat:nth-child(3) { animation-delay: 0.41s; }
body.pui-app.pa-result .pa-result-stat strong { color: #23232b; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.pui-app.pa-result .pa-result-stat:nth-child(1) strong { color: #f26a1b; }
body.pui-app.pa-result #paResRight::after { content: attr(data-total); color: #9a9aa2; font-size: 15px; font-weight: 700; }
body.pui-app.pa-result .pa-result-stat span { color: #7a7a85; font-size: 12.5px; font-weight: 600; }
body.pui-app.pa-result .paper-sync { order: 2; margin: 14px 0 0; }
body.pui-app.pa-result .pa-result-finish {
    order: 3;
    display: grid;
    place-items: center;
    height: 52px;
    margin-top: 26px;
    border-radius: 16px;
    background: #f26a1b;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
    animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
body.pui-app.pa-result .pa-result-finish:active { transform: scale(0.97); background: #e35d10; transition-duration: 0.08s; }
body.pui-app.pa-result .pa-review-wrong { order: 4; margin-top: 10px; background: #f2f2f3; color: #33333d; animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.56s both; }
body.pui-app.pa-result .pa-review-wrong span { color: #7a7a85; opacity: 1; }
body.pui-app.pa-result .paper-retry-btn,
body.pui-app.pa-result .pa-review-wrong[hidden] + .paper-retry-btn {
    order: 5;
    height: auto;
    margin: 14px auto 0;
    padding: 8px 14px;
    background: none;
    color: #7a7a85;
    font-size: 14px;
    font-weight: 700;
}
/* The marked questions: only after 复习错题. */
body.pui-app.pa-result:not(.pa-reviewing) .paper-quiz .paper-question { display: none !important; }
body.pui-app.pa-result.pa-reviewing .paper-result { min-height: 0; }
/* The "更多试卷" links under the page stay out of the simple result screen (they come back while reviewing). */
body.pui-app.pa-result:not(.pa-reviewing) .pp-more { display: none !important; }
body.pui-app.pa-result .paper-submit-row { display: none !important; }

/*
 * Step 38 (2026-11-16): the paper's details leave the page. An ⓘ beside ⚙ (and on the start screen's
 * header) opens them: a bottom sheet on phones, a centred rounded dialog on computers, over a dark layer.
 * #paperInfo itself is moved into .pa-info-panel by js/paper-app.js.
 */
.pa-info-btn { flex: none; }
body.pui-app.is-practice .pa-info-btn,
body.pui-app.pa-result .pa-info-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app .pa-info-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pui-app.pa-result .pa-info-btn { order: 3; }

.pa-info { position: fixed; inset: 0; z-index: 420; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pa-info[hidden] { display: none; }
.pa-info-dim { position: absolute; inset: 0; background: rgba(12, 12, 14, 0.5); opacity: 0; transition: opacity 0.25s ease; }
.pa-info.is-on .pa-info-dim { opacity: 1; }
.pa-info-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 85dvh;
    overflow-y: auto;
    padding: 26px 22px 22px;
    border-radius: 22px;
    background: #fff;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-info.is-on .pa-info-panel { opacity: 1; transform: none; }
.pa-info-handle { display: none; }
.pa-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    background: #f2f2f2;
    color: #5c5a55;
    cursor: pointer;
}
.pa-info-close .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
.pa-info-panel .paper-info { display: block !important; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }
.pa-info-panel .paper-info-title { padding-right: 36px; }
@media (max-width: 720px) {
    .pa-info { align-items: flex-end; padding: 0; }
    .pa-info-panel {
        max-width: none;
        padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        opacity: 1;
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .pa-info.is-on .pa-info-panel { transform: none; }
    .pa-info-handle { display: block; width: 40px; height: 5px; margin: 0 auto 16px; border-radius: 999px; background: #e2e2e2; }
    .pa-info-close { top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .pa-info-dim, .pa-info-panel { transition: none; }
}
:root[data-theme="dark"] .pa-info-panel { background: var(--pa-card, #262523); }

/* Step 39 (2026-11-16): owner — just hide it: no ⓘ button; the paper's details stay out of the page too. */
body.pui-app .pa-info-btn { display: none !important; }

/* Step 40 (2026-11-16): the 10/20/30/40 illustrations (public/images/milestone) — a little bigger than the kancil cheer;
   the result page's hero shows the "40" one on a 40-question paper. */
.pa-pop-char.is-milestone { width: min(78vw, 340px); }
body.pui-app.pa-result .pa-result-mascot.is-milestone,
body.pui-app.pa-result .pa-result-mascot.is-milestone img { width: 220px; height: 220px; }

/* Step 41 (2026-11-17): the leave-practice layer is plain white (no dark blur); text and buttons follow the white page:
   dark title, grey line, the icon on a light grey tile, 继续练习 orange, 退出 a grey text button. */
.pa-leave {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.pa-leave-box { color: #23232b; }
.pa-leave-icon { background: #f4f4f5; color: #f26a1b; }
.pa-leave h2 { color: #23232b; }
.pa-leave p { color: #7a7a85; }
.pa-leave-stay { background: #f26a1b; color: #fff; }
.pa-leave-stay:active { background: #e35d10; }
.pa-leave-go { color: #7a7a85; }
.pa-leave-go:hover { background: #f4f4f5; }
:root[data-theme="dark"] .pa-leave { background: var(--pa-bg, #1f1e1c); }
:root[data-theme="dark"] .pa-leave h2, :root[data-theme="dark"] .pa-leave-box { color: var(--text, #eee); }
:root[data-theme="dark"] .pa-leave-icon { background: rgba(255, 255, 255, 0.06); }

/* Step 42 (2026-11-17): 10 / 20 / 30 answered go back to the milestone page (white page, numbers, 继续), with that
   number's illustration in place of the kancil; three numbers: 正确率 · 答对 · 答错. */
.pa-cheer-mascot.is-milestone { width: 230px; height: 230px; margin-bottom: 14px; border-radius: 0; background: none; }
.pa-cheer-mascot.is-milestone img { width: 230px; height: 230px; border-radius: 0; }
.pa-cheer-stats { width: 100%; max-width: 380px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pa-cheer-stat { min-width: 0; }
.pa-cheer-stat:nth-child(1) strong { color: #f26a1b; }
.pa-cheer-stat:nth-child(3) strong { color: #b0485f; }

/*
 * Step 43 (2026-11-17): result numbers in rings that sweep round as they count (orange accuracy, green right,
 * amber best run, with a small fire); a little pop when a ring is done. Buttons in one group at the bottom,
 * even 10 px gaps — 完成 across the top, 复习错题 | 再做一次 side by side (再做一次 across when nothing was wrong).
 */
body.pui-app.pa-result .pa-result-stat { gap: 6px; padding: 14px 6px 12px; }
body.pui-app.pa-result .pa-ring-wrap { position: relative; display: grid; place-items: center; width: 72px; height: 72px; }
body.pui-app.pa-result .pa-ring { position: absolute; inset: 0; width: 72px; height: 72px; transform: rotate(-90deg); }
body.pui-app.pa-result .pa-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
body.pui-app.pa-result .pa-ring-track { stroke: #e9e9eb; }
body.pui-app.pa-result .pa-result-stat:nth-child(1) .pa-ring-fill { stroke: #f26a1b; }
body.pui-app.pa-result .pa-result-stat:nth-child(2) .pa-ring-fill { stroke: #3fb27f; }
body.pui-app.pa-result .pa-result-stat:nth-child(3) .pa-ring-fill { stroke: #ffb020; }
body.pui-app.pa-result .pa-ring-wrap strong { position: relative; font-size: 18px; line-height: 1; }
body.pui-app.pa-result #paResRight::after { font-size: 11px; }
body.pui-app.pa-result .pa-result-stat:nth-child(2) strong { color: #23232b; }
body.pui-app.pa-result .pa-result-stat:nth-child(3) .pa-ring-wrap::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: url("/images/emoji-3d/fire-noto.webp") center / contain no-repeat;
}
body.pui-app.pa-result .pa-result-stat.is-full .pa-ring-wrap { animation: pa-ring-pop 0.45s cubic-bezier(0.34, 1.6, 0.6, 1); }
@keyframes pa-ring-pop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }

body.pui-app.pa-result .pa-result-actions {
    order: 6;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
    animation: pa-cheer-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
body.pui-app.pa-result .pa-result-actions > * { margin: 0 !important; animation: none !important; }
body.pui-app.pa-result .pa-result-actions .pa-result-finish { grid-column: 1 / -1; height: 52px; }
body.pui-app.pa-result .pa-result-actions .pa-review-wrong,
body.pui-app.pa-result .pa-result-actions .paper-retry-btn {
    height: 48px;
    padding: 0 10px;
    border-radius: 14px;
    background: #f2f2f3;
    color: #33333d;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
body.pui-app.pa-result .pa-result-actions .pa-review-wrong[hidden] + .paper-retry-btn { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) {
    body.pui-app.pa-result .pa-result-stat.is-full .pa-ring-wrap { animation: none; }
}
/* No fire on the best-run ring (owner: 多余). */
body.pui-app.pa-result .pa-result-stat:nth-child(3) .pa-ring-wrap::after { content: none; display: none; }

/*
 * Step 44 (2026-11-17): result buttons — 完成, and under it only 再做一次 (复习错题 goes). Pull the result up past
 * its end (damped; js/paper-app.js) to open every question: "答错的题 · N", the wrong ones, 重答错题, "其他题目",
 * the rest. The hint under the buttons says what a pull will do.
 */
body.pui-app.pa-result .pa-result-actions .pa-review-wrong { display: none !important; }
body.pui-app.pa-result .pa-result-actions .paper-retry-btn { grid-column: 1 / -1; }
.pa-pull { display: none; }
body.pui-app.pa-result:not(.pa-reviewing) .pa-pull {
    order: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 18px;
    color: #a3a3ab;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.pui-app.pa-result .pa-pull .material-symbols-outlined { --icon-size: 22px; font-size: 22px; animation: pa-pull-nudge 1.6s ease-in-out infinite; transition: transform 0.2s ease; }
body.pui-app.pa-result .pa-pull.is-ready { color: #f26a1b; }
body.pui-app.pa-result .pa-pull.is-ready .material-symbols-outlined { animation: none; transform: rotate(180deg); }
@keyframes pa-pull-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
body.pui-app.pa-result .paper-result { will-change: transform; }
body.pui-app.pa-result.pa-reviewing .paper-quiz .paper-question { display: flex !important; }
body.pui-app.pa-result:not(.pa-reviewing) .pa-review-head,
body.pui-app.pa-result:not(.pa-reviewing) .pa-redo { display: none; }
.pa-review-head { margin: 18px 4px 2px; color: #23232b; font-size: 17px; font-weight: 800; }
.pa-redo { display: flex; margin: 4px 0 10px; }
.pa-redo-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: #f26a1b;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pa-redo-btn:active { transform: scale(0.97); transition-duration: 0.08s; }
@media (prefers-reduced-motion: reduce) { body.pui-app.pa-result .pa-pull .material-symbols-outlined { animation: none; } }

/* Step 45 (2026-11-17): the answer + explanation box keeps its light grey rounded panel everywhere in this version
   (exam mode and the review under the result too, not only while practising). */
:root:not([data-theme="dark"]) body.pui-app .paper-answer {
    padding: 16px 18px;
    border-radius: 16px;
    background: #f4f4f5;
}
:root[data-theme="dark"] body.pui-app .paper-answer { padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); }

/* Step 46 (2026-11-17): the second-chance page (再来一次！) is the milestone page without its numbers. */
.pa-cheer.is-plain .pa-cheer-stats { display: none; }

/* Step 47 (2026-11-17): desktop — the bottom bar spans the whole question area (it was 760 px wide and stuck to the
   left), and 继续 / 问 AI sit centred under the question, the same width as it. */
body.pui-app.pa-practising .paper-bar { max-width: none !important; margin: 0 !important; }
body.pui-app.pa-practising .paper-bar > #pmContinue,
body.pui-app.pa-practising .paper-bar > #paAskAi { width: 100%; max-width: var(--pa-width, 760px); margin: 0 auto !important; }
/* Step 48 (2026-11-17): two more switches under 音效 in the settings sheet. */
body.pui-app.is-practice .pa-opt-row { margin-bottom: 0; padding-top: 12px; padding-bottom: 12px; }
body.pui-app.is-practice .pa-opt-row:last-of-type { margin-bottom: 6px; }

/* Step 49 (2026-11-17): the settings / language sheet is a centred rounded dialog over the dark layer (fades and
   grows in) whenever a drawer would not fill the width — anything wider than a phone (481 px up, owner: gaps at the
   sides look bad). Phones keep the drawer. */
@media (min-width: 481px) {
    body.pui-app .translate-menu.paper-lang-menu {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: 440px;
        max-width: calc(100vw - 40px);
        max-height: min(80vh, 640px);
        margin: 0;
        padding: 20px 0 16px;
        border-radius: 22px;
        opacity: 0;
        transform: translate(-50%, -47%) scale(0.96);
        transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.28s;
    }
    body.pui-app .translate-control.open .translate-menu.paper-lang-menu {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: none;
        transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
    }
    body.pui-app .paper-lang-menu .pa-sheet-handle { display: none; }
}

/* Step 50 (2026-11-17): the report sheet likewise — a full-width drawer on phones, a centred dialog on anything wider. */
@media (min-width: 481px) {
    .qr-simple.pp-sheet { align-items: center; padding: 20px; }
    .qr-simple .pp-sheet-panel { max-width: 440px; padding: 22px 18px 18px; border-radius: 22px; animation: qr-dialog-in 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
    .qr-simple.is-closing .pp-sheet-panel { animation: qr-dialog-out 0.22s ease forwards; }
    .qr-simple .qr-handle { display: none; }
}
@keyframes qr-dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes qr-dialog-out { to { opacity: 0; transform: translateY(6px) scale(0.97); } }

/*
 * Step 51 (2026-11-17): 题目语言 as three cards side by side — the flag, the language's name, and under it "原卷"
 * on the paper's own language ("暂无翻译" greyed out where there is none), all centred. The one in use: peach,
 * an orange outline and a small ✓ in its corner.
 */
.pa-lang-flag { display: none; }
body.pui-app .paper-lang-menu .paper-lang-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 16px 12px; }
body.pui-app .paper-lang-menu .paper-lang-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 14px 6px 12px;
    border: 1.5px solid #ececec;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    animation: none;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
body.pui-app .paper-lang-menu .paper-lang-opt:active:not(:disabled) { transform: scale(0.97); }
body.pui-app .paper-lang-menu .pa-lang-flag { display: block; width: 36px; height: 36px; border-radius: 50%; }
body.pui-app .paper-lang-menu .paper-lang-name { flex: none; color: #23232b; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
body.pui-app .paper-lang-menu .paper-lang-tag { padding: 2px 8px; font-size: 11px; }
body.pui-app .paper-lang-menu .paper-lang-opt.is-on { border-color: #f2a07b; background: #fff4ec; }
body.pui-app .paper-lang-menu .paper-lang-opt.is-on .paper-lang-name { color: #8a4116; }
body.pui-app .paper-lang-menu .paper-lang-check {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f26a1b;
    color: #fff;
    --icon-size: 14px;
    font-size: 14px;
    font-variation-settings: 'wght' 700;
}
body.pui-app .paper-lang-menu .paper-lang-opt:disabled { opacity: 0.45; }
body.pui-app .paper-lang-menu .paper-lang-opt:disabled .pa-lang-flag { filter: grayscale(1); }
:root[data-theme="dark"] body.pui-app .paper-lang-menu .paper-lang-opt { border-color: rgba(255, 255, 255, 0.1); background: transparent; }
:root[data-theme="dark"] body.pui-app .paper-lang-menu .paper-lang-name { color: var(--text, #eee); }

/* Step 52 (2026-11-17, toned down): language cards move only a little — a short rise once as the sheet opens
   (.pa-enter, set for that moment by js/paper-app.js), a slight press on the one tapped, the flag a tiny tilt,
   the ✓ fading in. */
body.pui-app .paper-lang-menu .paper-lang-list.pa-enter .paper-lang-opt { animation: pa-lang-in 0.26s ease-out both; }
body.pui-app .paper-lang-menu .paper-lang-list.pa-enter .paper-lang-opt:nth-child(2) { animation-delay: 0.03s; }
body.pui-app .paper-lang-menu .paper-lang-list.pa-enter .paper-lang-opt:nth-child(3) { animation-delay: 0.06s; }
@keyframes pa-lang-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.pui-app .paper-lang-menu .paper-lang-opt.is-picked { animation: pa-lang-pick 0.26s ease-out; }
body.pui-app .paper-lang-menu .paper-lang-opt.is-picked .pa-lang-flag { animation: pa-lang-wiggle 0.32s ease-out; }
@keyframes pa-lang-pick { 0% { transform: scale(1); } 40% { transform: scale(0.97); } 100% { transform: scale(1); } }
@keyframes pa-lang-wiggle { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-5deg); } 75% { transform: rotate(3deg); } }
body.pui-app .paper-lang-menu .paper-lang-opt.is-on .paper-lang-check { animation: pa-check-pop 0.22s ease-out; }
@keyframes pa-check-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
    body.pui-app .paper-lang-menu .paper-lang-opt,
    body.pui-app .paper-lang-menu .pa-lang-flag,
    body.pui-app .paper-lang-menu .paper-lang-check { animation: none !important; }
}

/*
 * Step 53 (2026-11-17): "更多 … 试卷" under the result, as a native grouped list: a small grey section label,
 * a light grey rounded list of rows (peach icon tile · title on one line · ›, dividers from the text, a press
 * state), then 查看全部 as a full-width grey button.
 */
body.pui-app .pp-more { margin: 32px 0 12px; padding: 0; border: 0; border-radius: 0; background: none; }
body.pui-app .pp-more-title { margin: 0 4px 8px; color: #8a8a93; font-size: 13px; font-weight: 700; }
body.pui-app .pp-related { display: block; margin: 0; padding: 0; overflow: hidden; border-radius: 16px; background: #f6f6f7; list-style: none; }
body.pui-app .pp-related li { margin: 0; }
body.pui-app .pp-related a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 10px 8px 12px;
    border: 0;
    color: #23232b;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease;
}
body.pui-app .pp-related li + li a::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 56px;
    height: 1px;
    background: #e8e8ea;
}
body.pui-app .pp-related a:hover { color: #23232b; background: #efeff1; }
body.pui-app .pp-related a:active { background: #e9e9ec; }
body.pui-app .pa-row-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #ffe9db;
    color: #f26a1b;
    --icon-size: 18px;
    font-size: 18px;
    font-variation-settings: 'FILL' 1;
}
body.pui-app .pa-row-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.pui-app .pa-row-chev { flex: none; color: #b8b8c0; --icon-size: 20px; font-size: 20px; }
body.pui-app .pp-all {
    display: grid;
    place-items: center;
    height: 48px;
    margin-top: 10px;
    border-radius: 14px;
    background: #f6f6f7;
    color: #33333d;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.12s ease;
}
body.pui-app .pp-all:active { background: #e9e9ec; }
:root[data-theme="dark"] body.pui-app .pp-related,
:root[data-theme="dark"] body.pui-app .pp-all { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] body.pui-app .pp-related a { color: var(--text, #eee); }
:root[data-theme="dark"] body.pui-app .pp-related li + li a::before { background: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] body.pui-app .pa-row-icon { background: rgba(242, 106, 27, 0.16); }
:root[data-theme="dark"] body.pui-app .pp-all { color: var(--text, #eee); }
/* Two lines: what sets the paper apart (its set: district / school) on top, the source · year · Kertas under it. */
body.pui-app .pa-row-text { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
body.pui-app .pa-row-sub { overflow: hidden; color: #8a8a93; font-size: 12.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
body.pui-app .pp-related a { min-height: 60px; }
body.pui-app .pp-related li + li a::before { left: 56px; }
/* Room under 查看全部 so it doesn't sit on the bottom edge (plus the phone's home-bar inset). */
body.pui-app .pp-more { margin-bottom: 0; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

/* Step 54 (2026-11-17): 重新开始 on the leave layer, between 继续练习 and 退出: a light grey button; on its first tap
   it asks again in red. */
.pa-leave-restart {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    border: 0;
    border-radius: 16px;
    background: #f2f2f3;
    color: #33333d;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}
.pa-leave-restart:active { transform: scale(0.98); }
.pa-leave-restart.is-confirm { background: #fbe9ec; color: #b0485f; }
:root[data-theme="dark"] .pa-leave-restart { background: rgba(255, 255, 255, 0.08); color: var(--text, #eee); }

/*
 * Step 55 (2026-11-17): the start screen (body.gate-open) in the practice look — white; header ✕ · ⚙ only;
 * the kancil, the subject, a short title (the paper's set when it has one) and one line; the two modes as
 * stacked rows (icon tile, name + a few words, ›, 上次用的); no note, no history.
 */
.pa-gate-mascot { display: none; }
:root:not([data-theme="dark"]) body.pui-app.gate-open {
    --pa-bg: #ffffff;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
body.pui-app.gate-open .content-header { gap: 10px; padding: 0 14px; }
body.pui-app.gate-open .content-header h1,
body.pui-app.gate-open .paper-progress-pill,
body.pui-app.gate-open #timerControl,
body.pui-app.gate-open .header-fullscreen-btn,
body.pui-app.gate-open .translate-btn { display: none !important; }
body.pui-app.gate-open .content-header::after { display: none; }
body.pui-app.gate-open .pa-back .pa-back-arrow { display: none; }
body.pui-app.gate-open .pa-back .pa-back-close { display: inline-block; }
body.pui-app.gate-open .pa-back,
body.pui-app.gate-open .pa-settings-btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.gate-open .pa-settings-btn { margin-left: auto; }
body.pui-app.gate-open .pa-settings-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pui-app.gate-open .content-header-actions { flex: none; }
/* The settings sheet before starting: its title and switches too. */
body.pui-app.gate-open .pa-sheet-title { display: block; padding: 0 20px 8px; color: var(--pa-ink); font-size: 18px; font-weight: 700; }
body.pui-app.gate-open .pa-sound-row { display: flex; padding: 8px 20px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--pa-line); }
body.pui-app.gate-open .pa-opt-row { margin-bottom: 0; padding-top: 12px; padding-bottom: 12px; }

body.pui-app .paper-gate { justify-content: center; padding: 0 4px 24px; }
body.pui-app .pa-gate-mascot { display: block; width: 132px; height: 132px; margin-bottom: 14px; animation: pa-cheer-pop 0.55s cubic-bezier(0.34, 1.6, 0.6, 1) both, pa-cheer-bob 2.8s ease-in-out 0.8s infinite; }
body.pui-app .paper-gate-kicker { color: #8a8a93; font-size: 13px; font-weight: 700; }
body.pui-app .paper-gate-title { margin: 4px 0 4px; color: #23232b; font-size: 24px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
body.pui-app .paper-gate-meta { color: #8a8a93; font-size: 14px; }
body.pui-app .paper-gate-history,
body.pui-app .paper-gate-note { display: none !important; }
body.pui-app .paper-mode { grid-template-columns: 1fr; gap: 10px; max-width: 460px; margin-top: 28px; }
body.pui-app .paper-mode-opt {
    flex-direction: row;
    gap: 14px;
    min-height: 76px;
    padding: 12px 12px 12px 14px;
    border: 0;
    border-radius: 18px;
    background: #f6f6f7;
    text-align: left;
    animation: pa-cheer-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.pui-app .paper-mode-opt:nth-child(2) { animation-delay: 0.06s; }
body.pui-app .paper-mode-opt:hover { border: 0; background: #f0f0f2; }
body.pui-app .paper-mode-opt:active { background: #e9e9ec; transform: scale(0.98); }
body.pui-app .paper-mode-icon { width: 46px; height: 46px; border-radius: 14px; background: #ffe9db; color: #f26a1b; --icon-size: 24px; font-size: 24px; font-variation-settings: 'FILL' 1; }
body.pui-app .paper-mode-opt:hover .paper-mode-icon { background: #ffe0cc; color: #f26a1b; }
body.pui-app .paper-mode-opt[data-mode="practice"] .paper-mode-icon { background: #fff3cc; color: #e59a00; }
body.pui-app .paper-mode-text { align-items: flex-start; gap: 2px; }
body.pui-app .paper-mode-text strong { color: #23232b; font-size: 16px; font-weight: 800; }
body.pui-app .paper-mode-text small { color: #8a8a93; font-size: 13px; line-height: 1.4; }
body.pui-app .paper-mode-last { position: static; transform: none; flex: none; padding: 3px 9px; border-radius: 999px; background: #ffe9db; color: #c2510a; font-size: 11.5px; font-weight: 700; }
body.pui-app .paper-mode-go { width: auto; height: auto; border-radius: 0; background: none; color: #b8b8c0; --icon-size: 22px; font-size: 22px; transition: transform 0.15s ease; }
body.pui-app .paper-mode-opt:hover .paper-mode-go { background: none; color: #b8b8c0; transform: translateX(2px); }
:root[data-theme="dark"] body.pui-app .paper-mode-opt { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] body.pui-app .paper-gate-title, :root[data-theme="dark"] body.pui-app .paper-mode-text strong { color: var(--text, #eee); }
@media (prefers-reduced-motion: reduce) { body.pui-app .pa-gate-mascot, body.pui-app .paper-mode-opt { animation: none; } }
/* 上次用的 as a small tag on the card's top edge, so it never squeezes the words. */
body.pui-app .paper-mode-opt { position: relative; }
body.pui-app .paper-mode-last { position: absolute; top: -9px; right: 16px; left: auto; width: auto; }
body.pui-app .paper-mode-opt.is-last .paper-mode-last { display: inline-block; }
body.pui-app .paper-mode { gap: 14px; }
/* Start screen without the kancil (owner, 2026-11-17). */
body.pui-app .pa-gate-mascot { display: none !important; }

/*
 * Step 56 (2026-11-17): 考试模式 (body.pa-exam, js/paper-app.js) in the practice look. White page, grey-outlined
 * options, neutral chips, the questions one after another split by a hairline. Header: ✕ · ⚙ · n/40 on the
 * left, the timer on the right (language moves into ⚙). Bottom bar: full width, white, a fade above it;
 * AI · the question grid · 下一道未答 grey, 交卷 orange.
 */
:root:not([data-theme="dark"]) body.pui-app.pa-exam {
    --pa-bg: #ffffff;
    --pa-soft: #ffffff;
    --pa-soft-hover: #f7f7f7;
    --pa-line: #ececec;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
:root:not([data-theme="dark"]) body.pui-app.pa-exam .paper-option:not(:has(:checked)):not(.is-correct):not(.is-wrong) { box-shadow: inset 0 0 0 1.5px #e8e8e8; }
:root:not([data-theme="dark"]) body.pui-app.pa-exam .paper-option-letter { box-shadow: inset 0 0 0 1.5px #e8e8e8; }
:root:not([data-theme="dark"]) body.pui-app.pa-exam .paper-option:has(:checked) .paper-option-letter { box-shadow: none; }
body.pui-app.pa-exam .paper-quiz { gap: 0; }
body.pui-app.pa-exam .paper-question { border-radius: 0; padding-left: 4px; padding-right: 4px; }
body.pui-app.pa-exam .paper-question + .paper-question { border-top: 1px solid #efefef; }

/* Header */
body.pui-app.pa-exam .content-header { gap: 10px; padding: 0 14px; }
body.pui-app.pa-exam .content-header h1,
body.pui-app.pa-exam .header-fullscreen-btn,
body.pui-app.pa-exam .translate-btn { display: none !important; }
body.pui-app.pa-exam .content-header::after { display: none; }
body.pui-app.pa-exam .pa-back .pa-back-arrow { display: none; }
body.pui-app.pa-exam .pa-back .pa-back-close { display: inline-block; }
body.pui-app.pa-exam .pa-back,
body.pui-app.pa-exam .pa-settings-btn,
body.pui-app.pa-exam #timerBtn {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.pa-exam #timerBtn[hidden] { display: none; }
body.pui-app.pa-exam .pa-settings-btn .material-symbols-outlined,
body.pui-app.pa-exam #timerBtn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pui-app.pa-exam .paper-progress-pill { flex: none; height: 36px; padding: 0 12px; border-radius: 12px; background: #f2f2f2; color: #5a5a5a; font-weight: 700; font-variant-numeric: tabular-nums; }
body.pui-app.pa-exam .content-header-actions { flex: none; margin-left: auto; }
body.pui-app.pa-exam .timer-pill { height: 36px; border: 0; border-radius: 12px; background: #fff0e6; color: #c2510a; font-weight: 700; }
/* The settings sheet in an exam: its title and the language only (sound / second try / streak are practice things). */
body.pui-app.pa-exam .pa-sheet-title { display: block; padding: 0 20px 8px; color: var(--pa-ink); font-size: 18px; font-weight: 700; }

/* Bottom bar */
body.pui-app.pa-exam .paper-bar {
    position: relative;
    z-index: 32;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: #fff;
    gap: 8px;
}
body.pui-app.pa-exam .paper-bar::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 28px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
body.pui-app.pa-exam .paper-bar-btn {
    height: 46px;
    min-width: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: #f2f2f3;
    color: #33333d;
    font-weight: 700;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pui-app.pa-exam .paper-bar-btn:active { transform: scale(0.97); background: #e9e9ec; }
body.pui-app.pa-exam .paper-bar-tutor { padding: 0; width: 46px; }
body.pui-app.pa-exam .paper-bar-submit,
body.pui-app.pa-exam .paper-bar-submit.is-ready { background: #f26a1b; color: #fff; padding: 0 20px; }
body.pui-app.pa-exam .paper-bar-submit:active { background: #e35d10; }
body.pui-app.pa-exam .paper-bar-save { color: #a3a3ab; }
body.pui-app.pa-exam .pa-bar-continue,
body.pui-app.pa-exam #paAskAi { display: none !important; }
:root[data-theme="dark"] body.pui-app.pa-exam .paper-bar { background: var(--pa-bg); }
:root[data-theme="dark"] body.pui-app.pa-exam .paper-bar::before { background: linear-gradient(to bottom, transparent, var(--pa-bg)); }
:root[data-theme="dark"] body.pui-app.pa-exam .paper-bar-btn { background: rgba(255, 255, 255, 0.08); color: var(--text, #eee); }
/* Phones: 下一道未答 as an icon square (its words don't fit beside the grid and 交卷); 交卷 takes the space left. */
@media (max-width: 520px) {
    body.pui-app.pa-exam .paper-bar-next { width: 46px; padding: 0; justify-content: center; }
    body.pui-app.pa-exam .paper-bar-next-text { display: none; }
    body.pui-app.pa-exam .paper-bar-spacer { display: none; }
    body.pui-app.pa-exam .paper-bar-submit { flex: 1; }
}

/* Step 57 (2026-11-17): 考试模式 — the header carries a progress bar with "n / 40" in its middle (a tap opens the
   question grid); the bottom bar loses the grid button and the cloud (save) icon. */
.pa-exam-progress { display: none; }
body.pui-app.pa-exam .paper-progress-pill { display: none !important; }
body.pui-app.pa-exam .pa-exam-progress {
    position: relative;
    display: grid;
    flex: 1;
    place-items: center;
    min-width: 0;
    height: 26px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #f2f2f2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.pui-app.pa-exam .pa-exam-progress i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: inherit;
    background: #f9b48a;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.pui-app.pa-exam .pa-exam-progress span { position: relative; color: #4a3a30; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.pui-app.pa-exam .pa-exam-progress:active { transform: scale(0.99); }
body.pui-app.pa-exam .paper-bar-nav,
body.pui-app.pa-exam .paper-bar-save { display: none !important; }
body.pui-app.pa-exam .paper-bar-spacer { display: block !important; flex: 1; }
body.pui-app.pa-exam .content-header-actions { margin-left: 0; }
@media (max-width: 520px) {
    body.pui-app.pa-exam .paper-bar-spacer { display: none !important; }
}
:root[data-theme="dark"] body.pui-app.pa-exam .pa-exam-progress { background: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] body.pui-app.pa-exam .pa-exam-progress span { color: var(--text, #eee); }
/* The paper form's own submit row is not needed in this version — 交卷 is in the bottom bar (any mode). */
body.pui-app .paper-submit-row { display: none !important; }

/* ================= Step 58 (2026-11-17): feel — js/paper-app-fx.js ================= */

/* 2 · question to question: the old one (a copy) slides out left, the new one comes in from the right. */
body.pui-app .paper-quiz { position: relative; }
body.pui-app .pa-ghost { position: absolute; z-index: 1; display: flex !important; margin: 0; pointer-events: none; }
body.pui-app.pa-practising .paper-quiz.is-one .paper-question.is-current { animation: pa-q-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both; }
body.pui-app.pa-practising .paper-quiz.is-one .paper-question.is-current.is-shake { animation: pm-shake 0.4s ease; }
@keyframes pa-q-in { from { opacity: 0; transform: translateX(56px); } to { opacity: 1; transform: none; } }

/* 3 · options: a press, then the verdict sweeps across (green right / pink wrong), the wrong one shakes. */
body.pui-app .paper-option { transition: transform 0.12s ease, background-color 0.18s ease, opacity 0.18s ease; }
body.pui-app .paper-option:active:not(:has(:disabled)) { transform: scale(0.98); }
body.pui-app.pa-practising .paper-option.is-correct {
    background: linear-gradient(#e6f4ec, #e6f4ec) left / 0% 100% no-repeat, #fff;
    animation: pa-sweep 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
body.pui-app.pa-practising .paper-option.is-wrong {
    background: linear-gradient(#fbe9ec, #fbe9ec) left / 0% 100% no-repeat, #fff;
    animation: pa-sweep 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards, pa-opt-shake 0.36s ease 0.05s;
}
@keyframes pa-sweep { to { background-size: 100% 100%, auto; } }
@keyframes pa-opt-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
body.pui-app.pa-practising .paper-option.is-correct .paper-option-letter { animation: pa-letter-pop 0.4s cubic-bezier(0.34, 1.6, 0.6, 1) 0.15s both; }
@keyframes pa-letter-pop { 0% { transform: scale(0.7); } 70% { transform: scale(1.15); } 100% { transform: none; } }
body.pui-app.pa-practising .paper-option-badge { animation: pa-cheer-rise 0.3s ease 0.25s both; }

/* 5 · marks on the progress bars at 10 / 20 / 30. */
body.pui-app .pm-progress, body.pui-app .pa-exam-progress { position: relative; }
body.pui-app .pa-mark {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #d6d6da;
    pointer-events: none;
}
body.pui-app .pa-mark.is-on { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
body.pui-app .pa-mark.is-pop { animation: pa-mark-pop 0.5s cubic-bezier(0.34, 1.6, 0.6, 1); }
@keyframes pa-mark-pop { 0% { transform: scale(1); } 50% { transform: scale(2.2); } 100% { transform: scale(1); } }

/* 4 · the day's streak screen. */
.pa-streakday {
    position: fixed;
    inset: 0;
    z-index: 370;
    display: flex;
    flex-direction: column;
    padding: max(24px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
    background: #fff;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-streakday[hidden] { display: none; }
.pa-streakday.is-on { opacity: 1; transform: none; }
.pa-streakday-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pa-streakday-fire { position: relative; display: grid; place-items: center; width: 180px; height: 180px; }
.pa-streakday-fire img { width: 160px; height: 160px; animation: pa-flicker 1.1s ease-in-out infinite; }
.pa-streakday.is-on .pa-streakday-fire { animation: pa-cheer-pop 0.6s cubic-bezier(0.34, 1.6, 0.6, 1) 0.1s both; }
.pa-streakday-fire b { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 44px; font-weight: 900; text-shadow: 0 2px 0 rgba(160, 60, 0, 0.35); font-variant-numeric: tabular-nums; }
.pa-streakday-fire b.is-bump { animation: pa-day-bump 0.5s cubic-bezier(0.34, 1.6, 0.6, 1); }
@keyframes pa-day-bump { 0% { transform: translateX(-50%) scale(1); } 45% { transform: translateX(-50%) scale(1.45); } 100% { transform: translateX(-50%) scale(1); } }
.pa-streakday h2 { margin: 18px 0 6px; color: #23232b; font-size: 28px; font-weight: 800; }
.pa-streakday p { margin: 0 0 26px; color: #7a7a85; font-size: 15px; }
.pa-streakday-week { display: flex; gap: 10px; }
.pa-wk { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pa-wk i { width: 30px; height: 30px; border-radius: 50%; background: #f2f2f3; }
.pa-wk.is-done i { background: #ffb020 url("/images/emoji-3d/fire-noto.webp") center / 70% no-repeat; }
.pa-wk.is-today i { box-shadow: 0 0 0 3px #ffe0b2; }
.pa-streakday.is-on .pa-wk.is-today i { animation: pa-cheer-pop 0.5s cubic-bezier(0.34, 1.6, 0.6, 1) 0.7s both; }
.pa-wk small { color: #9a9aa2; font-size: 11.5px; font-weight: 700; }
.pa-wk.is-today small { color: #f26a1b; }

/* 7 · one line under the result's title, by score. */
body.pui-app .pa-result-line { margin: 4px 0 0; color: #7a7a85; font-size: 14px; }
body.pui-app .pa-result-line[hidden] { display: none; }

/* 8 · share: the button (result header) and the picture to save. */
.pa-share-btn { display: none !important; }
body.pui-app.pa-result .pa-share-btn {
    display: grid !important;
    flex: none;
    order: 3;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #5c5a55;
}
body.pui-app.pa-result .pa-share-btn .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pui-app.pa-result .pa-settings-btn { order: 4; }
.pa-share { position: fixed; inset: 0; z-index: 430; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pa-share[hidden] { display: none; }
.pa-share-dim { position: absolute; inset: 0; background: rgba(12, 12, 14, 0.55); opacity: 0; transition: opacity 0.25s ease; }
.pa-share.is-on .pa-share-dim { opacity: 1; }
.pa-share-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 340px;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-share.is-on .pa-share-panel { opacity: 1; transform: none; }
.pa-share-panel img { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 14px; background: #f6f6f7; }
.pa-share-panel p { margin: 0; color: #7a7a85; font-size: 13px; text-align: center; }
.pa-share-save, .pa-share-close { display: grid; place-items: center; width: 100%; height: 46px; border: 0; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pa-share-save { background: #f26a1b; color: #fff; }
.pa-share-close { background: #f2f2f3; color: #33333d; }

/* 9 · the exam timer: a ring that empties; orange and pulsing in the last 5 minutes. */
body.pui-app .timer-pill { gap: 6px; }
body.pui-app .pa-timer-ring { flex: none; width: 20px; height: 20px; transform: rotate(-90deg); }
body.pui-app .timer-pill .pa-timer-ring + .material-symbols-outlined { display: none; }
body.pui-app .pa-timer-ring circle { fill: none; stroke-width: 3; stroke-linecap: round; }
body.pui-app .pa-tr-track { stroke: rgba(0, 0, 0, 0.08); }
body.pui-app .pa-tr-fill { stroke: #f26a1b; transition: stroke-dashoffset 1s linear; }
body.pui-app .timer-pill.pa-warn { background: #ffe0cc !important; color: #c2510a !important; animation: pa-warn-pulse 1.2s ease-in-out infinite; }
body.pui-app .timer-pill.is-done { background: #fbe9ec !important; color: #b0485f !important; animation: pa-opt-shake 0.4s ease 2; }
@keyframes pa-warn-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* 1 · the vibration switch shows in every mode (it covers the exam's timer too). */
body.pui-app.pa-exam .pa-sound-row:not(.pa-opt-row) { display: flex; padding: 8px 20px 14px; border-bottom: 1px solid var(--pa-line); }
body.pui-app.pa-exam .pa-haptic-row { display: flex; padding: 12px 20px; margin-bottom: 6px; border-bottom: 1px solid var(--pa-line); }

@media (prefers-reduced-motion: reduce) {
    body.pui-app .paper-option, body.pui-app .pa-mark, .pa-streakday, .pa-streakday-fire, .pa-streakday-fire img, .pa-wk i, body.pui-app .timer-pill { animation: none !important; transition: none !important; }
    body.pui-app.pa-practising .paper-option.is-correct { background: #e6f4ec; }
    body.pui-app.pa-practising .paper-option.is-wrong { background: #fbe9ec; }
}
:root[data-theme="dark"] .pa-streakday { background: var(--pa-bg, #1f1e1c); }
:root[data-theme="dark"] .pa-streakday h2 { color: var(--text, #eee); }
:root[data-theme="dark"] .pa-share-panel { background: var(--pa-card, #262523); }
/* The slide-out copy: still, in its final colours (no sweep / pop replays). */
body.pui-app .pa-ghost * { animation: none !important; transition: none !important; }
body.pui-app .pa-ghost .paper-option.is-correct { background: #e6f4ec; }
body.pui-app .pa-ghost .paper-option.is-wrong { background: #fbe9ec; }
.pa-streakday-fire b { -webkit-text-stroke: 8px #e8590c; paint-order: stroke fill; text-shadow: none; font-size: 50px; }

/* Step 59 (2026-11-17): 考试模式 — the brief orange flash on the question you jump to fills the whole row, edge to
   edge (a box-shadow spread clipped to the row's height: no page overflow). The clip only lives while it plays. */
body.pui-app.pa-exam .paper-question.is-flash { animation: pa-row-flash 1.2s ease; }
@keyframes pa-row-flash {
    0%, 40% { background-color: #fff4ec; box-shadow: 0 0 0 100vmax #fff4ec; clip-path: inset(0 -100vmax); }
    100% { background-color: rgba(255, 244, 236, 0); box-shadow: 0 0 0 100vmax rgba(255, 244, 236, 0); clip-path: inset(0 -100vmax); }
}
:root[data-theme="dark"] body.pui-app.pa-exam .paper-question.is-flash { animation-name: pa-row-flash-dark; }
@keyframes pa-row-flash-dark {
    0%, 40% { background-color: rgba(242, 106, 27, 0.14); box-shadow: 0 0 0 100vmax rgba(242, 106, 27, 0.14); clip-path: inset(0 -100vmax); }
    100% { background-color: rgba(242, 106, 27, 0); box-shadow: 0 0 0 100vmax rgba(242, 106, 27, 0); clip-path: inset(0 -100vmax); }
}
/* The hairlines above and below it fade out with the colour (they'd show as short lines inside the band). */
body.pui-app.pa-exam .paper-question.is-flash,
body.pui-app.pa-exam .paper-question.is-flash + .paper-question { animation-name: pa-row-flash, pa-line-hide; animation-duration: 1.2s; animation-timing-function: ease; }
body.pui-app.pa-exam .paper-question.is-flash + .paper-question { animation-name: pa-line-hide; }
:root[data-theme="dark"] body.pui-app.pa-exam .paper-question.is-flash { animation-name: pa-row-flash-dark, pa-line-hide; }
@keyframes pa-line-hide { 0%, 40% { border-top-color: transparent; } }
@media (prefers-reduced-motion: reduce) { body.pui-app.pa-exam .paper-question.is-flash, body.pui-app.pa-exam .paper-question.is-flash + .paper-question { animation: none; } }

/* ================= Step 60 (2026-11-17): 考试模式 timer — js/paper-app-timer.js ================= */
.pa-timer { display: none; }
body.pui-app.pa-exam.pa-has-timer #timerControl { display: none !important; }
body.pui-app.pa-exam .pa-timer:not([hidden]) {
    display: inline-flex;
    flex: none;
    order: 5;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px 0 9px;
    border: 0;
    border-radius: 12px;
    background: #f2f2f2;
    color: #3b3a37;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.12s ease;
}
body.pui-app.pa-exam .pa-timer:active { transform: scale(0.96); }
body.pui-app .pa-timer svg { flex: none; width: 20px; height: 20px; transform: rotate(-90deg); }
body.pui-app .pa-timer circle { fill: none; stroke-width: 3; stroke-linecap: round; }
body.pui-app .pa-timer .pa-tr-track { stroke: rgba(0, 0, 0, 0.08); }
body.pui-app .pa-timer .pa-tr-fill { stroke: #f26a1b; transition: stroke-dashoffset 0.5s linear; }
/* Digits hidden: the ring alone, a round button. */
body.pui-app .pa-timer.is-hidden .pa-timer-text { display: none; }
body.pui-app.pa-exam .pa-timer.is-hidden:not([hidden]) { width: 36px; padding: 0; justify-content: center; }
/* The last 5 minutes. */
body.pui-app .pa-timer.is-low { background: #ffe0cc; color: #c2510a; animation: pa-warn-pulse 1.2s ease-in-out infinite; }
body.pui-app .pa-timer.is-low .pa-tr-track { stroke: rgba(194, 81, 10, 0.15); }
/* Over time (after 继续作答). */
body.pui-app .pa-timer.is-over { background: #fbe9ec; color: #b0485f; }
body.pui-app .pa-timer.is-over .pa-tr-fill { stroke: #e0738a; }
/* Tap menu (2026-11-19): 隐藏时间 / 显示时间, 重新计时 (second tap confirms — the row turns red first). */
.pa-timer-menu {
    position: fixed;
    z-index: 380;
    min-width: 176px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: pa-tm-in 0.14s ease-out;
}
.pa-timer-menu button {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #3b3a37;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pa-timer-menu button:hover, .pa-timer-menu button:focus-visible { background: #f2f2f2; outline: none; }
.pa-timer-menu button.is-armed, .pa-timer-menu button.is-armed:hover { background: #fdecea; color: #c0392b; }
@keyframes pa-tm-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .pa-timer-menu { animation: none; } }
:root[data-theme="dark"] .pa-timer-menu { background: #2a2927; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07); }
:root[data-theme="dark"] .pa-timer-menu button { color: var(--text, #eee); }
:root[data-theme="dark"] .pa-timer-menu button:hover, :root[data-theme="dark"] .pa-timer-menu button:focus-visible { background: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] .pa-timer-menu button.is-armed, :root[data-theme="dark"] .pa-timer-menu button.is-armed:hover { background: rgba(224, 115, 138, 0.18); color: #f2a7b6; }

/* Even pace: where you'd be by now — a pale band under the real fill. Behind shows as pale orange past the fill;
   level or ahead, the fill covers it. (A line would cut through the count in the middle.) */
body.pui-app .pa-pace {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: inherit;
    background: rgba(249, 180, 138, 0.38);
    pointer-events: none;
    transition: width 0.5s linear;
}
body.pui-app .pa-pace[hidden] { display: none; }
body.pui-app.pa-exam .pa-exam-progress span { z-index: 2; }

/* The start screen's exam card: the time. */
body.pui-app .pa-mode-time[hidden] { display: none; }

/* Settings: the 考试计时 switch shows for exams and on the start screen. */
body.pui-app .pa-timer-row { display: none; }
body.pui-app.pa-exam .pa-timer-row { display: flex; padding: 12px 20px; border-bottom: 1px solid var(--pa-line); }
body.pui-app.is-practice .pa-timer-row { display: none !important; }

/* 时间到 page. */
.pa-timeup {
    position: fixed;
    inset: 0;
    z-index: 380;
    display: flex;
    flex-direction: column;
    padding: max(24px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
    background: #fff;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-timeup[hidden] { display: none; }
.pa-timeup:focus { outline: none; }
.pa-timeup.is-on { opacity: 1; transform: none; }
.pa-timeup-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pa-timeup-icon {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: #ffe9db;
    color: #f26a1b;
    --icon-size: 60px;
    font-size: 60px;
}
.pa-timeup.is-on .pa-timeup-icon { animation: pa-ring-shake 0.9s ease 0.2s; }
@keyframes pa-ring-shake { 0%, 100% { transform: none; } 15% { transform: rotate(-14deg); } 30% { transform: rotate(12deg); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
.pa-timeup h2 { margin: 22px 0 6px; color: #23232b; font-size: 28px; font-weight: 800; }
.pa-timeup p { margin: 0; color: #7a7a85; font-size: 15px; }
.pa-timeup-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 720px; margin: 0 auto; }
.pa-timeup-actions .pa-cheer-go { width: 100%; }
.pa-timeup-more { height: 52px; border: 0; border-radius: 16px; background: #f2f2f3; color: #33333d; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }

/* Reminders: a white rounded card under the header (timer icon + one line). */
.pa-time-toast {
    position: fixed;
    top: calc(var(--header-height, 64px) + 8px);
    left: 50%;
    z-index: 360;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: min(calc(100vw - 32px), 420px);
    padding: 12px 16px 12px 14px;
    border: 1px solid #ececee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 20, 30, 0.08), 0 1px 3px rgba(20, 20, 30, 0.05);
    color: #23232b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.pa-time-toast[hidden] { display: none; }
.pa-time-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pa-time-toast .material-symbols-outlined { flex: none; color: #f26a1b; --icon-size: 20px; font-size: 20px; }
:root[data-theme="dark"] .pa-time-toast { border-color: rgba(255, 255, 255, 0.08); background: var(--pa-card, #2a2927); color: var(--text, #eee); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }

/* Result: time used. */
body.pui-app .pa-result-time {
    order: 1;
    display: flex;
    text-align: left;
    align-items: center;
    gap: 12px;
    margin: 12px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f4f4f5;
}
body.pui-app .pa-result-time[hidden] { display: none; }
body.pui-app .pa-result-time > .material-symbols-outlined { color: #f26a1b; --icon-size: 24px; font-size: 24px; }
body.pui-app .pa-result-time-text { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; }
body.pui-app .pa-result-time-text b { color: #23232b; font-size: 15px; font-variant-numeric: tabular-nums; }
body.pui-app .pa-result-time-text small { color: #8a8a93; font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.pui-app .pa-result-time-diff { flex: none; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
body.pui-app .pa-result-time-diff.is-under { background: #e3f4ea; color: #2e8a57; }
body.pui-app .pa-result-time-diff.is-over { background: #fbe9ec; color: #b0485f; }
body.pui-app .pa-result-time-diff.is-even { background: #ececee; color: #55555e; }

@media (prefers-reduced-motion: reduce) {
    body.pui-app .pa-timer, .pa-timeup, .pa-timeup-icon, .pa-time-toast, body.pui-app .pa-pace { animation: none !important; transition: none !important; }
}
:root[data-theme="dark"] body.pui-app.pa-exam .pa-timer:not(.is-low):not(.is-over) { background: rgba(255, 255, 255, 0.08); color: var(--text, #eee); }
:root[data-theme="dark"] .pa-timeup { background: var(--pa-bg, #1f1e1c); }
:root[data-theme="dark"] .pa-timeup h2 { color: var(--text, #eee); }
:root[data-theme="dark"] body.pui-app .pa-result-time { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] body.pui-app .pa-result-time-text b { color: var(--text, #eee); }

/* Step 61 (2026-11-18, toned down the same night): 练习模式 first, a pale orange card with a small 推荐使用 tag by its
   name; 考试模式 below it, the same size, grey. No raised edge, no extra motion. */
body.pui-app .paper-mode-opt.pa-mode-main { background: #fff3ea; }
body.pui-app .paper-mode-opt.pa-mode-main:hover { background: #ffecdf; }
body.pui-app .paper-mode-opt.pa-mode-main:active { background: #ffe4d2; }
body.pui-app .pa-mode-main .paper-mode-icon,
body.pui-app .paper-mode-opt.pa-mode-main[data-mode="practice"] .paper-mode-icon,
body.pui-app .paper-mode-opt.pa-mode-main:hover .paper-mode-icon { background: #ffe0cc; color: #f26a1b; }
body.pui-app .pa-mode-main .paper-mode-text strong { display: inline-flex; align-items: center; gap: 8px; }
body.pui-app .pa-mode-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f26a1b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
}
body.pui-app .paper-mode-opt[data-mode="exam"] .paper-mode-icon { background: #ececee; color: #6b6b74; }
body.pui-app .paper-mode-opt[data-mode="exam"]:hover .paper-mode-icon { background: #e4e4e7; color: #6b6b74; }

/* Step 62 (2026-11-18): no flash of the plain question list on opening — the paper stays hidden until the page's
   scripts have set it up (body.pa-booting, removed right after them in papers-show-app). If a script never gets
   there, it shows anyway after 4 s. */
body.pa-booting .content-panel { visibility: hidden; animation: pa-boot-reveal 0s linear 4s forwards; }
@keyframes pa-boot-reveal { to { visibility: visible; } }

/* Step 63 (2026-11-18): 考试模式 opens with the paper's card above Q1 (subject, title, source · year, count, where the
   answers and explanations come from, 分享 / 收藏 / 下载) — a pale grey card, white buttons. Not on the start
   screen, in 练习模式 or on the result. */
body.pui-app .paper-info { display: none; }
body.pui-app.pa-exam .paper-info {
    display: block;
    margin: 4px 0 10px;
    padding: 18px 18px 16px;
    border: 0;
    border-radius: 20px;
    background: #f6f6f7;
    box-shadow: none;
    text-align: left;
}
body.pui-app.pa-exam .paper-info-kicker { display: block; color: #8a8a93; font-size: 13px; font-weight: 700; }
body.pui-app.pa-exam .paper-info-title { margin: 2px 0 10px; color: #23232b; font-size: 20px; font-weight: 800; line-height: 1.3; }
body.pui-app.pa-exam .paper-info-chips li { padding: 4px 10px; border-radius: 999px; background: #fff; color: #55555e; font-size: 12.5px; font-weight: 700; }
body.pui-app.pa-exam .paper-info-about { color: #23232b; }
body.pui-app.pa-exam .paper-info-about dt { color: #8a8a93; }
body.pui-app.pa-exam .paper-info-act { background: #fff; color: #33333d; font-weight: 700; transition: transform 0.12s ease, background-color 0.15s ease; }
body.pui-app.pa-exam .paper-info-act:active { transform: scale(0.97); background: #f0f0f2; }
body.pui-app.pa-exam .paper-info-act .material-symbols-outlined { --icon-size: 18px; font-size: 18px; }
body.pui-app.pa-exam .paper-info-act.is-on { color: #c2510a; }
body.pui-app.pa-exam .paper-info-act.is-on .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
body.pui-app.pa-exam .paper-info-title { text-wrap: balance; }
@media (max-width: 520px) { body.pui-app.pa-exam .paper-info-title { font-size: 18px; } }

/* Step 64 (2026-11-18): the card's three buttons — a small press with a springy release, and one move per icon:
   分享 hops up, 收藏 pops (and fills), 下载 dips down (js/paper-app-fx.js adds .is-tap). */
body.pui-app.pa-exam .paper-info-act { transition: transform 0.28s cubic-bezier(0.34, 1.6, 0.6, 1), background-color 0.15s ease; }
body.pui-app.pa-exam .paper-info-act:active { transform: scale(0.95); transition-duration: 0.08s; }
body.pui-app.pa-exam .paper-info-act .material-symbols-outlined { transition: font-variation-settings 0.2s ease; }
body.pui-app #ppShare.is-tap .material-symbols-outlined { animation: pa-act-hop 0.45s cubic-bezier(0.34, 1.6, 0.6, 1); }
body.pui-app #ppFavorite.is-tap .material-symbols-outlined { animation: pa-act-pop 0.45s cubic-bezier(0.34, 1.6, 0.6, 1); }
body.pui-app #ppDownload.is-tap .material-symbols-outlined { animation: pa-act-dip 0.5s cubic-bezier(0.34, 1.6, 0.6, 1); }
@keyframes pa-act-hop { 0% { transform: none; } 40% { transform: translateY(-5px); } 100% { transform: none; } }
@keyframes pa-act-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes pa-act-dip { 0% { transform: none; } 40% { transform: translateY(5px); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    body.pui-app .paper-info-act .material-symbols-outlined { animation: none !important; }
    body.pui-app.pa-exam .paper-info-act { transition: none; }
}

/* ================= Step 65 (2026-11-18): 下载 PDF choices — js/paper-pdf.js ================= */
.pa-dl { position: fixed; inset: 0; z-index: 420; display: flex; align-items: flex-end; justify-content: center; }
.pa-dl[hidden] { display: none; }
.pa-dl-dim { position: absolute; inset: 0; background: rgba(12, 12, 14, 0.42); opacity: 0; transition: opacity 0.25s ease; }
.pa-dl.is-on .pa-dl-dim { opacity: 1; }
.pa-dl-panel {
    position: relative;
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    padding: 10px 20px max(18px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pa-dl.is-on .pa-dl-panel { transform: none; }
.pa-dl-grab { display: block; width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: #e2e2e5; }
.pa-dl-title { margin: 0 0 14px; color: #23232b; font-size: 20px; font-weight: 800; }
.pa-dl-label { margin: 0 0 8px; color: #8a8a93; font-size: 13px; font-weight: 700; }
.pa-dl-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.pa-dl-choices.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pa-dl-choice {
    min-height: 46px;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    background: #f4f4f5;
    color: #33333d;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.6, 0.6, 1), background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.pa-dl-choice:active { transform: scale(0.96); transition-duration: 0.08s; }
.pa-dl-choice.is-on { background: #fff1e6; color: #c2510a; box-shadow: inset 0 0 0 2px #f26a1b; }
.pa-dl-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; color: #23232b; font-size: 15px; font-weight: 700; transition: opacity 0.2s ease; }
.pa-dl-row.is-off { opacity: 0.4; }
.pa-dl-note { margin: 0 0 14px; color: #8a8a93; font-size: 12.5px; line-height: 1.5; }
.pa-dl-go {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: #f26a1b;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
.pa-dl-go:active { transform: scale(0.98); }
.pa-dl-go.is-busy { background: #f4935a; cursor: progress; }
.pa-dl-spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: pa-dl-spin 0.8s linear infinite; }
.pa-dl-go.is-busy .pa-dl-spin { display: block; }
@keyframes pa-dl-spin { to { transform: rotate(360deg); } }
@media (min-width: 481px) {
    .pa-dl { align-items: center; padding: 24px; }
    .pa-dl-panel { max-width: 440px; padding: 22px 24px 22px; border-radius: 24px; transform: scale(0.96); opacity: 0; transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease; }
    .pa-dl.is-on .pa-dl-panel { transform: none; opacity: 1; }
    .pa-dl-grab { display: none; }
}
.pa-dl-toast {
    position: fixed;
    bottom: calc(var(--pa-bar-h, 80px) + 16px);
    left: 50%;
    z-index: 440;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border: 1px solid #ececee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 20, 30, 0.1);
    color: #23232b;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.pa-dl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .pa-dl-panel, .pa-dl-dim, .pa-dl-choice, .pa-dl-toast { transition: none; } }
.pa-dl-left { margin: 10px 0 0; color: #8a8a93; font-size: 12.5px; font-weight: 600; text-align: center; }
.pa-dl-left[hidden] { display: none; }
.pa-dl-left.is-limit { color: #c2510a; font-size: 13.5px; font-weight: 700; line-height: 1.45; animation: pa-opt-shake 0.36s ease; }
.pa-dl-toast { width: max-content; max-width: min(calc(100vw - 32px), 420px); text-align: center; }

/* Step 66 (2026-11-18): 时间到 shows the owner's kancil with an alarm clock (one of three) instead of the icon. */
.pa-timeup-art { display: block; width: 190px; height: 190px; object-fit: contain; }
.pa-timeup.is-on .pa-timeup-art { animation: pa-ring-shake 0.9s ease 0.2s; }
@media (prefers-reduced-motion: reduce) { .pa-timeup.is-on .pa-timeup-art { animation: none; } }

/* 无尽 practice: the page fades while the next questions load (paper-practice.js nextBatch). */
.practice-quiz.is-leaving { opacity: 0; transition: opacity 0.2s ease; }
@media (prefers-reduced-motion: reduce) { .practice-quiz.is-leaving { transition: none; } }
