/* v60: retain the existing palette and keep content inside the HUD safe area. */
body.game-theme.summer-enabled>footer{display:none!important;border:0!important}
body.game-theme .wardrobe-screen,body.game-theme .shop-screen{width:100vw!important;padding:0!important}
body.game-theme .wardrobe-panel,body.game-theme .shop-panel{width:calc(100vw - var(--play-left) - var(--play-right))!important;max-width:none!important;box-sizing:border-box!important}
body.game-theme.summer-enabled[data-stage="3"]:not(.summer-mode) #app{display:block!important;width:100%!important;max-width:none!important;padding:var(--play-top) var(--play-right) 28px var(--play-left)!important;box-sizing:border-box!important;margin:0!important}
body.game-theme.summer-enabled[data-stage="3"]:not(.summer-mode) .story-scene{width:100%!important;max-width:940px!important;min-height:0!important;margin:0 auto!important;align-content:start!important}
body.game-theme .novel-dialogue,body.game-theme .campus-talk,body.game-theme .dean-bottom-dialogue{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
body.game-theme .novel-dialogue p,body.game-theme .campus-talk p{font-size:clamp(14px,1.2vw,17px)!important;line-height:1.45!important}
body.game-theme .dialogue-navigation{margin:18px 0!important;padding:0!important}
body.game-theme .novel-actions,.reply-pages{display:flex;align-items:center;flex-wrap:wrap;gap:12px!important;margin-top:18px!important}
.reply-pages span{font:13px Arial,sans-serif;color:#c9bdbc}.reply-pages button{min-height:36px!important}.novel-actions[hidden],.actions[hidden],.dialogue-actions[hidden],.reply-pages button[hidden]{display:none!important}
body.game-theme .summer-gems{position:relative;display:flex;align-items:center;gap:8px}
body.game-theme .summer-gems>.stat-delta{position:relative;inset:auto;margin-left:8px;font:700 18px Arial,sans-serif}
body.game-theme.summer-enabled.dean-intro-mode .dean-showcase{bottom:270px!important;overflow:visible!important}
body.game-theme.summer-enabled.dean-intro-mode .dean-showcase .intro-dean{inset:0 5% auto auto!important;object-fit:contain!important;filter:none!important;animation:none!important;max-width:100%!important}
body.game-theme.work .workspace.dean-chat-finale.dean-chat-split{display:grid!important;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr)!important;align-items:center!important;gap:24px!important;padding:24px!important;min-height:0!important}
body.game-theme.work .dean-chat-split .dean-cutout-wrap{position:relative!important;inset:auto!important;width:100%!important;height:440px!important;max-height:calc(100svh - 220px)!important;min-height:0!important;overflow:hidden!important;align-self:center!important;border:0!important}
body.game-theme.work .dean-chat-split .dean-cutout-image{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center!important;transform:none!important;filter:none!important}
body.game-theme.work .dean-chat-split .dean-dialog-panel{padding:0!important;margin:0!important;min-width:0!important;display:block!important}
body.game-theme.work .dean-chat-split .gta-dialogue-label{font-size:clamp(24px,2.5vw,36px)!important;margin-bottom:18px!important}
body.game-theme.work .dean-chat-split .dean-dialogue-copy{padding:18px!important}
body.game-theme.work .dean-chat-split .dialogue-choices{margin-top:16px!important;gap:12px!important}
body.game-theme.work .dean-chat-split .stage-back{margin-top:16px!important}
body.game-theme .story-heading,body.game-theme .game-dialogue{width:100%!important;max-width:940px!important;margin:0!important;box-sizing:border-box!important}
body.game-theme .story-scene{display:grid;justify-items:center;gap:20px}
body.game-theme .story-heading{padding:28px 32px!important;text-align:center!important}
body.game-theme .story-heading .lead{max-width:700px!important;margin:18px auto 0!important}
body.game-theme .game-dialogue{grid-template-columns:1fr!important;padding:24px 30px!important;text-align:center!important;gap:16px!important}
body.game-theme .game-dialogue .speaker-avatar{display:none!important}
body.game-theme .game-dialogue .speaker-name{display:block;text-align:center;font-size:19px!important;margin-bottom:14px}
body.game-theme .game-dialogue .dialogue-copy p{max-width:760px;margin:0 auto!important;min-height:0!important}
body.game-theme .game-dialogue .dialogue-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}
body.game-theme .level-task-complete .work-head{position:relative;text-align:center;display:block!important;padding:30px 28px!important}
body.game-theme .level-task-complete .work-head h2{margin:18px 0!important;padding:0 85px;font-size:clamp(28px,3vw,44px)!important}
body.game-theme .level-task-complete .work-head p{max-width:740px;margin:0 auto!important}
body.game-theme .level-task-complete .step-count{position:absolute;right:18px;top:18px;font-size:18px!important}
body.game-theme.summer-enabled.result-page #app{display:block!important;margin:0!important;padding:var(--play-top) var(--play-right) 28px var(--play-left)!important;box-sizing:border-box!important;width:100%!important;min-height:100svh!important}
body.game-theme.result-page .result{width:100%!important;max-width:840px!important;margin:0 auto!important;padding:24px!important;box-sizing:border-box!important}
body.game-theme.result-page .result h1{font-size:clamp(32px,3.3vw,48px)!important;line-height:1.05!important;margin:12px 0 22px!important}
body.game-theme.result-page .complete-icon{width:45px!important;height:45px!important;font-size:28px!important;margin-bottom:16px!important}
body.game-theme.result-page .program-qr{margin:20px 0!important;padding:16px!important}
body.game-theme.result-page .program-qr img{width:100px!important;height:100px!important}
body.game-theme.result-page .result-navigation{gap:12px!important;margin-top:18px!important}
body.game-theme.summer-enabled .simulator-layout .campus-quest{inset:174px var(--play-right) auto auto!important;width:min(500px,calc(100vw - var(--play-left) - var(--play-right)))!important;height:auto!important;max-height:calc(100svh - 198px)!important;margin:0!important;padding:18px!important;overflow:auto!important}
body.game-theme .campus-quest .quest-head{margin:0!important}.campus-quest .quest-head h2{font-size:24px!important;margin:0 0 8px!important}
body.game-theme .campus-quest .quest-head p{font-size:14px!important;min-height:40px!important;margin:0!important}
body.game-theme .campus-quest .memory-board.photo-memory{width:min(100%,410px,calc((100svh - 410px)*1.35))!important;margin:12px auto!important;gap:7px!important}
body.game-theme .campus-quest .maze-board,body.game-theme .campus-quest .ttt-board{width:min(100%,300px,calc(100svh - 410px))!important;margin:12px auto!important}
body.game-theme .campus-quest .quest-metrics{margin:8px 0!important;font-size:13px!important}.campus-quest .quest-actions{margin-top:12px!important}
/* The target uses exactly the same silhouette and baseline as the movable dish. */
body.game-theme .date-kind-cafe .date-game-dialogue{top:var(--play-top)!important;bottom:auto!important;padding:18px 22px!important;width:min(580px,calc(100vw - var(--play-left) - var(--play-right)))!important}
body.game-theme .date-kind-cafe .date-game-dialogue p{font-size:15px!important;min-height:0!important}
body.game-theme .date-kind-cafe .scene-pan-canvas{height:100svh!important;width:max(100vw,calc(100svh * 1.777))!important;aspect-ratio:1.777!important}
body.game-theme .date-game-screen button.date-table-item,body.game-theme .date-game-screen button.date-table-spot{left:var(--date-x)!important;top:var(--date-y)!important;width:auto!important;height:var(--dish-height,15%)!important;aspect-ratio:var(--dish-ratio,.6)!important;translate:-50% -100%!important;transform:none!important;background:transparent!important;border:0!important;padding:0!important;min-height:0!important;min-width:0!important;box-shadow:none!important;touch-action:none!important;overflow:visible!important}
body.game-theme .date-item-visual{position:relative!important;inset:auto!important;translate:none!important;display:block!important;width:100%!important;height:100%!important;padding:0!important;background:transparent!important;overflow:hidden!important;pointer-events:none}
body.game-theme .date-item-visual img{position:absolute!important;max-width:none!important;object-fit:fill!important;pointer-events:none!important;user-select:none!important;-webkit-user-drag:none!important}
body.game-theme .date-table-spot .date-item-visual{filter:brightness(0) invert(.94);opacity:.48}
body.game-theme .date-table-spot>.date-spot-label{bottom:calc(100% + 8px)!important;top:auto!important;font-size:12px!important;width:125px!important;background:#17131edb!important;color:#fff4df!important}
body.game-theme .date-table-item.selected{outline:2px dashed #f2c36f!important;outline-offset:6px!important}.date-table-item.dragging{opacity:.15}
body.game-theme button.date-drag-preview{inset:auto!important;translate:-50% -75%!important;transform:none!important;width:var(--drag-w,90px)!important;height:var(--drag-h,120px)!important;z-index:200!important;pointer-events:none!important}
/* The book investigation is part of the room. */
body.game-theme .library-play-screen .scene-pan-viewport{overflow:hidden!important;pointer-events:none}
body.game-theme .library-play-screen .scene-pan-canvas{pointer-events:auto}
body.game-theme .library-game-dialogue{top:var(--play-top)!important;bottom:auto!important;left:var(--play-left)!important;width:calc(100vw - var(--play-left) - var(--play-right))!important;min-width:0!important;padding:16px 20px!important;box-sizing:border-box}
body.game-theme .library-game-dialogue .novel-actions{margin-top:12px!important}.library-game-dialogue p{margin:8px 0!important}
body.game-theme .detective-clue{position:fixed;left:auto!important;right:var(--play-right);top:calc(var(--play-top) + 200px)!important;width:235px;font:14px/1.4 Georgia,serif;rotate:0;padding:14px}
.detective-clue ul{margin:0!important}.detective-clue .verified{color:#225244;font-weight:bold}
body.game-theme .library-play-screen .detective-clue{transform:none!important}
body.game-theme .library-play-screen .detective-clue>b{display:block;font:700 17px/1.25 Georgia,serif!important;margin:4px 0 8px!important;color:#30232a!important;text-shadow:none!important}
body.game-theme .library-play-screen .detective-pages h3{font:700 20px/1.2 Georgia,serif!important;margin:10px 0!important;color:#30232a!important;text-shadow:none!important}
body.game-theme .detective-shelf{position:fixed;left:var(--play-left);right:calc(var(--play-right) + 255px);width:auto;top:49%;height:100px}
.detective-investigation{position:fixed;left:calc(var(--play-left) + 70px);bottom:32px;width:255px;height:240px;display:flex;flex-direction:column;align-items:center;gap:6px}
.investigation-book{position:relative;width:100%;height:calc(100% - 40px);touch-action:none;cursor:grab}.investigation-book:active{cursor:grabbing}
.detective-investigation .detective-book-cover{padding:10px;gap:5px}.detective-investigation .detective-book-cover>b{font-size:21px!important}
body.game-theme .detective-book-cover .book-symbol{padding:0!important;width:48px;height:42px;min-height:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:white!important;flex:none}
.book-symbol svg{width:100%;height:100%}
body.game-theme .detective-book-cover .book-color{font:12px/1.2 Arial,sans-serif!important;padding:6px!important;min-height:0!important;background:#17131e90!important}
.book-leaf-actions button{font-size:12px!important;padding:7px 10px!important;min-height:30px!important}
.detective-pages{height:100%;background:#f5e6c9;border-left:10px solid #7e243d;box-shadow:4px 5px #20172255;color:#30232a;padding:16px;box-sizing:border-box}
.detective-pages>span{font:9px Arial,sans-serif}.detective-pages h3{font:700 20px/1.2 Georgia,serif!important;margin:10px 0;color:#30232a!important;text-shadow:none!important}
body.game-theme .detective-pages .book-passage{display:block;font:14px/1.4 Georgia,serif!important;color:#30232a!important;background:transparent!important;border:1px dashed #a36d57!important;padding:8px!important;min-height:0!important;margin:10px 0!important;box-shadow:none!important;text-transform:none!important;text-shadow:none!important}
body.game-theme .detective-handoff{position:fixed;left:auto;right:calc(var(--play-right) + 45px);bottom:70px;width:185px;height:100px;border:2px dashed #f2c36f!important;background:#17131edb!important;color:#fff4df!important;padding:12px!important;min-height:0!important;display:flex;flex-direction:column;justify-content:center;gap:8px;transform:none!important}
.detective-handoff span{font:700 12px Arial,sans-serif;color:#f2c36f}.detective-handoff b{font:14px/1.3 Arial,sans-serif}.detective-handoff:disabled{opacity:.65}
/* Names and friends are mentioned in dialogue, with no extra strip. */
body.game-theme .pdnj-screen .finale-content{display:contents!important;position:static!important;overflow:visible!important;padding:0!important}
body.game-theme .pdnj-screen .finale-content .v59-company{position:fixed!important;inset:var(--play-top) var(--play-right) var(--company-bottom,280px) var(--play-left)!important;width:auto!important;height:auto!important;min-height:0!important;flex:none!important;gap:0!important;align-items:flex-start!important}
body.game-theme .pdnj-screen .v59-company figure{flex:0 1 32%!important;max-width:340px!important;width:auto!important;overflow:visible!important;margin:0!important}
body.game-theme .pdnj-screen .v59-company figure>img{height:130%!important;object-fit:contain!important;filter:none!important}
body.game-theme .pdnj-screen .v59-company .company-dean>img{height:110%!important}
body.game-theme .pdnj-screen .finale-content .novel-dialogue{position:fixed!important;inset:auto var(--play-right) var(--play-bottom) var(--play-left)!important;width:auto!important;max-width:940px!important;margin:0 auto!important;padding:20px 24px!important;max-height:none!important;overflow:visible!important}
body.game-theme .wardrobe-panel{padding:22px!important}.wardrobe-panel h1{font-size:clamp(24px,2.5vw,34px)!important;margin:10px 0!important}
body.game-theme .wardrobe-choices{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}
body.game-theme .wardrobe-panel .outfit-choice{padding:8px!important;margin:0!important}.wardrobe-panel .outfit-preview{height:145px!important}
body.game-theme .wardrobe-panel .outfit-choice h2{font-size:16px!important;min-height:38px;margin:8px 0 4px!important}
body.game-theme .wardrobe-panel .outfit-choice p{font-size:11px!important;line-height:1.3!important;min-height:42px;margin:4px 0 8px!important}
body.game-theme .wardrobe-panel .outfit-choice button{font-size:11px!important;min-height:38px!important;padding:6px!important}
body.game-theme .map-locations button.map-shop{display:flex;align-items:center;gap:8px;background:#211b29f2!important;padding:8px 10px!important;border:2px solid #b29b6e!important;min-width:0!important;width:auto!important;max-width:none!important}
.map-shop svg{width:32px;height:28px;flex:none}.map-shop b{font-size:13px!important}
.shop-panel{position:relative;margin:var(--play-top) var(--play-right) 30px var(--play-left);padding:26px;background:#17131ef2;border:2px solid #a89bac;color:#fff4df;text-align:center;box-sizing:border-box}
.shop-panel h1{font-size:36px!important;margin:10px 0}.shop-panel>p{font-size:15px!important}
.shop-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:650px;margin:20px auto}
.shop-product{display:flex;flex-direction:column;gap:10px;background:#25202b;border:1px solid #766b7b;padding:18px;min-width:0}.shop-product-art{height:150px}.shop-product-art>*{width:100%;height:100%;object-fit:contain}.shop-product h2{font-size:22px!important;margin:0}.shop-product p{font-size:13px!important;min-height:35px;margin:0}.shop-product>b{font-size:14px;color:#f2c36f}.shop-product small{font-size:12px}.shop-product button{min-height:44px!important;font-size:13px!important}.shop-receipt{min-height:22px;font:14px Arial,sans-serif;color:#efcc87}.shop-panel .actions{justify-content:center}
@media(max-width:760px){
 body.game-theme .novel-dialogue,body.game-theme .campus-talk{padding:14px 16px!important}
 body.game-theme .novel-dialogue p,body.game-theme .campus-talk p{font-size:14px!important;line-height:1.4!important}
 body.game-theme .dialogue-navigation{margin:12px 0!important}.novel-actions{margin-top:12px!important}
 body.game-theme .novel-actions button{font-size:12px!important;min-height:38px!important;padding:9px 11px!important}
 body.game-theme.summer-enabled.dean-intro-mode .dean-showcase{bottom:370px!important;top:225px!important;min-height:0!important}
 body.game-theme.summer-enabled.dean-intro-mode .dean-bottom-dialogue{padding:14px 16px!important}
 body.game-theme.summer-enabled .simulator-layout .campus-quest{inset:251px 12px auto auto!important;width:calc(100vw - 24px)!important;max-height:calc(100svh - 363px)!important;padding:14px!important}
 body.game-theme .campus-quest .memory-board.photo-memory{width:min(100%,calc((100svh - 555px)*1.35))!important}
 body.game-theme .campus-quest .maze-board,body.game-theme .campus-quest .ttt-board{width:min(100%,calc(100svh - 565px))!important}
 body.game-theme .date-kind-cafe .scene-pan-canvas{height:calc(100svh - 108px)!important;width:max(100vw,calc((100svh - 108px)*1.777))!important}
 body.game-theme .date-kind-cafe .date-game-dialogue{top:225px!important;left:12px!important;right:12px!important;width:auto!important;padding:12px 14px!important}
 body.game-theme .date-kind-cafe .date-game-dialogue p{font-size:13px!important}.date-table-spot>.date-spot-label{display:none}
 body.game-theme .date-kind-cafe button.date-table-item,body.game-theme .date-kind-cafe button.date-table-spot{height:calc(var(--dish-height) * .65)!important}
 body.game-theme .date-kind-cafe .date-table-item:not(.placed){--date-y:82%!important}
 body.game-theme .date-kind-cafe .date-table-item:not(.placed)[data-value=compote]{--date-x:44%!important}
 body.game-theme .date-kind-cafe .date-table-item:not(.placed)[data-value=tea]{--date-x:53%!important}
 body.game-theme .date-kind-cafe .date-table-item:not(.placed)[data-value=cookie]{--date-x:62%!important}
 body.game-theme .date-kind-cafe .date-table-item.placed[data-value=compote],body.game-theme .date-kind-cafe .date-table-spot[data-value=compote]{--date-x:44%!important}
 body.game-theme .date-kind-cafe .date-table-item.placed[data-value=tea],body.game-theme .date-kind-cafe .date-table-spot[data-value=tea]{--date-x:62%!important}
 body.game-theme .date-kind-cafe .date-table-item.placed[data-value=cookie],body.game-theme .date-kind-cafe .date-table-spot[data-value=cookie]{--date-x:53%!important}
 body.game-theme .pdnj-screen .v59-company figure{flex-basis:30%!important}
 body.game-theme .wardrobe-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important}.wardrobe-panel .outfit-preview{height:180px!important}
 body.game-theme .story-heading{padding:20px!important}.story-heading h1{font-size:32px!important}.story-heading .lead{font-size:14px!important}
 body.game-theme .game-dialogue{padding:20px!important}.game-dialogue .dialogue-copy p{font-size:14px!important}
 body.game-theme .level-task-complete .work-head{padding:18px!important}.level-task-complete .work-head h2{padding:0!important;margin-top:35px!important}.level-task-complete .step-count{font-size:12px!important}
 body.game-theme.work .workspace.dean-chat-finale.dean-chat-split{grid-template-columns:1fr!important;padding:16px!important;gap:12px!important}
 body.game-theme.work .dean-chat-split .dean-cutout-wrap{height:180px!important;max-height:180px!important}
 body.game-theme.work .dean-chat-split .dean-cutout-image{height:300px!important;object-position:top!important}
 body.game-theme.result-page .result{padding:18px!important}.result-page .result h1{font-size:32px!important}
 .shop-panel{margin-bottom:120px;padding:16px}.shop-panel h1{font-size:28px!important}.shop-products{gap:10px}.shop-product{padding:10px}.shop-product-art{height:115px}.shop-product h2{font-size:18px!important}
 body.game-theme .library-game-dialogue{top:225px!important;padding:10px 12px!important;min-width:0!important}
 body.game-theme .library-game-dialogue p{font-size:12px!important;line-height:1.35!important}.library-game-dialogue .novel-actions{margin-top:6px!important}.library-game-dialogue button{padding:6px!important;min-height:32px!important}
 body.game-theme .detective-clue{inset:var(--library-start,362px) 12px auto 12px!important;width:auto!important;padding:8px 12px!important;font:12px/1.25 Arial,sans-serif!important}.detective-clue>span{font-size:10px!important;margin-bottom:4px!important}.detective-clue ul{padding-left:14px!important}.detective-clue li{margin:2px!important}
 body.game-theme .detective-shelf{inset:calc(var(--library-start,362px) + 100px) 12px auto 12px!important;width:auto!important;height:85px!important}.detective-spine b{font-size:11px!important}
 body.game-theme .detective-investigation{left:12px;bottom:108px;width:220px;height:calc(100svh - var(--library-start,362px) - 305px);min-height:150px;max-height:230px}
 .detective-investigation .detective-book-cover>b{font-size:16px!important}.detective-investigation .detective-book-cover{gap:2px;padding:6px}.detective-investigation .book-symbol{height:25px!important;width:30px!important}.detective-investigation .book-color{font-size:10px!important;padding:3px!important}.detective-pages{padding:9px}.detective-pages h3{font-size:16px!important;margin:5px 0}.detective-pages .book-passage{font-size:12px!important;padding:5px!important;margin:5px 0!important}
 body.game-theme .detective-handoff{left:auto;right:12px;bottom:148px;width:125px;height:95px;padding:8px!important}.detective-handoff b{font-size:12px!important}
 body.game-theme .library-play-screen .detective-clue>b{font-size:14px!important;margin:3px 0 5px!important}
 body.game-theme .library-play-screen .detective-investigation{height:170px;min-height:170px}
 body.game-theme .library-play-screen .detective-pages{padding:7px!important}
 body.game-theme .library-play-screen .detective-pages h3{font-size:16px!important;line-height:1.15!important;margin:5px 0!important}
 body.game-theme .library-play-screen .detective-pages .book-passage{font-size:12px!important;line-height:1.25!important;padding:5px!important;margin:5px 0!important}
}
@media(max-width:900px) and (max-height:550px){
 body.game-theme .novel-dialogue,body.game-theme .campus-talk{left:43%!important;right:12px!important;width:auto!important;bottom:16px!important;padding:12px!important}
 body.game-theme .novel-dialogue p,body.game-theme .campus-talk p{font-size:13px!important;line-height:1.35!important}
 body.game-theme.summer-enabled.dean-intro-mode .dean-showcase{left:166px!important;right:60%!important;top:112px!important;bottom:16px!important}
 body.game-theme.summer-enabled.dean-intro-mode .dean-bottom-dialogue{left:42%!important;bottom:16px!important}
 body.game-theme.summer-enabled .simulator-layout .campus-quest{inset:126px 12px auto auto!important;width:440px!important;max-height:calc(100svh - 142px)!important;padding:10px!important}
 body.game-theme .campus-quest .memory-board.photo-memory{width:220px!important}.campus-quest .quest-head p{font-size:12px!important;min-height:30px!important}
 body.game-theme .campus-quest .maze-board,body.game-theme .campus-quest .ttt-board{width:180px!important}
 body.game-theme .pdnj-screen .finale-content .v59-company{inset:112px 58% 16px 166px!important}.pdnj-screen .finale-content .novel-dialogue{left:43%!important}
 body.game-theme .date-kind-cafe .date-game-dialogue{left:auto!important;right:12px!important;top:112px!important;width:290px!important}
 body.game-theme .library-game-dialogue{left:166px!important;right:12px!important;top:112px!important;width:auto!important}
}
