.theme-modal{width:min(820px,calc(100vw - 28px));max-height:90dvh;overflow:auto;background:#fff9e8;color:#254650}
.theme-picker{text-align:center}.theme-picker h2{margin:2px 0 6px;font-size:clamp(23px,3vw,34px);color:#183f4a}.theme-picker>p{max-width:560px;margin:0 auto 14px;line-height:1.55;color:#587078}.theme-picker .theme-eyebrow{color:#9a6e2e;font-weight:800;letter-spacing:.1em;font-size:12px}.theme-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.theme-card{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:9px 8px 14px;border:3px solid #d2bd93;border-radius:14px;background:#fffdf5;color:#254650;cursor:pointer;box-shadow:0 5px 0 #b7a079;transition:transform .2s,border-color .2s,box-shadow .2s}.theme-card:hover{transform:translateY(-3px)}.theme-card.selected{border-color:#e7a930;box-shadow:0 0 0 3px #fff1bc,0 5px 0 #a87729;background:#fff5cf}.theme-card:focus-visible{outline:3px solid #167f90;outline-offset:3px}.theme-card-art{display:block;width:100%;height:130px;border-radius:9px;background:#9bdef0 url('/ledger-world.png') center/cover;position:relative;overflow:hidden}.theme-card-art:after{content:'';position:absolute;inset:12px;background:url('/ledger-explorer.png') center bottom/contain no-repeat}.theme-card-art.fanli,.theme-card-art.xishi{background-image:url('/yue-world.png')}.theme-card-art.fanli:after,.theme-card-art.xishi:after{inset:4px 16%;background-image:url('/yue-characters.png');background-size:200% 100%;background-position:left center}.theme-card-art.xishi:after{background-position:right center}.theme-card strong{font-size:18px}.theme-card small{font-size:12px;font-weight:800;color:#8b622d}.theme-card>span:last-child{font-size:11px;color:#5b7076}.theme-picker>#save-theme{min-height:46px;width:min(100%,360px);background:#e9b548;color:#22434b}.theme-picker .form-error{min-height:20px}@media(max-width:600px){.theme-modal{padding:16px 12px}.theme-cards{gap:7px}.theme-card{padding:5px 3px 9px;border-width:2px}.theme-card-art{height:95px}.theme-card strong{font-size:15px}.theme-card small,.theme-card>span:last-child{font-size:10px;line-height:1.25}}
body[data-theme="yue"] .world-content,body[data-theme="yue"].map-viewport .game-scroll[data-axis="y"],body[data-theme="yue"].map-viewport .game-scroll[data-axis="x"]{background-color:#8bd1d8;background-image:url('/yue-world.png')}
body[data-theme="yue"].map-viewport .game-scroll[data-axis="x"]{background-size:100% 100%;background-repeat:no-repeat}
body[data-theme="yue"] .game-platform:before{background-image:linear-gradient(180deg,#9bc374 0 16%,#6e9656 16% 27%,#e7d3a9 27% 45%,#b89b78 45% 72%,#806e64 72% 100%);border:4px solid #675d4d;border-radius:42% 42% 22% 22%;clip-path:polygon(7% 0,93% 0,100% 28%,96% 74%,82% 100%,18% 100%,4% 74%,0 28%);filter:drop-shadow(0 10px 5px #244b5260);left:-20%;right:-20%;top:77%;height:34px}
body[data-theme="yue"].map-viewport .game-scroll[data-axis="x"] .game-platform:before{height:42px;left:-26%;right:-26%;top:68%}
body[data-theme="yue"] .pipe-play-scene,body[data-theme="yue"] .result-adventure,body[data-theme="yue"] .achievement-sky,body[data-theme="yue"] .review-scene,body[data-theme="yue"] .retry-scene{background-image:url('/yue-world.png')}
body[data-theme="yue"] .game-player:before,body[data-theme="yue"] .pipe-avatar:before,body[data-theme="yue"] .reward-hero,body[data-theme="yue"] .retry-hero,body[data-theme="yue"] .review-hero,body[data-theme="yue"] .achievement-hero,body[data-theme="yue"] .quiz-scene-player,body[data-theme="yue"] .result-runner,body[data-theme="yue"] .pipe-traveler{background-image:url('/yue-characters.png');background-size:200% 100%;background-position:left center}
body[data-theme="yue"] .game-player:before,body[data-theme="yue"] .pipe-avatar:before{inset:-17% -23%}
body[data-character="xishi"] .game-player:before,body[data-character="xishi"] .pipe-avatar:before,body[data-character="xishi"] .reward-hero,body[data-character="xishi"] .retry-hero,body[data-character="xishi"] .review-hero,body[data-character="xishi"] .achievement-hero,body[data-character="xishi"] .quiz-scene-player,body[data-character="xishi"] .result-runner,body[data-character="xishi"] .pipe-traveler{background-position:right center}
@media(prefers-reduced-motion:reduce){.theme-card{transition:none}}
.island-copy .island-intro{margin:0 0 10px;color:#ffe29a;font-size:13px;font-weight:900;letter-spacing:.16em}.island-copy .island-subjects{margin-bottom:22px}.island-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:560px;margin:0 0 22px}.island-choices button{min-width:0;min-height:145px;display:flex;align-items:center;flex-direction:column;gap:3px;padding:6px;border:2px solid #ffe3a0;border-radius:12px;background:#0d4159d9;color:#fff7dc;cursor:pointer;box-shadow:0 5px 0 #07304b;transition:transform .18s,border-color .18s}.island-choices button:hover{transform:translateY(-3px)}.island-choices button.selected{border-color:#ffcf50;background:#225d5c;box-shadow:0 0 0 3px #ffd87755,0 5px 0 #714e1b}.island-choices button:focus-visible{outline:3px solid #fff;outline-offset:3px}.island-choices strong{font-size:14px;line-height:1.2;white-space:nowrap}.island-choices small{font-size:11px;color:#d5e9e8}.cover-face{display:block;width:100%;height:92px;background:url('/ledger-explorer.png') center/contain no-repeat}.cover-face.fanli,.cover-face.xishi{background-image:url('/yue-characters.png');background-size:200% 100%;background-position:left center}.cover-face.xishi{background-position:right center}.island-cover[data-choice="fanli"] .island-art,.island-cover[data-choice="xishi"] .island-art{background-image:url('/yue-world.png')}.island-cover[data-choice="fanli"] .island-player img,.island-cover[data-choice="xishi"] .island-player img{display:none}.island-cover[data-choice="fanli"] .island-player:before,.island-cover[data-choice="xishi"] .island-player:before{content:'';position:absolute;inset:0;background:url('/yue-characters.png') left center/200% 100% no-repeat;animation:island-hop 1.8s ease-in-out 3}.island-cover[data-choice="xishi"] .island-player:before{background-position:right center}.island-cover[data-choice="fanli"] .island-player:after,.island-cover[data-choice="xishi"] .island-player:after{display:none}.island-cover .island-enter{min-width:min(100%,360px)}.island-cover .island-hint{margin-top:18px}.island-cover .island-copy{padding-top:clamp(35px,6vh,70px)}
@media(max-width:700px){.island-cover .island-copy{padding:28px 16px 55px}.island-cover .island-copy h1 span{font-size:34px;margin-bottom:0}.island-cover .island-copy h1 strong{font-size:58px}.island-cover .island-promise{margin:13px 0 4px;font-size:16px}.island-cover .island-subjects{margin-bottom:16px;font-size:12px}.island-choices{gap:6px;margin-bottom:17px}.island-choices button{min-height:123px;padding:4px 1px}.cover-face{height:77px}.island-choices strong{font-size:12px}.island-choices small{font-size:10px}.island-cover .island-player{display:none}.island-cover .island-footer{position:relative;top:auto;bottom:auto;margin-top:8px}.island-cover .island-enter{min-width:0;width:100%;font-size:17px}.island-cover .island-hint{font-size:12px;margin-top:15px}}
.preview-shell .island-cover .island-copy{padding:28px 16px 55px}.preview-shell .island-cover .island-copy h1 span{font-size:34px;margin-bottom:0}.preview-shell .island-cover .island-copy h1 strong{font-size:58px}.preview-shell .island-cover .island-promise{margin:13px 0 4px;font-size:16px}.preview-shell .island-cover .island-subjects{margin-bottom:16px;font-size:12px}.preview-shell .island-choices{gap:6px;margin-bottom:17px}.preview-shell .island-choices button{min-height:123px;padding:4px 1px}.preview-shell .cover-face{height:77px}.preview-shell .island-choices strong{font-size:12px}.preview-shell .island-choices small{font-size:10px}.preview-shell .island-cover .island-player{display:none}.preview-shell .island-cover .island-footer{position:relative;top:auto;bottom:auto;margin-top:8px}.preview-shell .island-cover .island-enter{min-width:0;width:100%;font-size:17px}.preview-shell .island-cover .island-hint{font-size:12px;margin-top:15px}

/* Each character has its own full transparent asset so narrow cards never crop a sprite sheet. */
.cover-face.fanli,.theme-card-art.fanli:after{background-image:url('/yue-fanli.png');background-size:contain;background-position:center}
.cover-face.xishi,.theme-card-art.xishi:after{background-image:url('/yue-xishi.png');background-size:contain;background-position:center}
.cover-face.fanli,.cover-face.xishi{background-size:auto 110%}
.island-cover[data-choice="fanli"] .island-player:before{background:url('/yue-fanli.png') center/contain no-repeat}
.island-cover[data-choice="xishi"] .island-player:before{background:url('/yue-xishi.png') center/contain no-repeat}
body[data-theme="yue"] .game-player:before,body[data-theme="yue"] .pipe-avatar:before,body[data-theme="yue"] .reward-hero,body[data-theme="yue"] .retry-hero,body[data-theme="yue"] .review-hero,body[data-theme="yue"] .achievement-hero,body[data-theme="yue"] .quiz-scene-player,body[data-theme="yue"] .result-runner,body[data-theme="yue"] .pipe-traveler{background-image:url('/yue-fanli.png');background-size:contain;background-position:center}
body[data-character="xishi"] .game-player:before,body[data-character="xishi"] .pipe-avatar:before,body[data-character="xishi"] .reward-hero,body[data-character="xishi"] .retry-hero,body[data-character="xishi"] .review-hero,body[data-character="xishi"] .achievement-hero,body[data-character="xishi"] .quiz-scene-player,body[data-character="xishi"] .result-runner,body[data-character="xishi"] .pipe-traveler{background-image:url('/yue-xishi.png');background-position:center}
.island-cover:not(.yue-art-ready)[data-choice="fanli"] .island-art,.island-cover:not(.yue-art-ready)[data-choice="xishi"] .island-art{background-image:url('/ledger-world.png')}

/* Keep the adventure world, but let the character and next action lead. */
.island-cover .island-intro,.island-cover .island-footer,.island-cover .island-coin{display:none}
.island-cover .island-shade{background:linear-gradient(90deg,#103c51ed 0%,#164655bd 37%,#16465530 76%,transparent)}
.island-cover .island-copy{padding-top:clamp(60px,10vh,110px)}
.island-cover .island-copy h1 span{font-size:clamp(37px,4vw,58px)}
.island-cover .island-copy h1 strong{font-size:clamp(58px,6vw,86px);text-shadow:0 3px 12px #17384b80}
.island-cover .island-promise{font-size:17px}
.island-choices{gap:10px;margin-bottom:18px}
.island-choices button{min-height:132px;border:1px solid #e3e9d2a8;background:#123f52d9;box-shadow:0 8px 20px #0d30422e}
.island-choices button.selected{border:2px solid #e7c46b;background:#205260e8;box-shadow:0 8px 22px #0d304240}
.island-cover .island-enter{background:#f2ca69;color:#183b49;box-shadow:0 6px 18px #0d304238;border:0}
.island-cover .island-player{width:235px;height:260px;right:16%}
.island-cover .island-player:after{opacity:.55}
.theme-card{border-width:1px;box-shadow:0 8px 22px #173e4a14}
.theme-card.selected{border-width:2px;box-shadow:0 8px 22px #173e4a20}
.map-viewport .game-world{border:2px solid #667c79;box-shadow:none}
.map-viewport .world-heading{background:#174b5a;border-bottom:1px solid #a7c1b9}
.map-viewport .world-intro{background:#174b5ae8;border-bottom:1px solid #d4c49c}
.map-viewport .game-scroll{filter:saturate(.82)}
.map-viewport .game-go{background:#e8bf69;color:#183e4d;box-shadow:none}
.map-viewport .game-go:hover{background:#f0cb7d}
.map-viewport .level-text{background:#fffaf0eb;border:1px solid #b9b9a8;box-shadow:0 5px 15px #23404c18}
.modal.quiz-modal,.modal.reward-modal{border-width:2px;box-shadow:0 18px 44px #12364338}
.quiz-modal .pipe-play-scene,.quiz-modal .quiz-scene,.reward-modal .reward-scene{filter:saturate(.83)}
.pipe-quiz .pipe-mission{background:#f5ead0;border:1px solid #c7b48d;margin:8px 0 10px}
.pipe-quiz .pipe-play-scene{border-width:1px;margin-top:12px}
.pipe-quiz .pipe-option>span{background:#fffaf0e8;border-top-width:1px}
@media(max-width:700px){
 .island-cover .island-shade{background:linear-gradient(180deg,#103c51e8 0%,#164655ae 42%,#1646551a 80%)}
 .island-cover .island-copy{padding:42px 16px 45px}
 .island-cover .island-copy h1 span{font-size:31px}
 .island-cover .island-copy h1 strong{font-size:49px}
 .island-cover .island-promise{font-size:14px;margin:12px 0 5px}
 .island-cover .island-subjects{margin-bottom:18px}
 .island-choices{gap:7px;margin-bottom:15px}
 .island-choices button{min-height:114px}
 .cover-face{height:70px}
 .island-cover .island-hint{margin-top:12px}
}
.preview-shell .island-cover .island-shade{background:linear-gradient(180deg,#103c51e8 0%,#164655ae 42%,#1646551a 80%)}
.preview-shell .island-cover .island-copy{padding:42px 16px 45px}
.preview-shell .island-cover .island-copy h1 span{font-size:31px}
.preview-shell .island-cover .island-copy h1 strong{font-size:49px}
.preview-shell .island-cover .island-promise{font-size:14px;margin:12px 0 5px}
.preview-shell .island-cover .island-subjects{margin-bottom:18px}
.preview-shell .island-choices button{min-height:114px}
.preview-shell .cover-face{height:70px}
.preview-shell .island-cover .island-hint{margin-top:12px}
