/* Stable UI uniformisation loaded after app.css.
   Keep this file focused on layout rhythm; do not put route/auth/media logic here. */

:root {
    --ui-page-max: 680px;
    --ui-page-pad: 14px;
    --ui-gap: 14px;
    --ui-card-radius: 20px;
    --ui-card-bg: linear-gradient(180deg, rgba(24, 27, 37, 0.96), rgba(12, 14, 22, 0.98));
    --ui-card-border: rgba(255, 255, 255, 0.12);
    --ui-card-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
    --ui-bottom-space: calc(88px + env(safe-area-inset-bottom, 0px));
}

html,
body.theme-market {
    min-height: var(--app-viewport-height, 100dvh) !important;
    overflow-x: hidden !important;
    background: #070b16 !important;
}

body.theme-market .device-frame {
    width: 100% !important;
    min-height: var(--app-viewport-height, 100dvh) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    background: #070b16 !important;
}

body.theme-market .app-content {
    width: 100% !important;
    max-width: var(--ui-page-max) !important;
    min-height: auto !important;
    flex: 0 0 auto !important;
    margin: 0 auto !important;
    padding: var(--ui-page-pad) var(--ui-page-pad) 18px !important;
    box-sizing: border-box !important;
}

body.theme-market.has-bottom-nav .app-content {
    padding-bottom: 18px !important;
}

body.theme-market[data-current-page="access"] .app-content {
    max-width: 560px !important;
    flex: 1 1 auto !important;
    display: grid !important;
    align-items: center !important;
    padding: 16px !important;
}

body.theme-market[data-current-page="access"] .access-screen {
    min-height: auto !important;
    width: 100% !important;
}

body.theme-market .store-shell,
body.theme-market .content-page,
body.theme-market .profile-page,
body.theme-market .wheel-page {
    width: 100% !important;
    max-width: var(--ui-page-max) !important;
    margin: 0 auto !important;
    display: grid !important;
    gap: var(--ui-gap) !important;
    align-content: start !important;
}

body.theme-market .content-page,
body.theme-market .profile-page,
body.theme-market .wheel-page {
    max-width: 560px !important;
}

body.theme-market .section-head {
    width: 100% !important;
    display: grid !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 2px 2px 0 !important;
    text-align: left !important;
}

body.theme-market .section-head h1,
body.theme-market .section-head h2 {
    margin: 0 !important;
    line-height: 1.03 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
}

body.theme-market .section-head p {
    max-width: 54ch !important;
    margin: 0 !important;
    color: rgba(247, 244, 235, 0.72) !important;
    line-height: 1.45 !important;
    font-size: 13px !important;
}

body.theme-market .status-pill,
body.theme-market .live-dot,
body.theme-market .promo-badge,
body.theme-market .product-badge,
body.theme-market .tag-row span {
    min-height: 28px !important;
    max-width: 100% !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: 0.06em !important;
}

body.theme-market .store-header-card,
body.theme-market .wheel-card,
body.theme-market .panel-card,
body.theme-market .page-card,
body.theme-market .page-showcase,
body.theme-market .profile-feature-card,
body.theme-market .profile-kpi-grid article,
body.theme-market .cart-helper-card,
body.theme-market .cart-summary-card,
body.theme-market .checkout-card,
body.theme-market .cart-line {
    border-radius: var(--ui-card-radius) !important;
    background: var(--ui-card-bg) !important;
    border: 1px solid var(--ui-card-border) !important;
    box-shadow: var(--ui-card-shadow) !important;
    color: #f7f4eb !important;
}

body.theme-market .store-header-card,
body.theme-market .wheel-card,
body.theme-market .panel-card,
body.theme-market .page-card,
body.theme-market .page-showcase,
body.theme-market .profile-feature-card {
    padding: 16px !important;
}

body.theme-market .store-header-card {
    gap: 14px !important;
}

body.theme-market .stats-row,
body.theme-market .profile-kpi-grid,
body.theme-market .cart-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
}

body.theme-market .stats-row > *,
body.theme-market .profile-kpi-grid article,
body.theme-market .cart-summary-card {
    min-width: 0 !important;
    padding: 12px !important;
    text-align: center !important;
}

body.theme-market .promo-grid,
body.theme-market .product-grid,
body.theme-market .auth-grid,
body.theme-market .profile-summary,
body.theme-market .cart-items,
body.theme-market .wheel-legend,
body.theme-market .promo-info-stack {
    display: grid !important;
    gap: 12px !important;
}

body.theme-market .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.theme-market .product-card {
    min-width: 0 !important;
    height: 100% !important;
}

body.theme-market .product-copy {
    min-width: 0 !important;
}

body.theme-market .product-copy h3 {
    overflow-wrap: anywhere !important;
}

body.theme-market .product-price-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

