
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

button, .btn, .tab-button, .choice-btn, .owner-action,
[data-action], [data-share], .btn-close, .copy-btn, a.btn {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

:root {
    --primary-bg:        #F2F2F7;
    --secondary-bg:      #FFFFFF;
    --card-bg:           #FFFFFF;
    --accent-blue:       #007AFF;
    --accent-light-blue: #5AC8FA;
    --text-primary:      #000000;
    --text-secondary:    #6E6E73;
    --border-color:      rgba(0,0,0,0.10);

    --overlay-1: rgba(0,0,0,0.06);
    --overlay-2: rgba(0,0,0,0.10);
    --overlay-3: rgba(0,0,0,0.16);
    --overlay-fade: rgba(0,0,0,0.05);

    --surface-elevated: #FFFFFF;
    --surface-pressed:  rgba(0,0,0,0.05);
    --tabbar-bg:        #ffffff;
    --tabbar-shadow:    0 8px 28px rgba(0,0,0,0.12);
    --progress-shell-from: rgba(245,245,247,0.98);
    --progress-shell-to:   rgba(230,230,235,0.98);
    --progress-inner-bg:   rgba(245,245,247,0.92);
    --progress-track-bg:   rgba(0,0,0,0.06);

    --progress-text:           #1C1C1E;
    --progress-text-muted:     rgba(60,60,67,0.55);
    --progress-caption-text:   #FFFFFF;
    --progress-caption-bg:     rgba(110,110,120,0.78);

    --shadow-small:  0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-medium: 0 2px 6px rgba(0,0,0,0.06), 0 12px 28px rgba(0,0,0,0.10);
    --shadow-large:  0 4px 12px rgba(0,0,0,0.10), 0 24px 48px rgba(0,0,0,0.14);

    --color-success:       #34C759;
    --color-warning:       #FF9500;
    --color-danger:        #FF3B30;
    --color-info:          #007AFF;
    --color-ton:           #0088CC;
    --color-ton-dark:      #005F99;
    --color-usdt:          #26A17B;
    --color-stars:         #FFD700;

    --btn-secondary-bg:        #F2F2F7;
    --btn-secondary-bg-hover:  #E5E5EA;
    --btn-secondary-border:    rgba(0,0,0,0.16);
}
:root[data-theme="dark"] {
    --primary-bg:        #000000;
    --secondary-bg:      #1C1C1E;
    --card-bg:           #2C2C2E;
    --accent-blue:       #0A84FF;
    --accent-light-blue: #64D2FF;
    --text-primary:      #FFFFFF;
    --text-secondary:    #8E8E93;
    --border-color:      #38383A;

    --overlay-1: rgba(255,255,255,0.04);
    --overlay-2: rgba(255,255,255,0.08);
    --overlay-3: rgba(255,255,255,0.14);
    --overlay-fade: rgba(255,255,255,0.04);

    --surface-elevated: #2C2C2E;
    --surface-pressed:  rgba(255,255,255,0.06);
    --tabbar-bg:        #1c1c1e;
    --tabbar-shadow:    0 8px 32px rgba(0,0,0,0.6);
    --progress-shell-from: rgba(37,39,40,0.98);
    --progress-shell-to:   rgba(26,27,28,0.98);
    --progress-inner-bg:   rgba(40,40,39,0.94);
    --progress-track-bg:   rgba(255,255,255,0.08);
    --progress-text:           #FFFFFF;
    --progress-text-muted:     rgba(255,255,255,0.46);
    --progress-caption-text:   #FFFFFF;
    --progress-caption-bg:     rgba(110,110,120,0.55);

    --shadow-small:  0 2px 8px rgba(0,0,0,0.30);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.40);
    --shadow-large:  0 8px 32px rgba(0,0,0,0.50);

    --color-success:       #30D158;
    --color-warning:       #FFD60A;
    --color-danger:        #FF453A;
    --color-info:          #0A84FF;
    --color-ton:           #38B6FF;
    --color-ton-dark:      #1A8AC9;
    --color-usdt:          #26A17B;
    --color-stars:         #FFD700;

    --btn-secondary-bg:        #3A3A3C;
    --btn-secondary-bg-hover:  #48484A;
    --btn-secondary-border:    rgba(255,255,255,0.10);
}

:root {

    --safe-area-top:    0px;
    --safe-area-bottom: 0px;
    --safe-area-left:   0px;
    --safe-area-right:  0px;
    --content-safe-top:    0px;
    --content-safe-bottom: 0px;
    --content-safe-left:   0px;
    --content-safe-right:  0px;
    --tg-viewport-height: 100vh;
    --tabbar-height: 64px;

    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 24px;
    --border-radius: 12px;

    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@supports (padding: env(safe-area-inset-top)) {
    :root:not(:has(.has-tg-safe-area)) {
        --safe-area-top:    env(safe-area-inset-top, 0px);
        --safe-area-bottom: env(safe-area-inset-bottom, 0px);
        --safe-area-left:   env(safe-area-inset-left, 0px);
        --safe-area-right:  env(safe-area-inset-right, 0px);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

#app {
    min-height: var(--tg-viewport-height, 100vh);
    display: flex;
    flex-direction: column;
}

#page-container {
    flex: 1;

    padding-top:    calc(var(--content-safe-top, 0px) + var(--safe-area-top, 0px) + 32px);
    padding-bottom: calc(var(--tabbar-height) + var(--safe-area-bottom) + 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.08s ease;
}

.app-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg, #F2F2F7);
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
}

:root[data-theme="dark"] .app-splash {
    background: var(--primary-bg, #000000);
}

.app-splash.is-exit {
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 0.22s ease;
    transition: opacity 0.22s ease;
}

.app-splash__spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(0, 122, 255, 0.18);
    border-top-color: #007AFF;
    -webkit-animation: appSplashSpin 0.75s linear infinite;
    animation: appSplashSpin 0.75s linear infinite;
    will-change: transform;
}

:root[data-theme="dark"] .app-splash__spinner {
    border-color: rgba(10, 132, 255, 0.22);
    border-top-color: #0A84FF;
}

@-webkit-keyframes appSplashSpin {
    to { -webkit-transform: rotate(360deg); }
}
@keyframes appSplashSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .app-splash__spinner {
        -webkit-animation: none;
        animation: none;
        border-top-color: transparent;
        border-right-color: #007AFF;
        opacity: 0.85;
    }
}

.bottom-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 calc(12px + var(--safe-area-left)) calc(var(--safe-area-bottom) + 16px) calc(12px + var(--safe-area-right));
    z-index: 1000;
    pointer-events: none;
}

.tabbar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--tabbar-bg);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateZ(0);
    contain: layout paint style;
    border-radius: 28px;
    padding: 8px 12px 8px;
    box-shadow: var(--tabbar-shadow),
                0 0 0 1px var(--overlay-2) inset;
    pointer-events: auto;
}

.tab-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 2;
}

.tab-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}
.tab-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}
.tab-button.active .tab-icon {
    color: var(--accent, #007aff);
}

.tab-lottie {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.tab-lottie.is-ready {
    opacity: 0.78;
}
.tab-lottie canvas,
.tab-lottie svg {
    display: block;
    width: 28px !important;
    height: 28px !important;
}
.tab-button.active .tab-lottie.is-ready {
    opacity: 1;
    transform: scale(1.06);
}
.tab-button:not(.active) .tab-lottie.is-ready {
    opacity: 0.72;
}

.tab-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button.active {
    color: var(--accent-blue);
}

.tab-button.active .tab-icon {
    transform: scale(1.1);
}

.tab-button:active {
    transform: scale(0.95);
}

.tab-indicator {
    position: absolute;
    bottom: 8px;
    height: calc(100% - 16px);
    background: rgba(10, 132, 255, 0.15);
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.page {
    min-height: 100vh;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.page-header {

    padding: 8px 20px 16px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header .btn-back {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    margin: 0;
}

.page-header:has(.btn-back) .page-title {
    padding-left: 48px;
}

.page-title {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.5px;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.page-content {
    padding: 0 20px 20px;
}

.info-card {
    background: var(--card-bg);
    border-radius: var(--radius-medium);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-small);

    contain: layout paint style;
}

@keyframes medalShineGold {
    0%   { transform: translateX(-130%); }
    50%  { transform: translateX(130%); }
    100% { transform: translateX(130%); }
}

@keyframes medalShineSilver {
    0%   { transform: translateX(-130%); }
    55%  { transform: translateX(130%); }
    100% { transform: translateX(130%); }
}

@keyframes medalShineBronze {
    0%   { transform: translateX(-130%); }
    55%  { transform: translateX(130%); }
    100% { transform: translateX(130%); }
}

.info-card.balance-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg,
        rgba(10,132,255,0.07) 0%,
        rgba(73,223,100,0.05) 100%);
    border: 1px solid rgba(10,132,255,0.12);
}
.balance-callout__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.balance-callout__label {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.balance-callout__amount {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.15;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.balance-callout__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
    color: var(--accent-blue);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
:root[data-theme="dark"] .balance-callout__badge {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-light-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.4);
    position: relative;
    overflow: hidden;
    color: #fff;
}

.profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 2;
}
.profile-avatar img.loaded {
    opacity: 1;
}
.profile-avatar #profile-avatar-initial {
    position: relative;
    z-index: 1;
    line-height: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;

    max-width: min(92vw, 360px);
    padding: 0 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-username {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: min(92vw, 360px);
    padding: 0 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-header-with-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 51px;
    height: 31px;
    background: var(--overlay-2);
    border: 1px solid var(--border-color);
    border-radius: 31px;
    transition: background 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;

    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #FFFFFF;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 1px 1px rgba(0,0,0,0.10),
        0 3px 8px rgba(0,0,0,0.18);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: var(--accent-blue);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.balances-list {
    display: grid;
    gap: 12px;
}

.balance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    transition: transform 0.15s ease, background 0.15s ease;
    gap: 12px;

    will-change: transform;
}
.balance-item.hidden { display: none; }
.balance-item:active {
    transform: scale(0.985);
    background: var(--overlay-2);
}
@media (hover: hover) {
    .balance-item:hover { background: var(--overlay-2); }
}

.balance-currency {
    display: flex;
    align-items: center;
    gap: 10px;

    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.currency-icon,
.currency-icon-img,
.currency-icon-svg,
.cur-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.currency-icon-svg svg,
.cur-icon {
    display: block;
}

.currency-icon.small,
.currency-icon-img.small,
.currency-icon-svg.small,
.cur-icon.cur-icon-sm {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
}

.tx-currency-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.tx-currency-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.balance-item[data-currency="TON"] .tx-currency-icon,
.transaction-item[data-currency="TON"] .tx-currency-icon {
    color: var(--color-ton);
}

.balance-item[data-currency="USDT"] .tx-currency-icon,
.transaction-item[data-currency="USDT"] .tx-currency-icon {
    color: var(--color-usdt);
}

.balance-item[data-currency="STARS"] .tx-currency-icon,
.transaction-item[data-currency="STARS"] .tx-currency-icon {
    color: var(--color-stars);
}

.balance-item[data-currency="RUB"] .tx-currency-icon,
.transaction-item[data-currency="RUB"] .tx-currency-icon {
    color: #0039A6;
}

.balance-item[data-currency="USD"] .tx-currency-icon,
.transaction-item[data-currency="USD"] .tx-currency-icon {
    color: #85BB65;
}

.balance-item[data-currency="EUR"] .tx-currency-icon,
.transaction-item[data-currency="EUR"] .tx-currency-icon {
    color: #0051D5;
}

.balance-item[data-currency="GBP"] .tx-currency-icon,
.transaction-item[data-currency="GBP"] .tx-currency-icon {
    color: #C8102E;
}

.balance-item[data-currency="CNY"] .tx-currency-icon,
.transaction-item[data-currency="CNY"] .tx-currency-icon {
    color: #DE2910;
}

.balance-item[data-currency="JPY"] .tx-currency-icon,
.transaction-item[data-currency="JPY"] .tx-currency-icon {
    color: #BC002D;
}

.tx-currency-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.currency-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.balance-amount {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-blue);
    white-space: nowrap;
    text-align: right;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    text-align: center;

    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.stat-item.stat-highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.20), rgba(100, 210, 255, 0.10));
    border-color: rgba(10, 132, 255, 0.45);
    box-shadow: 0 2px 8px rgba(10,132,255,0.18);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-highlight .stat-value {
    color: var(--accent-blue);
}

.rates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    gap: 12px;

    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.rate-pair {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.rate-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 12px;

    min-width: 0;
}

.rate-currency {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;

}

.rate-icons {
    display: flex;
    align-items: center;
}

.rate-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--card-bg);
    flex-shrink: 0;
}

