/* 2026-11-20: keep the nautical palette; make actions and evidence easy to read. */
:root{--ink:#173945;--paper:#fff8e8;--sea:#214e60;--focus:#976225}
button:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:4px;box-shadow:0 0 0 6px #fff9e9}
button:disabled{opacity:.6;cursor:not-allowed;filter:saturate(.55)}button[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor}
header{display:grid;grid-template-columns:minmax(240px,390px) 1fr auto;align-items:start;gap:20px}
header .brand{justify-self:center}header nav{display:flex;gap:8px}header .icon{width:54px;height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-family:SUIT,sans-serif}
header .icon small{font:700 14px/1.2 SUIT,sans-serif;letter-spacing:0}header .icon svg{width:23px;height:23px}
#objective{display:block;width:100%;text-align:left;border:0;border-top:1px solid #bba478;background:none;padding:8px 0 0;color:#214e60;font:700 17px/1.5 SUIT,sans-serif;white-space:normal}
.move-wrap small{font-size:13px;line-height:1.55}.companion small{font-size:13px}#save-status{font-size:12px;background:#173945e8;padding:4px 8px;border-radius:4px;text-shadow:none}
#progress-wrap{position:absolute;top:104px;right:26px;display:grid;gap:5px;background:#173945ed;border:1px solid #d9c38c;border-radius:7px;padding:8px 12px;color:#fff4d8;min-width:160px}
#chapter-progress{position:static;background:none;border:0;padding:0;font-size:14px}#voyage-progress{width:100%;height:5px;accent-color:#e4c27b;border:0}#voyage-progress::-webkit-progress-bar{background:#54717a;border-radius:9px}#voyage-progress::-webkit-progress-value{background:#efd08d;border-radius:9px}
#destination-distance{font-size:14px!important;line-height:1.5;color:#f7ecd3!important}#wayfinder{background:#173945f2!important}#wayfinder strong{font-size:17px;line-height:1.4;color:#fff9e8}
#near-label,#mission-label{max-width:min(320px,70vw);white-space:normal;line-height:1.5;font-size:15px;background:#173945f5;color:#fff8e5;text-shadow:none;padding:8px 13px;border:1px solid #e7cb8d;box-shadow:0 3px 14px #102e4145}
#toast{font-size:16px;line-height:1.6;background:#153b49f5;color:#fff8e8;max-width:min(620px,85vw);text-shadow:none}
.camera-tip{position:relative;background:#173945e8;color:#fff6dd;border:1px solid #c7b480;border-radius:5px;font-size:14px}.camera-tip summary{padding:11px;cursor:pointer;min-height:44px;box-sizing:border-box}.camera-tip p{position:absolute;right:0;bottom:100%;width:245px;background:#173945fa;padding:16px;line-height:1.7;border:1px solid #c7b480;border-radius:6px;margin:6px 0}
#guide p,#guide dt,#guide dd{font-size:17px;line-height:1.65}#guide .muted{color:#465b63}dialog .close{width:46px!important;height:46px!important;min-width:46px;min-height:46px;z-index:15;font-size:29px!important;background:#fff8e8f2!important;color:#214e60!important;right:max(10px,env(safe-area-inset-right));top:10px}
.route-stop small{font-size:16px!important;line-height:1.55!important;color:#45616b!important}.route-stop:disabled{opacity:.8}.route-stop.next-story{border:2px solid #327d79;background:#edf4e9}.route-stop.next-story strong:after{content:' · 다음 이야기';font-size:13px;color:#286760}.route-number{font-size:27px!important}.route-stop>span:last-child{font-size:14px}
.journal-island{border-top:1px solid #c8b890;margin:18px 0}.journal-island>summary{font-size:19px;font-weight:700;padding:18px 4px;cursor:pointer;color:#214e60}.journal-entry small{display:block;font-size:16px!important;line-height:1.8;color:#465c65;white-space:pre-line}.journal-entry p{font-size:17px;line-height:1.7}.journal-entry{padding:18px 12px!important}.journal-entry h3{line-height:1.5}
#receipt-proof{white-space:pre-line;font-size:20px;line-height:1.65;color:#173945;max-width:38ch}#receipt-next-name{font-size:17px;line-height:1.6}#receipt-stops{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0}#receipt-stops li{display:flex;flex-direction:column;align-items:flex-start;padding:10px;border:1px solid #cbbd9f;border-radius:5px;font-size:15px;line-height:1.5}
#workbench[open]{grid-template-columns:minmax(0,1fr) minmax(390px,1.05fr);height:min(880px,calc(100dvh - 24px));overflow:hidden;align-items:stretch}
#workbench .desk-scene,#workbench .desk-panel{overflow:auto;min-height:0;scrollbar-gutter:stable}#workbench .desk-panel{padding:26px 26px 0;background:#fff9ed}#workbench .desk-title{padding:25px 24px 15px}#workbench .desk-title h2{font-size:28px;line-height:1.4;max-width:100%}
#workbench .desk-panel>footer{position:sticky;bottom:0;z-index:5;background:#fff9edf8;border-top:1px solid #c7b991;padding:14px 0 max(14px,env(safe-area-inset-bottom));margin-top:22px;display:flex;flex-wrap:wrap;gap:10px;box-shadow:0 -8px 14px #fff9edcc}#workbench footer button{min-height:48px;font-size:16px;flex:1 1 auto}#workbench footer .primary{flex-grow:2}#workbench footer .text-button{background:#f3ead4}
.lesson-step{display:flex;flex-wrap:wrap;gap:7px;font-size:14px!important;margin:24px 0 12px!important}.lesson-step span{padding:6px 9px;background:#e9e1cf;color:#52636a;border-radius:4px}.lesson-step .current{background:#214e60;color:#fff8e8;font-weight:800}.lesson-action{color:#325a65;font-size:17px;line-height:1.55;font-weight:700;margin:0 0 20px}
#workbench #work-story{font-size:18px;line-height:1.75;margin:16px 0 20px}#work-story>span{display:block;margin-bottom:8px}#lesson-observe{padding:17px;background:#f2eddd;border-color:#b4aa8b}#lesson-observe p,#extra-step>p{font-size:18px;line-height:1.65;margin-bottom:14px}
.lesson-choices .choice{font-size:17px;line-height:1.55;padding:11px 14px;min-height:48px;text-align:left}.lesson-choices .choice[aria-pressed=true]:before{content:'✓ ';font-weight:900}.lesson-choices .choice[aria-pressed=true]{background:#235665;color:#fff9e8}
#source-ratio{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#source-ratio span:nth-child(odd){padding:7px 10px;border-bottom:2px solid #b2955e;background:#f0e8d4;font-size:18px}#source-caption{font-size:14px!important;line-height:1.5}#workbench .specification{margin-top:18px}
#workbench #answer-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}#workbench .quantity{min-width:0;display:grid;grid-template-columns:1fr;align-content:start;gap:7px}#workbench .quantity>label{font-size:17px;line-height:1.5;min-height:3em;word-break:keep-all;overflow-wrap:anywhere}#workbench .quantity>input{font-size:27px;min-height:56px;font-variant-numeric:tabular-nums}#workbench .quantity .answer-format{font-size:13px;line-height:1.5;color:#53656a;grid-column:1/-1}.entry-help{display:block;font-size:13px;line-height:1.6;color:#52646a;margin:12px 0}
#workbench .fraction-entry{position:relative}#workbench .fraction-key{position:static;justify-self:end;grid-column:1;min-width:44px;height:44px;font-size:22px;margin-top:-4px}#workbench input[aria-invalid=true]{border:2px solid #ad532f;background:#fff6ee}
#workbench #hint-text{font-size:18px;line-height:1.75;background:#f1eddb;border-left:4px solid #9b814a;padding:16px;color:#334d53}#workbench #feedback{font-size:17px;line-height:1.65;padding:13px 15px;min-height:3.3em;border:1px solid #c6b68d;border-left:4px solid #b58948;background:#faf0da;white-space:pre-line;color:#60491e;margin:18px 0 12px}#workbench #feedback.success{border-color:#57988a;background:#e9f3e9;color:#255d50}#feedback.success:before{content:'✓ ';font-weight:900}
#workbench .lesson-illustration{margin:0 24px 18px;position:relative}#workbench .lesson-illustration img{display:block;width:100%;height:auto!important;max-height:none;aspect-ratio:3/2;object-fit:contain!important;border-radius:6px;background:#dfd8c6}#workbench .lesson-illustration figcaption{font-size:14px;line-height:1.6;color:#4c5e64;padding:9px 0}#workbench .art-zoom{font-size:14px;min-height:44px;position:static;margin:3px 0 0}#visual-caption{font-size:14px!important;line-height:1.6!important;padding:0 24px;position:static!important}#lesson-visual{padding:16px 24px 26px!important}
.lesson-data{font-size:17px;line-height:1.7;grid-template-columns:minmax(100px,.8fr) 1.5fr;border-color:#bfb392}.lesson-data dt,.lesson-data dd{padding:12px 14px}.lesson-data dt:nth-of-type(even),.lesson-data dd:nth-of-type(even){background:#f1ecdd}.lesson-data dd{color:#203e4b}.unit-value{white-space:nowrap;font-variant-numeric:tabular-nums}
.concept-diagram,.price-diagram{margin:20px 0;padding:17px;background:#fffaf0;border:1px solid #c5b692;border-radius:7px}.concept-diagram h3,.price-diagram h3{font-size:17px;margin:0 0 15px;color:#245567}.concept-diagram p,.price-diagram p{font-size:16px;line-height:1.65}.count-row{margin:16px 0}.count-row strong{font-size:15px;line-height:1.5;display:block;margin-bottom:10px}.count-cells{display:flex;flex-wrap:wrap;gap:5px;padding:7px;border:2px solid #8d9f9b;border-radius:6px}.count-cells span{width:28px;height:32px;display:grid;place-items:center;background:#244e64;color:#fff7df;font:700 14px SUIT;border:1px dashed #efe0af}.count-cells .colored{background:#aa5d17}.count-cells .ring{border:0;background:none;color:#835b2c;font-size:38px}.blue-reference .count-cells{border-color:transparent}.blue-reference .count-cells span:not(.colored){outline:2px solid #267b88;outline-offset:1px}.blue-reference .colored{opacity:.55}.relation-sentence{padding:9px;background:#eee4ca}.relation-sentence b{color:#975318}.relation-sentence strong{color:#234f6b}.relation-order{display:flex;justify-content:space-around;gap:10px;text-align:center;align-items:center;font-size:15px;line-height:1.7}.number-line{display:flex;justify-content:space-between;border-top:2px solid #3d665f;padding-top:5px}.unit-bridge{display:grid;gap:12px;text-align:center;font-size:18px;line-height:1.5}.unit-bridge span{font-size:16px}.percent-ladder{padding-left:25px;font-size:17px;line-height:1.7}.percent-ladder li{padding:6px 0}.energy-base{display:block;font-size:17px;background:#e1ece7;padding:12px}.energy-parts{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:16px 0;font-size:15px;text-align:center;line-height:1.7}.energy-parts b{white-space:nowrap}.price-row{margin:16px 0;font-size:15px;line-height:1.6}.price-bar{display:flex;width:100%;margin-top:8px;min-height:64px;background:#e9cf96;border:1px solid #9d875e}.price-bar span{display:grid;place-content:center;padding:7px;box-sizing:border-box;font-size:14px;color:#493b1f}.price-bar span:first-child{background:#b9d4cf;color:#173f4a;flex-shrink:0}.judgment-evidence{border:1px solid #8faea2;background:#edf4eb;padding:12px;margin-bottom:15px}.judgment-evidence p{font-size:16px;line-height:1.6;margin:6px 0}.judgment-evidence p:not(:first-child){display:flex;justify-content:space-between;gap:12px}.judgment-evidence strong{font-size:22px;white-space:nowrap}#extra-step textarea{font-size:18px;line-height:1.65;padding:12px;box-sizing:border-box}#extra-step label{font-size:17px;line-height:1.65}#extra-step small{font-size:14px;line-height:1.6}.lesson-rectangles{gap:24px}.lesson-rectangles div{font-size:14px;min-width:56px}
@media(max-width:1050px){header{grid-template-columns:minmax(220px,360px) auto;gap:12px}header .brand{display:none}header nav{justify-self:end}#workbench .desk-panel{padding:24px 20px 0}#workbench .desk-title h2{font-size:25px}}
@media(max-width:900px){#workbench[open]{display:block;height:auto;max-height:calc(100dvh - 20px);overflow:auto}#workbench .desk-scene,#workbench .desk-panel{overflow:visible;scrollbar-gutter:auto}#workbench .desk-panel{padding:20px 22px 0}#workbench .desk-panel>footer{bottom:-1px}.lesson-illustration{max-width:620px;margin-inline:auto!important}.lesson-step{margin-top:0!important}#receipt-stops{grid-template-columns:1fr}#receipt-stops li{flex-direction:row;align-items:center}}
@media(max-width:600px){header{grid-template-columns:1fr auto;gap:8px;padding:12px!important}header .location{max-width:none;padding:9px 12px!important}header .location h1{font-size:22px!important}header .location .eyebrow{font-size:10px}header nav{display:grid;grid-template-columns:repeat(2,44px);gap:5px}header .icon{width:44px;height:48px;gap:0}header .icon small{font-size:12px}header .icon svg{width:18px;height:18px}#objective{font-size:15px;line-height:1.45}#progress-wrap{right:14px;top:125px;min-width:118px;padding:6px 8px}#chapter-progress{font-size:12px}#camera-tools{gap:5px!important;max-width:calc(100vw - 24px)}#camera-tools button{font-size:12px;min-height:44px}.camera-tip{display:none}#workbench #answer-controls{grid-template-columns:1fr}#workbench .quantity>label{min-height:0}#workbench .desk-title h2{font-size:24px;padding-right:24px}#workbench .desk-title{padding:24px 20px 12px}#workbench .desk-panel{padding:20px 18px 0}#lesson-visual{padding:16px 18px 24px!important}#workbench .lesson-illustration{margin:0 18px 15px!important}#workbench .lesson-step{font-size:12px!important;gap:5px}.lesson-data{grid-template-columns:minmax(78px,.65fr) 1.4fr}.lesson-data dt,.lesson-data dd{padding:10px}.route-stop{padding:14px 10px!important}.route-number{width:34px!important;min-width:34px!important}.route-stop small{font-size:15px!important}.move-wrap small{display:none}#save-status{font-size:11px}#wayfinder strong{font-size:15px}#destination-distance{font-size:13px!important}.energy-parts{font-size:13px}#toast{font-size:15px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#workbench .lesson-illustration figcaption{position:static!important;background:none!important;inset:auto!important;text-shadow:none!important;width:auto!important}#workbench .lesson-illustration:after{display:none!important}#workbench .lesson-illustration img{filter:none!important;opacity:1!important}

@media(min-width:901px){#workbench.has-illustration .desk-scene,#workbench.has-illustration .desk-panel{align-self:stretch;position:static;height:100%;box-sizing:border-box}#workbench.has-illustration .lesson-illustration>img{max-height:none}}

.fraction-strip .count-cells{display:grid;grid-template-columns:repeat(5,1fr)}.fraction-strip .count-cells span{width:auto;height:44px}

#workbench #extra-step .judgment-evidence p:not(:first-child){display:flex;align-items:baseline;justify-content:space-between;gap:12px}

@media(max-width:600px){#progress-wrap{top:208px;right:15px}#toast{top:auto;bottom:225px;left:50%;transform:translateX(-50%);width:max-content;box-sizing:border-box}}

/* Existing Scenario paper asset, subdued below the reading surface. */
#workbench .desk-scene{background-image:linear-gradient(#e9dfc8bb,#eee5d1bb),url('./assets/scenario-paper-fiber.webp');background-size:auto,512px}#workbench .desk-panel,#journal{background-image:linear-gradient(#fff9ede8,#fff9ede8),url('./assets/scenario-paper-fiber.webp');background-size:auto,512px}
