
/* ===== style.css ===== */
:root{font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;color:#173c3b;background:#f5f6f0;font-synthesis:none;--green:#216458;--line:#dce3da;--muted:#637771}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#fff;color:inherit;border-radius:9px;padding:10px 13px;min-height:42px;transition:background .15s,border .15s}button:hover{background:#e9eee6;border-color:#a6b7a9}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #de9b55;outline-offset:3px}button:disabled{opacity:.4;cursor:default}.primary{color:#fff;background:var(--green);border-color:var(--green)}.primary:hover{background:#174a41}.app{max-width:1880px;margin:auto;padding:0 32px}header{height:88px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}a{color:var(--green)}.brand{text-decoration:none;display:flex;gap:12px;align-items:center;font-size:22px;font-weight:700;letter-spacing:2px}.brand-mark{font-size:38px;color:#437b63;font-weight:400}.brand small{display:block;font-size:9px;letter-spacing:2px;margin-top:5px;font-weight:500}.top-meta{display:flex;gap:14px;align-items:center;font-size:13px}.top-meta>span{color:var(--muted);margin-right:14px}.top-meta button{background:transparent}main{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:26px;padding:25px 0 14px}.intro{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:20px}.eyebrow{font-size:11px;font-weight:600;letter-spacing:1.6px;color:#738578;margin:0 0 10px}h1{font-size:28px;letter-spacing:-.8px;margin:0;font-weight:600}.mode-tabs{display:flex;padding:4px;background:#e7ebe2;border-radius:11px;flex-shrink:0}.mode-tabs button{border:0;background:transparent;font-size:13px;min-height:37px;padding:8px 12px}.mode-tabs [aria-selected=true]{background:#fff;box-shadow:0 2px 8px #1b453414;color:#1d5849}.stage{height:clamp(360px,57vh,740px);background:radial-gradient(ellipse at 50% 42%,#273e43,#101f27 82%);border-radius:18px;position:relative;overflow:hidden;isolation:isolate}.stage canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}.stage-tag{position:absolute;left:22px;top:22px;color:#cadbd8;display:flex;gap:9px;align-items:center;font-size:13px}.live-dot{width:6px;height:6px;border-radius:50%;background:#87cbb0}.stage-actions{position:absolute;right:16px;top:14px;display:flex;gap:7px}.stage-actions button{background:#152b32bb;border-color:#50707170;color:#d8e7e0;font-size:12px}.legend{position:absolute;left:22px;bottom:48px;display:flex;gap:15px;font-size:12px;color:#d0dcd9;pointer-events:none}.legend i{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%}.gesture{position:absolute;left:22px;bottom:21px;font-size:11px;color:#859c9d;pointer-events:none}#stage-note{position:absolute;right:19px;bottom:21px;max-width:45%;text-align:right;color:#94aaa7;font-size:11px;pointer-events:none}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#deece6;background:#15252e;z-index:5}.loading[hidden]{display:none}aside{padding-top:5px;display:flex;flex-direction:column;gap:17px}.observation{background:#fff;border:1px solid var(--line);border-radius:15px;padding:22px}h2{font-size:22px;line-height:1.5;margin:0 0 12px;font-weight:600}#card-body{font-size:14px;line-height:1.9;color:#59716c;margin:0 0 18px}.structure-list{border-top:1px solid var(--line)}.structure-list button{display:flex;align-items:center;text-align:left;gap:12px;border:0;border-bottom:1px solid var(--line);border-radius:0;width:100%;padding:13px 2px;background:transparent}.structure-list span{color:#92a48e;font-size:12px}.structure-list b{margin-left:auto;font-weight:400}.subtle{font-size:12px;line-height:1.8;color:var(--muted)}.wide{width:100%;margin-top:10px}.wide span{float:right}.thinking{border-left:2px solid #a3b58c;padding:3px 0 3px 18px}.thinking h3{font-size:16px;line-height:1.7;margin:0 0 11px;font-weight:500}.answers{display:flex;gap:8px}.answers button{font-size:12px;min-height:34px;padding:7px 12px}.answers button.selected{background:#dce9d8;border-color:#72916e}#feedback{font-size:12px;color:#657b71;line-height:1.7;min-height:40px;margin:12px 0 0}.credit{font-size:11px;line-height:1.8;color:#789084;margin:0}.transport{background:#fff;border-radius:14px;padding:14px 19px;margin-top:14px;border:1px solid var(--line)}[hidden]{display:none!important}.timeline-head{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-bottom:6px}#time-label{color:#2d6050;font-weight:600}input[type=range]{width:100%;accent-color:#317f69;margin:7px 0 14px;height:14px;cursor:pointer}.transport-row{display:flex;align-items:center;justify-content:space-between}.play-actions{display:flex;gap:7px}.play-actions button{font-size:12px;padding:7px 12px;min-height:35px}.speed-label{font-size:12px;color:#63796d;display:flex;gap:6px;align-items:center}.speed-label select{border:1px solid var(--line);padding:6px;border-radius:6px;background:#fff;color:#335e50}.phases{display:grid;grid-template-columns:repeat(7,1fr);margin-top:14px;gap:5px}.phases button{border:0;background:#f4f6f1;min-height:34px;padding:7px 3px;font-size:11px;color:#678075}.phases button.active{background:#dfeddf;color:#225c46;font-weight:700}.cell-type{display:flex;background:#f0f3ed;padding:4px;border-radius:9px}.cell-type button{width:50%;border:0;background:transparent;font-size:13px;padding:7px;min-height:34px}.cell-type [aria-pressed=true]{background:#fff;box-shadow:0 1px 5px #19452b15}.toggles{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:12px;line-height:26px}.toggles input{accent-color:var(--green);vertical-align:middle}.metric-heading{margin-top:19px;display:flex;justify-content:space-between;font-size:12px}.metric-heading span{color:var(--muted)}.metrics{display:flex;gap:14px;padding-top:8px}.metrics>div{width:50%;border-top:1px solid var(--line);padding-top:12px}.metrics strong{display:block;font-size:29px;font-weight:500;color:#357860}.metrics span{font-size:10px;color:#6b7d72}.label{position:absolute;border:1px solid #b5d6c445;background:#10292fcc;color:#dceadf;font-size:11px;padding:5px 9px;border-radius:5px;pointer-events:none;white-space:nowrap;transform:translate(-50%,-50%)}footer{display:flex;justify-content:space-between;color:#839589;font-size:10px;border-top:1px solid var(--line);padding:12px 0 14px;letter-spacing:.5px}dialog{border:1px solid #ced9ca;border-radius:18px;padding:32px;max-width:680px;width:calc(100% - 32px);color:#244d43;max-height:85vh}dialog::backdrop{background:#102f3288;backdrop-filter:blur(4px)}dialog p{line-height:1.9;font-size:14px}dialog h3{font-size:16px}.close{float:right;font-size:22px;min-width:42px}details{font-size:12px;color:#61796c;line-height:1.8}body.theater .app{max-width:none}body.theater .stage{height:70vh}body.theater aside{display:none}body.theater main{grid-template-columns:1fr}
@media(min-width:1450px){main{grid-template-columns:minmax(0,1fr) 340px;gap:32px}.app{padding:0 44px}h1{font-size:34px}.observation{padding:25px}#card-body{font-size:15px}.stage{height:62vh}}
@media(max-width:1120px){.app{padding:0 20px}main{grid-template-columns:minmax(0,1fr) 270px;gap:18px}.intro{align-items:start;flex-direction:column;gap:12px}h1{font-size:25px}.observation{padding:17px}h2{font-size:19px}.stage{height:48vh;min-height:345px}.top-meta>span{display:none}}
@media(max-width:760px){.app{padding:0 14px}header{height:72px}.brand{font-size:18px;gap:8px}.brand-mark{font-size:30px}.brand small{font-size:8px}.top-meta{gap:6px}.top-meta button{font-size:11px;padding:7px;min-height:36px}#fullscreen span{display:none}main{display:flex;flex-direction:column;gap:18px;padding-top:19px}.intro{gap:13px;margin-bottom:13px}h1{font-size:24px}.eyebrow{font-size:10px}.mode-tabs{width:100%}.mode-tabs button{flex:1;font-size:12px}.stage{height:53vh;min-height:330px;max-height:520px;border-radius:12px}.stage-tag{left:14px;top:18px;font-size:11px}.stage-actions{right:10px;top:10px;gap:4px}.stage-actions button{font-size:10px;padding:7px;min-height:33px}.gesture{left:14px;font-size:10px;bottom:16px}.legend{left:14px;bottom:42px;gap:10px;font-size:10px}#stage-note{right:12px;bottom:16px;font-size:9px;max-width:35%}.transport{padding:12px 11px}.timeline-head{font-size:10px}.play-actions{gap:4px}.play-actions button{font-size:10px;padding:7px 8px;min-height:39px}.speed-label{font-size:10px}.speed-label select{max-width:55px}.phases{gap:3px}.phases button{font-size:10px;padding:6px 1px;min-height:38px}aside{padding:0;gap:20px}.observation{padding:20px}h2{font-size:22px}#card-body{font-size:14px}.metrics span{font-size:12px}.toggles{gap:18px}.thinking{margin:0 5px 10px}.credit{margin-bottom:6px}.label{font-size:10px;padding:4px 7px}}
@media(min-width:1121px){body.division-mode .stage{height:clamp(330px,calc(100dvh - 390px),640px)}body.division-mode .intro{margin-bottom:14px}body.division-mode .observation{padding:18px 20px}body.division-mode #card-body{font-size:13px;line-height:1.75;margin-bottom:12px}body.division-mode aside{gap:14px}body.division-mode .thinking h3{font-size:14px}body.division-mode h2{font-size:20px}body.division-mode .credit{display:none}}


/* ===== classroom.css ===== */
/* Classroom revision: allocate space to the model before reducing type. */
.follow-option{display:flex;align-items:center;gap:6px;min-height:24px}.follow-option input{width:18px;height:18px;accent-color:#317f69}
.stage-tag{max-width:calc(100% - 430px)}@media(max-width:850px){.stage-tag{max-width:calc(100% - 24px)}}
body.high-contrast .stage{background:radial-gradient(ellipse at 50% 45%,#122328,#03090f 85%)}body.high-contrast .stage-tag,body.high-contrast .legend,body.high-contrast .gesture,body.high-contrast #stage-note{color:#f0f9f6}body.high-contrast .label{background:#07171f;color:#fff;border-color:#bddbcc}body.high-contrast .stage-actions button{background:#0a1822;color:#fff;border-color:#8cafa8}body.high-contrast #contrast{background:#f2f8e9;color:#16473b;border-color:#f2f8e9}.stage-actions{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 20px)}
.app{max-width:1920px;padding:0 20px}header{height:60px}.brand{font-size:22px}.brand small,.brand-mark,.top-meta>span,.intro .eyebrow,.credit{display:none}.top-meta{gap:8px}.top-meta button{font-size:16px;min-height:42px}main{grid-template-columns:minmax(0,1fr) 308px;gap:16px;padding:12px 0}.intro{margin-bottom:12px!important;align-items:center;flex-direction:row;min-height:48px}h1{font-size:25px}.mode-tabs button{font-size:17px;min-height:44px}.stage,body.division-mode .stage{height:calc(100dvh - 184px);min-height:340px;max-height:none;border-radius:14px}body.division-mode .stage{height:calc(100dvh - 354px)}body.coiling-mode .stage{height:calc(100dvh - 306px)}.stage-tag{left:18px;top:17px;font-size:17px}.stage-actions{top:12px;right:12px}.stage-actions button{font-size:15px;min-height:42px;padding:8px 11px}.stage-actions #zoom-in,.stage-actions #zoom-out{font-size:22px;min-width:44px}.legend{font-size:14px;bottom:42px;gap:12px;flex-wrap:wrap}.gesture{font-size:13px;bottom:16px}#stage-note{font-size:12px;bottom:16px}.label{font-size:16px;background:#10292feb}.observation,body.division-mode .observation{padding:16px}.observation h2,body.division-mode h2{font-size:23px;line-height:1.4;margin-bottom:10px}#card-body,body.division-mode #card-body{font-size:17px;line-height:1.6;margin:0 0 13px}.eyebrow{font-size:13px;letter-spacing:.3px;margin-bottom:8px}.cell-type button{font-size:17px;min-height:44px}.subtle{font-size:14px;line-height:1.5;margin:9px 0}.toggles{font-size:16px;gap:3px 9px}.toggles label{min-height:36px;display:flex;align-items:center;gap:4px}.toggles input{width:18px;height:18px}.wide{font-size:17px;min-height:44px;margin-top:8px}.metric-heading{font-size:14px;margin-top:12px}.metrics{gap:10px}.metrics>div{padding-top:6px}.metrics strong{font-size:32px;font-weight:600}.metrics span{font-size:13px;line-height:1.4;display:block}#count-note{font-size:13px}.transport{padding:10px 12px;margin-top:10px}.timeline-head{font-size:14px;margin-bottom:0}#time-label{font-size:16px}input[type=range]{height:20px;margin:5px 0 7px;touch-action:pan-y}.play-actions button{font-size:16px;min-height:42px;padding:8px 13px}.speed-label{font-size:15px}.speed-label select{min-height:40px;max-width:none}.phases{margin-top:8px;gap:4px}.phases button{font-size:14px;min-height:42px;padding:6px 3px}.phases button.active{box-shadow:inset 0 -3px #317a63}footer{padding:5px 0;font-size:12px;min-height:26px}.coil-copy{font-size:19px;line-height:1.7}.coil-metric{padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.coil-metric strong{display:block;font-size:48px;font-weight:500;color:#357860}.coil-metric span{font-size:16px}.thinking{border:0;padding:0}.thinking h3{font-size:25px}.answers button{font-size:20px;min-height:48px}#feedback{font-size:18px;min-height:60px}dialog p{font-size:17px}body.theater aside{display:flex}body.theater main{grid-template-columns:minmax(0,1fr) 308px}body.theater .stage{height:calc(100dvh - 354px)}.structure-list button{font-size:18px;min-height:50px}.structure-list span{font-size:14px}
@media(min-width:1550px){main{grid-template-columns:minmax(0,1fr) 350px}.app{padding:0 28px}h1{font-size:29px}.mode-tabs button{font-size:19px}.observation h2,body.division-mode h2{font-size:26px}#card-body,body.division-mode #card-body{font-size:19px}.phases button{font-size:17px}.stage-tag{font-size:20px}}
@media(max-width:1150px){h1{font-size:22px}.intro{flex-wrap:wrap;gap:7px}.mode-tabs{margin-left:auto}.mode-tabs button{font-size:16px}main{grid-template-columns:minmax(0,1fr) 280px;gap:12px}.observation{padding:13px}.stage,body.division-mode .stage,body.coiling-mode .stage{min-height:360px}.stage-tag{font-size:16px}#stage-note{display:none}.legend{gap:8px}.phases{grid-template-columns:repeat(4,1fr)}body.division-mode .stage{height:calc(100dvh - 390px)}.play-actions button{padding:7px 9px;font-size:15px}}
@media(max-width:850px){.app{padding:0 12px}header{height:auto;min-height:60px;gap:8px;flex-wrap:wrap;padding:7px 0}.brand{font-size:20px}.top-meta{gap:5px}.top-meta button{font-size:14px;padding:7px 9px}main{display:flex;flex-direction:column;padding-top:10px}.intro{flex-direction:column;align-items:start;margin-bottom:10px!important}.mode-tabs{width:100%;margin:0}.mode-tabs button{flex:1;font-size:17px}.stage,body.division-mode .stage,body.coiling-mode .stage{height:52dvh;min-height:350px;max-height:610px}.stage-tag{font-size:16px;left:12px;top:14px}.stage-actions{top:47px;right:9px;gap:5px}.stage-actions button{font-size:14px;padding:6px 8px;min-height:44px}.legend{font-size:13px;left:12px;bottom:40px}.gesture{font-size:12px;left:12px}.phases{grid-template-columns:repeat(4,1fr);gap:5px}.phases button{font-size:15px;min-height:44px}.transport-row{flex-wrap:wrap;gap:8px}.play-actions{flex-wrap:wrap;gap:6px}.play-actions button{font-size:16px;min-height:44px;padding:7px 10px}.timeline-head{font-size:13px}aside{padding:0}.observation,body.division-mode .observation{padding:18px}.observation h2,body.division-mode h2{font-size:24px}#card-body,body.division-mode #card-body{font-size:18px}.metrics span{font-size:15px}.metrics strong{font-size:36px}.toggles{font-size:18px;gap:8px 18px}.subtle{font-size:15px}.cell-type button{font-size:19px}.wide{font-size:18px;min-height:48px}.label{font-size:14px}.coil-metric{padding:12px 0}body.theater main{display:flex}body.theater aside{display:flex}#fullscreen span{display:inline}footer{gap:12px;line-height:1.5}dialog{padding:23px}}
@media(max-width:420px){.top-meta{width:100%;justify-content:flex-end}.brand{font-size:20px}.stage-tag{font-size:14px}.legend{font-size:12px;gap:6px}.stage-actions button{padding:6px 8px}.timeline-head>span:last-child{font-size:12px}.transport{padding:10px}.play-actions{gap:5px}.play-actions button{padding:7px 8px;font-size:15px}.phases button{font-size:14px}}

/* 2.1: one camera toolbar, accurate input modes, collapsible help. */
@media(max-width:850px){.stage-actions button span{display:block}}
.stage-actions{top:14px;right:12px;width:102px;max-width:none;display:flex;flex-direction:column;gap:6px}.stage-actions button{width:100%;min-height:44px;font-size:15px;padding:7px 5px}.stage-actions #zoom-in,.stage-actions #zoom-out{font-size:24px}.stage-actions #drag-mode[aria-pressed=true]{background:#edf7e5;color:#164a3c;border-color:#edf7e5}.stage-actions button:disabled{opacity:.7;color:#c1d3cf;border-style:dashed}.stage-tag{max-width:calc(100% - 146px)}.legend{bottom:17px}.interaction-help{margin-top:5px;font-size:14px;color:#365f56}.interaction-help summary{cursor:pointer;min-height:30px;line-height:30px}.interaction-help summary span{margin-left:14px;color:#216458;font-weight:600}.interaction-help-body{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 14px;display:grid;grid-template-columns:1fr 1fr;gap:7px 18px}.interaction-help-body p{margin:0;font-size:15px;line-height:1.6}.chromosome-picker{display:grid;grid-template-columns:auto repeat(4,1fr);align-items:center;gap:6px;margin-top:8px;font-size:15px}.chromosome-picker button{min-height:44px;padding:6px;font-size:17px}.chromosome-picker button[aria-pressed=true],.structure-list button[aria-pressed=true]{background:#e5f0df;box-shadow:inset 0 0 0 2px #4c806d}.stage-actions #focus[hidden]{display:none!important}
@media(min-width:1121px){.stage{height:calc(100dvh - 220px)}body.division-mode .stage{height:calc(100dvh - 390px);min-height:320px}body.coiling-mode .stage{height:calc(100dvh - 342px);min-height:320px}}
@media(min-width:851px) and (max-width:1120px){body.division-mode .stage{height:calc(100dvh - 424px);min-height:320px}body.coiling-mode .stage{height:calc(100dvh - 356px);min-height:320px}.stage-actions{width:90px}.stage-tag{max-width:calc(100% - 130px)}}
@media(max-width:850px){.stage-actions{top:45px;left:10px;right:10px;width:auto;display:flex;flex-direction:row;flex-wrap:nowrap;gap:4px}.stage-actions button{flex:1;width:0;min-width:0;min-height:48px;padding:5px 2px;font-size:13px;line-height:1.3}.stage-actions #zoom-in,.stage-actions #zoom-out{min-width:0;font-size:24px}.stage-tag{max-width:calc(100% - 24px)}.interaction-help-body{grid-template-columns:1fr}.interaction-help{font-size:14px}.legend{bottom:16px}.chromosome-picker{font-size:16px}}

/* 2.2: distinguish an anatomical zoom from a mitotic time sequence. */
.level-switch{display:flex;gap:6px;margin:0 0 14px}.level-switch button{flex:1;padding:9px 4px;min-height:44px;font-size:16px;border:1px solid #bad2c9;border-radius:8px;background:#f4f7ee;color:#245d51}.level-switch button[aria-pressed=true]{background:#226655;color:#fff;border-color:#226655}.packing-legend{display:grid;gap:8px;font-size:15px;line-height:1.45;margin:14px 0}.packing-legend i{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px}.purple-dot{background:#ac8ece}.teal-dot{background:#48b9a5}.gold-dot{background:#daa940}#coil-information .coil-metric{padding:12px 0}#coil-information .coil-metric strong{font-size:26px;line-height:1.4}#coil-information .coil-copy{font-size:19px;line-height:1.55;margin:12px 0}.nuc-toggles{display:flex;flex-direction:column;gap:4px;padding:8px 0}.nuc-toggles label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:18px}.nuc-toggles input{width:20px;height:20px;accent-color:#226655}#coil-information .nuc-message{font-size:17px}#coil-information .subtle{font-size:14px}
@media(min-width:851px) and (max-height:800px){.level-switch{margin-bottom:8px}#coil-information .coil-copy{font-size:18px;margin:9px 0}.packing-legend{gap:6px;margin:10px 0}#coil-information .coil-metric{padding:9px 0}}


/* ===== extension.css ===== */
/* ============================================================
   扩展模块：阶段顺序 · DNA与染色体数量 · 细胞周期 · 判断闯关
   只新增样式，不改动原页面既有规则（所有选择器均带 ext/lab 前缀）
   ============================================================ */

:root {
  --ext-ink: #173c3b;
  --ext-green: #216458;
  --ext-line: #dce3da;
  --ext-muted: #637771;
  --ext-wash: #f2f6ee;
  --ext-chr: #1f5b4f;
  --ext-dna: #7a4a86;
  --ext-ctd: #b07a2a;
  --ext-ok: #2f7d5f;
  --ext-no: #b4553f;
  --ext-g1: #a9c8b4;
  --ext-s: #5fa9a0;
  --ext-g2: #3d8578;
  --ext-m: #c08a5e;
}

#open-lab { background: #eef6e9; border-color: #c3d8bd; color: #1b5445; font-weight: 600; }
#open-lab:hover { background: #e2efd9; border-color: #9dbd96; }

.lab-extension {
  margin: 4px 0 20px;
  background: #fff;
  border: 1px solid var(--ext-line);
  border-radius: 18px;
  padding: 22px 26px 26px;
  box-shadow: 0 14px 34px #1b45340d;
  scroll-margin-top: 12px;
}
.lab-extension.is-flash { animation: extFlash 1.4s ease; }
@keyframes extFlash {
  0% { box-shadow: 0 0 0 0 #2f7d5f00; }
  22% { box-shadow: 0 0 0 4px #2f7d5f33; }
  100% { box-shadow: 0 14px 34px #1b45340d; }
}

.ext-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ext-head h2 { font-size: 23px; margin: 0 0 6px; letter-spacing: -.4px; font-weight: 600; }
.ext-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: #738578; margin: 0 0 8px; }
.ext-lede { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ext-muted); max-width: 56ch; }

.ext-tabs { display: flex; gap: 4px; background: #e7ebe2; padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.ext-tabs button {
  border: 0; background: transparent; border-radius: 9px; padding: 9px 13px;
  font-size: 14px; color: #33544e; min-height: 40px;
}
.ext-tabs button[aria-selected="true"] { background: #fff; color: #1d5849; box-shadow: 0 2px 8px #1b453414; font-weight: 600; }

.ext-panel { margin-top: 20px; }
.ext-panel[hidden] { display: none; }
.ext-note { font-size: 12.5px; line-height: 1.7; color: var(--ext-muted); margin: 10px 0 0; }
.ext-note b { color: #33544e; }

.ext-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ext-toolbar button { font-size: 14px; min-height: 42px; padding: 8px 14px; }
.ext-toolbar .primary { background: var(--ext-green); border-color: var(--ext-green); }
.ext-toolbar .ext-score { font-size: 13px; color: var(--ext-muted); margin-left: auto; }
.ext-toolbar .ext-score b { color: var(--ext-green); font-size: 15px; }

/* ---------- ① 阶段排序 ---------- */
.sort-pool {
  display: flex; flex-wrap: wrap; gap: 10px; min-height: 132px;
  padding: 12px; border: 1px dashed #c9d7c9; border-radius: 14px; background: #f8faf4;
  align-content: flex-start;
}
.sort-pool.is-empty { min-height: 68px; align-items: center; justify-content: center; }
.sort-pool.is-empty::after {
  content: "卡片都放好了，点“检查顺序”看看对不对。";
  font-size: 13px; color: #8a9b93; align-self: center; margin: auto;
}

.sort-slots {
  user-select: none; -webkit-user-select: none; list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
}
.sort-slot {
  position: relative; min-height: 132px; border: 1.5px dashed #cfdbcf; border-radius: 14px;
  background: #fbfcf7; display: flex; flex-direction: column; align-items: stretch;
  padding: 22px 6px 8px; transition: border-color .15s, background .15s, transform .15s;
}
.sort-slot::after {
  content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: #b6c6b8; pointer-events: none;
}
.sort-slot:last-child::after { content: ""; }
.sort-slot .slot-no {
  position: absolute; left: 50%; top: 5px; transform: translateX(-50%);
  font-size: 11px; color: #93a79a; letter-spacing: .6px;
}
.sort-slot .slot-drop { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.sort-slot.over { border-color: #6aa88f; background: #eef7ee; transform: translateY(-2px); }
.sort-slot.ok { border-style: solid; border-color: #74b394; background: #f0f8f0; }
.sort-slot.bad { border-style: solid; border-color: #d8a08f; background: #fdf2ef; animation: extShake .34s; }
.sort-slot .slot-verdict {
  position: absolute; right: 6px; top: 4px; font-size: 12px; font-weight: 700;
}
.sort-slot.ok .slot-verdict { color: var(--ext-ok); }
.sort-slot.bad .slot-verdict { color: var(--ext-no); }
@keyframes extShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.stage-card {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid #dbe4d8; background: #fff; border-radius: 11px; padding: 6px 4px 7px;
  cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s;
  touch-action: none; user-select: none;
}
.stage-card:hover { border-color: #a8bfa5; box-shadow: 0 4px 12px #1b45341a; }
.stage-card:active { cursor: grabbing; }
.stage-card[aria-pressed="true"] { border-color: #2f7d5f; box-shadow: 0 0 0 2px #2f7d5f4d; }
.stage-card.dragging { opacity: .35; }
.stage-card .sc-name { font-size: 12.5px; line-height: 1.25; font-weight: 600; color: #214b42; text-align: center; }
.stage-card .sc-meta { font-size: 10.5px; color: #7b8d86; letter-spacing: .2px; }
.stage-card svg { width: 100%; height: auto; max-height: 88px; display: block; }
.sort-pool .stage-card { width: 126px; }

.drag-ghost {
  position: fixed; z-index: 9999; pointer-events: none; width: 126px;
  transform: translate(-50%, -50%) rotate(-2deg) scale(1.04);
  filter: drop-shadow(0 10px 18px #1b453433);
}

.ext-banner {
  margin-top: 14px; border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.65;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ext-banner[hidden] { display: none; }
.ext-banner.good { background: #edf7ee; border: 1px solid #b8d8bd; color: #1d5b40; }
.ext-banner.warn { background: #fdf3ee; border: 1px solid #e6c6b8; color: #7d4530; }
.ext-banner .grow { flex: 1; min-width: 180px; }
.ext-banner button { font-size: 13px; min-height: 38px; padding: 7px 12px; background: #fff; }

/* ---------- ② 数量变化 ---------- */
.count-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .72fr); gap: 20px; align-items: start; }
/* 窄屏提示：图表可横向滑动 */
.swipe-hint {
  display: none;
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #8b9d94;
  text-align: center;
  letter-spacing: .02em;
}

.count-figure { user-select: none; -webkit-user-select: none; border: 1px solid var(--ext-line); border-radius: 14px; background: #fdfefb; padding: 8px 8px 2px; }
.count-figure svg { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.count-figure .band-hot { fill: #2f7d5f10; }
.count-figure text { font-family: inherit; }
.count-figure .ax { fill: #8b9a92; font-size: 11px; }
.count-figure .xt { fill: #4a655d; font-size: 11.5px; }
.count-figure .grp { fill: #5e7a70; font-size: 10.5px; letter-spacing: .8px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 6px 10px 10px; }
.chart-legend button {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent;
  background: transparent; padding: 4px 7px; min-height: 32px; font-size: 12.5px; color: #35564d; border-radius: 8px;
}
.chart-legend button i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-legend button[aria-pressed="false"] { opacity: .38; text-decoration: line-through; }
.chart-legend button:hover { background: #f1f6ec; }

.count-side { display: flex; flex-direction: column; gap: 12px; }
.count-readout { border: 1px solid var(--ext-line); border-radius: 14px; padding: 14px 16px; background: #fbfcf7; }
.count-readout .cr-kicker { font-size: 11px; letter-spacing: 1.2px; color: #7d8f87; margin: 0 0 4px; font-weight: 600; }
.count-readout h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.2px; }
.count-readout .cr-group { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #e8f1e2; color: #35604f; margin-bottom: 8px; }
.count-readout .cr-group.m { background: #f6ecdf; color: #8a5a2d; }
.count-readout p { margin: 0; font-size: 13px; line-height: 1.65; color: #4d6860; }
.count-readout .cr-mech { margin-top: 10px; }
.count-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 10px; }
.count-nums div { background: #fff; border: 1px solid #e6ede1; border-radius: 10px; padding: 8px 6px; text-align: center; }
.count-nums b { display: block; font-size: 26px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.count-nums span { font-size: 10.5px; color: #7c8e86; letter-spacing: .2px; }
.count-nums .n-chr b { color: var(--ext-chr); }
.count-nums .n-ctd b { color: var(--ext-ctd); }
.count-nums .n-dna b { color: var(--ext-dna); }
.count-readout .cr-cell { display: flex; justify-content: center; background: #fff; border-radius: 10px; border: 1px solid #e6ede1; padding: 4px; }
.count-readout .cr-cell svg { width: 128px; height: auto; }
.count-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.count-actions button { font-size: 12.5px; min-height: 38px; padding: 6px 10px; }

.count-table-wrap { margin-top: 18px; overflow-x: auto; border-radius: 12px; border: 1px solid var(--ext-line); }
table.count-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.count-table th, table.count-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid #eef1e9; white-space: nowrap; }
table.count-table thead th { background: #f4f7ee; font-weight: 600; color: #3c5b51; font-size: 12.5px; }
table.count-table tbody th { text-align: left; font-weight: 600; color: #234f45; }
table.count-table tbody tr:last-child td, table.count-table tbody tr:last-child th { border-bottom: 0; }
table.count-table tbody tr.is-now { background: #eef7ea; box-shadow: inset 3px 0 0 var(--ext-green); }
table.count-table .c-chr { color: var(--ext-chr); font-weight: 600; font-variant-numeric: tabular-nums; }
table.count-table .c-ctd { color: var(--ext-ctd); font-weight: 600; font-variant-numeric: tabular-nums; }
table.count-table .c-dna { color: var(--ext-dna); font-weight: 600; font-variant-numeric: tabular-nums; }
table.count-table .c-cycle { font-size: 12px; color: #6b8078; }

.turning { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.turning article { border: 1px solid #e3e9dd; border-left: 3px solid #7fae94; border-radius: 10px; padding: 11px 14px; background: #fbfcf7; }
.turning article.b { border-left-color: #c08a5e; }
.turning h4 { margin: 0 0 3px; font-size: 13.5px; color: #21584a; letter-spacing: .2px; }
.turning article.b h4 { color: #8a5a2d; }
.turning p { margin: 0; font-size: 12.5px; line-height: 1.65; color: #50695f; }

/* ---------- ③ 细胞周期 ---------- */
.cycle-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 22px; align-items: start; }
.cycle-figure { user-select: none; -webkit-user-select: none; border: 1px solid var(--ext-line); border-radius: 14px; background: #fdfefb; padding: 6px; }
.cycle-figure svg { width: 100%; height: auto; display: block; }
.cycle-figure svg text { font-family: inherit; }
.cycle-legend { display: grid; gap: 4px; margin-top: 10px; }
.cycle-legend button {
  display: flex; align-items: center; gap: 9px; text-align: left; font-size: 13px;
  border: 1px solid transparent; background: transparent; border-radius: 9px; padding: 6px 9px; min-height: 38px;
}
.cycle-legend button:hover { background: #f2f7ec; }
.cycle-legend button[aria-pressed="true"] { background: #eef7ea; border-color: #c6ddc4; }
.cycle-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cycle-legend .cl-name { flex: 1; color: #2c5349; }
.cycle-legend .cl-dur { font-size: 11.5px; color: #83958c; font-variant-numeric: tabular-nums; }

.cycle-side { display: flex; flex-direction: column; gap: 14px; }
.cycle-card { border: 1px solid var(--ext-line); border-radius: 14px; padding: 14px 16px; background: #fbfcf7; }
.cycle-card h3 { margin: 0 0 8px; font-size: 16px; letter-spacing: -.1px; }
.cycle-card p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.7; color: #50695f; }
.slider-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.slider-row input[type="range"] { flex: 1; accent-color: #2f7d5f; }
.slider-row output { font-size: 13px; font-weight: 600; color: var(--ext-green); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }

.opt-list { display: grid; gap: 7px; }
.opt-list button {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13px; line-height: 1.5;
  padding: 9px 11px; min-height: 44px; border-radius: 10px; background: #fff;
}
.opt-list button .key {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: #eef2e8; color: #4a655d;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.opt-list button.is-ok { border-color: #7ab596; background: #f0f8f0; }
.opt-list button.is-ok .key { background: #2f7d5f; color: #fff; }
.opt-list button.is-no { border-color: #dba795; background: #fdf3ef; }
.opt-list button.is-no .key { background: #b4553f; color: #fff; }
.opt-list button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px #8fb6a3; }

/* ---------- ④ 判断闯关 ---------- */
.judge-wrap { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(230px, .7fr); gap: 22px; align-items: start; }
.judge-card { border: 1px solid var(--ext-line); border-radius: 16px; padding: 20px 22px; background: #fbfcf7; min-height: 260px; display: flex; flex-direction: column; }
.judge-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.judge-idx { font-size: 12px; letter-spacing: 1.4px; color: #7d8f87; font-weight: 600; }
.judge-tag { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: #eaf1e4; color: #3c6153; }
.judge-q { font-size: 20px; line-height: 1.6; margin: 14px 0 18px; color: #173c3b; letter-spacing: -.2px; font-weight: 500; }
.judge-actions { display: flex; gap: 10px; }
.judge-actions button { flex: 1; font-size: 16px; min-height: 52px; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.judge-actions button[data-v="true"]:hover { border-color: #7ab596; background: #f1f9f1; }
.judge-actions button[data-v="false"]:hover { border-color: #dba795; background: #fdf5f1; }
.judge-actions button.picked-ok { background: #2f7d5f; border-color: #2f7d5f; color: #fff; }
.judge-actions button.picked-no { background: #b4553f; border-color: #b4553f; color: #fff; }
.judge-actions button.missed { border-color: #7ab596; background: #f1f9f1; }
.judge-actions button:disabled { opacity: 1; }
.judge-actions button:disabled:not(.picked-ok):not(.picked-no) { opacity: .45; }
.judge-fb { margin-top: 14px; font-size: 13.5px; line-height: 1.75; border-radius: 11px; padding: 12px 14px; background: #fff; border: 1px solid #e6ede1; color: #405d54; }
.judge-fb[hidden] { display: none; }
.judge-fb b { color: #1d5b40; }
.judge-fb .fb-head { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.judge-fb.no .fb-head { color: var(--ext-no); }
.judge-fb.ok .fb-head { color: var(--ext-ok); }
.judge-fb .fb-link { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.judge-fb .fb-link button { font-size: 12px; min-height: 32px; padding: 4px 10px; }
.judge-nav { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.judge-nav button { font-size: 14px; min-height: 42px; }
.judge-nav .grow { flex: 1; }

.judge-side { display: flex; flex-direction: column; gap: 12px; }
.judge-track { display: flex; gap: 6px; flex-wrap: wrap; }
.judge-track span {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; background: #eef2e8; color: #8b9a92; border: 1px solid #e3e9dd;
}
.judge-track span.is-ok { background: #dff0e2; border-color: #a9d0b2; color: #1d5b40; font-weight: 700; }
.judge-track span.is-no { background: #fbe6de; border-color: #e3b7a6; color: #8d3f2a; font-weight: 700; }
.judge-track span.is-now { outline: 2px solid #2f7d5f; outline-offset: 1px; }
.judge-side .cycle-card p:last-child { margin-bottom: 0; }
.judge-result { font-size: 15px; font-weight: 600; color: #1d5b40; }
.judge-result small { display: block; font-weight: 400; font-size: 12.5px; color: #6b8078; margin-top: 4px; line-height: 1.6; }

/* ---------- 补充组件 ---------- */
.ext-head-text { max-width: 60ch; }
.ext-info { margin: 8px 0 0; font-size: 12px; line-height: 1.65; color: #6b8078; background: #f4f7ee; border-radius: 9px; padding: 8px 10px; }
.ext-feedback { margin: 10px 0 0; font-size: 12.5px; line-height: 1.7; color: #50695f; }
.ext-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #3c5b51; min-height: 40px; padding: 0 4px; cursor: pointer; }
.ext-toggle input { width: 17px; height: 17px; accent-color: #2f7d5f; }
.stage-card .sc-meta { display: none; }
.show-counts .stage-card .sc-meta { display: block; }
.count-main { min-width: 0; }
.chart-legend button i { align-self: center; }
#count-readout p b { color: #234f45; }
#judge-result { color: #405d54; font-size: 14px; line-height: 1.6; }
#judge-reset { font-size: 13px; min-height: 38px; margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .sort-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sort-slot:nth-child(4)::after { content: ""; }
}
@media (max-width: 1120px) {
  .count-grid, .cycle-grid, .judge-wrap { grid-template-columns: 1fr; }
  .count-side { flex-direction: row; flex-wrap: wrap; }
  .count-readout { flex: 1 1 260px; }
  .count-actions { flex: 1 1 100%; }
}
@media (max-width: 860px) {
  .lab-extension { padding: 18px 14px 20px; border-radius: 14px; }
  .ext-head h2 { font-size: 20px; }
  .ext-tabs { width: 100%; }
  .ext-tabs button { flex: 1; font-size: 13px; padding: 8px 6px; }
  .sort-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sort-slot:nth-child(3)::after, .sort-slot:nth-child(6)::after { content: ""; }
  .sort-pool .stage-card { width: 104px; }
  .turning { grid-template-columns: 1fr; }
  .judge-q { font-size: 17px; }
  .count-side { flex-direction: column; }
  table.count-table { font-size: 12px; }
  table.count-table th, table.count-table td { padding: 7px 7px; }
}
@media (max-width: 760px) {
  .count-figure { overflow-x: auto; }
  .count-figure svg { min-width: 580px; }
  .swipe-hint { display: block; }
  .chart-legend { gap: 4px; }
  .chart-legend button { font-size: 12px; padding: 4px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-extension.is-flash { animation: none; }
  .sort-slot.bad { animation: none; }
}