.rate-icon-img {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.rate-icon + .rate-icon {
    margin-left: -10px;
}

.rate-name {
    font-size: 15px;
    font-weight: 500;
}

.rate-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-blue);
    white-space: nowrap;
    text-align: right;
}

.deals-banner {
    --banner-ratio: 2.78 / 1;
    --banner-radius: 14px;
    --banner-ease: cubic-bezier(0.32, 0.72, 0, 1);
    margin: 4px 20px 12px;
    user-select: none;
    -webkit-user-select: none;
}

.orders-page > .deals-banner + .page-header {
    padding-top: 4px;
}

.deals-banner__frame {
    position: relative;
    border-radius: var(--banner-radius);
    border: 1px solid var(--border-color);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0)) padding-box,
        var(--card-bg) padding-box;
    box-shadow:
        var(--shadow-small),
        inset 0 1px 0 rgba(255,255,255,0.55);
    overflow: hidden;
    isolation: isolate;
}

:root[data-theme="dark"] .deals-banner__frame {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), transparent) padding-box,
        var(--card-bg) padding-box;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 8px 24px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.10);
}

.deals-banner__track {
    display: flex;
    width: 100%;
    aspect-ratio: var(--banner-ratio);
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
}

.deals-banner__track.is-dragging {
    cursor: grabbing;
}

.deals-banner__rail {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.78s var(--banner-ease);
}

.deals-banner__track.is-dragging .deals-banner__rail {
    transition: none;
}

.deals-banner__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.deals-banner__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    -webkit-user-drag: none;
    transform: scale(1.06);
    opacity: 0.72;
    filter: saturate(0.92) brightness(0.98);
    transition:
        transform 0.9s var(--banner-ease),
        opacity 0.55s ease,
        filter 0.55s ease;
    will-change: transform, opacity;
}

.deals-banner__slide.is-active .deals-banner__img {
    transform: scale(1);
    opacity: 1;
    filter: none;
}

.deals-banner__track.is-dragging .deals-banner__img {
    transition: none;
}

.deals-banner__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.55;
}
.deals-banner__fade--left {
    left: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.06), transparent);
}
.deals-banner__fade--right {
    right: 0;
    background: linear-gradient(270deg, rgba(0,0,0,0.06), transparent);
}
:root[data-theme="dark"] .deals-banner__fade--left {
    background: linear-gradient(90deg, rgba(0,0,0,0.35), transparent);
}
:root[data-theme="dark"] .deals-banner__fade--right {
    background: linear-gradient(270deg, rgba(0,0,0,0.35), transparent);
}

.deals-banner__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    min-height: 10px;
}

.deals-banner__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--overlay-3);
    cursor: pointer;
    transition: width 0.45s var(--banner-ease),
                background-color 0.3s ease,
                transform 0.2s ease;
}

.deals-banner__dot.is-active {
    width: 20px;
    background: var(--accent-blue);
}

.deals-banner__dot:active {
    transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
    .deals-banner__rail,
    .deals-banner__img,
    .deals-banner__dot {
        transition: none !important;
    }
    .deals-banner__img {
        transform: none;
        opacity: 1;
        filter: none;
    }
}

@media (max-width: 380px) {
    .deals-banner {
        --banner-ratio: 2.55 / 1;
        margin-bottom: 10px;
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;

    transition: background-color 0.18s ease,
                border-color 0.18s ease,
                color 0.18s ease,
                box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.96);

    transition: transform 0.08s ease, background-color 0.18s ease,
                border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.4);
}

.btn-primary:hover {
    background: var(--accent-light-blue);
}

.btn-success {
    background: var(--color-success);
    color: white;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.35);
}

@media (hover: hover) and (pointer: fine) {
    .btn-success:hover {
        filter: brightness(0.92);
    }
}

.btn-secondary {

    background: var(--btn-secondary-bg, #F2F2F7);
    color: var(--text-primary);
    border: 1px solid var(--btn-secondary-border, rgba(0,0,0,0.18));
}

@media (hover: hover) and (pointer: fine) {
    .btn-secondary:hover {
        background: var(--btn-secondary-bg-hover, #E5E5EA);
    }
}

.btn-secondary.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);

    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.25);
}

.btn svg {
    flex-shrink: 0;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
    background: var(--secondary-bg);
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

@media (min-width: 640px) {
    html {
        background: #c8c8ce;
    }
    html[data-theme="dark"] {
        background: #050506;
    }

    body {
        background: inherit;
        min-height: 100vh;
    }

    #app {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        min-height: 100vh;
        min-height: var(--tg-viewport-height, 100vh);
        background: var(--primary-bg);
        box-shadow:
            0 0 0 1px rgba(0,0,0,0.08),
            0 24px 64px rgba(0,0,0,0.18);
        position: relative;
        overflow-x: hidden;
    }

    html[data-theme="dark"] #app {
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.08),
            0 24px 64px rgba(0,0,0,0.55);
    }

    #page-container {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
    }

    .bottom-tabbar {

        left: max(0px, calc(50% - 215px));
        right: auto;
        width: min(430px, 100vw);
        padding-left: 12px;
        padding-right: 12px;
    }

    .tabbar-wrapper {
        max-width: none;
        margin: 0;
    }

    .page-content {
        max-width: none;
        margin: 0;
    }

    .order-detail-overlay,
    .transactions-overlay,
    .reviews-overlay,
    .modal-overlay,
    #fp-banned-overlay,
    #pk-banned-overlay {
        left: max(0px, calc(50% - 215px)) !important;
        right: auto !important;
        width: min(430px, 100vw) !important;
    }

    .theme-toggle {
        right: max(16px, calc((100vw - min(430px, 100vw)) / 2 + 16px));
        left: auto;
    }

    .modal,
    .modal-overlay > .modal-content {
        max-width: none;
    }

    .app-splash {
        left: max(0px, calc(50% - 215px));
        right: auto;
        width: min(430px, 100vw);
    }
}

