/*! BIO-ORIGIN project=cell-division-lab; version=1.0.0-web.1; official=https://bio2077.cn/; third-party licenses unchanged */
:root{color-scheme:dark;--bg:#0c1825;--panel:#122537;--line:#30495e;--text:#f1f5f8;--muted:#b5c7d8;--cyan:#7dded8;--accent:#ffe0a0;--membrane:#92e8e3;--wall:#a2ca71;--nucleus:#8586df;--stage:#0a1723}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-size:18px}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:1px solid var(--line);color:var(--text);background:#1b3043;border-radius:9px;min-height:44px;padding:8px 16px;touch-action:manipulation;white-space:nowrap}button:hover{background:#284459}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}button:disabled{opacity:.4;cursor:default}button[aria-pressed=true]{background:var(--cyan);color:#0b252e;border-color:var(--cyan);font-weight:700}#app{max-width:1800px;margin:auto;padding:22px 28px 10px}header,.brand,nav,.stage-top,.stage-bottom,.cell-heading,.transport,.play-controls,.speed,footer,.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}header{margin-bottom:20px}.brand{justify-content:flex-start;gap:16px}.brand-icon{font-size:46px;color:var(--cyan)}.eyebrow{font-size:15px;letter-spacing:2px;color:var(--cyan);margin:0 0 3px}.eyebrow span{letter-spacing:0;color:var(--muted);margin-left:12px}h1{font-size:clamp(23px,2.4vw,36px);margin:0;font-weight:700}main{display:grid;gap:14px}.question{display:flex;gap:24px;align-items:center;min-height:100px;padding:15px 22px;border-left:4px solid var(--accent);background:#192c3c;border-radius:0 12px 12px 0}.question>span{white-space:nowrap;color:var(--accent);font-size:18px;letter-spacing:2px}.question>div{flex:1}h2{font-size:clamp(23px,2vw,30px);margin:0 0 5px}.question p{font-size:20px;color:var(--muted);margin:0;min-height:30px}#answer{border-color:#9a895f;color:var(--accent);background:transparent}.stage{background:var(--stage);border:1px solid var(--line);border-radius:16px;overflow:hidden}.stage-top{padding:13px 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}.view-tabs{display:flex;gap:7px}.view-tabs button{font-size:17px;min-height:42px}.legend{display:flex;gap:18px;color:var(--muted);font-size:16px}.legend span{display:flex;gap:8px;align-items:center}.legend i{width:19px;height:9px;border-radius:10px;background:var(--membrane)}.legend .wall{background:var(--wall);height:13px}.legend .nucleus{background:#555992;border:1px solid #b5b6f9;height:17px;width:17px}.cells{display:grid;grid-template-columns:1fr 1fr}.cell-panel{min-width:0;padding:14px 22px 10px}.cell-panel+.cell-panel{border-left:1px solid var(--line)}.cell-heading h3{margin:0;font-size:24px;font-weight:600}.cell-heading>span{font-size:17px;color:var(--muted)}.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:10px}.animal{background:var(--cyan)}.plant{background:var(--wall)}svg{display:block;width:100%;height:clamp(230px,31vh,410px);overflow:visible}.cell-caption{font-size:22px;text-align:center;min-height:32px;margin:0 0 8px;color:var(--cyan)}[data-kind=plant] .cell-caption{color:#c3e594}.stage-bottom{padding:10px 18px;color:var(--muted);font-size:14px;border-top:1px solid var(--line)}#playState{color:var(--accent);white-space:nowrap}.steps{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:14px}.steps button{font-size:18px;min-height:52px;background:transparent;text-align:left;padding:10px 12px}.steps button span{font-size:14px;opacity:.7;margin-right:8px}.steps button[aria-current=step]{border-color:var(--cyan);background:#193c46;color:#b2fff1}.transport{flex-wrap:wrap}.primary{background:var(--cyan);color:#082532;font-weight:700;min-width:132px}.primary:hover{background:#a5eee8}.scrubber{display:flex;align-items:center;gap:10px;flex:1;min-width:180px;color:var(--muted);font-size:16px}input[type=range]{width:100%;height:40px;accent-color:var(--cyan);cursor:pointer}.speed button{font-size:16px;padding:8px 12px}footer{font-size:15px;color:var(--muted);padding:3px 0}small{font-size:12px;margin-left:12px}.cells[data-view=animal],.cells[data-view=plant]{grid-template-columns:1fr}.cells[data-view=animal] [data-kind=plant],.cells[data-view=plant] [data-kind=animal]{display:none}.cells[data-view=plant] .cell-panel{border:0}.cells:not([data-view=both]) svg{height:clamp(230px,31vh,410px)}.high-contrast{--bg:#030609;--stage:#000;--panel:#080c10;--line:#668394;--muted:#e1eaf3;--text:#fff;--cyan:#a3fff7;--accent:#ffe894}.high-contrast .question{background:#111c27}.high-contrast button{border-width:2px}.high-contrast .cell-caption{color:#c2fff7}.high-contrast [data-kind=plant] .cell-caption{color:#d5ffac}dialog{width:min(760px,94vw);max-height:85vh;overflow:auto;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);font-size:18px;line-height:1.75}dialog::backdrop{background:#000a}dialog h3{color:var(--cyan);margin-bottom:0}dialog p{margin:8px 0}a{color:var(--cyan)}.dialog-head{position:sticky;top:-28px;background:var(--panel);padding:12px 0}.dialog-head h2{margin:0}.svg-label{font:20px "Microsoft YaHei",sans-serif;fill:var(--text)}.svg-line{stroke:var(--muted);stroke-width:1.5;fill:none}.mem{fill:url(#animalFill);stroke:var(--membrane);stroke-width:4}.plant-mem{fill:url(#plantFill);stroke:var(--membrane);stroke-width:3}.wall-stroke{stroke:var(--wall);stroke-width:11;fill:none}.nuclear{fill:#514c8a66;stroke:#a7a4ed;stroke-width:2}.dna{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:7}.new-wall{stroke:#d3ee91;stroke-width:8;stroke-linecap:round}.new-membrane{stroke:var(--membrane);stroke-width:3;stroke-linecap:round}.direction{fill:none;stroke:#f5d8a0;stroke-width:3;stroke-linecap:round}
@media(min-width:1000px) and (max-height:800px){#app{padding:12px 20px 6px}header{margin-bottom:12px}main{gap:10px}.question{min-height:90px;padding:11px 18px}svg{height:230px}.steps{margin-bottom:10px}.steps button{min-height:48px}.cell-panel{padding-top:10px}.stage-top{padding:9px 14px}footer{font-size:14px}}
@media(max-width:1000px){#app{padding:14px}header{align-items:flex-start;flex-wrap:wrap}.brand-icon{display:none}nav{gap:8px}nav button{font-size:16px}.question{gap:12px}.question>span{display:none}.legend{gap:12px}.cell-panel{padding:12px}.cell-heading{flex-wrap:wrap;gap:4px}.cell-heading h3{font-size:22px}.cell-heading>span{font-size:15px}.cell-caption{font-size:19px}.steps button{font-size:16px;padding:8px}.steps button span{display:none}.stage-bottom{font-size:13px}footer{flex-wrap:wrap}.question p{font-size:18px}}
@media(max-width:640px){#app{padding:10px}h1{font-size:24px}.eyebrow{font-size:13px}.eyebrow span{margin-left:4px}.question{flex-wrap:wrap;padding:12px}.question h2{font-size:22px}.question #answer{margin-left:auto}.question>div{flex-basis:100%}.cells{grid-template-columns:1fr}.cell-panel+.cell-panel{border-left:0;border-top:1px solid var(--line)}svg{height:240px}.stage-top{padding:9px;gap:10px}.view-tabs{width:100%}.view-tabs button{flex:1;padding:6px 8px}.legend{font-size:14px}.cell-caption{margin:0;min-height:28px}.stage-bottom{flex-wrap:wrap}.steps{grid-template-columns:repeat(3,1fr)}.transport{gap:10px}.play-controls{width:100%;gap:6px}.play-controls button{font-size:16px;flex:1;padding:8px 5px;min-width:0}.scrubber{min-width:140px}.speed{gap:5px}footer{font-size:13px}.cell-heading>span{font-size:16px}dialog{padding:18px}.dialog-head{top:-18px}.dialog-head h2{font-size:24px}}
/* Classroom review: prevent wrapped progress label and reserve footer space. */
.scrubber{white-space:nowrap}.svg-label{font-size:27px}
@media(min-width:1000px) and (max-height:800px){main{gap:8px}.cell-panel{padding-bottom:6px}footer{padding:0}.stage-bottom{padding-block:8px}}

/* Website integration: natural wrapping also supports 200% classroom text. */
header,header nav,.cell-heading,footer,.play-controls{flex-wrap:wrap}
.site-home{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;color:var(--text);font:inherit;text-decoration:none;white-space:nowrap}
.steps button{white-space:normal;overflow-wrap:anywhere}
.play-controls{justify-content:flex-start}.scrubber input{min-width:60px}
#bio-project-support{margin:0!important}
@media(min-width:1000px) and (max-height:800px){#app{padding-top:9px}svg{height:220px}.question{min-height:86px}header{margin-bottom:8px}.steps button{min-height:46px}}
@media(min-width:1000px) and (max-height:800px){main{gap:6px}.cell-panel{padding-bottom:4px}.stage-bottom{padding-block:6px}.steps{margin-bottom:8px}}
