:root{
  --practice-bg:#f5f7fb;
  --practice-card:#fff;
  --practice-text:#172033;
  --practice-muted:#738096;
  --practice-border:#e4e8f0;
  --practice-accent:#6d28d9;
  --practice-accent-soft:#f2ebff;
  --practice-danger:#e11d48;
  --practice-success:#16a34a;
  --practice-warning:#f59e0b;
  --practice-shadow:0 18px 50px rgba(31,41,55,.08);
}
*{box-sizing:border-box}
html,body{min-height:100%;margin:0}
body.practice-mode-page{background:var(--practice-bg);color:var(--practice-text);font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif}
button,select,input{font:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.practice-app{min-height:100vh}
.practice-header{height:64px;padding:0 clamp(18px,4vw,58px);display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.92);border-bottom:1px solid var(--practice-border);position:sticky;top:0;z-index:30;backdrop-filter:blur(16px)}
.practice-brand{display:inline-flex;align-items:center;gap:12px;text-decoration:none;color:var(--practice-text)}
.practice-brand-mark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:var(--practice-text);color:#fff;font-weight:800}
.practice-brand span:last-child{display:grid;line-height:1.05}.practice-brand strong{font-size:16px}.practice-brand small{margin-top:5px;color:var(--practice-muted);font-size:11px}
.practice-header .account-menu-trigger{min-height:38px}
.practice-main{width:min(1060px,calc(100% - 32px));margin:0 auto;padding:clamp(34px,6vw,72px) 0 56px}
.practice-lobby-head{text-align:center;max-width:680px;margin:0 auto 28px}.practice-lobby-head>span,.practice-checkpoint>span,.practice-result>span{font-size:11px;font-weight:800;letter-spacing:.18em;color:var(--practice-accent)}
.practice-lobby-head h1,.practice-checkpoint h1,.practice-result h1{font-size:clamp(28px,4vw,42px);letter-spacing:-.04em;margin:10px 0 8px}.practice-lobby-head p{margin:0;color:var(--practice-muted)}
.practice-setup-card{background:var(--practice-card);border:1px solid var(--practice-border);border-radius:22px;padding:22px;display:grid;grid-template-columns:minmax(260px,1.5fr) 1fr 1fr;gap:20px;box-shadow:var(--practice-shadow)}
.practice-field{display:grid;gap:7px}.practice-field>span,.practice-choice-group legend{font-size:12px;font-weight:750;color:#475569}.practice-field select{width:100%;height:44px;border:1px solid #d9dfeb;border-radius:12px;background:#fff;padding:0 12px;color:var(--practice-text);outline:none}.practice-field select:focus{border-color:var(--practice-accent);box-shadow:0 0 0 3px rgba(109,40,217,.12)}.practice-field small{min-height:16px;color:var(--practice-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.practice-choice-group{border:0;padding:0;margin:0;min-width:0}.practice-choice-group legend{margin-bottom:8px}
.practice-count-options,.practice-order-options{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.practice-order-options{grid-template-columns:1fr 1fr}
.practice-choice-group label{position:relative}.practice-choice-group input{position:absolute;opacity:0;pointer-events:none}.practice-choice-group label span{height:44px;border:1px solid #dce2eb;border-radius:12px;display:grid;place-items:center;background:#fff;color:#536075;font-size:13px;font-weight:700;transition:.15s ease}.practice-choice-group input:checked+span{background:var(--practice-text);border-color:var(--practice-text);color:#fff}.practice-choice-group input:disabled+span{opacity:.36;cursor:not-allowed}.practice-choice-group label:hover input:not(:disabled)+span{border-color:#9da8b9}
.practice-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.practice-mode-card{background:#fff;border:1px solid var(--practice-border);border-radius:22px;padding:24px;display:grid;grid-template-columns:auto 1fr;gap:17px;align-items:start;box-shadow:0 10px 30px rgba(31,41,55,.055);transition:transform .18s ease,border-color .18s ease}.practice-mode-card:hover{transform:translateY(-2px);border-color:#c8cfdc}.practice-mode-icon{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:var(--practice-accent-soft);color:var(--practice-accent);font-weight:900}.practice-mode-card.scholar .practice-mode-icon{background:#fff5d9;color:#b45309}.practice-mode-card small{font-size:10px;font-weight:850;letter-spacing:.16em;color:var(--practice-muted)}.practice-mode-card h2{margin:4px 0 7px;font-size:21px}.practice-mode-card p{margin:0;color:var(--practice-muted);font-size:13px;line-height:1.65}.practice-start-btn{grid-column:1/-1;height:44px;border:0;border-radius:13px;background:var(--practice-text);color:#fff;font-weight:760}.practice-mode-card.scholar .practice-start-btn{background:var(--practice-accent)}.practice-start-btn:disabled{opacity:.4;cursor:not-allowed}
.practice-history{margin-top:28px}.practice-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.practice-section-head h2{font-size:16px;margin:0}.practice-section-head button{border:0;background:transparent;color:var(--practice-muted);font-size:12px}.practice-history-list{display:grid;gap:8px}.practice-history-row{background:#fff;border:1px solid var(--practice-border);border-radius:14px;padding:12px 15px;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:14px;align-items:center}.practice-history-row strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.practice-history-row span{color:var(--practice-muted);font-size:12px;white-space:nowrap}.practice-history-row em{font-style:normal;font-size:11px;padding:5px 8px;border-radius:999px;background:#f1f5f9;color:#526071}
.practice-empty{margin:24px auto 0;padding:28px;background:#fff;border:1px dashed #cfd6e2;border-radius:18px;text-align:center}.practice-empty p{color:var(--practice-muted);margin:8px 0 0}
.practice-game{width:min(860px,100%);margin:0 auto;position:relative}.practice-game-topbar{display:grid;grid-template-columns:40px minmax(120px,1fr) auto auto auto auto;gap:12px;align-items:center;min-height:48px;margin-bottom:9px}.practice-exit-btn{width:36px;height:36px;border-radius:12px;border:1px solid #dce1e9;background:#fff;color:#526071;font-size:24px;line-height:1;display:flex;align-items:center;justify-content:center;padding:0;box-sizing:border-box}.practice-exit-btn:hover{color:var(--practice-danger);border-color:#fecdd3}.practice-progress-shell{height:8px;border-radius:999px;background:#e5e9f0;overflow:hidden}.practice-progress-shell span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7c3aed,#a855f7);transition:width .28s ease}.practice-health{display:flex;gap:3px;white-space:nowrap;font-size:17px;letter-spacing:-.05em}.practice-heart{color:#d9dee7}.practice-heart.active{color:#ef476f}.practice-scholar-stat{height:32px;display:inline-flex;align-items:baseline;gap:3px;padding:0 9px;border-radius:10px;background:#fff;border:1px solid var(--practice-border);font-size:11px;color:var(--practice-muted);white-space:nowrap}.practice-scholar-stat strong{font-size:14px;color:var(--practice-text)}.practice-timer strong{font-variant-numeric:tabular-nums}.practice-time-rail{height:3px;border-radius:999px;background:#e4e8ef;margin:0 0 18px 52px;overflow:hidden}.practice-time-rail span{display:block;width:100%;height:100%;background:var(--practice-success);transition:width .12s linear,background .2s ease}.practice-time-rail.is-tense span{background:var(--practice-warning)}.practice-time-rail.is-danger span{background:var(--practice-danger)}
.practice-streak-pop,.practice-feedback{position:absolute;z-index:5;left:50%;transform:translateX(-50%);padding:8px 13px;border-radius:999px;background:#111827;color:#fff;font-size:12px;font-weight:760;box-shadow:0 10px 24px rgba(17,24,39,.2);animation:practicePop .22s ease}.practice-streak-pop{top:-34px}.practice-feedback{top:58px}.practice-feedback.success{background:var(--practice-success)}.practice-feedback.danger{background:var(--practice-danger)}
@keyframes practicePop{from{opacity:0;transform:translate(-50%,7px) scale(.96)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
.practice-question-card{background:#fff;border:1px solid var(--practice-border);border-radius:24px;padding:clamp(24px,5vw,48px);box-shadow:var(--practice-shadow);min-height:430px;display:flex;flex-direction:column;justify-content:center}.practice-question-stem{font-size:clamp(18px,2.4vw,25px);font-weight:760;line-height:1.65;letter-spacing:-.01em;margin-bottom:26px;white-space:pre-wrap}.practice-options{display:grid;gap:11px}.practice-option{width:100%;border:1px solid #dfe4ec;border-radius:15px;background:#fff;color:var(--practice-text);padding:15px 17px;text-align:left;display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:start;line-height:1.55;transition:border-color .14s ease,background .14s ease,transform .14s ease}.practice-option:hover:not(:disabled){border-color:#9aa5b5;transform:translateY(-1px)}.practice-option:disabled{cursor:default}.practice-option-key{width:25px;height:25px;border-radius:8px;background:#f1f4f8;color:#526071;display:grid;place-items:center;font-weight:800;font-size:12px}.practice-option.is-correct{background:#dcfce7;border-color:#22c55e;color:#166534;animation:practiceCorrect .48s ease}.practice-option.is-wrong{background:#ffe4e6;border-color:#f43f5e;color:#9f1239;animation:practiceWrong .48s ease}.practice-question-card.is-timeout{animation:practiceShake .42s ease}
@keyframes practiceCorrect{0%,100%{background:#dcfce7;border-color:#22c55e}35%,70%{background:#bbf7d0;border-color:#15803d}}
@keyframes practiceWrong{0%,100%{background:#ffe4e6;border-color:#f43f5e}35%,70%{background:#fecdd3;border-color:#e11d48}}
@keyframes practiceShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-3px)}}
.practice-checkpoint,.practice-result{width:min(650px,100%);margin:clamp(30px,9vh,90px) auto 0;text-align:center;background:#fff;border:1px solid var(--practice-border);border-radius:24px;padding:clamp(30px,6vw,54px);box-shadow:var(--practice-shadow)}.practice-checkpoint-stats,.practice-result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:28px 0}.practice-checkpoint-stats div,.practice-result-stats div{padding:18px 10px;border-radius:15px;background:#f7f8fb}.practice-checkpoint-stats span,.practice-result-stats span{display:block;color:var(--practice-muted);font-size:12px;margin-bottom:7px}.practice-checkpoint-stats strong,.practice-result-stats strong{font-size:24px;font-variant-numeric:tabular-nums}.practice-primary-btn,.practice-secondary-btn,.practice-danger-btn{min-width:130px;height:44px;border-radius:13px;padding:0 20px;font-weight:750}.practice-primary-btn{border:0;background:var(--practice-accent);color:#fff}.practice-secondary-btn{border:1px solid #d7dde6;background:#fff;color:#475569}.practice-danger-btn{border:0;background:var(--practice-danger);color:#fff}.practice-result-actions{display:flex;justify-content:center;gap:10px}
.practice-exit-backdrop{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.38);display:grid;place-items:center;padding:20px}.practice-exit-dialog{width:min(420px,100%);background:#fff;border-radius:20px;padding:26px;box-shadow:0 24px 80px rgba(15,23,42,.24)}.practice-exit-dialog h2{margin:0 0 8px;font-size:21px}.practice-exit-dialog p{margin:0;color:var(--practice-muted);line-height:1.6}.practice-exit-dialog>div{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
@media (max-width:800px){.practice-setup-card{grid-template-columns:1fr}.practice-mode-grid{grid-template-columns:1fr}.practice-main{width:min(100% - 20px,700px);padding-top:26px}.practice-question-card{min-height:calc(100vh - 145px);padding:24px 18px;border-radius:20px}.practice-game-topbar{grid-template-columns:38px minmax(70px,1fr) auto auto auto;gap:7px}.practice-scholar-stat{padding:0 7px}.practice-scholar-stat span{display:none}.practice-timer{grid-column:auto}.practice-time-rail{margin-left:45px}.practice-history-row{grid-template-columns:minmax(0,1fr) auto}.practice-history-row span:nth-of-type(n+2){display:none}}
@media (max-width:480px){.practice-header{height:56px;padding:0 12px}.practice-brand small{display:none}.practice-main{width:calc(100% - 14px)}.practice-lobby-head h1{font-size:27px}.practice-setup-card,.practice-mode-card{border-radius:18px;padding:17px}.practice-game-topbar{grid-template-columns:36px minmax(55px,1fr) auto auto auto;gap:5px}.practice-health{font-size:15px}.practice-scholar-stat{height:29px;font-size:10px}.practice-scholar-stat strong{font-size:12px}.practice-question-stem{font-size:18px}.practice-option{padding:13px 12px}.practice-checkpoint-stats,.practice-result-stats{gap:5px}.practice-checkpoint-stats strong,.practice-result-stats strong{font-size:19px}.practice-result-actions{flex-direction:column}.practice-result-actions button{width:100%}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}
/* 练习开始后隐藏大厅全局顶栏，游戏顶部只保留退出、进度、血量及学霸状态。 */
body.practice-mode-page:not([data-practice-view="lobby"]) .practice-header{display:none}
body.practice-mode-page[data-practice-view="game"] .practice-main{padding-top:clamp(24px,5vh,54px)}

/* Token fallbacks keep the source stylesheet legible outside the skin adapter. */
.practice-main{font-size:var(--ui-text-body,1rem);line-height:var(--ui-leading-body,1.65)}
.practice-main :where(button,input,select,textarea){font-size:var(--ui-text-control,.875rem);line-height:var(--ui-leading-control,1.35)}

/* V9.0-P4.0.2 · 渐进危险视野、原学习入口恢复与角色快捷栏收紧 */
.practice-header-actions{display:flex;align-items:center;gap:10px;min-width:0}
.practice-mode-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--practice-border);border-radius:13px;background:#f3f5f8;box-shadow:inset 0 1px 0 rgba(255,255,255,.92)}
.practice-mode-switch a{min-width:58px;height:32px;padding:0 13px;border-radius:10px;display:grid;place-items:center;text-decoration:none;color:#6b7587;font-size:13px;font-weight:800;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.practice-mode-switch a:hover{color:var(--practice-text)}
.practice-mode-switch a.is-active{background:#fff;color:var(--practice-accent);box-shadow:0 2px 8px rgba(31,41,55,.09)}
.practice-game-topbar{grid-template-columns:40px minmax(120px,1fr) auto auto}
.practice-time-row{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:8px;margin:0 0 18px 52px;color:var(--practice-success)}
.practice-time-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:color .2s ease}
.practice-time-icon .kg-icon{width:100%;height:100%}
.practice-time-rail{height:4px;margin:0;border-radius:999px;background:#e4e8ef;overflow:hidden}
.practice-time-row.is-tense{color:var(--practice-warning)}
.practice-time-row.is-danger{color:var(--practice-danger)}
.practice-streak-pop{top:-34px;white-space:nowrap;background:linear-gradient(135deg,#111827,#312e81)}
.practice-danger-vignette{--practice-danger-strength:0;position:fixed;inset:0;z-index:60;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,rgba(225,29,72,0) 40%,rgba(225,29,72,.02) 56%,rgba(225,29,72,.14) 78%,rgba(190,18,60,.52) 100%);box-shadow:inset 0 0 72px 10px rgba(225,29,72,.16);transition:opacity .24s linear,box-shadow .24s linear;will-change:opacity,box-shadow}
.practice-danger-vignette::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 44%,rgba(244,63,94,.025) 60%,rgba(225,29,72,.18) 82%,rgba(159,18,57,.45) 100%);animation:practiceDangerBreath 1.85s ease-in-out infinite;animation-duration:inherit;opacity:.72;transform-origin:center;will-change:opacity,transform}
.practice-danger-vignette:not(.is-active)::before{animation-play-state:paused}
@keyframes practiceDangerBreath{0%,100%{opacity:.48;transform:scale(1)}50%{opacity:1;transform:scale(1.008)}}
@media (max-width:800px){.practice-game-topbar{grid-template-columns:38px minmax(70px,1fr) auto auto}.practice-time-row{margin-left:45px}.practice-mode-switch a{min-width:52px;padding:0 10px}}
@media (max-width:560px){.practice-header{gap:8px}.practice-brand span:last-child{display:none}.practice-header-actions{gap:6px}.practice-mode-switch{padding:2px}.practice-mode-switch a{min-width:45px;height:30px;padding:0 8px;font-size:12px}.practice-game-topbar{grid-template-columns:36px minmax(55px,1fr) auto auto;gap:5px}.practice-time-row{grid-template-columns:18px minmax(0,1fr);gap:6px;margin-left:41px}.practice-time-icon{width:16px;height:16px}}
@media (max-width:420px){.practice-header{padding-inline:8px;gap:5px}.practice-header-actions{gap:4px}.practice-mode-switch a{min-width:40px;padding-inline:5px;font-size:11px}.practice-header .account-menu-trigger{width:52px;min-width:52px;max-width:52px;padding-inline:5px}}
@media (prefers-reduced-motion:reduce){.practice-danger-vignette{transition:opacity .35s linear}.practice-danger-vignette::before{animation:none;opacity:.72;transform:none}}
/* V9.0-P4.3.33 · 轻量试卷库 */
.practice-library{margin-bottom:16px}.practice-library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}.practice-library-toolbar>strong{font-size:14px}.practice-library-filters{display:flex;gap:4px;padding:3px;border:1px solid var(--practice-border);border-radius:11px;background:#eef1f6}.practice-library-filters button{height:29px;min-width:48px;padding:0 11px;border:0;border-radius:8px;background:transparent;color:#667085;font-size:12px;font-weight:800}.practice-library-filters button.is-active{background:#fff;color:var(--practice-text);box-shadow:0 1px 5px rgba(15,23,42,.08)}
.practice-paper-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.practice-paper-card{position:relative;min-height:154px;padding:17px;border:1px solid var(--practice-border);border-radius:17px;background:#fff;text-align:left;color:var(--practice-text);box-shadow:0 5px 16px rgba(15,23,42,.035);transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.practice-paper-card:hover{border-color:#b7bfcd;transform:translateY(-1px);box-shadow:0 9px 22px rgba(15,23,42,.065)}.practice-paper-card.is-selected{border-color:var(--practice-accent);box-shadow:0 0 0 2px rgba(109,40,217,.11)}.practice-paper-card.is-locked{background:#fcfcfd}.practice-paper-card-head{display:flex;align-items:center;gap:8px;padding-right:54px}.practice-paper-subject{display:inline-flex;align-items:center;height:23px;padding:0 8px;border-radius:7px;background:#f1f3f7;color:#536174;font-size:10px;font-weight:850}.practice-paper-free{font-size:10px;font-weight:850;color:#15803d}.practice-vip-badge{position:absolute;top:13px;right:13px;display:inline-flex;align-items:center;gap:4px;height:25px;padding:0 8px;border-radius:8px;background:#fff7d6;color:#9a6700;border:1px solid #f5dfa0;font-size:10px;font-weight:950;letter-spacing:.03em}.practice-vip-badge svg{width:13px;height:13px;fill:currentColor}.practice-paper-card h2{margin:13px 0 7px;font-size:16px;line-height:1.35;letter-spacing:-.01em}.practice-paper-card p{display:-webkit-box;min-height:38px;margin:0;color:var(--practice-muted);font-size:12px;line-height:1.55;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.practice-paper-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;padding-top:11px;border-top:1px solid #eef1f5;color:#7a8598;font-size:11px}.practice-paper-access{font-weight:850;color:#475569}.practice-paper-card.is-locked .practice-paper-access{color:#9a6700}.practice-paper-empty{grid-column:1/-1;padding:28px;border:1px dashed #d5dae3;border-radius:16px;text-align:center;color:var(--practice-muted);background:rgba(255,255,255,.7)}
.practice-selected-paper{display:grid;align-content:center;gap:4px;min-width:0}.practice-selected-paper>span{font-size:11px;font-weight:800;color:#64748b}.practice-selected-paper strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.practice-selected-paper small{color:var(--practice-muted);font-size:11px;line-height:1.4}.practice-setup-card.is-vip-locked{border-color:#f1d98f;background:#fffdf7}.practice-mode-card .practice-start-btn.is-upgrade{background:#9a6700}.practice-mode-card .practice-start-btn.is-upgrade:hover{background:#7c5300}.practice-toast{position:fixed;left:50%;bottom:28px;z-index:100;transform:translateX(-50%);max-width:min(440px,calc(100% - 28px));padding:10px 15px;border-radius:11px;background:#172033;color:#fff;font-size:12px;font-weight:750;box-shadow:0 14px 38px rgba(15,23,42,.24)}
@media(max-width:880px){.practice-paper-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.practice-library-toolbar{align-items:flex-start;flex-direction:column}.practice-paper-grid{grid-template-columns:1fr}.practice-paper-card{min-height:142px}.practice-paper-card p{min-height:auto}.practice-selected-paper strong{white-space:normal}}

/* V9.0-P4.3.34：轻量试卷架 + 试卷库/学习记录悬浮抽屉 */
body.practice-mode-page.is-practice-drawer-open{overflow:hidden}
.practice-main{width:min(1120px,calc(100% - 32px));padding:clamp(24px,4vw,44px) 0 48px}
.practice-lobby-head{max-width:none;margin:0 0 18px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;text-align:left}
.practice-lobby-head>div{min-width:0}
.practice-lobby-head h1{font-size:clamp(27px,3.2vw,38px);margin:7px 0 5px}
.practice-lobby-head p{font-size:13px}
.practice-utility-btn{height:38px;flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;padding:0 12px;border:1px solid var(--practice-border);border-radius:11px;background:#fff;color:#526071;font-size:12px;font-weight:800;box-shadow:0 5px 16px rgba(15,23,42,.035)}
.practice-utility-btn:hover{border-color:#b9c2d0;color:var(--practice-text)}
.practice-utility-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.practice-utility-btn em{min-width:18px;height:18px;padding:0 5px;display:grid;place-items:center;border-radius:999px;background:#eef1f6;color:#475569;font-size:10px;font-style:normal}

.practice-library-shelf{margin-bottom:14px;padding:13px 14px 14px;border:1px solid var(--practice-border);border-radius:18px;background:rgba(255,255,255,.78);box-shadow:0 8px 24px rgba(15,23,42,.035);overflow:hidden}
.practice-library-toolbar{margin:0 0 10px}
.practice-library-title{display:flex;align-items:baseline;gap:9px;min-width:0}
.practice-library-title>strong{font-size:14px}
.practice-library-title>span{overflow:hidden;color:var(--practice-muted);font-size:11px;white-space:nowrap;text-overflow:ellipsis}
.practice-library-actions{display:flex;align-items:center;gap:8px}
.practice-more-btn{height:35px;padding:0 11px;border:1px solid var(--practice-border);border-radius:10px;background:#fff;color:#475569;font-size:12px;font-weight:850;white-space:nowrap}
.practice-more-btn:hover{border-color:#aeb8c8;color:var(--practice-text)}
.practice-more-btn span{margin-left:3px}
.practice-paper-scroll-shell{position:relative;min-width:0}
.practice-paper-scroll-shell::after{content:"";position:absolute;top:0;right:0;bottom:5px;width:28px;pointer-events:none;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.94))}
.practice-paper-scroll{display:flex;gap:9px;overflow-x:auto;overflow-y:hidden;padding:1px 25px 7px 1px;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#ccd3df transparent}
.practice-paper-scroll::-webkit-scrollbar{height:5px}.practice-paper-scroll::-webkit-scrollbar-thumb{border-radius:999px;background:#ccd3df}.practice-paper-scroll::-webkit-scrollbar-track{background:transparent}
.practice-paper-scroll .practice-paper-card{flex:0 0 246px;min-height:112px;padding:13px 14px;border-radius:14px;scroll-snap-align:start;box-shadow:none}
.practice-paper-scroll .practice-paper-card h2{margin:9px 0 5px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.practice-paper-scroll .practice-paper-card p{display:none}
.practice-paper-scroll .practice-paper-footer{margin-top:9px;padding-top:8px}
.practice-paper-scroll .practice-vip-badge{top:10px;right:10px;height:23px}
.practice-paper-scroll .practice-paper-card-head{padding-right:52px}
.practice-paper-empty{min-width:100%;padding:18px}

.practice-setup-card{padding:16px 18px;border-radius:18px;box-shadow:0 8px 24px rgba(31,41,55,.045)}
.practice-mode-grid{margin-top:14px}
.practice-mode-card{min-height:196px;padding:22px}
.practice-mode-card p{max-width:440px}

.practice-drawer-backdrop{position:fixed;inset:0;z-index:90;display:flex;justify-content:flex-end;background:rgba(15,23,42,.25);backdrop-filter:blur(3px);animation:practiceBackdropIn .18s ease}
.practice-drawer-backdrop[hidden]{display:none!important}
.practice-drawer{width:min(760px,calc(100vw - 42px));height:100%;display:flex;flex-direction:column;background:#f8f9fc;border-left:1px solid rgba(148,163,184,.28);box-shadow:-24px 0 70px rgba(15,23,42,.18);animation:practiceDrawerIn .22s cubic-bezier(.2,.8,.2,1)}
.practice-history-drawer{width:min(560px,calc(100vw - 42px))}
.practice-drawer-head{min-height:88px;padding:18px 20px 15px;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--practice-border)}
.practice-drawer-head span{font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--practice-accent)}
.practice-drawer-head h2{margin:4px 0 3px;font-size:21px;letter-spacing:-.025em}
.practice-drawer-head p{margin:0;color:var(--practice-muted);font-size:11px}
.practice-drawer-close{width:34px;height:34px;flex:0 0 auto;border:1px solid var(--practice-border);border-radius:10px;background:#fff;color:#64748b;font-size:23px;line-height:1;display:flex;align-items:center;justify-content:center;padding:0;box-sizing:border-box}
.practice-drawer-close:hover{color:var(--practice-danger);border-color:#fecdd3}
.practice-drawer-toolbar{min-height:52px;padding:9px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid var(--practice-border)}
.practice-drawer-body{min-height:0;flex:1;overflow:auto;padding:16px 20px 28px;overscroll-behavior:contain}
.practice-paper-drawer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.practice-paper-drawer-grid .practice-paper-card{min-height:154px}
.practice-paper-drawer-grid .practice-paper-empty{grid-column:1/-1}
.practice-history-toolbar{color:var(--practice-muted);font-size:11px}
.practice-history-toolbar button{border:0;background:transparent;color:#8b5560;font-size:11px;font-weight:800}
.practice-history-toolbar button:disabled{opacity:.35;cursor:not-allowed}
.practice-history-list{display:grid;gap:9px}
.practice-history-row{grid-template-columns:minmax(0,1fr) auto auto;padding:13px 14px;box-shadow:0 4px 14px rgba(15,23,42,.025)}
.practice-history-row span:last-child{display:none}
.practice-history-empty{padding:42px 16px;text-align:center;color:var(--practice-muted);font-size:12px}
@keyframes practiceBackdropIn{from{opacity:0}to{opacity:1}}
@keyframes practiceDrawerIn{from{transform:translateX(28px);opacity:.4}to{transform:none;opacity:1}}

@media(max-width:760px){
  .practice-main{width:min(100% - 20px,700px);padding-top:22px}
  .practice-lobby-head{align-items:center;margin-bottom:14px}
  .practice-lobby-head p{display:none}
  .practice-library-shelf{padding:11px 11px 12px}
  .practice-library-title>span{display:none}
  .practice-library-filters button{min-width:42px;padding:0 8px}
  .practice-paper-scroll .practice-paper-card{flex-basis:224px}
  .practice-drawer{width:100vw}
  .practice-paper-drawer-grid{grid-template-columns:1fr}
  .practice-drawer-body{padding:13px 14px 24px}
  .practice-drawer-head,.practice-drawer-toolbar{padding-left:14px;padding-right:14px}
}
@media(max-width:520px){
  .practice-lobby-head h1{font-size:25px}
  .practice-utility-btn span{display:none}
  .practice-library-toolbar{align-items:center;flex-direction:row}
  .practice-library-actions{gap:5px}
  .practice-library-filters button{height:28px;min-width:37px;padding:0 6px;font-size:11px}
  .practice-more-btn{height:33px;padding:0 9px}
  .practice-paper-scroll .practice-paper-card{flex-basis:205px}
  .practice-setup-card{padding:14px}
  .practice-mode-card{min-height:0}
  .practice-history-row{grid-template-columns:minmax(0,1fr) auto}
  .practice-history-row span{display:none}
}
@media(prefers-reduced-motion:reduce){.practice-drawer-backdrop,.practice-drawer{animation:none}}

/* P4.5 database-backed revenge/remediation workflow */
.practice-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.practice-mode-card.revenge .practice-mode-icon{background:#fff0f1;color:#be123c}
.practice-mode-card.revenge .practice-start-btn{background:#9f1239}
.practice-mode-card.revenge .practice-start-btn:hover:not(:disabled){background:#881337}
.practice-revenge-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.practice-revenge-stats span{min-width:0;padding:7px 6px;border:1px solid #f1d7dc;border-radius:10px;background:#fff8f8;color:#8b5560;text-align:center;font-size:10px;font-weight:760;white-space:nowrap}
.practice-revenge-stats strong{margin-left:2px;color:#9f1239;font-size:12px}
body[data-practice-mode="revenge"] .practice-progress-shell span{background:linear-gradient(90deg,#be123c,#fb7185)}
.practice-remediation-panel{margin-top:14px;padding:20px 22px;border:1px solid #fecdd3;border-radius:20px;background:linear-gradient(135deg,#fff7f8,#fff);box-shadow:0 14px 38px rgba(159,18,57,.08)}
.practice-remediation-panel>span{display:block;color:#be123c;font-size:9px;font-weight:950;letter-spacing:.16em}
.practice-remediation-panel h2{margin:6px 0 10px;font-size:20px;letter-spacing:-.025em}
.practice-remediation-panel>strong{display:inline-flex;max-width:100%;padding:7px 10px;border-radius:9px;background:#ffe4e6;color:#9f1239;font-size:13px;line-height:1.4}
.practice-remediation-panel>p{margin:11px 0 15px;color:#667085;font-size:12px;line-height:1.65}
.practice-remediation-actions{display:flex;align-items:center;gap:9px}
.practice-remediation-actions button{min-width:126px;height:40px;padding:0 14px}
.practice-remediation-explanation{margin-top:13px;padding:13px 14px;border:1px solid #f0d9dd;border-radius:12px;background:#fff;color:#526071;font-size:12px;line-height:1.7;white-space:pre-wrap}
.practice-verification-banner{display:flex;align-items:center;gap:12px;margin:12px 0 10px;padding:10px 12px;border:1px solid #c7e7df;border-radius:13px;background:#f4fbf9;color:#245c52}
.practice-verification-banner[hidden]{display:none!important}
.practice-verification-banner>span{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:#dff4ee;color:#08745f;font-size:8px;font-weight:950;letter-spacing:.12em}
.practice-verification-banner>div{min-width:0}.practice-verification-banner strong,.practice-verification-banner small{display:block}.practice-verification-banner strong{font-size:11px}.practice-verification-banner small{margin-top:2px;color:#5e756f;font-size:9px;line-height:1.45}
body[data-practice-phase="verification"] .practice-question-card{border-color:#a8d9cd;box-shadow:0 12px 34px rgba(8,116,95,.08)}
@media(max-width:1020px) and (min-width:801px){.practice-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.practice-mode-card.revenge{grid-column:1/-1}}
@media(max-width:800px){.practice-mode-grid{grid-template-columns:1fr}.practice-mode-card.revenge{grid-column:auto}.practice-remediation-panel{padding:17px 16px}.practice-remediation-actions{align-items:stretch;flex-direction:column}.practice-remediation-actions button{width:100%}}


/* V9.0-P4.3.35：窄屏/低窗口滚动与游戏关闭按钮对齐 */
.practice-lobby{min-width:0;padding-bottom:4px}
.practice-game-topbar>.practice-exit-btn{transform:none}
@media (max-width:800px){
  body.practice-mode-page{min-height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .practice-app{min-height:100dvh;height:auto}
  .practice-main{min-height:calc(100dvh - 56px);padding-bottom:max(40px,env(safe-area-inset-bottom))}
  .practice-mode-grid{align-items:stretch}
  .practice-mode-card{width:100%;min-width:0}
}
@media (max-height:760px){
  .practice-main{padding-top:16px;padding-bottom:32px}
  .practice-lobby-head{margin-bottom:12px}
  .practice-library-shelf{margin-bottom:10px}
  .practice-setup-card{padding-top:13px;padding-bottom:13px}
  .practice-mode-grid{margin-top:10px}
  .practice-mode-card{min-height:0;padding:17px 18px}
  .practice-mode-card h2{font-size:19px}
  .practice-mode-card p{line-height:1.5}
}
@media (max-width:520px){
  .practice-main{width:calc(100% - 14px);padding-top:14px}
  .practice-lobby-head{gap:10px}
  .practice-mode-grid{gap:10px}
  .practice-mode-card{padding:16px}
}

/* P4.6 做题页允许滚屏：解析展开/长题可滚动查看（main.css 的 html,body overflow:hidden 在本页放开）。
   直接元素选择器覆盖 html 与 body——不能用 html:has()，微信内置浏览器等环境不支持 :has() 会导致
   整条规则失效、页面滚动锁死、大厅"开始"按钮被截断（uat 2d1056e 修复回归，2026-08-21 补回）。 */
html,body{height:auto;min-height:100%;margin:0;overflow:visible;scroll-behavior:smooth}
body.practice-mode-page{height:auto;overflow-y:auto}
body.practice-mode-page.is-practice-drawer-open{overflow:hidden}
/* 语言切换按钮：顶栏血量右侧小药丸，点击循环 中→EN→双（与血量同高，不遮挡其他元素） */
.practice-language-cycle{display:inline-flex;align-items:center;justify-content:center;height:26px;min-width:32px;padding:0 8px;border:1px solid var(--practice-border,#e4e8f0);border-radius:9px;background:#fff;color:#536075;font-size:11px;font-weight:850;cursor:pointer;white-space:nowrap;transition:border-color .15s ease,color .15s ease;letter-spacing:.02em}
.practice-language-cycle:hover{border-color:#9aa5b5;color:#1f2a44}
.practice-language-cycle:active{transform:scale(.95)}
.practice-language-cycle:focus-visible{outline:2px solid #7c3aed;outline-offset:2px}
/* 复仇模式切题导航（底部） */
.practice-question-nav{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:22px;padding-top:16px;border-top:1px solid #eef1f5}
.practice-nav-btn{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 16px;border:1px solid #d7dde6;border-radius:11px;background:#fff;color:#475569;font-size:13px;font-weight:720;transition:.15s ease}
.practice-nav-btn:hover:not(:disabled){border-color:#9aa5b5;transform:translateY(-1px)}
.practice-nav-btn:disabled{opacity:.38;cursor:not-allowed}
.practice-question-pos{color:#738096;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
.practice-bilingual-en{display:block;margin-top:4px;color:#667085;font-size:.88em;line-height:1.5;font-weight:560;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.practice-option span:last-child{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.practice-option .practice-bilingual-en{margin-top:3px}
@media(max-width:720px){.practice-language-cycle{height:24px;min-width:28px;padding:0 6px;font-size:10px}.practice-nav-btn{height:34px;padding:0 12px;font-size:12px}}

/* 挑战 V2：结果页挑战判定横幅（试卷结果与挑战结果独立展示） */
.practice-challenge-outcome{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px auto 0;padding:12px 18px;border-radius:14px;background:#f7f8fb}
.practice-challenge-outcome strong{font-size:16px}
.practice-challenge-outcome strong.is-success{color:var(--practice-success)}
.practice-challenge-outcome strong.is-failed{color:var(--practice-danger)}
.practice-challenge-outcome span{color:var(--practice-muted);font-size:12px;font-weight:750}
/* 大生命值试卷的紧凑计数显示 */
.practice-health-count{font-size:12px;font-weight:850;color:#526071;font-variant-numeric:tabular-nums;margin-left:3px}

/* P4.6 学霸计时：毫秒数字与进度条同行 */
.practice-time-row{display:flex;align-items:center;gap:9px;margin:0 0 16px}
.practice-time-ms{font-size:15px;font-weight:850;color:var(--practice-text);font-variant-numeric:tabular-nums;min-width:40px;text-align:right}
.practice-time-rail{flex:1;height:4px;margin:0}

/* P4.6 做题经验面板：PC 常驻大厅左侧空白区；窄屏折叠为悬浮入口 */
.practice-exp-panel{position:fixed;top:150px;width:270px;z-index:20;left:max(12px,calc((100vw - 1060px)/2 - 244px))}
body.practice-mode-page:not([data-practice-view="lobby"]) .practice-exp-panel,
body.practice-mode-page:not([data-practice-view="lobby"]) .practice-exp-fab{display:none}
.practice-exp-card{background:var(--practice-card,#fff);border:1px solid var(--practice-border,#e4e8f0);border-radius:18px;padding:16px 16px 13px;box-shadow:0 10px 30px rgba(15,23,42,.06)}
.practice-exp-card header span{font-size:10px;font-weight:850;letter-spacing:.16em;color:var(--practice-accent,#6d28d9)}
.practice-exp-card header h2{margin:5px 0 0;font-size:17px;letter-spacing:-.02em}
.practice-exp-totals{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0}
.practice-exp-totals div{padding:10px 11px;border-radius:12px;background:#f7f8fb}
.practice-exp-totals span{display:block;font-size:11px;color:var(--practice-muted,#738096);font-weight:750}
.practice-exp-totals strong{display:block;margin-top:4px;font-size:21px;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.practice-exp-chart{margin-top:2px}
.practice-exp-chart svg{display:block;width:100%;height:84px}
.practice-exp-chart polyline{fill:none;stroke:var(--practice-accent,#6d28d9);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.practice-exp-chart circle{fill:var(--practice-accent,#6d28d9)}
.practice-exp-chart-x{display:flex;justify-content:space-between;margin-top:4px;font-size:9px;color:var(--practice-muted,#738096);font-weight:700}
.practice-exp-note{margin:10px 0 0;color:var(--practice-muted,#738096);font-size:10.5px;line-height:1.5}
.practice-exp-fab{position:fixed;right:14px;bottom:78px;z-index:40;width:46px;height:46px;border:0;border-radius:999px;background:var(--practice-text,#172033);color:#fff;font-size:13px;font-weight:900;letter-spacing:.03em;box-shadow:0 10px 26px rgba(15,23,42,.24);display:none}
@media(max-width:1720px){
  .practice-exp-panel{top:auto;bottom:134px;right:14px;left:auto;width:270px}
  .practice-exp-fab{display:inline-flex;align-items:center;justify-content:center}
  body.practice-mode-page:not(.is-exp-panel-open) .practice-exp-panel{display:none}
}

/* P4.6 练习模式：即时答案与解析面板 + 底部导航自动解析开关 */
.practice-mode-card.practice .practice-mode-icon{background:#e8f7ef;color:#0f8a4d}
.practice-mode-card.practice .practice-start-btn{background:#0f8a4d}
.practice-explanation{margin-top:18px;padding:16px 18px;border-radius:15px;background:#f7faf8;border:1px solid #dcefe3}
.practice-explanation-head{font-size:12px;font-weight:850;letter-spacing:.06em;margin-bottom:8px}
.practice-explanation-head.is-correct{color:var(--practice-success,#16a34a)}
.practice-explanation-head.is-wrong{color:var(--practice-danger,#e11d48)}
.practice-explanation-body{font-size:13.5px;line-height:1.7;color:#33415c;white-space:normal;overflow-wrap:anywhere}
.practice-explanation-body .practice-answer-line{font-weight:800;margin-bottom:6px}
.practice-explanation-body .practice-bilingual-en{font-size:.9em}
.practice-explanation-actions{margin-top:10px}
.practice-explanation-actions button{height:32px;padding:0 14px;border:1px solid #cfe3d8;border-radius:10px;background:#fff;color:#335; font-size:12px;font-weight:750}
.practice-explanation-toggle{display:inline-flex;align-items:center;gap:6px;color:#536075;font-size:12px;font-weight:750;cursor:pointer}
.practice-explanation-toggle input{accent-color:#0f8a4d;width:15px;height:15px;cursor:pointer}
/* 学习记录按试卷聚合：可点击行 */
.practice-history-row.is-paper{cursor:pointer;transition:border-color .15s ease,transform .15s ease}
.practice-history-row.is-paper:hover{border-color:#9aa5b5;transform:translateY(-1px)}
.practice-history-row.is-paper em{color:var(--practice-accent,#6d28d9)}
