/* Chemistry reference workbook v1 — scoped to the Chemistry mind-map only. */
.chem-page-head{margin-bottom:12px}.chem-page-head p{max-width:760px}
.chem-track-tabs{display:flex;gap:10px;margin:12px 0 10px;flex-wrap:wrap}.chem-track-tabs button{border:1px solid #d8dde5;background:#fff;border-radius:14px;padding:10px 15px;display:flex;align-items:baseline;gap:10px;cursor:pointer;color:#3b4551;box-shadow:0 1px 2px rgba(22,34,50,.05)}.chem-track-tabs button strong{font-size:15px}.chem-track-tabs button span{font-size:12px;color:#6c7580}.chem-track-tabs button.active{border-color:var(--track);background:var(--track-tint);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--track) 30%,transparent)}.chem-track-tabs button.active strong{color:var(--track)}
.chem-page-nav{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 9px;scrollbar-width:thin}.chem-page-nav button{min-width:205px;border:1px solid #dfe3e8;border-radius:12px;background:#fff;padding:8px 10px;display:grid;grid-template-columns:30px 1fr;text-align:left;gap:8px;cursor:pointer;color:#3c4650}.chem-page-nav button>b{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#edf1f4;color:#617080;font-size:11px}.chem-page-nav button span{display:flex;flex-direction:column;min-width:0}.chem-page-nav button strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chem-page-nav button small{font-size:10.5px;color:#7b858f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chem-page-nav button.active{border-color:#126ca1;background:#eff8fc}.chem-page-nav button.active>b{background:#126ca1;color:#fff}.chem-page-nav button.is-planned{opacity:.62;cursor:not-allowed}
.chem-modebar{display:flex;align-items:center;gap:14px;justify-content:space-between;border:1px solid #dce5ea;border-radius:14px;background:#fff;padding:8px 10px;margin-bottom:10px}.chem-mode-tabs{display:flex;gap:5px}.chem-mode-tabs button,.chem-zoom button{border:1px solid #d9e1e6;background:#fff;border-radius:9px;padding:7px 10px;cursor:pointer;font:inherit;font-size:12px}.chem-mode-tabs button.active{background:#126ca1;border-color:#126ca1;color:#fff}.chem-progress{display:flex;align-items:center;gap:8px;min-width:220px;font-size:11px;color:#68737d}.chem-progress>i{height:6px;flex:1;background:#e9eef1;border-radius:999px;overflow:hidden}.chem-progress>i>b{display:block;height:100%;background:#126ca1;border-radius:inherit}.chem-zoom{display:flex;gap:4px}.chem-zoom button{padding:6px 9px}
.chem-viewport{position:relative;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;background:#e8ecee;border:1px solid #d8dfe3;border-radius:14px;min-height:720px;max-height:calc(100vh - 205px);padding:18px;cursor:grab}.chem-viewport:active{cursor:grabbing}.chem-stage{width:1000px;height:1414px;position:relative;transition:transform .12s ease}.chem-paper{position:relative;width:1000px;height:1414px;overflow:hidden;background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.78),transparent 34%),linear-gradient(180deg,#fffdf7 0%,#fdfaf1 100%);border:1.5px solid #ad9f86;border-radius:24px;box-shadow:0 8px 24px rgba(67,58,39,.12);font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;color:#30281f;isolation:isolate}.chem-paper:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.16;background-image:repeating-linear-gradient(0deg,rgba(88,65,35,.025) 0,rgba(88,65,35,.025) 1px,transparent 1px,transparent 5px);z-index:0}
.chem-reference-banner{position:absolute;top:20px;left:308px;width:384px;height:46px;background:linear-gradient(90deg,#0c78a8,#126ca1,#0b7f8d);clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);display:grid;place-items:center;color:#fff;letter-spacing:.25em;font-family:"Noto Serif TC","Songti TC","PMingLiU",serif;font-size:20px;font-weight:800;z-index:3;text-shadow:0 1px 0 rgba(0,0,0,.1)}.chem-reference-banner:before,.chem-reference-banner:after{content:"";position:absolute;width:34px;height:30px;border-top:5px solid #126ca1;border-bottom:5px solid #126ca1;top:8px}.chem-reference-banner:before{left:-45px;transform:rotate(-24deg)}.chem-reference-banner:after{right:-45px;transform:rotate(24deg)}
.chem-start{position:absolute;top:76px;left:35px;display:flex;align-items:center;gap:8px;font-family:"Noto Serif TC","Songti TC",serif;font-weight:700;font-size:16px;color:#4e4338;z-index:3}.chem-start i{width:25px;height:31px;border:2px solid #9d7e58;border-radius:16px 16px 16px 4px;transform:rotate(-45deg);background:#fff8e8;position:relative}.chem-start i:after{content:"";width:7px;height:7px;border-radius:50%;background:#e95036;position:absolute;left:7px;top:7px}.chem-start span{padding:5px 10px;border:1px solid #b99d78;border-radius:14px;background:rgba(255,252,242,.9)}
.chem-title-row{position:absolute;top:70px;left:210px;width:600px;height:76px;display:flex;align-items:center;justify-content:center;gap:17px;z-index:2}.chem-title-row h1{margin:0;font-family:"Noto Serif TC","Songti TC","PMingLiU",serif;font-size:48px;font-weight:900;letter-spacing:.09em;color:#35261d;white-space:nowrap}.chem-title-row>i{height:1.5px;background:#126ca1;flex:1;position:relative}.chem-title-row>i:after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;background:#126ca1;top:-3px}.chem-title-row>i:first-child:after{right:-1px}.chem-title-row>i:last-child:after{left:-1px}
.chem-cluster{position:absolute;border:2.2px solid var(--chem-accent);border-radius:18px;background:rgba(255,253,247,.78);z-index:2;padding:15px 16px 13px;box-sizing:border-box}.chem-cluster>header{display:flex;align-items:center;gap:9px;height:35px;margin-bottom:8px}.chem-cluster>header>b{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:var(--chem-accent);color:#fff;font-family:"Noto Serif TC","Songti TC",serif;font-size:23px;line-height:1}.chem-cluster>header h3{margin:0;color:var(--chem-accent);font-size:22px;letter-spacing:.03em;font-weight:900}.chem-cluster-body{position:relative;height:calc(100% - 43px)}
.chem-question-list{font-family:"Noto Sans TC","PingFang TC",sans-serif;font-size:13.2px;line-height:1.65;color:#302d29}.chem-question{display:grid;grid-template-columns:24px 1fr;gap:1px;margin:4px 0}.chem-question>b{font-family:Georgia,"Times New Roman",serif;font-size:13px;color:#4b443d}.chem-question.is-done>b{color:#16865a}.chem-input-shell{display:inline-flex;align-items:center;position:relative;margin:0 2px;vertical-align:baseline}.chem-input-shell input{height:22px;min-width:45px;max-width:132px;border:0;border-bottom:1.7px solid #50473e;background:transparent;padding:0 15px 0 3px;font:600 12.5px/1.2 "Noto Sans TC","PingFang TC",sans-serif;color:#2b4e63;outline:none;text-align:center}.chem-input-shell input:focus{border-bottom-color:#126ca1;background:rgba(224,244,252,.5)}.chem-input-shell i{position:absolute;right:1px;bottom:3px;font-style:normal;font-size:9px}.chem-input-shell.is-ok input{border-color:#1c8a60}.chem-input-shell.is-ok i{color:#1c8a60}.chem-input-shell.is-wrong input{border-color:#c65547}.chem-input-shell.is-wrong i{color:#c65547}.chem-learn-answer{display:inline-block;padding:0 3px;margin:0 2px;color:#0e6e86;font-weight:800;border-bottom:1.7px solid #0e6e86;line-height:1.35}
.chem-laws .chem-question-list,.chem-atom-periodic .chem-question-list{width:55%;padding-right:8px;box-sizing:border-box}.chem-laws .chem-figure-stack,.chem-atom-periodic .chem-figure-stack{position:absolute;right:0;top:0;width:44%;height:100%;display:grid;grid-template-rows:1fr 1fr;gap:8px}.chem-figure{margin:0;border:1.3px solid color-mix(in srgb,var(--chem-accent,#126ca1) 65%,#cdd7da);border-radius:11px;background:rgba(250,251,247,.74);overflow:hidden;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0}.chem-figure-svg{width:100%;height:100%;display:block;color:#536779}.chem-figure-svg text{font-family:"Noto Sans TC","PingFang TC",sans-serif;fill:#3f474d;text-anchor:middle;dominant-baseline:middle}.chem-figure-svg .fig-title{font-size:14px;font-weight:800;fill:#2f4d61}.chem-figure-svg .fig-small{font-size:11px;font-weight:650}.chem-figure-svg .fig-tiny{font-size:9px}.chem-figure-svg .chem-line,.chem-figure-svg.chem-line{fill:none;stroke:#566873;stroke-width:2}.chem-figure-svg .chem-arrow{fill:none;stroke:#2c7792;stroke-width:2}.chem-figure-svg .chem-dash{fill:none;stroke:#87949d;stroke-width:1.4;stroke-dasharray:5 4}.chem-figure-svg .atom{stroke:#344a58;stroke-width:1}.chem-figure-svg .atom.a{fill:#e8a43f}.chem-figure-svg .atom.b{fill:#75a9c8}.chem-figure-svg .chem-glass{fill:rgba(178,220,236,.25);stroke:#53778b;stroke-width:1.8}.chem-figure-svg .big{font-size:50px;font-weight:900;fill:#224b65}.chem-figure-svg .mass,.chem-figure-svg .atomic{font-size:17px;font-weight:800;fill:#4b5e69}.chem-figure-svg .isoexamples{font-size:15px;fill:#56636c}
.chem-figure-svg .mini-periodic rect{fill:#f9fbfb;stroke:#6c8999;stroke-width:1}.chem-figure-svg .mini-periodic .el{font-size:10px;font-weight:800;fill:#315b72}.chem-figure-svg .mini-periodic .ve{font-size:7px;fill:#9c6a32}.chem-figure-svg .tree rect{fill:#f9f4e9;stroke:#537e94;stroke-width:1.5}.chem-figure-svg .tree path{fill:none;stroke:#5d7581;stroke-width:1.7}.chem-figure-svg .tree-label{font-size:11px;font-weight:800}.chem-figure-svg .tree-small{font-size:9px}.chem-figure-svg .ptype>rect{fill:#fbfaf3;stroke:#708793;stroke-width:1.5}.chem-figure-svg .period-grid{fill:rgba(62,128,157,.08);stroke:#75909f;stroke-width:1}.chem-figure-svg .metalloid-stair{fill:none;stroke:#c78b34;stroke-width:3}.chem-figure-svg .phase .axes,.chem-figure-svg .phase .curve{fill:none;stroke:#4f6875;stroke-width:1.8}.chem-figure-svg .phase .curve{stroke:#b55d45;stroke-width:2.2}.chem-figure-svg .phase .point{fill:#126ca1}.chem-figure-svg .phase .atm{stroke:#7c8a91;stroke-width:1;stroke-dasharray:5 4}.chem-figure-svg.phase-diagram{color:#536779}
.chem-classification .chem-question-list{width:39%;height:100%;padding-right:8px;box-sizing:border-box}.chem-wide-figures{position:absolute;left:40%;right:0;top:0;bottom:0;display:grid;grid-template-columns:1fr 1fr 1.1fr;gap:8px}.chem-wide-figures .chem-figure{height:100%}.chem-phases .chem-question-list{width:42%;height:100%;padding-right:10px;box-sizing:border-box}.chem-phase-figures{position:absolute;left:43%;right:0;top:0;bottom:0;display:grid;grid-template-columns:1fr 1fr;gap:9px}.chem-phase-figures .chem-figure{height:100%}
.chem-connectors{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;color:#1587a0}.chem-connectors path{fill:none;stroke:#1587a0;stroke-width:4;marker-end:url(#chem-page-arr)}.chem-connectors marker path{fill:#1587a0;stroke:none}
.chem-paper footer{position:absolute;left:32px;right:32px;bottom:16px;height:39px;border-top:1px dashed #b2a58b;display:flex;align-items:center;justify-content:center;gap:24px;color:#7c6952;font-family:"Noto Serif TC","Songti TC",serif;font-size:13px;letter-spacing:.13em;z-index:3}.chem-paper footer small{font-family:"Noto Sans TC","PingFang TC",sans-serif;letter-spacing:0;font-size:10px;color:#8a8176}
.chem-footnote{display:flex;gap:12px;flex-wrap:wrap;padding:9px 4px 2px;color:#68757e;font-size:11px}.chem-footnote span{padding-right:12px;border-right:1px solid #d9e0e4}.chem-footnote span:last-child{border:0}
.chem-planned-panel{border:1.5px solid color-mix(in srgb,var(--track) 45%,#d9dde2);background:color-mix(in srgb,var(--track) 4%,#fff);border-radius:18px;padding:28px;display:flex;gap:18px;align-items:flex-start;max-width:820px;margin-top:14px}.chem-planned-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:var(--track);color:#fff;font-family:"Noto Serif TC",serif;font-size:26px;font-weight:900;flex:0 0 auto}.chem-planned-panel h3{margin:2px 0 7px;color:var(--track)}.chem-planned-panel p{margin:0;line-height:1.75;color:#59636d}
.chem-qa{position:fixed;right:16px;bottom:16px;z-index:9999;width:180px;padding:12px;border-radius:12px;background:#16242c;color:#eef7f9;box-shadow:0 8px 30px rgba(0,0,0,.25);display:flex;flex-direction:column;gap:4px;font-size:11px}.chem-qa>strong{font-size:12px}.chem-qa>span{font-weight:900;color:#75e0ab}.chem-qa small{color:#bdd0d7}
@media(max-width:900px){.chem-modebar{align-items:flex-start;flex-wrap:wrap}.chem-progress{order:3;width:100%}.chem-viewport{min-height:68vh;max-height:72vh;padding:10px}.chem-track-tabs button{flex:1;min-width:155px}.chem-page-nav button{min-width:190px}.chem-footnote{font-size:10px}}
@media(max-width:560px){.chem-page-head p{font-size:12px}.chem-track-tabs{gap:7px}.chem-track-tabs button{padding:8px 10px;display:block}.chem-track-tabs button span{display:block;margin-top:2px}.chem-mode-tabs button{font-size:11px;padding:6px 8px}.chem-zoom button{font-size:11px}.chem-viewport{border-radius:10px;padding:6px;min-height:70vh}.chem-footnote span{border:0;padding-right:0}.chem-planned-panel{padding:18px}.chem-planned-icon{width:44px;height:44px;font-size:21px}}
