/* Additive only: no site theme/header/card/font rules are replaced. */
#sgPersistentHost[hidden]{display:none!important}
#sgPersistentHost{position:fixed;z-index:45;overflow:hidden;background:#102536;color:inherit;border:1px solid var(--ui-border);border-radius:12px}
#sgPersistentHost.sgp-docked{border:0;border-radius:0}
#sgPersistentHost .sgp-tools{display:flex;align-items:center;gap:6px;height:48px;padding:2px 8px;background:var(--ui-surface);border-bottom:1px solid var(--ui-border);font-size:12px}
#sgPersistentHost .sgp-tools strong{margin-right:auto;white-space:nowrap}
#sgPersistentHost .sgp-tools button{min-height:44px;padding:6px 10px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-soft);font-size:12px;font-weight:700;color:inherit;cursor:pointer}
#sgPersistentHost.sgp-docked .sgp-tools{display:none}
#sgPersistentHost .sgp-viewport{height:calc(100% - 48px);width:100%;position:relative;overflow:hidden}
#sgPersistentHost.sgp-docked .sgp-viewport{height:100%}
#sgPersistentHost .sgp-scale{height:100%;width:100%;transform-origin:top left}
#sgPersistentHost iframe{border:0;display:block;width:100%;height:100%}
#sgPersistentHost:fullscreen,#sgPersistentHost.sgp-expanded{position:fixed;inset:0!important;width:100vw!important;height:100dvh!important;z-index:10000;border-radius:0}
#sgPersistentHost:fullscreen .sgp-tools,#sgPersistentHost.sgp-expanded .sgp-tools{display:flex}
#sgPersistentHost:fullscreen .sgp-viewport,#sgPersistentHost.sgp-expanded .sgp-viewport{height:calc(100% - 48px)}