@media (min-width: 768px) {
    .tabbar-wrapper {
        max-width: none;
        margin: 0;
    }

    .page-content {
        max-width: none;
        margin: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownIn {

    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    z-index: 4000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-overlay.closing {
    animation: fadeOut 0.15s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.modal,
.modal-overlay > .modal-content {
    width: 100%;
    max-height: 90vh;
    background: var(--secondary-bg);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(var(--safe-area-bottom) + 20px);
    transform: translateY(100%);
    animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow-y: auto;
    will-change: transform;
    box-sizing: border-box;
}

.modal-overlay.closing .modal,
.modal-overlay.closing > .modal-content {
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@media (min-width: 560px) {
    .modal-overlay {
        align-items: center;
        padding: 24px;
    }
    .modal,
    .modal-overlay > .modal-content {
        max-width: 480px;
        width: 100%;
        max-height: calc(100vh - 48px);
        border-radius: 24px;
        animation: modalScaleIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        transform: scale(0.96);
    }
    @keyframes modalScaleIn {
        from { opacity: 0; transform: scale(0.96) translateY(8px); }
        to   { opacity: 1; transform: scale(1)    translateY(0); }
    }
}

.modal > .modal-content {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFade 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards;
    will-change: transform, opacity;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-close,
.btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--overlay-1);
    border: 1.5px solid var(--overlay-2);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.modal-close:hover,
.btn-close:hover {
    background: var(--overlay-2);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.modal-close:active,
.btn-close:active {
    transform: scale(0.95);
}

.modal-close svg,
.btn-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--card-bg);
    border-radius: var(--radius-medium);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.order-card:active {
    transform: scale(0.98);
    border-color: var(--accent-blue);
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-tag {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-wait_payment {
    background: rgba(255, 159, 10, 0.2);
    color: var(--color-warning);
}

.status-paid {
    background: rgba(10, 132, 255, 0.2);
    color: var(--accent-blue);
}

.status-completed {
    background: rgba(48, 209, 88, 0.2);
    color: #30D158;
}

.status-cancelled {
    background: rgba(255, 69, 58, 0.2);
    color: #FF453A;
}

.order-amount {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

.order-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.empty-state,
.loading,
.error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

@keyframes skel-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skeleton-line,
.skeleton-block {
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(255,255,255,.04) 0%,
        rgba(255,255,255,.10) 40%,
        rgba(255,255,255,.04) 80%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s linear infinite;
}
.skeleton-line { height: 14px; margin: 6px 0; }
.skeleton-block { width: 100%; }
.skeleton-h-44 { height: 44px; }
.skeleton-h-72 { height: 72px; }
.skeleton-w-30 { width: 30%; }
.skeleton-w-50 { width: 50%; }
.skeleton-w-70 { width: 70%; }
.skeleton-card {

    background: var(--card-bg);
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 12px;
}
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.skeleton-circle-40 {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(90deg,
        rgba(255,255,255,.04) 0%,
        rgba(255,255,255,.10) 40%,
        rgba(255,255,255,.04) 80%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s linear infinite;
    flex-shrink: 0;
}

.wallet-section {
    margin-bottom: 24px;
}

.wallet-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.requisite-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.requisite-item:last-of-type {
    border-bottom: none;
}

.requisite-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.requisite-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.modal-body {
    padding-top: 4px;
}

.btn-block { width: 100%; }
.btn-sm    { padding: 8px 16px; font-size: 14px; min-height: 36px; }
.form-text {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.modal-actions,
.modal-footer {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.modal-actions > .btn,
.modal-footer  > .btn {
    flex: 1;
}

.form {
    width: 100%;
}

.form-step {
    animation: fadeIn 0.3s ease;
}

.form-step.hidden {
    display: none;
}

.form-step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    text-align: center;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    transition: opacity 0.2s ease;
}

.back-btn:hover {
    opacity: 0.7;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--overlay-1);
    border: 2px solid var(--overlay-2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.choice-btn:hover {
    background: var(--overlay-2);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.choice-btn svg {
    width: 24px;
    height: 24px;
}

.currency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.currency-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--overlay-1);
    border: 2px solid var(--overlay-2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-btn:hover {
    background: var(--overlay-2);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
    line-height: 1.3;
}

.form-input,
.form-select,
.form-textarea,
.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 16px;
    padding-right: 60px;
    background: var(--secondary-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

.form-input::placeholder,
.form-control::placeholder,
input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.input-currency {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.info-box {
    padding: 16px;
    background: rgba(10, 132, 255, 0.1);
    border-left: 4px solid var(--accent-blue);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.info-box.warning {
    background: rgba(255, 159, 10, 0.1);
    border-left-color: var(--color-warning);
}

.info-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.order-summary {
    background: var(--overlay-1);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--overlay-2);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span:first-child {
    color: var(--text-secondary);
}

.summary-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.order-details {
    color: var(--text-primary);
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--overlay-2);
}

.order-tag {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--overlay-1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value.highlight {
    color: var(--accent-blue);
    font-weight: 600;
}

.detail-description {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.detail-requisites {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--overlay-1);
    padding: 16px;
    border-radius: var(--border-radius);
}

.requisite-label {
    color: var(--text-secondary);
    font-size: 12px;
}

.requisite-value {
    color: var(--text-primary);
    font-size: 14px;
    font-family: monospace;
    word-break: break-all;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.notification {
    position: fixed;

    top: calc(env(safe-area-inset-top, 0px) + var(--content-safe-top, 60px) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    text-align: center;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification-success {
    border-left: 4px solid var(--color-success);
}

.notification-error {
    border-left: 4px solid var(--color-danger);
}

.notification-warning {
    border-left: 4px solid var(--color-warning);
}

.notification-info {
    border-left: 4px solid var(--accent-blue);
}

#ton-wallet-container {
    width: 100%;
}

.connected-wallet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--secondary-bg);
    border-radius: 10px;
    gap: 12px;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    width: 100%;
}

.wallet-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--color-ton), var(--color-ton-dark));
    border-radius: 50%;
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.wallet-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.wallet-address {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    text-align: center;
}

.btn-disconnect {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 59, 48, 0.15);
    color: var(--color-danger);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-disconnect:hover {
    background: rgba(255, 59, 48, 0.25);
}

.btn-disconnect:active {
    transform: scale(0.96);
}

#ton-connect-button {
    width: 100% !important;
}

#ton-connect-button button {
    width: 100% !important;
    height: 44px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: #0A84FF !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#ton-connect-button button:hover {
    opacity: 0.85 !important;
}

#ton-connect-button button:active {
    transform: scale(0.96) !important;
}

.requisite-group {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.requisite-group:last-child { margin-bottom: 0; }

.requisite-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.requisite-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.requisite-value {
    font-size: 16px;
    color: var(--text-primary);
    word-break: break-all;
    font-family: monospace;
}

.requisite-value.warning {
    color: var(--color-warning);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: rgba(10, 132, 255, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: rgba(10, 132, 255, 0.25);
    transform: scale(1.1);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.info-box ol {
    margin: 10px 0;
    padding-left: 20px;
    color: var(--text-primary);
}

.info-box ol li {
    margin: 6px 0;
    font-size: 14px;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.transaction-item:active {
    transform: scale(0.98);
    opacity: 0.8;
}

.tx-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.tx-arrow {
    --tx-tint: 110, 110, 120;
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--tx-tint), 0.55);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.10),
        0 1px 2px rgba(0,0,0,0.10);
    color: #fff;
}

.tx-arrow svg {
    width: 12px;
    height: 12px;
    display: block;
}

.tx-deposit    .tx-arrow,
.tx-arrow.tx-deposit    { --tx-tint:  32,160, 80; }
.tx-withdrawal .tx-arrow,
.tx-arrow.tx-withdrawal { --tx-tint: 200, 40, 40; }
.tx-deal-in    .tx-arrow,
.tx-arrow.tx-deal-in    { --tx-tint:  30,110,210; }
.tx-deal-out   .tx-arrow,
.tx-arrow.tx-deal-out   { --tx-tint: 220,140, 40; }

.tx-details {
    flex: 1;
    min-width: 0;
}

.tx-type {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tx-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.tx-hash {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-partner {
    font-size: 12px;
    color: var(--accent-blue);
    margin-top: 2px;
}

.tx-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tx-status-pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--color-warning);
}

.tx-status-completed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--color-success);
}

.tx-status-failed {
    background: rgba(255, 59, 48, 0.15);
    color: var(--color-danger);
}

.tx-amount {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.tx-amount.tx-deposit {
    color: var(--color-success);
}

.tx-amount.tx-withdrawal {
    color: var(--color-danger);
}

.tx-amount.tx-deal-in {
    color: var(--color-info);
}

.tx-amount.tx-deal-out {
    color: #FF9500;
}

.btn-back {
    width: 36px;
    height: 36px;
    background: rgba(10, 132, 255, 0.1);
    border: 1.5px solid rgba(10, 132, 255, 0.2);
    border-radius: 12px;
    padding: 0;
    margin-right: 12px;
    cursor: pointer;
    color: var(--accent-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.btn-back:hover {
    background: rgba(10, 132, 255, 0.15);
    border-color: rgba(10, 132, 255, 0.3);
    transform: translateX(-2px);
}

.btn-back:active {
    transform: translateX(-2px) scale(0.95);
}

.btn-back svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.language-modal .modal-content {
    max-width: 400px;
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    font-size: 17px;
    width: 100%;
}

.language-item:hover {
    background: rgba(44, 44, 46, 0.9);
    border-color: rgba(10, 132, 255, 0.3);
}

.language-item:active {
    transform: scale(0.98);
    background: rgba(10, 132, 255, 0.15);
}

.language-item.active {
    border-color: #0A84FF;
    background: rgba(10, 132, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.2);
}

.language-name-centered {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.language-check {
    position: absolute;
    right: 20px;
    color: #0A84FF;
}

.language-flag {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.language-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.language-icon {
    transition: transform 0.3s ease;
}

#language-btn:active .language-icon {
    transform: rotate(180deg);
}

tc-root,
[class*="ton-connect"],
[class*="tonconnect"] {
    z-index: 999999 !important;
}

tc-root > div,
[class*="ton-connect"] > div,
[class*="tonconnect"] > div {
    z-index: 999999 !important;
}

tc-root *,
[class*="ton-connect"] *,
[class*="tonconnect"] * {
    border-radius: 12px !important;
}

tc-root button,
[class*="ton-connect"] button,
[class*="tonconnect"] button {
    border-radius: 12px !important;
}

tc-root [role="dialog"],
tc-root [class*="modal"],
[class*="ton-connect"] [role="dialog"],
[class*="ton-connect"] [class*="modal"] {
    border-radius: 16px !important;
}

tc-root [class*="notification"],
tc-root [class*="toast"],
tc-root [class*="snackbar"],
tc-root [class*="alert"],
tc-root [class*="message"],
[class*="ton-connect-notification"],
[class*="tonconnect-notification"],
[class*="tc-notification"],
div[style*="position: fixed"][style*="z-index"] > div[class*="notification"],
div[style*="position: fixed"][style*="z-index"] > div[class*="toast"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.transactions-overlay,
.reviews-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-bg);
    z-index: 3000;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.transactions-overlay.active,
.reviews-overlay.active {
    opacity: 1;
    transform: translateX(0);
}

.transactions-overlay .page,
.reviews-overlay .page {
    height: 100%;
    overflow-y: auto;

    padding-top:    calc(var(--content-safe-top, 0px) + var(--safe-area-top, 0px) + 32px);
    padding-bottom: calc(var(--safe-area-bottom, 0px) + 16px);
    padding-left:   var(--safe-area-left, 0px);
    padding-right:  var(--safe-area-right, 0px);
}

.theme-toggle {
    position: fixed;
    top: calc(var(--content-safe-top, 0px) + var(--safe-area-top, 0px) + 14px);
    right: calc(var(--safe-area-right, 0px) + 14px);
    z-index: 200;
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px;
    gap: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.theme-toggle__track {
    position: relative;
    width: 60px;
    height: 28px;
    border-radius: 999px;
    background: var(--overlay-1);
}
.theme-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow:
        0 2px 6px rgba(10,132,255,0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.32s cubic-bezier(0.34, 1.34, 0.5, 1), background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle__thumb svg { width: 14px; height: 14px; color: #fff; }
.theme-toggle__sun, .theme-toggle__moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 14px;
    height: 14px;
    pointer-events: none;
}
.theme-toggle__sun  { left: 7px; }
.theme-toggle__moon { right: 7px; }

:root[data-theme="dark"] .theme-toggle__thumb {
    transform: translateX(32px);
}

.theme-toggle.hidden { display: none; }

@media (hover: none) {
    .btn-primary:hover    { background: var(--accent-blue); }

    .btn-secondary:not(.active):hover  { background: var(--btn-secondary-bg, var(--card-bg)); }
    .btn-icon:hover       { background: var(--card-bg); transform: none; }
    .modal-close:hover,
    .btn-close:hover      { background: var(--overlay-1); }
    .back-btn:hover       { background: transparent; }
    .choice-btn:hover     { background: var(--overlay-1); border-color: var(--overlay-2); }
    .currency-btn:hover   { background: var(--overlay-1); border-color: var(--overlay-2); transform: none; }
    .btn-disconnect:hover { background: var(--card-bg); }
    .order-card:hover,
    .balance-item:hover   { background: var(--card-bg); }

    .tab-button:hover     { color: inherit; }
}

button:focus,
.btn:focus,
.tab-button:focus {
    outline: none;
}
button:focus-visible,
.btn:focus-visible,
.tab-button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.seg-control {
    position: relative;
    display: flex;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 8px;
    user-select: none;
}
.seg-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: linear-gradient(180deg, #2A93FF 0%, #0A84FF 100%);
    border-radius: 11px;
    box-shadow:
        0 4px 14px rgba(10,132,255,0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.34, 0.5, 1);
    pointer-events: none;
    z-index: 0;
}
.seg-control[data-active="1"] .seg-pill {
    transform: translateX(100%);
}
.seg-btn {
    flex: 1;
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    padding: 11px 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.25s ease;
}
.seg-btn svg { transition: transform 0.3s ease; }
.seg-control[data-active="0"] .seg-btn:nth-of-type(1),
.seg-control[data-active="1"] .seg-btn:nth-of-type(2) {
    color: #fff;
}
.seg-control[data-active="0"] .seg-btn:nth-of-type(1) svg,
.seg-control[data-active="1"] .seg-btn:nth-of-type(2) svg {
    transform: scale(1.05);
}

.seg-hint {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0 4px 14px;
}

.seg-pane { animation: seg-fade 0.3s ease both; }
@keyframes seg-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.net-strip {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.net-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.net-chip:active { transform: scale(0.97); }
.net-chip.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}
.net-chip .net-name { font-size: 13px; font-weight: 700; letter-spacing: -0.1px; }
.net-chip .net-fee  { font-size: 10.5px; opacity: 0.75; }

.recip-toggle {
    display: flex;
    gap: 6px;
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
}
.recip-btn {
    flex: 1;
    padding: 9px 10px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.recip-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.recip-btn.active {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10,132,255,0.35);
}

.form-step-help {
    background: rgba(10,132,255,0.06);
    border: 1px solid rgba(10,132,255,0.18);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}
.form-step-help p { margin: 0 0 8px; }
.form-step-help p:last-child { margin-bottom: 0; }
.form-step-help b { color: var(--text-primary); }
.form-step-help code,
.form-step-help pre {
    background: var(--overlay-1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--accent-light-blue, #5DC0FF);
}
.form-step-help pre {
    display: block;
    padding: 8px 10px;
    margin: 6px 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
}

.order-detail-overlay {
    position: fixed;
    inset: 0;
    background: var(--primary-bg);
    z-index: 3500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.order-detail-overlay.active {
    opacity: 1;
    transform: translateY(0);
}
.order-detail-page {
    height: 100%;
    overflow-y: auto;

    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding-top:    calc(var(--content-safe-top, 0px) + var(--safe-area-top, 0px) + 32px);
    padding-bottom: calc(var(--safe-area-bottom, 0px) + 16px);
    padding-left:   var(--safe-area-left, 0px);
    padding-right:  var(--safe-area-right, 0px);
}

body.body-scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

#ton-connect-button {
    width: 100%;
    display: flex;
    justify-content: center;
    min-height: 48px;
}
#ton-connect-button > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#tc-widget-root,
[id^="tc-widget"] {
    z-index: 5000 !important;
}

.ton-connect-skel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    background: linear-gradient(110deg,
                                rgba(127,127,127,0.10) 30%,
                                rgba(127,127,127,0.20) 50%,
                                rgba(127,127,127,0.10) 70%);
    background-size: 200% 100%;
    animation: ton-connect-shimmer 1.4s ease-in-out infinite;
    border-radius: 12px;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}
@keyframes ton-connect-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.ton-connect-skel__bar {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: ton-connect-spin 0.9s linear infinite;
    opacity: 0.7;
}
@keyframes ton-connect-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .ton-connect-skel { animation: none; }
    .ton-connect-skel__bar { animation: none; }
}

.ton-connect-failed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    width: 100%;
}
.ton-connect-failed__msg {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}
.ton-connect-failed__retry {
    width: 100%;
}

.ton-connect-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.ton-connect-btn:disabled {
    opacity: 0.7;
    cursor: progress;
}
.ton-connect-btn .ton-connect-btn__label {
    line-height: 1;
}
.ton-connect-btn__sticker {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s ease;
}
.ton-connect-btn__sticker.is-ready {
    opacity: 1;
}
.ton-connect-btn__sticker.is-fallback {
    display: none;
}
.ton-connect-btn__sticker canvas,
.ton-connect-btn__sticker svg {
    display: block;
    width: 28px !important;
    height: 28px !important;
}

.stage-guide {
    background: var(--overlay-1);
    border-left: 3px solid var(--accent-blue);
    padding: 14px 16px !important;
    border-radius: 14px;
    margin: 14px 0;
}
[dir="rtl"] .stage-guide {
    border-left: none;
    border-right: 3px solid var(--accent-blue);
}
.stage-guide__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.stage-guide__body {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.stage-guide--paid       { border-left-color: #FF9500; }
[dir="rtl"] .stage-guide--paid       { border-right-color: #FF9500; }
.stage-guide--sent       { border-left-color: var(--accent-blue); }
.stage-guide--completed  { border-left-color: #34C759; }
[dir="rtl"] .stage-guide--completed  { border-right-color: #34C759; }
.stage-guide--cancelled  { border-left-color: #FF3B30; opacity: 0.85; }
[dir="rtl"] .stage-guide--cancelled  { border-right-color: #FF3B30; }

#order-detail-body {
    transition: opacity 0.18s ease;
}
#order-detail-body.detail-fading {
    opacity: 0;
}

.order-summary__row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}
.order-summary__amount {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.order-summary__desc {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 15px;
    word-break: break-word;
}

.kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    min-width: 0;
}
.kv:last-child { border-bottom: none; }
.kv-key {
    color: var(--text-secondary);
    font-size: 14px;

    flex: 0 0 auto;
    white-space: nowrap;
}
.kv-val {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;

    min-width: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.success-card,
.cancel-card,
.warn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-weight: 600;
    padding: 22px 20px;
}
.success-card { color: #34D399; }
.cancel-card  { color: #FF6961; }
.warn-card    { color: #F4A33D; }
.result-icon  { width: 36px; height: 36px; }

.pay-summary .kv:last-of-type { border-bottom: none; }

.quote-warning blockquote {
    background: var(--overlay-1);
    border-left: 3px solid var(--accent-blue);
    border-radius: 4px;
    padding: 10px 14px;
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 14.5px;
    line-height: 1.45;
}
.quote-warning blockquote:last-child { margin-bottom: 0; }
.kv-warn  { color: #FF6961 !important; }
.pay-total { font-size: 17px; }

.cross-pay-help {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: -4px 0 14px;
}
.cross-pay-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cross-pay-loading {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 18px 0;
}
.cross-pay-row {
    width: 100%;
    background: var(--overlay-1);
    border: 1px solid var(--overlay-2);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color .15s ease, transform .12s ease;
    font: inherit;
}
.cross-pay-row:hover { background: var(--overlay-2); }
.cross-pay-row:active { transform: scale(.985); }
.cross-pay-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}
.cross-pay-cur {
    font-weight: 700;
    font-size: 15px;
}
.cross-pay-amount {
    font-size: 14px;
}
.cross-pay-row-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}
[dir="rtl"] .cross-pay-row { text-align: right; }

.handover-confirm .modal-content,
.handover-confirm {
    max-width: 420px;
}
.handover-question {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.handover-question .result-icon {
    width: 32px;
    height: 32px;
    color: #F4A33D;
    flex: 0 0 32px;
}
.handover-question p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}
.handover-mgr {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--overlay-1);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.handover-mgr span {
    font-size: 13px;
    color: var(--text-secondary);
}
.handover-mgr code,
.handover-mgr a.handover-mgr-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', Menlo, monospace;
    text-decoration: none;
}
.handover-mgr a.handover-mgr-link:hover,
.handover-mgr a.handover-mgr-link:focus { text-decoration: underline; }
.handover-mgr a.handover-mgr-link:active { opacity: 0.7; }
.handover-warn {
    background: rgba(244, 163, 61, 0.12);
    border: 1px solid rgba(244, 163, 61, 0.32);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-primary);
}
.handover-yes {
    background: linear-gradient(135deg, #F4A33D, #E07B00);
    color: #fff !important;
}
.handover-yes:hover {
    filter: brightness(1.05);
}

.kv-you {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.9;
}

.kv-list  { display: flex; flex-direction: column; }
.kv-list .kv:last-child { border-bottom: none; }
.kv-empty {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 6px 0;
    text-align: center;
}
.kv-section-title {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.requisite-value.placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.action-stack > .btn { margin: 0; }
.action-stack > .info-card { margin: 0; }

.pay-instructions__body { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin-top: 6px; }

.order-progress-mini { margin-top: 14px; }

.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card {
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: var(--shadow-small);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
    will-change: transform;
}
.order-card:active { transform: scale(0.985); }

.order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
    min-width: 0;
}
.order-card .order-tag {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
}

.order-card .order-status {
    --pill-color: 142, 142, 147;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 5px 12px;
    border-radius: 999px;
    color: rgb(var(--pill-color));
    background: rgba(var(--pill-color), 0.18);
    box-shadow: inset 0 0 0 1px rgba(var(--pill-color), 0.32);
    white-space: nowrap;
    text-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    line-height: 1.25;
}
.order-card .order-status.status-wait_payment { --pill-color: 142, 142, 147; }
.order-card .order-status.status-paid         { --pill-color:  56, 162, 255; }
.order-card .order-status.status-sent         { --pill-color: 255, 149,   0; }
.order-card .order-status.status-completed    { --pill-color:  52, 199,  89; }
.order-card .order-status.status-cancelled    { --pill-color: 255,  75,  75; }

.order-card[data-status="cancelled"] {
    opacity: 1;
}
.order-card[data-status="cancelled"] .order-description,
.order-card[data-status="completed"] .order-description {
    opacity: 0.7;
}
.order-card[data-status="cancelled"] .order-amount {
    text-decoration: line-through;
    text-decoration-color: rgba(200,40,40,0.55);
    text-decoration-thickness: 1.5px;
}
.order-card .order-amount {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.order-card .order-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
}

.order-card .order-date {
    margin-top: 10px;
    display: flex;
    align-items: center;
}
.order-card .order-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: rgba(142, 142, 147, 0.12);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-card .order-date-chip svg {
    flex-shrink: 0;
    opacity: 0.85;
}
.order-card .order-date-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.action-buttons .btn { flex: 1; min-width: 0; }
.action-buttons .btn-secondary.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.action-buttons--orders {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
}
.action-buttons--orders .btn {
    flex: none;
    width: 100%;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 18px;
}
.btn-lottie {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease, filter 0.18s ease;
}
.btn-lottie.is-ready {
    opacity: 1;
}
.btn-lottie canvas,
.btn-lottie svg {
    display: block;
    width: 30px !important;
    height: 30px !important;
}

.action-buttons--orders .btn-secondary:not(.active) .btn-lottie.is-ready {
    filter: brightness(0);
}
.action-buttons--orders .btn-primary .btn-lottie.is-ready,
.action-buttons--orders .btn-secondary.active .btn-lottie.is-ready {
    filter: none;
}
.action-buttons--orders .btn:active .btn-lottie.is-ready {
    transform: scale(1.08);
}

#reviews-btn.btn-reviews,
.btn-reviews {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #1C1C1E !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
#reviews-btn.btn-reviews:hover,
#reviews-btn.btn-reviews:active,
.btn-reviews:hover,
.btn-reviews:active {
    background: #F7F7F8 !important;
}
:root[data-theme="dark"] #reviews-btn.btn-reviews,
:root[data-theme="dark"] .btn-reviews {
    background: #FFFFFF !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1C1C1E !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
:root[data-theme="dark"] #reviews-btn.btn-reviews:hover,
:root[data-theme="dark"] #reviews-btn.btn-reviews:active,
:root[data-theme="dark"] .btn-reviews:hover,
:root[data-theme="dark"] .btn-reviews:active {
    background: #F2F2F7 !important;
}

#reviews-btn.btn-reviews {
    position: relative;
    overflow: hidden;
}

.action-buttons--orders .btn-reviews .btn-lottie.is-ready {
    filter: brightness(0) !important;
}

.share-modal { max-width: 520px; }
.share-preview {
    background: var(--overlay-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    max-height: 280px;
    overflow-y: auto;
}
.share-preview blockquote {
    border-left: 3px solid var(--accent-blue);
    padding: 6px 12px;
    margin: 6px 0;
    background: rgba(10, 132, 255, 0.06);
    border-radius: 4px;
    color: var(--text-primary);
}

.share-preview a {
    color: var(--accent-light-blue, #5DC0FF);
    text-decoration: none;
    word-break: break-all;
}
.share-preview code {
    background: var(--overlay-1);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
}
.share-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 4px;
}

@keyframes progress-pulse-halo {
    0%, 100% { transform: scale(1);   opacity: 0.6; }
    50%      { transform: scale(1.8); opacity: 0;   }
}
@keyframes progress-shimmer {
    0%   { transform: translate(-130%); }
    100% { transform: translate(130%); }
}
@keyframes progress-reveal {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(var(--line-fill, 0)); }
}

.progress-shell {
    width: 100%;
    background: linear-gradient(var(--progress-shell-from) 0%, var(--progress-shell-to) 100%);
    border: 1px solid var(--overlay-1);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}
.progress-shell::before {
    content: "";
    position: absolute;
    top: -100px; right: -70px;
    width: 220px; height: 220px;
    background: rgba(73,223,100,0.08);
    border-radius: 50%;
    filter: blur(22px);
    pointer-events: none;
}
.progress-inner {
    box-sizing: border-box;
    background: var(--progress-inner-bg);
    border-radius: 24px;
    padding: 14px;
    position: relative;
    z-index: 1;
}
.progress-title-label {
    color: #828387;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}
.progress-subtitle {
    color: var(--progress-text);
    margin: 10px 0 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}
.progress-subtitle .ratio {
    color: #2db84d;
    text-shadow: 0 0 12px rgba(73,223,100,0.3);
}
:root[data-theme="dark"] .progress-subtitle .ratio { color: #49df64; }
.progress-secured {
    text-align: center;
    color: var(--progress-text-muted);
    margin: 14px 0 0;
    padding: 4px 0;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;
}

.progress--sm { padding: 6px 22px 2px; }

.progress-track {
    display: flex;
    align-items: flex-start;
    gap: 1px;
    width: 100%;
    margin-top: 16px;
}
.progress--sm .progress-track { margin-top: 4px; }

.progress-segment,
.progress-segment-last {
    flex: 0 0 12px;
    width: 12px;
    position: relative;
}

.progress-segment      { padding-bottom: 28px; }
.progress--sm .progress-segment { padding-bottom: 22px; }

.progress-segment-last .progress-caption,
.progress-segment:first-child .progress-caption {
    left: 6px;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
}

.progress-shell .progress-track {
    padding-inline: 8px;
    box-sizing: border-box;
}

.progress-dot {
    position: relative;
    box-sizing: border-box;
    background: #3a3a3a;
    border: 1px solid var(--overlay-1);
    border-radius: 50%;
    width: 12px; height: 12px;
    box-shadow: inset 0 1px var(--overlay-1);
}
.progress--sm .progress-dot { width: 10px; height: 10px; }
.progress-dot.done {
    background: linear-gradient(#62ee7d 0%, #49df64 100%);
    border-color: rgba(73,223,100,0.6);
    box-shadow:
        0 0 0 4px rgba(73,223,100,0.10),
        0 0 14px rgba(73,223,100,0.20);
}

.progress-dot.active {
    background: linear-gradient(#7eff96 0%, #49df64 100%);
    border-color: rgba(73,223,100,0.8);
    box-shadow:
        0 0 0 4px rgba(73,223,100,0.16),
        0 0 16px rgba(73,223,100,0.36);
}
.progress-dot.active::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(73,223,100,0.55);
    animation: progress-pulse-halo 2.2s ease-in-out infinite;
    pointer-events: none;
}

.progress-connector {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    height: 12px;
    min-width: 0;
}
.progress--sm .progress-connector { height: 10px; }

.progress-line-track {
    box-sizing: border-box;
    background: var(--overlay-1);
    border-radius: 999px;
    width: 100%;
    height: 6px;
    overflow: hidden;
    box-shadow:
        inset 0 1px var(--overlay-1),
        inset 0 -1px rgba(0,0,0,0.2);
}
.progress--sm .progress-line-track { height: 4px; }

.progress-line-fill {
    transform-origin: left center;
    width: 100%;
    height: 100%;
    transform: scaleX(var(--line-fill, 0));
    background: linear-gradient(90deg, #35d357 0%, #49df64 50%, #7bf98f 100%);
    border-radius: 999px;
    position: relative;
    box-shadow:
        0 0 16px rgba(73,223,100,0.34),
        0 0 8px  rgba(73,223,100,0.18);
}
.progress-line-fill.animated {
    animation: progress-reveal 0.9s cubic-bezier(.22,1,.36,1) both;
    animation-delay: var(--line-delay, 0s);
}
.progress-line-fill.active::after {
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    position: absolute; inset: 0;
    animation: progress-shimmer 2.4s ease-in-out infinite;
}

.progress-caption {
    z-index: 1;
    box-sizing: border-box;
    text-align: center;
    color: var(--progress-caption-text);
    pointer-events: none;
    width: max-content;

    max-width: 64px;
    margin: 0;
    padding: 2px 6px;
    font-size: 8.5px;
    font-weight: 700;

    letter-spacing: -0.005em;
    line-height: 1.2;
    position: absolute;
    top: 20px; left: 6px;
    transform: translateX(-50%);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    background: var(--progress-caption-bg);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);

    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.10),
        0 1px 3px rgba(0,0,0,0.14);
}

.progress-segment .progress-dot.done ~ .progress-caption,
.progress-segment-last .progress-dot.done ~ .progress-caption {
    background: rgba(73,223,100,0.70);
}
.progress-segment .progress-dot.active ~ .progress-caption,
.progress-segment-last .progress-dot.active ~ .progress-caption {
    background: rgba(73,223,100,0.70);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.16),
        0 0 12px rgba(73,223,100,0.35),
        0 1px 2px rgba(0,0,0,0.10);
}
.progress--sm .progress-caption {

    top: 16px;
}
.progress-segment .progress-dot.active ~ .progress-caption,
.progress-segment .progress-dot.done   ~ .progress-caption,
.progress-segment-last .progress-dot.active ~ .progress-caption,
.progress-segment-last .progress-dot.done   ~ .progress-caption {
    color: rgba(255,255,255,0.92);
}

.currency-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;

    padding: 6px 8px 12px 16px;
    margin: 4px 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;

    mask-image: linear-gradient(to right,
                                rgba(0,0,0,1) 0,
                                rgba(0,0,0,1) calc(100% - 24px),
                                rgba(0,0,0,0.0) 100%);
    -webkit-mask-image: linear-gradient(to right,
                                rgba(0,0,0,1) 0,
                                rgba(0,0,0,1) calc(100% - 24px),
                                rgba(0,0,0,0.0) 100%);
}
.currency-strip::-webkit-scrollbar { display: none; }

.currency-strip .cur-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    user-select: none;
}
.currency-strip .cur-chip .cur-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
}
.currency-strip .cur-chip:active { transform: scale(0.97); }
.currency-strip .cur-chip.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.safety-warning-overlay { z-index: 4900; }

.safety-warning {

    padding: 20px 18px calc(var(--safe-area-bottom) + 18px) !important;

    box-sizing: border-box;
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;

    touch-action: pan-y;
}
.safety-warning-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--overlay-1);

    min-width: 0;
    max-width: 100%;

}
.safety-warning-pulse {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 50%;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ff5252 0%, #d23030 100%);

    box-shadow:
        0 0 0 3px rgba(255, 82, 82, 0.20),
        0 0 14px rgba(255, 82, 82, 0.30);
    animation: safetyPulseGlow 2.2s ease-in-out infinite;
}
@keyframes safetyPulseGlow {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(255, 82, 82, 0.18),
            0 0 12px rgba(255, 82, 82, 0.28);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(255, 82, 82, 0.42),
            0 0 18px rgba(255, 82, 82, 0.55);
    }
}
@media (prefers-reduced-motion: reduce) {
    .safety-warning-pulse { animation: none; }
}
.safety-warning-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.2;

    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}
.safety-warning-body {
    max-height: 56vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;

    padding-right: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.55;
    -webkit-overflow-scrolling: touch;

    overflow-wrap: break-word;
    word-wrap: break-word;

    max-width: 100%;
    box-sizing: border-box;

    touch-action: pan-y;
}

.safety-warning-body pre,
.safety-warning-body code {
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: pre-wrap;
    max-width: 100%;
}
.safety-warning-body p { margin: 0 0 10px; }
.safety-warning-body .safety-headline {
    font-weight: 700;
    color: #ff5252;
    font-size: 14px;
    letter-spacing: 0.02em;
}
.safety-warning-body .safety-callout {
    background: rgba(255, 82, 82, 0.10);
    border-left: 3px solid #ff5252;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px 0 14px;
    font-weight: 600;
}
[dir="rtl"] .safety-warning-body .safety-callout {
    border-left: none;
    border-right: 3px solid #ff5252;
}
.safety-warning-body .safety-section-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 14px;
}
.safety-warning-body ul.safety-list {
    list-style: none;
    margin: 6px 0 12px;
    padding: 0;
}
.safety-warning-body ul.safety-list li {

    display: block;
    position: relative;
    padding: 8px 10px 8px 36px;
    margin-bottom: 6px;
    background: var(--overlay-1);
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
}
[dir="rtl"] .safety-warning-body ul.safety-list li {
    padding: 8px 36px 8px 10px;
    text-align: right;
}

.safety-warning-body ul.safety-list li > .mat-icon {
    position: absolute;
    left: 10px;
    top: 10px;
}
[dir="rtl"] .safety-warning-body ul.safety-list li > .mat-icon {
    left: auto;
    right: 10px;
}
.safety-warning-body ul.safety-list .ok    { color: #49df64; flex: 0 0 18px; }
.safety-warning-body ul.safety-list .bad   { color: #ff5252; flex: 0 0 18px; }
.safety-warning-body ul.safety-list .warn  { color: #ffcc33; flex: 0 0 18px; }

.mat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.22em;
    flex: 0 0 1.15em;
    line-height: 1;
}
.mat-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mat-icon--crisis { color: #ff5252; }
.mat-icon--warn   { color: #ffcc33; }
.mat-icon--shield { color: #49df64; }
.mat-icon--check  { color: #49df64; }
.mat-icon--cancel { color: #ff5252; }
.mat-icon--money  { color: #ffcc33; }
.mat-icon--lock   { color: var(--accent-blue); }

.safety-warning-body .safety-headline .mat-icon { width: 1.3em; height: 1.3em; flex: 0 0 1.3em; }
.safety-warning-body .safety-callout  .mat-icon { width: 1.25em; height: 1.25em; flex: 0 0 1.25em; }
.safety-warning-body .safety-section-title .mat-icon { width: 1.2em; height: 1.2em; flex: 0 0 1.2em; }
.safety-warning-body ul.safety-list li .mat-icon { width: 1.2em; height: 1.2em; flex: 0 0 1.2em; }
.safety-warning-body .safety-footer .mat-icon { width: 1.2em; height: 1.2em; flex: 0 0 1.2em; }
@media (prefers-reduced-motion: reduce) {
    .mat-icon { animation: none !important; }
}
.safety-warning-body ul.safety-list--punish li {
    background: rgba(255, 82, 82, 0.08);
    border: 1px solid rgba(255, 82, 82, 0.18);
}

.safety-warning-confirm {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 15px 18px;
    border: 1px solid rgba(255, 82, 82, 0.35);
    border-radius: 14px;
    background: rgba(255, 82, 82, 0.08);
    color: rgba(255, 82, 82, 0.78);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: not-allowed;
    font-variant-numeric: tabular-nums;
    transition:
        background 0.20s ease,
        color      0.20s ease,
        border     0.20s ease,
        transform  0.10s ease;
}
.safety-warning-confirm:disabled {
    cursor: not-allowed;
    opacity: 0.82;
}

.safety-warning-confirm--ready {
    cursor: pointer;
    background: linear-gradient(135deg, #ff5252 0%, #d23030 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow:
        0 8px 22px rgba(255, 82, 82, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    animation: safetyReadyIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.safety-warning-confirm--ready:active {
    transform: scale(0.985);
    box-shadow:
        0 4px 12px rgba(255, 82, 82, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@keyframes safetyReadyIn {
    0%   { opacity: 0.7; transform: translateY(4px); }
    100% { opacity: 1;   transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .safety-warning-confirm--ready { animation: none; }
}
.safety-warning-body .safety-mgr,
.safety-warning-body a.safety-mgr {
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(10, 132, 255, 0.10);
    padding: 1px 6px;
    border-radius: 6px;
    text-decoration: none;

    white-space: nowrap;
}
.safety-warning-body a.safety-mgr:active {
    background: rgba(10, 132, 255, 0.20);
}

.tg-user-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    word-break: keep-all;
}
.tg-user-link:hover,
.tg-user-link:focus { text-decoration: underline; }
.tg-user-link:active { opacity: 0.75; }
.safety-warning-body .safety-footer {
    margin-top: 14px;
    padding: 10px 12px;
    background: var(--overlay-1);
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

.safety-warning-confirm {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    border: none;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #b03030 0%, #7a1f1f 100%);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: not-allowed;
    opacity: 0.62;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.12s ease;
}
.safety-warning-confirm:not([disabled]):hover { opacity: 1; }
.safety-warning-confirm--ready {
    background: linear-gradient(135deg, #ff5252 0%, #d23030 100%);
    box-shadow:
        0 6px 18px rgba(255, 82, 82, 0.32),
        inset 0 1px 0 rgba(255,255,255,0.18);
    cursor: pointer;
    opacity: 1 !important;
}
.safety-warning-confirm--ready:active { transform: scale(0.985); }

@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .progress-dot.active::before,
    .progress-line-fill.active::after,
    .safety-warning-pulse,
    .safety-warning-pulse svg,
    .balance-skeleton,
    .tab-indicator {
        animation: none !important;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

[dir="rtl"] body,
[dir="rtl"] .page,
[dir="rtl"] .modal-content {
    text-align: right;
}
[dir="rtl"] .kv {
    flex-direction: row-reverse;
}
[dir="rtl"] .kv-key,
[dir="rtl"] .kv-val {
    text-align: start;
}
[dir="rtl"] .tab-button {

}
[dir="rtl"] .back-btn svg,
[dir="rtl"] .btn-back svg {
    transform: scaleX(-1);
}
[dir="rtl"] .modal-actions {
    flex-direction: row-reverse;
}
[dir="rtl"] .cross-pay-row { text-align: right; }
[dir="rtl"] .cross-pay-row-head,
[dir="rtl"] .cross-pay-row-meta {
    flex-direction: row-reverse;
}
[dir="rtl"] .handover-question {
    flex-direction: row-reverse;
}
[dir="rtl"] .handover-mgr {
    flex-direction: row-reverse;
}

[dir="rtl"] .progress-caption {
    unicode-bidi: plaintext;
}

.handover-mgr {
    flex-wrap: wrap;
    min-width: 0;
}
.handover-mgr code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.mi {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
}

.owner-card .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0 4px;
}
.owner-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.08);
}
.owner-stat__val {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.owner-stat__key {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    text-align: center;
}
.owner-balance-preview {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.08);
}
.ob-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.ob-chip {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.owner-card__actions {
    gap: 8px;
}

.owner-action {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    text-align: left !important;
    padding: 12px 16px !important;
}
.owner-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(10,132,255,0.12);
    color: var(--accent-blue);
    flex-shrink: 0;
}
.owner-action.btn-primary .owner-action__icon {
    background: rgba(255,255,255,0.20);
    color: #fff;
}

.owner-modal .modal-content {
    max-width: 480px;
    width: 100%;
}
.owner-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.owner-modal .btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.owner-section-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.owner-loading,
.owner-empty {
    padding: 24px 12px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.owner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-small);
    flex-wrap: wrap;
}
.owner-row__info {
    min-width: 0;
    flex: 1 1 60%;
}
.owner-row__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.owner-row__title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}
.owner-row__title--num {
    font-variant-numeric: tabular-nums;
}
.owner-row__sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.owner-row__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.owner-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: var(--btn-secondary-bg, var(--card-bg));
    border: 1px solid var(--btn-secondary-border, var(--border-color));
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.owner-action-btn:hover  { background: var(--btn-secondary-bg-hover, var(--overlay-1)); }
.owner-action-btn:active { transform: scale(0.97); }
.owner-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.owner-action-btn--danger {
    color: var(--color-danger);
    border-color: rgba(255,59,48,0.30);
}
.owner-action-btn--danger:hover {
    background: rgba(255,59,48,0.08);
    border-color: rgba(255,59,48,0.45);
}

.owner-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}
.owner-badge--active {
    background: var(--color-success);
    color: #fff;
}

.owner-target {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--overlay-1);
    border-radius: 12px;
}
.owner-target__btn {
    flex: 1 1 0;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1.25;
}
.owner-target__btn.active {
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: var(--shadow-small);
}

.owner-target__label {
    font-size: 13px;
    font-weight: 600;
}

.owner-target__count {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--overlay-2);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 18px;
    text-align: center;
}
.owner-target__btn.active .owner-target__count {
    background: rgba(10,132,255,0.15);
    color: var(--accent-blue);
}

.owner-target__total {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--overlay-1);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.owner-target__total .mi { color: var(--accent-blue); }
.owner-target__total [data-bc-total] {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.owner-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.45;
}
.owner-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.owner-result {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}
.owner-result--ok {
    background: rgba(52,199,89,0.10);
    border: 1px solid rgba(52,199,89,0.30);
}
.owner-result--error {
    background: rgba(255,59,48,0.10);
    border: 1px solid rgba(255,59,48,0.30);
    color: var(--color-danger);
    font-weight: 700;
}
.owner-result__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--color-success);
    margin-bottom: 4px;
}
.owner-result__stats {
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.owner-result__stats b {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-right: 2px;
}
.owner-result__sep { opacity: 0.5; }

[dir="rtl"] .tx-reason-block {

    border-left:  none !important;
    border-right: 3px solid #dc2626 !important;

    padding: 8px 12px 8px 10px !important;
}
[dir="rtl"] .tx-icon-wrapper {

    margin-right: 0;
    margin-left: 12px;
}
[dir="rtl"] .tx-cancel-btn {

    margin-left: 0 !important;
    margin-right: 8px !important;
}
[dir="rtl"] .tx-status {

    margin-left: 0 !important;
    margin-right: 6px !important;
}
[dir="rtl"] .seg-control,
[dir="rtl"] .recip-toggle,
[dir="rtl"] .currency-strip,
[dir="rtl"] .net-chip-strip {

    flex-direction: row-reverse;
}
[dir="rtl"] .net-chip,
[dir="rtl"] .cur-chip,
[dir="rtl"] .seg-pill,
[dir="rtl"] .recip-btn {

    text-align: right;
}
[dir="rtl"] .balance-callout {

    flex-direction: row-reverse;
}
[dir="rtl"] .language-item {

    flex-direction: row-reverse;
    text-align: right;
}
[dir="rtl"] .connected-wallet,
[dir="rtl"] .wallet-info {

    flex-direction: row-reverse;
}
[dir="rtl"] .info-card .copy-btn,
[dir="rtl"] .info-card .btn-icon {

    margin-inline-start: 0;
    margin-inline-end: 8px;
}
[dir="rtl"] .order-tag,
[dir="rtl"] .order-status,
[dir="rtl"] .order-header {

    text-align: right;
}
[dir="rtl"] .modal-actions {

    flex-direction: row-reverse;
}
[dir="rtl"] .stat-card,
[dir="rtl"] .stat-label,
[dir="rtl"] .stat-value {
    text-align: right;
}
[dir="rtl"] .tx-amount {

    direction: ltr;
    text-align: left;
}

.reviews-overlay .page.reviews-page {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 !important;
    position: relative;
}

.reviews-frame {
    display: block;
    width: 100%;
    min-height: 100%;
    height: 100%;
    border: 0;
    background: var(--primary-bg);
    vertical-align: top;
}

:root[data-theme="dark"] .reviews-frame {
    background: #000;
}

#page-container {
    will-change: auto;
}

.tab-lottie {
    min-width: 28px;
    min-height: 28px;
}
.deals-banner__img {
    content-visibility: auto;
}

*,
*::before,
*::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.bottom-tabbar .tabbar-wrapper {
    background: var(--tabbar-bg) !important;
}
.deals-banner__caption,
.deals-banner__dot,
.modal-overlay,
.glass,
[class*="glass"] {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.leaders-page {
    --leaders-page-bg:    var(--primary-bg);
    --leaders-pill-bg:    var(--card-bg);
    --leaders-pill-text:  var(--text-primary);
    --leaders-pill-muted: var(--text-secondary);
    --leaders-separator:  var(--border-color);

    --leaders-showcase-bg: linear-gradient(180deg, #0c0c14 0%, #1a1a26 100%);
    --leaders-showcase-text: #fff;
    --leaders-showcase-muted: rgba(255,255,255,0.55);
    background: var(--leaders-page-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

.leaders-page .page-header {
    background: transparent;
    padding-bottom: 0;
}

.leaders-page .page-title {
    color: var(--text-primary);
}

.leaders-page .page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 6px 0 0;
    line-height: 1.4;
}

.leaders-stage {
    position: relative;
    width: 100%;
    margin: 16px 0 24px;
    padding: 36px 12px 22px;
    background: var(--leaders-showcase-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    isolation: isolate;
}

.leaders-stage__halo {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(45% 55% at 50% 38%,
            rgba(255,200,80,0.22), transparent 70%),
        radial-gradient(80% 70% at 50% 100%,
            rgba(60,80,160,0.18), transparent 65%);
    opacity: 0;
    animation: leadersHaloIn 0.6s ease-out forwards;
}

@keyframes leadersHaloIn {
    to { opacity: 1; }
}

.leaders-stage__floor {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 14px;
    height: 12px;
    z-index: 0;
    background: radial-gradient(50% 100% at 50% 0%,
        rgba(0,0,0,0.50), transparent 70%);
    filter: blur(6px);
    pointer-events: none;
}

.leaders-stage__sparkles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.leaders-stage__sparkles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    opacity: 0;
    animation: leadersSparkle 3.2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.leaders-stage__sparkles span:nth-child(1) { top: 18%; left: 12%; animation-delay: 1.2s; }

.leaders-stage__sparkles span:nth-child(2) { top: 28%; left: 78%; animation-delay: 1.9s; }

.leaders-stage__sparkles span:nth-child(3) { top: 12%; left: 56%; animation-delay: 2.4s; width: 3px; height: 3px; }

.leaders-stage__sparkles span:nth-child(4) { top: 42%; left: 30%; animation-delay: 2.8s; width: 3px; height: 3px; }

.leaders-stage__sparkles span:nth-child(5) { top: 22%; left: 90%; animation-delay: 3.1s; width: 5px; height: 5px; }

.leaders-stage__sparkles span:nth-child(6) { top: 36%; left: 6%;  animation-delay: 3.6s; }

@keyframes leadersSparkle {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    50%      { opacity: 1; transform: scale(1.2); }
}

.leaders-stage__slots {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    min-height: 280px;
}

.leaders-slot {
    flex: 1 1 0;
    max-width: 36%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.leaders-slot--1st { order: 2; }

.leaders-slot--2nd { order: 1; }

.leaders-slot--3rd { order: 3; }

.leaders-slot__avatar {
    width: 72%;
    aspect-ratio: 1 / 1;
    max-width: 76px;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(255,255,255,0.14);
    box-shadow: 0 8px 22px rgba(0,0,0,0.45),
                inset 0 0 0 2px rgba(255,255,255,0.22);
    position: relative;
    z-index: 3;
    margin-bottom: 6px;
    opacity: 0;
    transform: translateY(8px) scale(0.6);
    animation: leadersAvatarPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.leaders-slot--1st .leaders-slot__avatar {
    width: 78%;
    max-width: 92px;
    animation-delay: 1.10s;
}

.leaders-slot--2nd .leaders-slot__avatar { animation-delay: 0.95s; }

.leaders-slot--3rd .leaders-slot__avatar { animation-delay: 0.80s; }

@keyframes leadersAvatarPop {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.leaders-slot__avatar img,
.leaders-slot__avatar .leaders-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.leaders-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    border-radius: 50%;
}

.leaders-slot__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 4px;
    position: relative;
    z-index: 4;
    max-width: 100%;
    min-width: 0;
    text-align: center;
}

.leaders-slot__medal-wrap {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

.leaders-medal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    animation: leadersMedalBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.leaders-slot--1st .leaders-medal-wrapper { animation-delay: 1.25s; }

.leaders-slot--2nd .leaders-medal-wrapper { animation-delay: 1.10s; }

.leaders-slot--3rd .leaders-medal-wrapper { animation-delay: 0.95s; }

@keyframes leadersMedalBounce {
    0%   { opacity: 0; transform: scale(0); }
    60%  { opacity: 1; transform: scale(1.4); }
    100% { opacity: 1; transform: scale(1); }
}

.leaders_first-place-medal span,
.leaders_second-place-medal span,
.leaders_third-place-medal span {
    font-style: italic;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 99px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    letter-spacing: -0.02em;
    -webkit-text-stroke: 0;
}

.leaders_first-place-medal span {
    color: #5a3a00;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.85) 0%, transparent 45%),
        conic-gradient(from 215deg at 50% 50%,
            #fff5c2 0deg,
            #ffd84a 60deg,
            #ffb300 120deg,
            #c98300 180deg,
            #ffb300 240deg,
            #ffd84a 300deg,
            #fff5c2 360deg);
    border: 1.5px solid #ffc940;
    box-shadow:
        inset 0 -3px 6px rgba(120,60,0,0.55),
        inset 0 2px 3px rgba(255,255,255,0.55),
        0 0 14px rgba(255,180,30,0.55),
        0 4px 10px rgba(0,0,0,0.45);
    text-shadow: 0 1px 0 rgba(255,240,180,0.65);
}

.leaders_first-place-medal span::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255,255,255,0.65) 48%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,255,255,0.65) 52%,
        transparent 70%);
    transform: translateX(-130%);
    animation: medalShineGold 3s ease-in-out 1.4s infinite;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

.leaders_second-place-medal span {
    color: #2a2a30;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95) 0%, transparent 50%),
        conic-gradient(from 215deg at 50% 50%,
            #ffffff 0deg,
            #e0e4ec 60deg,
            #b4bbc8 120deg,
            #7e8694 180deg,
            #b4bbc8 240deg,
            #e0e4ec 300deg,
            #ffffff 360deg);
    border: 1.5px solid #d8dde6;
    box-shadow:
        inset 0 -3px 6px rgba(60,70,90,0.50),
        inset 0 2px 3px rgba(255,255,255,0.75),
        0 0 12px rgba(200,210,225,0.50),
        0 4px 10px rgba(0,0,0,0.40);
    text-shadow: 0 1px 0 rgba(255,255,255,0.70);
}

.leaders_second-place-medal span::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255,255,255,0.55) 48%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,255,255,0.55) 52%,
        transparent 70%);
    transform: translateX(-130%);
    animation: medalShineSilver 3.4s ease-in-out 1.8s infinite;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

.leaders_third-place-medal span {
    color: #4a1f00;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,220,180,0.85) 0%, transparent 45%),
        conic-gradient(from 215deg at 50% 50%,
            #ffd0a0 0deg,
            #e89055 60deg,
            #c46818 120deg,
            #7a3a00 180deg,
            #c46818 240deg,
            #e89055 300deg,
            #ffd0a0 360deg);
    border: 1.5px solid #d47730;
    box-shadow:
        inset 0 -3px 6px rgba(70,30,0,0.60),
        inset 0 2px 3px rgba(255,220,180,0.55),
        0 0 12px rgba(196,104,24,0.55),
        0 4px 10px rgba(0,0,0,0.45);
    text-shadow: 0 1px 0 rgba(255,200,150,0.55);
}

.leaders_third-place-medal span::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255,235,200,0.55) 48%,
        rgba(255,235,200,0.85) 50%,
        rgba(255,235,200,0.55) 52%,
        transparent 70%);
    transform: translateX(-130%);
    animation: medalShineBronze 3.6s ease-in-out 2.2s infinite;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

.leaders-slot__name {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.75),
                 0 0 12px rgba(0,0,0,0.40);
    opacity: 0;
    transform: translateY(4px);
    animation: leadersNameIn 0.35s ease-out forwards;
}

.leaders-slot--1st .leaders-slot__name {
    animation-delay: 1.40s;
    font-size: 15px;
    background: linear-gradient(180deg, #fff 0%, #ffe9a8 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;

    color: #ffe9a8;
}

.leaders-slot--2nd .leaders-slot__name { animation-delay: 1.25s; }

.leaders-slot--3rd .leaders-slot__name { animation-delay: 1.10s; }

@keyframes leadersNameIn {
    to { opacity: 1; transform: translateY(0); }
}

.leaders-slot__amount {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.65);
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transform: translateY(4px);
    animation: leadersNameIn 0.35s ease-out forwards;
}

.leaders-slot--1st .leaders-slot__amount {
    animation-delay: 1.50s;
    font-size: 14px;
    font-weight: 800;
    color: #ffd45a;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75),
                 0 0 10px rgba(255,180,30,0.40);
}

.leaders-slot--2nd .leaders-slot__amount {
    animation-delay: 1.35s;
    color: #e6ebf3;
}

.leaders-slot--3rd .leaders-slot__amount {
    animation-delay: 1.20s;
    color: #ffc090;
}

.leaders-slot__block {
    width: 100%;
    max-width: 130px;
    height: var(--block-h, 80px);
    position: relative;
    transform-origin: bottom center;
    transform: scaleY(0);
    opacity: 0;
    animation: leadersBlockRise 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}

.leaders-slot--1st .leaders-slot__block { --block-h: 124px; animation-delay: 0.60s; }

.leaders-slot--2nd .leaders-slot__block { --block-h: 96px;  animation-delay: 0.35s; }

.leaders-slot--3rd .leaders-slot__block { --block-h: 74px;  animation-delay: 0.10s; }

@keyframes leadersBlockRise {
    0%   { transform: scaleY(0); opacity: 0; }
    100% { transform: scaleY(1); opacity: 1; }
}

.leaders-glass {
    --top-depth: 14px;
    --side-depth: 12px;
    position: absolute;
    inset: 0;
}

.leaders-glass__face {
    position: absolute;
    top: var(--top-depth);
    left: 0;
    right: var(--side-depth);
    bottom: 0;
    -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
    background:
        linear-gradient(180deg,
            rgba(255,255,255,0.22) 0%,
            rgba(255,255,255,0.10) 38%,
            rgba(255,255,255,0.04) 100%);
    border: 1px solid rgba(255,255,255,0.22);
    border-top-color: rgba(255,255,255,0.42);
    border-radius: 6px 6px 3px 3px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.30),
        inset 0 -8px 16px rgba(0,0,0,0.22),
        inset 6px 0 12px rgba(255,255,255,0.05);
    overflow: hidden;
}

.leaders-glass__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        transparent 35%,
        rgba(255,255,255,0.10) 48%,
        rgba(255,255,255,0.20) 50%,
        rgba(255,255,255,0.10) 52%,
        transparent 65%);
    pointer-events: none;
}

.leaders-glass__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-depth);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
            backdrop-filter: blur(16px) saturate(180%);
    background: linear-gradient(135deg,
        rgba(255,255,255,0.38) 0%,
        rgba(255,255,255,0.20) 60%,
        rgba(255,255,255,0.10) 100%);
    clip-path: polygon(
        0 100%,
        calc(100% - var(--side-depth)) 100%,
        100% 0,
        var(--side-depth) 0
    );
    border-top: 1px solid rgba(255,255,255,0.42);
}

.leaders-glass__side {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--side-depth);
    bottom: 0;
    -webkit-backdrop-filter: blur(10px) saturate(140%);
            backdrop-filter: blur(10px) saturate(140%);
    background: linear-gradient(90deg,
        rgba(0,0,0,0.30) 0%,
        rgba(0,0,0,0.55) 100%);
    clip-path: polygon(
        0 var(--top-depth),
        100% 0,
        100% 100%,
        0 100%
    );
}

.leaders-slot--1st .leaders-glass__face {
    background:
        linear-gradient(180deg,
            rgba(255,215,90,0.32) 0%,
            rgba(255,175,40,0.18) 45%,
            rgba(120,75,15,0.10) 100%);
    border-color: rgba(255,225,140,0.45);
    border-top-color: rgba(255,240,180,0.65);
    box-shadow:
        inset 0 1px 0 rgba(255,240,180,0.55),
        inset 0 -8px 16px rgba(80,40,0,0.30),
        inset 6px 0 12px rgba(255,210,100,0.10);
}

.leaders-slot--1st .leaders-glass__top {
    background: linear-gradient(135deg,
        rgba(255,235,160,0.55) 0%,
        rgba(255,200,80,0.30) 60%,
        rgba(200,140,40,0.15) 100%);
    border-top-color: rgba(255,240,180,0.70);
}

.leaders-slot--1st .leaders-glass__side {
    background: linear-gradient(90deg,
        rgba(80,40,0,0.40) 0%,
        rgba(40,20,0,0.65) 100%);
}

.leaders-slot--2nd .leaders-glass__face {
    background:
        linear-gradient(180deg,
            rgba(230,235,245,0.30) 0%,
            rgba(180,190,210,0.15) 45%,
            rgba(60,70,90,0.08) 100%);
    border-color: rgba(230,235,245,0.42);
    border-top-color: rgba(255,255,255,0.60);
}

.leaders-slot--2nd .leaders-glass__top {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.50) 0%,
        rgba(210,215,230,0.30) 60%,
        rgba(140,150,170,0.15) 100%);
    border-top-color: rgba(255,255,255,0.65);
}

.leaders-slot--3rd .leaders-glass__face {
    background:
        linear-gradient(180deg,
            rgba(220,140,80,0.28) 0%,
            rgba(180,100,40,0.15) 45%,
            rgba(80,40,10,0.08) 100%);
    border-color: rgba(230,160,100,0.42);
    border-top-color: rgba(255,200,150,0.60);
}

.leaders-slot--3rd .leaders-glass__top {
    background: linear-gradient(135deg,
        rgba(255,200,150,0.50) 0%,
        rgba(210,140,80,0.30) 60%,
        rgba(140,80,30,0.15) 100%);
    border-top-color: rgba(255,210,160,0.60);
}

.leaders-slot--1st .leaders-slot__avatar {
    animation: leadersAvatarPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.10s forwards,
               leadersWinnerBob 3.6s ease-in-out 2.0s infinite;
}

@keyframes leadersWinnerBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.leaders-you-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    margin: 0 0 10px;
    background: linear-gradient(135deg,
        rgba(10,132,255,0.10), rgba(10,132,255,0.04));
    border: 1px solid rgba(10,132,255,0.20);
    border-radius: var(--radius-medium);
}

.leaders-you-row__place {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    margin-right: 14px;
    min-width: 22px;
    text-align: center;
}

.leaders-you-row__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--card-bg);
}

.leaders-you-row__name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-right: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaders-you-row__metric {
    font-weight: 600;
    color: var(--accent-blue);
    font-size: 14px;
    white-space: nowrap;
}

.leaders-list {
    display: flex;
    flex-direction: column;
    padding: 0 2px;
    padding-bottom: 50px;
}

.leaders-list__separator {
    width: 100%;
    height: 1px;
    background: var(--leaders-separator);
    margin-bottom: 10px;
}

.leaders-row {
    display: block;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(8px);
    animation: leadersRowIn 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes leadersRowIn {
    to { opacity: 1; transform: translateY(0); }
}

.leaders-row:nth-child(1)  { animation-delay: 0.40s; }

.leaders-row:nth-child(2)  { animation-delay: 0.44s; }

.leaders-row:nth-child(3)  { animation-delay: 0.48s; }

.leaders-row:nth-child(4)  { animation-delay: 0.52s; }

.leaders-row:nth-child(5)  { animation-delay: 0.56s; }

.leaders-row:nth-child(6)  { animation-delay: 0.60s; }

.leaders-row:nth-child(7)  { animation-delay: 0.64s; }

.leaders-row:nth-child(8)  { animation-delay: 0.68s; }

.leaders-row:nth-child(9)  { animation-delay: 0.72s; }

.leaders-row:nth-child(10) { animation-delay: 0.76s; }

.leaders-row:nth-child(n+11) { animation-delay: 0.80s; }

.leaders-row__pill {
    background: var(--leaders-pill-bg);
    padding: 8px 14px;
    border-radius: 32px;
    flex: 1;
    display: grid;
    grid-template-columns: 28px 36px 1fr auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--border-color);
}

.leaders-row__place {
    font-size: 14px;
    font-weight: 700;
    color: var(--leaders-pill-muted);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.leaders-row__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--overlay-1);
}

.leaders-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.leaders-row__avatar .leaders-avatar-fallback {
    width: 36px;
    height: 36px;
    font-size: 15px;
}

.leaders-row__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.leaders-row__name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--leaders-pill-text);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaders-row__name a.tg-user-link {
    color: var(--leaders-pill-text);
    text-decoration: none;
}

.leaders-row__metric {
    font-size: 11px;
    font-weight: 500;
    color: var(--leaders-pill-muted);
    line-height: 1.2;
}

.leaders-row__amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--leaders-pill-text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.leaders-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.leaders-empty p { margin: 0; }

.leaders-page {
    --splash-bg:           linear-gradient(180deg, #eef6ff 0%, #d6e9ff 100%);
    --splash-border:       rgba(90,200,250,0.18);
    --splash-shadow:       0 24px 60px -28px rgba(20,80,160,0.20);
    --splash-text:         #0a0e1a;
    --splash-text-muted:   rgba(28,28,30,0.60);
    --splash-cap-text:     rgba(28,28,30,0.45);
    --splash-glass-bg:     rgba(255,255,255,0.78);
    --splash-glass-border: rgba(90,200,250,0.28);
    --splash-glass-shadow: 0 2px 12px rgba(20,80,160,0.10);
    --splash-halo:         radial-gradient(70% 60% at 50% 0%,
                              rgba(90,200,250,0.32), transparent 70%);
    --splash-sparkle:      #5AC8FA;

    --splash-accent:       #5AC8FA;
    --splash-accent-deep:  #2BAEEC;
    --splash-accent-soft:  #91DCFF;
    --splash-accent-pale:  #d0eaff;
}

:root[data-theme="dark"] .leaders-page {
    --splash-bg:           linear-gradient(180deg, #102246 0%, #050a18 100%);
    --splash-border:       rgba(120,200,255,0.18);
    --splash-shadow:       0 24px 60px -20px rgba(0,0,0,0.65);
    --splash-text:         #ffffff;
    --splash-text-muted:   rgba(255,255,255,0.68);
    --splash-cap-text:     rgba(255,255,255,0.48);
    --splash-glass-bg:     rgba(120,200,255,0.10);
    --splash-glass-border: rgba(120,200,255,0.25);
    --splash-glass-shadow: 0 4px 14px rgba(0,30,80,0.45);
    --splash-halo:         radial-gradient(70% 60% at 50% 0%,
                              rgba(100,210,255,0.38), transparent 70%);
    --splash-sparkle:      #91DCFF;
    --splash-accent:       #64D2FF;
    --splash-accent-deep:  #5AC8FA;
    --splash-accent-soft:  #91DCFF;
    --splash-accent-pale:  #2e4d80;
}

.leaders-splash {
    position: relative;
    margin: 16px 0 24px;
    padding: 28px 18px 22px;
    background: var(--splash-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--splash-shadow),
                inset 0 0 0 1px var(--splash-border);
    isolation: isolate;
    text-align: center;
    color: var(--splash-text);
}

.leaders-splash__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.leaders-splash__rings { display: none; }

.leaders-splash__halo {
    position: absolute;
    inset: 0;
    background: var(--splash-halo);
    opacity: 0;
    animation: leadersSplashFade 0.7s ease-out forwards;
}

@keyframes leadersSplashFade {
    to { opacity: 1; }
}

.leaders-splash__sparkles { position: absolute; inset: 0; }

.leaders-splash__sparkles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--splash-sparkle);
    box-shadow: 0 0 8px currentColor;
    color: var(--splash-sparkle);
    opacity: 0;
    animation: leadersSparkle 3.6s ease-in-out infinite;
}

.leaders-splash__sparkles span:nth-child(1) { top: 14%; left: 14%; animation-delay: 0.6s; }

.leaders-splash__sparkles span:nth-child(2) { top: 22%; right: 16%; animation-delay: 1.9s; }

.leaders-splash__sparkles span:nth-child(3) { top: 58%; left: 8%;   animation-delay: 2.4s; }

.leaders-splash__sparkles span:nth-child(4) { top: 70%; right: 10%; animation-delay: 1.2s; }

.leaders-splash__sparkles span:nth-child(n+5) { display: none; }

@keyframes leadersSparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50%      { opacity: 0.75; transform: scale(1); }
}

.leaders-splash__hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.leaders-splash__trophy {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 0 22px rgba(0,122,255,0.45))
            drop-shadow(0 6px 14px rgba(0,40,120,0.30));
    opacity: 0;
    transform: translateY(-8px);
    animation: leadersTrophyIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               leadersTrophyFloat 5s ease-in-out 0.6s infinite;
}

.leaders-splash__trophy svg { width: 100%; height: 100%; display: block; }

@keyframes leadersTrophyIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes leadersTrophyFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.leaders-splash__title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 320px;
}

.leaders-splash__title {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
    color: var(--splash-text);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.20s forwards;
}

.leaders-splash__subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--splash-text-muted);
    max-width: 300px;
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.30s forwards;
}

