/* Keep native and browser-only immersive modes visually identical. */
#mazi-game .pg-fullscreen {display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:44px;padding:9px 13px;border:1px solid #c8a31e;border-radius:9px;background:#ffcf24;color:#211b08;font-size:12px;font-weight:700;white-space:nowrap;touch-action:manipulation}
.pg-fullscreen:active{transform:scale(.97)}
#pg-settings,.pg-rotate-hint{display:none}
html.mazi-immersive,body.mazi-immersive{overflow:hidden!important;overscroll-behavior:none}
body.mazi-immersive > :not(#main):not(.pg-dialog):not(.pg-finish){display:none!important}
#mazi-game.is-immersive{position:fixed;inset:0;z-index:1000;width:100%;height:100vh;height:var(--pg-screen-height,100dvh);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#c6a477;overflow:hidden}
#mazi-game.is-immersive .pg-room{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;margin:0;min-height:0}
.is-immersive .pg-room-heading,.is-immersive .pg-table-footer{display:none}
.is-immersive .pg-controls{flex:0 0 auto;flex-wrap:wrap;gap:0 10px;padding:4px 10px;min-height:52px}
.is-immersive .pg-tools{gap:0;flex-wrap:nowrap}
.is-immersive .pg-tool{min-width:44px;min-height:44px;padding:8px}
.is-immersive .pg-tools .pg-tool span{display:none}
.is-immersive .pg-clock-tools{gap:4px;margin-left:auto}
.is-immersive .pg-clock-tools output{font-size:13px;min-width:48px}
.is-immersive #pg-settings{display:inline-flex}
.is-immersive .pg-atmosphere{display:none;flex:0 0 auto;padding:5px 12px;gap:8px}
.is-immersive.pg-settings-open .pg-atmosphere{display:flex}
.is-immersive .pg-table-shell{flex:1 1 0;min-height:0}
#mazi-game.is-immersive #pg-table,#mazi-game.is-immersive .fp-viewport{height:100%!important;min-height:0;max-height:none}
#mazi-game.is-immersive .pg-boost{left:10px;bottom:10px;min-height:44px;padding:6px 10px;gap:8px;border-radius:10px;box-shadow:0 2px 0 #9c710e,0 4px 12px #211b0826}
.is-immersive .pg-boost-label strong{font-size:13px}.is-immersive .pg-boost-label small{font-size:9px}
.is-immersive .pg-boost>svg{width:18px;height:18px}
.is-immersive .pg-view-tools{right:10px;bottom:10px;padding:0;min-height:44px}
.is-immersive .pg-view-tools button{min-height:44px;min-width:40px}
.is-immersive .pg-reference{max-height:calc(100% - 78px);overflow:auto;top:10px;right:10px}
.is-immersive .pg-reference img{max-height:42vh}
body.mazi-immersive .pg-dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
@media(orientation:portrait){.is-immersive .pg-rotate-hint{display:block;flex:0 0 auto;margin:0;padding:5px 12px;background:#fff9dc;color:#6b602e;font-size:11px;text-align:center}}
@media(max-width:480px){.pg-room-heading{gap:10px;padding-inline:12px}.pg-room-title{min-width:0}.pg-room-title>div{min-width:0}.pg-room-title h1{max-width:100%}#mazi-game .pg-fullscreen{padding-inline:10px;font-size:11px}.is-immersive .pg-controls{justify-content:center}.is-immersive .pg-clock-tools{margin-left:0}.is-immersive .pg-tools{flex:1;justify-content:center}.is-immersive .pg-clock-tools{flex:1;justify-content:center}}
@media(max-width:380px){.is-immersive #pg-zoom{display:none}.is-immersive .pg-view-tools #pg-fit{margin-left:0;padding-left:8px}}
@media(max-height:500px) and (orientation:landscape){.is-immersive .pg-atmosphere{position:absolute;top:52px;right:8px;max-width:calc(100% - 16px);z-index:6;border:1px solid #d2c8a9;border-radius:0 0 12px 12px;box-shadow:0 5px 15px #0002}.is-immersive .pg-reference{width:180px}.is-immersive .pg-table-message{gap:10px;padding:14px}.is-immersive .pg-table-message h2{font-size:25px}}
