@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{
  --sa-ink:#152e35;--sa-muted:#4c666f;--sa-faint:#617b84;--sa-rule:#d8e0e3;--sa-card:#ffffff;--sa-page:#f6f8f9;
  --sa-accent:#077384;--sa-accent-strong:#06606e;--sa-accent-ink:#ffffff;--sa-chip:#eef3f5;--sa-chip-ink:#2f4f5a;--sa-active:#173e4b;
  --stage-top:#f3f0ea;--stage-bottom:#ddd8cf;--stage-ink:#2b3a40;--tag-bg:rgba(255,255,255,.9);--tag-ink:#15252b;--tag-num:#0b6f7e;--leader:#2f444c;
  --chem-ink:#193d48;--chem-muted:#4f6a74;--chem-line:#97b1bb;--chem-water:#dcf0f5;--chem-gas:#f2f6f7;--chem-co2:#087e91;--chem-oxygen:#c0393d;--chem-carbon:#2c4753;--chem-hydrogen:#d7e3e8;--chem-proton:#d6801c;--chem-panel:#e7f1f4;
  font-family:'DM Sans',sans-serif;color:var(--sa-ink);background:var(--sa-page);font-synthesis:none
}
html[data-theme=dark]{
  --sa-ink:#e6edef;--sa-muted:#a9bcc2;--sa-faint:#93a8af;--sa-rule:#33403f;--sa-card:#171a1b;--sa-page:#12100e;
  --sa-accent:#46b9c9;--sa-accent-strong:#6fd0dc;--sa-accent-ink:#06191d;--sa-chip:#222829;--sa-chip-ink:#c9d7db;--sa-active:#46b9c9;
  --stage-top:#3a3733;--stage-bottom:#1d1b19;--stage-ink:#d8dfe1;--tag-bg:rgba(24,27,28,.9);--tag-ink:#eef3f4;--tag-num:#6fd0dc;--leader:#c6d3d7;
  --chem-ink:#e2ecef;--chem-muted:#a4b8bf;--chem-line:#4c6168;--chem-water:#15303a;--chem-gas:#1c2224;--chem-co2:#5fd0e0;--chem-oxygen:#ef7a7c;--chem-carbon:#8fa8b3;--chem-hydrogen:#e5eef1;--chem-proton:#f2a54a;--chem-panel:#1d2a2e
}
*{box-sizing:border-box}body{margin:0}
header,main,footer{max-width:1500px;margin:auto}
header{padding:27px 48px;display:flex;justify-content:space-between;border-bottom:1px solid var(--sa-rule)}
.brand{font-size:14px;letter-spacing:2px;font-weight:700;text-decoration:none;color:inherit}.brand span{color:var(--sa-faint)}
.edition,.eyebrow{font-size:12px;letter-spacing:1.8px;font-weight:700}.edition{color:var(--sa-muted)}
main{padding:0 48px}.intro{padding:40px 0 27px;position:relative}.intro .eyebrow{color:var(--sa-muted)}
h1{font-family:Manrope,sans-serif;font-size:clamp(42px,5vw,68px);letter-spacing:-3px;line-height:1.08;margin:13px 0}h1 i{font-family:Georgia,serif;font-weight:400;color:var(--sa-accent)}
.intro p{position:absolute;right:0;bottom:27px;color:var(--sa-muted);font-size:16px;line-height:1.7}
.experience{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);border:1px solid var(--sa-rule);border-radius:20px;overflow:hidden;background:var(--sa-card)!important}
.stage{background:var(--stage-bottom);position:relative;min-height:690px;color:var(--stage-ink)}
.stage-top{position:absolute;top:22px;left:24px;right:24px;display:flex;justify-content:space-between;font-size:11px;letter-spacing:1.2px;color:var(--stage-ink);z-index:3;pointer-events:none;font-weight:600}
#viewport{height:600px;width:100%;position:relative;overflow:hidden}
#viewport canvas{display:block;touch-action:none;position:absolute;inset:0}
canvas{display:block}
#fallback{position:absolute;top:45%;left:10%;right:10%;text-align:center;color:var(--stage-ink);z-index:2}#fallback p{font-size:14px}
/* on-stage labels */
#labels{position:absolute;inset:0;pointer-events:none;z-index:2}
#labels svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#labels polyline{fill:none;stroke:var(--leader);stroke-width:1.1;opacity:.85}
#labels circle{fill:var(--tag-bg);stroke:var(--leader);stroke-width:1.4}
#labels .tag{position:absolute;left:0;top:0;display:flex;align-items:center;gap:7px;max-width:190px;padding:5px 9px 5px 6px;border-radius:7px;background:var(--tag-bg);color:var(--tag-ink);font:500 12.5px/1.3 'DM Sans',sans-serif;box-shadow:0 1px 0 rgba(0,0,0,.06),0 4px 14px rgba(0,0,0,.08);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);will-change:transform}
#labels .tag b{flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--tag-num);color:var(--sa-card);font-size:10.5px;font-weight:700}
#labels.compact .tag{padding:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#labels.compact .tag span{display:none}
#labels.compact .tag b{width:22px;height:22px;font-size:11.5px;box-shadow:0 0 0 2px var(--tag-bg),0 2px 8px rgba(0,0,0,.25)}
.label-key{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0}
.stage-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:0 16px 6px;font-size:12.5px;color:var(--stage-ink)}
.stage-legend[hidden]{display:none}
.stage-legend span{display:inline-flex;align-items:center;gap:7px}
.stage-legend b{display:inline-block;flex:none}
.lg-gas{width:22px;height:4px;border-radius:2px;background:repeating-linear-gradient(90deg,#1fc3d6 0 6px,#0b6f7e 6px 9px)}
.lg-cyl{width:12px;height:12px;border-radius:3px;background:#c81f66}
.lg-bub{width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#b9c4c9 60%,#7d8a90)}
.view-controls{position:relative;display:flex;justify-content:center;gap:4px;flex-wrap:wrap;padding:8px 12px 4px}
.view-controls button{background:var(--tag-bg);border:1px solid transparent;padding:10px 12px;font-size:13px;border-radius:8px;color:var(--sa-chip-ink)}
.view-controls .active{background:var(--sa-active);color:var(--sa-accent-ink)}
.model-note{text-align:center;color:var(--stage-ink);opacity:.85;font-size:12px;margin:8px 0 16px}
button{font-family:inherit;cursor:pointer;transition:background .15s,transform .15s}button:disabled{cursor:default;opacity:.5}button:hover:not(:disabled){filter:brightness(.95)}
button:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid var(--sa-accent);outline-offset:4px}
aside{padding:31px 32px;display:flex;flex-direction:column}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:24px 0 32px}
.steps button{border:0;border-top:3px solid var(--sa-rule);background:none;text-align:left;padding:10px 0;color:var(--sa-muted);font-size:13px}
.steps span{display:block;margin-top:6px;font-size:13px}.steps .selected{border-color:var(--sa-accent);color:var(--sa-accent)}
.eyebrow{color:var(--sa-muted)}
h2{font-family:Manrope,sans-serif;font-size:30px;letter-spacing:-1px;margin:10px 0 14px;line-height:1.18}
article p{font-size:16px;line-height:1.7;color:var(--sa-muted);min-height:160px;margin:0}article .eyebrow{font-size:11px}
.mechanism{margin:23px 0 18px;padding-top:20px;border-top:1px solid var(--sa-rule)}
.mechanism label{font-size:15px;font-weight:600;display:flex;align-items:center;gap:10px}
.mechanism input{width:19px;height:19px;accent-color:var(--sa-accent)}
.mechanism p{font-size:12.5px;line-height:1.55;color:var(--sa-faint);margin:9px 0}
.readout{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.readout span{font-size:10px;letter-spacing:1px;color:var(--sa-faint)}.readout strong{font-size:24px}.readout small{font-size:14px;font-weight:400;color:var(--sa-faint)}
.primary{display:flex;justify-content:space-between;width:100%;background:var(--sa-accent);border:0;color:var(--sa-accent-ink);border-radius:10px;padding:16px 20px;font-size:16px;font-weight:600}.primary span{font-size:20px}
.fizz p{font-size:13px;color:var(--sa-muted);min-height:32px;line-height:1.5}
.next{margin-top:auto;border:0;background:transparent;text-align:left;color:var(--sa-accent);font-size:15px;font-weight:600;padding:12px 0 0}
footer{border-top:1px solid var(--sa-rule);padding:25px 48px 40px;display:flex;justify-content:space-between;gap:40px;color:var(--sa-muted);font-size:13px}
footer details{max-width:900px}footer summary{cursor:pointer;font-size:14px}footer p{line-height:1.7}footer a{display:inline-block;margin:8px 20px 8px 0;color:var(--sa-accent)}footer>span{font-size:10px;letter-spacing:2px;white-space:nowrap;padding-top:3px}
.stage,aside{min-width:0}
@media(max-width:1050px){main{padding:0 24px}.intro p{position:static}.stage{min-height:640px}#viewport{height:540px}aside{padding:25px 22px}}
@media(max-width:760px){header{padding:20px}.edition{display:none}main{padding:0 16px}.intro{padding-top:28px}h1{letter-spacing:-2px}.intro p{font-size:15px}.experience{grid-template-columns:minmax(0,1fr)}.stage{min-height:0}#viewport{height:470px}.stage-top{font-size:9.5px;left:15px;right:15px;top:16px}.view-controls button{font-size:12px;padding:9px}.steps{margin-bottom:24px}article p{min-height:0}aside{padding:28px 24px}footer{padding:24px;display:block}footer>span{display:block;margin-top:25px}
  .label-key{position:static;width:auto;height:auto;overflow:visible;clip:auto;display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;margin:2px 16px 8px;padding:0;list-style:none;counter-reset:k;font-size:12.5px;color:var(--stage-ink)}
  .label-key li{counter-increment:k;display:flex;gap:7px;align-items:baseline;line-height:1.35}
  .label-key li::before{content:counter(k);flex:none;display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--tag-num);color:var(--sa-card);font-size:10.5px;font-weight:700}
}
@media(max-width:420px){.label-key{grid-template-columns:1fr}}
.label-key li.off{opacity:.45}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
html{scroll-behavior:smooth}.chem-jump{color:var(--sa-accent);text-decoration:none}.chem-jump:hover{text-decoration:underline}
.chemistry{padding:60px 0 44px;scroll-margin-top:18px}
.chem-heading{display:flex;justify-content:space-between;gap:35px;align-items:center;margin-bottom:25px}.chem-heading h2{font-size:36px;margin-top:12px}.chem-heading p{max-width:420px;font-size:16px;line-height:1.65;color:var(--sa-muted)}
.chem-tabs{display:flex;border-bottom:1px solid var(--sa-rule);gap:30px}
.chem-tabs button{border:0;border-bottom:3px solid transparent;padding:15px 0;background:none;color:var(--sa-muted);font-size:14px;display:flex;gap:12px;align-items:center}
.chem-tabs button[aria-pressed=true]{border-bottom-color:var(--chem-co2);color:var(--chem-co2)}.chem-tabs span{font-weight:600;font-size:16px}
.chem-lab{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(290px,1fr);gap:45px;padding:33px 0 20px}
.chem-visual{min-width:0;align-self:start;background:var(--sa-card);border:1px solid var(--sa-rule);border-radius:16px;padding:18px 18px 16px}
.chem-visual-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;font-size:11px;letter-spacing:1px;color:var(--sa-muted);margin-bottom:12px;font-weight:600}
#chem-canvas{display:block;width:100%;height:420px;touch-action:pan-y}
.chem-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:14px;color:var(--sa-muted);font-size:13px}.chem-legend>span{display:flex;gap:7px;align-items:center}.chem-legend b{display:inline-block;flex-shrink:0}
.dissolved-dot{width:8px;height:8px;border-radius:50%;background:var(--chem-co2)}.bubble-dot{width:14px;height:14px;border:1.5px solid var(--chem-co2);border-radius:50%}
.arrow-key{width:18px;height:2px;background:var(--chem-co2);position:relative}.arrow-key::after{content:'';position:absolute;right:-1px;top:-3px;border:4px solid transparent;border-left:6px solid var(--chem-co2);border-right:0}
.atom-key{width:14px;height:14px;border-radius:50%}.atom-c{background:var(--chem-carbon)}.atom-o{background:var(--chem-oxygen)}.atom-h{background:var(--chem-hydrogen);box-shadow:inset 0 0 0 1px var(--chem-line)}.atom-p{background:var(--chem-proton)}
.chem-controls{min-width:0}.chem-controls h3{font-size:25px;letter-spacing:-.6px;line-height:1.3;margin:0 0 15px}.chem-controls p{font-size:16px;line-height:1.65;color:var(--sa-muted)}
.chem-range{display:block;font-size:14px;font-weight:500;margin:25px 0}.chem-range output{float:right;font-variant-numeric:tabular-nums;font-weight:600}
.chem-range input{display:block;width:100%;accent-color:var(--chem-co2);margin:13px 0 8px;cursor:pointer;min-height:22px}
.range-ends{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:400;color:var(--sa-faint)}
.chem-numbers{display:flex;flex-wrap:wrap;gap:25px;padding:18px 0 0;border-top:1px solid var(--sa-rule)}.chem-numbers span{display:block;font-size:13px;color:var(--sa-muted);margin-bottom:7px}
.chem-numbers strong{font-size:29px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}.chem-numbers small{font-size:14px;font-weight:400;color:var(--sa-muted)}
.chem-controls .chem-small{font-size:12.5px;line-height:1.65;color:var(--sa-faint)}.chem-insight{font-weight:500;min-height:27px;color:var(--sa-ink)!important}
.chem-condition{background:var(--chem-panel);padding:12px 15px;border-radius:8px}
.chem-range select{display:block;font:inherit;background:var(--sa-card);color:var(--sa-ink);border:1px solid var(--sa-rule);border-radius:6px;padding:12px;margin-top:12px;width:100%}
.reaction-equation{font-size:clamp(18px,2vw,25px);line-height:1.8;letter-spacing:-.4px;padding:15px 0;color:var(--chem-co2)}
.chem-method{border-top:1px solid var(--sa-rule);padding-top:20px;font-size:14px;color:var(--sa-muted)}.chem-method summary{cursor:pointer}.chem-method>div{max-width:970px}.chem-method p{line-height:1.75}.chem-method a{color:var(--sa-accent)}
.chemistry [hidden]{display:none!important}
@media(max-width:900px){.chem-lab{gap:26px}.chem-heading{display:block}.chem-heading p{max-width:600px}.chem-tabs{gap:20px}.chem-tabs span{font-size:14px}}
@media(max-width:760px){.chemistry{padding:40px 0 30px}.chem-lab{grid-template-columns:minmax(0,1fr);gap:30px}.chem-heading h2{font-size:29px}.chem-tabs{gap:15px}.chem-tabs button{flex-direction:column;align-items:start;gap:5px;flex:1;line-height:1.5;text-align:left}.chem-tabs span{font-size:13px}.chem-controls h3{font-size:24px}#chem-canvas{height:360px}.chem-visual{padding:12px}.chem-visual-heading{font-size:10px}.chem-legend{gap:8px 12px;font-size:12px}.chem-range input{min-height:35px}.chem-range select{font-size:16px}.chem-numbers strong{font-size:26px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.header-right{display:flex;gap:22px;align-items:center}.language-switch{display:flex;gap:4px}.language-switch button{border:0;background:transparent;color:var(--sa-muted);font-size:13px;padding:7px 10px;border-radius:6px}.language-switch button[aria-pressed=true]{background:var(--sa-active);color:var(--sa-accent-ink)}
html[lang=ja]{font-family:'DM Sans','Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif}html[lang=ja] h1{font-size:clamp(36px,4.7vw,62px);letter-spacing:-1px}html[lang=ja] h1 i{font-style:normal;font-family:inherit}html[lang=ja] h2{letter-spacing:0}html[lang=ja] .chem-heading h2{font-size:30px}html[lang=ja] .chem-controls h3{font-size:24px}html[lang=ja] .steps span{line-height:1.6}html[lang=ja] .chem-visual-heading{letter-spacing:.3px}html[lang=ja] #labels .tag{font-size:12px;max-width:200px}
@media(max-width:760px){.brand{font-size:11px;letter-spacing:1px}.header-right{gap:4px}.language-switch button{font-size:12px;padding:8px}html[lang=ja] .chem-heading h2{font-size:26px}html[lang=ja] .intro .eyebrow{font-size:10px;letter-spacing:.8px}}