@keyframes leadersSplashFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.leaders-splash__cd-label {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--splash-cap-text);
    opacity: 0;
    animation: leadersSplashFadeUp 0.4s ease-out 0.40s forwards;
}

.leaders-cd {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 28px;
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.48s forwards;
}

.leaders-cd__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    max-width: 78px;
}

.leaders-cd__card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-radius: 14px;
    background: var(--splash-glass-bg);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
            backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--splash-glass-border);
    box-shadow: var(--splash-glass-shadow),
                inset 0 1px 0 rgba(255,255,255,0.08);
    overflow: hidden;
    isolation: isolate;
}

.leaders-cd__card::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 1px;
    background: var(--splash-glass-border);
    z-index: 2;
    pointer-events: none;
}

.leaders-cd__num {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;

    color: var(--splash-accent-deep);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 3;
}

.leaders-cd__num--tick { animation: leadersCdTick 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes leadersCdTick {
    0%   { opacity: 0.4; transform: translateY(-4px); }
    100% { opacity: 1;   transform: translateY(0); }
}

.leaders-cd__cap {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--splash-cap-text);
}

.leaders-prize-pool {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0 auto 16px;
    padding: 14px 28px;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(12px) saturate(160%);
            backdrop-filter: blur(12px) saturate(160%);
    box-shadow: var(--splash-glass-shadow);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.58s forwards;
}