body.theme-market .product-price-chip {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-market .page-showcase {
    width: 100% !important;
    margin: 0 !important;
    gap: 12px !important;
    isolation: isolate !important;
}

body.theme-market .page-showcase::before,
body.theme-market .page-showcase::after {
    opacity: 0.28 !important;
}

body.theme-market .page-showcase-media {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    border-radius: 18px !important;
    overflow: hidden !important;
}

body.theme-market .page-showcase-media img,
body.theme-market .page-showcase-media video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

body.theme-market .page-showcase-copy {
    padding: 14px !important;
    border-radius: 18px !important;
    gap: 10px !important;
}

body.theme-market .page-showcase-copy h2,
body.theme-market .panel-card h2,
body.theme-market .page-card h2,
body.theme-market .cart-head h3 {
    margin: 0 !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body.theme-market .wysiwyg,
body.theme-market .modal-copy,
body.theme-market .panel-card p,
body.theme-market .page-card p,
body.theme-market .muted {
    color: rgba(247, 244, 235, 0.74) !important;
    line-height: 1.48 !important;
}

body.theme-market .profile-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

body.theme-market .profile-feature-grid span,
body.theme-market .profile-code-card,
body.theme-market .list-row,
body.theme-market .wheel-legend-item,
body.theme-market .order-progress,
body.theme-market .order-admin-note {
    min-width: 0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

body.theme-market .list-row,
body.theme-market .wheel-legend-item {
    padding: 11px 12px !important;
}

body.theme-market .profile-order-card {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    overflow: hidden !important;
}

body.theme-market .profile-order-card summary {
    min-width: 0 !important;
    padding: 12px !important;
    gap: 10px !important;
}

body.theme-market .wheel-card {
    justify-items: center !important;
}

body.theme-market .wheel-stage {
    width: min(100%, 330px) !important;
    margin-inline: auto !important;
}

body.theme-market .wheel-legend {
    width: 100% !important;
}

body.theme-market .wheel-legend-item {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
}

body.theme-market .wheel-legend-item strong,
body.theme-market .wheel-legend-item small {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-market .cart-drawer {
    width: min(calc(100vw - 18px), 452px) !important;
    max-height: min(calc(var(--app-viewport-height, 100dvh) - 104px), 720px) !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(18, 21, 30, 0.985), rgba(8, 10, 16, 0.995)) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

body.theme-market .cart-head {
    align-items: center !important;
    gap: 10px !important;
}

body.theme-market .cart-helper-card,
body.theme-market .checkout-card {
    padding: 13px !important;
    box-shadow: none !important;
}

body.theme-market .cart-line {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px !important;
    box-shadow: none !important;
}

body.theme-market .cart-line-media {
    width: 58px !important;
    height: 58px !important;
    border-radius: 15px !important;
    overflow: hidden !important;
}

body.theme-market .cart-line-media img,
body.theme-market .cart-line-fallback {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.theme-market .cart-line-copy {
    min-width: 0 !important;
}

body.theme-market .cart-line-copy strong,
body.theme-market .cart-line-desc,
body.theme-market .cart-line-price,
body.theme-market .cart-line-total {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-market .cart-controls {
    display: grid !important;
    gap: 6px !important;
    justify-items: stretch !important;
}

body.theme-market .cart-controls input {
    width: 56px !important;
    min-width: 56px !important;
}

body.theme-market .checkout-card {
    display: grid !important;
    gap: 10px !important;
}

body.theme-market .checkout-card input,
body.theme-market .checkout-card select,
body.theme-market .checkout-card button,
body.theme-market .panel-card input,
body.theme-market .panel-card button,
body.theme-market .page-card input,
body.theme-market .page-card button,
body.theme-market .page-card textarea {
    min-height: 46px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

body.theme-market .footer-socials {
    width: min(calc(100% - 28px), 430px) !important;
    max-width: 430px !important;
    margin: 0 auto !important;
    padding: 6px 0 calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    justify-items: center !important;
    gap: 10px !important;
    text-align: center !important;
}

body.theme-market .footer-socials p {
    max-width: 360px !important;
    margin: 0 auto !important;
    color: rgba(247, 244, 235, 0.72) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

body.theme-market .footer-social-links {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

body.theme-market .footer-social-link {
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 8px 11px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #f7f4eb !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

body.theme-market .footer-social-icon,
body.theme-market .footer-social-icon svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
}

body.theme-market .bottom-nav {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-50%) translateZ(0) !important;
    width: min(calc(100vw - 16px), 452px) !important;
    min-height: 62px !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 2px !important;
    padding: 6px !important;
    border-radius: 22px !important;
    background: rgba(8, 10, 16, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48) !important;
    z-index: 80 !important;
    box-sizing: border-box !important;
}

body.theme-market .bottom-nav a,
body.theme-market .bottom-nav .nav-cart-btn {
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 6px 1px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    overflow: hidden !important;
}

body.theme-market .bottom-nav .nav-label {
    width: 100% !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}

body.theme-market .bottom-nav .nav-icon,
body.theme-market .bottom-nav .nav-icon-svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
}

body.theme-market.telegram-lite-mode .promo-card::before,
body.theme-market.telegram-lite-mode .promo-card::after,
body.theme-market.telegram-lite-mode .product-card::before,
body.theme-market.telegram-lite-mode .product-card::after,
body.theme-market.telegram-lite-mode .store-header-card::before,
body.theme-market.telegram-lite-mode .wheel-card::before {
    display: none !important;
}

@media (min-width: 720px) {
    body.theme-market .auth-grid,
    body.theme-market .profile-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 430px) {
    :root {
        --ui-page-pad: 12px;
        --ui-gap: 12px;
    }

    body.theme-market .product-grid {
        gap: 10px !important;
    }

    body.theme-market .store-header-card,
    body.theme-market .wheel-card,
    body.theme-market .panel-card,
    body.theme-market .page-card,
    body.theme-market .page-showcase,
    body.theme-market .profile-feature-card {
        padding: 14px !important;
        border-radius: 18px !important;
    }

    body.theme-market .cart-line {
        grid-template-columns: 52px minmax(0, 1fr) !important;
    }

    body.theme-market .cart-controls {
        grid-column: 1 / -1 !important;
        grid-template-columns: 1fr auto !important;
    }

    body.theme-market .cart-controls input {
        width: 100% !important;
    }
}

@media (max-width: 360px) {
    body.theme-market .bottom-nav {
        width: calc(100vw - 12px) !important;
        padding: 5px !important;
    }

    body.theme-market .bottom-nav .nav-label {
        font-size: 8px !important;
    }
}

/* === Stable wheel/about premium polish START === */
/* CSS-only: no new media, no Telegram init changes, no render-heavy effects. */
body.theme-market[data-current-page="games"] .app-content {
    max-width: 540px !important;
}

body.theme-market[data-current-page="games"] .wheel-page {
    max-width: 540px !important;
    gap: 16px !important;
    padding-top: 4px !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head {
    text-align: center !important;
    justify-items: center !important;
    gap: 10px !important;
    padding: 8px 4px 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head .status-pill {
    min-height: 42px !important;
    padding: 10px 18px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035)) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    color: rgba(247, 244, 235, 0.78) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
    letter-spacing: 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head h1 {
    max-width: 100% !important;
    margin: 0 !important;
    color: #ffd75d !important;
    font-size: 42px !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-shadow: 0 0 22px rgba(255, 206, 71, 0.22) !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head p {
    max-width: 24rem !important;
    margin: 0 auto !important;
    color: rgba(247, 244, 235, 0.62) !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

body.theme-market[data-current-page="games"] .wheel-card {
    width: 100% !important;
    display: grid !important;
    justify-items: center !important;
    gap: 18px !important;
    padding: 8px 0 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

body.theme-market[data-current-page="games"] .wheel-card::before {
    display: none !important;
}

body.theme-market[data-current-page="games"] .wheel-stage {
    width: min(100%, 408px) !important;
    aspect-ratio: 1 / 1 !important;
    margin: 6px auto 8px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    isolation: isolate !important;
    filter: none !important;
    perspective: none !important;
}

body.theme-market[data-current-page="games"] .wheel-stage::before {
    content: "" !important;
    position: absolute !important;
    inset: -24px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(255, 213, 84, 0.30) 0%, rgba(255, 213, 84, 0.12) 42%, rgba(255, 213, 84, 0) 72%) !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

body.theme-market[data-current-page="games"] .wheel-disc {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 50% !important;
    border: 12px solid #11151d !important;
    background: var(--wheel-surface, conic-gradient(#f4c95d 0deg 60deg, #57d68d 60deg 120deg, #5ca8ff 120deg 180deg, #ff7a59 180deg 240deg, #d7ddff 240deg 300deg, #f4c95d 300deg 360deg)) !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), inset 0 22px 34px rgba(255, 255, 255, 0.16), inset 0 -26px 46px rgba(0, 0, 0, 0.36), 0 22px 46px rgba(0, 0, 0, 0.46) !important;
    transform: rotate(var(--wheel-rotation, 0deg)) !important;
    transform-style: flat !important;
    overflow: hidden !important;
}

body.theme-market[data-current-page="games"] .wheel-disc::before {
    inset: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.20) !important;
    background: radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 30%) !important;
    mix-blend-mode: normal !important;
}

body.theme-market[data-current-page="games"] .wheel-disc::after {
    inset: 0 !important;
    height: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0) 0 46%, rgba(0, 0, 0, 0.30) 47% 49%, rgba(255, 255, 255, 0) 51%) !important;
    filter: none !important;
}

body.theme-market[data-current-page="games"] .wheel-disc.is-spinning {
    transition: transform 6.2s cubic-bezier(0.08, 0.82, 0.12, 1) !important;
    filter: none !important;
}

body.theme-market[data-current-page="games"] .wheel-pointer {
    top: -13px !important;
    width: 52px !important;
    height: 54px !important;
    z-index: 6 !important;
    clip-path: none !important;
    background: transparent !important;
    filter: none !important;
}

body.theme-market[data-current-page="games"] .wheel-pointer span {
    position: relative !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    border-left: 22px solid transparent !important;
    border-right: 22px solid transparent !important;
    border-bottom: 30px solid #ffd75d !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.42)) !important;
}

body.theme-market[data-current-page="games"] .wheel-pointer span::after {
    content: "" !important;
    position: absolute !important;
    left: -8px !important;
    top: 28px !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #c9aa35 !important;
    box-shadow: 0 0 18px rgba(255, 215, 93, 0.36) !important;
}

body.theme-market[data-current-page="games"] .wheel-sector-label {
    width: 112px !important;
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: 14px !important;
    line-height: 1.08 !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.58) !important;
    letter-spacing: 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-sector-label b {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(8, 10, 18, 0.52) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
    font-size: 14px !important;
}

body.theme-market[data-current-page="games"] .wheel-sector-label span {
    max-width: 104px !important;
    color: inherit !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.theme-market[data-current-page="games"] .wheel-center-badge {
    width: 76px !important;
    height: 76px !important;
    border-radius: 50% !important;
    background: #151927 !important;
    color: #ffd75d !important;
    border: 6px solid #ffd75d !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
}

body.theme-market[data-current-page="games"] .wheel-center-badge img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body.theme-market[data-current-page="games"] .wheel-legend {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 8px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

body.theme-market[data-current-page="games"] .wheel-legend::-webkit-scrollbar {
    display: none !important;
}

body.theme-market[data-current-page="games"] .wheel-legend-item {
    flex: 0 0 auto !important;
    width: min(74vw, 236px) !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

body.theme-market[data-current-page="games"] .wheel-legend-item small {
    font-size: 11px !important;
    color: rgba(247, 244, 235, 0.58) !important;
}

body.theme-market[data-current-page="games"] .wheel-spin-form,
body.theme-market[data-current-page="games"] .wheel-card > .primary-btn.full {
    width: 100% !important;
}

body.theme-market[data-current-page="games"] .wheel-spin-form {
    display: grid !important;
    gap: 14px !important;
}

body.theme-market[data-current-page="games"] .wheel-spin-form .primary-btn.full,
body.theme-market[data-current-page="games"] .wheel-card > .primary-btn.full {
    min-height: 72px !important;
    border-radius: 28px !important;
    background: linear-gradient(180deg, #ffd95b, #f5c13c) !important;
    color: #14120b !important;
    border: 0 !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-spin-form .primary-btn.full:disabled {
    background: rgba(255, 255, 255, 0.12) !important;
    color: rgba(247, 244, 235, 0.62) !important;
    box-shadow: none !important;
}

body.theme-market[data-current-page="games"] .wheel-result:not(:empty) {
    min-height: 86px !important;
    display: grid !important;
    place-items: center !important;
    padding: 16px 18px !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(120, 82, 19, 0.82), rgba(98, 65, 14, 0.78)) !important;
    border: 2px solid rgba(255, 215, 93, 0.80) !important;
    color: #ffd75d !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    text-align: center !important;
}

body.theme-market[data-current-page="games"] .wheel-card > .muted {
    width: 100% !important;
    min-height: 66px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.085) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    color: rgba(247, 244, 235, 0.72) !important;
    font-size: 14px !important;
    text-align: center !important;
}

body.theme-market[data-current-page="games"] .wheel-result-modal {
    background: rgba(2, 4, 12, 0.86) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.theme-market[data-current-page="games"] .wheel-result-card {
    width: min(100%, 386px) !important;
    border-radius: 28px !important;
    background: linear-gradient(180deg, rgba(31, 34, 44, 0.98), rgba(10, 12, 20, 0.99)) !important;
    border: 1px solid rgba(255, 215, 93, 0.36) !important;
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.58) !important;
}

body.theme-market[data-current-page="about"] .content-page {
    max-width: 560px !important;
    gap: 14px !important;
    padding-bottom: 0 !important;
}

body.theme-market[data-current-page="about"] .page-showcase {
    display: grid !important;
    gap: 14px !important;
    padding: 14px !important;
    border-radius: 26px !important;
    background: linear-gradient(180deg, rgba(24, 27, 37, 0.96), rgba(10, 12, 19, 0.99)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32) !important;
    overflow: hidden !important;
}

body.theme-market[data-current-page="about"] .page-showcase::before,
body.theme-market[data-current-page="about"] .page-showcase::after {
    opacity: 0.18 !important;
    filter: none !important;
}

body.theme-market[data-current-page="about"] .page-showcase-media {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    max-height: 430px !important;
    border-radius: 22px !important;
    background: #080b12 !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    overflow: hidden !important;
}

body.theme-market[data-current-page="about"] .page-showcase-media img,
body.theme-market[data-current-page="about"] .page-showcase-media video {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
}

body.theme-market[data-current-page="about"] .page-showcase-copy {
    display: grid !important;
    gap: 12px !important;
    padding: 16px !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #f7f4eb !important;
}

body.theme-market[data-current-page="about"] .page-showcase-kicker {
    justify-self: start !important;
    max-width: 100% !important;
    color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
    background: color-mix(in srgb, var(--accent) 16%, transparent) !important;
    border-color: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.12)) !important;
    letter-spacing: 0 !important;
}

body.theme-market[data-current-page="about"] .page-showcase-copy h2 {
    color: #ffd75d !important;
    font-size: 28px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body.theme-market[data-current-page="about"] .page-showcase-copy .wysiwyg {
    color: rgba(247, 244, 235, 0.75) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

body.theme-market.telegram-lite-mode[data-current-page="games"] .wheel-stage::before,
body.theme-market.telegram-lite-mode[data-current-page="about"] .page-showcase::before,
body.theme-market.telegram-lite-mode[data-current-page="about"] .page-showcase::after {
    display: none !important;
}

@media (max-width: 430px) {
    body.theme-market[data-current-page="games"] .wheel-page > .section-head h1 {
        font-size: 38px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-page > .section-head p {
        font-size: 15px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-stage {
        width: min(100%, 354px) !important;
    }

    body.theme-market[data-current-page="games"] .wheel-sector-label {
        width: 96px !important;
        font-size: 12px !important;
        transform-origin: center -122px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-sector-label span {
        max-width: 90px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-center-badge {
        width: 66px !important;
        height: 66px !important;
        border-width: 5px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-spin-form .primary-btn.full,
    body.theme-market[data-current-page="games"] .wheel-card > .primary-btn.full {
        min-height: 68px !important;
        border-radius: 26px !important;
        font-size: 20px !important;
    }
}

@media (max-width: 360px) {
    body.theme-market[data-current-page="games"] .wheel-page > .section-head h1 {
        font-size: 33px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-stage {
        width: min(100%, 316px) !important;
    }

    body.theme-market[data-current-page="games"] .wheel-sector-label {
        font-size: 11px !important;
        transform-origin: center -106px !important;
    }

    body.theme-market[data-current-page="games"] .wheel-sector-label b {
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
    }
}
/* === Stable wheel/about premium polish END === */

/* === Games page footer scroll fix START === */
body.theme-market[data-current-page="games"] .app-content {
    padding-bottom: 4px !important;
}

body.theme-market[data-current-page="games"] .wheel-card {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-card > .muted:last-child {
    margin-bottom: 0 !important;
}

body.theme-market[data-current-page="games"] .footer-socials {
    margin-top: 2px !important;
    padding-top: 0 !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
}
/* === Games page footer scroll fix END === */

/* === Global footer rhythm and safe bottom START === */
body.theme-market .device-frame:has(.footer-socials) .app-content {
    padding-bottom: 8px !important;
}

body.theme-market.has-bottom-nav .device-frame:not(:has(.footer-socials)) .app-content {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
}

body.theme-market .content-page,
body.theme-market .profile-page,
body.theme-market .wheel-page,
body.theme-market .store-shell {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.theme-market .footer-socials {
    margin-top: 6px !important;
    padding-top: 0 !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}

body.theme-market:not(.has-bottom-nav) .footer-socials {
    padding-bottom: 18px !important;
}

body.theme-market[data-current-page="games"] .footer-socials,
body.theme-market[data-current-page="about"] .footer-socials,
body.theme-market[data-current-page="profile"] .footer-socials,
body.theme-market[data-current-page="referral"] .footer-socials,
body.theme-market[data-current-page="shop"] .footer-socials {
    margin-top: 4px !important;
}

body.theme-market[data-current-page="games"] .app-content,
body.theme-market[data-current-page="about"] .app-content,
body.theme-market[data-current-page="profile"] .app-content,
body.theme-market[data-current-page="referral"] .app-content,
body.theme-market[data-current-page="shop"] .app-content {
    padding-bottom: 6px !important;
}

body.theme-market[data-current-page="games"] .wheel-card,
body.theme-market[data-current-page="about"] .page-showcase,
body.theme-market[data-current-page="profile"] .profile-page,
body.theme-market[data-current-page="referral"] .content-page,
body.theme-market[data-current-page="shop"] .store-shell {
    margin-bottom: 0 !important;
}
/* === Global footer rhythm and safe bottom END === */
/* ABOUT PAGE FOOTER GAP FIX - keep footer close to real content only. */
body.theme-market[data-current-page="about"] .device-frame {
    justify-content: flex-start !important;
}

body.theme-market[data-current-page="about"] .app-content {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding-top: 12px !important;
    padding-bottom: 2px !important;
    margin-bottom: 0 !important;
}

body.theme-market[data-current-page="about"] .content-page {
    min-height: 0 !important;
    align-content: start !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.theme-market[data-current-page="about"] .content-page > :last-child,
body.theme-market[data-current-page="about"] .page-showcase,
body.theme-market[data-current-page="about"] .page-showcase-copy,
body.theme-market[data-current-page="about"] .page-showcase-copy .wysiwyg {
    margin-bottom: 0 !important;
}

body.theme-market[data-current-page="about"] .footer-socials {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.theme-market.has-bottom-nav[data-current-page="about"] .footer-socials {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}

body.theme-market:not(.has-bottom-nav)[data-current-page="about"] .footer-socials {
    padding-bottom: 18px !important;
}

/* === PackLab professional header rhythm START === */
body.theme-market {
    --packlab-shell-max: 560px;
    --packlab-page-x: clamp(14px, 3.4vw, 22px);
    --packlab-page-gap: 14px;
    --packlab-safe-bottom: env(safe-area-inset-bottom, 0px);
}

body.theme-market .topbar.topbar-native {
    width: min(calc(100% - (var(--packlab-page-x) * 2)), var(--packlab-shell-max)) !important;
    min-height: 58px !important;
    margin: max(10px, env(safe-area-inset-top, 0px)) auto 0 !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
}

body.theme-market .marquee-wrap {
    width: min(calc(100% - (var(--packlab-page-x) * 2)), var(--packlab-shell-max)) !important;
    margin: 8px auto 0 !important;
}

body.theme-market .app-content {
    width: min(100%, var(--packlab-shell-max)) !important;
    max-width: var(--packlab-shell-max) !important;
    padding: 10px var(--packlab-page-x) calc(82px + var(--packlab-safe-bottom)) !important;
    margin: 0 auto !important;
}

body.theme-market:not(.has-bottom-nav) .app-content {
    padding-bottom: calc(24px + var(--packlab-safe-bottom)) !important;
}

body.theme-market[data-current-page="shop"] .app-content,
body.theme-market[data-current-page="profile"] .app-content,
body.theme-market[data-current-page="referral"] .app-content,
body.theme-market[data-current-page="about"] .app-content,
body.theme-market[data-current-page="games"] .app-content {
    padding-top: 10px !important;
}

body.theme-market .store-shell,
body.theme-market .content-page,
body.theme-market .profile-page,
body.theme-market .wheel-page,
body.theme-market .access-screen {
    gap: var(--packlab-page-gap) !important;
}

body.theme-market[data-current-page="access"] .app-content {
    display: block !important;
    max-width: var(--packlab-shell-max) !important;
    padding: clamp(22px, 6dvh, 58px) var(--packlab-page-x) 24px !important;
}

body.theme-market[data-current-page="access"] .access-screen {
    min-height: auto !important;
    align-content: start !important;
}

body.theme-market[data-current-page="access"] .access-brand {
    margin: 0 0 6px !important;
}

body.theme-market[data-current-page="access"] .access-bio-card,
body.theme-market[data-current-page="access"] .access-form {
    margin: 0 !important;
}

body.theme-market .store-header-card,
body.theme-market .page-showcase,
body.theme-market .profile-feature-card,
body.theme-market .wheel-card,
body.theme-market .panel-card {
    margin-top: 0 !important;
}

@media (max-width: 420px) {
    body.theme-market {
        --packlab-page-x: 12px;
        --packlab-page-gap: 12px;
    }

    body.theme-market .topbar.topbar-native {
        min-height: 54px !important;
        border-radius: 18px !important;
    }

    body.theme-market[data-current-page="access"] .app-content {
        padding-top: 24px !important;
    }
}
/* === PackLab professional header rhythm END === */

/* === PackLab responsive surface lock START === */
html,
body.theme-market,
body.theme-market .device-frame,
body.theme-market .app-content {
    background: #070b16 !important;
    background-color: #070b16 !important;
}

body.theme-market {
    --packlab-shell-max: clamp(320px, 100vw, 560px);
    --packlab-page-x: clamp(12px, 3.2vw, 18px);
}

body.theme-market .device-frame {
    width: 100% !important;
    max-width: none !important;
}

body.theme-market .topbar.topbar-native,
body.theme-market .marquee-wrap,
body.theme-market .app-content {
    width: min(calc(100vw - (var(--packlab-page-x) * 2)), var(--packlab-shell-max)) !important;
    max-width: var(--packlab-shell-max) !important;
    box-sizing: border-box !important;
}

body.theme-market .topbar.topbar-native {
    margin-top: max(8px, env(safe-area-inset-top, 0px)) !important;
    background: linear-gradient(180deg, rgba(18, 21, 32, 0.98), rgba(10, 13, 22, 0.98)) !important;
}

body.theme-market .marquee-wrap {
    margin-top: 7px !important;
}

body.theme-market .app-content {
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 8px !important;
}

body.theme-market[data-current-page="access"] .app-content {
    width: min(calc(100vw - (var(--packlab-page-x) * 2)), var(--packlab-shell-max)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: clamp(18px, 5dvh, 44px) !important;
}

@media (min-width: 720px) {
    body.theme-market {
        --packlab-shell-max: 560px;
        --packlab-page-x: 18px;
    }
}

@media (max-width: 360px) {
    body.theme-market {
        --packlab-page-x: 10px;
    }

    body.theme-market .topbar.topbar-native,
    body.theme-market .app-content,
    body.theme-market .marquee-wrap {
        width: calc(100vw - 20px) !important;
    }
}
/* === PackLab responsive surface lock END === */

/* === PackLab native Telegram shell START === */
body.theme-market {
    --packlab-shell-max: min(100vw, 560px);
    --packlab-edge: clamp(10px, 3vw, 18px);
    --packlab-shell-width: min(calc(100vw - (var(--packlab-edge) * 2)), var(--packlab-shell-max));
    --packlab-stack-gap: clamp(8px, 2vw, 12px);
}

body.theme-market .topbar.topbar-native,
body.theme-market .marquee-wrap,
body.theme-market .app-content {
    width: var(--packlab-shell-width) !important;
    max-width: var(--packlab-shell-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.theme-market .topbar.topbar-native {
    top: max(6px, env(safe-area-inset-top, 0px)) !important;
    margin-top: max(8px, env(safe-area-inset-top, 0px)) !important;
    min-height: clamp(56px, 8.6vh, 70px) !important;
    padding: clamp(8px, 2vw, 12px) !important;
    border-radius: clamp(18px, 4vw, 24px) !important;
    background:
        radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 36%),
        linear-gradient(180deg, rgba(20, 22, 35, 0.99), rgba(9, 12, 22, 0.99)) !important;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.12)) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-market .topbar-brand-logo-shell {
    width: clamp(40px, 11vw, 52px) !important;
    height: clamp(40px, 11vw, 52px) !important;
    min-width: clamp(40px, 11vw, 52px) !important;
    min-height: clamp(40px, 11vw, 52px) !important;
    border-radius: clamp(13px, 3.4vw, 18px) !important;
}

body.theme-market .topbar-brand-logo,
body.theme-market .topbar-brand-fallback {
    width: 100% !important;
    height: 100% !important;
}

body.theme-market .topbar-brand-copy strong {
    font-size: clamp(17px, 4.4vw, 24px) !important;
    line-height: 1.05 !important;
}

body.theme-market .topbar-brand-copy span {
    font-size: clamp(12px, 3.2vw, 14px) !important;
}

body.theme-market .cart-counter-btn {
    width: clamp(48px, 12vw, 62px) !important;
    height: clamp(48px, 12vw, 62px) !important;
    border-radius: clamp(15px, 4vw, 20px) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, #ffffff), var(--accent-2)) !important;
    color: #10101a !important;
}

body.theme-market .cart-counter-badge {
    background: #fff7dc !important;
    color: #10101a !important;
    border-color: rgba(16, 16, 26, 0.20) !important;
}

body.theme-market .marquee-wrap {
    padding: 0 !important;
    margin-top: var(--packlab-stack-gap) !important;
}

body.theme-market .app-content {
    padding-top: var(--packlab-stack-gap) !important;
}

body.theme-market[data-current-page="access"] .app-content {
    padding-top: clamp(14px, 5dvh, 34px) !important;
}

@media (min-width: 600px) {
    body.theme-market {
        --packlab-edge: clamp(14px, 4vw, 28px);
    }
}

@media (max-width: 340px) {
    body.theme-market .topbar-brand-copy strong {
        font-size: 16px !important;
    }

    body.theme-market .topbar-brand-copy span {
        font-size: 11px !important;
    }
}
/* === PackLab native Telegram shell END === */

/* === PackLab Telegram edge-to-edge polish START === */
body.theme-market.is-telegram-context,
body.theme-market.telegram-webapp,
body.theme-market.telegram-ios-webview {
    --packlab-edge: 0px !important;
    --packlab-shell-max: none !important;
    --packlab-shell-width: 100vw !important;
    --ui-page-max: none !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    background: #070b16 !important;
}

body.theme-market.is-telegram-context .device-frame,
body.theme-market.telegram-webapp .device-frame,
body.theme-market.telegram-ios-webview .device-frame {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #070b16 !important;
}

body.theme-market.is-telegram-context .topbar.topbar-native,
body.theme-market.telegram-webapp .topbar.topbar-native,
body.theme-market.telegram-ios-webview .topbar.topbar-native,
body.theme-market.is-telegram-context .marquee-wrap,
body.theme-market.telegram-webapp .marquee-wrap,
body.theme-market.telegram-ios-webview .marquee-wrap {
    width: calc(100vw - max(20px, calc(env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 20px))) !important;
    max-width: none !important;
    margin-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    margin-right: max(10px, env(safe-area-inset-right, 0px)) !important;
}

body.theme-market.is-telegram-context .topbar.topbar-native,
body.theme-market.telegram-webapp .topbar.topbar-native,
body.theme-market.telegram-ios-webview .topbar.topbar-native {
    margin-top: max(6px, env(safe-area-inset-top, 0px)) !important;
    margin-bottom: 0 !important;
}

body.theme-market.is-telegram-context .app-content,
body.theme-market.telegram-webapp .app-content,
body.theme-market.telegram-ios-webview .app-content {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    padding-top: 8px !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
    background: #070b16 !important;
}

body.theme-market.is-telegram-context[data-current-page="access"] .app-content,
body.theme-market.telegram-webapp[data-current-page="access"] .app-content,
body.theme-market.telegram-ios-webview[data-current-page="access"] .app-content {
    display: grid !important;
    align-items: center !important;
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
}

body.theme-market.is-telegram-context .store-shell,
body.theme-market.is-telegram-context .content-page,
body.theme-market.is-telegram-context .profile-page,
body.theme-market.is-telegram-context .wheel-page,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-webapp .content-page,
body.theme-market.telegram-webapp .profile-page,
body.theme-market.telegram-webapp .wheel-page,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.telegram-ios-webview .content-page,
body.theme-market.telegram-ios-webview .profile-page,
body.theme-market.telegram-ios-webview .wheel-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    gap: 10px !important;
}

body.theme-market.is-telegram-context .store-header-card,
body.theme-market.telegram-webapp .store-header-card,
body.theme-market.telegram-ios-webview .store-header-card,
body.theme-market.is-telegram-context .page-showcase,
body.theme-market.telegram-webapp .page-showcase,
body.theme-market.telegram-ios-webview .page-showcase {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at 86% 6%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 34%),
        linear-gradient(160deg, rgba(18, 24, 38, 0.98), rgba(10, 14, 25, 0.99)) !important;
}

body.theme-market.is-telegram-context .store-header-card,
body.theme-market.telegram-webapp .store-header-card,
body.theme-market.telegram-ios-webview .store-header-card {
    padding: clamp(18px, 4.8vw, 28px) !important;
    min-height: auto !important;
}

body.theme-market.is-telegram-context .hero-copy h1,
body.theme-market.telegram-webapp .hero-copy h1,
body.theme-market.telegram-ios-webview .hero-copy h1 {
    font-size: clamp(34px, 10vw, 54px) !important;
    line-height: 0.98 !important;
}

body.theme-market.is-telegram-context .stats-row,
body.theme-market.telegram-webapp .stats-row,
body.theme-market.telegram-ios-webview .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

body.theme-market.is-telegram-context .stats-row > *,
body.theme-market.telegram-webapp .stats-row > *,
body.theme-market.telegram-ios-webview .stats-row > * {
    min-width: 0 !important;
    padding: 12px 8px !important;
}

body.theme-market .wysiwyg a {
    color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
    font-weight: 850 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    overflow-wrap: anywhere !important;
}
/* === PackLab Telegram edge-to-edge polish END === */

/* === PackLab wheel and product premium v2 START === */
body.theme-market[data-current-page="games"] .wheel-page {
    gap: 10px !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head {
    padding: 4px 2px 0 !important;
}

body.theme-market[data-current-page="games"] .wheel-page > .section-head h1 {
    font-size: clamp(32px, 9.2vw, 54px) !important;
    line-height: 0.94 !important;
}

.wheel-quick-status {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
}

.wheel-quick-status article,
.wheel-card-top,
.wheel-legend-panel {
    border: 1px solid rgba(255, 255, 255, 0.115) !important;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

.wheel-quick-status article {
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 11px 10px !important;
    border-radius: 17px !important;
}

.wheel-quick-status span,
.wheel-card-top span,
.wheel-legend-panel summary span {
    color: rgba(247, 244, 235, 0.58) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}

.wheel-quick-status strong,
.wheel-card-top strong,
.wheel-legend-panel summary strong {
    color: #fff8dd !important;
    font-size: clamp(13px, 3.2vw, 16px) !important;
    line-height: 1.1 !important;
    overflow-wrap: anywhere !important;
}

body.theme-market[data-current-page="games"] .wheel-command-center {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

body.theme-market[data-current-page="games"] .wheel-command-center .wheel-command-card:not(.wheel-command-card-main) {
    display: none !important;
}

body.theme-market[data-current-page="games"] .wheel-command-card-main {
    min-height: auto !important;
    padding: 14px !important;
    border-radius: 20px !important;
}

body.theme-market[data-current-page="games"] .wheel-command-card-main h2 {
    font-size: clamp(24px, 7vw, 38px) !important;
}

body.theme-market[data-current-page="games"] .wheel-card {
    display: grid !important;
    gap: 12px !important;
    padding: 12px !important;
    border-radius: 26px !important;
    overflow: hidden !important;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 34%),
        radial-gradient(circle at 100% 44%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 30%),
        linear-gradient(180deg, rgba(19, 24, 38, 0.99), rgba(7, 10, 18, 0.99)) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38) !important;
}

.wheel-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 18px !important;
}

.wheel-card-top > div {
    display: grid !important;
    gap: 3px !important;
}

.wheel-card-top small {
    flex: 0 0 auto !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    font-weight: 950 !important;
}

body.theme-market[data-current-page="games"] .wheel-stage {
    width: min(100%, 420px) !important;
    margin: 0 auto !important;
    padding: clamp(10px, 3vw, 18px) !important;
    border-radius: 32px !important;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 66%),
        rgba(255, 255, 255, 0.035) !important;
}

body.theme-market[data-current-page="games"] .wheel-disc {
    width: min(78vw, 360px) !important;
    height: min(78vw, 360px) !important;
    max-width: 360px !important;
    max-height: 360px !important;
    margin: 0 auto !important;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.44),
        inset 0 0 0 10px rgba(255, 255, 255, 0.09),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25) !important;
    transition: transform 5.8s cubic-bezier(0.08, 0.72, 0.08, 1) !important;
}

body.theme-market[data-current-page="games"] .wheel-center-badge {
    width: clamp(76px, 22vw, 104px) !important;
    height: clamp(76px, 22vw, 104px) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(216, 224, 255, 0.82)),
        #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42) !important;
}

body.theme-market[data-current-page="games"] .wheel-sector-label {
    width: 46% !important;
    transform: rotate(calc((360deg / var(--sector-count)) * var(--sector-index) + (180deg / var(--sector-count)))) translateX(27%) !important;
}

body.theme-market[data-current-page="games"] .wheel-sector-label span {
    max-width: 80px !important;
    font-size: clamp(8px, 2.1vw, 10px) !important;
    line-height: 1.05 !important;
}

body.theme-market[data-current-page="games"] .wheel-spin-form .primary-btn.full,
body.theme-market[data-current-page="games"] .wheel-card > .primary-btn.full {
    min-height: 54px !important;
    border-radius: 18px !important;
    font-size: 15px !important;
    box-shadow: 0 16px 36px color-mix(in srgb, var(--accent) 28%, rgba(0, 0, 0, 0.28)) !important;
}

.wheel-legend-panel {
    display: grid !important;
    gap: 8px !important;
    border-radius: 20px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.wheel-legend-panel summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 48px !important;
    padding: 12px !important;
    cursor: pointer !important;
    list-style: none !important;
}

.wheel-legend-panel summary::-webkit-details-marker {
    display: none !important;
}

body.theme-market[data-current-page="games"] .wheel-legend {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    max-height: 230px !important;
    overflow-y: auto !important;
    padding: 0 10px 10px !important;
}

body.theme-market[data-current-page="games"] .wheel-legend-item {
    grid-template-columns: 14px minmax(0, 1fr) !important;
    padding: 10px !important;
    border-radius: 15px !important;
}

.wheel-last-spin {
    margin: 0 !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.modal.active .hp-product-dialog {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 10px !important;
    width: min(calc(100vw - 16px), 560px) !important;
    max-width: 560px !important;
    max-height: calc(var(--app-viewport-height, 100dvh) - 86px) !important;
    padding: 0 0 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 26px !important;
    background:
        radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 32%),
        linear-gradient(180deg, #151a27 0%, #080b13 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 30px 82px rgba(0, 0, 0, 0.72) !important;
}

.modal.active .hp-product-dialog .hp-product-close {
    position: sticky !important;
    top: 10px !important;
    justify-self: end !important;
    margin: 10px 10px -52px 0 !important;
    z-index: 40 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(4, 6, 12, 0.84) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.modal.active .hp-product-dialog > .product-modal-media {
    order: 1 !important;
    width: calc(100% - 20px) !important;
    height: clamp(230px, 68vw, 360px) !important;
    margin: 10px 10px 0 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    background: #05070c !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
}

.modal.active .hp-product-dialog > .product-modal-media img,
.modal.active .hp-product-dialog > .product-modal-media video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
}

.modal.active .hp-product-dialog > .product-modal-media video {
    object-fit: contain !important;
}

.modal.active .hp-product-dialog > .modal-heading,
.modal.active .hp-product-dialog > .tag-row,
.modal.active .hp-product-dialog > .product-intel-strip,
.modal.active .hp-product-dialog > .b2b-spec-grid,
.modal.active .hp-product-dialog > .hp-product-tabs,
.modal.active .hp-product-dialog > .hp-product-actionbar,
.modal.active .hp-product-dialog > .hp-product-tab-panel,
.modal.active .hp-product-dialog > .review-summary-card {
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

.modal.active .hp-product-dialog > .modal-heading {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: end !important;
    padding: 2px 0 0 !important;
}

.modal.active .hp-product-dialog .hp-product-kicker {
    display: block !important;
    margin-bottom: 5px !important;
    color: color-mix(in srgb, var(--accent) 68%, #ffffff) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
}

.modal.active .hp-product-dialog > .modal-heading h3 {
    margin: 0 !important;
    color: #fff8dd !important;
    font-size: clamp(25px, 7vw, 36px) !important;
    line-height: 0.98 !important;
    overflow-wrap: anywhere !important;
}

.modal.active .hp-product-dialog > .modal-heading .modal-price {
    align-self: center !important;
    padding: 10px 12px !important;
    border-radius: 999px !important;
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

.modal.active .hp-product-dialog > .tag-row {
    order: 3 !important;
    display: flex !important;
    gap: 7px !important;
    overflow-x: auto !important;
    padding: 0 0 2px !important;
    scrollbar-width: none !important;
}

.modal.active .hp-product-dialog > .tag-row::-webkit-scrollbar {
    display: none !important;
}

.modal.active .hp-product-dialog > .tag-row span {
    flex: 0 0 auto !important;
    max-width: 170px !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: rgba(247, 244, 235, 0.88) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.modal.active .hp-product-dialog > .product-intel-strip {
    order: 4 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

.modal.active .hp-product-dialog > .product-intel-strip > div,
.modal.active .hp-product-dialog > .b2b-spec-grid span,
.modal.active .hp-product-dialog > .hp-product-tab-panel,
.modal.active .hp-product-dialog > .review-summary-card {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.058) !important;
    border: 1px solid rgba(255, 255, 255, 0.105) !important;
}

.modal.active .hp-product-dialog > .b2b-spec-grid {
    order: 5 !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
}

.modal.active .hp-product-dialog > .b2b-spec-grid span {
    padding: 11px !important;
}

.modal.active .hp-product-dialog > .hp-product-tabs {
    order: 6 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 18 !important;
    display: flex !important;
    gap: 7px !important;
    overflow-x: auto !important;
    padding: 9px 0 !important;
    background: linear-gradient(180deg, rgba(12, 15, 24, 0.98), rgba(12, 15, 24, 0.84)) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    scrollbar-width: none !important;
}

.modal.active .hp-product-dialog > .hp-product-tabs::-webkit-scrollbar {
    display: none !important;
}

.modal.active .hp-product-dialog [data-product-tab] {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    color: rgba(247, 244, 235, 0.74) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    font-weight: 850 !important;
}

.modal.active .hp-product-dialog [data-product-tab].is-active,
.modal.active .hp-product-dialog [data-product-tab][aria-selected="true"] {
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar {
    order: 7 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 10px !important;
    border-radius: 20px !important;
    background: rgba(8, 10, 17, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28) !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar small {
    display: block !important;
    color: rgba(247, 244, 235, 0.58) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar strong {
    display: block !important;
    color: #fff8dd !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar .ghost-btn,
.modal.active .hp-product-dialog > .hp-product-actionbar .primary-btn {
    min-height: 40px !important;
    padding: 8px 11px !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
}

.modal.active .hp-product-dialog > .hp-product-tab-panel,
.modal.active .hp-product-dialog > .review-summary-card {
    order: 8 !important;
    padding: 13px !important;
}

.modal.active .hp-product-dialog .variants-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
}

.modal.active .hp-product-dialog .hp-product-tab-panel[hidden],
.modal.active .hp-product-dialog.is-tabs-ready .hp-product-tab-panel[hidden] {
    display: none !important;
}

.modal.active .hp-product-dialog .variant-card {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
}

.modal.active .hp-product-dialog .variant-card .primary-btn {
    min-height: 42px !important;
    border-radius: 14px !important;
}

.modal.active .hp-product-dialog .quick-order-card summary {
    min-height: 44px !important;
    color: #fff8dd !important;
    font-weight: 950 !important;
}

.modal.active .hp-product-dialog .review-list {
    display: grid !important;
    gap: 9px !important;
}

@media (min-width: 720px) {
    .modal.active .hp-product-dialog {
        max-width: 760px !important;
    }

    .modal.active .hp-product-dialog > .product-modal-media {
        height: 420px !important;
    }

    .modal.active .hp-product-dialog .variants-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 380px) {
    .wheel-quick-status {
        grid-template-columns: 1fr !important;
    }

    .modal.active .hp-product-dialog > .modal-heading {
        grid-template-columns: 1fr !important;
    }

    .modal.active .hp-product-dialog > .modal-heading .modal-price {
        justify-self: start !important;
    }

    .modal.active .hp-product-dialog > .product-intel-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .modal.active .hp-product-dialog > .hp-product-actionbar {
        grid-template-columns: 1fr 1fr !important;
    }

    .modal.active .hp-product-dialog > .hp-product-actionbar > div {
        grid-column: 1 / -1 !important;
    }
}
/* === PackLab wheel and product premium v2 END === */

/* === PackLab promo modal/card containment START === */
body.theme-market .promo-grid {
    align-items: stretch !important;
}

body.theme-market .promo-card {
    position: relative !important;
    isolation: isolate !important;
    display: grid !important;
    grid-template-columns: clamp(96px, 29vw, 128px) minmax(0, 1fr) !important;
    align-items: center !important;
    align-content: center !important;
    gap: 11px !important;
    width: 100% !important;
    min-height: clamp(118px, 30vw, 148px) !important;
    padding: 12px !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background-image:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 36%),
        linear-gradient(135deg, rgba(18, 24, 38, 0.98), rgba(9, 13, 24, 0.98)) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

body.theme-market .promo-card.has-image::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background:
        linear-gradient(180deg, rgba(4, 6, 12, 0.08) 0%, rgba(4, 6, 12, 0.38) 46%, rgba(4, 6, 12, 0.88) 100%),
        radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34%) !important;
}

body.theme-market .promo-card.has-image {
    background-image:
        linear-gradient(180deg, rgba(20, 20, 24, 0.16), rgba(5, 5, 7, 0.24)),
        var(--promo-card-bg) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

body.theme-market .promo-card-media {
    position: relative !important;
    inset: auto !important;
    z-index: 2 !important;
    grid-row: 1 / span 4 !important;
    align-self: stretch !important;
    width: 100% !important;
    min-height: 94px !important;
    max-height: 126px !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    pointer-events: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

body.theme-market .promo-card-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

body.theme-market .promo-card > * {
    position: relative !important;
    z-index: 2 !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.theme-market .promo-card .promo-badge {
    justify-self: start !important;
    font-size: 11px !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
}

body.theme-market .promo-card strong {
    display: block !important;
    margin: 0 !important;
    color: #fff8dd !important;
    font-size: clamp(19px, 5.2vw, 26px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
    text-wrap: balance !important;
}

body.theme-market .promo-card p {
    display: block !important;
    margin: 0 !important;
    max-height: 2.7em !important;
    color: rgba(247, 244, 235, 0.82) !important;
    font-size: clamp(12px, 3.5vw, 15px) !important;
    line-height: 1.28 !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

body.theme-market .promo-card .promo-discount {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    justify-self: start !important;
    align-self: start !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    padding: 8px 13px !important;
    border-radius: 15px !important;
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    font-size: clamp(15px, 4.4vw, 20px) !important;
    line-height: 1 !important;
    overflow-wrap: anywhere !important;
}

.modal.active .promo-modal {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: min(calc(100vw - 34px), 430px) !important;
    max-width: 430px !important;
    max-height: calc(var(--app-viewport-height, 100dvh) - 138px) !important;
    padding: 11px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 32%),
        linear-gradient(180deg, #151923 0%, #090c14 100%) !important;
    border: 1px solid rgba(103, 232, 249, 0.34) !important;
    box-shadow:
        0 0 0 1px rgba(103, 232, 249, 0.12),
        0 0 34px rgba(34, 211, 238, 0.22),
        0 30px 82px rgba(0, 0, 0, 0.72) !important;
}

.modal.active .promo-modal.has-image {
    background:
        linear-gradient(180deg, rgba(4, 7, 14, 0.54) 0%, rgba(4, 7, 14, 0.76) 44%, rgba(4, 7, 14, 0.94) 100%),
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34%),
        var(--promo-modal-bg) center center / cover no-repeat,
        var(--promo-modal-fallback-bg, var(--promo-modal-bg)) center center / cover no-repeat !important;
}

.modal.active .promo-modal .modal-close {
    position: sticky !important;
    top: 0 !important;
    justify-self: end !important;
    z-index: 30 !important;
    margin: 0 0 -44px 0 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(4, 7, 13, 0.86) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.modal.active .promo-modal .promo-modal-media {
    width: 100% !important;
    height: clamp(128px, 34vw, 190px) !important;
    min-height: 128px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    background: #05070c !important;
}

.modal.active .promo-modal .promo-modal-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: inherit !important;
}

.modal.active .promo-modal .modal-section-title {
    position: static !important;
    display: grid !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.modal.active .promo-modal .promo-badge {
    display: none !important;
}

.modal.active .promo-modal .modal-section-title h3 {
    margin: 0 !important;
    color: #fff8dd !important;
    font-size: clamp(21px, 5.8vw, 30px) !important;
    line-height: 1.04 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
}

.modal.active .promo-modal .promo-lead,
.modal.active .promo-modal .modal-copy p {
    margin: 0 !important;
    color: rgba(247, 244, 235, 0.78) !important;
    font-size: clamp(13px, 3.7vw, 16px) !important;
    line-height: 1.32 !important;
    overflow-wrap: anywhere !important;
}

.modal.active .promo-modal .promo-info-stack {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

.modal.active .promo-modal .modal-copy {
    display: grid !important;
    gap: 6px !important;
    min-width: 0 !important;
    padding: 10px 11px !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.058) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
}

.modal.active .promo-modal .modal-copy strong {
    color: #fff8dd !important;
    font-size: 10.5px !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
}

.modal.active .promo-modal .promo-footer {
    display: grid !important;
    margin: 0 !important;
}

.modal.active .promo-modal .promo-footer span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 11px 13px !important;
    border-radius: 16px !important;
    text-align: center !important;
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    font-size: clamp(18px, 5vw, 25px) !important;
    font-weight: 950 !important;
}

.about-social-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 18px !important;
}

.about-social-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 54px !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
    color: #f7f4eb !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.064) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    overflow: hidden !important;
}

.about-social-link span:last-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-weight: 900 !important;
}

.about-social-icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    color: #070b16 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

.about-social-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

.about-social-whatsapp .about-social-icon {
    background: linear-gradient(135deg, #42e884, #16b960) !important;
}

.about-social-telegram .about-social-icon {
    background: linear-gradient(135deg, #61b7ff, #2c7dff) !important;
}

.about-social-signal .about-social-icon {
    background: linear-gradient(135deg, #6fa8ff, #2f65ff) !important;
}

.about-social-snapchat .about-social-icon {
    background: linear-gradient(135deg, #fff176, #ffd21e) !important;
}

.about-social-editor {
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.052) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.about-social-editor-row {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.82fr) !important;
    gap: 8px !important;
    align-items: center !important;
}

.about-social-editor-row strong {
    min-width: 82px !important;
    color: #fff8dd !important;
}

@media (max-width: 430px) {
    .about-social-links {
        grid-template-columns: 1fr !important;
    }

    .about-social-editor-row {
        grid-template-columns: 1fr !important;
    }

    .about-social-editor-row .about-social-icon {
        display: none !important;
    }
}
/* === PackLab promo modal/card containment END === */

/* === PackLab product modal pro refresh START === */
.modal.active .hp-product-dialog {
    width: min(calc(100vw - 18px), 520px) !important;
    max-width: 520px !important;
    max-height: calc(var(--app-viewport-height, 100dvh) - 74px) !important;
    gap: 9px !important;
    padding-bottom: 8px !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
        linear-gradient(180deg, #111723 0%, #080b12 100%) !important;
    border: 1px solid rgba(103, 232, 249, 0.16) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.035),
        0 22px 70px rgba(0, 0, 0, 0.72) !important;
}

.modal.active .hp-product-dialog > .product-modal-media {
    height: clamp(176px, 48vw, 260px) !important;
    border-radius: 20px !important;
}

.modal.active .hp-product-dialog > .modal-heading {
    align-items: start !important;
    gap: 10px !important;
}

.modal.active .hp-product-dialog > .modal-heading h3 {
    font-size: clamp(22px, 6vw, 31px) !important;
    line-height: 1.04 !important;
}

.modal.active .hp-product-dialog > .modal-heading .modal-price {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
}

.modal.active .hp-product-dialog > .product-intel-strip,
.modal.active .hp-product-dialog > .b2b-spec-grid {
    display: none !important;
}

.modal.active .hp-product-dialog > .hp-product-tabs {
    order: 4 !important;
    top: -1px !important;
    margin-top: 2px !important;
    padding: 7px 0 !important;
}

.modal.active .hp-product-dialog [data-product-tab] {
    min-height: 36px !important;
    padding: 7px 11px !important;
    font-size: 12px !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar {
    order: 5 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 9px !important;
    border-radius: 18px !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar .ghost-btn {
    display: none !important;
}

.modal.active .hp-product-dialog > .hp-product-actionbar .primary-btn {
    min-width: 128px !important;
    min-height: 42px !important;
}

.modal.active .hp-product-dialog > .hp-product-tab-panel,
.modal.active .hp-product-dialog > .review-summary-card {
    order: 6 !important;
    padding: 12px !important;
    border-radius: 18px !important;
}

.modal.active .hp-product-dialog .hp-product-tab-panel:not(.is-active),
.modal.active .hp-product-dialog .hp-product-tab-panel[hidden] {
    display: none !important;
}

.modal.active .hp-product-dialog .variants-grid {
    gap: 8px !important;
}

.modal.active .hp-product-dialog .variant-card {
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
}

.modal.active .hp-product-dialog .variant-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: start !important;
}

.modal.active .hp-product-dialog .variant-head strong,
.modal.active .hp-product-dialog .variant-head small {
    overflow-wrap: anywhere !important;
}

.modal.active .hp-product-dialog .quick-order-card {
    display: grid !important;
    gap: 10px !important;
}

.modal.active .hp-product-dialog .quick-order-card summary {
    display: none !important;
}

.modal.active .hp-product-dialog .quick-order-card form {
    display: grid !important;
    gap: 10px !important;
}

.modal.active .hp-product-dialog .quick-order-card input,
.modal.active .hp-product-dialog .quick-order-card textarea,
.modal.active .hp-product-dialog .quick-order-card select {
    min-height: 44px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal.active .hp-product-dialog .checkout-select {
    display: grid !important;
    gap: 7px !important;
}

.modal.active .hp-product-dialog .checkout-select span,
.modal.active .hp-product-dialog .checkout-address-hint {
    color: rgba(247, 244, 235, 0.62) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

.modal.active .hp-product-dialog .checkout-address-field[hidden],
.modal.active .hp-product-dialog .checkout-address-field.is-disabled {
    display: none !important;
}

@media (max-width: 390px) {
    .modal.active .hp-product-dialog > .hp-product-actionbar {
        grid-template-columns: 1fr !important;
    }

    .modal.active .hp-product-dialog > .hp-product-actionbar .primary-btn {
        width: 100% !important;
    }
}
/* === PackLab product modal pro refresh END === */

/* === PackLab product modal scroll/function repair START === */
.modal.active {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.modal.active:has(.hp-product-dialog),
.modal-portal-root .modal.active:has(.hp-product-dialog) {
    align-items: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding-top: max(8px, env(safe-area-inset-top)) !important;
    padding-bottom: max(86px, env(safe-area-inset-bottom)) !important;
}

.modal.active .hp-product-dialog {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    max-height: calc(var(--app-viewport-height, 100dvh) - 92px) !important;
}

.modal.active .hp-product-dialog .hp-product-tab-panel,
.modal.active .hp-product-dialog .hp-product-tab-panel[hidden],
.modal.active .hp-product-dialog.is-tabs-ready .hp-product-tab-panel[hidden] {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal.active .hp-product-dialog .hp-product-tab-panel:not(.is-active) {
    display: grid !important;
}

.modal.active .hp-product-dialog .quick-order-card,
.modal.active .hp-product-dialog .quick-order-card form {
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

.modal.active .hp-product-dialog .checkout-address-field[hidden],
.modal.active .hp-product-dialog .checkout-address-field.is-disabled {
    display: none !important;
}
/* === PackLab product modal scroll/function repair END === */

/* === PackLab product accordion sections START === */
.modal.active .hp-product-dialog .hp-product-accordion {
    display: grid !important;
    gap: 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%),
        rgba(255, 255, 255, 0.052) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
}

.modal.active .hp-product-dialog .hp-product-accordion > summary,
.modal.active .hp-product-dialog .quick-order-card.hp-product-accordion > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 48px !important;
    padding: 13px 14px !important;
    cursor: pointer !important;
    list-style: none !important;
    color: #fff8dd !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border-bottom: 1px solid transparent !important;
    user-select: none !important;
    touch-action: manipulation !important;
}

.modal.active .hp-product-dialog .hp-product-accordion > summary::-webkit-details-marker {
    display: none !important;
}

.modal.active .hp-product-dialog .hp-product-accordion > summary::after {
    content: "+" !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
    color: #071018 !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.modal.active .hp-product-dialog .hp-product-accordion[open] > summary {
    border-bottom-color: rgba(255, 255, 255, 0.10) !important;
}

.modal.active .hp-product-dialog .hp-product-accordion[open] > summary::after {
    content: "-" !important;
}

.modal.active .hp-product-dialog .hp-product-accordion > *:not(summary) {
    margin-left: 12px !important;
    margin-right: 12px !important;
}

.modal.active .hp-product-dialog .hp-product-accordion > *:last-child {
    margin-bottom: 12px !important;
}

.modal.active .hp-product-dialog .hp-product-accordion.modal-copy p {
    margin-top: 0 !important;
}

.modal.active .hp-product-dialog .product-review-section.hp-product-accordion .section-head {
    display: none !important;
}
/* === PackLab product accordion sections END === */

/* === PackLab tight social footer ending START === */
body.theme-market .footer-socials {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 12px !important;
}

body.theme-market.has-bottom-nav .footer-socials,
body.theme-market.has-bottom-nav[data-current-page="about"] .footer-socials,
body.theme-market.has-bottom-nav[data-current-page="games"] .footer-socials,
body.theme-market.has-bottom-nav[data-current-page="profile"] .footer-socials,
body.theme-market.has-bottom-nav[data-current-page="referral"] .footer-socials,
body.theme-market.has-bottom-nav[data-current-page="shop"] .footer-socials {
    padding-bottom: 12px !important;
}

body.theme-market:not(.has-bottom-nav) .footer-socials {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
}

body.theme-market .footer-social-links,
body.theme-market .footer-social-links > :last-child {
    margin-bottom: 0 !important;
}

body.theme-market .footer-socials + .bottom-nav {
    margin-top: 0 !important;
}
/* === PackLab tight social footer ending END === */

/* === PackLab product multi photo gallery START === */
.modal.active .hp-product-dialog .product-gallery-main img[data-product-gallery-main] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

.modal.active .hp-product-dialog .product-gallery-strip {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(66px, 82px) !important;
    gap: 9px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 8px !important;
    margin-top: -2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.modal.active .hp-product-dialog .product-gallery-strip::-webkit-scrollbar {
    display: none !important;
}

.modal.active .hp-product-dialog .product-gallery-thumb {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.06) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

.modal.active .hp-product-dialog .product-gallery-thumb.is-active {
    border-color: color-mix(in srgb, var(--accent) 72%, #ffffff 28%) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent), 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

.modal.active .hp-product-dialog .product-gallery-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.modal.active .hp-product-dialog .product-video-gallery {
    display: grid !important;
    gap: 10px !important;
}

.modal.active .hp-product-dialog .product-video-gallery video {
    display: block !important;
    width: calc(100% - 24px) !important;
    max-height: 220px !important;
    margin: 0 12px 12px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    background: #050813 !important;
}
/* === PackLab product multi photo gallery END === */

/* === PackLab compact shop tools START === */
body.theme-market .shop-smart-tools {
    display: grid !important;
    gap: 8px !important;
    margin: 2px 0 10px !important;
}

body.theme-market .smart-tool-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

body.theme-market .smart-tool-btn,
body.theme-market .smart-guide-grid button,
body.theme-market .smart-product-item button,
body.theme-market .product-mini-action {
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(247, 244, 235, 0.88) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

body.theme-market .smart-tool-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 38px !important;
    padding: 8px 9px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

body.theme-market .smart-tool-btn.is-active {
    color: #071018 !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

body.theme-market .smart-tool-btn strong {
    display: grid !important;
    place-items: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    font-size: 11px !important;
}

body.theme-market .smart-tool-panel {
    display: grid !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34%),
        rgba(8, 12, 24, 0.74) !important;
}

body.theme-market .smart-tool-panel[hidden] {
    display: none !important;
}

body.theme-market .smart-guide-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

body.theme-market .smart-guide-grid button {
    min-height: 34px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

body.theme-market .smart-list {
    display: grid !important;
    gap: 8px !important;
}

body.theme-market .smart-product-item {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

body.theme-market .smart-product-item img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 11px !important;
    object-fit: cover !important;
}

body.theme-market .smart-product-item strong,
body.theme-market .smart-product-item small {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.theme-market .smart-product-item strong {
    color: #fff8dd !important;
    font-size: 13px !important;
}

body.theme-market .smart-product-item small,
body.theme-market .smart-empty {
    color: rgba(247, 244, 235, 0.62) !important;
    font-size: 11px !important;
}

body.theme-market .smart-product-item button {
    min-height: 30px !important;
    padding: 0 9px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

body.theme-market .admin-card-shell {
    position: relative !important;
}

body.theme-market .product-card-actions {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 8 !important;
    display: flex !important;
    gap: 6px !important;
    pointer-events: auto !important;
}

body.theme-market.has-store-admin .product-card-actions {
    top: 54px !important;
}

body.theme-market .product-mini-action {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    color: #fff8dd !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

body.theme-market .product-mini-action.is-active {
    color: #071018 !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

@media (max-width: 380px) {
    body.theme-market .smart-tool-row,
    body.theme-market .smart-guide-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    body.theme-market .smart-product-item {
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
    }

    body.theme-market .smart-product-item button:last-child {
        display: none !important;
    }
}
/* === PackLab compact shop tools END === */

/* === PackLab quick order sticky summary START === */
.modal.active .hp-product-dialog .quick-order-form {
    position: relative !important;
}

.modal.active .hp-product-dialog .quick-order-summary {
    position: sticky !important;
    top: 0 !important;
    z-index: 6 !important;
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
    margin: 0 0 4px !important;
    border-radius: 18px !important;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(255,255,255,0.12)) !important;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 36%),
        rgba(8, 13, 26, 0.92) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent) !important;
    backdrop-filter: blur(18px) !important;
}

.modal.active .hp-product-dialog .quick-order-summary-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.modal.active .hp-product-dialog .quick-order-summary-head span {
    color: rgba(247, 244, 235, 0.68) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.modal.active .hp-product-dialog .quick-order-summary-head strong {
    color: #fff8dd !important;
    font-size: clamp(18px, 5vw, 24px) !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

.modal.active .hp-product-dialog .quick-order-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

.modal.active .hp-product-dialog .quick-order-summary-grid span {
    display: grid !important;
    gap: 3px !important;
    min-width: 0 !important;
    padding: 9px !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.modal.active .hp-product-dialog .quick-order-summary-grid small {
    color: rgba(247, 244, 235, 0.55) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
}

.modal.active .hp-product-dialog .quick-order-summary-grid b {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: rgba(255, 248, 221, 0.94) !important;
    font-size: 12px !important;
}

.modal.active .hp-product-dialog .quick-order-card .primary-btn[type="submit"] {
    position: sticky !important;
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
    z-index: 7 !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 22px color-mix(in srgb, var(--accent) 16%, transparent) !important;
}

@media (max-width: 380px) {
    .modal.active .hp-product-dialog .quick-order-summary-grid {
        grid-template-columns: 1fr !important;
    }
}
/* === PackLab quick order sticky summary END === */

/* === PackLab Pack Builder START === */
.pack-builder-teaser {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 14px 0 18px;
    padding: 16px;
    border: 1px solid rgba(116, 244, 255, .22);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(22, 30, 46, .92), rgba(18, 17, 35, .86));
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pack-builder-teaser-copy {
    min-width: 0;
}
.pack-builder-teaser-copy span,
.pack-builder-head span {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #87f6ff;
    background: rgba(116, 244, 255, .1);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pack-builder-teaser-copy strong {
    display: block;
    margin-top: 8px;
    color: #fffdf5;
    font-size: clamp(20px, 5vw, 30px);
    line-height: 1.04;
}
.pack-builder-teaser-copy small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, .68);
    line-height: 1.35;
}
.pack-builder-open {
    min-height: 48px;
    white-space: nowrap;
}
.pack-builder-modal {
    width: min(680px, calc(100vw - 22px));
    max-height: min(88vh, 920px);
    overflow: auto;
    border-color: rgba(116, 244, 255, .32);
    box-shadow: 0 0 0 1px rgba(116, 244, 255, .12), 0 0 44px rgba(76, 218, 255, .18), 0 28px 80px rgba(0, 0, 0, .52);
}
.pack-builder-head h2 {
    margin: 10px 0 6px;
    font-size: clamp(28px, 8vw, 48px);
    line-height: 1;
}
.pack-builder-form,
.pack-builder-slots,
.pack-builder-customer {
    display: grid;
    gap: 12px;
}
.pack-builder-slot {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
    background: rgba(255, 255, 255, .045);
}
.pack-slot-preview {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #071018;
    font-weight: 950;
    background: linear-gradient(135deg, rgba(168, 140, 255, .9), rgba(110, 233, 255, .9));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
}
.pack-slot-rank {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #071018;
    font-weight: 950;
    background: linear-gradient(135deg, #a88cff, #6ee9ff);
}
.pack-slot-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pack-slot-fields label,
.pack-builder-customer label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.pack-slot-fields span,
.pack-builder-customer span {
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}
.pack-slot-fields select,
.pack-slot-fields input,
.pack-builder-customer input,
.pack-builder-customer select,
.pack-builder-customer textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 15px;
    background: rgba(5, 8, 16, .56);
    color: #fffdf5;
    padding: 0 12px;
    outline: none;
}
.pack-builder-customer textarea {
    padding-top: 11px;
    resize: vertical;
}
.pack-builder-summary {
    position: sticky;
    bottom: 74px;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(116, 244, 255, .28);
    border-radius: 20px;
    background: rgba(8, 12, 24, .92);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, .34);
}
.pack-builder-summary span,
.pack-builder-summary small {
    color: rgba(255, 255, 255, .66);
}
.pack-builder-summary strong {
    display: block;
    margin-top: 4px;
    color: #8df6ff;
    font-size: 24px;
}
.pack-builder-summary small {
    max-width: 54%;
    line-height: 1.35;
    text-align: right;
}
.pack-builder-submit {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    min-height: 54px;
    border-radius: 18px;
}
@media (max-width: 640px) {
    .pack-builder-teaser {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }
    .pack-builder-open {
        width: 100%;
    }
    .pack-slot-fields,
    .pack-builder-customer {
        grid-template-columns: 1fr;
    }
    .pack-builder-slot {
        grid-template-columns: 36px 48px minmax(0, 1fr);
        padding: 10px;
    }
    .pack-slot-preview {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
    .pack-slot-rank {
        width: 36px;
        height: 36px;
        border-radius: 14px;
    }
    .pack-builder-summary {
        align-items: flex-start;
        flex-direction: column;
        bottom: 72px;
    }
    .pack-builder-summary small {
        max-width: none;
        text-align: left;
    }
}
/* === PackLab Pack Builder END === */
/* === PackLab Pack Assistant START === */
.pack-builder-assistant {
    display: grid;
    gap: 12px;
    margin: 12px 0 14px;
    padding: 13px;
    border: 1px solid rgba(116, 244, 255, .18);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(116, 244, 255, .08), rgba(168, 140, 255, .08));
}
.pack-assistant-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}
.pack-assistant-copy strong {
    color: #fffdf5;
    font-size: 15px;
}
.pack-assistant-copy small {
    color: rgba(255, 255, 255, .64);
    line-height: 1.35;
    text-align: right;
}
.pack-assistant-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.pack-assistant-actions button {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .055);
    font-weight: 850;
    font-size: 12px;
    cursor: pointer;
}
.pack-assistant-actions button.is-active,
.pack-assistant-actions button:focus-visible {
    color: #061018;
    border-color: rgba(116, 244, 255, .72);
    background: linear-gradient(135deg, #a88cff, #6ee9ff);
    box-shadow: 0 0 24px rgba(110, 233, 255, .26);
    outline: none;
}
@media (max-width: 640px) {
    .pack-assistant-copy {
        display: grid;
        gap: 4px;
    }
    .pack-assistant-copy small {
        text-align: left;
    }
    .pack-assistant-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* === PackLab Pack Assistant END === */

/* === Product card and media hard override START ===
   This file is loaded after app.css, so these rules are the final authority. */
body.theme-market .admin-card-shell > .product-card-actions,
.admin-card-shell > .product-card-actions {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 6px 0 0 !important;
    transform: none !important;
    pointer-events: auto !important;
}

body.theme-market.has-store-admin .admin-card-shell > .product-card-actions {
    top: auto !important;
}

body.theme-market .admin-card-shell > .product-card-actions button,
.admin-card-shell > .product-card-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(247, 244, 235, 0.82) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

body.theme-market .admin-card-shell > .product-card-actions button.is-active,
.admin-card-shell > .product-card-actions button.is-active {
    color: #120d09 !important;
    background: linear-gradient(135deg, #fff0b0, #ff7b4f) !important;
    border-color: rgba(255, 207, 116, 0.68) !important;
}

.product-stock-badge {
    display: none !important;
}

.product-stock-meter {
    position: absolute !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    z-index: 6 !important;
    display: grid !important;
    gap: 5px !important;
    padding: 7px 8px !important;
    border-radius: 13px !important;
    background: rgba(7, 10, 17, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.product-stock-meter span {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-width: 0 !important;
    color: #fff !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

.product-stock-meter strong,
.product-stock-meter em {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-style: normal !important;
    font-weight: 950 !important;
}

.product-stock-meter em {
    color: rgba(255, 255, 255, 0.76) !important;
    font-size: 8px !important;
}

.product-stock-meter > i,
.stock-progress-track {
    position: relative !important;
    display: block !important;
    height: 6px !important;
    overflow: hidden !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

.product-stock-meter > i::before,
.stock-progress-track > i {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: var(--stock-level, 0%) !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #69ee91, #21d36d) !important;
    box-shadow: 0 0 18px rgba(55, 224, 112, 0.34) !important;
}

.product-stock-meter.is-low > i::before,
.stock-progress.is-low .stock-progress-track > i {
    background: linear-gradient(90deg, #ffd166, #ff9f1c) !important;
}

.product-stock-meter.is-out > i::before,
.stock-progress.is-out .stock-progress-track > i {
    background: linear-gradient(90deg, #ff7a7a, #ff3d5d) !important;
}

.stock-progress {
    display: grid !important;
    gap: 8px !important;
    padding: 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.stock-progress-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    color: rgba(247, 244, 235, 0.86) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
}

.stock-progress-head strong {
    color: #fff !important;
    font-size: 12px !important;
    white-space: nowrap !important;
}

.stock-progress-track {
    height: 9px !important;
}

.modal.active .product-modal > .product-media-carousel,
.modal.active .hp-product-dialog > .product-media-carousel,
.modal.active .product-pro-modal > .product-media-carousel,
.modal.active .product-show-modal > .product-media-carousel {
    position: relative !important;
    z-index: 1 !important;
    order: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: hidden !important;
}

.modal.active .product-modal .product-media-track,
.modal.active .hp-product-dialog .product-media-track,
.modal.active .product-pro-modal .product-media-track,
.modal.active .product-show-modal .product-media-track {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
}

.modal.active .product-modal .product-media-track::-webkit-scrollbar,
.modal.active .hp-product-dialog .product-media-track::-webkit-scrollbar,
.modal.active .product-pro-modal .product-media-track::-webkit-scrollbar,
.modal.active .product-show-modal .product-media-track::-webkit-scrollbar {
    display: none !important;
}

.modal.active .product-modal .product-media-slide,
.modal.active .hp-product-dialog .product-media-slide,
.modal.active .product-pro-modal .product-media-slide,
.modal.active .product-show-modal .product-media-slide {
    position: relative !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    aspect-ratio: var(--media-aspect, 1 / 1) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(64svh, 660px) !important;
    margin: 0 !important;
    padding: 8px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background: radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.08), transparent 34%), #060912 !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
}

.modal.active .product-modal .product-media-slide.is-media-wide,
.modal.active .hp-product-dialog .product-media-slide.is-media-wide,
.modal.active .product-pro-modal .product-media-slide.is-media-wide,
.modal.active .product-show-modal .product-media-slide.is-media-wide {
    aspect-ratio: var(--media-aspect, 16 / 9) !important;
    max-height: min(48svh, 520px) !important;
}

.modal.active .product-modal .product-media-slide.is-media-portrait,
.modal.active .hp-product-dialog .product-media-slide.is-media-portrait,
.modal.active .product-pro-modal .product-media-slide.is-media-portrait,
.modal.active .product-show-modal .product-media-slide.is-media-portrait {
    aspect-ratio: var(--media-aspect, 9 / 16) !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-height: min(62svh, 680px) !important;
}

.modal.active .product-modal .product-media-slide img,
.modal.active .product-modal .product-media-slide video,
.modal.active .hp-product-dialog .product-media-slide img,
.modal.active .hp-product-dialog .product-media-slide video,
.modal.active .product-pro-modal .product-media-slide img,
.modal.active .product-pro-modal .product-media-slide video,
.modal.active .product-show-modal .product-media-slide img,
.modal.active .product-show-modal .product-media-slide video {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: 16px !important;
    background: #05070c !important;
    transform: none !important;
}

.modal.active .product-modal .tag-row .stock-chip,
.modal.active .hp-product-dialog .tag-row .stock-chip,
.modal.active .product-pro-modal .tag-row .stock-chip,
.modal.active .product-show-modal .tag-row .stock-chip {
    display: none !important;
}

/* Telegram scroll safety: keep vertical pan available on the shop and inside modals. */
html,
body,
body.theme-market,
body.theme-market .device-frame,
body.theme-market .app-content,
body.is-telegram-context .device-frame,
body.is-telegram-context .app-content,
body.telegram-webapp .device-frame,
body.telegram-webapp .app-content,
body.telegram-ios-webview .device-frame,
body.telegram-ios-webview .app-content {
    overscroll-behavior-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market .app-content,
body.is-telegram-context .app-content,
body.telegram-webapp .app-content,
body.telegram-ios-webview .app-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    contain: none !important;
}

.modal.active,
.modal.active .modal-card,
.modal.active .product-modal,
.modal.active .hp-product-dialog,
.modal.active .product-pro-modal,
.modal.active .product-show-modal {
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

.modal.active .product-media-track {
    touch-action: pan-x pan-y pinch-zoom !important;
    overscroll-behavior-x: auto !important;
}
/* === Product card and media hard override END === */

/* === Vertical scroll hard override START === */
html,
body,
body.theme-market,
body.theme-market .device-frame {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market .device-frame {
    overflow-y: visible !important;
    contain: none !important;
}

body.theme-market .app-content,
body.theme-market .store-shell,
body.theme-market .store-header-card,
body.theme-market .promo-section,
body.theme-market .promotions-section,
body.theme-market .product-grid,
body.theme-market .catalogue-grid,
body.theme-market .products-grid,
body.theme-market .footer-socials {
    overflow-y: visible !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
    contain: none !important;
}

body.theme-market .app-content {
    overflow-x: hidden !important;
}

body.theme-market .filter-menu-list,
body.theme-market .filter-bar,
body.theme-market .filter-bar-flat,
body.theme-market .toolbar,
body.theme-market .smart-panel,
body.theme-market .product-media-track {
    overscroll-behavior-y: auto !important;
}

body.theme-market.modal-lock:not(:has(.modal.active, .cart-drawer.active, [data-cart-drawer].active)) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market .product-media-track,
body.theme-market .filter-menu-list,
body.theme-market .filter-bar-flat,
body.theme-market .toolbar-scroll,
body.theme-market [data-horizontal-scroll] {
    touch-action: pan-x pan-y pinch-zoom !important;
}
/* === Vertical scroll hard override END === */

/* === Telegram scroll optimizer START === */
html.telegram-scroll-optimized,
body.telegram-scroll-optimized,
body.theme-market.telegram-scroll-optimized,
body.theme-market.telegram-webapp,
body.theme-market.telegram-ios-webview,
body.theme-market.is-telegram-context {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market.telegram-scroll-optimized .device-frame,
body.theme-market.telegram-scroll-optimized .app-content,
body.theme-market.telegram-scroll-optimized .store-shell,
body.theme-market.telegram-webapp .device-frame,
body.theme-market.telegram-webapp .app-content,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-ios-webview .device-frame,
body.theme-market.telegram-ios-webview .app-content,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.is-telegram-context .device-frame,
body.theme-market.is-telegram-context .app-content,
body.theme-market.is-telegram-context .store-shell {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
    contain: none !important;
}

body.theme-market.telegram-scroll-optimized .product-grid,
body.theme-market.telegram-scroll-optimized .catalogue-grid,
body.theme-market.telegram-scroll-optimized .products-grid,
body.theme-market.telegram-scroll-optimized .promotions-section,
body.theme-market.telegram-scroll-optimized .footer-socials,
body.theme-market.telegram-webapp .product-grid,
body.theme-market.telegram-webapp .catalogue-grid,
body.theme-market.telegram-webapp .products-grid,
body.theme-market.telegram-webapp .promotions-section,
body.theme-market.telegram-webapp .footer-socials {
    overflow-y: visible !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
    contain: none !important;
}

body.theme-market.telegram-scroll-optimized .product-media-track,
body.theme-market.telegram-webapp .product-media-track,
body.theme-market.telegram-ios-webview .product-media-track,
body.theme-market.telegram-scroll-optimized .filter-menu-list,
body.theme-market.telegram-webapp .filter-menu-list,
body.theme-market.telegram-ios-webview .filter-menu-list,
body.theme-market.telegram-scroll-optimized [data-horizontal-scroll] {
    overscroll-behavior-x: contain !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market.telegram-scroll-optimized.modal-lock:not(:has(.modal.active, .cart-drawer.active, [data-cart-drawer].active)),
body.theme-market.telegram-webapp.modal-lock:not(:has(.modal.active, .cart-drawer.active, [data-cart-drawer].active)),
body.theme-market.telegram-ios-webview.modal-lock:not(:has(.modal.active, .cart-drawer.active, [data-cart-drawer].active)) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
}

body.theme-market.telegram-scroll-optimized .toolbar,
body.theme-market.telegram-webapp .toolbar,
body.theme-market.telegram-ios-webview .toolbar,
body.theme-market.is-telegram-context .toolbar {
    position: sticky !important;
    top: var(--telegram-toolbar-top, 0px) !important;
    z-index: 1200 !important;
    transform: none !important;
    touch-action: pan-y pinch-zoom !important;
    overscroll-behavior-y: contain !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    background: rgba(6, 8, 16, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24) !important;
    backdrop-filter: blur(var(--topbar-blur, 18px)) !important;
    -webkit-backdrop-filter: blur(var(--topbar-blur, 18px)) !important;
    will-change: transform !important;
}

html.telegram-fixed-toolbar body.theme-market .store-shell > .toolbar,
body.theme-market.telegram-fixed-toolbar .store-shell > .toolbar,
body.theme-market.telegram-webapp .store-shell > .toolbar,
body.theme-market.telegram-ios-webview .store-shell > .toolbar,
body.theme-market.is-telegram-context .store-shell > .toolbar {
    position: fixed !important;
    top: var(--telegram-toolbar-top, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 0 0 18px 18px !important;
    box-sizing: border-box !important;
    transform: none !important;
    backface-visibility: hidden !important;
    contain: none !important;
}

html.telegram-fixed-toolbar body.theme-market .store-shell,
body.theme-market.telegram-fixed-toolbar .store-shell,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.is-telegram-context .store-shell {
    padding-top: calc(var(--telegram-toolbar-height, 230px) + 12px) !important;
}


body.theme-market.telegram-scroll-optimized .quick-filter-row,
body.theme-market.telegram-webapp .quick-filter-row,
body.theme-market.telegram-ios-webview .quick-filter-row,
body.theme-market.is-telegram-context .quick-filter-row {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    overscroll-behavior-x: contain !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market.telegram-scroll-optimized .quick-filter-chip,
body.theme-market.telegram-webapp .quick-filter-chip,
body.theme-market.telegram-ios-webview .quick-filter-chip,
body.theme-market.is-telegram-context .quick-filter-chip {
    touch-action: pan-x pan-y pinch-zoom !important;
}

body.theme-market.telegram-scroll-optimized .filter-menu summary,
body.theme-market.telegram-webapp .filter-menu summary,
body.theme-market.telegram-ios-webview .filter-menu summary,
body.theme-market.is-telegram-context .filter-menu summary {
    touch-action: pan-y pinch-zoom !important;
}
/* === Telegram scroll optimizer END === */

/* === Telegram absolute scroll surface START === */
html.telegram-manual-scroll,
body.theme-market.telegram-manual-scroll,
body.theme-market.telegram-scroll-optimized,
body.theme-market.telegram-webapp,
body.theme-market.telegram-ios-webview,
body.theme-market.is-telegram-context {
    width: 100% !important;
    height: var(--app-viewport-height, 100dvh) !important;
    min-height: var(--app-viewport-height, 100dvh) !important;
    max-height: var(--app-viewport-height, 100dvh) !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    scroll-behavior: auto !important;
    overflow-anchor: none !important;
}

body.theme-market.telegram-manual-scroll .device-frame,
body.theme-market.telegram-scroll-optimized .device-frame,
body.theme-market.telegram-webapp .device-frame,
body.theme-market.telegram-ios-webview .device-frame,
body.theme-market.is-telegram-context .device-frame {
    height: var(--app-viewport-height, 100dvh) !important;
    min-height: var(--app-viewport-height, 100dvh) !important;
    max-height: var(--app-viewport-height, 100dvh) !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

body.theme-market.telegram-manual-scroll .app-content,
body.theme-market.telegram-scroll-optimized .app-content,
body.theme-market.telegram-webapp .app-content,
body.theme-market.telegram-ios-webview .app-content,
body.theme-market.is-telegram-context .app-content {
    height: var(--app-viewport-height, 100dvh) !important;
    min-height: var(--app-viewport-height, 100dvh) !important;
    max-height: var(--app-viewport-height, 100dvh) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: auto !important;
    overflow-anchor: none !important;
    transform: none !important;
    will-change: auto !important;
}

body.theme-market.telegram-manual-scroll .store-shell,
body.theme-market.telegram-scroll-optimized .store-shell,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.is-telegram-context .store-shell {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
}
/* === Telegram absolute scroll surface END === */

/* === Telegram fixed filter dock START === */
body.theme-market.telegram-manual-scroll .device-frame,
body.theme-market.telegram-scroll-optimized .device-frame,
body.theme-market.telegram-webapp .device-frame,
body.theme-market.telegram-ios-webview .device-frame,
body.theme-market.is-telegram-context .device-frame {
    display: flex !important;
    flex-direction: column !important;
}

body.theme-market .telegram-toolbar-dock {
    position: relative !important;
    z-index: 2147483000 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #070b16 !important;
    contain: none !important;
    transform: none !important;
    will-change: auto !important;
}

body.theme-market .telegram-toolbar-dock > .toolbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 0 18px 18px !important;
    box-sizing: border-box !important;
    transform: none !important;
    backface-visibility: hidden !important;
    contain: none !important;
    will-change: auto !important;
}

body.theme-market .telegram-toolbar-dock .filter-bar,
body.theme-market .telegram-toolbar-dock .filter-bar-flat {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
    overflow: visible !important;
    min-width: 0 !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu {
    position: relative !important;
    min-width: 0 !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu[open] {
    z-index: 90 !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu summary {
    list-style: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 18px !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    padding: 11px 14px !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)) !important;
    color: var(--text) !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu summary::marker,
body.theme-market .telegram-toolbar-dock .filter-menu summary::-webkit-details-marker {
    display: none !important;
    content: "" !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu summary span {
    min-width: 0 !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu summary strong {
    max-width: 132px !important;
    color: #fffdf7 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-align: right !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu summary::after {
    content: "" !important;
    width: 9px !important;
    height: 9px !important;
    justify-self: end !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg) translateY(-2px) !important;
    opacity: .7 !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu[open] summary {
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line)) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent), 0 10px 24px rgba(0,0,0,.2) !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px) !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu:not([open]) .filter-menu-list {
    display: none !important;
}

body.theme-market .telegram-toolbar-dock .filter-menu[open] .filter-menu-list {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    gap: 8px !important;
    max-height: min(310px, calc(100dvh - 190px)) !important;
    margin-top: 8px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 10px !important;
    border-radius: 16px !important;
    border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255,255,255,.12)) !important;
    background: color-mix(in srgb, var(--surface) 94%, #050711) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 14px 30px rgba(0,0,0,.24) !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

body.theme-market .telegram-toolbar-dock .filter-option,
body.theme-market .telegram-toolbar-dock .filter-menu-list .chip {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    border-radius: 13px !important;
}

@media (min-width: 560px) {
    body.theme-market .telegram-toolbar-dock .filter-bar,
    body.theme-market .telegram-toolbar-dock .filter-bar-flat {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

html.telegram-fixed-toolbar body.theme-market .store-shell > .toolbar,
body.theme-market.telegram-fixed-toolbar .store-shell > .toolbar,
body.theme-market.telegram-webapp .store-shell > .toolbar,
body.theme-market.telegram-ios-webview .store-shell > .toolbar,
body.theme-market.is-telegram-context .store-shell > .toolbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    border-radius: 18px !important;
    transform: none !important;
}

html.telegram-fixed-toolbar body.theme-market .store-shell,
body.theme-market.telegram-fixed-toolbar .store-shell,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.is-telegram-context .store-shell {
    padding-top: 0 !important;
}

body.theme-market.telegram-manual-scroll .app-content,
body.theme-market.telegram-scroll-optimized .app-content,
body.theme-market.telegram-webapp .app-content,
body.theme-market.telegram-ios-webview .app-content,
body.theme-market.is-telegram-context .app-content {
    flex: 0 0 auto !important;
    height: var(--telegram-content-height, calc(var(--app-viewport-height, 100dvh) - var(--telegram-toolbar-height, 0px))) !important;
    min-height: 0 !important;
    max-height: var(--telegram-content-height, calc(var(--app-viewport-height, 100dvh) - var(--telegram-toolbar-height, 0px))) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y pinch-zoom !important;
}
/* === Telegram fixed filter dock END === */

/* === Telegram natural filter flow START === */
body.theme-market.telegram-manual-scroll .toolbar,
body.theme-market.telegram-scroll-optimized .toolbar,
body.theme-market.telegram-webapp .toolbar,
body.theme-market.telegram-ios-webview .toolbar,
body.theme-market.is-telegram-context .toolbar,
html.telegram-fixed-toolbar body.theme-market .store-shell > .toolbar,
body.theme-market.telegram-fixed-toolbar .store-shell > .toolbar,
body.theme-market.telegram-webapp .store-shell > .toolbar,
body.theme-market.telegram-ios-webview .store-shell > .toolbar,
body.theme-market.is-telegram-context .store-shell > .toolbar {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 20 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    border-radius: 18px !important;
    transform: none !important;
    contain: none !important;
    will-change: auto !important;
}

body.theme-market.telegram-manual-scroll .store-shell,
body.theme-market.telegram-scroll-optimized .store-shell,
body.theme-market.telegram-webapp .store-shell,
body.theme-market.telegram-ios-webview .store-shell,
body.theme-market.is-telegram-context .store-shell,
html.telegram-fixed-toolbar body.theme-market .store-shell,
body.theme-market.telegram-fixed-toolbar .store-shell {
    padding-top: 0 !important;
}

body.theme-market [data-telegram-toolbar-dock]:empty {
    display: none !important;
}
/* === Telegram natural filter flow END === */

/* === Telegram filter list and footer clearance START === */
body.theme-market .store-shell .filter-menu[open] .filter-menu-list,
body.theme-market .store-shell .filter-bar-flat .filter-menu[open] .filter-menu-list,
body.theme-market.telegram-scroll-optimized .filter-menu[open] .filter-menu-list,
body.theme-market.telegram-webapp .filter-menu[open] .filter-menu-list,
body.theme-market.telegram-ios-webview .filter-menu[open] .filter-menu-list,
body.theme-market.is-telegram-context .filter-menu[open] .filter-menu-list {
    display: grid !important;
    max-height: min(52dvh, 360px) !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    scrollbar-width: thin !important;
}

body.theme-market.has-bottom-nav .app-content,
body.theme-market.telegram-scroll-optimized .app-content,
body.theme-market.telegram-webapp .app-content,
body.theme-market.telegram-ios-webview .app-content,
body.theme-market.is-telegram-context .app-content {
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important;
}

body.theme-market.has-bottom-nav .footer-socials,
body.theme-market .footer-socials[data-telegram-scroll-footer],
body.theme-market.telegram-scroll-optimized .footer-socials,
body.theme-market.telegram-webapp .footer-socials,
body.theme-market.telegram-ios-webview .footer-socials,
body.theme-market.is-telegram-context .footer-socials {
    margin-bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: 18px !important;
    scroll-margin-bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important;
}
/* === Telegram filter list and footer clearance END === */
