:root{--ink:#193946;--teal:#246b78;--orange:#b44020;--paper:#f4f9fa;--line:#bfd5db;--pale:#e1f0f3;--white:#fff;--font:clamp(17px,1.9vw,22px);--radius:14px}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Microsoft JhengHei","Noto Sans TC",system-ui,sans-serif;font-size:var(--font);line-height:1.4}
button,a,input{touch-action:manipulation}button{font:inherit;border:2px solid var(--line);background:var(--white);color:var(--ink);padding:9px 16px;border-radius:10px;cursor:pointer;min-height:44px}
button:hover:not(:disabled){border-color:var(--teal);background:var(--pale)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--orange);outline-offset:3px}button:disabled{opacity:.48;cursor:default}.primary,button.selected{background:var(--teal);border-color:var(--teal);color:var(--white)}button.selected:hover{color:var(--ink)}
#lab{max-width:1160px;margin:auto;padding:12px 24px 16px}.lab-header{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:2px solid var(--line);padding-bottom:7px;font-weight:700}.lab-gloss{font-size:.85em;font-weight:400}
.scene-map{display:flex;gap:6px;margin:10px 0}.scene-map span{flex:1;text-align:center;border-radius:7px;padding:4px;background:var(--pale);font-size:.85em}.scene-map .current{background:var(--ink);color:var(--white)}.scene-map .done:before{content:'✓ '}
.scene-heading p{margin:3px 0}.scene-heading h1{font-size:clamp(24px,3vw,32px);line-height:1.25;margin:4px 0}#flow{font-size:.85em;color:var(--teal);font-weight:700}#task{font-size:.9em}
#stage{margin:10px 0 0;border-radius:var(--radius);background:var(--white);border:1px solid var(--line);padding:10px 16px;min-height:175px}.cups{display:grid;grid-template-columns:1fr 1fr;gap:24px}.cup{text-align:center}.cup h2{font-size:1em;margin:0}.ph{font-size:1.55em;font-weight:800;line-height:1.2}.delta{font-size:.85em;min-height:1.4em}.cup svg{display:block;width:100%;height:115px}.reaction{width:100%;height:175px;display:block}.reaction text,.cup text,.trend text{font-family:inherit;fill:var(--ink);font-weight:700}.reaction .hero,.cup .hero{fill:var(--orange)}.reaction .hero-label,.cup .hero-label{fill:var(--white)}
.caption{display:flex;align-items:center;gap:12px;margin-top:9px;border-left:5px solid var(--orange);padding:8px 12px;background:#fff2e9;min-height:52px}.caption p{margin:0;font-weight:700}.caption-label{font-size:.78em;flex-shrink:0;color:var(--orange)}.timeline{display:flex;align-items:center;gap:10px;font-size:.78em;margin:5px 0}progress{width:100%;height:6px;accent-color:var(--teal)}#time{min-width:80px;text-align:right}
#activity{min-height:78px}#activity p{margin:4px 0;font-weight:700}.choices{display:flex;gap:9px;flex-wrap:wrap}.choices button{flex:1}#feedback{font-size:.9em;min-height:1.45em;margin:5px 0;color:var(--teal)}#feedback.retry{color:var(--orange)}.controls{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:10px}.controls button{font-size:.9em}.controls #next{margin-left:auto}.model-note{font-size:.78em;margin:8px 0 4px}.teacher-notes{font-size:.85em}.teacher-notes p{margin:8px 0}a{color:var(--teal)}
.capacity{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:16px}.capacity h2{margin:0;font-size:1.05em}.tokens{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:8px 0}.token{padding:7px;text-align:center;border:2px solid var(--teal);border-radius:8px;font-size:.9em;background:var(--pale)}.token.spent{background:var(--paper);border-color:var(--line);color:#526770}.capacity-hero{height:32px;font-weight:700;color:var(--orange)}.trend{width:100%;height:145px;display:block}.transfer{display:flex;align-items:center;justify-content:space-around;gap:12px;padding:15px 0}.transfer .node{text-align:center;padding:15px;border-radius:var(--radius);background:var(--pale)}.transfer .node strong{display:block;font-size:1.3em}.transfer .node:last-child{background:#fff2e9}.transfer small{display:block;font-size:.82em}.result{font-weight:700;color:var(--teal)}
@media(max-width:600px){#lab{padding:12px}.lab-gloss{display:none}.scene-map span{font-size:14px;padding:6px 2px}.scene-map .done:before{content:''}.cups{gap:8px}#stage{padding:9px;min-height:160px}.cup h2{font-size:17px}.cup .ph{font-size:26px}.cup svg{height:105px}.caption{align-items:flex-start;gap:7px}.caption-label{display:none}.controls{flex-wrap:wrap}.controls button{flex:1;padding:9px 10px}.controls #next{flex:1 0 100%;margin:0}.choices{gap:7px}.choices button{flex:1 0 100%;text-align:left;padding:9px 12px}.capacity{grid-template-columns:1fr}.tokens{grid-template-columns:repeat(8,1fr);gap:4px}.token{padding:5px 1px;font-size:15px}.trend{height:135px}.transfer{gap:5px}.transfer .node{padding:12px 6px;font-size:16px}.transfer .node strong{font-size:21px}.reaction{height:155px}.model-note{font-size:14px}}
.reaction{height:120px}.reaction-steps{text-align:center;font-size:1em;min-height:52px;font-weight:700}.base-ph{display:block;font-size:.85em;color:var(--teal)}
button.selected:disabled{opacity:1;background:var(--teal);color:var(--white)}
@media(min-width:601px){:root{--font:19px}#lab{padding:9px 22px}.scene-map{margin:7px 0}.scene-heading h1{font-size:28px}.cup svg{height:90px}#stage{min-height:155px;padding:8px 14px}.caption{min-height:45px;padding:6px 12px}#activity{min-height:70px}.controls{padding-top:8px}.controls button{min-height:42px;padding:7px 13px}.reaction{height:98px}.trend{height:125px}.teacher-notes{font-size:16px}}
@media(max-width:600px){.reaction{height:95px}.reaction text{font-size:42px}.cup text{font-size:46px}.reaction-steps{font-size:18px}.transfer{flex-wrap:wrap}.capacity .ph small{font-size:16px}}
@media(max-width:600px){.controls{position:sticky;bottom:0;z-index:2;background:var(--paper);display:grid;grid-template-columns:repeat(3,1fr);padding:8px 0}.controls #next{grid-column:2 / span 2}.controls button{font-size:16px;padding:8px 4px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
