:root{--ink:#284b60;--teal:#398c7e;--teal-d:#2f7569;--teal-l:#eaf3f0;--line:#dce8e3;--muted:#7f988f;--warm:#fff4e0;--red:#d2513f;--bg:#f4f8f8;font-family:'Microsoft YaHei','PingFang SC','Noto Sans CJK SC',sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%}
body{background:radial-gradient(ellipse at 5% 8%,#e0f1ec,transparent 42%),radial-gradient(ellipse at 95% 92%,#fff0d7,transparent 40%),var(--bg);min-height:100dvh}
[hidden]{display:none!important}
button,input,select,textarea,a.btn-soft,a.btn-primary{font:inherit}
button{cursor:pointer;border:0;touch-action:manipulation}
button:disabled{opacity:.4;cursor:default}
input,textarea{border:1.5px solid var(--line);border-radius:12px;padding:11px 13px;background:#fff;color:var(--ink);width:100%}
textarea{resize:vertical;min-height:90px}
input:focus,textarea:focus,button:focus-visible{outline:3px solid #f0c977;outline-offset:1px}
.muted{color:var(--muted);font-size:14px}.pad{padding:14px}
.hint{color:var(--muted);font-size:13px;line-height:1.7;margin:4px 0 10px}
.btn-primary,.btn-soft,.btn-danger{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:14px;padding:11px 16px;min-height:46px;font-weight:700;text-decoration:none;font-size:15px}
.btn-primary{background:var(--teal);color:#fff}.btn-primary:active{background:var(--teal-d)}
.btn-soft{background:var(--teal-l);color:#2f6a60}.btn-soft.on{background:#2f7569;color:#fff}
.btn-danger{background:#fbe9e5;color:#a8412f}
.btn-primary.wide{width:100%;margin-top:14px}
.btn-row{display:flex;flex-wrap:wrap;gap:8px}
.icon-btn{width:42px;height:42px;border-radius:12px;background:#f1f5f4;color:#59736b;font-size:20px;display:grid;place-items:center}
.toast{position:fixed;left:50%;bottom:110px;transform:translate(-50%,30px);opacity:0;pointer-events:none;background:#24433f;color:#fff;padding:12px 20px;border-radius:30px;font-size:15px;z-index:100;transition:.25s;max-width:min(92vw,560px);text-align:center;box-shadow:0 10px 30px #0003}
.toast.show{opacity:1;transform:translate(-50%,0)}.toast.bad{background:#a8412f}
.gone{position:fixed;inset:0;background:#f4f8f8f2;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:30px}.gone b{font-size:24px}

/* ===== 首页 ===== */
.landing{min-height:100dvh;display:grid;place-items:center;padding:24px}
.l-card{width:min(560px,100%);background:#fffffff0;border:1px solid var(--line);border-radius:30px;padding:34px 34px 26px;box-shadow:0 20px 70px #2f5a5314}
.l-brand{display:flex;align-items:baseline;gap:12px}.l-logo{font-size:40px;color:#59a393}.l-brand b{font-size:40px;letter-spacing:4px}.l-brand small{color:var(--muted);letter-spacing:3px}
.l-intro{line-height:1.9;color:#4d6a62;margin:14px 0 22px}
.l-label{font-size:14px;color:var(--muted);display:block;margin-bottom:6px}
.l-create{width:100%;margin-top:12px;font-size:19px;min-height:58px}
.l-tip{font-size:13px;color:var(--muted);text-align:center}
.l-recent-wrap h3{font-size:15px;margin:22px 0 8px}
.l-recent{display:flex;flex-direction:column;gap:8px;max-height:300px;overflow:auto}
.l-item{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-radius:14px;background:#f4f8f7;color:var(--ink);text-decoration:none}
.l-item span{font-size:13px;color:var(--muted)}

/* ===== 教室大屏 ===== */
.screen-app{display:flex;flex-direction:column;height:100dvh;overflow:hidden}
.s-top{height:64px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 2.4vw}
.s-brand{font-weight:800;font-size:24px;letter-spacing:1px}.s-brand span{color:#59a393}.s-brand small{font-size:16px;font-weight:600;color:#6f8f86;margin-left:10px;letter-spacing:0}
.s-pills{display:flex;gap:10px;align-items:center}
.pill{border-radius:30px;padding:9px 16px;font-size:15px;font-weight:700;background:#ffffffcc;border:1px solid var(--line);color:#5e8178;white-space:nowrap}
.pill-status[data-kind=ok]{color:#4d8c6e}.pill-status[data-kind=bad]{color:var(--red)}
.pill-phone{background:#fff4e0;border-color:#f3d9a8;color:#a0661a;min-height:42px}
.pill-phone[data-on="1"]{background:#e6f4ec;border-color:#bfe0cb;color:#2f7a52}
.pill-rec{background:#fde8e5;border-color:#f6c2ba;color:var(--red);animation:pulse 1.6s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 6px #d2513f22}}
.s-main{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 2.4vw}
.topic{text-align:center;padding:2px 0 12px}
.topic small{color:#6d9b8e;letter-spacing:2px;font-size:14px}
.topic h1{font-size:clamp(26px,3.2vw,52px);margin:6px auto 0;line-height:1.25;max-width:1300px;overflow-wrap:anywhere}
.stage{flex:1;min-height:0;position:relative;border:2px solid #fff;border-radius:34px;background:#ffffffbb;box-shadow:0 15px 60px #537a6e0c;overflow:hidden}
.stage canvas{width:100%;height:100%;display:block}
.empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;color:#6d9e91}
.empty i{font-style:normal;font-size:84px}.empty b{font-size:30px;margin:14px}.empty span{font-size:17px;color:#8fa59c}
.freeze-badge{position:absolute;top:18px;right:20px;background:#fff1d2;color:#9b793f;border-radius:30px;padding:8px 16px;font-size:14px;font-weight:700}
.comparison{display:flex;height:100%;gap:16px;padding:20px}
.compare-card{flex:1;min-width:0;display:flex;flex-direction:column;background:#ffffffa0;border-radius:22px;overflow:hidden}
.compare-card h2{font-size:clamp(18px,1.8vw,28px);text-align:center;margin:16px 12px 0;overflow-wrap:anywhere}
.compare-card canvas{flex:1;min-height:0;width:100%}
.compare-card p{font-size:12px;color:#86a08e;text-align:center;margin:6px}
/* 二维码浮层 */
.qr-overlay{position:absolute;inset:0;background:#f4f8f8d9;backdrop-filter:blur(4px);display:grid;place-items:center;z-index:5}
.qr-card{display:flex;align-items:center;gap:clamp(20px,3vw,48px);background:#fff;border-radius:32px;padding:clamp(20px,2.6vw,40px);box-shadow:0 20px 60px #2f5a5320;max-width:92%}
.qr-card img{width:clamp(200px,24vw,380px);height:auto;border-radius:16px;border:1px solid var(--line);image-rendering:pixelated}
.qr-text b{font-size:clamp(26px,2.6vw,42px);display:block;margin-bottom:10px}
.qr-text p{font-size:clamp(16px,1.35vw,22px);line-height:1.9;color:#557369;margin:0 0 18px}
.qr-actions{display:flex;gap:10px;flex-wrap:wrap}
/* 底部控制条 */
.dock{flex:none;display:flex;gap:16px;align-items:center;justify-content:space-between;padding:12px 2.4vw calc(12px + env(safe-area-inset-bottom))}
.dock-rounds{flex:1;min-width:0;display:flex;align-items:center;gap:8px}
.d-strip{flex:1;min-width:0;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px}
.d-strip::-webkit-scrollbar{display:none}
.chip{white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis;background:#ffffffc8;border:1px solid var(--line);color:#5e8178;border-radius:16px;padding:12px 16px;font-size:15px;min-height:52px}
.chip.on{background:var(--teal);color:#fff;border-color:var(--teal)}
.chip.picked{background:#f0a91f;color:#fff;border-color:#f0a91f}.chip.dim{opacity:.35}
.dock-actions{display:flex;gap:8px;flex:none}
.d-btn{min-width:64px;min-height:56px;padding:0 16px;border-radius:16px;background:#fff;border:1px solid var(--line);color:#3d6f65;font-weight:800;font-size:16px;box-shadow:0 4px 14px #2f5a530d;white-space:nowrap}
.d-btn.on{background:#2f7569;color:#fff}
.d-arrow{min-width:52px;font-size:18px}
.d-record{color:var(--red)}.d-record.live{background:var(--red);color:#fff;border-color:var(--red)}
.pick-bar{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:#24433f;color:#fff;border-radius:30px;padding:8px 8px 8px 22px;display:flex;align-items:center;gap:14px;font-weight:700;z-index:20;box-shadow:0 10px 30px #0003}
.focused .s-top,.focused .dock{display:none}.focused .topic{padding-top:14px}.focused .s-main{padding-bottom:16px}
.exit-focus{position:fixed;right:18px;bottom:16px;z-index:20;background:#ffffffb8;color:#6c8d84;border-radius:20px;padding:12px 18px;font-weight:700;border:1px solid var(--line)}
/* 抽屉 */
.drawer{position:fixed;top:12px;right:12px;bottom:12px;width:min(440px,94vw);background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:0 20px 70px #224b4830;z-index:30;display:none;flex-direction:column;overflow:hidden}
.drawer-open .drawer{display:flex}
.drawer-head{display:flex;align-items:center;gap:8px;padding:14px 14px 10px;border-bottom:1px solid #eef3f1}
.tabs{flex:1;display:flex;gap:6px;background:#f1f6f4;border-radius:14px;padding:4px}
.tabs button{flex:1;min-height:42px;border-radius:11px;background:none;color:#6b8a81;font-weight:700;font-size:15px}
.tabs button.on{background:#fff;color:var(--teal-d);box-shadow:0 2px 8px #2f5a5314}
.drawer-body{flex:1;overflow:auto;padding:6px 18px 24px}

/* ===== 实录 ===== */
.speech{position:absolute;inset:0;padding:clamp(10px,1.4vw,22px)}
.sp-card{height:100%;display:flex;flex-direction:column;background:#fff;border:1px solid #ece4d6;border-radius:26px;overflow:hidden}
.sp-head{padding:12px 18px;border-bottom:1px dashed #eadfcd;display:flex;flex-direction:column;gap:8px}
.sp-body{flex:1;overflow:auto;padding:16px 26px;font-size:clamp(20px,2vw,34px);line-height:1.9;color:#2f3b36;overflow-wrap:anywhere}
.sp-empty{color:#a59a88;white-space:pre-line;text-align:center;margin:12% auto 0;font-size:clamp(17px,1.5vw,24px);line-height:1.9}
.speech-segment{margin:0 0 .5em}
.speech-segment.live{color:#5d7a72}
.speech-segment.live:after{content:' ✍';font-size:.7em;opacity:.6}
.sent{cursor:pointer;border-radius:8px;transition:background .15s}
.sent:hover{background:#f3f7f6}
.sent.picked{background:#e3f1ff;box-shadow:0 0 0 2px #7fb3e6}
.annotation{border-radius:6px;padding:0 2px}
.mark-yellow{background:#ffe58a}.mark-blue{background:#bfe0ff}.mark-pink{background:#ffc9dc}
.mark-bold{font-weight:800}.mark-underline{text-decoration:underline 3px #d17a3a;text-underline-offset:5px}
.mark-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.mk{min-height:46px;padding:0 15px;border-radius:13px;font-weight:800;font-size:15px;color:#3d4a43;background:#f1f5f4}
.mk-yellow{background:#ffe58a}.mk-blue{background:#bfe0ff}.mk-pink{background:#ffc9dc}
.mk-bold{font-weight:900}.mk-underline{text-decoration:underline 2px}
.mk-remove{background:#f5ede9;color:#9a5a45}.mk-undo{background:#eef2ff;color:#4a5a9a}
.mk-count{font-size:13px;color:var(--muted);margin-left:4px}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:15px;color:#5a6a64}
.lg{display:flex;align-items:center;gap:6px}.lg i,.lab-row i{width:26px;height:16px;border-radius:5px;display:inline-block}
.label-editor{display:flex;flex-direction:column;gap:8px}
.lab-row{display:flex;align-items:center;gap:10px}

/* ===== 面板通用 ===== */
.pane-sec{padding:12px 0;border-bottom:1px solid #eef3f1}
.pane-sec:last-child{border:0}
.pane-sec h3{font-size:14px;color:#6b8a81;margin:2px 0 10px;font-weight:700}
.inline-form{display:flex;gap:8px}.inline-form input{flex:1}
.round-list{display:flex;flex-direction:column;gap:8px}
.round-row{display:flex;align-items:center;gap:6px;background:#f6f9f8;border-radius:16px;padding:4px;border:2px solid transparent;text-align:left;width:100%}
.round-row.on{border-color:var(--teal);background:#eaf5f2}
.round-row.pick{padding:8px}
.round-main{flex:1;display:flex;align-items:center;gap:12px;background:none;text-align:left;padding:8px;min-height:52px;color:var(--ink)}
.rn{width:34px;height:34px;border-radius:50%;background:#fff;display:grid;place-items:center;font-weight:800;color:var(--teal);flex:none;border:1px solid var(--line)}
.round-row.on .rn,.round-row.pick.on .rn{background:var(--teal);color:#fff}
.rt{display:flex;flex-direction:column;min-width:0}.rt b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt small{font-size:12px;color:var(--muted)}
.del{background:none;font-size:18px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.tag{background:#f1f6f4;border-radius:20px;padding:9px 14px;color:#2f5f56;font-size:15px;min-height:42px;display:inline-flex;align-items:center;gap:6px}
.tag small{color:#8aa79f;font-size:12px}.tag.ghost{background:#fff;border:1px dashed var(--line)}.tag.static{min-height:auto;padding:6px 12px}
.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.choice-grid.four{grid-template-columns:repeat(2,1fr)}
.choice{background:#f6f9f8;border:2px solid transparent;border-radius:16px;padding:10px 6px;display:flex;flex-direction:column;align-items:center;gap:5px;color:#4d6a62;font-size:14px;min-height:72px}
.choice.on{border-color:var(--teal);background:#eaf5f2;color:var(--teal-d);font-weight:700}
.ci{font-size:26px}.sw{display:flex;gap:3px}.sw i{width:18px;height:18px;border-radius:50%}
.seg{display:flex;background:#f1f6f4;border-radius:14px;padding:4px;gap:4px}
.seg button{flex:1;min-height:44px;border-radius:11px;background:none;color:#6b8a81;font-weight:700}
.seg button.on{background:#fff;color:var(--teal-d);box-shadow:0 2px 8px #2f5a5314}

/* ===== 弹层 ===== */
.sheet{position:fixed;inset:0;background:#163e4540;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}
.sheet-card{width:min(520px,100%);max-height:90dvh;overflow:auto;background:#fff;border-radius:26px;padding:18px 20px 22px;box-shadow:0 20px 60px #0003}
.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sheet-head b{font-size:19px}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted);margin:12px 0}
.type-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.type-card{background:#f6f9f8;border:2px solid transparent;border-radius:20px;padding:16px 12px;display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--ink);text-align:center}
.type-card.on{border-color:var(--teal);background:#eaf5f2}
.tc-i{font-size:34px}.type-card b{font-size:18px}.type-card small{font-size:12px;color:var(--muted);line-height:1.5}
.plan-preview{display:flex;flex-direction:column;gap:6px;margin-top:10px;max-height:220px;overflow:auto}
.pp{display:flex;gap:10px;align-items:center;background:#f6f9f8;border-radius:12px;padding:8px 12px;font-size:15px}
.pp span{width:24px;height:24px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:12px;font-weight:800;color:var(--teal);flex:none}
.stepper{display:flex;align-items:center;gap:8px}.stepper button{min-width:52px;min-height:46px;border-radius:12px;background:#f1f6f4;font-size:18px;font-weight:800;color:#2f6a60}
.num{min-width:44px;text-align:center;font-size:22px;color:var(--ink)}

/* ===== 手机遥控器 ===== */
.phone-app{max-width:640px;margin:0 auto;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
.p-top{position:sticky;top:0;z-index:10;background:#f4f8f8ee;backdrop-filter:blur(6px);padding:calc(10px + env(safe-area-inset-top)) 16px 10px;border-bottom:1px solid #e3ece8}
.p-class{display:flex;align-items:center;justify-content:space-between;gap:10px}.p-class b{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.p-status{font-size:12px;color:#5f8f7c;white-space:nowrap}.p-status[data-kind=bad]{color:var(--red)}
.p-banner{margin:10px 16px 0;background:#24433f;color:#fff;border-radius:16px;padding:8px 8px 8px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:700;font-size:14px}
.p-banner button{background:#fff;color:#24433f;border-radius:12px;padding:9px 14px;font-weight:800}
.p-body{padding:8px 16px 20px}
.p-tabs{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;background:#fffffff5;border-top:1px solid #e3ece8;padding:6px 6px calc(6px + env(safe-area-inset-bottom));max-width:640px;margin:0 auto;backdrop-filter:blur(8px)}
.p-tabs button{flex:1;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;color:#7d968e;min-height:56px;border-radius:14px;font-weight:700}
.p-tabs button.on{color:var(--teal-d);background:#eaf5f2}
.ti{font-size:21px}
.p-record{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:6px}
.p-round{width:100%;background:#fff;border:1px solid var(--line);border-radius:22px;padding:14px 16px;text-align:center}
.p-round small{color:var(--muted);font-size:13px}.p-round b{display:block;font-size:21px;margin:6px 0 12px;line-height:1.4}
.p-nav{display:flex;gap:8px}.p-nav button{flex:1}
.p-rec-btn{width:min(210px,58vw);aspect-ratio:1;border-radius:50%;background:#fff;border:8px solid #f6d6d0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--red);font-weight:800;font-size:19px;box-shadow:0 14px 40px #d2513f22;margin-top:6px}
.p-rec-dot{width:56px;height:56px;border-radius:50%;background:var(--red);transition:.2s}
.p-rec-btn.live{background:var(--red);color:#fff;border-color:#f3b4aa;animation:pulse 1.6s infinite}
.p-rec-btn.live .p-rec-dot{background:#fff;border-radius:10px;width:44px;height:44px}
.p-rec-meta{display:flex;align-items:center;gap:14px}
.p-rec-time{font-variant-numeric:tabular-nums;font-size:22px;font-weight:800;color:#4d6a62}
.p-level{display:flex;gap:3px;align-items:flex-end;height:26px}
.p-level i{width:6px;border-radius:3px;background:var(--teal);opacity:.18}
.p-level i:nth-child(1){height:6px}.p-level i:nth-child(2){height:8px}.p-level i:nth-child(3){height:10px}.p-level i:nth-child(4){height:12px}.p-level i:nth-child(5){height:14px}.p-level i:nth-child(6){height:16px}.p-level i:nth-child(7){height:18px}.p-level i:nth-child(8){height:20px}.p-level i:nth-child(9){height:22px}.p-level i:nth-child(10){height:24px}.p-level i:nth-child(11){height:25px}.p-level i:nth-child(12){height:26px}
.p-rec-hint{margin:0;color:var(--muted);font-size:13px;text-align:center}
.p-preview{width:100%;background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px 14px}
.p-preview small{color:var(--muted);font-size:12px}.p-preview p{margin:6px 0 0;font-size:16px;line-height:1.7}
.p-quick{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.p-transcript{max-height:55dvh;border:1px solid var(--line);border-radius:18px;margin-top:10px;font-size:18px;padding:12px 14px;background:#fff}
.mark-bar.compact .mk{min-height:42px;padding:0 12px;font-size:14px}
.phone-app .mark-bar{position:sticky;top:58px;z-index:5;background:#f4f8f8;padding:6px 0}

/* ===== 尺寸适配 ===== */
@media (max-width:1100px){.dock{flex-direction:column;align-items:stretch}.dock-actions{justify-content:space-between}.d-btn{flex:1;padding:0 8px}}
@media (max-width:700px){.qr-card{flex-direction:column;text-align:center}.s-pills .pill-status{display:none}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