.leaders-prize-pool__label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--splash-cap-text);
}

.leaders-prize-pool__amount {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--splash-accent-deep);
    font-variant-numeric: tabular-nums;
}

.leaders-prize-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
}

.leaders-prize-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 8px 12px;
    border-radius: 16px;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
            backdrop-filter: blur(10px) saturate(160%);
    box-shadow: var(--splash-glass-shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.leaders-prize-card:nth-child(1) { animation-delay: 0.66s; }

.leaders-prize-card:nth-child(2) { animation-delay: 0.74s; }

.leaders-prize-card:nth-child(3) { animation-delay: 0.82s; }

.leaders-prize-card__medal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 2px;
}

.leaders-prize-card__amount {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--splash-text);
}

.leaders-prize-card__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--splash-cap-text);
}

.leaders-prize-card--gold {
    border-color: var(--splash-accent-deep);
    box-shadow:
        0 4px 20px rgba(90,200,250,0.30),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.leaders-prize-card--gold .leaders-prize-card__medal {
    background: var(--splash-accent-deep);
    box-shadow: 0 0 16px rgba(90,200,250,0.55),
                inset 0 -2px 4px rgba(0,60,120,0.25);
}

.leaders-prize-card--gold .leaders-prize-card__amount { color: var(--splash-accent-deep); }

.leaders-prize-card--silver .leaders-prize-card__medal {
    background: var(--splash-accent-soft);
    box-shadow: 0 0 10px rgba(90,200,250,0.40),
                inset 0 -2px 4px rgba(0,80,160,0.25);
}

.leaders-prize-card--bronze .leaders-prize-card__medal {
    background: var(--splash-accent-pale);
    box-shadow: 0 0 8px rgba(120,170,230,0.30),
                inset 0 -2px 4px rgba(40,80,140,0.20);
}

.leaders-bonus {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(90,200,250,0.32) 0%,
        rgba(0,122,255,0.18)  55%,
        rgba(145,220,255,0.10) 100%);
    border: 1px solid var(--splash-accent);
    box-shadow:
        0 6px 22px rgba(90,200,250,0.30),
        inset 0 1px 0 rgba(255,255,255,0.20),
        inset 0 0 0 1px rgba(255,255,255,0.06);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
    overflow: hidden;
    isolation: isolate;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    animation: leadersSplashFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.86s forwards;
}

