/* Host chrome stays clear at every scroll position, including Telegram fullscreen. */
:root{--shell-safe-top:max(var(--app-safe-top,0px),calc(env(safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));--shell-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--app-safe-bottom,0px));--shell-dock-height:80px}
body #app{padding:var(--shell-safe-top) max(var(--app-safe-right,0px),env(safe-area-inset-right,0px)) 0 max(var(--app-safe-left,0px),env(safe-area-inset-left,0px))!important}
body #app::before{content:"";position:fixed;left:0;right:0;top:0;height:var(--shell-safe-top);background:var(--bg,#dcd7eb);z-index:110;pointer-events:none}
body #app #topbar.topbar{position:sticky!important;top:var(--shell-safe-top)!important;inset-inline:auto!important;z-index:100!important;background:var(--bg,#dcd7eb)!important;flex-shrink:0}
body #app #view{padding-bottom:calc(var(--shell-dock-height) + var(--shell-safe-bottom) + var(--viewport-cutoff,0px) + 32px)!important}
body #app #tabbar.tabbar.professional-dock{bottom:calc(var(--viewport-cutoff,0px) + var(--shell-safe-bottom) + 8px)!important;z-index:120!important}
body #app #tabbar.tabbar.professional-dock .tab{border-radius:18px!important;overflow:hidden}
body #app #tabbar.tabbar.professional-dock .tab.active{border-radius:18px!important;background:#d4c2f4!important}
body .rd-modal-backdrop{padding-top:calc(var(--shell-safe-top) + 16px)!important;padding-bottom:calc(var(--shell-safe-bottom) + 16px)!important}
#view .rd-quest-row{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;grid-template-areas:none!important;gap:6px 10px!important;min-height:0!important;padding:14px 0!important}
#view .rd-quest-row .rd-task-icon{grid-column:1!important;grid-row:1/3!important;width:40px!important;height:40px!important;align-self:start}
#view .rd-quest-row .rd-quest-copy{grid-column:2!important;grid-row:1!important;min-width:0}
#view .rd-quest-row .rd-reward{grid-column:2!important;grid-row:2!important;align-self:start;font-size:14px!important}
#view .rd-quest-row>.rd-button,#view .rd-quest-row>.rd-claimed{grid-column:3!important;grid-row:1/3!important;align-self:center;min-height:44px!important;max-width:92px;padding:10px!important;white-space:normal;text-align:center}
#view .rd-quest-row .rd-quest-copy b{font-size:14px!important;line-height:1.4!important}
#view .rd-live-gifts .wallet-gift{padding:14px!important;min-height:0!important}
#view .rd-live-gifts .wallet-gift>img{max-height:112px!important;height:112px!important;object-fit:contain}
#view .rd-live-gifts .account-hero-gifts{padding:18px!important}

/* Shell controls and supporting copy remain readable on lavender surfaces. */
:root{--muted:#635078;--accent:#6428bd}
body #app .rd-header-button{min-width:44px!important;min-height:44px!important;width:44px!important;height:44px!important}
#view .rd-reward,#view .rd-button:not(.primary),#view .rd-link{color:#6428bd!important}
#view .rd-quest-copy small,#view .rd-subtitle,#view .mi-sub,#view .rd-all-game-copy small{color:#635078!important}
