/* v52: requested windows, dark plan, knee framing, full-screen map and swimming. */
body.game-theme .creation-panel,body.game-theme .decision-panel{background:#17131ef5;color:#f7f4f8;border:2px solid #a89bac;border-top:4px solid var(--gta-gold);border-radius:0;box-shadow:6px 6px 0 #08070ccc;padding:26px;box-sizing:border-box}
body.game-theme .creation-panel h1,body.game-theme .decision-panel h2{font-family:var(--gta-title)!important;color:#fff!important;text-shadow:2px 2px #08070c;letter-spacing:-.025em;-webkit-text-stroke:0}
body.game-theme .creation-panel p,body.game-theme .creation-panel label,.creation-panel legend{color:#eee6ec!important;line-height:1.45}
.creation-panel legend{font-size:14px}
body.game-theme .creation-panel input{background:#0c0b10!important;color:#fff4df!important;border:2px solid #a89bac!important;border-radius:0;padding:11px 12px;box-sizing:border-box;font:400 16px Arial,sans-serif}
.creation-panel input:focus-visible{outline:2px solid var(--gta-gold);outline-offset:2px}
body.game-theme .creator-options button{background:#28222d!important;color:#f7edda!important;border:1px solid #a89bac!important;min-height:42px!important}
body.game-theme .creator-options button.chosen{background:#79253f!important;color:#fff4df!important;border-color:#f2c36f!important}
.creator-colors{flex-wrap:wrap;gap:10px;padding:3px}
body.game-theme .creator-colors button{background:#17131e!important;border:1px solid #a89bac!important;width:36px;height:36px;min-height:36px}
body.game-theme .creator-colors button.chosen{outline:2px solid #f2c36f;outline-offset:2px}
.creation-panel .actions{margin-top:20px;display:flex;flex-wrap:wrap;gap:10px}
.creation-panel .actions button{flex:1;min-width:120px}
.summer-mode .creation-screen{display:grid;grid-template-columns:minmax(260px,1fr) minmax(400px,580px);gap:28px;padding:120px max(24px,5vw) 36px;overflow:visible;align-items:start}
.summer-mode .creation-screen .creation-panel{width:100%;margin:0;grid-column:2;max-width:580px}
.creation-screen .creation-preview{position:sticky;top:115px;left:auto;bottom:auto;width:100%;height:min(78svh,850px);grid-column:1;grid-row:1;align-self:start}
.creation-preview .player-avatar{height:100%;width:auto;max-width:100%}
.summer-mode .gender-panel{margin:22svh auto 40px;width:min(620px,calc(100% - 40px))}
.gender-panel .actions button{flex:none}

/* Both dialogue actors share a crown-to-knees viewport. Original sprite anchors remain intact in games. */
.novel-figure.figure-self,.novel-figure.figure-dean,.review-figure{position:absolute;left:200px;bottom:0;top:auto;width:min(44vw,600px);height:min(76svh,780px);overflow:hidden;display:block;pointer-events:none}
.novel-figure.figure-self .player-avatar,.review-figure.figure-self .player-avatar{position:absolute;top:var(--avatar-crown-offset,-2%);left:50%;translate:-50% 0;height:140%;width:auto;max-height:none;max-width:none}
.novel-figure.figure-dean img,.review-figure.figure-dean img{position:absolute;top:-1.8%;left:50%;translate:-50% 0;height:101.8%;width:auto;max-width:none;object-fit:contain;filter:none;border:0;box-shadow:none}
.review-figure>img{width:100%;height:100%;object-fit:contain;object-position:bottom}
.dialogue-navigation{display:flex;margin:0 0 12px;gap:8px}
body.game-theme .dialogue-navigation button{min-height:34px;font:700 12px Arial,sans-serif!important;padding:7px 12px!important;letter-spacing:0;text-transform:none;box-shadow:none!important}
body.game-theme button:disabled{cursor:default}
.currency-diamond{display:inline-block;width:22px;height:20px;flex:none;vertical-align:-4px;overflow:visible}
.gem-amount{display:inline-flex;align-items:center;gap:6px;vertical-align:middle;white-space:nowrap}
.summer-gems .gem-amount{font:700 24px Arial,sans-serif}
.summer-gems .currency-diamond{width:29px;height:26px}
.final-gate-status{display:block;font:400 11px/1.45 Arial,sans-serif;color:#dbd0c2;margin:6px 0 9px}

/* The plan retains its structure and full-height right-hand position. */
body.game-theme .summer-plan{background:#17131ef7;color:#f4ecdf;border-left:2px solid #a89bac}
.summer-plan .plan-heading{border-bottom-color:#53424f}
.summer-plan .plan-heading .novel-speaker{color:#f2c36f}
body.game-theme .summer-plan h2{font-family:var(--gta-title)!important;color:#fff;text-shadow:2px 2px #08070c}
body.game-theme .summer-plan .plan-heading p{color:#d9cfda}
body.game-theme .summer-plan button.plan-close{color:#f2c36f!important}
.summer-plan progress,.summer-plan progress::-webkit-progress-bar{background:#3e303d}
.summer-plan progress::-webkit-progress-value{background:#f2c36f}.summer-plan progress::-moz-progress-bar{background:#f2c36f}
.summer-plan ul{scrollbar-color:#a89bac #17131e}
.summer-plan li{border-bottom-color:#473745;color:#f4ecdf}
.summer-plan li>span:first-child{color:#e6cfaa}
.summer-plan li small{color:#bfb2c3}
.summer-plan li.done{color:#a69caa}.summer-plan li.done>span:first-child{color:#bce5ce}
.summer-plan li.refused{color:#d3b8bd}.summer-plan li.refused>span:first-child{color:#f2c36f}
.summer-plan .refused-label{color:#f2c36f;font-weight:700;text-decoration:none}
.summer-plan li.refused>span:last-child{text-decoration:none}
.plan-bottom{background:#100d16;color:#d8c8d2;border-top-color:#53424f}
.summer-tasks-panel.task-full-page{background:#17131ef5;color:#fff;border:2px solid #a89bac}
.task-full-page li.refused{color:#d3b8bd}

/* Profile replaces the scene and its HUD rather than sitting on top of campus. */
body.game-theme.profile-isolated{--summer-plan-width:0px;background:#17131e}
body.profile-isolated #scene,body.profile-isolated>.shade,body.profile-isolated #campus-scene-cache,body.profile-isolated #summer-ui,body.profile-isolated>footer{display:none!important}
body.game-theme.profile-isolated #game-header{background:#100d16;padding-right:24px;border-bottom:1px solid #53424f}
body.game-theme.profile-isolated.work #app{padding:124px 24px 40px!important;max-width:1160px;margin:0 auto;min-height:100svh;box-sizing:border-box}
body.profile-isolated .player-profile{width:100%;margin:0;max-width:none!important;box-sizing:border-box}
.profile-isolated .player-profile .stage-back{position:static;display:flex;flex-wrap:wrap;gap:12px;padding:22px 28px;margin:0}
.profile-isolated .player-profile .stage-back button{flex:1 1 170px;max-width:310px}
.profile-isolated .work-head{gap:20px}

/* One proportional image plane contains both illustration and hotspots; cover + native pan avoids black bars. */
body.game-theme.full-map-mode{overflow:hidden;--summer-plan-width:0px}
body.full-map-mode #game-header,body.full-map-mode #summer-ui,body.full-map-mode #scene,body.full-map-mode>.shade,body.full-map-mode #campus-scene-cache,body.full-map-mode>footer{display:none!important}
body.full-map-mode #app{width:100vw;height:100dvh;min-height:0;padding:0!important;max-width:none;overflow:hidden}
.full-map-mode .summer-map-screen{position:fixed;inset:0;padding:0!important;min-height:0;height:100dvh;width:100vw;overflow:hidden;background:#6e794c}
.summer-map-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;scrollbar-width:thin;cursor:grab}
.summer-map-viewport:active{cursor:grabbing}
.full-map-mode .summer-map-canvas{--map-zoom:1;position:relative;aspect-ratio:1672/941;width:calc(max(100vw,100dvh * 1672 / 941) * var(--map-zoom));min-width:0;max-width:none;height:auto;margin:0;padding:0;box-shadow:none;border:0;overflow:visible}
.full-map-mode .summer-map-canvas>img{display:block;width:100%;height:auto;aspect-ratio:1672/941;object-fit:fill;pointer-events:none}
.full-map-mode .map-locations{position:absolute;inset:0}
body.game-theme.full-map-mode .map-locations button{position:absolute;translate:-50% -50%;transform:none!important;font:700 13px/1.25 Arial,sans-serif!important;letter-spacing:0;text-transform:none;min-height:44px;min-width:108px;max-width:175px;padding:7px 10px!important;background:#17131ef2!important;color:#fff4df!important;border:1px solid #f2c36f!important;white-space:normal}
.full-map-mode .map-locations button b{display:block;font:inherit}
.full-map-mode .map-locations button span{display:block;font-size:12px;color:#f2c36f;margin-top:3px}
.full-map-mode .map-caption{position:fixed;top:16px;left:16px;margin:0;padding:13px 16px;max-width:280px;background:#17131ef5;color:#fff4df;border:2px solid #a89bac;z-index:5;pointer-events:none;box-sizing:border-box}
.full-map-mode .map-caption span{font:700 11px Arial,sans-serif;color:#f2c36f}
.full-map-mode .map-caption h1{font-size:26px!important;margin:6px 0 12px}
.full-map-mode .map-caption button{pointer-events:auto;min-height:42px;font-size:14px!important;padding:8px 14px!important}
.map-tools{position:fixed;right:16px;bottom:16px;z-index:5;display:flex;gap:8px;align-items:center;padding:10px;background:#17131ef5;border:1px solid #a89bac;max-width:calc(100vw - 32px);box-sizing:border-box}
.map-tools span{font:400 12px/1.3 Arial,sans-serif;max-width:180px;color:#fff4df}
body.game-theme .map-tools button{min-width:44px;min-height:44px;padding:7px!important;font:900 22px Arial,sans-serif!important}

/* Refusal confirmation and immutable dialogue review use the existing game panel language. */
#journey-overlay{position:relative;z-index:100}
.decision-curtain{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:#0c0b10a6;overflow:auto;box-sizing:border-box}
.decision-panel{max-width:600px;width:100%;max-height:calc(100dvh - 48px);overflow:auto}
body.game-theme .decision-panel h2{font-size:30px!important;margin:0 0 16px}
body.game-theme .decision-panel p{font:400 16px/1.5 Arial,sans-serif;color:#f7edda}
.decision-panel .actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.decision-panel .actions button{flex:1 1 160px;font-size:15px!important}
.refusal-costs{display:flex;flex-wrap:wrap;gap:10px;list-style:none;margin:16px 0;padding:0}
.refusal-costs li{padding:9px 12px;border:1px solid #a89bac;background:#0c0b10;color:#f4ecdf;font:400 15px Arial,sans-serif}
.refusal-costs b{color:#f2c36f;margin-left:6px}
.dialogue-review{position:fixed;inset:0;background:#17131e var(--review-art) center/cover no-repeat;overflow:auto;isolation:isolate}
.dialogue-review:before{content:'';position:fixed;inset:0;background:linear-gradient(0deg,#100d1470,transparent 65%);z-index:-1;pointer-events:none}
.review-dialogue{margin-top:max(300px,calc(100svh - 340px));margin-right:24px;max-height:calc(100svh - 80px)}
.review-dialogue p{white-space:pre-line}
.review-controls{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.review-controls button{font:700 14px Arial,sans-serif!important;min-height:42px;padding:10px 14px!important;text-transform:none;letter-spacing:0}
.review-dialogue small{color:#bcadba;font:400 11px Arial,sans-serif}

/* Compact breath control; the swimmer itself remains in the pool's image coordinates. */
.scene-swimmer{animation:none!important;transition:left .1s linear,top .1s linear,width .1s linear,height .1s linear!important}
.swim-wake{transition:left .1s linear,top .1s linear,width .1s linear,opacity .2s;filter:none!important}
.swim-hold{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.game-theme .swim-hold[aria-pressed="true"]{background:#79253f!important;border-color:#fff4df!important}
.swim-breath{display:grid;grid-template-columns:1fr auto;width:100%;gap:5px;font:400 12px Arial,sans-serif;margin-top:8px;color:#eee2e8}
.swim-breath meter{grid-column:1/-1;width:100%;height:9px;appearance:none;background:#3e303d;border:0}
.swim-breath meter::-webkit-meter-bar{background:#3e303d;border:0}.swim-breath meter::-webkit-meter-optimum-value{background:#f2c36f}.swim-breath meter::-moz-meter-bar{background:#f2c36f}
.swim-challenge .play-status{max-width:300px}
.swim-challenge .play-status [data-swim-status]{font-size:12px!important;color:#f2c36f;margin:7px 0 0;min-height:18px}
.swim-challenge .play-status>p{font-size:12px!important}

@media(min-width:1100px) and (max-width:1400px){.novel-figure.figure-self,.novel-figure.figure-dean{left:120px;width:42vw}}
@media(max-width:1099px){
 .novel-figure.figure-self,.novel-figure.figure-dean{left:90px;width:48vw}
 .summer-mode .creation-screen{grid-template-columns:minmax(220px,1fr) minmax(380px,1.2fr);gap:18px;padding-inline:22px}
}
@media(max-width:760px){
 .summer-mode .creation-screen{grid-template-columns:minmax(105px,.65fr) minmax(190px,1fr);gap:10px;padding:104px 10px 28px}
 .summer-mode .creation-screen .creation-panel{padding:16px 12px;margin:0;width:100%;min-width:0}
 .creation-screen .creation-preview{top:110px;height:55svh;width:100%;left:auto}
 body.game-theme .creation-panel h1{font-size:26px!important;margin-bottom:17px}
 .creation-panel fieldset{margin-top:15px}.creation-panel .creator-options button{font-size:12px!important;min-height:38px!important;padding:8px!important}
 .creator-colors{gap:8px}.creator-colors button{width:30px!important;height:30px!important;min-height:30px!important}
 .creation-panel .actions button{min-width:0;flex:1 1 100%;font-size:14px!important}
 .creation-panel input{min-width:0}.creation-panel legend{font-size:13px}
 .summer-mode .gender-panel{margin:24svh auto 30px;width:calc(100% - 26px);padding:22px}
 .gender-choices{gap:10px}
 .summer-enabled .summer-stats{top:94px;padding:8px 10px;display:grid;grid-template-columns:1fr auto;gap:4px 10px}
 .summer-enabled .hero-mini{height:28px!important;grid-column:1/2;width:auto}
 .summer-enabled .hero-mini .player-avatar{width:20px;height:26px}.hero-mini .avatar-color{height:40px}
 .summer-stat-grid{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0}
 .summer-stat-grid>div{font-size:11px;gap:2px}
 .summer-enabled .summer-gems{grid-column:2;grid-row:1;padding:0;text-align:right}
 .summer-gems .gem-amount{font-size:18px}.summer-gems .currency-diamond{width:21px;height:19px}
 .summer-enabled .summer-stats>p{grid-column:1;grid-row:3;margin:0;align-self:center;font-size:10px}
 .final-gate-status{grid-column:1/-1;grid-row:4;margin:0;font-size:10px}
 .summer-enabled .summer-finish{grid-column:2;grid-row:3;width:auto;min-height:24px;padding:4px 7px!important;font-size:10px!important}
 .summer-enabled .summer-nav{top:229px;left:10px;right:10px;width:auto;display:flex;flex-wrap:wrap;flex-direction:row;gap:6px;justify-content:flex-end}
 .summer-enabled .summer-nav button{font-size:11px!important;min-height:36px!important;padding:7px 9px!important}
 .summer-enabled .walk-hud{top:277px;left:14px;right:14px;max-width:calc(100vw - 28px)}
 .summer-enabled .walk-context{max-width:230px}
 .summer-enabled .play-status{top:279px;left:14px;max-width:calc(100vw - 28px);width:auto}
 .summer-enabled .play-status>span{display:none}
 .novel-figure{left:0;width:78vw;top:285px;height:37svh;bottom:auto}
 .novel-figure.figure-guest{top:285px;height:52svh;width:86%;left:-6%}
 .summer-onboarding .novel-figure{top:14svh;height:52svh;width:85vw;left:-4vw}
 .novel-figure.figure-self .player-avatar{height:140%;max-height:none}
 .novel-dialogue{margin-top:68svh;max-height:none}
 .summer-onboarding .novel-dialogue{margin-top:67svh}
 .dialogue-navigation{margin-bottom:10px}
 .review-figure{left:-4vw;width:85vw;height:52svh;top:12svh;bottom:auto}
 .review-dialogue{margin:65svh 12px 18px;width:calc(100% - 24px);max-height:none}
 .review-controls button{flex:1 1 110px}
 .location-panel{margin-top:287px}
 .date-booking-note,.story-chapter-label{top:277px;max-width:calc(100vw - 28px)}
 .story-native-targets,.ending-scene-targets{top:310px;height:18svh}
 .story-scene-choice,.ending-target{min-height:48px}
 .summer-enabled .scene-challenge-head{top:279px}
 .summer-enabled .campus-talk{bottom:14px;max-height:46svh;overflow-y:auto}
 .summer-enabled .campus-result{bottom:20px}
 body.game-theme.summer-enabled.work #app{padding-top:282px}
 body.game-theme.profile-isolated.work #app{padding:110px 12px 25px!important}
 body.game-theme.profile-isolated #game-header{padding-right:12px}
 .profile-isolated .player-profile .stage-back{padding:18px;gap:10px}
 .full-map-mode .map-caption{top:10px;left:10px;padding:10px 12px;max-width:190px}
 .full-map-mode .map-caption h1{font-size:22px!important;margin:5px 0 8px}
 .full-map-mode .map-caption span{font-size:10px}
 .map-tools{right:10px;bottom:10px;max-width:calc(100vw - 20px);padding:8px}
 .map-tools span{font-size:11px;max-width:145px}
 body.game-theme.full-map-mode .map-locations button{font-size:12px!important;min-height:44px;min-width:110px}
 .decision-curtain{padding:14px}.decision-panel{max-height:calc(100dvh - 28px);padding:20px!important}
 .decision-panel .actions button{flex:1 1 100%}
 .swim-challenge .play-status{max-width:220px;top:279px}
 .swim-challenge .play-status h2{font-size:16px!important}
 .swim-challenge .scene-play-controls{bottom:max(16px,env(safe-area-inset-bottom));width:calc(100vw - 32px);justify-content:center}
 .swim-challenge .scene-play-controls .swim-hold{min-height:52px;flex:1}
}
@media(max-width:380px){.summer-mode .creation-screen{grid-template-columns:90px minmax(175px,1fr);gap:6px;padding-inline:6px}.creator-colors{gap:6px}.creator-colors button{width:29px!important;height:29px!important;min-height:29px!important}}
@media(prefers-reduced-motion:reduce){.scene-swimmer,.swim-wake{transition:none!important}}

.refusal-history li small{display:block;font:400 12px/1.5 Arial,sans-serif;color:#c8b9c7;margin-top:5px}
.refusal-history li b{color:#f2c36f}
@media(max-width:1099px){body.game-theme .summer-plan{z-index:40}.summer-plan-open #summer-ui:before{z-index:39}}

body.game-theme .summer-plan{height:100dvh}
@media(max-height:560px) and (max-width:980px){
 body.game-theme.summer-enabled>header{height:64px;padding-block:8px}
 .summer-enabled .summer-stats{top:76px;left:10px;width:154px;display:block;padding:8px}
 .summer-enabled .hero-mini{height:24px!important}.summer-stat-grid{grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}
 .summer-enabled .summer-gems{padding-top:5px;text-align:left}.summer-enabled .summer-stats>p{margin:4px 0}
 .summer-enabled .final-gate-status{font-size:9px}.summer-enabled .summer-finish{width:100%}
 .summer-enabled .summer-nav{top:76px;left:auto;right:10px;width:130px;flex-direction:column;gap:5px}
 .summer-enabled .summer-nav button{min-height:32px!important}
 .summer-enabled .walk-hud{top:76px;left:180px;right:155px}.summer-enabled .walk-context{max-width:250px}
 .summer-enabled .play-status,.summer-enabled .scene-challenge-head{top:130px;left:180px;max-width:240px;width:auto}
 .swim-challenge .play-status>p{font-size:10px!important;margin:5px 0}.swim-challenge .play-status{padding:9px}
 .novel-figure,.summer-onboarding .novel-figure{top:17svh;height:80svh;width:45vw;left:8vw}
 .novel-dialogue,.summer-onboarding .novel-dialogue{margin:50svh 15px 20px auto;width:51%}
 .summer-mode .creation-screen{padding-top:80px}.creation-screen .creation-preview{top:80px;height:75svh}
 .full-map-mode .map-caption>span,.full-map-mode .map-caption>h1{display:none}
 .full-map-mode .map-caption{padding:8px;width:auto}
 body.game-theme.profile-isolated.work #app{padding-top:82px!important}
 .review-figure{top:10svh;height:90svh;left:0;width:45vw}.review-dialogue{width:53%;margin:28svh 15px 20px auto}
}

body.summer-ending .summer-nav{display:flex}