.leaders-bonus__halo {
    position: absolute;
    width: 140px;
    height: 140px;
    top: 50%;
    left: 0;
    transform: translate(-30%, -50%);
    background: radial-gradient(circle, rgba(90,200,250,0.35), transparent 65%);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
    animation: leadersBonusHalo 3.5s ease-in-out infinite;
}

@keyframes leadersBonusHalo {
    0%, 100% { opacity: 0.7; transform: translate(-30%, -50%) scale(1); }
    50%      { opacity: 1;   transform: translate(-30%, -50%) scale(1.08); }
}

.leaders-bonus__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
        transparent 35%,
        rgba(255,255,255,0.20) 48%,
        rgba(255,255,255,0.35) 50%,
        rgba(255,255,255,0.20) 52%,
        transparent 65%);
    transform: translateX(-100%);
    animation: leadersBonusShine 5s ease-in-out 2s infinite;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

@keyframes leadersBonusShine {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

.leaders-bonus__icon {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.30), transparent 60%),
        linear-gradient(135deg, var(--splash-accent), var(--splash-accent-deep));
    box-shadow:
        0 0 18px rgba(90,200,250,0.55),
        inset 0 1px 0 rgba(255,255,255,0.30),
        inset 0 -2px 4px rgba(0,60,120,0.25);
    animation: leadersBonusIconPulse 2.4s ease-in-out infinite;
}

