html[data-theme="indigo"]{--phys-bg:#f4f6fb;--phys-surface:#fff;--phys-surface-2:#eef2ff;--phys-ink:#172033;--phys-muted:#68758a;--phys-line:#dce3ef;--phys-accent:#4f46e5;--phys-accent-ink:#fff;--phys-accent-soft:#e0e7ff;--phys-good:#087f5b;--phys-bad:#b4233b;--phys-shadow:0 12px 30px rgba(30,41,59,.08)}
html[data-theme="ink"]{--phys-bg:#0c1210;--phys-surface:#141d19;--phys-surface-2:#1d2b24;--phys-ink:#e8f4ee;--phys-muted:#9cb1a5;--phys-line:#293a31;--phys-accent:#34d399;--phys-accent-ink:#062317;--phys-accent-soft:#17372a;--phys-good:#5ee0a0;--phys-bad:#ff8a80;--phys-shadow:0 12px 30px rgba(0,0,0,.24)}
html[data-theme="amber"]{--phys-bg:#fbf6ec;--phys-surface:#fff;--phys-surface-2:#f7ecdb;--phys-ink:#30251b;--phys-muted:#81705e;--phys-line:#e9ddc9;--phys-accent:#b45309;--phys-accent-ink:#fff;--phys-accent-soft:#f8ecd9;--phys-good:#15803d;--phys-bad:#b4233b;--phys-shadow:0 12px 30px rgba(87,58,20,.08)}
html[data-theme="lotus"]{--phys-bg:#fdf4f6;--phys-surface:#fff;--phys-surface-2:#f9eef3;--phys-ink:#321d29;--phys-muted:#846c79;--phys-line:#edd9e2;--phys-accent:#db2777;--phys-accent-ink:#fff;--phys-accent-soft:#fce7f3;--phys-good:#087f5b;--phys-bad:#b4233b;--phys-shadow:0 12px 30px rgba(120,20,60,.08)}
html[data-theme="obsidian"]{--phys-bg:#08080a;--phys-surface:#111114;--phys-surface-2:#1a1a1f;--phys-ink:#f3f0e5;--phys-muted:#aaa59a;--phys-line:#302d24;--phys-accent:#d4af37;--phys-accent-ink:#15120a;--phys-accent-soft:#292411;--phys-good:#64d6a5;--phys-bad:#ff8a80;--phys-shadow:0 12px 32px rgba(0,0,0,.28)}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background:var(--phys-bg);color:var(--phys-ink)}
body{background-image:linear-gradient(90deg,color-mix(in srgb,var(--phys-line) 28%,transparent) 1px,transparent 1px),linear-gradient(color-mix(in srgb,var(--phys-line) 28%,transparent) 1px,transparent 1px);background-size:28px 28px;background-position:center top}
button{font:inherit;color:inherit}
.phys-page{max-width:1180px;margin:0 auto;padding:18px 24px 32px}
.phys-page .portal-topbar{position:sticky;top:8px}
.intro-band{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:24px 0 20px;border-bottom:1px solid var(--phys-line)}
.eyebrow{margin:0 0 8px;color:var(--phys-accent);font-size:11px;font-weight:800;letter-spacing:1.6px}
.intro-band h1{max-width:720px;margin:0;font-size:clamp(26px,3vw,38px);line-height:1.15}
.intro-copy{margin:10px 0 0;color:var(--phys-muted);font-size:15px;line-height:1.65}
.score-strip{display:flex;gap:10px;flex:none}
.score-strip div{min-width:106px;padding:10px 14px;border:1px solid var(--phys-line);border-radius:10px;background:var(--phys-surface)}
.score-strip span,.score-strip strong{display:block}
.score-strip span{color:var(--phys-muted);font-size:11px;font-weight:700}
.score-strip strong{margin-top:3px;font-size:22px;font-variant-numeric:tabular-nums}
.practice-controls{display:grid;grid-template-columns:1fr 1.5fr;gap:18px;align-items:center;padding:16px 0;border-bottom:1px solid var(--phys-line)}
.control-row{display:flex;align-items:center;gap:12px;min-width:0}
.control-label{flex:none;color:var(--phys-muted);font-size:12px;font-weight:800}
.segmented,.mode-tabs{display:flex;flex-wrap:wrap;gap:5px;padding:4px;border:1px solid var(--phys-line);border-radius:10px;background:var(--phys-surface)}
.segmented button,.mode-tabs button{min-height:38px;padding:7px 13px;border:0;border-radius:7px;background:transparent;color:var(--phys-muted);font-size:13px;font-weight:700;cursor:pointer;touch-action:manipulation}
.segmented button[aria-pressed="true"],.mode-tabs button[aria-selected="true"]{background:var(--phys-accent);color:var(--phys-accent-ink)}
.workspace{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(270px,.8fr);gap:26px;padding:24px 0 18px;align-items:start}
.challenge-area{min-width:0;padding:4px 0}
.challenge-meta{display:flex;justify-content:space-between;align-items:center;color:var(--phys-muted);font-size:12px;font-weight:700}
.mode-mark{color:var(--phys-accent);letter-spacing:1.2px;font-size:10px}
.question-kicker{margin:32px 0 8px;color:var(--phys-muted);font-size:13px}
.challenge-area h2{min-height:62px;margin:0;font-size:clamp(22px,2.4vw,30px);line-height:1.3}
.formula-stage{display:grid;place-items:center;min-height:128px;margin:18px 0 20px;border:1px solid var(--phys-line);border-radius:14px;background:var(--phys-surface);box-shadow:var(--phys-shadow);font-size:clamp(32px,5vw,54px);font-weight:850;letter-spacing:1px}
.formula-stage[hidden]{display:none}
.formula-stage.empty{background:var(--phys-surface-2);color:var(--phys-accent)}
.answer-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.answer-option{min-height:54px;padding:12px 14px;border:1px solid var(--phys-line);border-radius:10px;background:var(--phys-surface);font-size:15px;font-weight:700;text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s,background .15s,transform .15s}
.answer-option:hover:not(:disabled){border-color:var(--phys-accent);transform:translateY(-1px)}
.answer-option:disabled{cursor:default}
.answer-option.correct{border-color:var(--phys-good);background:color-mix(in srgb,var(--phys-good) 12%,var(--phys-surface))}
.answer-option.wrong{border-color:var(--phys-bad);background:color-mix(in srgb,var(--phys-bad) 10%,var(--phys-surface))}
.answer-feedback{min-height:26px;margin:12px 0;color:var(--phys-muted);font-size:13px;font-weight:700}
.answer-feedback.correct{color:var(--phys-good)}
.answer-feedback.wrong{color:var(--phys-bad)}
.next-button{display:flex;justify-content:center;align-items:center;gap:12px;width:100%;min-height:52px;padding:12px 18px;border:0;border-radius:10px;background:var(--phys-accent);color:var(--phys-accent-ink);font-weight:800;cursor:pointer;touch-action:manipulation}
.next-button:disabled{opacity:.42;cursor:not-allowed}
.reference-panel{padding:18px;border:1px solid var(--phys-line);border-radius:12px;background:var(--phys-surface);box-shadow:var(--phys-shadow)}
.reference-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.reference-heading .eyebrow{margin-bottom:4px}
.reference-heading h2{margin:0;font-size:19px}
.ref-count{display:grid;place-items:center;min-width:34px;height:34px;border-radius:9px;background:var(--phys-accent-soft);color:var(--phys-accent);font-size:13px;font-weight:800}
.reference-hint{margin:10px 0 14px;color:var(--phys-muted);font-size:12px;line-height:1.6}
.ref-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-height:332px;overflow:auto;overscroll-behavior:contain}
.ref-tile{min-height:61px;padding:7px 5px;border:1px solid var(--phys-line);border-radius:8px;background:var(--phys-bg);text-align:left;cursor:pointer;touch-action:manipulation}
.ref-tile:hover,.ref-tile.is-focus{border-color:var(--phys-accent);background:var(--phys-accent-soft)}
.ref-tile .ref-sub{display:block;color:var(--phys-muted);font-size:9px}
.ref-tile strong{display:block;color:var(--phys-accent);font-size:17px;line-height:1.15}
.ref-tile small{display:block;overflow:hidden;color:var(--phys-muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.source-note{margin:14px 0 0;color:var(--phys-muted);font-size:11px}
.source-note a{color:var(--phys-accent);font-weight:800;text-decoration:underline;text-underline-offset:2px}
.phys-footer{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid var(--phys-line);color:var(--phys-muted);font-size:11px}
@media(max-width:820px){.practice-controls{grid-template-columns:1fr;gap:10px}.workspace{grid-template-columns:1fr}.reference-panel{order:2}.ref-list{grid-template-columns:repeat(5,minmax(0,1fr));max-height:220px}}
@media(max-width:560px){.phys-page{padding:10px 12px 24px}.intro-band{align-items:flex-start;flex-direction:column;gap:14px}.score-strip{width:100%}.score-strip div{flex:1}.control-row{align-items:flex-start;flex-direction:column;gap:7px}.segmented,.mode-tabs{width:100%}.segmented button,.mode-tabs button{flex:1;padding:7px 8px}.workspace{padding-top:17px}.answer-options{gap:8px}.answer-option{min-height:50px;padding:10px;font-size:14px}.ref-list{grid-template-columns:repeat(4,minmax(0,1fr))}.phys-footer{flex-direction:column;gap:5px}}
.answer-explain{min-height:22px;margin:-4px 0 14px;color:var(--phys-muted);font-size:13px;line-height:1.6}
.formula-stage.steps{place-items:center start;padding:18px 24px;font-size:clamp(16px,2.2vw,22px);font-weight:700;letter-spacing:0;line-height:1.9;text-align:left;white-space:pre-line}
.answer-options.is-numeric{display:flex;align-items:center;gap:10px}
.numeric-input{flex:1;min-width:0;min-height:54px;padding:10px 14px;border:1px solid var(--phys-line);border-radius:10px;background:var(--phys-surface);color:var(--phys-ink);font:inherit;font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.numeric-input:focus{outline:2px solid var(--phys-accent);outline-offset:1px}
.numeric-input.correct{border-color:var(--phys-good)}
.numeric-input.wrong{border-color:var(--phys-bad)}
.numeric-unit{flex:none;color:var(--phys-muted);font-size:16px;font-weight:700}
.numeric-submit{flex:none;min-height:54px;padding:10px 20px;border:0;border-radius:10px;background:var(--phys-accent);color:var(--phys-accent-ink);font-weight:800;cursor:pointer;touch-action:manipulation}
.numeric-submit:disabled{opacity:.42;cursor:not-allowed}
.answer-options.is-match{align-items:start}
.match-col{display:grid;gap:10px}
.answer-option.is-selected{border-color:var(--phys-accent);background:var(--phys-accent-soft)}
.answer-options.is-order{grid-template-columns:1fr}
.order-pool{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.order-sequence{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.order-slot .answer-option{width:100%;background:var(--phys-surface-2)}
@media(max-width:560px){.answer-options.is-numeric{flex-wrap:wrap}.numeric-input{flex-basis:100%}.numeric-submit{flex:1}.order-pool{grid-template-columns:1fr}}

/* ---------- 视图切换：做题 ⇄ 图形演示 ---------- */
.view-switch{display:inline-flex;gap:5px;margin:16px 0 4px;padding:4px;border:1px solid var(--phys-line);border-radius:10px;background:var(--phys-surface)}
.view-switch button{min-height:38px;padding:7px 18px;border:0;border-radius:7px;background:transparent;color:var(--phys-muted);font:inherit;font-size:13px;font-weight:700;cursor:pointer;touch-action:manipulation}
.view-switch button[aria-pressed="true"]{background:var(--phys-accent);color:var(--phys-accent-ink)}
.view-switch button:hover{color:var(--phys-accent)}
.view-switch button[aria-pressed="true"]:hover{color:var(--phys-accent-ink)}
