.chapter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.chapter-card{background:#fffcf2;border:1px solid #d7dfcb;border-radius:16px;padding:25px;display:flex;flex-direction:column;gap:12px}.chapter-card small{color:#967744;letter-spacing:2px;font-size:10px}.chapter-card h3{font:28px Georgia,serif;margin:5px 0;color:#244d3d}.chapter-card p{font-size:13px;line-height:1.65;color:#667560}.chapter-card button{margin-top:auto}.learning-figure{margin:20px 0;background:#fffdf4;border:1px solid #d4dccb;border-radius:13px;padding:10px}.learning-figure img{display:block;width:100%;max-height:520px;object-fit:contain;border-radius:8px}.learning-figure figcaption{font-size:11px;line-height:1.5;color:#78846e;margin:9px 5px}.learning-figure:has(img[src*="klima-"]){max-width:500px;margin:15px auto}.learning-figure:has(img[src*="klima-"]) img{max-height:430px}.map-comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px}.map-comparison figure{margin:0}.map-comparison img{max-height:none}.desert-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.desert-gallery figure{margin:10px 0}.desert-gallery img{aspect-ratio:16/10;object-fit:cover}.choices button.selected{background:#cfdfc3;border:2px solid #65874e}.choices label{display:flex;flex-direction:column;gap:10px;color:#496047}.choices input{width:100%;padding:15px;border:2px solid #b4c6a2;border-radius:10px;background:#fffdf5;color:#244538;font:20px Segoe UI,sans-serif}.picture-scroll{overflow:auto;border:1px solid #d5dfcc;border-radius:14px;background:#f5f1e5}.picture-canvas{position:relative;min-width:760px;width:100%;line-height:0}.picture-canvas>img{width:100%;height:auto;display:block}.picture-drop{position:absolute;transform:translate(-50%,-50%);width:122px;min-height:44px;padding:6px;border:2px dashed #72916a;border-radius:8px;background:#fff9e6ee;font-size:10px;line-height:1.2;color:#38533d;box-shadow:0 2px 8px #244e3214}.picture-drop.filled{background:#e2edcff5;border:2px solid #7f9e69}.picture-drop:disabled{opacity:1}.picture-bank{display:flex;flex-wrap:wrap;gap:9px;margin:15px 0}.picture-bank button{flex:1 1 150px;min-height:46px;padding:11px;font-size:12px}.picture-bank .placed{background:#e0e8d3;color:#5b7050}.picture-bank .selected{background:#eddaa4;border:2px solid #a58238}.chapter-marker{border-color:#8b72ad;background:#f4edffef;color:#51416b}#chaptersBtn{order:-1}#panel section{width:min(1050px,95vw)}
@media(max-width:850px){.chapter-grid{grid-template-columns:1fr}.chapter-card{padding:20px}.chapter-card h3{font-size:25px}.map-comparison{grid-template-columns:1fr}.desert-gallery{grid-template-columns:1fr}.desert-gallery img{max-height:220px}nav button{padding:10px 9px;font-size:11px}nav span{margin-left:3px}.brand{font-size:27px}#missionTracker{width:225px}#panel section{padding:22px}.picture-canvas{min-width:780px}.learning-figure img{max-height:420px}}
@media(max-width:570px){header{inset:10px 9px auto}.brand{font-size:22px;letter-spacing:3px}.brand small{font-size:6px;letter-spacing:1px}nav button{font-size:10px;padding:10px 6px}nav span{width:16px;height:16px;font-size:9px}#chaptersBtn{padding:10px 5px}.chapter-card h3{font-size:23px}.picture-bank button{flex:1 1 120px}.learning-figure{padding:5px}}

/* Keep the word bank visible beside the actual illustration while dragging. */
.picture-board{display:grid;grid-template-columns:180px minmax(0,1fr);gap:13px;align-items:start}.picture-board .picture-bank{grid-column:1;grid-row:1;flex-direction:column;flex-wrap:nowrap;position:sticky;top:10px;max-height:70vh;overflow:auto;margin:0;padding:2px}.picture-board .picture-bank button{flex:0 0 auto;min-height:44px}.picture-board .picture-scroll{grid-column:2;grid-row:1}.picture-canvas{min-width:680px}.picture-drop{width:112px;font-size:10px}
@media(max-width:850px){.picture-board{display:flex;flex-direction:column}.picture-board .picture-bank{order:-1;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;max-height:180px;position:sticky;top:0;z-index:3;background:#f3f0e6;padding:8px 2px}.picture-board .picture-bank button{flex:1 1 125px;min-height:44px;font-size:11px}.picture-board .picture-scroll{width:100%}.picture-canvas{min-width:780px}}

/* Bounded, scroll-free desert exercise; other image quests keep their layout. */
#panel.fit-desert section{width:min(1180px,97vw);height:calc(100dvh - 24px);max-height:none;overflow:hidden;padding:18px 24px;display:flex;flex-direction:column}
#panel.fit-desert section:before{padding-bottom:7px;margin-bottom:7px;font-size:7px}
.fit-desert #panelTitle{font-size:27px;margin:5px 0 8px}.fit-desert #panelBody{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}
.fit-desert #panelBody>.lead{font-size:14px;line-height:1.4;margin:0}
.fit-desert .picture-board{flex:1;min-height:0;display:grid;grid-template-columns:160px minmax(0,1fr);gap:16px;align-items:stretch}
.fit-desert .picture-board .picture-bank{position:static;max-height:none;overflow:visible;display:grid;grid-template-rows:repeat(6,minmax(44px,1fr));gap:8px;padding:0;margin:0;align-self:stretch}
.fit-desert .picture-bank button{min-width:0;min-height:44px;padding:8px;font-size:13px}
.fit-desert .picture-board .picture-scroll{min-width:0;min-height:0;width:100%;overflow:hidden;display:flex;flex-direction:column;padding:10px;gap:8px;background:#fff9ed}
.fit-desert .picture-canvas{min-width:0;min-height:0;flex:1;width:100%;position:relative}
.fit-desert .picture-canvas>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.fit-desert .desert-targets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:none}
.fit-desert .picture-drop{position:static;transform:none;width:auto;min-width:0;min-height:44px;padding:7px 4px;font-size:12px;line-height:1.25}
.fit-desert .desert-actions{display:flex;flex-wrap:wrap;gap:8px;flex:none;align-items:center}
.fit-desert .desert-actions .feedback{flex:1 0 100%;margin:0;min-height:36px;font-size:12px;line-height:1.4}
.fit-desert .desert-actions button{width:auto;min-height:44px;padding:10px 18px;margin:0}
@media(max-width:650px){#panel.fit-desert section{padding:13px}.fit-desert #panelTitle{font-size:23px}.fit-desert .picture-board{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px}.fit-desert .picture-board .picture-bank{grid-column:1;grid-row:1;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,44px);gap:5px}.fit-desert .picture-board .picture-scroll{grid-column:1;grid-row:2;padding:5px}.fit-desert .picture-bank button,.fit-desert .picture-drop{font-size:11px}.fit-desert #panelBody>.lead{font-size:12px}}
@media(max-height:650px) and (min-width:651px){#panel.fit-desert section:before{display:none}.fit-desert .picture-board .picture-bank{gap:4px}.fit-desert #panelBody{gap:6px}.fit-desert .desert-actions .feedback{min-height:28px}}

.fit-desert .picture-board .picture-bank{grid-template-rows:repeat(var(--tokens,6),minmax(44px,1fr))}.fit-desert .picture-bank.many-tokens{grid-template-columns:1fr 1fr;grid-template-rows:repeat(4,minmax(44px,1fr));gap:6px}.fit-desert .picture-board:has(.many-tokens){grid-template-columns:235px minmax(0,1fr)}.fit-desert .many-tokens button{font-size:11px;overflow-wrap:anywhere}.fit-desert .picture-drop{font-size:11px}
@media(max-width:650px){.fit-desert .picture-board:has(.many-tokens){grid-template-columns:1fr}.fit-desert .picture-board .picture-bank,.fit-desert .picture-bank.many-tokens{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,52px)}.fit-desert .picture-bank button{font-size:10px;padding:3px}.fit-desert .picture-board .picture-scroll{width:100%}}
/* Compact quest windows; long texts are paged rather than one long sheet. */
#panel:not(.fit-desert) section{height:calc(100dvh - 32px);max-height:none;overflow:hidden;display:flex;flex-direction:column;padding:20px 26px}
#panel:not(.fit-desert) section:before{padding-bottom:8px;margin-bottom:9px}
#panel:not(.fit-desert) #panelTitle{font-size:29px;margin:8px 0 12px}
#panel:not(.fit-desert) #panelBody{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
.quest-page{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 4px}
.quest-page>p{margin:8px 0;line-height:1.5}.quest-page .card{padding:12px 16px}.quest-page .choices{gap:7px;margin:12px 0}.quest-page .choices button{padding:11px 14px;min-height:44px}
.quest-page>.primary,.quest-page>button{margin:6px 6px 0 0;min-height:44px}.quest-page .learning-figure{margin:8px auto}.quest-page .learning-figure img{max-height:44dvh;width:100%;object-fit:contain}.quest-page .learning-figure:has(img[src*="klima-"]){max-width:350px}.quest-page .learning-figure:has(img[src*="klima-"]) img{max-height:48dvh}
.quest-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;border-top:1px solid #d6ddcd;padding-top:8px}.quest-pages button{min-height:44px;padding:9px 15px}.quest-pages span{font-size:12px;color:#526c5c}.quest-page .page-card-row{grid-template-columns:1fr;margin:8px 0;gap:0}.page-card-row .quest-card{padding:15px}.page-card-row .quest-card h3{min-height:0;margin:6px 0;font-size:25px}.page-card-row .chapter-card{padding:15px;gap:5px}.page-card-row .chapter-card p{margin:4px 0}
.quest-page .map-comparison{grid-template-columns:1fr 1fr}.quest-page .map-comparison img{max-height:40dvh}.quest-page .desert-gallery{grid-template-columns:repeat(3,1fr)}.quest-page .desert-gallery img{max-height:19dvh}.quest-page .sort-board{margin:10px 0;padding:12px;gap:12px}.quest-page .drop-zone{min-height:52px;padding:8px}.quest-page .drag-token{min-height:44px;padding:9px}
.destination-marker{position:fixed;z-index:12;max-width:min(350px,65vw);padding:10px 16px;border-radius:10px;background:#ffe39aec;color:#213f37;border:2px solid #fff5cf;box-shadow:0 4px 22px #162a3366;font:700 14px system-ui;pointer-events:none;text-align:center}.destination-marker:not(.offscreen):after{content:'';position:absolute;top:100%;left:calc(50% - 9px);border:9px solid transparent;border-top-color:#ffe39a}.destination-marker.offscreen{font-size:12px;border-left:5px solid #dba834}
@media(max-width:650px){#panel:not(.fit-desert) section{padding:16px}#panel:not(.fit-desert) #panelTitle{font-size:24px}.quest-page .map-comparison{gap:4px}.quest-page .map-comparison figure{padding:3px}.quest-page .desert-gallery{gap:5px}.quest-page .desert-gallery figure{padding:3px}.quest-page .sort-board{grid-template-columns:1fr}.quest-page .token-bank{flex-direction:row;flex-wrap:wrap}.quest-page .drag-token{font-size:11px;min-width:80px}.destination-marker{font-size:12px}}

.quest-page{overflow-x:hidden}.quest-page>.primary{width:calc(100% - 8px)}.quest-page>.menu-grid{margin:8px 0;gap:8px}.quest-page>.menu-grid button{padding:13px;min-height:44px}.quest-page .chapter-grid{gap:10px;margin:8px 0}.quest-page .chapter-card{padding:14px;gap:6px}.quest-page .chapter-card h3{font-size:24px}.quest-page .chapter-card p{margin:3px 0;line-height:1.4}.quest-page .chapter-card button{padding:11px 8px;min-height:44px}
@media(min-width:750px){.quest-page>.chapter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Keep every interactive matching board and its validation together. */
#panel.fit-sort section{height:calc(100dvh - 24px);padding:18px 24px;overflow:hidden;display:flex;flex-direction:column}#panel.fit-sort section:before{display:none}#panel.fit-sort #panelTitle{font-size:27px;margin:5px 0 8px}#panel.fit-sort #panelBody{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0}.fit-sort #panelBody>.lead{margin:0;font-size:13px;line-height:1.4}.fit-sort .sort-board{flex:1;min-height:0;margin:0;padding:10px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;overflow:hidden}.fit-sort .token-bank,.fit-sort .drop-zones{display:flex;flex-direction:column;gap:6px;min-height:0}.fit-sort .drag-token,.fit-sort .drop-zone{flex:1;min-width:0;min-height:44px;padding:6px 9px;font-size:12px;line-height:1.3}.fit-sort .drop-zone .drop-value{font-size:11px}.fit-sort .drop-index{font-size:17px}.fit-sort .sort-actions{display:flex;flex-wrap:wrap;gap:8px;flex:none}.fit-sort .sort-actions>.feedback,.fit-sort .sort-actions>.success-card{flex:1 0 100%;min-height:34px;margin:0;padding:0;border:0;background:transparent;font-size:12px;line-height:1.4}.fit-sort .sort-actions>button{width:auto;min-height:44px;padding:10px 16px}.fit-sort .desert-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:none;max-height:130px}.fit-sort .desert-gallery figure{margin:0;padding:4px;min-height:0}.fit-sort .desert-gallery img{height:90px;max-height:13dvh;object-fit:cover}.fit-sort .desert-gallery figcaption{margin:3px;font-size:10px;line-height:1.2}
@media(max-width:650px){#panel.fit-sort section{padding:13px}.fit-sort .sort-board{padding:5px;gap:7px}.fit-sort .drag-token,.fit-sort .drop-zone{font-size:11px}.fit-sort .drop-index{display:none}.fit-sort .desert-gallery{max-height:110px}.fit-sort .desert-gallery img{height:65px}.fit-sort .sort-actions>button{padding:10px}}
