/* Shared app shell. Mobile behavior is enabled explicitly by body.mobile-app. */
main > aside > .app-sheet,
main > aside > .mobile-panel{
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

main > aside > .app-sheet > section,
main > aside > .mobile-panel > section{
    min-width: 0;
    min-height: 0;
}

.app-sheet-backdrop,
.app-sheet-handle{
    display: none;
}

body.mobile-app{
    --mobile-nav-content-height: 60px;
    --mobile-nav-height: calc(var(--mobile-nav-content-height) + env(safe-area-inset-bottom, 0px));
    --mobile-side-drawer-width: 340px;
    --mobile-chart-bar-content-height: 48px;
    --mobile-chart-bar-height: calc(var(--mobile-chart-bar-content-height) + env(safe-area-inset-top, 0px));
    --mobile-history-bar-height: 0px;
    --mobile-chat-bar-height: 36px;
    --mobile-draws-width: calc(44px + env(safe-area-inset-left, 0px));
    background: #0a0a0a;
    overscroll-behavior: none;
}

body.mobile-app:has(main > .charts > div > .history-player){
    --mobile-history-bar-height: 0px;
    --mobile-chat-bar-height: 46px;
}

body.mobile-app main{
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.mobile-app main::before{
    content: "";
    position: absolute;
    z-index: 6;
    top: 0;
    right: 0;
    left: 0;
    height: var(--mobile-chart-bar-height);
    border-bottom: 1px solid #222223;
    background: #0f0f10;
    pointer-events: none;
}

body.mobile-app main > .charts{
    position: absolute;
    inset: calc(var(--mobile-chart-bar-height) + var(--mobile-history-bar-height)) 0 calc(var(--mobile-nav-height) + var(--mobile-chat-bar-height)) var(--mobile-draws-width);
    width: auto;
    height: auto;
    overflow: visible;
}

body.mobile-app main > .charts > div{
    overflow: visible;
}

body.mobile-app main > .charts > div .buttons{
    top: calc(8px + env(safe-area-inset-top, 0px) - var(--mobile-chart-bar-height) - var(--mobile-history-bar-height));
    left: calc(8px + env(safe-area-inset-left, 0px) - var(--mobile-draws-width));
    flex-wrap: nowrap;
}

body.mobile-app main > .charts > div .buttons > .symbol{
    min-width: 0;
    max-width: min(35vw, 170px);
    cursor: pointer;
}

body.mobile-app main > .charts > div .buttons > .symbol > span{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.mobile-app main > .draws{
    position: fixed;
    z-index: 30;
    top: calc(var(--mobile-chart-bar-height) + var(--mobile-history-bar-height));
    left: 0;
    bottom: calc(var(--mobile-nav-height) + var(--mobile-chat-bar-height));
    width: var(--mobile-draws-width);
    height: auto;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 6px calc(6px + env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #0a0a0a;
}

body.mobile-app main .draws .tabs-count,
body.mobile-app main .draws .app-logo{
    display: none !important;
}

body.mobile-app main .draws .settings > div.color .picker,
body.mobile-app main .draws .settings > div.size .picker,
body.mobile-app main .draws .settings > div.style .picker{
    position: fixed;
    right: auto;
    left: calc(var(--mobile-draws-width) + 8px);
    transform: translateY(-50%);
    z-index: 80;
}

body.mobile-app main > aside.app-sidebar{
    position: fixed;
    z-index: 40;
    inset: 0;
    width: auto;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    flex: none;
    pointer-events: none;
}

body.mobile-app main > aside > nav.app-bottom-nav{
    position: absolute;
    z-index: 6;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-nav-height);
    min-height: var(--mobile-nav-height);
    padding: 6px max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0;
    overflow: visible;
    border-top: 1px solid #222223;
    outline: 0;
    background: #0a0a0a;
    pointer-events: auto;
}

body.mobile-app main > aside > nav.app-bottom-nav > label{
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    padding: 30px 2px 3px;
    background-position: top 3px left 50%;
    color: #7c7c7c;
    font-size: 9px;
    text-overflow: ellipsis;
    overflow: visible;
}

body.mobile-app main > aside > nav.app-bottom-nav > label > span:not(.user-photo):not(.ideas-badge):not(.news-badge):not(.alerts-badge){
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.mobile-app main > aside:not(.is-sheet-open) > nav.app-bottom-nav > label:has(input:checked){
    color: #7c7c7c;
    filter: grayscale(1);
    opacity: .82;
}

body.mobile-app main > aside > nav.app-bottom-nav > label[data-nav="user"]{
    height: auto;
    min-height: 0;
    align-self: stretch;
    padding: 0;
    display: grid;
    place-items: center;
    box-sizing: border-box;
}

body.mobile-app main > aside > nav.app-bottom-nav > label[data-nav="user"] .user-photo{
    float: none;
    margin: 0;
    place-self: center;
    transform: translateY(-8px);
    --user-rank-badge-size: 14px;
    --user-rank-badge-offset: -2px;
}

body.mobile-app main > aside > .app-sheet > .search > .night-watch-button,
body.mobile-app main > aside > .mobile-panel > .search > .night-watch-button{
    display: none !important;
}

body.mobile-app select.ideas-sort{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

body.mobile-app select.ideas-sort::picker-icon{
    display: none;
}

body.mobile-app main > .charts > div .chat{
    right: auto;
    bottom: calc(-1 * var(--mobile-chat-bar-height));
    left: calc(-1 * var(--mobile-draws-width));
    width: 100vw;
    max-width: none;
}

body.mobile-app main > .charts > div .chat .input{
    height: var(--mobile-chat-bar-height);
    padding: 2px max(8px, env(safe-area-inset-right, 0px)) 2px max(8px, env(safe-area-inset-left, 0px));
    gap: 8px;
    border-top: 1px solid #222223;
    border-bottom: 1px solid #222223;
    background: #0f0f10;
}

body.mobile-app main > .charts > div .chat .input > label[data-id="collapse"]{
    display: none !important;
}

body.mobile-app main > .charts > div .chat .input > .text-input{
    min-width: 0;
    min-height: 30px;
    max-height: 30px;
    padding: 7px 4px;
    overflow: hidden;
    background-color: #0f0f10;
}

body.mobile-app main > .charts > div .chat .input > .text-input:focus{
    background-color: #0f0f10;
}

body.mobile-app main > .charts > div .chat:has(label[data-id="collapse"] > input:checked) .input{
    width: 100%;
}

body.mobile-app main > .charts > div .chat .messages{
    position: absolute;
    left: calc(var(--mobile-draws-width) + 12px);
    bottom: calc(var(--mobile-chat-bar-height) + 72px);
    width: min(280px, calc(100vw - var(--mobile-draws-width) - 104px));
    max-width: none;
    max-height: 210px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-mask-image: none;
    mask-image: none;
}

body.mobile-app main > .charts > div .chat .messages > div{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.mobile-app main > .charts > div .chat .messages > div > .chat-message-body{
    flex: 1 1 0;
    width: 0;
    max-width: calc(100% - 34px);
    overflow: visible;
}

body.mobile-app main > .charts > div .chat .messages > div.system{
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    white-space: normal;
}

body.mobile-app main > .charts > div .chat .messages > div > div .chat-author,
body.mobile-app main > .charts > div .chat .messages > div > div .message{
    max-width: 100%;
}

body.mobile-app main > .charts > div .chat .messages > div > div .rank{
    flex: 0 1 auto;
    min-width: 0;
    max-width: 58%;
}

body.mobile-app main > .charts > div .chat .messages > div > div .rank > span{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.mobile-app .chat-emoji-modal{
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(0, 0, 0, .72);
}

body.mobile-app .chat-emoji-dialog{
    width: min(320px, 100%);
    max-height: min(70dvh, 430px);
    padding: 12px;
    border: 1px solid #313131;
    border-radius: 16px;
    background: #121214;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}

body.mobile-app .chat-emoji-grid{
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    max-height: calc(min(70dvh, 430px) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.mobile-app .chat-emoji-grid > button{
    min-width: 0;
    aspect-ratio: 1;
    border: 0;
    border-radius: 9px;
    background: #202024;
    color: #fff;
    font-size: 22px;
}

body.mobile-app main > .charts > div > .history-player{
    position: absolute;
    z-index: 32;
    top: auto;
    right: auto;
    bottom: calc(-1 * var(--mobile-chat-bar-height));
    left: calc(-1 * var(--mobile-draws-width));
    width: 100vw;
    height: var(--mobile-chat-bar-height);
    min-height: var(--mobile-chat-bar-height);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) 6px max(8px, env(safe-area-inset-left, 0px));
    gap: 6px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-bottom: 1px solid #222223;
    border-radius: 0;
    background: #0f0f10;
    box-shadow: none;
    overscroll-behavior-x: contain;
}

body.mobile-app:has(main > .charts > div > .history-player) main > .charts > div .chat .input{
    display: none;
}

body.mobile-app .game-result-card.game-result-capturing{
    width: min(560px, calc(100vw - 28px));
}

body.mobile-app main > .charts > div > .history-player > *{
    flex: 0 0 auto;
}

body.mobile-app main > .charts > div > .history-player button{
    min-width: 58px;
}

body.mobile-app main > .charts > div > .history-player input[type="datetime-local"]{
    width: 158px;
}

body.mobile-app main > aside > .app-sheet-backdrop{
    position: absolute;
    z-index: 4;
    inset: 0 0 var(--mobile-nav-height) 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, .42);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

body.mobile-app main > aside > .app-sheet,
body.mobile-app main > aside > .mobile-panel{
    --app-sheet-drag-x: 0px;
    position: absolute;
    z-index: 5;
    top: 0;
    right: auto;
    bottom: var(--mobile-nav-height);
    left: 0;
    width: var(--mobile-side-drawer-width);
    max-width: calc(100vw - 48px);
    height: auto;
    max-height: none;
    padding-top: env(safe-area-inset-top, 0px);
    overflow: hidden;
    border: 0;
    border-right: 1px solid #313131;
    border-radius: 0;
    background: #0a0a0a;
    transform: translate3d(calc(-100% - 12px), 0, 0);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
    touch-action: pan-y;
    will-change: transform;
}

/*
 * A nested scrolling list is the touch-action boundary in Android WebView.
 * Keep horizontal pointer events available to the parent drawer even when a
 * swipe starts on a symbol, card or another child inside that list.
 */
body.mobile-app .mobile-swipe-drawer,
body.mobile-app .mobile-swipe-drawer :is(section, .scroll, .body){
    touch-action: pan-y;
}

/* Compact vertical affordance: swipe the drawer to the left to close it. */
body.mobile-app .mobile-swipe-drawer:not(.mobile-fullscreen-screen)::after{
    content: "";
    position: absolute;
    z-index: 80;
    top: 50%;
    right: 5px;
    width: 4px;
    height: 42px;
    border-radius: 999px;
    background: #5f6671;
    opacity: .9;
    pointer-events: none;
    transform: translateY(-50%);
}

body.mobile-app .side-modals #side-user-stats:has(.profile-edit-modal)::after,
body.mobile-app .side-modals #side-user-stats:has(.profile-preview-modal)::after{
    display: none;
}

body.mobile-app main > aside.is-sheet-open > .app-sheet-backdrop{
    opacity: 1;
    pointer-events: auto;
}

body.mobile-app main > aside.is-sheet-open > .app-sheet,
body.mobile-app main > aside.is-sheet-open > .mobile-panel{
    transform: translate3d(var(--app-sheet-drag-x), 0, 0);
    pointer-events: auto;
}

body.mobile-app main > aside.is-sheet-dragging > .app-sheet,
body.mobile-app main > aside.is-sheet-dragging > .mobile-panel{
    transition: none;
}

body.mobile-app main > aside.is-sheet-returning > .app-sheet,
body.mobile-app main > aside.is-sheet-returning > .mobile-panel{
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

body.mobile-app main > aside > .app-sheet > .app-sheet-handle,
body.mobile-app main > aside > .mobile-panel > .app-sheet-handle{
    display: none;
}

body.mobile-app main > aside > .app-sheet > .app-sheet-handle::before,
body.mobile-app main > aside > .mobile-panel > .app-sheet-handle::before{
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #454545;
    transform: translateX(-50%);
}

body.mobile-app main > aside > .app-sheet > .search,
body.mobile-app main > aside > .mobile-panel > .search{
    flex: 0 0 auto;
    padding: 10px;
}

body.mobile-app main > aside > .app-sheet > section,
body.mobile-app main > aside > .mobile-panel > section{
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    padding: 10px;
    box-sizing: border-box;
    overscroll-behavior: contain;
}

body.mobile-app .side-modals{
    top: 0;
    right: 0;
    bottom: var(--mobile-nav-height);
    left: 0;
    width: 100vw;
    height: auto;
    padding: 0;
    display: block;
    overflow: hidden;
    background: rgba(0, 0, 0, .42);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

body.mobile-app .side-modals:has(#side-user-stats){
    width: 100vw;
}

body.mobile-app .side-modals:has(.profile-edit-modal),
body.mobile-app .side-modals:has(.profile-preview-modal){
    z-index: 4100;
    bottom: 0;
}

body.mobile-app .side-modals:empty{
    display: none;
}

body.mobile-app .mobile-profile-loading{
    position: fixed;
    z-index: 140;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .56);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    touch-action: none;
    pointer-events: auto;
}

body.mobile-app .mobile-profile-loading-card{
    min-width: 126px;
    padding: 16px 18px;
    border: 1px solid #313131;
    border-radius: 8px;
    box-sizing: border-box;
    background: #141414;
    color: #7c7c7c;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.mobile-app .side-modals > div,
body.mobile-app .side-modals #side-user-stats{
    --mobile-side-drawer-drag-x: 0px;
    position: absolute;
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: var(--mobile-side-drawer-width);
    max-width: calc(100vw - 48px);
    height: 100%;
    max-height: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid #313131;
    border-radius: 0;
    transform-origin: left center;
    touch-action: pan-y;
}

body.mobile-app .side-modals > .side-modal,
body.mobile-app .side-modals #side-user-stats .body{
    height: 100%;
    max-height: 100%;
}

body.mobile-app .side-modals > div:last-child{
    animation-name: mobileSideModalSlideIn;
}

body.mobile-app .side-modals > div.is-closing{
    animation-name: mobileSideModalSlideOut;
}

body.mobile-app .side-modals > div.is-side-drawer-dragging,
body.mobile-app .side-modals > div.is-side-drawer-returning{
    animation: none !important;
    transform: translate3d(var(--mobile-side-drawer-drag-x), 0, 0);
}

body.mobile-app .side-modals > div.is-side-drawer-dragging{
    transition: none;
}

body.mobile-app .side-modals > div.is-side-drawer-returning{
    transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

body.mobile-app .side-modals #side-user-stats .body{
    height: 100%;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

@keyframes mobileSideModalSlideIn{
    from{ transform: translate3d(-100%, 0, 0); }
    to{ transform: translate3d(0, 0, 0); }
}

@keyframes mobileSideModalSlideOut{
    from{ transform: translate3d(var(--mobile-side-drawer-drag-x), 0, 0); }
    to{ transform: translate3d(-100%, 0, 0); }
}

/* Небольшие сообщения остаются модалками, но не растягиваются почти на весь экран. */
body.mobile-app .app-dialog-card{
    width: min(340px, calc(100vw - 56px));
}

body.mobile-app :is(.modal, .confirm-modal):not(.mobile-fullscreen-screen) > div{
    width: min(360px, calc(100vw - 56px));
}

/* Длинные мобильные окна являются отдельными экранами, а не рамочными модалками. */
body.mobile-app .mobile-fullscreen-screen{
    --mobile-screen-drag-x: 0px;
    box-sizing: border-box;
}

body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-dragging,
body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-returning,
body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-closing{
    z-index: 4000 !important;
    transform: translate3d(var(--mobile-screen-drag-x), 0, 0) !important;
}

body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-dragging{
    transition: none !important;
}

body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-returning,
body.mobile-app .mobile-fullscreen-screen.is-mobile-screen-closing{
    transition: transform .18s cubic-bezier(.2,.8,.2,1) !important;
}

body.mobile-app .ind-menu.mobile-fullscreen-screen{
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: max(10px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
    border: 0;
    border-radius: 0;
    background: #0a0a0a;
    box-shadow: none;
}

body.mobile-app .ind-menu .ind-mobile-head{
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.mobile-app .ind-menu .ind-mobile-head strong{
    min-width: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

body.mobile-app .ind-menu .ind-mobile-close{
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #1e1e1e;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
}

body.mobile-app .ind-settings .inds-close{
    display: block;
}

body.mobile-app .ind-menu .ind-list{
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

body.mobile-app :is(
    .ind-settings-overlay,
    .indicator-request-overlay,
    .game-rules-modal,
    .prem-overlay,
    .pay-overlay,
    .free-video-overlay,
    .telegram-connect-modal,
    .news-edit-overlay,
    .user-report-modal
).mobile-fullscreen-screen{
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    display: block;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #0a0a0a;
    backdrop-filter: none;
}

body.mobile-app :is(
    .ind-settings-overlay > .ind-settings,
    .indicator-request-overlay > .indicator-request,
    .game-rules-modal > .game-rules-card,
    .prem-overlay > .prem,
    .pay-overlay > .pay,
    .free-video-overlay > .free-video,
    .telegram-connect-modal > .telegram-connect-card,
    .news-edit-overlay > .news-edit,
    .user-report-modal > div
){
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
}

body.mobile-app :is(
    .ind-settings-overlay > .ind-settings,
    .indicator-request-overlay > .indicator-request,
    .game-rules-modal > .game-rules-card,
    .prem-overlay > .prem,
    .pay-overlay > .pay,
    .free-video-overlay > .free-video,
    .telegram-connect-modal > .telegram-connect-card,
    .news-edit-overlay > .news-edit,
    .user-report-modal > div
){
    padding-right: max(28px, env(safe-area-inset-right, 0px));
    padding-left: max(28px, env(safe-area-inset-left, 0px));
}

/* Короткие справки об индикаторах показываются компактным нижним листом,
   а не растягиваются пустым полноэкранным окном. */
body.mobile-app .indicator-guide-overlay.mobile-fullscreen-screen{
    position: fixed !important;
    inset: 0 !important;
    z-index: 2060;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: max(18px, env(safe-area-inset-top, 0px)) 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, .7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

body.mobile-app .indicator-guide-overlay > .indicator-guide{
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: calc(100dvh - max(18px, env(safe-area-inset-top, 0px)));
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-top: 1px solid #313131;
    border-radius: 16px 16px 0 0;
    background: #141414;
    box-shadow: 0 -16px 36px rgba(0, 0, 0, .42);
    animation: premiumDialogIn .24s cubic-bezier(.2, .8, .2, 1) both;
}

body.mobile-app .indicator-guide .indicator-guide-hero{
    width: 100%;
    height: auto;
    aspect-ratio: 2.5 / 1;
    border-radius: 15px 15px 0 0;
    background-position: center;
    background-size: cover;
}

body.mobile-app .indicator-guide .indicator-guide-hero::after{
    background: linear-gradient(180deg, rgba(20, 20, 20, 0) 52%, #141414 100%);
}

body.mobile-app .indicator-guide .indicator-guide-content{
    margin-top: -22px;
    padding: 0 max(18px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}

body.mobile-app .indicator-guide .indicator-guide-premium{
    margin-bottom: 7px;
}

body.mobile-app .indicator-guide h2{
    margin-bottom: 10px;
    font-size: 20px;
}

body.mobile-app .indicator-guide .indicator-guide-copy{
    gap: 0;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #2b2b2b;
    border-radius: 10px;
    background: #191919;
}

body.mobile-app .indicator-guide .indicator-guide-copy > div{
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.mobile-app .indicator-guide .indicator-guide-copy > div + div{
    border-top: 1px solid #2b2b2b;
}

body.mobile-app .indicator-guide .indicator-guide-copy p{
    font-size: 12px;
}

body.mobile-app .indicator-guide .indicator-guide-done{
    min-height: 40px;
}

body.mobile-app .ind-settings-overlay > .ind-settings,
body.mobile-app .game-rules-modal > .game-rules-card,
body.mobile-app .news-edit-overlay > .news-edit,
body.mobile-app .user-report-modal > div{
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
}

/* Тренировка сделок: компактный нижний лист вместо полноэкранного экрана. */
body.mobile-app .game-rules-modal{
    padding: max(18px, env(safe-area-inset-top, 0px)) 0 0;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, .7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

body.mobile-app .game-rules-modal > .game-rules-card{
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: calc(100dvh - max(18px, env(safe-area-inset-top, 0px)));
    margin: 0;
    padding: 30px max(18px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-top: 1px solid #313131;
    border-radius: 16px 16px 0 0;
    background: #09090d;
    box-shadow: 0 -16px 36px rgba(0, 0, 0, .42);
    animation: gameRulesSheetIn .24s cubic-bezier(.2, .8, .2, 1) both;
}

body.mobile-app .game-rules-modal .game-rules-handle{
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 50%;
    width: 54px;
    height: 4px;
    border-radius: 999px;
    background: #59616b;
    opacity: .75;
    transform: translateX(-50%);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

body.mobile-app .game-rules-modal .game-rules-handle::before{
    content: "";
    position: absolute;
    inset: -12px -116px -14px;
}

body.mobile-app .game-rules-modal > .game-rules-card.is-dragging{
    animation: none;
    transition: none;
}

body.mobile-app .game-rules-modal > .game-rules-card.is-dragging .game-rules-handle{
    cursor: grabbing;
}

body.mobile-app .game-rules-modal > .game-rules-card.is-returning{
    animation: none;
    transition: transform .18s cubic-bezier(.2, 0, .2, 1);
}

body.mobile-app .game-rules-modal.is-closing{
    animation: gameRulesSheetOverlayOut .2s ease-in both;
}

body.mobile-app .game-rules-modal.is-swipe-closing > .game-rules-card{
    animation: gameRulesSheetOut .2s cubic-bezier(.4, 0, 1, 1) both;
}

@keyframes gameRulesSheetIn{
    from{ transform: translate3d(0, 100%, 0); }
    to{ transform: translate3d(0, 0, 0); }
}

@keyframes gameRulesSheetOut{
    to{ transform: translate3d(0, 100%, 0); }
}

@keyframes gameRulesSheetOverlayOut{
    to{ opacity: 0; }
}

body.mobile-app .side-modals #side-user-stats:has(.profile-edit-modal),
body.mobile-app .side-modals #side-user-stats:has(.profile-preview-modal){
    overflow: visible;
    transform: none !important;
}

body.mobile-app .side-modals #side-user-stats .profile-edit-modal,
body.mobile-app .side-modals #side-user-stats .profile-preview-modal{
    position: fixed;
    z-index: 120;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: auto;
    max-height: none;
    padding: 0;
    display: flex;
    align-items: flex-end;
    justify-content: stretch;
    overflow: hidden;
    background: rgba(0, 0, 0, .58);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

body.mobile-app .side-modals #side-user-stats .profile-edit-modal > .profile-edit-sheet,
body.mobile-app .side-modals #side-user-stats .profile-preview-modal > .profile-preview-sheet{
    flex: 0 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: calc(100dvh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 32px max(24px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
    border: 1px solid #252525;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #0d1013;
    box-shadow: 0 -14px 38px rgba(0, 0, 0, .48);
}

body.mobile-app .alert-toasts{
    z-index: 5000;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: 50%;
    bottom: auto;
    width: min(340px, calc(100vw - 28px));
    transform: translateX(50%);
}

body.mobile-app .alert-toast{
    animation: mobileAlertToastIn .2s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes mobileAlertToastIn{
    from{ opacity: 0; transform: translate3d(0, -12px, 0); }
    to{ opacity: 1; transform: translate3d(0, 0, 0); }
}

body.mobile-app main > aside > .app-sheet > section.symbols,
body.mobile-app main > aside > .mobile-panel > section.symbols{
    padding-top: 0;
}

body.mobile-app .symbols .row.head{
    top: 0;
    z-index: 20;
    background: #0a0a0a;
    box-shadow: 0 -1px 0 #0a0a0a;
}

body.mobile-app :is(
    .indicator-guide-close,
    .indicator-request-close,
    .game-rules-close,
    .prem-close,
    .pay-close,
    .free-video-close,
    .telegram-connect-close
){
    top: max(12px, env(safe-area-inset-top, 0px));
}

body.mobile-app :is(.prem, .pay, .free-video, .telegram-connect-card){
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

body.mobile-app .side-modals > .mobile-fullscreen-screen{
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (orientation: landscape) and (max-height: 600px){
    body.mobile-app{
        --mobile-nav-content-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce){
    body.mobile-app main > aside > .app-sheet-backdrop,
    body.mobile-app main > aside > .app-sheet,
    body.mobile-app main > aside > .mobile-panel,
    body.mobile-app .side-modals > div,
    body.mobile-app .mobile-fullscreen-screen{
        transition: none;
        animation: none !important;
    }
}
