:root{--safe-top:max(env(safe-area-inset-top,0px),var(--tg-safe-top,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px));padding-top:var(--safe-top);padding-bottom:0;color-scheme:dark}
:root[data-theme=light]{color-scheme:light}
body{min-height:100dvh;overflow-wrap:anywhere}
body::before{height:var(--safe-top)}
header{top:var(--safe-top);min-height:62px;padding:10px max(14px,calc((100vw - 1200px)/2))}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--ac);outline-offset:3px}
.btn,.tg{min-height:44px}.tg{min-width:44px}input,select,textarea{font-size:16px;min-height:44px}
.app{padding-bottom:calc(120px + var(--safe-bottom))}
nav{bottom:calc(12px + var(--safe-bottom))}nav button{min-height:52px;line-height:1.25}
.ses>div{min-width:0}.ses .tm{width:60px}.ses>.btn{align-self:center;padding:9px 10px;font-size:13px}
.strip{gap:2px}.strip>.btn{padding:8px;min-width:28px}.strip .d{min-width:0;min-height:52px}
.modal{padding-top:var(--safe-top);padding-bottom:var(--safe-bottom)}.modal>div{max-height:calc(94dvh - var(--safe-top) - var(--safe-bottom));overscroll-behavior:contain}
.toast{bottom:calc(100px + var(--safe-bottom));max-width:calc(100vw - 24px)}
.demo{line-height:1.5}.demo-entry p{margin:10px 0 0}.hero2 img{object-position:center}.pimg{max-height:440px;object-fit:contain}
#lg img{max-width:150px;object-fit:contain}.grid>*{min-width:0}
@media(max-width:359px){.app{padding-left:10px;padding-right:10px}.card,.sec{padding:12px}.h1{font-size:26px}nav button{font-size:9px}.ses{gap:6px}.ses .tm{width:48px}.ses>.btn{font-size:12px;padding:8px}.grid2,.tiles{gap:8px}.row{gap:8px}}
@media(min-width:960px){body:not([data-role=guest]) .app{max-width:880px;margin-left:max(260px,calc((100vw - 1200px)/2 + 240px));margin-right:max(24px,calc((100vw - 1200px)/2));padding:28px 24px 64px}body:not([data-role=guest]) nav{left:max(24px,calc((100vw - 1200px)/2));top:calc(124px + var(--safe-top));bottom:auto;transform:none;width:220px;flex-direction:column;gap:6px;padding:12px;border-radius:18px}nav button{flex-direction:row;font-size:14px;gap:12px;padding:12px;text-align:left}nav button.on{background:var(--card2)}.hero2 img{max-height:420px}.card{padding:20px}.modal>div{width:540px;padding:24px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{animation:none!important;transition:none!important}}
.btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}
.bk>div:first-child{min-width:0;flex:1}
nav button{min-width:0}nav button span{overflow-wrap:normal}
@media(max-width:359px){nav button{font-size:8.5px}nav button span{white-space:nowrap}.tiles{grid-template-columns:1fr}.bk{gap:6px}.bk>.btn{font-size:12px;padding:9px}.demo{font-size:11px}}