@media(max-width:600px){#sgPersistentHost .sgp-tools{gap:4px;padding:2px 6px}#sgPersistentHost .sgp-tools button{padding:6px 7px;font-size:11px}}

#sgpDragHandle{cursor:grab;touch-action:none;user-select:none;min-height:44px;display:flex;align-items:center}#sgpDragHandle:focus-visible{outline:2px solid var(--keyzy-accent);outline-offset:1px}#sgPersistentHost.sgp-dragging #sgpDragHandle{cursor:grabbing}#sgPersistentHost.sgp-docked #sgpDragHandle{cursor:default}@media(max-width:1100px){.sg-pass-header-nav{display:none!important}}

/* 3.0.3: the floating game never constrains normal page height/scroll. */

/* 3.0.8: hide visual game only; never remove/reload the member's iframe. */
#sgPersistentHost.sgp-profile-hidden{opacity:0;pointer-events:none}
#sgpProfile[hidden]{display:none!important}
#sgpProfile{position:fixed;right:16px;bottom:16px;z-index:46;width:66px;height:66px;border:2px solid var(--keyzy-accent,#69d6b0);border-radius:50%;padding:5px;background:var(--ui-surface,#fff);box-shadow:0 3px 14px #0003;cursor:pointer;color:var(--ui-text,#17282d)}
#sgpProfile img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;image-rendering:pixelated}
#sgpProfile .sgp-profile-tag{position:absolute;right:-3px;bottom:-2px;background:#173b31;color:#bbf1d6;border:1px solid #7bc6a9;border-radius:5px;padding:1px 5px;font:700 10px Arial,sans-serif}
#sgpProfile:focus-visible{outline:3px solid var(--keyzy-accent,#69d6b0);outline-offset:3px}
@media(max-width:600px){#sgPersistentHost .sgp-tools button{padding:6px 5px}#sgpProfile{width:60px;height:60px;right:12px;bottom:12px}}

/* Mobile1: native-size iframe/HUD and a compact two-action toolbar. */
#sgpMore[hidden],#sgpPhoneMenu[hidden]{display:none!important}
#sgpPhoneMenu{position:absolute;top:54px;right:8px;z-index:200;width:190px;display:grid;gap:6px;padding:10px;border:1px solid var(--ui-border,#334155);border-radius:12px;background:var(--ui-surface,#18181b);box-shadow:0 8px 28px #0006;color:inherit}
#sgpPhoneMenu button{min-height:44px;border:1px solid var(--ui-border,#334155);border-radius:8px;background:var(--ui-soft,#27272a);color:inherit;font:700 13px inherit;cursor:pointer}
#sgPersistentHost.sgp-touch .sgp-tools{display:flex;height:48px;padding:2px 8px}
#sgPersistentHost.sgp-touch .sgp-tools button{min-width:44px;min-height:44px;font-size:12px}
#sgPersistentHost.sgp-touch .sgp-viewport{height:calc(100% - 48px)}
#sgPersistentHost.sgp-touch .sgp-scale{width:100%!important;height:100%!important;transform:none!important}
#sgPersistentHost.sgp-touch:fullscreen .sgp-tools,#sgPersistentHost.sgp-touch.sgp-expanded .sgp-tools{height:0;border:0;padding:0;pointer-events:none}
#sgPersistentHost.sgp-touch:fullscreen .sgp-tools strong,#sgPersistentHost.sgp-touch.sgp-expanded .sgp-tools strong,#sgPersistentHost.sgp-touch:fullscreen #sgpFullscreen,#sgPersistentHost.sgp-touch.sgp-expanded #sgpFullscreen{display:none}
#sgPersistentHost.sgp-touch:fullscreen #sgpMore,#sgPersistentHost.sgp-touch.sgp-expanded #sgpMore{position:absolute;top:calc(8px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);pointer-events:auto;background:var(--ui-surface,#18181b);z-index:210}
#sgPersistentHost.sgp-touch:fullscreen .sgp-viewport,#sgPersistentHost.sgp-touch.sgp-expanded .sgp-viewport{height:100%}
#sgPersistentHost.sgp-touch:fullscreen #sgpPhoneMenu,#sgPersistentHost.sgp-touch.sgp-expanded #sgpPhoneMenu{top:58px;right:8px}
@media(orientation:portrait){#sgPersistentHost.sgp-touch:fullscreen #sgpMore,#sgPersistentHost.sgp-touch.sgp-expanded #sgpMore{left:auto;right:8px;top:128px;transform:none}#sgPersistentHost.sgp-touch:fullscreen #sgpPhoneMenu,#sgPersistentHost.sgp-touch.sgp-expanded #sgpPhoneMenu{top:178px}}

/* Chosen fullscreen behavior: floating overflow on both PC and touch, no toolbar gap. */
#sgPersistentHost:fullscreen .sgp-tools,#sgPersistentHost.sgp-expanded .sgp-tools{display:flex!important;height:0;padding:0;border:0;pointer-events:none}
#sgPersistentHost:fullscreen .sgp-tools strong,#sgPersistentHost.sgp-expanded .sgp-tools strong,#sgPersistentHost:fullscreen #sgpFullscreen,#sgPersistentHost.sgp-expanded #sgpFullscreen{display:none}
#sgPersistentHost:fullscreen .sgp-viewport,#sgPersistentHost.sgp-expanded .sgp-viewport{height:100%}
#sgPersistentHost:fullscreen #sgpMore,#sgPersistentHost.sgp-expanded #sgpMore{position:absolute;top:calc(8px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);min-width:44px;min-height:44px;pointer-events:auto;background:var(--ui-surface,#18181b);z-index:210}
@media(orientation:portrait){#sgPersistentHost.sgp-touch:fullscreen #sgpMore,#sgPersistentHost.sgp-touch.sgp-expanded #sgpMore{left:auto;right:8px;top:144px;transform:none}#sgPersistentHost.sgp-touch:fullscreen #sgpPhoneMenu,#sgPersistentHost.sgp-touch.sgp-expanded #sgpPhoneMenu{top:196px}}
