/* Step 4-1: shared editorial and touch design system. No generic nested-card template. */
:root{--g-ink:#24383d;--g-teal:#176673;--g-focus:#bb781e;--g-bg:#f7f8f5;--g-line:#cbd6d1;font-family:Pretendard,'Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;font-synthesis:none}
button,a,select{touch-action:manipulation}
:where(button,a,select,[tabindex]):focus-visible{outline:3px solid #bf812c!important;outline-offset:3px}
:where(button,a){-webkit-tap-highlight-color:rgba(23,102,115,.17)}
:where(p,h1,h2,h3){overflow-wrap:break-word}
/* Classroom: one instruction region; secondary actions appear on request. */
.sim-shell{color:var(--g-ink)}
.sim-header{min-height:58px;gap:12px}
.experiment-heading{top:15px;z-index:5}
.experiment-heading h1{font-size:clamp(21px,2.15vw,30px);line-height:1.18;letter-spacing:-.035em}
.experiment-heading p{margin:6px 0 0 0;max-width:590px;line-height:1.4}
.lesson-guide{position:absolute;top:93px;left:clamp(15px,2.3vw,34px);z-index:7;width:min(490px,calc(100% - 425px));max-width:490px;min-width:290px;display:flex;flex-direction:column;gap:8px;color:#20383e;pointer-events:auto;background:rgba(250,252,249,.94);border:1px solid #cbdad4;border-left:4px solid #176673;padding:12px 15px 12px;border-radius:5px;box-shadow:0 5px 14px rgba(28,48,46,.08)}
.guide-copy{display:flex;align-items:flex-start;gap:12px}
.guide-index{font-size:12px;font-weight:800;white-space:nowrap;color:#176673;background:#e4f0ea;padding:5px 7px;min-width:44px;text-align:center}
.guide-message{flex:1;min-width:0}
.guide-message strong{display:block;font-size:clamp(15px,1.5vw,18px);line-height:1.25;letter-spacing:-.02em}
.guide-message p{font-size:clamp(12px,1vw,14px);color:#52666a;margin:5px 0 0;line-height:1.45}
.guide-actions{display:flex;gap:8px;align-items:center;margin-left:56px}
.guide-primary{display:inline-flex;align-items:center;justify-content:space-between;gap:13px;min-height:43px;background:#176673;color:white;border:1px solid #176673;border-radius:4px;padding:0 13px;font-size:13px;font-weight:750;cursor:pointer}
.guide-primary:disabled{background:#a3b4b2;border-color:#a3b4b2;cursor:not-allowed}
.guide-more{min-height:43px;background:transparent;color:#315c61;border:1px solid #aebfb9;border-radius:4px;padding:0 12px;font-size:13px;font-weight:700;cursor:pointer}
.guide-feedback{margin:0 0 0 56px;font-size:12px;line-height:1.35;color:#326453}
.guide-feedback:empty{display:none}
.lesson-steps{margin:0;display:flex;flex-wrap:wrap;gap:7px;list-style:none;padding:0}
.lesson-steps li{font-size:12px;color:#55716e;border-bottom:2px solid #d4e2db;padding:4px 1px}
.lesson-steps li.current{color:#176673;border-color:#176673;font-weight:800}
/* Weather is a condition, not a clickable second simulation in 8th lesson. */
.weather-switch{top:94px;right:clamp(16px,2.4vw,36px);padding:8px 11px;gap:4px;box-shadow:none;background:rgba(249,251,249,.94)}
.weather-caption{display:flex;flex-direction:column;align-items:flex-start;gap:3px;font-size:11px;margin:0}
.weather-caption small{font-size:15px;color:#1f535b;font-weight:800}
.weather-choice:disabled{display:none}
.weather-explain{font-size:11px;line-height:1.25;max-width:165px;color:#607679}
.plan-tools{display:none;top:155px;right:clamp(16px,2.4vw,36px);z-index:9;background:#fff;border:1px solid #cbd7d1;padding:14px;border-radius:5px;box-shadow:0 10px 32px rgba(28,44,44,.17);max-width:370px;align-items:stretch;gap:11px}
.plan-tools.is-open{display:flex}
.plan-buttons,.phase-tools{flex-wrap:wrap}
.plan-tools .plan-summary,.plan-tools .plan-status{text-align:left;background:transparent;padding:0;line-height:1.45}
.plan-eyebrow{font-size:12px;color:#48676c}
.scene-art{inset:85px 0 2px}
.experiment-dock{bottom:12px;left:clamp(12px,2vw,30px);padding:8px 10px;max-width:calc(100% - 24px);backdrop-filter:blur(5px)}
.switch-state{font-size:11px;color:#416f62;font-weight:700}
.switch-chip[aria-pressed='false'] .switch-state{color:#88584c}
.switch-chip,.blind-chip,.reset-control{min-height:44px}
.analysis-bar{padding:0 clamp(13px,2.6vw,36px);gap:14px}
.readout{gap:4px}
.reading{padding:0 clamp(6px,1.3vw,21px);gap:7px}
.result-explanation{font-size:12px;color:#617875;max-width:185px;line-height:1.4}
.comparison-lead{margin:7px 0 0;color:#587276;font-size:14px}
.comparison-setting{color:#506a70;font-size:13px;line-height:1.45;min-height:20px;margin:0 0 6px}
.comparison-insight{border-top:1px solid #c9d8d2;margin-top:14px;padding-top:12px;font-size:14px;color:#33595f}
.comparison-insight strong{font-size:13px}.comparison-insight p{margin:4px 0;line-height:1.5}
.comparison-dialog{max-height:calc(100dvh - 16px);overscroll-behavior:contain}
/* 6/7 lessons have no weather control and no save widgets. */
.sim-shell[data-lesson='6'] .weather-switch,.sim-shell[data-lesson='7'] .weather-switch{display:none}
.sim-shell[data-lesson='6'] .guide-actions,.sim-shell[data-lesson='7'] .guide-actions{display:none}
.sim-shell[data-lesson='9'] .guide-more{display:none}
.sim-shell[data-lesson='9'] .lesson-guide{width:min(490px,calc(100% - 45px))}
/* Printing and rooftop lessons share readable feedback without extra cards. */
.mini-steps,.solar-progress{display:flex;flex-wrap:wrap;gap:9px;margin:13px 0 8px}
.mini-steps>span,.solar-progress>span{display:inline-flex;gap:5px;align-items:center;font-size:12px;font-weight:600;line-height:1.3;color:#758787;padding:5px 0;border-bottom:2px solid #d4dfdc}
.mini-steps>span b,.solar-progress>span b{font-size:11px;font-weight:800}
.mini-steps>span.is-current,.solar-progress>span.is-current{color:#176673;border-bottom-color:#176673}
.next-action,.roof-next-action{font-size:14px;line-height:1.55;font-weight:700;color:#1d5861;margin:10px 0 14px;padding-left:10px;border-left:3px solid #176673}
.result-insight{display:block;font-size:13px;line-height:1.45;color:#31645c;margin-top:6px}
.materials-shell button,.roof-shell button{min-height:44px}
/* Compact tablets: control column can scroll, visualization remains prominent. */
@media(max-width:1150px){.lesson-guide{top:93px;width:min(450px,calc(100% - 260px));min-width:260px}.guide-message strong{font-size:15px}.guide-message p{font-size:12px}.weather-switch{top:96px}.weather-explain{max-width:104px}.result-explanation{display:none}.scene-art{inset:91px 0 1px}}
@media(max-width:820px){.lesson-guide{top:94px;width:min(460px,calc(100% - 30px));max-width:460px;min-width:0;left:15px;padding:9px 11px}.weather-switch{top:auto;bottom:75px;right:14px}.guide-actions{margin-left:0}.guide-feedback{margin-left:0}.experiment-heading p{max-width:480px}.scene-art{inset:100px -15px 0}.experiment-dock{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;gap:7px}.dock-set{flex-shrink:0}.analysis-bar{gap:7px}.reading-label{font-size:11px}.reading strong{font-size:13px}.comparison-dialog{padding:13px}.comparison-scene{max-height:190px}.comparison-readout{gap:3px}}
@media(max-width:600px){.identity-main{font-size:14px}.lesson-guide{top:87px;width:calc(100% - 30px)}.experiment-heading h1{font-size:19px}.experiment-heading p{display:none}.guide-copy{gap:7px}.guide-index{min-width:33px;padding:4px}.lesson-steps{gap:3px}.lesson-steps li{font-size:10px}.weather-switch{bottom:80px}.scene-art{inset:119px -70px 0}.sim-shell{grid-template-rows:56px minmax(0,1fr) 92px}.comparison-scenes{grid-template-columns:1fr}}
@media(max-height:690px) and (min-width:750px){.lesson-guide{top:65px;padding:8px 12px}.guide-message p{display:none}.guide-actions{margin-left:0}.weather-switch{top:69px}.scene-art{inset:69px 0 0}.experiment-heading p{display:none}.sim-shell{grid-template-rows:56px minmax(0,1fr) 64px}.experiment-dock{bottom:5px;padding:5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* 5-1/5-2: compact 1024×768 material-room workflow without hiding controls. */
@media (min-width:761px) and (max-width:1100px) and (max-height:800px){
 .materials-shell .material-header{min-height:50px}
 .materials-shell .materials-main{padding:7px 18px 5px}
 .materials-shell .heading-line{margin-bottom:7px}
 .materials-shell .section-mark{margin-bottom:3px}
 .materials-shell h1{font-size:27px}
 .materials-shell .experiment-layout{min-height:440px}
 .materials-shell .experiment-controls{padding:10px 14px 7px}
 .materials-shell .experiment-controls h2{font-size:20px;line-height:1.22;margin:3px 0 3px}
 .materials-shell .mission-copy{font-size:12px;line-height:1.4;margin-bottom:7px}
 .materials-shell .mini-steps{margin:6px 0 4px}
 .materials-shell .mini-steps>span{padding:2px 0;font-size:11px}
 .materials-shell .next-action{font-size:12px;line-height:1.35;margin:6px 0 8px;padding-left:8px}
 .materials-shell .job-summary{padding:7px 0 8px}
 .materials-shell .job-summary strong{font-size:18px}
 .materials-shell .method-picker{margin-top:8px}
 .materials-shell .picker-label{margin-bottom:4px}
 .materials-shell .method-picker button{min-height:50px;margin-bottom:4px;padding:4px 9px;gap:9px}
 .materials-shell .method-picker button[aria-pressed="true"]{padding:3px 8px}
 .materials-shell .method-picker button svg{height:29px;width:29px}
 .materials-shell .control-actions{padding-top:4px;gap:5px}
 .materials-shell .control-actions button{min-height:44px;padding:6px 10px}
 .materials-shell .progress-note{font-size:11px;min-height:15px;margin:4px 0 0}
 .materials-shell .material-footer{min-height:30px}
}

/* 5-5/5-6: tap any of 16 independent desks to inspect its virtual 4×3 zone. */
.desk-mission{margin:2px 0 0 46px!important;font-size:12px!important;line-height:1.3!important;font-weight:650;color:#28646b!important}
.desk-inspector{position:absolute;z-index:8;right:clamp(12px,2.4vw,34px);bottom:clamp(77px,11vh,102px);width:min(246px,calc(100% - 28px));background:rgba(254,255,251,.97);border:1px solid #c8d7d0;border-top:3px solid #1f7774;border-radius:6px;box-shadow:0 6px 20px #1e38372a;padding:11px 13px;color:#243f43;pointer-events:auto}
.desk-inspector[hidden]{display:none}
.desk-inspector-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:730;color:#526970;gap:6px}
.desk-inspector-head button{width:30px;height:30px;border:0;background:transparent;font:inherit;font-size:24px;cursor:pointer;color:#5c7172}
.desk-inspector>strong{display:block;font-size:20px;margin:1px 0 3px;letter-spacing:-.6px;color:#22634f}
.desk-inspector>strong[data-status=warning]{color:#a5532e}
.desk-inspector>p{margin:2px 0 6px;font-size:13px;line-height:1.35}
.desk-inspector>small{display:block;font-size:11px;line-height:1.35;color:#60777b}
.desk-inspector .desk-inspector-caveat{margin-top:6px;color:#849292;font-size:10px}
.scene-art .desk-hotspot{outline:none}
.scene-art .desk-hotspot .svg-hit-area{pointer-events:all;fill:transparent;stroke:transparent;stroke-width:2px;cursor:pointer}
.scene-art .desk-hotspot:hover .svg-hit-area{fill:#e2bb6124;stroke:#21737a;stroke-width:2.5px}
.scene-art .desk-hotspot.selected .svg-hit-area{fill:#eed88724;stroke:#d29a36;stroke-width:3px}
.scene-art .desk-hotspot:focus-visible .svg-hit-area{stroke:#1f7774;stroke-width:4px}
@media(min-width:821px) and (max-width:1150px){.desk-inspector{right:10px;bottom:87px;width:216px;padding:8px 10px}.desk-inspector>strong{font-size:17px}}
@media(max-width:820px){.desk-inspector{right:8px;bottom:91px;width:210px;padding:8px 10px}.desk-mission{font-size:11px!important;margin-left:4px!important}}

/* Step 5-7: optional A/B exploration without another panel. */
.trial-action{min-height:43px;border:1px solid #9cbaae;border-radius:4px;padding:0 9px;background:#e8f1eb;color:#235861;font-size:12px;font-weight:750;white-space:nowrap;cursor:pointer}
.trial-action[data-ready="true"]{border-color:#176673;background:#daeae4;color:#18575e}
.sim-shell:not([data-lesson="8"]) #trial-action,.sim-shell:not([data-lesson="8"]) #compare-trial{display:none}
.comparison-question{font-weight:750;color:#2f6861;font-size:14px}
.trial-refresh{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;border-top:1px solid #d6e1db;padding-top:10px;font-size:12px;color:#5e7774}
.trial-refresh[hidden]{display:none}
.trial-refresh button{background:#f4f8f5;color:#225963;border:1px solid #98b5ac;border-radius:4px;padding:10px 12px;font:inherit;font-weight:750;cursor:pointer}
@media(max-width:1150px){.guide-actions{margin-left:0;gap:5px}.guide-primary{padding:0 9px;font-size:12px}.guide-more{padding:0 8px;font-size:12px}.trial-action{padding:0 7px;font-size:11px}}
@media(max-width:730px){.guide-actions{flex-wrap:wrap}.trial-action,.guide-more{min-height:38px}}

/* Step 6-3 / 6-4: direct blind handles and optional seat brightness marks. */
.blind-drag-grip{cursor:ns-resize;outline:none;touch-action:none;user-select:none}
.blind-drag-grip .blind-grip-body{fill:#f9fbf6;stroke:#286c70;stroke-width:2;filter:drop-shadow(0 2px 2px #273b3e3d)}
.blind-drag-grip .blind-grip-ridge{stroke:#286c70;stroke-width:2;stroke-linecap:round}
.blind-drag-grip.dragging .blind-grip-body,.blind-drag-grip:hover .blind-grip-body,.blind-drag-grip:focus-visible .blind-grip-body{fill:#d7eee4;stroke:#bc6b32;stroke-width:3}
.desk-visual-toggle{height:42px;padding:0 11px;flex-shrink:0;white-space:nowrap;background:#f6f9f6;color:#28646a;border:1px solid #9ab6ad;border-radius:5px;font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.desk-visual-toggle[aria-pressed=true]{color:white;background:#28646a}
.desk-visual-toggle:focus-visible{outline:3px solid #e4af4e;outline-offset:2px}
.dock-hint{font-size:10px;font-weight:500;opacity:.78;margin-left:2px}
.scene-art .desk-brightness-marker{display:none;pointer-events:none}
.scene-art.show-desk-status .desk-brightness-marker{display:block}
.scene-art .desk-badge-disc{fill:#e9f6ea;stroke:#237759;stroke-width:2}
.scene-art .desk-badge-symbol{fill:#185c41;font-size:16px;font-weight:900}
.scene-art [data-brightness=dim] .desk-badge-disc{fill:#fff0e6;stroke:#a75c34}
.scene-art [data-brightness=dim] .desk-badge-symbol{fill:#944421}
.scene-art [data-change=up] .desk-badge-disc{stroke:#217cbd;stroke-width:3}
.scene-art [data-change=down] .desk-badge-disc{stroke:#a36627;stroke-width:3}
@media(max-width:820px){.dock-hint{display:none}.desk-visual-toggle{height:40px;padding:0 7px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.scene-art .blind-drag-grip,.scene-art .desk-brightness-marker{transition:none!important}}
/* Keep blind handles visible in lesson 7, without a large instruction card covering the windows. */
.sim-shell[data-lesson="7"] .lesson-guide{left:auto;right:clamp(12px,2.3vw,30px);width:min(385px,calc(100% - 30px))}
/* Lesson 9 stays read-only; its only scene control is the visual inspection overlay. */
.sim-shell[data-lesson="9"] .experiment-dock{display:flex;justify-content:flex-end;width:auto;left:auto;right:clamp(12px,2.3vw,30px)}
.sim-shell[data-lesson="9"] .experiment-dock .dock-set,
.sim-shell[data-lesson="9"] .experiment-dock .dock-divider,
.sim-shell[data-lesson="9"] .experiment-dock .reset-control{display:none!important}
@media(max-width:820px){.sim-shell[data-lesson="7"] .lesson-guide{right:12px;left:auto;width:min(330px,calc(100% - 24px))}}


/* Step 6-5: the existing bottom results become a picture-based three-criteria strip. */
.sim-shell[data-lesson="8"] .reading{position:relative;align-items:center;gap:6px}
.visual-bright-spots,.visual-light-spots{display:none;align-items:center;gap:3px;white-space:nowrap}
.sim-shell[data-lesson="8"] .visual-bright-spots,
.sim-shell[data-lesson="8"] .visual-light-spots{display:inline-flex}
.visual-bright-spots i{display:inline-block;width:7px;height:13px;border-radius:2px;background:#38836c}
.visual-bright-spots i.spot-dim{background:#d7a07a}
.visual-light-spots i{width:14px;height:14px;display:inline-block;border-radius:50%;background:#d7aa53;box-shadow:inset 0 0 0 2px #ffffff80}
.visual-light-spots i.light-off{background:#a8b6b8}
.visual-glare{display:none;font-size:19px;font-weight:750;color:#23785d}
.sim-shell[data-lesson="8"] .visual-glare{display:inline-block}
.visual-glare[data-warning="true"]{color:#b16b33}
/* Small unobtrusive cue that the same switches are carried into cloudy weather. */
.weather-reveal{position:absolute;z-index:8;right:clamp(14px,3vw,46px);top:160px;display:flex;flex-direction:column;gap:3px;padding:11px 16px;background:#e9f3f5f2;border:1px solid #b3cdd1;border-left:4px solid #407d90;border-radius:5px;color:#275166;box-shadow:0 6px 20px #173c4920;pointer-events:none}
.weather-reveal[hidden]{display:none}
.weather-reveal>span{font-size:25px;line-height:1}
.weather-reveal>strong{font-size:15px}
.weather-reveal>small{font-size:12px}
.play-area.weather-just-changed::after{content:'';position:absolute;z-index:3;inset:14% 0 9%;background:linear-gradient(110deg,transparent 5%,#c1d4df45 38%,#9fb9c763 53%,transparent 85%);pointer-events:none;animation:cloud-pass 1.25s ease both}
@keyframes cloud-pass{from{transform:translateX(-115%);opacity:0}25%{opacity:1}to{transform:translateX(115%);opacity:0}}
/* Colored zones in the 'after' scene alone show where relative brightness changed. */
.comparison-map-change{stroke-width:3;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.comparison-map-change.change-up{fill:#4fb18c55;stroke:#27816d}
.comparison-map-change.change-down{fill:#dc956c55;stroke:#b36a40}
.comparison-changes{font-size:13px;font-weight:750;color:#2c6366;margin:10px 0 8px;padding:0 0 0 9px;border-left:3px solid #68a29b}
.comparison-map-key{display:flex;gap:16px;align-items:center;flex-wrap:wrap;font-size:12px;color:#395b5b;margin:8px 0 0}
.comparison-map-key[hidden]{display:none}
.comparison-map-key span{display:inline-flex;align-items:center;gap:6px}
.comparison-map-key i{display:inline-block;width:13px;height:13px;border-radius:3px;border:2px solid transparent}
.comparison-map-key .key-up{background:#4fb18c55;border-color:#27816d}
.comparison-map-key .key-down{background:#dc956c55;border-color:#b36a40}
.map-key-note{opacity:.74}
.comparison-tabs{flex-wrap:wrap}
@media(max-width:1150px){.sim-shell[data-lesson="8"] .reading{flex-wrap:wrap;gap:3px}.visual-bright-spots i{width:5px;height:10px}.visual-light-spots i{width:10px;height:10px}.weather-reveal{right:12px;top:168px;padding:8px 10px}.weather-reveal>strong{font-size:12px}.map-key-note{display:none}}
@media(max-width:700px){.sim-shell[data-lesson="8"] .visual-bright-spots{display:none}.weather-reveal{top:auto;bottom:116px}}
@media(prefers-reduced-motion:reduce){.play-area.weather-just-changed::after{animation:none;display:none}}

.weather-compare-short{display:inline-flex;align-items:center;justify-content:center;border:1px solid #81adb2;color:#1d5766;background:#e7f3f5;padding:7px 9px;border-radius:4px;font-size:12px;font-weight:750;margin-top:5px;white-space:nowrap;cursor:pointer}
.weather-compare-short[hidden]{display:none}
