/* v61: scoped scene controls retain the established GTA palette and square corners. */
.pool-puzzle-panel,.scanword-magazine,.garage-panel{box-sizing:border-box;position:fixed;left:var(--play-left);right:var(--play-right);top:var(--play-top);bottom:var(--play-bottom);z-index:15;max-width:980px;margin:0 auto;background:#1c1723f2;color:#fff4df;border:2px solid #9e8fa5;padding:18px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
body.game-theme .pool-puzzle-panel header,body.game-theme .scanword-magazine header,body.game-theme .garage-panel header{position:static!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;background:none!important;border:0!important;box-shadow:none!important;padding:0!important;display:block!important;transform:none!important;z-index:auto!important}
.pool-puzzle-panel header>span,.scanword-magazine header>span{font:700 12px Arial,sans-serif;text-transform:uppercase;letter-spacing:1.2px;color:#f0cb83}
body.game-theme .pool-puzzle-panel h2,body.game-theme .scanword-magazine h2,body.game-theme .garage-panel h1{font-size:clamp(23px,2.7vw,34px)!important;line-height:1.1!important;margin:5px 0 8px!important;text-shadow:none!important}
body.game-theme .pool-puzzle-panel p,body.game-theme .garage-panel p{font:14px/1.4 Arial,sans-serif!important;margin:0!important}
.pool-puzzle-body{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:18px;min-height:0;flex:1;align-items:center}
.pool-puzzle-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));aspect-ratio:16/9;gap:2px;min-height:0;width:100%;background:#cfc7b3;outline:2px solid #e4d3b0}
body.game-theme .pool-puzzle-slot,body.game-theme .pool-puzzle-piece,.pool-puzzle-ghost{padding:0!important;min-height:0!important;min-width:0!important;border:0!important;margin:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;background-image:url(assets/pool-empty-v53.webp)!important;background-size:400% 300%!important;background-position:var(--tile-x) var(--tile-y)!important;background-repeat:no-repeat!important;touch-action:none;aspect-ratio:4/3;position:relative}
body.game-theme .pool-puzzle-slot:not(.placed){background-image:none!important;background-color:#35333b!important;color:#b9b0bd!important;font:15px Arial,sans-serif!important}
.pool-puzzle-slot.placed{pointer-events:none}
.pool-puzzle-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;min-width:0;align-content:center}
body.game-theme .pool-puzzle-piece{outline:1px solid #a99ca8;cursor:grab}.pool-puzzle-piece:disabled{visibility:hidden!important}.pool-puzzle-piece.selected{outline:3px solid #f2c36f!important;outline-offset:2px}
.pool-puzzle-ghost{position:fixed!important;z-index:10000!important;pointer-events:none!important;translate:-50% -50%;box-shadow:0 4px 18px #0009!important}
body.game-theme .pool-puzzle-panel footer,body.game-theme .scanword-magazine footer{position:static!important;inset:auto!important;display:flex!important;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;height:auto!important;background:none!important;border:0!important;padding:0!important;margin:0!important;width:auto!important;transform:none!important;color:inherit!important;z-index:auto!important}
.pool-puzzle-panel footer span{font:13px/1.3 Arial,sans-serif;flex:1}.pool-puzzle-panel footer b{color:#f2c36f}
body.game-theme .pool-puzzle-panel button,body.game-theme .scanword-magazine button,body.game-theme .garage-panel button{border-radius:0!important}
body.game-theme .pool-puzzle-panel footer button,body.game-theme .scanword-magazine footer button{font-size:13px!important;min-height:40px!important;padding:9px 13px!important}
/* The open journal itself is the puzzle; all six questions remain part of the grid. */
.scanword-magazine{max-width:1000px;background:linear-gradient(90deg,#e8d9b9 49.5%,#b8a88b 50%,#f0e3c7 50.5%);color:#2d2730;border:3px solid #534252;box-shadow:0 12px 30px #0005}
.scanword-magazine header{border-bottom:1px solid #a7987c!important}.scanword-magazine header>span{color:#70445a}.scanword-magazine header>b{position:absolute;right:20px;top:28px;font:700 14px Arial,sans-serif}
.scanword-pages{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:22px;flex:1;min-height:0;align-items:center}
.scanword-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(9,minmax(0,1fr));width:100%;aspect-ratio:10/9;max-height:100%;min-height:0}
.scanword-cell{display:block!important;min-width:0;min-height:0;margin:0!important;border:1px solid #79685c;background:#fff9eb;position:relative}
body.game-theme .scanword-cell input{box-sizing:border-box!important;border:0!important;border-radius:0!important;background:#fff9eb!important;color:#302633!important;width:100%!important;height:100%!important;min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;box-shadow:none!important;text-align:center!important;font:bold clamp(13px,2vw,24px) Arial,sans-serif!important;text-transform:uppercase;outline-offset:-3px}
body.game-theme .scanword-cell.active input{background:#ffedbf!important}.scanword-cell:focus-within{z-index:2;outline:3px solid #8c3a59}
body.game-theme .scanword-grid button.scanword-clue{padding:2px!important;min-height:0!important;min-width:0!important;margin:0!important;background:#d9c6a2!important;color:#443740!important;border:1px solid #79685c!important;font:700 8px/1.05 Arial,sans-serif!important;text-shadow:none!important;box-shadow:none!important;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;overflow:hidden;transform:none!important}
body.game-theme .scanword-grid button.scanword-clue.active{background:#b88655!important;color:#fff9eb!important}.scanword-clue b{font-size:12px}.scanword-blank{background:transparent}
.scanword-question{padding:20px;border-left:1px solid #b7a383;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:12px;min-width:0}
.scanword-question>span{font:700 12px Arial,sans-serif;text-transform:uppercase;color:#6a3c52}
body.game-theme .scanword-question h3{font:700 clamp(16px,1.8vw,24px)/1.25 Georgia,serif!important;margin:0!important;color:#382c36!important;text-shadow:none!important}
body.game-theme .scanword-question p,.scanword-question [role=status]{font:14px/1.4 Arial,sans-serif!important;margin:0!important;color:#5b4c50}.scanword-question [role=status]:empty{display:none}
body.game-theme .scanword-question button{font-size:13px!important;min-height:40px!important;padding:9px 12px!important;align-self:flex-start;background:#3a2c3c!important;color:#fff4df!important}
.scanword-magazine .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Six illustrated cars, with a separate final budget. */
.garage-panel{max-width:1000px;gap:12px}.garage-panel header{text-align:center}.garage-budget{display:block;color:#f2c36f;font:700 15px Arial,sans-serif;margin-top:10px}
.garage-cars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;min-height:0;flex:1}
body.game-theme button.garage-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px!important;min-height:0!important;min-width:0!important;background:#302534!important;border:1px solid #9b849a!important;color:#fff4df!important;box-shadow:none!important;transform:none!important;text-shadow:none!important}
body.game-theme button.garage-card.selected{background:#463041!important;border:3px solid #f2c36f!important}
.garage-card img{width:100%;height:clamp(60px,12vh,120px);object-fit:contain;pointer-events:none}.garage-card strong{font:700 14px/1.2 Arial,sans-serif}.garage-card span{font:13px Arial,sans-serif;color:#f2c36f}.garage-card:disabled{opacity:.5;filter:grayscale(.5)}
.garage-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}.garage-actions button{font-size:13px!important;min-height:42px!important;padding:9px 15px!important}
.wardrobe-panel>.actions{justify-content:center!important}
/* Fixed scene actions share a row, without covering each other or the HUD. */
.culture-return-dock{position:fixed;left:var(--play-left);bottom:var(--play-bottom);z-index:28;width:210px}.culture-return-dock button{width:100%;font-size:13px!important;min-height:44px!important}
body.game-theme.campus-mode .place-culture~.romance-meet{transform:none}
body.game-theme:has(.place-culture) .romance-meet{position:fixed!important;top:auto!important;left:calc(var(--play-left) + 224px)!important;right:auto!important;bottom:var(--play-bottom)!important;width:230px!important;transform:none!important;translate:none!important}
body.game-theme:has(.place-culture) .romance-meet button{width:100%!important;min-height:44px!important}
body.game-theme.library-conversation .romance-meet{position:fixed!important;top:var(--play-top)!important;left:auto!important;right:var(--play-right)!important;bottom:auto!important;transform:none!important;translate:none!important;width:auto!important;max-width:240px}
/* Finale characters meet the top of the dialogue and remain on the same scale. */
body.game-theme .pdnj-screen .finale-content .v59-company{align-items:flex-end!important;overflow:hidden!important;max-height:none!important;flex-wrap:nowrap!important;gap:8px!important}
body.game-theme .pdnj-screen .v59-company figure{position:relative!important;height:100%!important;max-height:360px!important;flex:0 1 30%!important;max-width:260px!important;overflow:visible!important;border:0!important}
body.game-theme .pdnj-screen .v59-company figure>img{position:absolute!important;left:50%!important;top:0!important;width:auto!important;height:140%!important;max-width:none!important;object-fit:contain!important;transform:translateX(-50%)!important;translate:none!important}
body.game-theme .pdnj-screen .v59-company .company-self>.player-avatar{position:relative!important;height:140%!important;width:100%!important;top:0!important;overflow:visible!important}
body.game-theme .pdnj-screen.has-final-car .finale-content .v59-company{left:calc(var(--play-left) + (100vw - var(--play-left) - var(--play-right)) * .53)!important;gap:4px!important;overflow:visible!important}
body.game-theme .pdnj-screen.has-final-car .v59-company figure{flex-basis:48%!important;max-height:300px!important}
body.game-theme .pdnj-screen.has-final-car .v59-company figure>img{height:103%!important}
body.game-theme .pdnj-screen.has-final-car .v59-company .company-self>.player-avatar{height:103%!important}
.final-car{position:fixed;left:var(--play-left);width:calc((100vw - var(--play-left) - var(--play-right)) * .55);height:min(300px,35vh);bottom:calc(var(--final-dialogue-height,260px) - 7px);pointer-events:none;z-index:4}.final-car img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
body.game-theme.summer-enabled.dean-intro-mode .dean-showcase .intro-dean{right:12%!important}
.prize-contact a{color:#f2c36f;text-decoration:underline;white-space:nowrap}.lottery-result h2{font-size:clamp(22px,2.4vw,32px)!important;line-height:1.15!important}
.fb-site-link{position:fixed;left:16px;bottom:9px;z-index:90;background:#201928e8;border:1px solid #9f8ca4;color:#fff4df;padding:7px 11px;font:12px Arial,sans-serif;text-decoration:none}
@media(max-width:760px){
 .pool-puzzle-panel,.scanword-magazine,.garage-panel{padding:12px;gap:9px}
 body.game-theme .pool-puzzle-panel h2,body.game-theme .scanword-magazine h2,body.game-theme .garage-panel h1{font-size:23px!important}
 body.game-theme .pool-puzzle-panel p,body.game-theme .garage-panel p{font-size:12px!important}
 .pool-puzzle-body{grid-template-columns:1fr;gap:12px;align-content:center;flex:1}.pool-puzzle-tray{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.pool-puzzle-panel footer{gap:7px!important}.pool-puzzle-panel footer span{font-size:11px}.pool-puzzle-panel footer button{flex-basis:100%;min-height:36px!important}
 .scanword-magazine header>b{top:24px;right:12px;font-size:11px}.scanword-pages{display:flex;flex-direction:column;gap:8px;justify-content:flex-start}.scanword-grid{aspect-ratio:10/9;width:100%;flex:0 1 290px;max-height:290px}.scanword-cell input{font-size:17px!important}
 body.game-theme .scanword-grid button.scanword-clue{font-size:7px!important}.scanword-clue b{font-size:10px}.scanword-question{padding:0;gap:5px;border:0;display:grid;grid-template-columns:1fr auto;align-items:start}.scanword-question>span{font-size:9px;grid-column:1/-1}.scanword-question h3{grid-column:1/-1;font-size:14px!important}.scanword-question p{font-size:10px!important}.scanword-question p:nth-of-type(2){display:none}.scanword-question [role=status]{font-size:10px!important;grid-column:1/-1}.scanword-question button{font-size:11px!important;padding:5px 8px!important;min-height:32px!important;grid-column:2;grid-row:3}
 body.game-theme .scanword-magazine footer{gap:6px!important;flex-wrap:nowrap!important}.scanword-magazine footer button{font-size:11px!important;padding:7px!important;min-height:36px!important}
 .garage-panel{gap:8px}.garage-budget{font-size:13px;margin-top:6px}.garage-cars{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:7px}
 body.game-theme button.garage-card{padding:5px!important;gap:3px}.garage-card img{height:42px}.garage-card strong{font-size:11px}.garage-card span{font-size:11px}.garage-actions{gap:6px}.garage-actions button{font-size:11px!important;min-height:35px!important;padding:7px 9px!important}
 .culture-return-dock{left:12px;bottom:110px;width:calc(50vw - 18px)}
 body.game-theme:has(.place-culture) .romance-meet{left:calc(50vw + 6px)!important;right:12px!important;bottom:110px!important;width:auto!important}
 body.game-theme:has(.place-culture) .romance-meet button,.culture-return-dock button{font-size:11px!important;padding:8px!important;min-height:44px!important}
 body.game-theme.library-conversation .romance-meet{max-width:180px;top:234px!important}.library-conversation .romance-meet button{font-size:11px!important;min-height:36px!important}
 body.game-theme .pdnj-screen .v59-company figure{flex-basis:30%!important;max-height:260px!important}
 body.game-theme .pdnj-screen.has-final-car .v59-company figure{max-height:220px!important}
 .lottery-drawn .prize-wheel-frame{display:none}.lottery-drawn .lottery-layout{justify-content:center;overflow:visible!important;padding:0!important}.lottery-drawn .lottery-dialogue{padding:16px!important}.lottery-drawn .lottery-result p{font-size:13px!important;line-height:1.45!important}.lottery-result h2{font-size:23px!important}
 .fb-site-link{left:12px;bottom:5px;font-size:10px;padding:4px 8px}
}
@media(max-width:900px) and (max-height:550px){
 .pool-puzzle-panel,.scanword-magazine,.garage-panel{padding:9px;gap:6px}.pool-puzzle-panel header p{display:none}.pool-puzzle-body{grid-template-columns:minmax(0,2fr) minmax(0,1fr);flex:1;gap:12px}.pool-puzzle-board{max-height:100%;width:auto;justify-self:center;height:100%}.pool-puzzle-tray{grid-template-columns:repeat(4,minmax(0,1fr))}.pool-puzzle-panel footer button{flex-basis:auto}.pool-puzzle-panel header h2{font-size:19px!important}
 .scanword-pages{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.scanword-grid{max-height:100%;height:100%;width:auto;aspect-ratio:10/9;justify-self:center}.scanword-question{padding:4px;gap:5px}.scanword-question h3{font-size:14px!important}.scanword-question p{font-size:10px!important}.scanword-question p:nth-of-type(2){display:none}.scanword-magazine header h2{font-size:19px!important;margin:0!important}.scanword-magazine header>span{display:none}.scanword-magazine header>b{top:14px}
 .garage-panel header p{display:none}.garage-panel header{display:flex!important;justify-content:space-between;align-items:center;gap:8px}.garage-panel header h1{font-size:20px!important;margin:0!important}.garage-panel header .novel-speaker{display:none}.garage-cars{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px}.garage-card img{height:35px}.garage-card strong{font-size:11px}.garage-card span{font-size:10px}.garage-actions button{min-height:30px!important;padding:4px 10px!important}
 .culture-return-dock{left:166px;bottom:16px}.culture-return-dock button{font-size:11px!important}.romance-meet{font-size:11px}
 body.game-theme .pdnj-screen .finale-content .v59-company{inset:112px 58% 16px 166px!important}.final-car{left:166px;width:28vw;height:90px;bottom:16px}.pdnj-screen.has-final-car .v59-company{bottom:95px!important}
 .lottery-drawn .prize-wheel-frame{display:none}.lottery-drawn .lottery-layout{display:block;overflow:auto}.lottery-drawn .lottery-result p{font-size:12px!important}
}
body.game-theme .pdnj-screen .v59-company .company-self>.player-avatar{position:absolute!important;left:50%!important;width:auto!important;aspect-ratio:1/2!important;transform:translateX(-50%)!important;translate:none!important}
body.game-theme .pdnj-screen .company-self .avatar-composite{height:100%!important;width:100%!important;aspect-ratio:auto!important}
.final-car{height:auto!important;aspect-ratio:3/2}.final-car img{transform:translateY(var(--car-foot,0%))}
body.game-theme .club-locked-note{bottom:calc(var(--play-bottom) + 80px)!important}
.date-seat-hotspot{touch-action:manipulation!important}
.pool-puzzle-board{justify-self:center;height:auto!important;flex:none}
.scanword-grid{flex:none!important;max-height:none!important;align-self:center;justify-self:center}
body.game-theme .scanword-magazine footer{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important}
body.game-theme .scanword-magazine footer button{min-width:0!important;width:100%!important;white-space:normal!important}
@media(max-width:760px) and (min-height:551px){
 body.game-theme.summer-enabled:has(.campus-world.is-talk) .simulator-layout .walk-hud{top:calc(var(--campus-dialogue-top,500px) - 36px)!important;pointer-events:none}
 .scanword-pages{gap:6px!important;justify-content:center!important}.scanword-question{display:block!important;order:-1;flex:none;width:100%;padding:0!important;border:0!important}.scanword-question>span,.scanword-question>p{display:none!important}
 body.game-theme .scanword-question h3{font:700 13px/1.25 Georgia,serif!important;margin:0!important}.scanword-question [role=status]{font-size:10px!important;margin-top:3px!important}
 body.game-theme .scanword-magazine footer button{font-size:10px!important;padding:6px!important;min-height:38px!important}
 .garage-actions{flex-wrap:nowrap!important}.garage-actions button{flex:1;min-width:0!important;font-size:11px!important;padding:6px!important}
}
@media(max-width:760px) and (min-height:551px) and (max-height:780px){
 .garage-panel header p{display:none}.garage-card img{height:30px}.garage-card strong{font-size:10px}.garage-card span{font-size:10px}
 body.game-theme .pool-puzzle-panel header p{font-size:11px!important}.pool-puzzle-panel footer span{font-size:10px}
}
@media(max-width:900px) and (max-height:550px){
 body.game-theme button.garage-card{display:grid;grid-template-columns:60px minmax(0,1fr);grid-template-rows:1fr auto;gap:3px 6px;padding:5px!important;text-align:left}
 .garage-card img{grid-row:1/3;height:46px;width:60px}.garage-card strong{align-self:end;font-size:11px}.garage-card span{align-self:start;font-size:10px}
 body.game-theme .scanword-magazine footer button{min-height:30px!important;font-size:11px!important;padding:5px!important}.scanword-question>span{display:none}.scanword-question h3{font-size:13px!important}
}
@media(max-width:900px) and (max-height:550px){.fb-site-link{left:166px;top:78px;bottom:auto;font-size:11px;padding:6px 10px}}
