:root{--official-ink:#e9e1bf;--official-green:#153b36;--official-gold:#d9c387}
body.official-landscape{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:44px minmax(0,1fr)!important;gap:0!important;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)!important;background:#081e22;color:var(--official-ink);font-family:'Segoe UI',Tahoma,Arial,sans-serif}
.official-header{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;background:linear-gradient(90deg,#23493c,#102e30);border-bottom:1px solid #697b57;z-index:20;min-width:0}
.official-header strong{color:#eed397;font-size:15px;letter-spacing:.4px;font-weight:600}
.official-header span{font-size:12px;color:#b7c8a9;white-space:nowrap}
body.official-landscape #official-game-host{grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;width:min(100%,calc((100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*1.775))!important;max-width:100%!important;max-height:100%!important;aspect-ratio:71/40!important;overflow:hidden;position:relative;box-shadow:0 0 60px #0006;background:#102e34}
body.official-landscape #canvas{width:100%!important;height:100%!important;object-fit:contain;image-rendering:pixelated}
body.official-landscape #vqsv-controls{position:fixed!important;inset:44px 0 0!important;display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:1fr auto!important;gap:0!important;grid-column:1!important;grid-row:2!important;width:100%!important;height:calc(100% - 44px)!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;pointer-events:none;z-index:18;transform:none!important}
body.official-landscape #vqsv-controls .vqsv-control-frame,body.official-landscape #vqsv-controls .vqsv-control-deck{display:contents!important}
body.official-landscape #vqsv-controls .vqsv-drag-handle{display:none!important}
body.official-landscape #vqsv-controls .vqsv-dpad{grid-column:1!important;grid-row:1!important;align-self:end!important;justify-self:start!important;margin:0 0 42px max(14px,env(safe-area-inset-left))!important;width:142px!important;padding:8px!important;border-radius:50%!important;border:1px solid #9da97790!important;background:#123c35bb!important;box-shadow:inset 0 0 0 3px #243f3599!important;pointer-events:auto}
body.official-landscape #vqsv-controls .vqsv-action-pad{grid-column:2!important;grid-row:1!important;align-self:end!important;justify-self:end!important;margin:0 max(14px,env(safe-area-inset-right)) 46px 0!important;display:flex!important;gap:9px!important;width:auto!important;padding:8px!important;background:#123c35bb!important;border:1px solid #9da97790!important;border-radius:18px!important;pointer-events:auto}
body.official-landscape #vqsv-controls .vqsv-softbar{grid-column:2!important;grid-row:1!important;justify-self:end!important;align-self:start!important;width:130px!important;margin:12px max(14px,env(safe-area-inset-right)) 0 0!important;padding:0!important;pointer-events:auto}
body.official-landscape #vqsv-controls .vqsv-systembar{grid-column:2!important;grid-row:2!important;justify-self:end!important;align-self:end!important;width:auto!important;margin:0 max(14px,env(safe-area-inset-right)) 8px 0!important;padding:0!important;pointer-events:auto}
body.official-landscape #vqsv-controls .vqsv-control{min-width:42px!important;min-height:42px!important;color:#f0e3b8;border-color:#98a574;background:linear-gradient(#3d6150,#244a40);text-shadow:0 1px #112a27;box-shadow:inset 0 1px #77937488,0 2px #071f23;font:500 15px/1.2 'Segoe UI',sans-serif;border-radius:10px;touch-action:none}
body.official-landscape #vqsv-controls .vqsv-action-enter{min-width:68px!important;min-height:62px!important;background:linear-gradient(#e1cd8a,#b9a969);color:#263c2c;text-shadow:none;border-color:#e9d59e}
body.official-landscape #vqsv-controls .vqsv-action-back{min-width:54px!important;min-height:54px!important}
body.official-landscape #vqsv-controls .vqsv-number{font-size:22px}
body.official-landscape.vqsv-keypad-hidden #vqsv-controls .vqsv-dpad,body.official-landscape.vqsv-keypad-hidden #vqsv-controls .vqsv-action-pad,body.official-landscape.vqsv-keypad-hidden #vqsv-controls .vqsv-softbar{display:none!important}
body.official-landscape.vqsv-keypad-hidden #vqsv-controls .vqsv-systembar{grid-column:2!important;grid-row:2!important;display:flex!important}
.official-rotate-hint{display:none}
@media(orientation:portrait){body.official-landscape{grid-template-rows:44px minmax(0,1fr)!important}.official-header{padding:0 10px}.official-header strong{font-size:12px}.official-header span{font-size:11px}.official-rotate-hint{display:block;position:fixed;bottom:180px;left:16px;right:16px;text-align:center;color:#c5cfad;font-size:13px;pointer-events:none}body.official-landscape #vqsv-controls .vqsv-dpad{margin-bottom:16px!important}body.official-landscape #vqsv-controls .vqsv-action-pad{margin-bottom:26px!important}body.official-landscape #vqsv-controls .vqsv-softbar{align-self:end!important;margin-bottom:108px!important}}
@media(orientation:landscape) and (max-height:400px){.official-header{padding:0 10px}.official-header strong{font-size:12px}body.official-landscape{grid-template-rows:32px minmax(0,1fr)!important}body.official-landscape #official-game-host{width:min(100%,calc((100dvh - 32px)*1.775))!important}body.official-landscape #vqsv-controls{top:32px!important;height:calc(100% - 32px)!important}body.official-landscape #vqsv-controls .vqsv-dpad{width:130px!important;margin-bottom:30px!important}body.official-landscape #vqsv-controls .vqsv-action-pad{margin-bottom:32px!important}}
body.official-landscape #vqsv-controls .vqsv-dpad{box-sizing:border-box!important;width:156px!important;grid-template-columns:repeat(3,44px)!important;grid-template-rows:repeat(3,44px)!important;gap:4px!important;padding:8px!important}
body.official-landscape #vqsv-controls .vqsv-dpad .vqsv-control{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:0!important}
body.official-landscape #vqsv-controls .vqsv-action-pad .vqsv-control{width:auto!important;letter-spacing:0!important}
@media(orientation:landscape) and (max-height:400px){body.official-landscape #vqsv-controls .vqsv-dpad{width:148px!important;padding:4px!important}}

/* Fill the available screen; the world renderer adapts without stretching sprites. */
html{width:100%;height:100%;overflow:hidden}
body.official-landscape{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;margin:0!important;padding:0!important;display:block!important;overflow:hidden!important}
body.official-landscape .official-header{display:none!important}
body.official-landscape #official-game-host{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;border:0!important;border-radius:0!important;margin:0!important;padding:0!important}
body.official-landscape #vqsv-controls{inset:0!important;width:100%!important;height:100%!important}
#official-fullscreen{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));z-index:110;width:44px;height:44px;border:1px solid #a3ad7b;border-radius:9px;background:#143c36ee;color:#efdfaf;font:26px/1 'Segoe UI',sans-serif;cursor:pointer;touch-action:manipulation}
body.official-menu-open #official-fullscreen{display:none}
body.official-landscape #vqsv-controls [data-ui-action=fullscreen]{display:none!important}
body.official-landscape #vqsv-controls .vqsv-systembar{margin-right:max(66px,calc(env(safe-area-inset-right) + 54px))!important}
@media(orientation:portrait){body.official-landscape #official-game-host{height:min(100%,133.333vw)!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)} }
