/* 按考点练习 / 错题 & 收藏 practice — the set page (papers-practice.blade.php),
   on top of course.css + paper.css (and the look being tried out, if any).
   Neutral, one peach accent, green / pink for right / wrong; no shadows. */

.practice-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.practice-topics { color: #6b6a66; font-size: 13px; font-weight: 600; line-height: 1.5; }

/* One dot per question: where you are, and how each went. The run of right
   answers and the sound button (paper.css, as in 练习模式) sit to the right. */
.practice-meter { display: flex; align-items: center; gap: 12px; }
.practice-dots { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }
.practice-dot { width: 22px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #e9e6e0; cursor: pointer; transition: background-color 0.2s ease, width 0.2s ease; }
.practice-dot[data-state="correct"],
.practice-dot[data-state="ungraded"] { background: #a7dcbf; }
.practice-dot[data-state="wrong"] { background: #f1a9b8; }
.practice-dot.is-current { width: 34px; background: #f2a07b; }
.practice-dot.is-current[data-state="correct"] { background: #6fc496; }
.practice-dot.is-current[data-state="wrong"] { background: #e7849a; }

/* Only the current question, once the script has taken over (without it, all show). */
.practice-quiz.is-ready .practice-question:not(.is-current) { display: none; }
.practice-question { animation: practice-in 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes practice-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Which paper the question is from. */
.practice-source { margin-bottom: 10px; color: #8a8984; font-size: 12px; font-weight: 600; }
.pui-a .practice-source { order: 0; margin-bottom: 12px; }

/* Bar: ← · 3 / 10 · 下一题 */
.practice-bar-count { color: #6b6a66; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
#practicePrev { width: 40px; padding: 0; }
#practicePrev:disabled { opacity: 0.4; cursor: default; }

/* ---------- Summary ---------- */
.practice-note { margin: 0; color: #6b6a66; font-size: 13.5px; line-height: 1.5; }
.practice-review-list { display: flex; flex-wrap: wrap; gap: 8px; }
.practice-review-chip { min-width: 40px; height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: #fbe9ec; color: #b0485f; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.practice-review-chip[data-state="open"] { background: #efede8; color: #6b6a66; }
.practice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.practice-actions form { margin: 0; }
.practice-link { display: inline-flex; align-items: center; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    .practice-question { animation: none; }
    .practice-dot { transition: none; }
}

/* ======================================================================
   The chapter picker (papers-practice-topics.blade.php) and the entry card
   on a subject's paper list — pages with the side menu (chat.css).
   ====================================================================== */
.tp-intro { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.tp-intro-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #fff0e6; color: #8a4116; --icon-size: 24px; font-size: 24px; }
.tp-intro h1 { margin: 2px 0 4px; font-size: 20px; }
.tp-intro p { margin: 0; color: #6b6a66; font-size: 13.5px; line-height: 1.6; }

.tp-flash { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #fff0e6; color: #8a4116; font-size: 13.5px; }
.tp-continue { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; border-radius: 14px; background: #fff0e6; color: #8a4116; font-size: 14px; font-weight: 600; text-decoration: none; }
.tp-continue .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
.tp-continue span:last-child { margin-left: auto; }

.tp-form-title { margin: 22px 0 10px; color: #6b6a66; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.tp-form-title:first-of-type { margin-top: 4px; }
.tp-list { display: flex; flex-direction: column; gap: 8px; }
.tp-topic { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border, #e3e4e8); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.tp-topic:hover { border-color: #d9d5ce; }
.tp-topic input { position: absolute; opacity: 0; pointer-events: none; }
.tp-check { display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid #cfcbc3; border-radius: 8px; color: transparent; --icon-size: 18px; font-size: 18px; transition: background-color 0.15s ease, border-color 0.15s ease; }
.tp-topic:has(input:checked) { border-color: #f2c4a6; background: #fff7f1; }
.tp-topic:has(input:checked) .tp-check { border-color: #f2a07b; background: #f2a07b; color: #fff; }
.tp-topic:has(input:focus-visible) { outline: 2px solid #f2a07b; outline-offset: 2px; }
.tp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tp-main strong { font-size: 14.5px; line-height: 1.4; }
.tp-main small { overflow: hidden; color: #8a8984; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tp-progress { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 92px; }
.tp-progress-text { color: #6b6a66; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-bar { width: 92px; height: 6px; border-radius: 999px; background: #efede8; overflow: hidden; }
.tp-bar i { display: block; height: 100%; border-radius: inherit; background: #f2a07b; }
.tp-wrong { padding: 1px 8px; border-radius: 999px; background: #fbe9ec; color: #b0485f; font-size: 11.5px; font-weight: 700; }
.tp-empty { padding: 40px 0; color: #6b6a66; font-size: 14px; text-align: center; }

/* The start bar, kept in reach at the bottom of the list. */
.tp-dock { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding: 10px; border-radius: 20px; background: #fff;
    /* An outline, not a border: the fade below is painted over the bar's own background, an outline on top of it. */
    outline: 1px solid var(--border, #e3e4e8); outline-offset: -1px; }
/* Behind the start bar: white from the bottom, fading to clear above it, so the list fades out
   underneath. Hangs off the bar, so it follows the bar's height (it can wrap to two rows). */
.tp-dock::before { content: ""; position: absolute; z-index: -1; top: -40px; right: -24px; bottom: -40px; left: -24px; background: linear-gradient(to top, #fff calc(100% - 40px), rgba(255, 255, 255, 0)); pointer-events: none; }
.tp-size { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: #f4f2ee; }
.tp-size label { position: relative; }
.tp-size input { position: absolute; opacity: 0; pointer-events: none; }
.tp-size span { display: block; height: 34px; padding: 0 14px; border-radius: 999px; color: #6b6a66; font-size: 13px; font-weight: 600; line-height: 34px; cursor: pointer; }
.tp-size input:checked + span { background: #fff; color: #23232b; }
.tp-size input:focus-visible + span { outline: 2px solid #f2a07b; }
.tp-start { display: inline-flex; align-items: center; gap: 6px; height: 42px; margin-left: auto; padding: 0 20px; border: 0; border-radius: 999px; background: #ffd7c2; color: #8a4116; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.tp-start:hover:not(:disabled) { background: #ffcbb1; }
.tp-start:disabled { opacity: 0.45; cursor: default; }
.tp-start small { font-size: 12px; font-weight: 600; opacity: 0.8; }

@media (max-width: 720px) {
    .tp-topic { padding: 12px 14px; gap: 10px; }
    .tp-progress { min-width: 70px; }
    .tp-bar { width: 70px; }
    /* Pinned just above the bottom navigation. (Sticky inside .chat-scroll stacked the dock's
       height twice — the scroll area's own bottom padding already makes room for it.) */
    .tp-dock { position: fixed; left: 12px; right: 12px; bottom: calc(var(--dock-h, 0px) + 8px); z-index: 20; margin: 0; }
    #tpForm { padding-bottom: 72px; }
    /* Down to the bottom of the screen (behind the navigation too), fading out 36px above the bar. */
    .tp-dock::before { top: -36px; right: -12px; bottom: calc(-1 * (var(--dock-h, 0px) + 8px)); left: -12px; background: linear-gradient(to top, #fff calc(100% - 36px), rgba(255, 255, 255, 0)); }
    .tp-start { flex: 1; justify-content: center; }
}

/* The result in the paper page's app look (2026-11-18, paper-app.css Step 37/43): the "wrong ones go to 错题本" line
   under the rings, quiet and centred. */
body.pui-app.pa-result .practice-summary .practice-note { order: 2; margin: 14px 0 0; color: #9a9aa2; font-size: 13px; text-align: center; }
/* 题目语言 in the settings sheet: 原文 + three languages as a 2 × 2 grid; 原文's card has a page icon for a flag. */
body.pui-app .paper-lang-menu .paper-lang-list.pp-lang-four { grid-template-columns: repeat(2, 1fr); }
body.pui-app .paper-lang-menu .pp-lang-orig { display: grid; place-items: center; background: #f2f2f3; color: #6b6b74; --icon-size: 20px; font-size: 20px; }