.leaders-bonus__icon svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 1px 2px rgba(0,40,120,0.40));
}

@keyframes leadersBonusIconPulse {
    0%, 100% { transform: scale(1)   rotate(0deg); }
    50%      { transform: scale(1.06) rotate(2deg); }
}

.leaders-bonus__content {
    position: relative;
    z-index: 2;
    min-width: 0;
    flex: 1;
}

.leaders-bonus__top {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.leaders-bonus__amount {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--splash-text);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 8px rgba(90,200,250,0.30);
}

.leaders-bonus__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--splash-accent-deep);
    border-radius: 99px;
    box-shadow: 0 0 8px rgba(90,200,250,0.45);
    line-height: 1;
    white-space: nowrap;
}

.leaders-bonus__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--splash-text);
}

.leaders-bonus__body {
    margin: 0 0 6px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--splash-text-muted);
}

.leaders-bonus__cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--splash-accent-deep);
    background: rgba(255,255,255,0.65);
    border: 1px solid var(--splash-glass-border);
    border-radius: 99px;
    line-height: 1;
}

.leaders-bonus__cta svg { width: 11px; height: 11px; }

:root[data-theme="dark"] .leaders-bonus__cta {
    background: rgba(120,200,255,0.20);
    color: #fff;
}

@media (max-width: 360px) {
    .leaders-bonus { gap: 12px; padding: 14px 14px; }
    .leaders-bonus__icon { width: 48px; height: 48px; }
    .leaders-bonus__icon svg { width: 32px; height: 32px; }
    .leaders-bonus__amount { font-size: 24px; }
}

