/* The native sheet is expanded by the SDK; CSS fills its stable visible area. */
.tg-window-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #bc98df47;border-radius:8px;background:linear-gradient(135deg,#49335c,#221a30);color:#ead8fa;padding:4px 9px;min-height:25px;font-size:10px;white-space:nowrap;cursor:pointer}
.tg-window-toggle[hidden]{display:none}
.tg-window-toggle svg{width:13px;height:13px}
.tg-window-toggle:disabled{opacity:.6;cursor:wait}
.tg-window-toggle:focus-visible{outline:2px solid #d5acff;outline-offset:2px}
.tg-window-toggle:hover:not(:disabled){border-color:#dbb9f8a0;background:#4b3261}
html[data-tg-miniapp=true]{
 --sf-safe-top:calc(max(env(safe-area-inset-top,0px),var(--sf-tg-safe-top,0px)) + var(--sf-tg-content-top,0px));
 --sf-safe-bottom:calc(max(env(safe-area-inset-bottom,0px),var(--sf-tg-safe-bottom,0px)) + var(--sf-tg-content-bottom,0px));
 --sf-safe-left:calc(max(env(safe-area-inset-left,0px),var(--sf-tg-safe-left,0px)) + var(--sf-tg-content-left,0px));
 --sf-safe-right:calc(max(env(safe-area-inset-right,0px),var(--sf-tg-safe-right,0px)) + var(--sf-tg-content-right,0px));
 background:#100d1c;min-height:var(--sf-viewport-height,100dvh);scroll-padding-top:calc(48px + var(--sf-safe-top));
}
html[data-tg-miniapp=true] body{min-height:var(--sf-viewport-height,100dvh)}
html[data-tg-miniapp=true] #app{min-height:var(--sf-viewport-height,100dvh);padding:var(--sf-safe-top) var(--sf-safe-right) var(--sf-safe-bottom) var(--sf-safe-left)}
html[data-tg-miniapp=true] .main{min-height:calc(var(--sf-viewport-height,100dvh) - var(--sf-safe-top) - var(--sf-safe-bottom) - 36px)}
html[data-tg-miniapp=true] .tg-login-page,html[data-tg-miniapp=true] .entrance-boot{min-height:calc(var(--sf-viewport-height,100dvh) - var(--sf-safe-top) - var(--sf-safe-bottom))}
html[data-tg-miniapp=true] .prototype-bar{top:var(--sf-safe-top)}
html[data-tg-miniapp=true] .sidebar{top:calc(36px + var(--sf-safe-top));bottom:var(--sf-safe-bottom);left:var(--sf-safe-left)}
html[data-tg-miniapp=true] .entrance-screen{height:var(--sf-viewport-height,100dvh)}
html[data-tg-miniapp=true] .entrance-header{padding-top:calc(18px + var(--sf-safe-top));padding-right:calc(20px + var(--sf-safe-right))}
html[data-tg-miniapp=true] .entrance-content{top:calc(var(--sf-safe-top) + (100% - var(--sf-safe-top) - var(--sf-safe-bottom)) * .44)}
html[data-tg-miniapp=true] .entrance-footer{bottom:calc(28px + var(--sf-safe-bottom));left:calc(24px + var(--sf-safe-left));right:calc(24px + var(--sf-safe-right))}
html[data-tg-miniapp=true] dialog:not(.entrance-screen){inset:calc(var(--sf-safe-top) + 12px) calc(var(--sf-safe-right) + 12px) calc(var(--sf-safe-bottom) + 12px) calc(var(--sf-safe-left) + 12px);margin:auto;max-height:calc(var(--sf-viewport-height,100dvh) - var(--sf-safe-top) - var(--sf-safe-bottom) - 24px);max-width:calc(100vw - var(--sf-safe-left) - var(--sf-safe-right) - 24px)}
@media(max-width:680px){
 html[data-tg-miniapp=true] .bottom-nav{bottom:12px;left:calc(12px + var(--sf-safe-left));right:calc(12px + var(--sf-safe-right));padding-bottom:calc(12px + var(--sf-safe-bottom))}
 html[data-tg-miniapp=true] #toast{bottom:calc(100px + var(--sf-safe-bottom))}
}
@media(max-height:620px){
 html[data-tg-miniapp=true] .entrance-header{padding-top:calc(12px + var(--sf-safe-top))}
 html[data-tg-miniapp=true] .entrance-footer{bottom:calc(15px + var(--sf-safe-bottom))}
}
