:root{
  --bg:#e9f6f2;
  --mint:#dff3eb;
  --teal:#4a9b8f;
  --teal-dark:#2f756b;
  --sky:#f3fbff;
  --ink:#26413d;
  --soft-ink:#58716d;
  --paper:#fffdf7;
  --peach:#ffe6cf;
  --gold:#f3cb76;
  --card:#ffffffd9;
  --line:#c5e0da;
  --shadow:0 16px 36px rgba(72,104,100,.12);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%}
body{
  font-family:"PingFang TC","Noto Sans CJK TC","Microsoft JhengHei",sans-serif;
  color:var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.3)),
    url('./assets/hong-kong-watercolor.webp') center/cover no-repeat fixed,
    var(--bg);
  overflow-x:hidden;
}
button,textarea,select{font:inherit}
button{cursor:pointer}
.hidden-select{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.app-shell{position:relative;z-index:5;max-width:1440px;margin:0 auto;padding:14px;min-height:100vh;display:flex;flex-direction:column;gap:12px}
.panel{background:var(--card);backdrop-filter:blur(8px);border:2px solid rgba(255,255,255,.8);box-shadow:var(--shadow);border-radius:26px}

.scene{position:fixed;pointer-events:none;z-index:0}
.scene-cloud{width:200px;height:76px;border-radius:999px;background:rgba(255,255,255,.78);filter:blur(1px);box-shadow:55px 10px 0 10px rgba(255,255,255,.82),110px 4px 0 2px rgba(255,255,255,.76);opacity:.88}
.cloud-a{top:74px;left:-30px;animation:floatCloud 28s linear infinite}
.cloud-b{top:128px;right:-80px;transform:scale(1.08);animation:floatCloudReverse 33s linear infinite}
@keyframes floatCloud{from{transform:translateX(0)}to{transform:translateX(130vw)}}
@keyframes floatCloudReverse{from{transform:translateX(0) scale(1.08)}to{transform:translateX(-130vw) scale(1.08)}}
.scene-envelope{width:74px;height:48px;border-radius:12px;background:rgba(255,247,222,.8);border:2px solid rgba(109,146,160,.28);opacity:.38;transform:rotate(-9deg)}
.scene-envelope::before,.scene-envelope::after{content:"";position:absolute;inset:8px;border-top:2px solid rgba(109,146,160,.32);transform-origin:center}
.scene-envelope::before{transform:rotate(27deg)}
.scene-envelope::after{transform:rotate(-27deg)}
.envelope-a{top:210px;right:58px;animation:mailDrift 16s ease-in-out infinite}
.envelope-b{top:290px;right:10px;transform:scale(.8) rotate(10deg);animation:mailDrift2 18s ease-in-out infinite}
@keyframes mailDrift{0%,100%{transform:translateY(0) rotate(-9deg)}50%{transform:translate(-12px,14px) rotate(-2deg)}}
@keyframes mailDrift2{0%,100%{transform:translateY(0) scale(.8) rotate(10deg)}50%{transform:translate(10px,-12px) scale(.8) rotate(16deg)}}
.scene-water{left:0;right:0;bottom:0;height:120px;background:linear-gradient(180deg, rgba(140,203,213,0), rgba(140,203,213,.16));z-index:0}
.scene-water::before,.scene-water::after{content:"";position:absolute;left:-10%;right:-10%;height:16px;border-radius:999px;border:3px solid rgba(255,255,255,.32);border-color:rgba(255,255,255,.34) transparent transparent transparent}
.scene-water::before{bottom:38px;animation:wave 9s linear infinite}
.scene-water::after{bottom:12px;animation:wave 12s linear infinite reverse}
@keyframes wave{from{transform:translateX(0)}to{transform:translateX(60px)}}
.scene-ferris{left:18px;bottom:44px;width:154px;height:154px;opacity:.36;filter:drop-shadow(0 8px 16px rgba(51,78,99,.16))}
.scene-ferris svg{width:100%;height:100%}
.wheel-rim{fill:rgba(255,255,255,.18);stroke:#93b8d8;stroke-width:4}
.wheel-hub{fill:#b6d8ef;stroke:#88b2d0;stroke-width:2}
.wheel-spoke{stroke:#97b8d5;stroke-width:3;stroke-linecap:round}
.wheel-cars rect{fill:#fff8df;stroke:#85aeca;stroke-width:2}
.wheel-leg,.wheel-base{fill:none;stroke:#85aeca;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.wheel-rotor{transform-origin:90px 90px;animation:ferrisRotate 34s linear infinite}
@keyframes ferrisRotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}

.hero{display:grid;grid-template-columns:minmax(360px,1.2fr) minmax(280px,.8fr) 250px;gap:14px;align-items:center;padding:18px 20px;position:relative;overflow:hidden}
.hero::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.45),rgba(255,255,255,.18));pointer-events:none}
.hero>*{position:relative;z-index:1}
.title-board{display:inline-grid;gap:4px;padding:10px 16px;background:rgba(255,252,241,.86);border:2px solid rgba(255,255,255,.85);border-radius:22px;box-shadow:0 8px 18px rgba(124,135,87,.08)}
.title-board h1{margin:0;font-size:40px;line-height:1.1;font-family:"DFKai-SB","BiauKai","KaiTi","STKaiti",serif;letter-spacing:.08em}
.title-board p{margin:0;font-size:24px;color:#5d7d75;font-family:"DFKai-SB","BiauKai","KaiTi","STKaiti",serif}
.hero-note{margin-top:10px;max-width:650px;padding:10px 14px;background:rgba(255,255,255,.72);border-radius:18px;color:var(--soft-ink);font-size:15px;line-height:1.6}
.hero-bubble-wrap{display:grid;gap:10px;justify-items:start}
.hero-speech{padding:14px 16px;background:#fffef7;border:2px solid #f0ddad;border-radius:22px;line-height:1.6;min-height:80px;box-shadow:0 12px 24px rgba(140,117,67,.10)}
.hero-actions{display:flex;gap:10px}
.icon-btn{width:42px;height:42px;border:none;border-radius:14px;background:linear-gradient(180deg,#fffaf0,#ffe9b7);box-shadow:0 8px 16px rgba(155,132,78,.14)}
.paper-scene{position:relative;display:grid;justify-items:center;align-items:end;min-height:178px}
.paper-button{border:none;background:transparent;padding:0;width:180px;height:180px}
.paper-character{display:block;position:relative;width:100%;height:100%}
.paper-sway-wrap{display:block;animation:paperFloat 3.8s ease-in-out infinite,paperTilt 4.6s ease-in-out infinite}
.paper-character img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.paper-talking{opacity:0}
.paper-character.is-talking .paper-idle{opacity:0}
.paper-character.is-talking .paper-talking{opacity:1}
.paper-shadow{width:132px;height:20px;border-radius:50%;background:radial-gradient(circle, rgba(70,109,111,.26), rgba(70,109,111,0));margin-top:-14px}
@keyframes paperFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@keyframes paperTilt{0%,100%{rotate:-2deg}50%{rotate:2deg}}

.main-grid{display:grid;grid-template-columns:260px minmax(460px,1.02fr) minmax(340px,.9fr);gap:12px;min-height:0;flex:1}
.sidebar{padding:14px;display:grid;gap:12px;align-content:start}
.section-block{padding:12px;background:rgba(255,255,255,.56);border-radius:20px;border:1px solid rgba(197,224,218,.86)}
.section-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.section-title h2{margin:0;font-size:16px}
.choice-stack{display:grid;gap:8px}
.choice-card{padding:10px 12px;border:none;border-radius:16px;background:#f7fcfa;text-align:left;border:2px solid transparent;box-shadow:0 6px 12px rgba(66,126,116,.05)}
.choice-card strong{display:block;font-size:15px}
.choice-card small{display:block;color:var(--soft-ink);margin-top:2px}
.choice-card.is-active{border-color:#7cbfb4;background:#effaf7}
.info-block .mini-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.info-block .mini-row:first-child{margin-top:0}
.info-block .label{font-size:13px;color:var(--soft-ink)}
.voice-toggle{display:flex;align-items:center;gap:6px;font-size:14px}
.status-pill{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border-radius:999px;background:#eef8f5;color:#2b776d;font-size:12px;font-weight:700}
.swap-role-btn{width:100%;padding:10px;border:none;border-radius:14px;background:linear-gradient(180deg,#eefaf7,#dff3ed)}
.role-row{display:block;font-size:13px;color:var(--soft-ink);line-height:1.5;text-align:left}
.step-grid{display:grid;gap:8px}
.step-card{padding:10px 12px;border-radius:18px;background:#f6fbff;border:2px solid #d9ecf5;display:grid;grid-template-columns:38px 1fr;grid-template-areas:"n t" "n s";align-items:center;gap:2px 10px}
.step-card .num{grid-area:n;width:34px;height:34px;border-radius:999px;background:#dff2ed;display:grid;place-items:center;font-weight:700;color:#267568}
.step-card strong{grid-area:t;font-size:16px}
.step-card small{grid-area:s;color:var(--soft-ink)}
.step-card.active{border-color:#7cbfb4;background:#effaf7}
.step-card.done{border-color:#f0cc72;background:#fff8e6}

.mission{padding:16px;display:grid;gap:12px;align-content:start}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.panel-head h2{margin:0 0 4px;font-size:21px}
.panel-head p{margin:0;color:var(--soft-ink);font-size:14px;line-height:1.6}
.mission-chip{padding:8px 14px;border-radius:999px;background:#eefaf7;color:#28776b;font-weight:700;align-self:flex-start}
.teacher-tip{padding:10px 14px;border-radius:16px;background:#fffaf0;color:#6c5b38;border:1px solid #f3deb1;line-height:1.6}
.question-box{padding:14px;border-radius:20px;background:rgba(255,255,255,.65);border:1px solid var(--line)}
.question-label{display:inline-block;padding:6px 10px;border-radius:999px;background:#e8f6f2;color:#2e7b70;font-size:12px;font-weight:700}
.question-stem{margin-top:10px;font-size:22px;line-height:1.5;font-family:"DFKai-SB","BiauKai","KaiTi",serif;background:#f8fffd;border-radius:18px;padding:12px 14px;border:2px dashed #cce6de}
.question-note{margin:8px 0 0;color:var(--soft-ink);font-size:14px}
.composer{margin-top:12px;display:grid;gap:10px}
.composer textarea{width:100%;min-height:72px;border:2px solid #d3e8e2;border-radius:18px;padding:12px 14px;resize:vertical;background:#fff}
.composer-actions{display:grid;grid-template-columns:110px 1fr;gap:10px}
.mic-btn,.ask-btn,.next-btn,.summary-btn,.hint-toggle{border:none;border-radius:16px;padding:12px 14px}
.mic-btn{background:linear-gradient(180deg,#eef8ff,#ddeef8)}
.ask-btn{background:linear-gradient(180deg,#5eb2a2,#3a8e82);color:#fff;font-weight:700}
.next-btn{background:linear-gradient(180deg,#ffe9a9,#f2c86b);color:#5b4a15;font-weight:700}
.hint-box{margin-top:10px}
.hint-toggle{background:#f2f9ff;color:#507893}
.free-hints{display:grid;gap:8px;margin-top:10px}
.free-hints .hint-card{padding:10px 12px;background:#f8fffd;border-radius:14px;border:1px solid #d5ebe4;color:var(--soft-ink);line-height:1.6}
.evidence-panel{padding:14px;border-radius:20px;background:#fefcf5;border:1px solid #f0dfb6;display:grid;gap:10px}
.evidence-head h3{margin:0 0 4px}
.evidence-head p{margin:0;color:#6f6448;line-height:1.6}
.quote-options{display:grid;gap:8px}
.quote-option{display:flex;align-items:flex-start;gap:10px;padding:12px;border:2px solid #e8dfc4;border-radius:16px;background:#fff}
.quote-option input{margin-top:5px}
.quote-option.selected{border-color:#77b7ab;background:#f5fffb}
.evidence-actions{display:flex;gap:10px;flex-wrap:wrap}
.feedback{min-height:24px;margin:0;color:#7b6036;font-weight:700}
.worksheet{display:grid;gap:12px}
.worksheet-head h3{margin:0 0 4px}
.worksheet-head p{margin:0;color:var(--soft-ink);line-height:1.6}
.worksheet-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ws-card{padding:12px;border-radius:18px;background:#f8fffd;border:2px dashed #cfe5de;display:grid;gap:8px;min-height:150px}
.ws-card.done{background:#fffdf4;border-style:solid;border-color:#f0d27c}
.ws-tag{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:4px 10px;border-radius:999px;background:#e8f6f2;font-size:12px;font-weight:700;color:#2b776d}
.ws-card.done .ws-tag{background:#fff0bf;color:#6b5410}
.ws-event{font-size:15px;line-height:1.6}
.ws-evidence{font-size:13px;line-height:1.7;color:var(--soft-ink);white-space:pre-line}
.summary-box{padding:14px;border-radius:20px;background:#eff8ff;border:1px solid #d7e9f6;display:grid;gap:10px}
.summary-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.summary-text{line-height:1.9;min-height:64px}
.summary-btn{background:#dfeffc;color:#3f6d8a}
.chat{padding:16px;display:grid;grid-template-rows:auto 1fr auto;min-height:0}
.chat-head{padding-bottom:8px;border-bottom:1px solid rgba(197,224,218,.9)}
.presence{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--soft-ink)}
.dot{width:10px;height:10px;border-radius:50%;background:#57bd8d;box-shadow:0 0 0 5px rgba(87,189,141,.14)}
.chat-log{padding-top:12px;overflow:auto;display:grid;gap:10px;align-content:start;min-height:220px;max-height:calc(100vh - 390px)}
.message{display:grid;gap:5px;max-width:92%}
.message.user{justify-self:end}
.message.assistant{justify-self:start}
.bubble{padding:12px 14px;border-radius:18px;line-height:1.7;box-shadow:0 8px 16px rgba(86,103,104,.06)}
.message.user .bubble{background:#e9f7f3;border:1px solid #cfe9e2;border-bottom-right-radius:6px}
.message.assistant .bubble{background:#fffef7;border:1px solid #eadfb9;border-bottom-left-radius:6px}
.meta{font-size:12px;color:var(--soft-ink)}
.chat-foot{padding-top:8px;border-top:1px solid rgba(197,224,218,.9);font-size:12px;color:var(--soft-ink)}
.site-footer{text-align:center;font-size:12px;color:#4c6a65;padding:4px 0 8px}

@media (max-width: 1160px){
  .main-grid{grid-template-columns:240px 1fr}
  .chat{grid-column:1 / -1;min-height:340px}
  .chat-log{max-height:340px}
  .hero{grid-template-columns:1fr 1fr 220px}
}
@media (max-width: 860px){
  .app-shell{padding:10px}
  .hero{grid-template-columns:1fr;justify-items:center;text-align:center}
  .hero-bubble-wrap{justify-items:center}
  .hero-note{margin-left:auto;margin-right:auto}
  .main-grid{grid-template-columns:1fr}
  .worksheet-grid{grid-template-columns:1fr}
  .composer-actions{grid-template-columns:1fr 1fr}
  .scene-ferris{width:118px;height:118px;left:-8px;bottom:20px}
  .title-board h1{font-size:32px}
  .title-board p{font-size:22px}
  .question-stem{font-size:19px}
  .panel-head{flex-direction:column;align-items:flex-start}
}


/* Preview QA: preserve image layout within animated character wrapper */
.paper-sway-wrap{position:relative;display:block;width:100%;height:100%}

/* iPad horizontal: keep entire three-column workspace in one viewport,
   with independent scrolling for information-heavy panels. */
@media (min-width:1000px) and (max-height:950px){
  html,body{height:100%;overflow:hidden}
  .app-shell{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden;padding:8px 12px;gap:8px;max-width:none}
  .hero{flex:none;grid-template-columns:minmax(330px,1.2fr) minmax(230px,.8fr) 190px;gap:12px;height:150px;min-height:150px;padding:8px 12px}
  .title-board{padding:6px 13px;border-radius:17px}
  .title-board h1{font-size:30px}
  .title-board p{font-size:19px}
  .hero-note{font-size:12px;line-height:1.45;margin-top:5px;padding:6px 10px}
  .hero-speech{font-size:13px;padding:9px 12px;min-height:0}
  .hero-bubble-wrap{gap:6px}
  .icon-btn{width:34px;height:34px}
  .paper-scene{height:144px;min-height:144px}
  .paper-button{width:142px;height:142px}
  .paper-shadow{margin-top:-16px}
  .main-grid{display:grid;flex:1 1 auto;grid-template-columns:195px minmax(340px,1.07fr) minmax(280px,.93fr);gap:8px;min-height:0;height:auto;overflow:hidden}
  .sidebar,.mission,.chat{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .sidebar{padding:10px;gap:7px}
  .section-block{padding:9px;border-radius:14px}
  .section-title{margin-bottom:6px}
  .section-title h2{font-size:14px}
  .choice-stack,.step-grid{gap:5px}
  .choice-card{padding:7px 9px;border-radius:11px}
  .choice-card strong,.step-card strong{font-size:13px}
  .choice-card small{font-size:10px;margin-top:0}
  .step-card{padding:6px 8px;grid-template-columns:30px 1fr}
  .step-card .num{width:26px;height:26px}
  .step-card small{font-size:10px}
  .info-block .mini-row{margin-top:6px}
  .swap-role-btn{padding:7px}
  .role-row{font-size:10px}
  .mission{padding:11px;gap:8px}
  .panel-head h2{font-size:17px}
  .panel-head p{font-size:11px}
  .mission-chip{padding:6px 10px;font-size:12px}
  .teacher-tip{padding:7px 10px;font-size:11px}
  .question-box,.evidence-panel{padding:9px;border-radius:13px}
  .question-stem{font-size:18px;margin-top:6px;padding:8px 10px;border-radius:12px}
  .question-note{font-size:11px;margin-top:4px}
  .composer{margin-top:7px;gap:6px}
  .composer textarea{min-height:52px;height:52px;padding:8px 10px;border-radius:12px;font-size:12px}
  .composer-actions{grid-template-columns:95px 1fr;gap:6px}
  .mic-btn,.ask-btn,.next-btn,.summary-btn,.hint-toggle{padding:8px 10px;border-radius:11px;font-size:12px}
  .worksheet-head p{font-size:11px}
  .worksheet-grid{gap:6px}
  .ws-card{padding:8px;gap:5px;min-height:105px}
  .ws-event{font-size:12px}
  .ws-evidence{font-size:11px}
  .chat{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;padding:12px}
  .chat-log{overflow-y:auto;min-height:0;max-height:none;}
  .message .bubble{font-size:12px;padding:9px 10px}
  .site-footer{flex:none;padding:0;font-size:10px}
}
@media (min-width:1000px) and (max-width:1160px) and (max-height:950px){
 .main-grid{grid-template-columns:180px minmax(330px,1.12fr) minmax(240px,.88fr)}
 .chat{grid-column:auto;min-height:0}
 .hero{grid-template-columns:minmax(320px,1.1fr) minmax(220px,.8fr) 170px}
}

/* ===== V3: 小紙的記憶小偵探＋圖像流程圖 ===== */
[hidden]{display:none!important}
body{background-color:#eaf4f0}
.hero-speech{max-height:150px;overflow:auto}
.teacher-tip{font-size:13px;padding:8px 12px}
.question-stem{font-size:19px;padding:10px 13px;margin-top:6px}
.question-note{font-size:12px}
.composer{margin-top:8px;gap:7px}
.composer textarea{min-height:56px;padding:10px 12px}
.mission{gap:9px}
.judgement-panel{
  padding:13px;border-radius:20px;border:2px solid #f1dcae;
  background:linear-gradient(120deg,#fff9eb,#fffdf7);display:grid;gap:8px;
  box-shadow:0 7px 20px rgba(164,139,83,.10)
}
.judge-title{font-weight:800;color:#765c2c;font-size:18px}
.judge-sub{font-size:13px;color:#837058}
.judge-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.judge-btn{border-radius:15px;padding:11px 12px;font-size:18px;font-weight:800;border:2px solid transparent;box-shadow:0 5px 10px rgba(80,100,94,.08);transition:transform .15s ease,box-shadow .15s ease}
.judge-btn:active{transform:scale(.97)}
.judge-btn.yes{background:#e2f8ed;border-color:#a5d8bf;color:#237157}
.judge-btn.no{background:#fff0e8;border-color:#efc5ad;color:#a05d37}
.judge-feedback{min-height:0;margin:0;font-size:13px;color:#966d33}
.judge-feedback:empty{display:none}
.evidence-panel{padding:12px;gap:7px}
.evidence-head h3{font-size:16px}
.evidence-head p{font-size:13px}
.quote-option{padding:9px 10px;font-size:13px;line-height:1.5}
.evidence-actions .ask-btn{padding:10px 12px}
.advance-bar{background:linear-gradient(110deg,#ebf9ef,#fcf8e8);padding:9px 11px;border:1px solid #c9e6d5;border-radius:17px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#367861;font-weight:700;font-size:13px}
.advance-bar .next-btn{padding:9px 12px;flex-shrink:0;font-size:13px}
.visual-workflow{padding:12px;border-radius:23px;background:linear-gradient(160deg,rgba(252,254,250,.9),rgba(235,248,249,.88));border:2px solid #d7e9e3;gap:8px}
.visual-workflow .worksheet-head{display:flex;align-items:baseline;flex-wrap:wrap;justify-content:space-between;gap:2px 10px}
.visual-workflow .worksheet-head h3{font-size:19px;margin:0;letter-spacing:.03em}
.visual-workflow .worksheet-head p{font-size:12px;margin:0}
.journey-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr) minmax(13px,.18fr)) minmax(0,1fr);gap:2px;align-items:center;width:100%;min-width:0}
.flow-stage{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;min-height:121px;padding:8px 5px 7px;border-radius:18px;border:2px solid #c8e2db;background:rgba(255,255,255,.83);box-shadow:0 5px 9px rgba(74,109,102,.06);text-align:center;color:#3a6d67;font-family:inherit}
button.flow-stage{cursor:pointer}
.flow-stage.locked{opacity:.75;border-style:dashed;background:#f2faf8}
.flow-stage.current.locked{border-color:#d6b879}
.flow-stage.unlocked{border-color:#add8c6;background:linear-gradient(170deg,#fffef9,#eefaf5);animation:unlockStep .48s ease-out both}
.flow-stage.unlocked:hover{box-shadow:0 8px 18px rgba(86,134,123,.17)}
@keyframes unlockStep{from{opacity:.2;transform:scale(.91)}to{opacity:1;transform:scale(1)}}
.flow-label{font-size:14px;font-weight:800;line-height:1.4;background:#e2f3ec;border-radius:999px;padding:2px 9px;white-space:nowrap}
.flow-art{width:100%;height:74px;min-height:74px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:12px;background:linear-gradient(145deg,#eaf8f5,#f9f6e8)}
.flow-art img{display:block;width:100%;height:100%;object-fit:contain;animation:picturePop .55s ease-out both}
@keyframes picturePop{from{transform:translateY(9px) scale(.88);opacity:.1}to{transform:translateY(0) scale(1);opacity:1}}
.flow-question{font-family:serif;font-size:52px;line-height:1;color:#a0c9c0;filter:drop-shadow(0 4px 2px rgba(60,92,89,.10))}
.flow-desc{font-size:12px;font-weight:700;line-height:1.35;min-height:16px;white-space:normal}
.flow-stage.locked .flow-desc{color:#83a3a0}
.flow-arrow{height:40px;min-width:0;color:#74b2a6;display:flex;justify-content:center;align-items:center;overflow:hidden}
.flow-arrow svg{width:100%;max-width:30px;height:38px}
.flow-info{display:flex;align-items:start;gap:8px;padding:9px 11px;background:#fff7df;border:1px solid #efd5a0;border-radius:13px;color:#6b5c40;font-size:12px;line-height:1.6}
.flow-info-text{flex:1}
#hideFlowInfo{width:27px;height:27px;flex-shrink:0;border:0;border-radius:8px;background:#fff0c6;color:#735e3c}
.report-wrap{display:grid;gap:7px}
.report-button{width:100%;padding:10px;border:0;border-radius:15px;background:linear-gradient(130deg,#d8f0e7,#d4eef7);font-weight:800;color:#377668}
.report-body{padding:9px 11px;border-radius:15px;background:rgba(255,255,255,.9);border:1px solid #c7dfdd;line-height:1.7}
.report-body p{margin:0 0 6px}
.report-body .summary-btn{padding:7px 10px;font-size:12px}
.quote-option input{accent-color:#4f9c8e;flex-shrink:0}
#questionInput:focus,.quote-option:focus-within{outline:3px solid #a8d9d0;outline-offset:2px}
.scene-ferris{z-index:0;opacity:.30}
.scene-envelope{z-index:0;opacity:.22}
.scene-cloud{z-index:0;opacity:.48}
.app-shell{z-index:5}
@media (min-width:1161px){
  .main-grid{grid-template-columns:230px minmax(440px,1.1fr) minmax(310px,.85fr)}
  .sidebar{padding:10px;gap:8px}
  .section-block{padding:9px}
  .choice-stack{gap:5px}
  .choice-card{padding:7px 9px}
  .step-grid{grid-template-columns:1fr 1fr;gap:6px}
  .step-card{grid-template-columns:26px 1fr;gap:1px 5px;padding:6px;min-height:44px}
  .step-card .num{width:24px;height:24px}
  .step-card strong{font-size:13px}
  .step-card small{font-size:10px}
}
@media (min-width:861px) and (max-width:1160px){
  .hero{grid-template-columns:minmax(300px,1fr) minmax(240px,1fr) 180px}
  .main-grid{grid-template-columns:205px minmax(0,1fr)}
  .sidebar{padding:9px;gap:7px}
  .step-grid{grid-template-columns:1fr 1fr;gap:5px}
  .step-card{padding:5px;grid-template-columns:22px 1fr}
  .step-card .num{width:21px;height:21px}
  .step-card strong{font-size:13px}
  .step-card small{font-size:10px}
}
@media (max-width:860px){
  .main-grid{gap:10px}
  .journey-flow{gap:3px}
  .flow-stage{padding:7px 2px;min-height:114px}
  .flow-label{font-size:12px}
  .flow-art{height:66px;min-height:66px}
  .flow-desc{font-size:11px}
}
@media(max-width:480px){
  .journey-flow{grid-template-columns:repeat(3,minmax(0,1fr) minmax(12px,.15fr)) minmax(0,1fr)}
  .flow-art{height:48px;min-height:48px}
  .flow-label{font-size:11px;padding:3px 5px}
  .flow-desc{font-size:10px}
  .flow-stage{min-height:94px;padding:6px 2px}
  .flow-arrow svg{max-width:19px}
}
@media(prefers-reduced-motion:reduce){
 .scene,.paper-sway-wrap,.wheel-rotor,.flow-stage.unlocked,.flow-art img{animation:none!important}
}

/* Keep previously unlocked images fully visible; animate only the just-cleared step. */
.flow-stage.unlocked{animation:none}
.flow-stage.unlocked .flow-art img{animation:none}
.flow-stage.current.unlocked{animation:unlockStep .40s ease-out both}
.flow-stage.current.unlocked .flow-art img{animation:picturePop .40s ease-out both}
.chat .bubble{font-size:15px;line-height:1.75}
.chat .meta{font-size:12px}

/* ===== V5: group-specific tasks, guided vs reveal-on-demand, presentation screen ===== */
.advanced-hint-wrap{display:grid;justify-items:start;gap:7px;margin-top:9px}
.advanced-hint-wrap .hint-toggle{font-weight:700;min-height:38px;background:#e8f3ff;color:#366b89;border:1px solid #cadeec}
.advanced-hint-text{font-family:"DFKai-SB","BiauKai","KaiTi","STKaiti",serif;margin:0;padding:10px 12px;border:2px dashed #c1dbed;background:#f5fbff;border-radius:12px;color:#355c70;font-size:18px;line-height:1.6}
.question-stem{font-weight:700}
.journey-flow.two-stages{grid-template-columns:minmax(0,1fr) minmax(22px,.13fr) minmax(0,1fr);max-width:510px;margin:0 auto}
.journey-flow.two-stages .flow-art{height:112px;min-height:112px}
.journey-flow.two-stages .flow-stage{min-height:157px}
.report-screen{position:fixed;inset:0;z-index:9999;background:#f4f9f5;overflow:auto;overscroll-behavior:contain;padding:clamp(14px,2vw,28px);}
body.show-report{overflow:hidden}
.presentation-surface{position:relative;min-height:calc(100dvh - 56px);max-width:1400px;margin:auto;padding:clamp(18px,3vw,48px);background:linear-gradient(145deg,#fffdf6,#e8f4f4);border:2px solid #d3e8df;border-radius:26px;box-shadow:0 18px 50px rgba(61,109,105,.13);display:flex;flex-direction:column;gap:clamp(14px,2vh,26px)}
.presentation-back{align-self:flex-start;background:#e5f3ed;color:#317368;border:1px solid #bcded3;border-radius:12px;padding:10px 15px;font-size:14px;font-weight:700}
.presentation-header{text-align:center}
.presentation-header h2{margin:0 0 7px;font-size:clamp(24px,3.5vw,43px);font-family:"DFKai-SB","BiauKai","KaiTi","STKaiti",serif;color:#2f6f64}
.presentation-header p{margin:0;font-size:clamp(15px,1.8vw,23px);color:#617d72}
.presentation-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr) minmax(20px,.16fr)) minmax(0,1fr);gap:8px;align-items:center;width:100%;flex:1}
.presentation-flow.two-stages{grid-template-columns:minmax(0,1fr) minmax(26px,.16fr) minmax(0,1fr);max-width:920px;margin:0 auto}
.presentation-stage{border:2px solid #bfe1d3;border-radius:22px;background:#ffffffd9;display:flex;flex-direction:column;align-items:center;gap:9px;padding:clamp(12px,1.7vw,23px);box-shadow:0 9px 22px rgba(61,109,105,.09)}
.presentation-tag{font-size:clamp(19px,2.2vw,30px);color:#31796c}
.presentation-stage img{width:100%;height:clamp(125px,22vh,270px);object-fit:contain}
.presentation-stage p{font-size:clamp(14px,1.65vw,22px);margin:0;font-weight:700;text-align:center;color:#3e6258}
.presentation-arrow{font-size:clamp(20px,3vw,46px);color:#74b7a7;text-align:center}
.presentation-sentences{background:#fffefa;border:1px solid #d4e6df;padding:clamp(12px,2vw,22px);border-radius:18px;max-width:1080px;margin:0 auto;width:100%;}
.presentation-sentences p{font-size:clamp(16px,1.8vw,23px);line-height:1.75;margin:4px 0;color:#344f49}
@media(max-width:860px){
 .presentation-surface{min-height:calc(100dvh - 28px);padding:20px;gap:14px}
 .presentation-stage{padding:10px;gap:6px}
 .presentation-flow{gap:3px}
 .presentation-flow .presentation-stage img{height:clamp(95px,19vh,200px)}
 .presentation-flow.two-stages .presentation-stage img{height:clamp(170px,29vh,260px)}
}
@media(max-width:560px){
 .presentation-flow{gap:2px}
 .presentation-arrow{font-size:18px}
 .presentation-stage{border-radius:12px;padding:7px}
 .presentation-stage img{height:80px!important}
 .presentation-tag{font-size:15px}
 .presentation-stage p{font-size:12px}
 .presentation-sentences p{font-size:15px}
 .journey-flow.two-stages .flow-art{height:80px;min-height:80px}
}
@media print{
 .app-shell,.scene,.presentation-back{display:none!important}
 .report-screen{position:static;overflow:visible;padding:0}
 .presentation-surface{box-shadow:none;border:0;min-height:0}
}

/* ===== 記敍六要素：圖像概念圖（並非事件先後時間線） ===== */
.title-board p{font-size:clamp(18px,2vw,26px)}
.element-map{display:grid!important;grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr)!important;gap:8px;max-width:none!important;margin:0!important;align-items:center;}
.element-map .flow-stage{min-height:166px;width:100%;padding:9px 8px}
.element-map .flow-art{height:100px;min-height:100px}
.element-map .flow-desc{font-size:12px;font-weight:700;line-height:1.35}
.element-map .flow-label{font-size:16px}
.concept-hub{width:100%;max-width:88px;min-height:82px;align-self:center;justify-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative;border-radius:50%;border:2px solid #acd6cf;background:linear-gradient(145deg,#fffdf3,#eaf7f2);box-shadow:0 5px 14px rgba(50,108,98,.09);color:#3b8678;font-size:12px;font-weight:800;text-align:center;line-height:1.35;padding:5px;}
.concept-hub::before,.concept-hub::after{content:"";position:absolute;top:50%;width:9px;border-top:3px dashed #a1cbc1}
.concept-hub::before{left:-11px}.concept-hub::after{right:-11px}
.concept-hub .hub-dot{font-size:21px;color:#d3ad66}
.concept-presentation{grid-template-columns:minmax(0,1fr) minmax(92px,.25fr) minmax(0,1fr)!important;max-width:1040px;margin:0 auto;gap:16px;align-items:center;}
.concept-presentation .presentation-stage{min-width:0;width:100%;min-height:280px;}
.concept-presentation .presentation-stage img{height:clamp(145px,25vh,265px);}
.concept-presentation .presentation-stage p{font-size:clamp(15px,1.5vw,20px);}
.concept-report-hub{display:grid;justify-items:center;text-align:center;gap:8px;color:#40796e;font-size:clamp(13px,1.6vw,20px);position:relative;}
.concept-report-hub>span{display:grid;place-items:center;width:84px;height:84px;border-radius:50%;border:2px solid #b8ded4;background:#fffdf2;color:#c8a75e;font-size:36px;box-shadow:0 8px 18px rgba(70,109,100,.10)}
.concept-report-hub::before,.concept-report-hub::after{content:"";position:absolute;top:42px;left:-14px;width:18px;border-top:3px dashed #a5cfc4}
.concept-report-hub::after{left:auto;right:-14px}
.concept-report-hub strong{font-family:"DFKai-SB","BiauKai","KaiTi",serif;line-height:1.5;}
.presentation-sentences p strong{color:#2f756b}
@media (max-width:1250px){.element-map{grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr)!important}.concept-hub{max-width:68px;min-height:65px;font-size:11px}.element-map .flow-art{height:90px;min-height:90px}.element-map .flow-stage{min-height:153px}}
@media (max-width:860px){.concept-presentation{gap:8px;grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr)!important}.concept-presentation .presentation-stage{min-height:185px}}
@media (max-width:520px){.element-map{grid-template-columns:minmax(0,1fr) 53px minmax(0,1fr)!important;gap:4px}.element-map .flow-label{font-size:13px}.element-map .flow-art{height:74px;min-height:74px}.element-map .flow-stage{min-height:143px}.element-map .flow-desc{font-size:10px}.concept-hub{max-width:51px;min-height:54px;padding:2px;font-size:9px}.concept-hub .hub-dot{font-size:13px}.concept-presentation{grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;gap:5px}.concept-report-hub>span{width:46px;height:46px;font-size:22px}.concept-report-hub{font-size:10px}.concept-report-hub::before,.concept-report-hub::after{top:23px;width:8px}.concept-report-hub::before{left:-6px}.concept-report-hub::after{right:-6px}.concept-presentation .presentation-stage img{height:110px!important}}

/* ===== V6：四組分層任務；獨立要素的概念圖與匯報保持置中 ===== */
.element-map.single-element{display:flex!important;justify-content:center;align-items:center;max-width:100%!important}
.element-map.single-element .concept-card{width:min(100%,300px);min-height:196px}
.element-map.single-element .flow-art{height:130px;min-height:130px}
.element-map.single-element .flow-desc{font-size:14px}
.concept-presentation.single-element{display:flex!important;justify-content:center;align-items:center;max-width:800px}
.concept-presentation.single-element .concept-report-card{width:min(100%,560px);min-height:310px}
.concept-presentation.single-element .concept-report-card img{height:clamp(180px,34vh,350px)!important}
.concept-presentation.single-element .concept-report-card p{font-size:clamp(17px,2vw,24px)}
@media (min-width:1000px) and (max-height:950px){
  .sidebar .choice-stack{gap:4px}
  .sidebar .choice-card{padding:6px 9px}
}
@media (max-width:520px){
 .element-map.single-element .concept-card{min-height:168px}
 .element-map.single-element .flow-art{height:112px;min-height:112px}
 .concept-presentation.single-element .concept-report-card img{height:200px!important}
}


/* ===== V7：學生簡潔畫面與老師密碼設定 ===== */
[hidden]{display:none!important}
.main-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;grid-template-rows:auto minmax(0,1fr);gap:11px}
.student-banner{grid-column:1 / -1;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 16px;border-radius:20px;border:2px solid rgba(255,255,255,.8);background:rgba(255,254,248,.87);backdrop-filter:blur(7px);box-shadow:0 8px 20px rgba(74,117,109,.08)}
.student-group-name{font-weight:900;font-size:18px;color:#306b62}
.student-tasks{font-weight:750;font-size:16px;color:#365951}
.student-mode{border-radius:20px;background:#e1f3ed;color:#387b6d;padding:5px 13px;font-size:13px;font-weight:800}
.student-progress{background:#fff2d2;color:#947029;border-radius:20px;padding:5px 12px;font-size:13px;font-weight:800}
.student-swap{background:#e5f4fc;border:1px solid #c6e1ee;border-radius:13px;padding:7px 11px;color:#386d84;font-weight:750;font-size:13px;margin-left:auto}
.student-role{font-size:11px;color:#57716e}
.teacher-lock-btn{border:2px solid rgba(69,136,120,.35);border-radius:13px;padding:10px 15px;font-size:13px;font-weight:850;background:rgba(240,250,244,.94);color:#386b62;box-shadow:0 6px 13px rgba(42,104,97,.09)}
.teacher-lock-btn:focus-visible,.teacher-modal button:focus-visible,.teacher-modal select:focus-visible,.teacher-modal input:focus-visible{outline:3px solid #68b7a8;outline-offset:2px}
body.show-teacher{overflow:hidden}
.teacher-overlay{position:fixed;inset:0;z-index:11000;background:rgba(27,53,50,.52);backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:clamp(10px,2vw,20px)}
.teacher-modal{width:min(880px,100%);max-height:92dvh;overflow:auto;overscroll-behavior:contain;background:linear-gradient(160deg,#fffdf7,#eff8f5);border-radius:25px;border:2px solid #c5e1d7;box-shadow:0 22px 55px rgba(25,59,54,.24);padding:clamp(15px,2.2vw,26px);display:grid;gap:15px;color:#2c514a}
.teacher-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:12px;border-bottom:1px solid #d4e6df}
.teacher-modal-head h2{font-size:25px;margin:2px 0}
.teacher-modal-head p{font-size:13px;color:#55736d;margin:4px 0}
.teacher-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:900;color:#8aaf9f}
.teacher-close{border:0;background:#ebf3ef;color:#3d6d62;border-radius:12px;width:40px;height:40px;flex:none}
.teacher-auth{max-width:410px;margin:8px auto;display:grid;gap:11px;width:100%}
.teacher-auth-icon{text-align:center;font-size:42px}
.teacher-auth h3{text-align:center;font-size:21px;margin:0}
.teacher-auth p{text-align:center;color:#5a776f;margin:0;font-size:13px;line-height:1.7}
.teacher-auth .teacher-message{text-align:left}
.teacher-label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}
.teacher-auth input,.teacher-code-row input{border:2px solid #c2dbd2;background:#fff;border-radius:12px;padding:12px 14px;width:100%;font-size:16px}
.teacher-controls{display:grid;gap:14px}
.teacher-section{background:#ffffffb6;border:1px solid #d4e6de;border-radius:17px;padding:14px;display:grid;gap:11px}
.teacher-section h3{font-size:17px;margin:0}
.teacher-two-col{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.teacher-field{display:grid;gap:6px;font-weight:750;font-size:14px}
.teacher-select,.assignment-select{width:100%;background:#fff;border:2px solid #cde2db;border-radius:12px;padding:10px 12px;color:#295a50;font-size:15px}
.teacher-toggle{display:flex;align-items:center;gap:8px;font-size:14px}
.teacher-toggle input{accent-color:#408b7d}
.teacher-section-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.teacher-explain{font-size:13px;color:#58746b;line-height:1.65;margin:0}
.assignment-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.assignment-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f3faf7;padding:8px 11px;border-radius:12px;border:1px solid #d9eee5}
.assignment-label{font-weight:850;font-size:15px;white-space:nowrap}
.assignment-select{width:auto;min-width:112px;font-size:13px;padding:8px 9px}
.teacher-distribution{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.distribution-chip{padding:9px 11px;border-radius:11px;background:#e8f5f0;color:#3b7668;font-size:13px;font-weight:750;line-height:1.5}
.distribution-chip.empty{background:#fff1e9;color:#9a6146}
.teacher-warning{margin:0;font-size:12px;line-height:1.5;color:#977144}
.teacher-code-row{display:flex;gap:8px;align-items:center}
.teacher-code-row input{flex:1;min-width:110px}
.teacher-outline{padding:10px 12px;border-radius:12px;border:1px solid #bcd9ce;background:#eef8f3;color:#36796b;font-size:13px;font-weight:750;white-space:nowrap}
.teacher-primary{padding:12px 17px;border-radius:13px;background:linear-gradient(150deg,#4cae98,#338575);color:#fff;border:0;font-weight:800;font-size:14px}
.teacher-danger{padding:10px 12px;border-radius:12px;border:1px solid #ebc1b0;background:#fff2ed;color:#a56048;font-weight:800;font-size:13px}
.teacher-message{margin:0;min-height:18px;color:#a24f41;font-weight:750;font-size:13px}
.teacher-message:empty{display:none}
.teacher-bottom-bar{display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
.teacher-bottom-bar #saveTeacherSettings{margin-left:auto}
.teacher-security-note{font-size:11px;color:#81928c;line-height:1.7;margin:0}
@media(min-width:861px){.main-grid>.mission,.main-grid>.chat{grid-row:2;height:auto;min-height:0}.chat-log{max-height:calc(100vh - 350px)} }
@media (max-width:860px){
 .main-grid{display:flex;flex-direction:column}
 .student-banner{gap:8px;padding:10px}
 .student-swap{margin-left:0}
 .teacher-two-col,.assignment-table,.teacher-distribution{grid-template-columns:1fr}
 .teacher-code-row{flex-wrap:wrap}
 .teacher-code-row input{flex-basis:100%}
 .teacher-modal{max-height:94dvh}
}
@media (max-height:760px) and (min-width:861px){
 .hero{padding:8px 16px}
 .student-banner{padding:6px 14px}
 .chat-log{max-height:calc(100vh - 320px)}
}
@media (min-width:861px){
  .main-grid>.mission{grid-column:1!important;grid-row:2!important}
  .main-grid>.chat{grid-column:2!important;grid-row:2!important;min-height:0}
}

/* 任務重新分配後，三項要素的卡片也能排列整齊 */
.element-map.triple-element{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
.element-map.triple-element .flow-stage{min-height:154px}
.concept-presentation.triple-element{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px}
.concept-presentation.triple-element .concept-report-card{min-height:235px}
@media(max-width:560px){.element-map.triple-element{gap:3px}.concept-presentation.triple-element{gap:4px}}

/* V8 修正：學生可隨時顯示句式，跟讀語音；答題無效時即時顯示原因。 */
.advanced-hint-wrap{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px;margin-top:10px}
.advanced-hint-wrap .advanced-hint-text{flex-basis:100%;width:100%;padding:9px 12px;line-height:1.7;font-size:clamp(16px,1.6vw,21px);color:#285967}
.advanced-hint-wrap .hint-toggle,.hint-listen{min-height:44px;min-width:140px;border-radius:13px;padding:10px 14px;font-weight:700;line-height:1.4}
.hint-listen{background:#fff4d9;color:#765819;border:1px solid #e8d097}
.hint-voice-status{flex-basis:100%;margin:0;color:#47766f;line-height:1.5;font-size:13px}
.submit-feedback{margin:0;padding:8px 10px;color:#9c3e30;background:#fff2ec;border-left:4px solid #ca6f52;border-radius:10px;font-size:14px;font-weight:650;line-height:1.5}
.composer textarea[aria-invalid="true"]{border-color:#be6b52;box-shadow:0 0 0 2px rgba(190,107,82,.1)}
@media(max-width:860px){.advanced-hint-wrap .hint-toggle,.hint-listen{min-height:44px;font-size:14px}}

/* ===== V10: iPad / iPhone keyboard and zoom stability ===== */
:root{--v10-screen-height:100dvh}
/* iOS Safari focus zoom is triggered by form controls with computed font-size below 16px. */
#questionInput,.composer textarea,.teacher-auth input,.teacher-code-row input,
.teacher-select,.assignment-select,select,input,textarea{font-size:16px!important}
#questionInput{line-height:1.5;touch-action:manipulation;max-width:100%;width:100%;min-width:0}
.composer,.composer-actions,.mission,.main-grid{min-width:0}
.voice-status{display:inline-flex;align-items:center;max-width:220px;font-size:11px;font-weight:700;color:#39776d;background:rgba(255,255,255,.85);padding:5px 9px;border-radius:999px;border:1px solid #cde4d7;line-height:1.3}
@media (pointer:coarse){
  .teacher-overlay input,.teacher-overlay select{font-size:16px!important}
  body.v10-typing{height:var(--v10-screen-height);overflow:hidden!important}
  body.v10-typing .app-shell{height:var(--v10-screen-height)!important;max-height:var(--v10-screen-height)!important;min-height:0!important;overflow:hidden!important;display:flex!important;padding:6px 9px!important;gap:5px!important}
  body.v10-typing .hero,body.v10-typing .chat,body.v10-typing .site-footer{display:none!important}
  body.v10-typing .main-grid{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;height:auto!important;min-height:0!important;overflow:hidden!important;gap:5px!important}
  body.v10-typing .student-banner{flex:none!important;grid-column:auto!important;padding:5px 10px!important;gap:5px!important;border-radius:13px!important}
  body.v10-typing .student-swap,body.v10-typing .student-role{display:none!important}
  body.v10-typing .mission{display:block!important;flex:1 1 auto!important;grid-column:auto!important;grid-row:auto!important;height:auto!important;min-height:0!important;overflow-y:auto!important;padding:10px!important;overscroll-behavior:contain!important}
  body.v10-typing .mission .teacher-tip,body.v10-typing .mission .worksheet,body.v10-typing .mission .panel-head{display:none!important}
  body.v10-typing .question-box{display:block!important;padding:8px!important;margin:0!important}
  body.v10-typing .question-stem{font-size:20px!important;padding:6px 9px!important}
  body.v10-typing .composer{margin-top:6px!important;gap:6px!important}
  body.v10-typing #questionInput{min-height:56px!important;height:72px!important;max-height:96px!important;font-size:18px!important;padding:10px!important}
  body.v10-typing .composer-actions{display:grid!important;grid-template-columns:110px 1fr!important}
  body.v10-typing .advanced-hint-wrap{margin-top:4px!important}
  body.v10-typing .advanced-hint-text{font-size:16px!important;line-height:1.4!important;padding:7px!important}
}
@media (pointer:coarse) and (max-height:430px){
  body.v10-typing .student-banner{display:none!important}
  body.v10-typing .mission .question-note{display:none!important}
  body.v10-typing .mission .advanced-hint-wrap .hint-listen{min-height:38px!important;padding:7px!important}
}

@media(pointer:coarse){
 body.v10-typing .composer-actions{position:sticky;bottom:0;z-index:8;background:rgba(255,255,255,.96);padding:3px 0}
}