.leaders-tiers {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 10px;
}

.leaders-tier-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    box-shadow: var(--splash-glass-shadow);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.leaders-tier-row:nth-child(1) { animation-delay: 0.90s; }

.leaders-tier-row:nth-child(2) { animation-delay: 0.98s; }

.leaders-tier-row__range {
    font-size: 13px;
    font-weight: 700;
    color: var(--splash-text);
    letter-spacing: -0.01em;
    min-width: 56px;
    text-align: left;
}

.leaders-tier-row__range::before {
    content: "#";
    color: var(--splash-text-muted);
    margin-right: 1px;
    font-weight: 600;
}

.leaders-tier-row__sep {
    flex: 1;
    height: 1px;
    background: var(--splash-glass-border);
}

.leaders-tier-row__amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--splash-accent-deep);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.leaders-tier-row--random {
    background:
        linear-gradient(135deg,
            rgba(90,200,250,0.18) 0%,
            rgba(145,220,255,0.06) 100%);
    border-color: var(--splash-accent-deep);
}

.leaders-tier-row__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 8px;
    padding: 4px 10px 4px 8px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: #fff;
    background: var(--splash-accent-deep);
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(90,200,250,0.50),
                inset 0 -1px 2px rgba(0,60,120,0.30);
    line-height: 1;
    white-space: nowrap;
}

.leaders-tier-row__badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.leaders-raffle {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    text-align: left;
    background: linear-gradient(135deg,
        rgba(90,200,250,0.16) 0%,
        rgba(145,220,255,0.04) 100%);
    border: 1px dashed var(--splash-accent-deep);
    box-shadow: var(--splash-glass-shadow);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.10s forwards;
}

.leaders-raffle__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    color: var(--splash-accent-deep);

    animation: leadersRaffleShake 5s ease-in-out 2s infinite;
}

.leaders-raffle__icon svg { width: 22px; height: 22px; }

@keyframes leadersRaffleShake {
    0%, 88%, 100% { transform: rotate(0deg); }
    91% { transform: rotate(-6deg); }
    94% { transform: rotate(6deg); }
    97% { transform: rotate(-3deg); }
}

.leaders-raffle__text { min-width: 0; }

.leaders-raffle__title {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--splash-text);
    line-height: 1.3;
}

.leaders-raffle__body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--splash-text-muted);
}

.leaders-winners-note {
    position: relative;
    z-index: 1;
    margin: 6px auto 18px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--splash-text-muted);
    max-width: 280px;
    opacity: 0;
    animation: leadersSplashFadeUp 0.4s ease-out 1.06s forwards;
}

.leaders-participants {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -4px auto 18px;
    padding: 7px 14px 7px 11px;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    border-radius: 99px;
    -webkit-backdrop-filter: blur(10px) saturate(160%);
            backdrop-filter: blur(10px) saturate(160%);
    box-shadow: var(--splash-glass-shadow);
    color: var(--splash-text-muted);
    font-size: 12.5px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.38s forwards;
}

.leaders-participants__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--splash-accent-deep);
}

.leaders-participants__text {
    font-weight: 500;
    color: var(--splash-text-muted);
}

.leaders-participants__text b {
    color: var(--splash-text);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    margin: 0 1px;
}

.leaders-how {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    text-align: left;
}

.leaders-how__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--splash-text);
    text-align: center;
    opacity: 0;
    animation: leadersSplashFadeUp 0.4s ease-out 1.14s forwards;
}

.leaders-how__steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaders-how__step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--splash-glass-bg);
    border: 1px solid var(--splash-glass-border);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    box-shadow: var(--splash-glass-shadow);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.leaders-how__step:nth-child(1) { animation-delay: 1.22s; }

.leaders-how__step:nth-child(2) { animation-delay: 1.30s; }

.leaders-how__step:nth-child(3) { animation-delay: 1.38s; }

.leaders-how__num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--splash-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 10px rgba(90,200,250,0.35),
                inset 0 -2px 3px rgba(0,60,120,0.20);
    margin-top: 1px;
}

.leaders-how__text {
    min-width: 0;
}

.leaders-how__step-title {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--splash-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.leaders-how__step-body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--splash-text-muted);
}

.leaders-reminder {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 16px;
    text-align: left;

    background: linear-gradient(135deg,
        rgba(90,200,250,0.18) 0%,
        rgba(145,220,255,0.08) 100%);
    border: 1px solid var(--splash-accent-deep);
    box-shadow: 0 4px 18px rgba(90,200,250,0.18),
                inset 0 1px 0 rgba(255,255,255,0.10);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    animation: leadersSplashFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.50s forwards;
}

.leaders-reminder__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--splash-accent-deep);
    color: #fff;
    box-shadow: 0 0 14px rgba(90,200,250,0.45),
                inset 0 -2px 4px rgba(0,60,120,0.25);
}

.leaders-reminder__icon svg { width: 22px; height: 22px; }

.leaders-reminder__text {
    min-width: 0;
}

.leaders-reminder__title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--splash-text);
}

.leaders-reminder__body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--splash-text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .leaders-stage__halo,
    .leaders-stage__sparkles span,
    .leaders-slot__block,
    .leaders-slot__avatar,
    .leaders-medal-wrapper,
    .leaders-slot__name,
    .leaders-slot__amount,
    .leaders-row,
    .leaders-splash__halo,
    .leaders-splash__sparkles span,
    .leaders-splash__trophy,
    .leaders-splash__title,
    .leaders-splash__subtitle,
    .leaders-splash__cd-label,
    .leaders-cd,
    .leaders-cd__num--tick,
    .leaders-prize-pool,
    .leaders-prize-card,
    .leaders-tier-row,
    .leaders-winners-note,
    .leaders-participants,
    .leaders-how__title,
    .leaders-how__step,
    .leaders-reminder,
    .leaders-raffle,
    .leaders-raffle__icon,
    .leaders-bonus,
    .leaders-bonus__halo,
    .leaders-bonus__shine,
    .leaders-bonus__icon {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.leaders-skeleton { padding: 16px 0; }

.leaders-skel-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    padding: 60px 14px 18px;
    margin: 16px 0 24px;
    background: var(--leaders-showcase-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-medium);
    min-height: 260px;
}

.leaders-skel-col {
    flex: 1 1 0;
    max-width: 36%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.leaders-skel-circle {
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    animation: leadersSkelPulse 1.3s ease-in-out infinite;
}

.leaders-skel-circle.big   { width: 88px; height: 88px; }

.leaders-skel-circle.small { width: 68px; height: 68px; }

.leaders-skel-block {
    width: 100%;
    max-width: 130px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px 8px 4px 4px;
    animation: leadersSkelPulse 1.3s ease-in-out infinite;
}

.leaders-skel-block.tall   { height: 150px; }

.leaders-skel-block.medium { height: 110px; }

.leaders-skel-block.short  { height: 80px;  }

.leaders-skel-list { display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }

.leaders-skel-row {
    height: 56px;
    background: var(--overlay-1);
    border-radius: 32px;
    animation: leadersSkelPulse 1.3s ease-in-out infinite;
}

@keyframes leadersSkelPulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.85; }
}

[dir="rtl"] .leaders-grid,
[dir="rtl"] .leaders-row {

    text-align: right;
}
