/* Fit the usable browser window, independently of the laptop's physical size. */
.lesson-active .station{display:grid;place-items:center;min-height:0}
.lesson-active .station>.wrap{width:100%;max-width:1480px!important;height:min(100%,900px);min-height:0;margin:auto}
.lesson-active .st-grid,.lesson-active .play,.mission-layout{min-width:0;min-height:0}
.lesson-active .third-compact .hud h3{flex-wrap:wrap;column-gap:16px;row-gap:2px}
.lesson-active .third-compact .mission-topic{max-width:100%;white-space:normal;overflow-wrap:break-word}
.lesson-active .third-compact .mission-inline-ins{font-size:clamp(14px,1.15vw,18px);line-height:1.35}
.promise-footer{min-width:0;padding:7px 14px 10px}
.promise-footer>p{flex:1;min-width:0;max-width:48em}
.promise-footer .mission-controls button{width:clamp(128px,12vw,180px);white-space:nowrap}

/* Keep the postcard's 3:2 shape and bound the controls on wide displays. */
.pc-studio{grid-template-columns:minmax(0,1fr) clamp(340px,36%,460px);gap:clamp(10px,1.5cqw,20px);max-width:1400px}
.pc-canvas-column,.pc-tools,.pc-tool-content{min-width:0;min-height:0}
.pc-tools{width:100%;align-self:stretch;overflow:visible}
.pc-tool-content{gap:clamp(6px,1.3cqh,10px)}
.pc-art-wrap{flex:none;aspect-ratio:3/2}
.pc-tool-actions{position:relative;z-index:1;background:#fffef9}
.pc-tools button{max-width:100%;overflow-wrap:break-word}
.pc-tools h3{font-size:clamp(20px,3.6cqh,26px)}
.pc-tools .pc-small{font-size:clamp(14px,2.4cqh,16px)}
.pc-messages button{line-height:1.3}
.pc-positions,.pc-message-tabs,.pc-preview-actions,.pc-run-controls{gap:6px}
.pc-palette img{max-width:100%;object-fit:contain}

@container(max-height:430px){
 .pc-studio{grid-template-columns:minmax(0,1fr) clamp(350px,41%,480px);gap:10px}
 .pc-tools{padding:9px;gap:6px;border-radius:16px}
 .pc-tool-content{gap:6px}
 .pc-tools h3{font-size:21px}
 .pc-tools button{min-height:38px;padding:6px;font-size:16px;line-height:1.25}
 .pc-tools [data-finish],.pc-tools [data-save]{min-height:40px}
 .pc-tools .pc-small{font-size:14px;line-height:1.3}
 .pc-tools br{display:none}
 .pc-kicker{display:none}
 .pc-palette button,.pc-command-bank button{min-height:54px;font-size:14px;gap:2px}
 .pc-palette img{height:32px}
 .pc-command-slots button{min-height:57px;font-size:13px;gap:1px}
 .pc-command-slots b{font-size:22px;line-height:1;margin-top:3px}
 .pc-command-bank b{font-size:22px;line-height:1}
 .pc-checks{gap:3px;padding:7px 9px;font-size:15px}
 .pc-conversation{padding:7px;gap:5px}
 .pc-conversation p{font-size:16px}
 .pc-conversation .pc-answer{padding:6px}
 .pc-confirmation{font-size:16px;padding:7px}
 .pc-tools textarea{min-height:60px;height:60px;padding:7px;font-size:18px}
 .pc-count{font-size:13px}
 .pc-message-label{font-size:15px}
 .pc-canvas-column{gap:6px}
 .pc-project-top{font-size:14px}
 .pc-status{font-size:16px;line-height:1.3;padding:6px 9px;min-height:34px}
 .pc-tools h4{display:none}
}
@container(max-height:335px){
 .pc-studio{grid-template-columns:minmax(0,1fr) clamp(370px,44%,490px)}
 .pc-tools{padding:8px;gap:4px}
 .pc-tool-content{gap:4px}
 .pc-tools h3{font-size:20px}
 .pc-tools button{min-height:36px;padding:5px;font-size:16px}
 .pc-tool-actions{padding-top:4px}
 .pc-tools [data-finish],.pc-tools [data-save]{min-height:38px}
 .pc-messages{gap:4px}.pc-messages button{min-height:36px;padding:5px 8px}
 .pc-messages{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pc-messages button:last-child{grid-column:1/-1}
 .pc-command-slots button{min-height:54px;font-size:13px}
 .pc-command-bank button{min-height:47px;font-size:14px;gap:0}
 .pc-command-slots b,.pc-command-bank b{font-size:20px}
 .pc-palette button{min-height:47px;font-size:14px;gap:0}
 .pc-palette img{height:27px}
 .postcard-studio[data-postcard-step="0"] .pc-tool-content>p:first-of-type{display:none}
 .pc-tools .pc-small{font-size:14px;line-height:1.25}
 .pc-status{font-size:15px;padding:5px 8px}
 .pc-tools textarea{min-height:54px;height:54px;font-size:18px}
 .pc-message-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .pc-checks{grid-template-columns:repeat(3,minmax(0,1fr));font-size:14px;gap:6px}
 .pc-needed{font-size:14px;line-height:1.25;padding:6px}
}
@media(max-width:1000px){
 .lesson-active .station>.wrap{padding-inline:8px!important}
 .promise-footer>p{font-size:14px;line-height:1.3}
 .promise-footer .mission-controls button{width:126px;min-height:36px;font-size:15px;padding:6px 8px}
 .promise-footer{padding:5px 10px 8px;gap:8px}
}
/* Browser zoom and narrow split-screen windows keep two useful columns. */
@container(max-width:800px){
 .pc-studio{grid-template-columns:minmax(0,1fr) minmax(320px,47%);gap:8px}
 .pc-project-top>span:first-child{font-size:13px}
}
@container(max-height:290px){
 .postcard-studio[data-postcard-step="5"] .pc-tool-content{gap:3px}
 .postcard-studio[data-postcard-step="5"] .pc-tool-content>p:not([class]){display:none}
 .pc-command-slots button{min-height:48px;padding:3px}
 .pc-run-controls button{min-height:34px;padding:4px}
}

/* A story strip stays outside the illustration; the artwork keeps its ratio. */
.pc-goals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pc-goals button{font-size:15px;min-height:40px;padding:5px}
.pc-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-height:0}
.pc-comparison button{display:flex;flex-direction:column;gap:4px;align-items:stretch;min-height:0;padding:6px;font-size:16px}
.pc-comparison .pc-art{height:clamp(64px,17cqh,110px);width:100%;pointer-events:none}
.pc-comparison span{font-size:14px;line-height:1.3;font-weight:400}
.postcard-studio[data-postcard-step="6"] .pc-confirmation{font-size:15px;padding:6px}
@container(max-height:430px){.pc-comparison .pc-art{height:60px}.pc-comparison span{font-size:13px}.pc-goals button{min-height:36px;font-size:14px}.pc-comparison button{font-size:15px}}
@container(max-height:350px){.pc-comparison .pc-art{height:44px}.pc-comparison span{font-size:13px}.postcard-studio[data-postcard-step="6"] .pc-tool-content{gap:4px}.postcard-studio[data-postcard-step="6"] .pc-confirmation{display:none}.postcard-studio[data-postcard-step="5"] .pc-command-bank button{min-height:38px}}
.pc-canvas-column{grid-template-rows:auto auto minmax(0,1fr) auto}
.pc-scene-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pc-scene-tabs button{min-width:0;min-height:38px;padding:6px;border:1px solid #a5bfb0;border-radius:10px;background:#fffdf5;color:#315b51;font:700 16px/1.2 var(--f-body);cursor:pointer}
.pc-scene-tabs button[aria-pressed=true]{background:#267b60;color:#fff;border-color:#267b60}
.pc-scene-tabs button:focus-visible{outline:3px solid #e6a23b;outline-offset:2px}
.pc-art-area{position:relative}
.pc-stop{position:absolute;top:8px;right:8px;background:#fffdf5;border:2px solid #286a59;border-radius:10px;color:#245343;padding:8px 12px;font:700 16px var(--f-body);cursor:pointer;z-index:3}
.travel-guide-studio .pc-photo-options,.travel-guide-studio .pc-topic-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.travel-guide-studio .pc-topic-options{grid-template-columns:repeat(3,minmax(0,1fr))}
.travel-guide-studio .pc-photo-options button,.travel-guide-studio .pc-topic-options button{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:5px;font-size:16px}
.travel-guide-studio .pc-photo-options img{width:100%;height:clamp(70px,20cqh,125px);object-fit:cover;border-radius:8px;pointer-events:none}
.travel-guide-studio .pc-topic-options img{width:100%;height:clamp(45px,13cqh,85px);object-fit:cover;border-radius:8px;pointer-events:none}
.travel-guide-studio .pc-captions{display:grid;gap:7px}.travel-guide-studio .pc-captions button{text-align:left;font-size:16px;padding:8px;min-height:42px}
.travel-guide-studio .pc-source-card{padding:12px;background:#edf4e9;border-radius:12px;font-size:16px;line-height:1.6}
.travel-guide-studio .pc-scene-tabs button:disabled{opacity:.55;cursor:default}
.travel-guide-studio .pc-art [tabindex]{cursor:pointer;outline:none}.travel-guide-studio .pc-art [tabindex]:focus-visible{filter:drop-shadow(0 0 5px #e69b22)}
.travel-guide-studio .pc-tone button{font-size:15px}
@container(max-height:430px){.travel-guide-studio .pc-topic-options img{height:42px}.travel-guide-studio .pc-topic-options button{font-size:15px;gap:2px}.travel-guide-studio .pc-photo-options img{height:75px}.travel-guide-studio .pc-captions{gap:5px}.travel-guide-studio .pc-captions button{font-size:15px;min-height:35px;padding:5px}.travel-guide-studio .pc-tone button{min-height:34px;font-size:14px}.travel-guide-studio .pc-comparison .pc-art{height:55px}}
@container(max-height:335px){.travel-guide-studio .pc-tool-content{gap:4px}.travel-guide-studio .pc-topic-options img{height:32px}.travel-guide-studio .pc-photo-options img{height:60px}.travel-guide-studio .pc-captions button{min-height:32px;font-size:14px}.travel-guide-studio .pc-recipients,.travel-guide-studio .pc-tone{display:flex!important}.travel-guide-studio .pc-recipients button,.travel-guide-studio .pc-tone button{min-height:31px;padding:4px}.travel-guide-studio .pc-message-tabs button{min-height:32px;font-size:14px}.travel-guide-studio .pc-tools h3{font-size:19px}.travel-guide-studio .pc-tools textarea{height:54px;min-height:54px}.travel-guide-studio .pc-command-slots button{min-height:45px}.travel-guide-studio .pc-command-bank button{min-height:34px}.travel-guide-studio .pc-comparison .pc-art{height:42px}}
.postcard-studio[data-postcard-step="1"] .pc-messages button{min-height:48px;font-size:17px}
@container(max-height:430px){.pc-project-top{display:none}.pc-canvas-column{grid-template-rows:auto minmax(0,1fr) auto}.pc-scene-tabs button{font-size:14px;min-height:36px;padding:5px}.postcard-studio[data-postcard-step="1"] .pc-messages button{min-height:42px;font-size:16px;line-height:1.2}}
@container(max-height:335px){.postcard-studio[data-postcard-step="1"] .pc-messages{grid-template-columns:1fr}.postcard-studio[data-postcard-step="1"] .pc-messages button{min-height:34px;font-size:15px;padding:5px 7px}.pc-scene-tabs button{font-size:14px;min-height:34px}.postcard-studio[data-postcard-step="1"] .pc-positions{display:none}}
@container(max-height:290px){.postcard-studio[data-postcard-step="5"] .pc-command-slots button{min-height:44px}.postcard-studio[data-postcard-step="5"] .pc-command-bank button{min-height:42px;padding:3px}.postcard-studio[data-postcard-step="5"] .pc-command-slots b{margin-top:0;font-size:18px}.postcard-studio[data-postcard-step="5"] .pc-command-bank b{font-size:18px}.postcard-studio[data-postcard-step="5"] .pc-tool-content{gap:2px}}

.travel-guide-studio [data-photo="0"] img,.travel-guide-studio [data-topic="postbox"] img{object-position:left bottom}

/* Choose pictures once; keep playback in its own reserved footer row. */
.pc-preview-label{margin:0;padding:6px 2px;font-size:17px;color:#326452}
.pc-sequence-prompt{margin:0;padding:9px 12px;background:#e6f3eb;border-radius:12px;font-size:18px;line-height:1.4}
.pc-scene-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:0}
.pc-scene-choices button{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;padding:5px!important;min-width:0;min-height:0!important;font-size:16px!important;line-height:1.3}
.pc-scene-choices .pc-art{width:100%;height:auto;max-height:110px;aspect-ratio:3/2;pointer-events:none}
.pc-scene-choices button:disabled{opacity:.6}
.pc-sequence-order{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;list-style:none;padding:0;margin:0}
.pc-sequence-order li{min-width:0}
.pc-sequence-order button{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:5px;min-height:64px!important;font-size:16px!important;padding:6px!important;line-height:1.3;text-align:left}
.pc-sequence-order b{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#e3eee6;color:#235846}
.pc-sequence-actions{display:grid;grid-template-columns:1fr 2fr;gap:8px}
.postcard-studio[data-postcard-step="5"] .pc-tool-content{justify-content:center}
.postcard-studio[data-postcard-step="5"] .pc-tool-actions button{min-height:48px;font-size:18px}
@container(max-height:430px){
 .pc-sequence-prompt{font-size:16px;padding:6px 8px}
 .pc-scene-choices .pc-art{max-height:76px}
 .pc-sequence-order button{min-height:54px!important;font-size:15px!important}
 .postcard-studio[data-postcard-step="5"] .pc-tool-actions button{min-height:40px;font-size:16px}
 .postcard-studio[data-postcard-step="5"] .pc-tools h3{font-size:21px}
 .pc-preview-label{font-size:15px;padding:3px}
}
@container(max-height:335px){
 .pc-scene-choices .pc-art{max-height:54px}
 .pc-scene-choices button{font-size:14px!important;gap:2px}
 .pc-sequence-order button{min-height:43px!important;font-size:14px!important;padding:3px!important}
 .pc-sequence-order b{width:21px;height:21px}
 .postcard-studio[data-postcard-step="5"] .pc-tools h3{font-size:18px;line-height:1.25}
 .pc-sequence-prompt{font-size:14px;padding:5px 7px}
 .postcard-studio[data-postcard-step="5"] .pc-tool-content{justify-content:flex-start;gap:5px}
}
