/* Transparent world hit targets must never acquire Safari's rectangular tap tint. */
#markers button,#world{ -webkit-tap-highlight-color:transparent }
#markers button:active,#markers button:focus{background:transparent!important;box-shadow:none!important;filter:none!important;outline:none!important}
/* The activity owns the viewport; controls float inside it, never below a frame. */
#modal.fullgame51 .dialog{padding:0!important;overflow:hidden;position:relative;height:100dvh!important}
#modal.fullgame51 #dialog-body{position:relative;width:100%;height:100%;min-height:0;justify-content:stretch;overflow:auto;gap:0}
#modal.fullgame51 #dialog-body>:is(.family-stage,.alarm-stage18,.calm-board48,.breakfast-scene18,.brush-surface,.ribbon-stage44,.dance-lanes,.activity-board){width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-height:0;flex:1 0 100%;aspect-ratio:auto!important;border:0!important;border-radius:0!important;margin:0!important;box-shadow:none!important;display:block}
#modal.fullgame51 .brush-surface canvas{width:100%!important;height:100%!important}
#modal.fullgame51 #dialog-body>:is(.family-controls,.brush-keys,.choices){position:absolute;z-index:4;bottom:max(12px,env(safe-area-inset-bottom));left:60px;right:12px;display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:0;padding:6px;background:#fff5e8dc;border-radius:16px;max-height:30%;overflow:auto}
#modal.fullgame51 #dialog-body>:is(.brush-progress,.brush-status,.calm-status48,.wash-status47){position:absolute;z-index:3;top:max(10px,env(safe-area-inset-top));left:70px;right:12px;margin:0;text-align:center;pointer-events:none}
#modal.fullgame51 .calm-help48{display:none}
#modal.fullgame51 #dialog-body>:is(.wash-scene43,.toy-work41,.packing19,.drawing-work35,.chess-layout,.pencil-case35,.cat-cupboard39,.cat-feed37,.nikodem-check,.breakfast-worktop,.litter-game37){flex:1;min-height:100%;width:100%!important;max-width:none!important;margin:0!important;border:0!important;border-radius:0!important;box-sizing:border-box}
#modal.fullgame51 .litter-sand37{height:calc(100dvh - 90px)!important}
#fullback51{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left))}
#modal.fullgame51 .face-portrait,#modal.fullgame51 .choices:empty{display:none!important}
#modal.fullgame51 .brush-keys button{padding:6px 10px;min-height:44px;font-size:12px}
#modal.fullgame51 .brush-keys button canvas,#modal.fullgame51 .brush-keys button img{width:28px!important;height:28px!important;object-fit:contain}
#modal.fullgame51 #dialog-body>:is(.activity-controls,.meal-controls18,.alarm-controls18,.packing-controls19,.drawing-actions35){position:absolute;z-index:4;bottom:max(12px,env(safe-area-inset-bottom));left:60px;right:12px;display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:0;padding:6px;background:#fff5e8dc;border-radius:16px}
#modal.fullgame51 #dialog-body>:is(.activity-status,.dance-feedback19,#dance-score,#drawing-status35,#inspection-status,#crayon-status35){position:absolute;z-index:3;top:12px;left:175px;right:12px;margin:0!important;text-align:center;pointer-events:none}
#modal.fullgame51 .activity-art{width:100%;height:100%;object-fit:fill}
#modal.fullgame51 .packing19{max-height:none;padding:55px 16px 90px;overflow:auto}
#modal.fullgame51 .drawing-work35{padding:55px 12px 90px;min-height:100%;gap:10px}
#modal.fullgame51 .paper-mat35{height:100%;transform:none}
#modal.fullgame51 #drawing-paper35{height:100%;aspect-ratio:auto}
#modal.fullgame51 #dialog-body>.pencil-case35{min-height:0;flex:1;margin-top:55px!important}
#modal.fullgame51 .pencils-scattered35{flex:1;min-height:0;align-items:center;border:0;border-radius:0}
#modal.fullgame51 .wash-scene47{grid-template-columns:minmax(240px,65%) minmax(150px,25%);gap:3%;padding:35px 20px}
#modal.fullgame51 .wash-appliance47{height:min(90dvh,800px);max-width:100%;justify-self:center}
#modal.fullgame51 .chess-layout{padding:55px 12px 12px;align-items:center}
#modal.fullgame51 .chess-board{width:min(100%,calc(100dvh - 70px));max-width:none}
#modal.fullgame51.quizfull73 #dialog-body{box-sizing:border-box;padding:70px 6vw 25px;justify-content:center;gap:24px}
#modal.fullgame51.quizfull73 #dialog-title,#modal.fullgame51.quizfull73 #dialog-body>h1+p{display:block!important;text-align:center}
#modal.fullgame51.quizfull73 #dialog-body>.choices{position:static;max-height:none;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#modal.fullgame51.quizfull73 .choices button{min-height:75px}
@media(orientation:portrait){#modal.fullgame51 .drawing-work35{display:flex;flex-direction:column}#modal.fullgame51 .paper-mat35{flex:1;min-height:0}#modal.fullgame51 .pencil-palette35{grid-template-columns:repeat(12,1fr)}#modal.fullgame51 .pencil-palette35 canvas{height:100px}#modal.fullgame51 .wash-scene47{grid-template-columns:65% 30%;padding:55px 8px 12px;align-content:center}#modal.fullgame51 .wash-appliance47{height:auto;width:100%}}
