:root{--ink:#263f3d;--ink-soft:#526f69;--forest:#23665b;--mint:#e7f3ed;--mint-deep:#d4eadf;--amber:#a55c27;--line:#d4e3d9;--paper:#fffefa;--sans:"Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",Meiryo,sans}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:linear-gradient(#f6faf6,#edf5f0 72%,#f5f8f5);font-family:var(--sans);color:var(--ink);-webkit-text-size-adjust:100%}
button,select,input{font:inherit}
button{cursor:pointer}
button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #71aaf0;outline-offset:3px}
button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #23665b}
[hidden]{display:none!important}
.classroom{max-width:975px;margin:0 auto;padding:0 clamp(12px,3.3vw,32px) 45px;min-width:0}
.hero{padding:clamp(32px,6vw,58px) clamp(16px,4vw,42px) clamp(25px,4vw,37px);background:linear-gradient(128deg,#edf7ef 0%,#f8fbf4 55%,#e6f2ef 100%);border:1px solid #d8e8df;border-radius:0 0 28px 28px;position:relative;overflow:hidden}
.hero:after{content:"";position:absolute;width:170px;height:170px;right:-52px;top:-75px;border-radius:50%;background:radial-gradient(circle,#f5e8b6bb,#c9e7dd55 70%,transparent 75%);pointer-events:none}
.kicker,.step,.mystery-kicker{font-size:11px;font-weight:900;letter-spacing:.16em;color:#498476}
.level{display:inline-block;margin-top:14px;border-radius:50px;padding:7px 12px;border:1px solid #c6ddd1;color:#3f7165;background:#ffffffaa;font-size:12px;font-weight:750}
h1,h2,h3,p{overflow-wrap:break-word}
h1{font-size:clamp(30px,6.4vw,53px);line-height:1.44;margin:17px 0 17px;letter-spacing:.015em}
h1 em{font-style:normal;color:#287a6b}
.hero-copy{font-size:clamp(14px,2.15vw,18px);line-height:1.85;color:#486962;max-width:680px;margin:0}
.hero-copy strong{color:#236a5e}
.plan-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:27px}
.plan{display:grid;gap:4px;border-radius:17px;padding:18px 20px;background:#fff;border:1px solid var(--line);min-width:0;color:#52706a;font-size:14px}
.plan.a{border-top:5px solid #287b71}
.plan.b{border-top:5px solid #c57835}
.plan-name{font-weight:900;color:var(--ink);font-size:17px;margin-bottom:5px}
.plan strong{color:#264c44;font-variant-numeric:tabular-nums;font-size:20px}
.fine{font-size:12px;line-height:1.75;color:#647b72;margin:15px 0 0}
.chapter{border:1px solid var(--line);border-radius:23px;background:var(--paper);padding:clamp(21px,4.5vw,39px);margin:23px 0;min-width:0;box-shadow:0 8px 30px rgba(56,105,85,.04)}
.step{color:#3b8773;margin-bottom:12px}
.chapter h2{font-size:clamp(21px,3.7vw,29px);line-height:1.55;margin:0 0 15px}
.chapter h3{font-size:clamp(17px,2.9vw,21px);line-height:1.55}
.chapter>p{font-size:15px;line-height:1.85;color:#526c67;margin:0 0 16px}
.guess,.method-tabs,.answers{display:flex;gap:9px;flex-wrap:wrap}
.guess button,.method-tabs button,.answers button{border:1px solid #b4d1c2;border-radius:13px;background:#f8fcf8;color:#2a6355;padding:11px 14px;font-size:14px;min-height:46px;font-weight:800;flex:1 1 115px}
.guess button:hover,.method-tabs button:hover,.answers button:hover{background:#e1f2e8}
.guess button[aria-pressed=true],.method-tabs button[aria-pressed=true],.answers button[aria-pressed=true]{background:#d8eddf;border-color:#367c69}
.feedback,.quiz-feedback{border-radius:12px;background:#eff6f0;border:1px solid #dbece0;color:#386954;font-size:14px;line-height:1.7;padding:12px 15px;min-height:43px;margin:15px 0 0}
.hint{border-left:3px solid #83b9a2;padding:6px 11px;margin:15px 0 0;color:#5a7b6b;font-size:13px}
.lab{background:#fafdf9}
.control-shell{background:#fff;border-radius:16px;border:1px solid #d7e5dc;padding:clamp(16px,3vw,24px);margin:25px 0 16px}
.control-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.control-row label{font-size:15px;font-weight:850;color:#356f5e}
.big-time{font-weight:900;font-variant-numeric:tabular-nums;font-size:clamp(22px,4vw,30px);color:#276c5e}
#hoursSlider{display:block;width:100%;accent-color:#317c6f;cursor:pointer;min-height:36px;margin:10px 0 0}
.slider-ends{display:flex;justify-content:space-between;gap:7px;color:#668077;font-size:12px}
.live-prices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:13px 0 23px}
.price{display:flex;min-height:114px;flex-direction:column;gap:6px;padding:15px 11px;border-radius:15px;background:#fff;border:1px solid var(--line);min-width:0}
.price span{font-size:13px;font-weight:800}
.price strong{font-size:clamp(17px,3vw,25px);font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
.price.a{border-top:4px solid #287b71}
.price.a strong{color:#287b71}
.price.b{border-top:4px solid #c57835}
.price.b strong{color:#a76225}
.price.difference{background:#eaf4ef;border-color:#cddfd3}
.price.difference strong{color:#215c50}
.price.difference small{font-size:12px;line-height:1.35;color:#316958}
.graph-card{margin:0;border-radius:18px;background:#fff;border:1px solid #d7e5dc;padding:clamp(8px,2vw,18px);min-width:0}
.graph-card figcaption{font-size:17px;font-weight:850;margin:4px 7px 10px}
.legend{display:flex;flex-wrap:wrap;gap:10px 18px;margin:0 7px 7px;font-size:13px;color:#375d55}
.legend>span{display:inline-flex;align-items:center;gap:7px}
.swatch{display:inline-block;width:25px;height:5px;border-radius:10px}
.swatch.a{background:#287b71}
.swatch.b{background:#c57835}
#planGraph{width:100%;height:auto;display:block;overflow:visible;background:#fbfdfb;border-radius:11px;max-width:100%}
.tick-labels{font-size:15px;font-family:Arial,sans-serif}
.graph-caption{margin:10px 8px 0;font-size:13px;line-height:1.65;color:#526e62}
.table-wrap{margin-top:16px;overflow:hidden;border:1px solid #d5e4da;border-radius:13px;background:#fff}
table{border-collapse:collapse;width:100%;table-layout:fixed;text-align:center;font-size:14px}
th{font-weight:850;background:#deeee3;color:#315e52}
th,td{padding:11px 7px;border-bottom:1px solid #e4ede8;font-variant-numeric:tabular-nums}
tbody tr:last-child td{border-bottom:0}
tr.is-active{background:#fdf3df;font-weight:800}
.prediction{display:flex;align-items:center;gap:8px;justify-content:space-between;background:#f0f6ec;padding:15px;border-radius:12px;margin:20px 0 13px;flex-wrap:wrap}
.prediction label{font-size:14px;font-weight:800}
.prediction output{font-weight:900;color:#256c5b;font-size:19px}
.primary{width:100%;min-height:52px;background:#267e6b;border-radius:14px;border:0;color:white;font-size:17px;font-weight:850;padding:13px 18px}
.primary:hover{background:#1e675a}
.result{margin:20px 0 0;padding:20px;border-radius:16px;background:#ecf6ed;border-left:5px solid #358876;font-size:17px;font-weight:700;line-height:1.85;color:#235d50}
.solution-steps{padding:18px 0 0}
.solution-steps h3{margin:0 0 11px;color:#23665a}
.solution-steps>p{font-size:15px;line-height:1.85;color:#4a6d61}
.equations{border:1px solid #d7e9dc;border-radius:14px;padding:12px 17px;background:#f7fbf7}
.equations p{margin:6px 0;font-size:17px;line-height:1.55}
.equations strong,.sample-equations{color:#276c5c;font-weight:900}
.math-steps{padding-left:24px;display:grid;gap:10px;margin:20px 0}
.math-steps li{font-size:14px;line-height:1.65;padding:12px;background:#f7faf5;border:1px solid #e1eae2;border-radius:12px}
.math-steps code{display:block;font-family:var(--sans);font-size:clamp(17px,3.3vw,22px);font-weight:900;color:#276d61;margin-top:7px;overflow-wrap:anywhere}
.takeaway{border-radius:13px;background:#dff0e6;padding:16px;color:#245c4f!important;font-size:16px!important}
.check{font-size:13px!important;color:#4f7468!important}
.sample-equations{background:#eef7f0;padding:17px 21px;border-radius:16px;margin:19px 0 13px;display:grid;gap:8px;text-align:center;font-size:clamp(20px,3.6vw,28px);font-variant-numeric:tabular-nums;line-height:1.45}
.method-body{margin-top:15px;padding:17px;border:1px solid #d9e7dd;border-radius:16px;background:#f9fcf8;color:#42665a;font-size:15px;line-height:1.8}
.method-body h3{margin:0 0 10px}
.method-body ol{margin:10px 0;padding-left:23px}
.method-body li{margin:8px 0}
.method-body strong{color:#246b5b}
.scenario-label{display:block;font-size:14px;font-weight:850;margin:10px 0}
#scenarioSelect{display:block;width:100%;border:1px solid #abcdb9;border-radius:12px;background:#fff;color:#315a4e;padding:14px 12px;font-size:15px;min-height:48px}
.scenario-status{background:#edf5e9;border-radius:13px;padding:16px;margin-top:15px!important;color:#315f50!important}
.quiz-list{display:grid;gap:13px}
.quiz{padding:19px;border:1px solid #dae6dd;border-radius:17px;background:#f7faf7}
.quiz h3{margin:0 0 14px;font-size:16px}
.quiz-feedback{margin:13px 0 0}
.recap{background:#f2f8f2}
.recap-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.recap-grid article{background:#fff;border:1px solid #dbe8de;border-radius:16px;padding:18px;min-width:0}
.recap-grid span{font-size:11px;font-weight:900;color:#4a9a7d;letter-spacing:.12em}
.recap-grid h3{margin:5px 0 7px;font-size:17px;color:#2b6457}
.recap-grid p{font-size:14px;line-height:1.8;margin:0;color:#4d6a5e}
.recap-grid strong{color:#245d4f}
.mystery{margin:32px 0 0;background:linear-gradient(135deg,#275d53,#173e3f 82%);border-radius:25px;padding:clamp(26px,6vw,58px);color:#fff;min-width:0;position:relative;overflow:hidden}
.mystery:before{content:"?";font-family:Georgia,serif;position:absolute;right:-10px;top:-88px;font-size:310px;color:#ffffff12;line-height:1;pointer-events:none}
.mystery-kicker{position:relative;color:#cbe9d0}
.mystery h2{position:relative;font-size:22px;margin:14px 0 15px}
.mystery p{position:relative;line-height:1.9;font-size:15px;color:#e6f3ea;margin:0 0 15px}
.mystery .mystery-question{font-size:clamp(24px,5vw,36px);font-weight:800;line-height:1.6;color:white;margin:25px 0}
.mystery-question strong{color:#f9e7b3}
.mystery .mystery-tail{font-size:13px;color:#d6e8df;margin:0;max-width:680px}
.footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:27px 5px;color:#6d877c;font-size:12px}
@media(max-width:630px){
 .classroom{padding:0 12px 25px}
 .hero{border-radius:0 0 17px 17px;padding:25px 16px}
 .plan-cards{grid-template-columns:1fr;gap:9px}
 .plan{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;padding:12px 14px;font-size:13px}
 .plan-name{grid-row:span 2;font-size:16px;align-self:center}
 .plan strong{font-size:17px}
 .chapter{border-radius:16px;padding:19px 13px;margin:15px 0}
 .chapter>p{font-size:14px}
 .live-prices{gap:6px}
 .price{padding:10px 7px;min-height:94px}
 .price span{font-size:11px}
 .price small{font-size:11px}
 .graph-card{padding:8px 3px}
 .graph-card figcaption{font-size:14px}
 .tick-labels{font-size:15px}
 .graph-caption{font-size:12px}
 .quiz{padding:13px}
 .recap-grid{grid-template-columns:1fr}
 .mystery{border-radius:18px;padding:28px 18px}
}
@media(max-width:360px){
 .live-prices{grid-template-columns:repeat(2,minmax(0,1fr))}
 .price.difference{grid-column:1 / -1;min-height:80px}
 .plan-name{font-size:15px}
 .graph-caption{font-size:12px}
 .tick-labels{font-size:15px}
 .answers button,.guess button{font-size:13px;padding:10px 7px}
 .method-tabs button{flex-basis:100%;font-size:14px}
 .footer{font-size:11px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* R1R3: readable SVG labels at 320px and line styles distinguishable without color. */
#hoursSlider{min-height:48px}
.swatch.b{background:none;border-top:5px dashed #c57835;height:0}
.systems-why,.systems-slope{margin:15px 0;padding:15px 17px;border-radius:14px;background:#eaf5ef;border-left:5px solid #418b72;color:#345e50;font-size:15px;line-height:1.8}
.systems-slope{margin-top:18px;background:#f1f6ed}
.systems-slope h3{margin:0 0 9px;font-size:18px;color:#235e53}
.systems-slope p{margin:0}
@media(max-width:630px){#planGraph .tick-labels{font-size:27px}#planGraph > text{font-size:24px}#planGraph #crossLabel{font-size:26px}}


/* SORAIRO Classroom — dewpoint/cloud lesson, shared typography plus model-specific visualization */
.dew-hero{background:linear-gradient(125deg,#edf8f6,#f3faf6 60%,#eef7e9)}
.cloud-hero{margin:24px 0 0;border:1px solid #c5dfdc;border-radius:20px;overflow:hidden;background:#cce3ee}
.cloud-hero svg{display:block;max-width:100%;height:auto}
.dew-controls{margin-bottom:16px}
.control-shell label{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:15px;font-weight:850;color:#2d6b5f}
.control-shell output{font-size:clamp(21px,4vw,29px);font-weight:900;color:#246b5b}
.control-shell input[type=range]{width:100%;min-height:48px;accent-color:#358b7c;margin:14px 0 2px}
.vapor-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:15px 0 20px}
.vapor-card{min-width:0;border:1px solid #d8e8dd;border-top:4px solid #41927f;border-radius:15px;background:#fff;padding:15px 12px;display:flex;flex-direction:column;gap:7px}
.vapor-card:nth-child(2){border-top-color:#bb8754}
.vapor-card.emphasis{background:#e5f3eb;border-top-color:#236e65}
.vapor-card span{font-weight:750;font-size:13px;line-height:1.45;color:#48695f}
.vapor-card strong{font-weight:900;font-size:clamp(24px,4vw,34px);font-variant-numeric:tabular-nums;line-height:1.3;color:#265e53}
.vapor-card small{font-size:11px;color:#537468;line-height:1.4}
.graph-card{margin:0}
.graph-card figcaption{margin-bottom:12px}
#saturationGraph{display:block;width:100%;height:auto;background:#fbfdfb;border-radius:12px;overflow:visible;max-width:100%}
#saturationGraph #graphTicks text{font-family:Arial,"Yu Gothic",sans-serif}
.swatch.cap{background:#288d7d}
.swatch.actual{background:none;border-top:4px dashed #d08a52;height:0}
.condensation-view{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:15px;margin:20px 0;align-items:stretch}
.air-vessel{position:relative;min-width:0;min-height:244px;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;background:linear-gradient(170deg,#e4f4f1,#f6fcf8);border:3px solid #8cbeb1;border-radius:24px;padding:12px;overflow:hidden}
.vessel-label{position:absolute;top:13px;left:14px;font-size:13px;font-weight:850;color:#327362;z-index:2}
.water-drops{position:absolute;inset:23px 12px 62px;pointer-events:none}
.drop{position:absolute;display:block;width:13px;height:18px;background:linear-gradient(170deg,#8dcce6,#367fbd);border:2px solid #fff;border-radius:70% 70% 60% 60%;box-shadow:0 2px 7px #397b9d50;transform:scale(.4);opacity:0;transition:opacity .18s ease,transform .18s ease}
.air-vessel p{margin:0;position:relative;z-index:2;max-width:95%;min-height:51px;background:#ffffffd5;padding:7px 9px;border-radius:11px;font-size:12px;color:#35695c;line-height:1.65;text-align:center}
.condensation-results{display:flex;flex-direction:column;justify-content:center;gap:9px;background:#f1f8f0;border-radius:18px;padding:20px;border:1px solid #d5e6d9;min-width:0}
.result-label{font-size:12px;font-weight:850;color:#538070}
.condensation-results strong{font-size:clamp(17px,3vw,23px);color:#2a6557;line-height:1.6}
.condensation-results p{font-size:13px;line-height:1.75;color:#4b6e60;margin:0}
.prediction{display:flex;align-items:center;gap:14px;justify-content:space-between;flex-wrap:wrap}
.prediction span{font-size:15px;font-weight:850;color:#2b6759}
.prediction button{width:auto;flex:1 1 160px;max-width:310px}
.result{font-size:15px;line-height:1.85}
.fact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:20px 0}
.fact-grid article{border:1px solid #dbe7df;border-radius:14px;background:#f8fbf7;padding:17px;min-width:0}
.fact-grid h3{font-size:17px;margin:0 0 9px;color:#296656}
.fact-grid p{font-size:13px;line-height:1.8;margin:0;color:#527063}
.fact-grid strong{color:#246456}
.formula-box{border-radius:18px;border:1px solid #d6e7dc;padding:20px;background:#edf7f0}
.formula-box h3{font-size:18px;color:#2a6958;margin:0 0 12px}
.formula-box p{font-size:14px;line-height:1.85;color:#4d6f5f;margin:8px 0}
.formula-box .math-formula{border-radius:12px;background:#fff;padding:13px;margin:14px 0;font-size:clamp(16px,2.5vw,21px);overflow-wrap:anywhere;color:#215e50}
.sky-lab{margin:15px 0;border-radius:18px;border:1px solid #ccdfd8;background:#f7fbf7;padding:8px}
#riseSky{display:block;width:100%;height:auto;border-radius:12px}
.sky-lab figcaption{font-size:12px;color:#537263;line-height:1.7;margin:9px 7px}
.live-equation{border-left:5px solid #3a8f75;border-radius:12px;padding:17px;background:#eaf5ed;margin-top:15px}
.live-equation strong{display:block;font-size:clamp(17px,3vw,22px);color:#245f52;margin-bottom:8px}
.live-equation p{font-size:14px;line-height:1.75;color:#4b6e61;margin:0}
.cause-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;gap:9px;padding:0;margin:23px 0 0}
.cause-steps li{border:1px solid #d8e7dd;border-radius:13px;background:#f6fbf7;min-width:0;padding:13px 11px;display:grid;gap:7px}
.cause-steps b{color:#286958;font-size:17px}
.cause-steps span{font-size:12px;line-height:1.6;color:#557266}
.hint-note{margin-top:19px;border-left:4px solid #6cac90;background:#f0f8ef;padding:16px;border-radius:13px;font-size:14px;line-height:1.85;color:#416b59}
.hint-note strong{color:#225e4d}
@media(max-width:650px){
 .vapor-cards{gap:6px}
 .vapor-card{padding:10px 8px}
 .vapor-card span{font-size:11px}
 .vapor-card strong{font-size:23px}
 .vapor-card small{font-size:10px}
 .fact-grid{grid-template-columns:1fr}
 .condensation-view{grid-template-columns:1fr}
 .air-vessel{min-height:190px}
 .cause-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
 #graphTicks text{font-size:27px}
 #saturationGraph > text{font-size:26px}
 .prediction button{max-width:none}
}
@media(max-width:360px){
 .cloud-hero text{font-size:19px}
 .vapor-card span{font-size:10px}
 .vapor-card strong{font-size:21px}
 .vapor-card small{font-size:9px}
 .graph-card{padding:8px 3px}
 .legend{font-size:12px}
 #graphTicks text{font-size:28px}
 .cause-steps{gap:6px}
 .cause-steps li{padding:11px 8px}
}

/* R1R2: observed mobile overlap resolved; preserve readable diagram labels. */
@media(max-width:650px){#riseSky #skyLabel{font-size:31px}#riseSky #parcelText{font-size:24px}#riseSky>text:first-of-type{font-size:27px}.cloud-hero svg text{font-size:26px}}

/* R1R3: nested classroom iframe at 320px needs readable ascent label. */
@media(max-width:650px){#riseSky #skyLabel{font-size:40px}}

/* R2: primary observation is above temperature slider and rising-air controls. */
.sim-hint{font-size:13px;font-weight:850;color:#346f61;line-height:1.5;margin:2px 5px 9px}
.sim-panel{border:1px solid #cadfd3;background:#f7fcf8;border-radius:18px;padding:clamp(8px,1.5vw,15px);margin:12px 0 18px}
.sim-controls{border-top:1px dashed #b7d2c2;margin-top:9px;padding-top:12px}
.dew-observation-group{border:1px solid #cbded3;background:#f7fcf9;border-radius:17px;padding:clamp(8px,2vw,16px);margin:15px 0 0}
.dew-observation-group>.graph-card{margin:5px 0 9px;padding:8px 5px}
.dew-observation-group .vapor-cards{margin:9px 0 8px}
.dew-observation-group .condensation-view{margin:8px 0 3px}
.dew-controls-below{border-top:1px dashed #bfd8c8;margin:0 0 18px;padding:12px 8px 4px}
.dew-controls-below .control-shell{margin:8px 0 0}
.dew-rise-panel{padding:clamp(9px,1.5vw,15px)}
.dew-rise-panel .sky-lab{margin:7px 0 0}
.dew-rise-panel .live-equation{padding:11px 13px;margin:6px 0 0}
.dew-rise-panel .live-equation p{font-size:12px}
.dew-rise-panel .sim-controls .control-shell{margin:7px 0 0}
.dew-formula-key{border:1px solid #e3d4ae!important;border-left:5px solid #b18e4c!important;background:linear-gradient(120deg,#fff7dc,#eff8ed)!important;color:#385c4e}
.dew-formula-key .key-rule-label{display:inline-block;font-size:12px;font-weight:900;color:#8c6638;background:#f9e4b7;border-radius:50px;padding:5px 10px;margin-bottom:9px}
.dew-formula-key .math-formula{font-size:clamp(18px,4vw,25px);background:white;border:1px solid #e2dec5}
#recap .recap-emphasis{background:#fff6df;border:1px solid #d9c89d;border-left:4px solid #b38a4d}
@media(max-width:650px){
 .dew-observation-group{padding:9px 6px}
 .dew-observation-group .condensation-view{grid-template-columns:1fr 1fr;gap:7px}
 .dew-observation-group .air-vessel{min-height:134px;padding:7px;border-width:2px}
 .dew-observation-group .air-vessel .vessel-label{font-size:10px;left:7px;top:6px}
 .dew-observation-group .air-vessel p{font-size:10px;line-height:1.4;min-height:40px}
 .dew-observation-group .condensation-results{padding:9px;gap:4px}
 .dew-observation-group .condensation-results strong{font-size:13px}
 .dew-observation-group .condensation-results p{font-size:11px;line-height:1.45}
 .dew-rise-panel{padding:8px 5px}
 .dew-rise-panel .sky-lab{padding:5px}
 .dew-rise-panel .sky-lab figcaption{font-size:10px;line-height:1.55}
 .dew-rise-panel .sim-controls .control-shell{padding:10px}
}

/* Classroom density lesson R1; shared foundation is copied unchanged from dew styles. */
.density-classroom .density-hero{background:linear-gradient(125deg,#eaf5ee,#f8f8ef 65%,#f3efe4)}
.hero-samples{margin:23px 0 0;display:flex;align-items:center;justify-content:center;gap:clamp(13px,6vw,50px);min-height:125px;background:#e9f3ed;border-radius:20px;border:1px solid #d4e5d9;padding:14px;overflow:hidden}
.hero-samples span{font-weight:800;color:#4b7768;font-size:clamp(12px,2.5vw,17px);text-align:center}
.hero-cube{width:76px;height:76px;flex:none;transform:rotate(-8deg);border-radius:8px;box-shadow:9px 11px 0 #526f5d35,0 12px 24px #6a967331}
.hero-cube.wood{background:repeating-linear-gradient(85deg,#dba977 0 18px,#ebbf90 19px 32px,#c89766 33px 38px)}
.hero-cube.metal{background:linear-gradient(120deg,#c9d7df,#8dabb9 55%,#e2eaf0)}
.sim-hint{font-weight:850;font-size:13px;color:#326c61;margin:10px 0 13px;line-height:1.75}
.density-lab-group,.density-measure-group{border:1px solid #d5e4d9;background:#f6faf6;border-radius:19px;padding:clamp(11px,2.7vw,21px)}
.specimen-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.specimen-card{background:#fff;border:1px solid #d7e7dd;border-radius:16px;padding:15px 8px;display:flex;min-width:0;align-items:center;flex-direction:column;gap:6px}
.specimen-name{font-size:14px;font-weight:800;color:#3b685b;min-height:44px;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:6px;text-align:center}
.mat-dot{width:12px;height:12px;border-radius:50%;margin:4px 0 0;flex:none}
.mat-dot.wood{background:#ba8659}.mat-dot.metal{background:#738eac}
.specimen-card svg{width:100%;max-width:240px;height:auto;display:block}
.scale-readout{display:flex;flex-direction:column;align-items:center;justify-content:center;width:90%;padding:8px;border:2px solid #bfd5cd;background:#edf4ed;border-radius:11px}
.scale-readout small{font-size:11px;color:#527367}
.scale-readout strong{font-size:clamp(20px,3.2vw,28px);color:#245e51;line-height:1.4;font-variant-numeric:tabular-nums}
.live-readout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.live-readout>div{background:#e3f0e7;border:1px solid #cbded0;border-radius:13px;padding:12px;display:grid;gap:5px}
.live-readout small{color:#47685d;font-size:12px;font-weight:800}
.live-readout strong{font-size:clamp(19px,3.5vw,26px);color:#2a705c;font-variant-numeric:tabular-nums}
.mass-bars{background:white;border:1px solid #d7e7dd;border-radius:15px;padding:14px;margin:12px 0}
.mass-bar-label{font-size:13px;color:#466e62;display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;margin:7px 0}
.mass-bar-label strong{font-size:17px;color:#2d6556;font-variant-numeric:tabular-nums}
.mass-track{height:18px;border-radius:999px;background:#edf1ed;overflow:hidden}
.mass-fill{height:100%;border-radius:999px;min-width:2px;transition:width .2s ease}
.mass-fill.wood{background:#7cae8c}.mass-fill.metal{background:#c18a59}
.mass-bars .fine{margin:9px 0 0}
.density-controls{margin:14px 0 6px;padding:15px;background:#fff;border:1px solid #cee1d5;border-radius:14px}
.density-controls label{display:flex;justify-content:space-between;flex-wrap:wrap;gap:7px;font-size:14px;font-weight:850;color:#30685a;margin:12px 0 5px}
.density-controls label:first-of-type{margin-top:5px}
.density-controls output{color:#286c5b;font-weight:900;font-size:20px}
.density-controls input[type=range]{width:100%;min-height:48px;accent-color:#347b6f}
.density-controls select{display:block;min-height:48px;width:100%;background:#fff;border:1px solid #a9c9b9;border-radius:12px;padding:11px;font-weight:800;color:#315f55}
.density-insight{font-size:14px;line-height:1.85;color:#2d5d4c;background:#e4f3e8;border-left:4px solid #43866e;padding:12px 14px;border-radius:5px;margin:13px 0 0}
.graph-wrap{background:#f8fbf8;border:1px solid #d5e6dd;border-radius:17px;padding:clamp(7px,2vw,20px)}
#densityGraph{display:block;width:100%;max-width:560px;height:auto;margin:0 auto;overflow:visible}
.graph-legend{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:8px 0;font-size:14px;font-weight:800}
.legend-wood{color:#318163}.legend-metal{color:#a96433}
.graph-explanation{font-size:14px;line-height:1.75;color:#41665b;background:#e9f3e9;border-radius:10px;padding:13px;margin:12px 0 0}
.cylinders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:#fff;border:1px solid #d6e5dc;border-radius:16px;padding:17px 11px}
.cylinder-card{display:flex;align-items:center;flex-direction:column;gap:12px;font-size:15px;color:#356a5b}
.cylinder{width:min(100%,120px);height:235px;position:relative;border:4px solid #9bb6b9;border-top:0;border-radius:0 0 20px 20px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 22px,#c7dbd9 23px,#c7dbd9 24px),#f7fbf9;overflow:hidden;display:flex;align-items:flex-end}
.cylinder:before{content:"";position:absolute;top:0;bottom:0;left:10px;width:17px;z-index:2;background:repeating-linear-gradient(to bottom,transparent 0,transparent 21px,#6e999a 22px,#6e999a 24px);opacity:.5}
.cylinder .water{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(#bfe5ed,#80c0d2);transition:height .22s;height:50%;border-top:2px solid #4a97ad}
.cylinder .water-label{position:absolute;left:0;right:0;text-align:center;bottom:9px;font-size:16px;font-weight:900;color:#20566a;z-index:3;text-shadow:0 1px #fff}
.immersed{position:absolute;width:38px;height:50px;bottom:5px;left:calc(50% - 19px);z-index:2;background:linear-gradient(115deg,#bacbd4,#789aaa);border:2px solid #5d7e8e;border-radius:7px}
.measure-results{border-left:4px solid #5a9882;background:#e6f2e9;border-radius:7px;padding:13px;margin-top:14px;color:#285f51;display:grid;gap:5px}
.measure-results span{font-size:12px;font-weight:800}
.measure-results strong{font-size:23px;font-variant-numeric:tabular-nums}
.measure-results p{font-size:14px;line-height:1.7;margin:0}
.density-controls .primary{width:100%;font-size:14px;line-height:1.5}
.subtle-button{background:#f2f8f3;color:#376859;border:1px solid #b3d1c1;border-radius:11px;width:100%;padding:11px 14px;margin:10px 0 0;font-size:14px;min-height:45px;font-weight:800}
.density-key-rule{background:linear-gradient(130deg,#fff6e5,#f8f4e9);border:2px solid #e4cc9a;border-radius:19px;padding:clamp(18px,3vw,28px);margin:19px 0}
.density-key-rule>span{font-size:12px;font-weight:900;color:#886026;letter-spacing:.1em}
.big-equation{font-size:clamp(23px,4.1vw,33px);font-weight:900;line-height:1.6;color:#755321;margin-top:13px}
.big-equation.example{font-size:clamp(17px,3vw,24px);color:#946b36}
.density-key-rule p{font-size:14px;line-height:1.85;margin:14px 0 0;color:#64553a}
.density-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:17px 0}
.density-facts article{background:white;border:1px solid #d6e6da;border-radius:13px;padding:14px;display:grid;gap:7px}
.density-facts strong{font-size:13px;color:#416758}
.density-facts span{font-size:clamp(16px,2.7vw,22px);font-weight:900;font-variant-numeric:tabular-nums;color:#276e5b}
.footer a{color:#286e5c;font-weight:800}
@media(max-width:390px){
 .hero-cube{width:60px;height:60px}
 .density-classroom .chapter{padding:19px 12px}
 .density-lab-group,.density-measure-group{padding:10px}
 .specimen-board,.cylinders{gap:7px}
 .specimen-card{padding:11px 5px}
 .specimen-name{font-size:12px}
 .density-facts{gap:7px}
 .density-facts article{padding:11px 9px}
 .graph-wrap{padding:5px}
 .scale-readout{width:97%}
 .scale-readout strong{font-size:18px}
 .density-key-rule{padding:14px}
}
@media(prefers-reduced-motion:reduce){.mass-fill,.cylinder .water{transition:none}}
