:root{--bg:#FFF8EC;--ink:#3A2E2A;--soft:#7A6A60;--card:#fff;--line:#F1E3CF;--main:#FF8A3D;--main2:#FFB347}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{background:var(--bg) radial-gradient(circle at 10% 10%,#FFE9C7 0,transparent 40%),radial-gradient(circle at 90% 90%,#DDF4FF 0,transparent 45%);color:var(--ink);font-family:"PingFang SC","Microsoft YaHei","HarmonyOS Sans SC",sans-serif;overflow:hidden;user-select:none;-webkit-user-select:none}
button{font-family:inherit;cursor:pointer;border:0}
.hidden{display:none!important}
#stage{height:100vh;display:flex;flex-direction:column}
/* 顶栏 */
.topbar{display:flex;align-items:center;gap:12px;padding:10px 20px;background:#fff;box-shadow:0 2px 12px #f0d9b866;z-index:5}
.tb-back{font-size:20px;padding:10px 18px;border-radius:30px;background:#FFF1E0;color:var(--main);font-weight:700;visibility:hidden}
.tb-title{flex:1;text-align:center;font-size:28px;font-weight:800;letter-spacing:2px;color:var(--main)}
.tb-right{display:flex;gap:10px}
.tb-chip{font-size:20px;padding:10px 18px;border-radius:30px;background:#FFF1E0;color:var(--ink);font-weight:700;display:flex;align-items:center;gap:6px}
.tb-chip.jar{background:#FFF6C9;transition:transform .2s}
.tb-chip.jar.pop{transform:scale(1.3)}
.tb-chip.ghost{background:#EEF6FB;color:#118AB2}
#view{flex:1;overflow:auto;padding:20px 28px 210px}
.ai-mark{position:fixed;left:10px;bottom:6px;font-size:12px;color:#b8a898}
/* 开始页 */
#startGate{position:fixed;inset:0;background:linear-gradient(160deg,#FFE3B8,#FFF8EC 60%,#D8F1FF);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,2.6vh,30px);z-index:50;padding:20px;text-align:center}
#startGate img{width:clamp(200px,34vh,380px);height:clamp(200px,34vh,380px);border-radius:50%;object-fit:cover;border:10px solid #fff;box-shadow:0 14px 40px #f5b97a77}
#startGate h1{font-size:clamp(56px,11vh,120px);color:var(--main);letter-spacing:.12em;line-height:1.1;text-shadow:0 6px 0 #FFE0B8}
#startGate p{font-size:clamp(22px,4vh,40px);color:var(--soft);letter-spacing:.1em}
#startGate button{margin-top:clamp(8px,2vh,24px);font-size:clamp(30px,5.6vh,56px);font-weight:800;color:#fff;padding:.6em 2em;border-radius:999px;background:linear-gradient(135deg,var(--main2),var(--main));box-shadow:0 10px 0 #E06A1F;animation:breath 2s infinite}
#startGate button:active{transform:translateY(8px);box-shadow:0 2px 0 #E06A1F}
#startGate small{color:var(--soft);font-size:clamp(15px,2.4vh,24px)}
@keyframes breath{50%{transform:scale(1.05)}}
/* 通用 */
.btn{font-size:22px;font-weight:700;color:#fff;padding:14px 30px;border-radius:40px;background:linear-gradient(135deg,var(--main2),var(--main));box-shadow:0 5px 0 #E06A1F}
.btn:active{transform:translateY(4px);box-shadow:0 1px 0 #E06A1F}
.btn.ghost{background:#fff;color:var(--main);box-shadow:0 5px 0 var(--line);border:2px solid var(--line)}
.btn.small{font-size:18px;padding:10px 22px}
.btn.danger{color:#d33}
.row-btns{display:flex;gap:16px;justify-content:center;margin-top:18px;flex-wrap:wrap}
.progress{text-align:center;color:var(--soft);font-size:17px;margin-top:10px}
.teacher{display:flex;align-items:flex-start;gap:14px;min-height:96px}
.teacher img{width:88px;height:88px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 4px 12px #f3c99a88;flex:none}
.teacher.talking img{animation:nod .6s infinite alternate}
@keyframes nod{to{transform:translateY(-4px) rotate(-3deg)}}
.bubble{position:relative;background:#fff;border-radius:22px;padding:16px 22px;font-size:26px;line-height:1.55;box-shadow:0 4px 14px #eedcc566;border:3px solid #FFE1BD}
.bubble::before{content:"";position:absolute;left:-14px;top:26px;border:8px solid transparent;border-right:10px solid #FFE1BD}
.dots i{display:inline-block;width:10px;height:10px;margin:0 3px;border-radius:50%;background:var(--main);animation:dot 1s infinite}
.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{50%{transform:translateY(-8px);opacity:.4}}
.said{font-size:24px;margin:16px 0 8px;padding:12px 18px;background:#F4FBFF;border-radius:16px;border:2px dashed #BFE3F5}
.stars{display:flex;justify-content:center;gap:8px}
.stars .st{display:inline-block;width:60px;height:60px}.stars .st img{width:100%;height:100%;object-fit:contain;filter:grayscale(1) opacity(.35)}.stars .st.on img{filter:none}
.stars .st.on{animation:starIn .5s both}
@keyframes starIn{from{transform:scale(0) rotate(-90deg)}70%{transform:scale(1.3)}to{transform:scale(1)}}
.fly-star{position:fixed;width:54px;height:54px;z-index:60;transition:all .9s cubic-bezier(.5,-.3,.6,1);pointer-events:none}
#toast{position:fixed;left:50%;top:90px;transform:translateX(-50%);background:#3A2E2Aee;color:#fff;font-size:22px;padding:14px 28px;border-radius:30px;z-index:70}
/* 麦克风 */
#micDock{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:6px;z-index:20}
.mic-wrap{position:relative;width:150px;height:150px}
.mic-ring{position:absolute;inset:0;border-radius:50%;background:#FF8A3D33;transition:transform .08s}
#micBtn{position:absolute;inset:12px;border-radius:50%;color:#fff;background:linear-gradient(135deg,#FFB347,#FF6B3D);box-shadow:0 8px 0 #D9531F,0 12px 30px #ff8a3d66;touch-action:none}
#micDock[data-state=rec] #micBtn{background:linear-gradient(135deg,#FF6B6B,#E63946);box-shadow:0 3px 0 #A4161A;transform:translateY(5px)}
#micDock[data-state=wait] #micBtn,#micDock[data-state=off] #micBtn{background:#D9CFC4;box-shadow:0 8px 0 #B5A898}
#micDock[data-state=idle] .mic-ring{animation:ring 1.6s infinite}
@keyframes ring{0%{transform:scale(1);opacity:1}100%{transform:scale(1.35);opacity:0}}
.mic-time{position:absolute;right:-60px;top:55px;font-size:22px;font-weight:700;color:#E63946}
.mic-label{font-size:22px;font-weight:700;color:var(--soft);background:#fffc;padding:4px 18px;border-radius:20px}
.vol-bar{width:200px;height:8px;border-radius:4px;background:#F1E3CF;overflow:hidden}
.vol-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#06D6A0,#FFC93C,#EF476F)}
.mic-side{position:absolute;left:-90px;top:50px;width:56px;height:56px;border-radius:50%;background:#fff;font-size:24px;color:var(--soft);box-shadow:0 3px 10px #0001}
/* 首页 */
.ic{width:1.15em;height:1.15em;object-fit:contain;vertical-align:-.2em;flex:none}
.tb-chip .ic,.tb-back .ic{width:26px;height:26px}
.tb-back{display:inline-flex;align-items:center;gap:6px}
.mic-side{display:flex;align-items:center;justify-content:center}.mic-side .ic{width:34px;height:34px}
.btn .ic{margin-right:6px}
.home{max-width:1280px;margin:0 auto;min-width:0;display:flex;flex-direction:column;gap:22px}
.hero{position:relative;border-radius:30px;overflow:hidden;background:linear-gradient(120deg,#FFF1D6,#FFE6C2 55%,#FFDDB8);box-shadow:0 10px 30px #e9c9963d;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:0 30px}
.hero-txt{flex:1;padding:30px 8px;align-self:center;max-width:600px}
.hero-img{height:250px;width:auto;max-width:48%;object-fit:contain;object-position:bottom;display:block;margin-top:14px}
.hero h1{font-size:54px;letter-spacing:6px;color:var(--main);text-shadow:0 4px 0 #FFE0B8}
.hero .sub{font-size:20px;color:var(--soft);margin:2px 0 16px;letter-spacing:2px}
.hello{display:flex;align-items:center;gap:14px}
.hello img{width:84px;height:84px;border-radius:50%;object-fit:cover;border:5px solid #fff;box-shadow:0 4px 14px #f3c99a88;flex:none}
.hello .bubble{font-size:22px;padding:12px 18px}
.mods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mod{background:#fff;border-radius:26px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 7px 0 color-mix(in srgb,var(--c) 35%,#fff),0 14px 30px #0000000d;border:3px solid color-mix(in srgb,var(--c) 22%,#fff)}
.mod{font:inherit;color:inherit;text-align:inherit;padding:0;cursor:pointer;transition:transform .18s,box-shadow .18s}
.mod:hover{transform:translateY(-5px)}
.mod:focus-visible,.ch-opts button:focus-visible{outline:4px solid var(--c);outline-offset:3px}
.mod-go{margin-top:auto;align-self:center;padding:10px 28px;border-radius:999px;background:var(--c);color:#fff;font-size:20px;font-weight:700;box-shadow:0 4px 0 color-mix(in srgb,var(--c) 70%,#000)}
.choose{max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:24px}
.ch-head{display:flex;align-items:center;gap:26px;background:#fff;border-radius:26px;padding:18px 26px;border:3px solid color-mix(in srgb,var(--c) 22%,#fff);box-shadow:0 7px 0 color-mix(in srgb,var(--c) 35%,#fff)}
.ch-head img{width:240px;aspect-ratio:3/2;object-fit:contain;border-radius:18px}
.ch-head .tag{position:static;display:inline-block}
.ch-head h2{font-size:40px;color:var(--c);margin:6px 0}
.ch-head p{font-size:22px;color:var(--soft)}
.ch-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.ch-opts.roles5{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.ch-opts button{background:#fff;border:3px solid color-mix(in srgb,var(--c) 30%,#fff);border-radius:26px;padding:26px 14px 22px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--ink);box-shadow:0 7px 0 color-mix(in srgb,var(--c) 30%,#fff);transition:transform .15s}
.ch-opts button:hover{transform:translateY(-5px);background:color-mix(in srgb,var(--c) 8%,#fff)}
.ch-st{display:flex;gap:4px;height:52px;align-items:center}.ch-st .ic{width:48px;height:48px}
.ch-av{width:100%;max-width:130px;aspect-ratio:1;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 4px 12px #0000001f}
.ch-opts b{font-size:28px}
.ch-opts.roles5 b{font-size:21px}
.ch-opts small{font-size:17px;color:var(--soft);line-height:1.4;text-align:center}
.mod-top{position:relative}
.mod-top img{width:100%;aspect-ratio:3/2;height:auto;object-fit:contain;display:block}
.tag{position:absolute;left:14px;top:14px;background:var(--c);color:#fff;font-size:15px;font-weight:700;padding:4px 12px;border-radius:12px}
.mod-body{padding:14px 18px 20px;text-align:center;flex:1;display:flex;flex-direction:column}
.mod h2{font-size:30px;color:var(--c)}
.mod p{font-size:18px;color:var(--soft);margin:2px 0 14px}
.said .kid{width:40px;height:40px;border-radius:50%;object-fit:cover;vertical-align:middle;margin-right:8px}
.next .ic,.th-head .ic{margin-right:4px}
/* 看图说话 */
.pic-page{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;max-width:1360px;margin:0 auto;align-items:start}
.pic-frame{background:#fff;padding:14px;border-radius:26px;box-shadow:0 10px 30px #0000001a;transform:rotate(-1deg)}
.pic-frame{max-width:calc(100vh - 300px);margin:0 auto}.pic-frame img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:16px;display:block}
.need-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.need-bar i{font-style:normal;font-size:24px;color:var(--soft)}
.need{font-size:24px;font-weight:800;color:#fff;background:var(--c);padding:8px 18px;border-radius:14px;box-shadow:0 4px 0 color-mix(in srgb,var(--c) 70%,#000)}
.sblocks{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 14px}
.sb{border-radius:16px;padding:8px 16px;text-align:center;min-width:100px;animation:pop .4s both}
.sb small{display:block;font-size:15px;font-weight:700}
.sb b{font-size:28px}
.sb.has{background:var(--c);color:#fff;box-shadow:0 5px 0 color-mix(in srgb,var(--c) 70%,#000)}
.sb.miss{border:3px dashed var(--c);color:var(--c);background:#fff;animation:pop .4s both,wobble 1.2s .4s infinite}
@keyframes pop{from{transform:scale(.3);opacity:0}}
@keyframes wobble{50%{transform:rotate(-4deg) scale(1.05)}}
.stars.big{margin:8px 0}
/* 小火车 */
.train-page{max-width:1200px;margin:0 auto}
.track{display:flex;align-items:flex-end;gap:6px;min-height:130px;margin:28px 0 10px;padding:0 0 14px;border-bottom:10px solid #A47551;position:relative}
.track::after{content:"";position:absolute;left:0;right:0;bottom:-16px;height:6px;background:repeating-linear-gradient(90deg,#6B4A32 0 14px,transparent 14px 34px)}
.loco{height:120px;width:auto;flex:none}
.cars{display:flex;gap:6px;flex-wrap:wrap;min-height:80px}
.car{font-size:34px;font-weight:800;padding:18px 26px;border-radius:16px 16px 8px 8px;background:#118AB2;color:#fff;box-shadow:0 6px 0 #0B5C78;position:relative}
.car::after{content:"● ●";position:absolute;left:0;right:0;bottom:-20px;font-size:18px;color:#333;text-align:center;letter-spacing:14px}
.pool .car{background:#FFB347;box-shadow:0 6px 0 #D98A1F}
.pool{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;min-height:100px;padding:20px;background:#fff;border-radius:24px;border:3px dashed var(--line)}
.ghostcar{background:#fff;color:#118AB2;border:3px dashed #118AB2;box-shadow:none;animation:wobble 1.2s infinite}
.newcar{background:#06D6A0;box-shadow:0 6px 0 #04976F;animation:pop .5s}
.track.go .loco,.track.go .cars{animation:chug .5s 4}
.track.shake{animation:shake .5s}
@keyframes chug{50%{transform:translateY(-6px)}}
.track.go .loco{animation-name:chugL}
@keyframes chugL{50%{transform:translateY(-6px)}}
@keyframes shake{25%{transform:translateX(-12px)}75%{transform:translateX(12px)}}
/* 小剧场 */
.th-page{max-width:1100px;margin:0 auto}
.th-head{display:flex;align-items:center;gap:16px;background:#fff;padding:14px 20px;border-radius:20px;font-size:22px;box-shadow:0 4px 14px #eedcc566}
.th-task{flex:1}
.checks{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.ck{font-size:17px;padding:6px 14px;border-radius:14px;background:#FFF1E0;color:var(--soft)}
.chat{display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - 420px);overflow:auto;padding:6px}
.msg{display:flex;align-items:flex-end;gap:10px}
.msg.me{justify-content:flex-end}
.msg .av{width:64px;height:64px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 3px 10px #0000001a;flex:none}
.msg .b{max-width:70%;font-size:26px;line-height:1.5;padding:14px 20px;border-radius:22px 22px 22px 6px;background:#fff;box-shadow:0 3px 10px #0000000d;animation:pop .3s}
.msg.me .b{background:#DFF5FF;border-radius:22px 22px 6px 22px}
.vol{display:block;font-style:normal;font-size:16px;margin-top:4px;font-weight:700}
.vol.ok{color:#06A77D}.vol.loud{color:#E63946}
/* 弹层 */
#overlay{position:fixed;inset:0;background:#3a2e2a88;display:flex;align-items:center;justify-content:center;z-index:40}
.card{background:#fff;border-radius:30px;padding:30px 40px;text-align:center;box-shadow:0 20px 60px #0004;animation:pop .3s}
.result-card{width:min(620px,92vw)}
.result-card img{width:96px;height:96px;border-radius:50%;object-fit:cover}
.result-card h2{font-size:30px;margin:8px 0}
.result-card p{font-size:22px}
.cklist{list-style:none;text-align:left;font-size:21px;margin:12px auto;display:inline-block}
.cklist li{margin:6px 0;color:var(--soft)}.cklist li.ok{color:var(--ink)}
.praise{color:var(--main);font-weight:700;margin-top:8px}
.next{color:var(--soft);margin-top:6px}
.roll p{font-size:26px}
.roll .num{font-size:160px;font-weight:900;color:var(--main);line-height:1.1;min-width:260px}
.roll .num.pick{animation:pop .4s;color:#EF476F}
.roll small{font-size:28px}
/* 教师端 */
.teacher-page{max-width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.kpi{background:#fff;border-radius:20px;padding:18px;text-align:center;box-shadow:0 4px 14px #eedcc566}
.kpi b{font-size:44px;color:var(--main)}.kpi small{display:block;font-size:16px;color:var(--soft)}
.panel{background:#fff;border-radius:20px;padding:20px 24px;box-shadow:0 4px 14px #eedcc566}
.panel h3{font-size:22px;margin-bottom:14px}
.barrow{display:flex;align-items:center;gap:12px;margin:8px 0;font-size:19px;font-weight:700}
.barrow span{width:90px}.barrow em{width:60px;font-style:normal;color:var(--soft)}
.bar{flex:1;height:22px;background:#F6EEE2;border-radius:11px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:11px;transition:width .6s}
.advice{margin-top:14px;font-size:19px;background:#FFF8E1;padding:12px 16px;border-radius:14px}
table{width:100%;border-collapse:collapse;font-size:17px}
th,td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left}
th{color:var(--soft)}
.setrow{display:flex;gap:16px;align-items:center;flex-wrap:wrap;font-size:19px}
.setrow input{width:80px;font-size:19px;padding:6px;border-radius:10px;border:2px solid var(--line)}
.privacy{width:100%;font-size:15px;color:var(--soft)}
@media (max-width:1100px){.mods{grid-template-columns:repeat(2,minmax(0,1fr))}.mod:last-child{grid-column:1/-1;flex-direction:row}.mod:last-child .mod-top{flex:0 0 52%}.mod:last-child .mod-body{justify-content:center}.ch-opts.roles5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){.mods{grid-template-columns:minmax(0,1fr)}.mod:last-child{flex-direction:column}.ch-head{flex-direction:column;text-align:center}.ch-head img{width:100%;max-width:320px}.ch-opts{grid-template-columns:minmax(0,1fr)}.ch-opts.roles5{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ch-opts.roles5 .ch-av{max-width:96px}.ch-opts.roles5 b{font-size:18px}.ch-opts button{padding:16px 10px}.hero{flex-direction:column;align-items:center;padding:0 16px}.hero-txt{padding:22px 4px 8px}.hero-img{max-width:100%;height:auto;width:100%;max-height:260px}}
@media (max-width:1000px){.pic-page{grid-template-columns:minmax(0,1fr)}.hero h1{font-size:40px}.tb-title{font-size:22px}.tb-chip{font-size:17px;padding:8px 12px}.kpis{grid-template-columns:repeat(2,1fr)}#view{padding:14px 16px 210px}}
@media (max-width:600px){.topbar{padding:8px 10px;gap:6px}.tb-title{font-size:18px;letter-spacing:0}.tb-right{gap:4px}.tb-chip{font-size:14px;padding:6px 7px;gap:2px}.tb-title:empty{display:none}.tb-right{margin-left:auto}.tb-chip .ic,.tb-back .ic{width:20px;height:20px}.tb-back{font-size:15px;padding:6px 10px}.hero{min-height:200px}.hero-txt{padding:20px}.hero h1{font-size:34px;letter-spacing:3px}.hello img{width:60px;height:60px}.hello .bubble{font-size:18px}}
