/* Approved cloud explorers world. Artwork is decorative; all text and controls remain HTML. */
body.student:has(#expedition.space-active),body.game-page:has(#expedition.space-active){background:#acd4f6 url('assets/storybook/sky.webp') center/cover fixed no-repeat;color:#251d49}
body.student #expedition.space-active,body.game-page #expedition.space-active{max-width:none;padding:0;gap:0}
body.student #expedition.space-active{grid-template-rows:auto auto minmax(0,1fr) auto}
body.student #expedition.space-active:has(.foundation-story){grid-template-rows:auto minmax(0,1fr)}
body.student #expedition.space-active:has(.decision-ready){grid-template-rows:auto minmax(0,1fr) auto}
body:is(.student,.game-page) #expedition.space-active>header.activity-bar{position:relative;z-index:2;min-height:68px;padding:6px 18px;background:#303c91;color:#fff;gap:12px;border:0;box-shadow:0 2px 8px #28357355}
body.student #expedition.space-active>header .storybook-brand{display:flex;align-items:center;gap:5px;order:0;flex:none;color:#fff;font-size:20px;line-height:1.1;white-space:nowrap;font-weight:800}
body.student #expedition.space-active>header .storybook-brand img{width:112px;height:52px;object-fit:contain}
body:is(.student,.game-page) #expedition.space-active>header .space-title{order:1;flex:1;color:#fff;font-size:clamp(18px,2vw,28px)!important;line-height:1.25!important;letter-spacing:-.02em;min-width:0;word-break:keep-all}
body:is(.student,.game-page) #expedition.space-active>header .space-actions{order:2;gap:7px}
body:is(.student,.game-page) #expedition.space-active>header .space-actions>button{min-height:44px;padding:7px 11px;border:1px solid #fff;background:#343e8f;color:#fff;border-radius:12px;box-shadow:none;font-size:16px;white-space:nowrap}
body:is(.student,.game-page) #expedition.space-active>header .space-actions>button:hover{background:#4859ac}
body.student #expedition.space-active>header #continue{order:3;flex:none;min-height:46px;padding:8px 18px;border:2px solid #fff2c2;border-radius:13px;background:#fff1bf;color:#252054;box-shadow:none;font-size:17px;font-weight:800}
body.student #expedition.space-active>header #continue:disabled{background:#c1c5d8;border-color:#e4e6ef;color:#494d66;opacity:1}
body.game-page #expedition.space-active>header .brand{order:0;display:flex;align-items:center;gap:5px;color:#fff;text-decoration:none;font-size:19px;white-space:nowrap}
body.game-page #expedition.space-active>header .brand span{display:inline!important;color:#fff}
body.game-page #expedition.space-active>header .brand img{width:44px;height:48px;object-fit:contain}
body.student #expedition.space-active>.activity-heading,body.student #expedition.space-active>.footer{margin:0;padding:8px 20px}
body.student #expedition.space-active>.footer:has(.feedback:empty):not(:has(.feedback-dismiss)){display:none}
body.student #expedition.space-active>.workspace{padding:12px 16px 14px;min-height:0}
body.student #expedition.space-active .decision-flow:has(.storybook-visual){display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);gap:10px 18px;height:100%;min-height:0}
body.student #expedition.space-active .decision-flow:has(.storybook-visual) .foundation-situation{display:contents!important}
body.student #expedition.space-active .decision-flow .storybook-visual{grid-column:1;grid-row:1/4;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;height:100%;padding:5% 6%;overflow:hidden;background:#f8f0dc;border-radius:16px}
body.student #expedition.space-active .decision-flow .storybook-visual::after{content:'';position:absolute;inset:0;background:url('assets/storybook/book-frame.webp') center/100% 100% no-repeat;pointer-events:none;z-index:2}
body.student #expedition.space-active .decision-flow .storybook-visual>.decision-context-image{display:block;width:100%;height:100%;max-height:none;min-height:0;object-fit:contain;border-radius:4px}
body.student #expedition.space-active .decision-flow .storybook-visual>.decision-context-image[alt*='재현 삽화']{object-fit:cover}
body.student #expedition.space-active .decision-flow .storybook-visual>.card-art,body.student #expedition.space-active .decision-flow .storybook-visual>.foundation-art{width:100%;height:auto;max-width:100%;max-height:100%;margin:auto}
body.student #expedition.space-active .decision-flow .storybook-visual>.decision-source{width:100%;max-height:100%;overflow:auto;padding:14px;background:#fffaf0}
body.student #expedition.space-active .decision-flow .storybook-illustration-note{position:absolute;z-index:3;left:8%;bottom:8%;padding:5px 8px;background:#282344df;color:#fff;border-radius:6px;font-size:13px;line-height:1.3}
body.student #expedition.space-active .decision-flow .storybook-progress{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;margin:0;padding:0;list-style:none}
body.student #expedition.space-active .decision-flow .storybook-progress li{display:flex;align-items:center;gap:4px;color:#272e70;background:#dce8ff;border:1px solid #fff;border-radius:9px;padding:4px 7px;font-size:14px;font-weight:700;min-height:36px;min-width:0}
body.student #expedition.space-active .decision-flow .storybook-progress li[aria-current=step]{background:#374296;color:#fff}
body.student #expedition.space-active .decision-flow .storybook-progress li span{flex:none}
body.student #expedition.space-active .decision-flow .storybook-progress li b{display:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.student #expedition.space-active .decision-flow .storybook-progress li[aria-current=step] b{display:inline}
body.student #expedition.space-active .decision-flow .foundation-situation figcaption{grid-column:2;grid-row:2;min-width:0;padding:22px 32px;background:#fff url('assets/storybook/question-cloud.webp') center/100% 100% no-repeat;border:0;text-align:center;color:#201c56;line-height:1.3}
body.student #expedition.space-active .decision-flow .foundation-situation figcaption:empty{display:none}
body.student #expedition.space-active .decision-flow .foundation-situation figcaption>span{display:block;color:#5359a1;font-size:16px;font-weight:700}
body.student #expedition.space-active .decision-flow .foundation-situation figcaption>p{margin:4px 0 0;font-size:clamp(20px,2.1vw,30px);line-height:1.35;word-break:keep-all}
body.student #expedition.space-active .decision-flow .foundation-decision{grid-column:2;grid-row:3;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;padding:0;background:transparent;border:0;min-height:0}
body.student #expedition.space-active .decision-flow .foundation-decision::before{content:none}
body.student #expedition.space-active .decision-flow .foundation-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;align-items:center;gap:8px;min-height:0;container-type:size}
body.student #expedition.space-active .decision-flow .foundation-options:has(>.foundation-choice:only-child){grid-template-columns:minmax(0,1fr)}
body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice{display:flex;align-items:center;justify-content:center;min-width:0;min-height:110px;width:100%;max-width:none;padding:12px;border:14px solid #8c76a7!important;border-image:url('assets/storybook/choice.webp') 30% 12% fill / 14px stretch!important;background:#fff8e7;color:#251d49;box-shadow:none;text-align:center;border-radius:0}
body.student #expedition.space-active .decision-flow .foundation-choice>span:last-child{padding:0;font-size:clamp(20px,2vw,28px);line-height:1.25;word-break:keep-all}
body.student #expedition.space-active .decision-flow .decision-choice>.card-art{width:min(100%,max(100px,calc(100cqh - 120px)));max-width:180px;max-height:180px;height:auto;margin:0 auto;aspect-ratio:1}
body.student #expedition.space-active .decision-flow .foundation-choice[aria-pressed=true]:not(:disabled){outline:4px solid #52377e;outline-offset:-4px}
body.student #expedition.space-active .decision-flow .foundation-choice:disabled{filter:grayscale(.75);opacity:.72}
body.student #expedition.space-active .decision-flow .foundation-response{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:10px;background:#fffaf2;color:#252048}
body.student #expedition.space-active .decision-flow .foundation-response:has(p:empty):not(:has(button)){display:none}
body.student #expedition.space-active .decision-flow .foundation-response p{font-size:clamp(18px,1.9vw,26px);line-height:1.35;margin:0;word-break:keep-all}
body.student #expedition.space-active .decision-flow .foundation-response .primary{min-height:48px;font-size:20px}
body.student #expedition.space-active .decision-flow .decision-explanation{grid-row:auto;align-self:center}
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .scene{background:#f8f0dc;border:8px solid #f5e0b4}
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .tools{background:#fffaf0eb;border:2px solid #ddd0ee}
body.game-page #expedition.space-active #activity{padding:8px 16px}
@media(max-width:1100px){body.student #expedition.space-active>header .storybook-brand img{width:70px}body.student #expedition.space-active>header .storybook-brand{font-size:17px}body:is(.student,.game-page) #expedition.space-active>header.activity-bar{padding:6px 12px;gap:8px}body:is(.student,.game-page) #expedition.space-active>header .space-actions>button{font-size:15px;padding:7px 8px}}
@media(orientation:portrait){
 body.student #expedition.space-active .decision-flow:has(.storybook-visual){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(160px,.9fr) auto minmax(0,1fr);gap:8px}
 body.student #expedition.space-active .decision-flow .storybook-progress{grid-column:1;grid-row:1}
 body.student #expedition.space-active .decision-flow .storybook-visual{grid-column:1;grid-row:2;padding:4% 6%}
 body.student #expedition.space-active .decision-flow .foundation-situation figcaption{grid-column:1;grid-row:3;padding:18px 28px}
 body.student #expedition.space-active .decision-flow .foundation-decision{grid-column:1;grid-row:4}
}
@media(max-width:700px){
 body:is(.student,.game-page) #expedition.space-active>header.activity-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px}
 body.student #expedition.space-active>header .storybook-brand{font-size:15px}
 body.student #expedition.space-active>header .storybook-brand img{width:62px;height:38px}
 body:is(.student,.game-page) #expedition.space-active>header .space-title{flex:1 1 calc(100% - 165px);font-size:20px!important}
 body:is(.student,.game-page) #expedition.space-active>header .space-actions{order:3;flex:1 1 auto;justify-content:flex-start;flex-wrap:wrap}
 body:is(.student,.game-page) #expedition.space-active>header .space-actions>button{min-height:44px;font-size:15px;padding:7px 10px}
 body.student #expedition.space-active>header #continue{order:4;min-height:44px;font-size:16px;padding:7px 14px}
 body.student #expedition.space-active:has(.decision-flow){height:auto;min-height:100dvh;grid-template-rows:auto auto!important;align-content:start}
 body.student #expedition.space-active>.workspace:has(>.decision-flow){height:auto;min-height:0;padding:10px}
 body.student #expedition.space-active .decision-flow:has(.storybook-visual){height:auto;min-height:0;grid-template-rows:auto auto auto auto;gap:10px}
 body.student #expedition.space-active .decision-flow .storybook-visual{height:auto;aspect-ratio:1.45;min-height:200px;max-height:310px}
 body.student #expedition.space-active .decision-flow .storybook-visual>.decision-context-image{position:absolute;inset:6%;width:88%;height:88%}
 body.student #expedition.space-active .decision-flow .foundation-situation figcaption{padding:18px 26px;min-height:80px}
 body.student #expedition.space-active .decision-flow .foundation-situation figcaption>p{font-size:21px;line-height:1.38}
 body.student #expedition.space-active .decision-flow .foundation-options{grid-template-columns:1fr;container-type:normal;gap:8px}
 body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice{min-height:66px;padding:8px}
 body.student #expedition.space-active .decision-flow .decision-choice>.card-art{width:80px;height:80px;flex:0 0 80px;margin:0}
 body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice:has(.card-art){flex-direction:row;text-align:left;gap:12px}
 body.student #expedition.space-active .decision-flow .foundation-choice>span:last-child{font-size:20px;line-height:1.3}
 body.student #expedition.space-active .decision-flow .foundation-response{flex-wrap:wrap}
 body.game-page #expedition.space-active #activity{padding:8px}
}
/* The frame and cloud art must not introduce rectangular color blocks. */
body.student #expedition.space-active .decision-flow .storybook-visual{background:transparent;border-radius:0}
body.student #expedition.space-active .decision-flow .storybook-visual::before{content:'';position:absolute;inset:5% 6%;background:#f8f0dc;border-radius:8px;z-index:0;pointer-events:none}
body.student #expedition.space-active .decision-flow .storybook-visual>:not(.storybook-illustration-note){z-index:1}
body.student #expedition.space-active .decision-flow .foundation-situation figcaption{background-color:transparent}
body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice{background:#fff8e7;background-clip:padding-box}
body.game-page #expedition.space-active>header .brand::before{content:'';display:block;width:90px;height:48px;background:url('assets/storybook/explorers.webp') center/contain no-repeat}
body.game-page #expedition.space-active>header .brand img{display:none}
@media(min-width:701px) and (max-width:1100px){body.student #expedition.space-active>header .storybook-brand img{width:100px}}
/* Archival source pages remain wholly inside the decorative frame. */
body.student #expedition.space-active .decision-flow .storybook-visual:has(>.archival-image){padding:10% 9% 13%}
body.student #expedition.space-active .decision-flow .storybook-visual>.archival-image{object-fit:contain}
@media(max-width:700px){body.student #expedition.space-active .decision-flow .storybook-visual>.archival-image{inset:10% 9% 13%;width:82%;height:77%}}
/* Static lesson scenes and the Dokdo map can wear the same book frame without covering interactive boards. */
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .scene:has(>img:only-child){position:relative;border:0;border-radius:0;background:transparent}
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .scene:has(>img:only-child)::before{content:'';position:absolute;inset:6% 7%;background:#f8f0dc;border-radius:8px}
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .scene:has(>img:only-child)>img{position:relative;z-index:1;width:86%;height:86%;object-fit:contain}
body.student #expedition.space-active .workspace:not(:has(.decision-flow)) .scene:has(>img:only-child)::after{content:'';position:absolute;inset:0;z-index:2;background:url('assets/storybook/book-frame.webp') center/100% 100% no-repeat;pointer-events:none}
body.game-page #expedition.space-active #activity[data-step='1'] .route-layout .geo-map{border:12px solid transparent;border-image:url('assets/storybook/book-frame.webp') 18% 7% / 15px stretch;border-radius:0}
@media(min-width:901px){
 body.game-page #expedition.space-active:has(#activity #continue:not([hidden]))>header .space-actions{margin-right:170px}
 body.game-page #expedition.space-active #activity #continue:not([hidden]){position:fixed;z-index:12;top:10px;right:16px;min-height:46px;padding:8px 14px;border:2px solid #fff2c2;border-radius:13px;background:#fff1bf;color:#252054;box-shadow:none;font-size:17px;font-weight:800}
}

@media(max-width:700px){body.game-page #expedition.space-active:not(.at-welcome){padding:0}}
/* The approved illustration uses a full-size book, a clear trail, and substantial answer cards. */
body:is(.student,.game-page) #expedition.space-active>header .storybook-previous{order:3;flex:none;min-height:46px;padding:8px 16px;border:1.5px solid white;border-radius:14px;background:#303c91;color:white;font-size:17px;font-weight:800;white-space:nowrap}
body:is(.student,.game-page) #expedition.space-active>header .storybook-previous:disabled{opacity:.5}
body:is(.student,.game-page) #expedition.space-active>header .storybook-previous:focus-visible{outline:3px solid #ffd572;outline-offset:2px}
body.student #expedition.space-active>header #continue{order:4}
body.student #expedition.space-active .decision-flow .storybook-progress li{min-height:42px;padding:6px 10px;font-size:16px;box-shadow:0 2px 2px #48639b30}
body.student #expedition.space-active .decision-flow .storybook-progress li span{display:grid;place-items:center;min-width:27px;height:27px;border-radius:50%;background:#f1f4ff;color:#303c91}
body.student #expedition.space-active .decision-flow .storybook-progress li[aria-current=step] span{background:#fff0bf}
body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice{min-height:clamp(145px,23vh,235px);flex-direction:column;gap:8px}
body.student #expedition.space-active .decision-flow .foundation-choice>span:last-child{font-size:clamp(21px,2.4vw,34px);font-weight:800}
body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice:not(:has(.card-art))::after{content:'';display:block;width:70%;height:30px;background:url('assets/storybook/question-cloud.webp') center/contain no-repeat;opacity:.7}
@media(max-width:700px){
 body:is(.student,.game-page) #expedition.space-active>header .storybook-previous{order:4;min-height:44px;padding:7px 12px;font-size:16px}
 body.student #expedition.space-active>header #continue{order:5}
 body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice{min-height:76px;flex-direction:row}
 body.student #expedition.space-active .decision-flow .foundation-options>.foundation-choice:not(:has(.card-art))::after{display:none}
}
body.student #expedition.space-active .decision-flow .foundation-choice:has(.history-choice-art){flex-direction:column-reverse}
body.student #expedition.space-active .decision-flow .history-choice-art{display:block;flex:none;width:min(100%,170px);height:100px;max-height:none;aspect-ratio:auto;margin:0 auto}
body.student #expedition.space-active .decision-flow .history-choice-event{background-position:left center}
body.student #expedition.space-active .decision-flow .history-choice-record{background-position:right center}
@media(max-width:700px){body.student #expedition.space-active .decision-flow .foundation-choice:has(.history-choice-art){flex-direction:row-reverse;justify-content:space-around}body.student #expedition.space-active .decision-flow .history-choice-art{width:100px;height:65px;margin:0}}
@media(min-width:1200px){body.student #expedition.space-active>header .storybook-brand img{width:180px;height:62px}body.student #expedition.space-active>header .storybook-brand{font-size:23px}}
@media(max-width:700px){body:is(.student,.game-page) #expedition.space-active>header .space-actions{flex:0 1 auto;gap:4px}body:is(.student,.game-page) #expedition.space-active>header .space-actions>button{font-size:14px;padding:7px 6px}body:is(.student,.game-page) #expedition.space-active>header .storybook-previous{font-size:14px;padding:7px 8px}body.student #expedition.space-active>header #continue{font-size:14px;padding:7px 10px}}
body.student #expedition.space-active .decision-flow .foundation-options{align-items:stretch}
body.student #expedition.space-active .decision-flow .decision-choice>.history-choice-art{width:100%;max-width:210px;height:110px;max-height:110px;aspect-ratio:auto;background-color:transparent}
@media(max-width:700px){body.student #expedition.space-active .decision-flow .decision-choice>.history-choice-art{width:100px;height:65px;max-height:65px}}
/* Three or more alternatives share the available height without clipping their labels. */
@media(min-width:701px){
 body.student #expedition.space-active .decision-flow .foundation-options:has(>.foundation-choice:nth-child(3))>.foundation-choice{min-height:0;padding:8px;gap:4px}
 body.student #expedition.space-active .decision-flow .foundation-options:has(>.foundation-choice:nth-child(3)) .decision-choice>.card-art{width:90px;height:90px;max-width:90px;max-height:90px;flex:none}
 body.student #expedition.space-active .decision-flow .foundation-options:has(>.foundation-choice:nth-child(3)) .foundation-choice>span:last-child{font-size:clamp(18px,1.8vw,25px);line-height:1.2}
}
/* Each half of the choice sprite is square; keep its aspect ratio on screen. */
body.student #expedition.space-active .decision-flow .decision-choice>.history-choice-art{width:125px;max-width:125px;height:125px;max-height:125px}
@media(max-width:700px){body.student #expedition.space-active .decision-flow .decision-choice>.history-choice-art{width:65px;max-width:65px;height:65px;max-height:65px}}
