:root {
    --bg: #0b0d11;
    --bg-elevated: #12141a;
    --sidebar: #101218;
    --card: #171a21;
    --card-hover: #1d2129;
    --border: #2a2f3a;
    --text: #f3f5f7;
    --muted: #8b919c;
    --gold: #e8c547;
    --gold-dim: #c9a227;
    --green: #3dd68c;
    --red: #f07178;
    --accent: #3d8bfd;
    --header-h: 64px;
    --sidebar-w: 248px;
    --tabbar-h: 64px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        Segoe UI,
        system-ui,
        sans-serif;
}

a {
    color: inherit;
}

body.app-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.app-shell {
    display: flex;
    height: 100%;
    min-height: 0;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100%;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 14px 16px;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 22px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--text);
}

.nav-section {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 16px 12px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #c9ced6;
    font-size: 0.92rem;
}

.nav-link svg {
    width: 16px;
    height: 16px;
    opacity: 0.85;
    flex-shrink: 0;
}

.nav-link:hover {
    background: #1a1e27;
    color: var(--text);
}

.nav-link.active {
    background: #1e2430;
    color: var(--text);
}

.nav-link.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
}

.app-body {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: var(--header-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 13, 17, 0.92);
}

.mobile-brand {
    display: none;
    margin-right: auto;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--text);
}

.topbar-user {
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar-user strong {
    color: var(--text);
    font-weight: 600;
}

.topbar-user .platform-icon {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: -2px;
    color: var(--muted);
}

.topbar-user .platform-icon svg {
    width: 15px;
    height: 15px;
}

.coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1d24;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px 6px 8px;
    font-weight: 600;
}

.coin-chip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 28px 72px 40px;
}

.settings-account {
    max-width: 420px;
    margin-bottom: 22px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.settings-nav {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 16px 4px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 420px;
}

.settings-nav-kicker {
    margin: 0 12px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.settings-nav a + .settings-nav-kicker {
    margin-top: 20px;
}

.settings-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #c9ced6;
    font-size: 0.92rem;
}

.settings-nav a:hover {
    background: #1a1e27;
    color: var(--text);
}

.settings-nav a.active {
    background: #232833;
    color: var(--text);
}

.settings-content .panel {
    margin-bottom: 0;
}

.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 16px;
}

.settings-card h2 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

.settings-card .form-control {
    margin-bottom: 8px;
}

.webhook-saved {
    margin-top: 10px;
}

.settings-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.alert-row:first-of-type {
    margin-top: 8px;
}

.alert-title {
    margin: 0 0 4px;
    font-weight: 600;
}

.alert-ping {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 16px;
    color: var(--muted);
    cursor: pointer;
}

.alert-ping.is-off {
    opacity: 0.55;
}

.daily-stats-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
}

.daily-stats-box[hidden] {
    display: none;
}

.daily-stats-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.daily-stats-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.daily-stats-time {
    width: 180px;
    color-scheme: dark;
}

.daily-stats-zone {
    color: var(--muted, #9aa0a6);
}

.switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 24px;
    margin: 0;
}

.switch-ui {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #3a3f4a;
    display: block;
    position: relative;
    transition: background 0.15s ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d7dbe3;
    transition: transform 0.15s ease;
}

.switch input:checked + .switch-ui {
    background: #3d8bfd;
}

.switch input:checked + .switch-ui::after {
    transform: translateX(20px);
    background: #fff;
}

.switch input:focus-visible + .switch-ui {
    outline: 2px solid #9ec1ff;
    outline-offset: 2px;
}

.settings-save-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(27, 30, 36, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    color: var(--text);
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.is-hiding {
    opacity: 0;
    transform: translateY(8px);
}

.app-toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.app-toast-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
}

.app-toast-body {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.app-toast-error .app-toast-icon {
    color: #f07178;
}

.app-toast-success .app-toast-icon {
    color: #8ad4a6;
}

@media (max-width: 960px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    .settings-nav {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 0 0 12px;
    }
}

.page-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 22px;
}

.page-title.market-title {
    margin-bottom: 6px;
}

.page-lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.95rem;
}

.page-title.alerts-title {
    margin-bottom: 6px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    min-height: 132px;
}

.stat-card.gold {
    background: linear-gradient(180deg, #3a3018 0%, #241c0e 100%);
    border-color: #5a4a22;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 14px;
}

.stat-card.gold .stat-label {
    color: #e8d9a8;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-value-md {
    font-size: 1.35rem;
}

.ea-session.is-connected {
    color: var(--green);
}

.ea-session.is-disconnected {
    color: var(--red);
}

.stat-value-sm {
    font-size: 1.2rem;
}

.stat-card.gold .stat-value {
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-value img {
    width: 28px;
    height: 28px;
}

.stat-meta {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}

.panel h2 {
    font-size: 1.05rem;
    margin: 0 0 16px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.form-label {
    display: block;
    color: #d5d9e0;
}

.form-control,
.form-select {
    background: #101319;
    color: var(--text);
    border: 1px solid var(--border);
}

.form-control:focus,
.form-select:focus {
    background: #101319;
    color: var(--text);
    border-color: #4b5568;
    box-shadow: none;
}

.btn-primary {
    background: #3d8bfd;
    border-color: #3d8bfd;
}

.btn-outline-primary {
    color: #9ec1ff;
    border-color: #3d4f73;
}

.btn-success {
    background: #1f8a56;
    border-color: #1f8a56;
}

.btn-outline-danger {
    color: #f07178;
    border-color: #7a3a3e;
}

.btn-outline-secondary {
    color: #d5d9e0;
    border-color: #3d4452;
    background: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    border-color: #5b6474;
    background: #1a1e27;
}

.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #1b1f27;
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: #222733;
    --bs-table-hover-color: var(--text);
    --bs-table-border-color: var(--border);
}

.table thead th {
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--border);
}

#market-rows tr.bought td {
    background: #1d3a22;
}

#player-preview-image {
    display: block;
    width: 100%;
    height: auto;
    margin: -12px 0 -16px;
}

#player-preview-image[hidden] {
    display: none;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.logout-btn:hover {
    color: var(--text);
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

.auth-card {
    max-width: 460px;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.auth-card a {
    color: #9ec1ff;
}

.alert-danger {
    background: #3a1d21;
    border-color: #7a3a3e;
    color: #f7c4c7;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.history-title {
    margin-bottom: 6px;
}

.history-lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.history-stats .stat-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-stats .stat-value img {
    width: 22px;
    height: 22px;
}

.profit-up {
    color: var(--green);
}

.profit-down {
    color: var(--red);
}

.history-panel-lead {
    margin-bottom: 16px;
}

.history-filters h2,
.history-panel h2 {
    margin-bottom: 4px;
}

.history-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.history-filter {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.history-filter-label {
    font-size: 0.85rem;
    font-weight: 650;
}

.history-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #12151b;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.history-filter-trigger svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
    transition: transform 0.15s ease;
}

.history-filter-trigger[aria-expanded='true'] svg {
    transform: rotate(180deg);
}

.history-filter-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #12151b;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.history-filter-menu[hidden] {
    display: none;
}

.history-filter-menu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    cursor: pointer;
}

.history-filter-menu li:hover,
.history-filter-menu li[aria-selected='true'] {
    background: #1d222c;
}

.history-filter-menu li[aria-selected='true']::after {
    content: '✓';
    color: var(--muted);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc((112px + 12px) * 4);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #3a4150 transparent;
}

.history-list[hidden],
.history-more[hidden] {
    display: none;
}

.history-more {
    flex-shrink: 0;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #12151b;
    color: var(--text);
    font-weight: 600;
}

.history-more:disabled {
    opacity: 0.6;
}

.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #3a4150;
    border-radius: 8px;
}

.history-row {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 112px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #121419;
}

.history-player {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.history-info {
    min-width: 0;
}

.history-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.history-tag {
    padding: 2px 9px;
    border: 1px solid #3a4150;
    border-radius: 999px;
    background: #1a1e27;
    color: #d5d9e0;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}

.history-tag.is-sold {
    border-color: #e8ebf0;
    background: #e8ebf0;
    color: #0b0d12;
}

.history-card {
    width: 60px;
    height: 84px;
    object-fit: contain;
    flex-shrink: 0;
}

.history-card-empty {
    border-radius: 8px;
    background: #12161c;
    border: 1px solid var(--border);
}

.history-name {
    font-size: 0.98rem;
    font-weight: 650;
}

.history-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid #3a4150;
    border-radius: 6px;
    background: #1a1e27;
    color: #d5d9e0;
    font-size: 0.72rem;
    font-weight: 600;
}

.history-when {
    color: var(--muted);
    font-size: 0.82rem;
}

.history-prices {
    text-align: right;
    flex-shrink: 0;
}

.history-price-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.history-price-line strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 0.95rem;
}

.history-profit.is-up {
    color: var(--green);
}

.history-profit.is-down {
    color: var(--red);
}

.history-profit.is-final {
    font-size: 1.05rem;
    font-weight: 700;
}

.history-trend::before {
    font-size: 0.9em;
}

.history-profit.is-up .history-trend::before {
    content: '↗';
}

.history-profit.is-down .history-trend::before {
    content: '↘';
}

.history-price-line img {
    width: 14px;
    height: 14px;
}

.mobile-tabbar,
.more-sheet {
    display: none;
}

@media (max-width: 960px) {
    body.app-shell {
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }
    .app-shell {
        height: 100%;
        min-height: 0;
    }
    .sidebar {
        display: none;
    }
    .app-body {
        overflow: hidden;
        min-height: 0;
    }
    .topbar {
        justify-content: flex-end;
        height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 16px 0;
        gap: 10px;
    }
    .mobile-brand {
        display: block;
    }
    .topbar-user,
    .topbar-logout {
        display: none;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .content {
        overflow-y: auto;
        padding: 16px 16px calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px));
    }
    .page-title {
        font-size: 1.55rem;
        margin-bottom: 12px;
    }
    .history-lead,
    .page-lead {
        margin-bottom: 14px;
    }
    .actions {
        flex-direction: column;
    }
    .actions .btn {
        width: 100%;
    }
    .content .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    .content .d-flex.gap-2 .form-select {
        flex: 1 1 160px;
        min-width: 0;
    }
    .history-row {
        flex-wrap: nowrap;
        align-items: center;
        min-height: 104px;
        gap: 10px;
        padding: 12px;
    }
    .history-player {
        gap: 10px;
    }
    .history-card {
        width: 50px;
        height: 70px;
    }
    .history-list {
        max-height: calc((104px + 12px) * 4);
        padding-right: 4px;
    }
    .history-filter-grid {
        gap: 8px;
    }
    .history-filter-label {
        font-size: 0.78rem;
    }
    .history-filter-trigger {
        max-width: 100%;
        padding: 6px 8px 6px 10px;
        font-size: 0.8rem;
    }
    .history-filter-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .history-filter-menu {
        min-width: 150px;
    }
    .history-filter:last-child .history-filter-menu {
        left: auto;
        right: 0;
    }
    .history-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }
    .history-prices {
        text-align: right;
        width: auto;
    }
    #market-search [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .settings-account {
        max-width: none;
    }
    .settings-save-bar {
        justify-content: stretch;
    }
    .settings-save-bar .btn,
    .settings-card-actions .btn {
        width: 100%;
    }
    .settings-card-actions {
        flex-direction: column;
    }
    .toast-stack {
        right: 12px;
        bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px));
        width: min(380px, calc(100vw - 24px));
    }
    .mobile-tabbar {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        gap: 4px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: #0e1118;
        border-top: 1px solid var(--border);
    }
    .mobile-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        padding: 6px 2px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--muted);
        font-family: inherit;
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
        line-height: 1.1;
        cursor: pointer;
    }
    .mobile-tab svg {
        width: 20px;
        height: 20px;
    }
    .mobile-tab.active {
        color: var(--text);
        background: #1c222c;
    }
    .more-sheet {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 60;
    }
    .more-sheet[hidden] {
        display: none !important;
    }
    .more-sheet-backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(0, 0, 0, 0.5);
    }
    .more-sheet-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 10%;
        display: flex;
        flex-direction: column;
        background: #101218;
        border-radius: 18px 18px 0 0;
        border-top: 1px solid var(--border);
    }
    .more-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px 8px;
        flex-shrink: 0;
    }
    .more-sheet-head h2 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 700;
    }
    .more-sheet-close {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: var(--muted);
    }
    .more-sheet-close svg {
        width: 20px;
        height: 20px;
    }
    .more-sheet-body {
        overflow-y: auto;
        padding: 4px 14px calc(20px + env(safe-area-inset-bottom, 0px));
    }
    .more-sheet-body .nav-section {
        padding: 18px 8px 8px;
    }
    .more-link {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 8px;
        border-radius: 14px;
        text-decoration: none;
        color: var(--text);
        font-size: 0.98rem;
        font-weight: 550;
    }
    .more-link.active {
        background: #1a1e27;
    }
    .more-link-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: #1a1e27;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        color: #d5d9e0;
    }
    .more-link-icon svg {
        width: 18px;
        height: 18px;
    }
    .more-logout {
        margin: 22px 8px 8px;
    }
    .more-logout .logout-btn {
        width: 100%;
        padding: 10px 12px;
    }
}

.market-v2-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.market-v2-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.market-v2-tab {
    appearance: none;
    border: 1px solid var(--border);
    background: #12151c;
    color: var(--muted);
    border-radius: 12px;
    min-height: 44px;
    font-size: 0.92rem;
    font-weight: 600;
}

.market-v2-tab.is-active {
    background: #2a303c;
    color: var(--text);
    border-color: #4b5568;
}

.market-v2-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.market-v2-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.market-v2-endpoint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: -8px 0 16px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #101319;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.market-v2-endpoint-label {
    flex-shrink: 0;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #8b919c;
}

.market-v2-endpoint code {
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #c9ced6;
}

.market-v2-input {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #101319;
    color: var(--text);
    padding: 0 14px;
}

.market-v2-input:focus {
    outline: none;
    border-color: #4b5568;
}

.market-v2-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.market-v2-player-search {
    position: relative;
}

.market-v2-player-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding-right: 14px;
    cursor: text;
}

.market-v2-player-field-face {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #1a1e27;
    flex-shrink: 0;
}

.market-v2-player-field-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0;
}

.market-v2-player-field-input:focus {
    outline: none;
}

.market-v2-player-results {
    list-style: none;
    margin: 6px 0 0;
    padding: 4px 0;
    position: absolute;
    z-index: 8;
    left: 0;
    right: 0;
    max-height: calc(56px * 5);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0c0e13;
}

.market-v2-player-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 6px 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.market-v2-player-option:hover,
.market-v2-player-option.is-active {
    background: #1a1e27;
}

.market-v2-player-face {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #1a1e27;
    flex-shrink: 0;
}

.market-v2-player-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.market-v2-player-rating {
    margin-left: auto;
    color: #d5d9e0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.market-v2-picker {
    position: relative;
}

.market-v2-picker-trigger {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 38px;
    text-align: left;
    cursor: pointer;
}

.market-v2-picker-trigger.has-value {
    padding-right: 56px;
}

.market-v2-clear {
    position: absolute;
    z-index: 4;
    top: 23px;
    right: 32px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8b919c;
    transform: translateY(-50%);
    cursor: pointer;
}

.market-v2-clear:hover {
    color: #e8eaed;
}

.market-v2-clear[hidden] {
    display: none;
}

.market-v2-player-search > .market-v2-clear {
    right: 12px;
    top: 24px;
}

.market-v2-player-field.has-value {
    padding-right: 40px;
}

.market-v2-picker-trigger > [id$="-trigger-label"] {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-v2-picker-trigger::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 12px;
    height: 18px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='18' fill='none'%3E%3Cpath d='M2 6.5 6 2.5 10 6.5' stroke='%238b919c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M2 11.5 6 15.5 10 11.5' stroke='%238b919c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat center / contain;
    pointer-events: none;
}

.market-v2-picker-trigger[aria-expanded="true"] {
    border-color: #4b5568;
}

.market-v2-picker-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.market-v2-picker-panel {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0c0e13;
}

.market-v2-picker-search {
    width: 100%;
    min-height: 38px;
    margin-bottom: 6px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #101319;
    color: var(--text);
    padding: 0 12px;
}

.market-v2-picker-search:focus {
    outline: none;
    border-color: #4b5568;
}

.market-v2-picker-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(44px * 5);
    overflow-y: auto;
}

.market-v2-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 600;
}

.market-v2-picker-option:hover,
.market-v2-picker-option.is-active {
    background: #1a1e27;
}

.market-v2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.market-v2-playstyle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #101319;
    margin: 0;
    font-weight: 600;
}

.market-v2-playstyle .switch {
    margin-left: auto;
}

.market-v2-playstyle-mark {
    width: 12px;
    height: 12px;
    background: var(--gold);
    transform: rotate(45deg);
    border-radius: 2px;
    flex-shrink: 0;
}

.market-v2-prices-title {
    margin: 6px 0 8px;
    font-weight: 700;
}

.market-v2-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.market-v2-price-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.market-v2-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-v2-stepper-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #12151c;
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1;
}

.market-v2-stepper-input {
    text-align: center;
}

.market-v2-preview {
    margin-top: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(16, 19, 25, 0.72);
    backdrop-filter: blur(10px);
}

.market-v2-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 10px;
}

.market-v2-preview-title {
    margin: 0;
    font-weight: 650;
}

.market-v2-preview-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.market-v2-preview-safe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #161b22;
}

.market-v2-preview-safe[hidden] {
    display: none;
}

.market-v2-preview-safe-copy {
    margin: 0;
    font-size: 0.88rem;
}

.market-v2-preview-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 14px;
    padding-top: 12px;
}

.market-v2-preview:not(.is-expanded) .market-v2-preview-card:nth-child(n + 13) {
    display: none;
}

.market-v2-preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.market-v2-preview-range {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 4px);
    margin: 0;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #08090c;
    color: #f3f5f7;
    font-size: 0.62rem;
    letter-spacing: -0.01em;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.market-v2-preview-range.is-empty {
    color: var(--muted);
    font-weight: 500;
}

.market-v2-preview-range.is-empty:empty {
    display: none;
}

.market-v2-preview-art {
    position: relative;
    aspect-ratio: 3 / 4;
}

.market-v2-preview-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.market-v2-preview-badge {
    display: none;
    position: absolute;
    top: 6px;
    right: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.market-v2-preview-card.is-too-expensive img {
    filter: brightness(0.42) saturate(0.6);
}

.market-v2-preview-card.is-too-expensive .market-v2-preview-badge {
    display: inline-block;
}

.market-v2-preview-card.is-too-expensive .market-v2-preview-range {
    color: #8a909c;
}

.market-v2-preview-card.is-too-expensive .market-v2-preview-meta {
    opacity: 0.7;
}

.market-v2-preview-price.is-missing {
    color: var(--muted);
    font-weight: 500;
}

.market-v2-preview-more {
    display: block;
    width: 100%;
    margin-top: 12px;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 650;
}

.market-v2-preview-more[hidden] {
    display: none;
}

.market-v2-futbin {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.market-v2-futbin[hidden] {
    display: none;
}

.market-v2-futbin-title {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.market-v2-futbin-price {
    margin: 4px 0 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.market-v2-futbin-band,
.market-v2-futbin-updated {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.market-v2-preview-meta {
    margin: auto 0 0;
    padding-top: 8px;
    min-height: 3.2em;
    font-size: 0.78rem;
}

.market-v2-preview-price-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.market-v2-preview-price {
    margin: 0;
    min-width: 0;
    font-weight: 650;
}

.market-v2-preview-safe-line {
    margin: 2px 0 0;
    color: #7ddea0;
    font-size: 0.75rem;
}

.market-v2-preview-mom {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
    padding: 2px 7px 2px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.market-v2-preview-mom.is-up,
.market-v2-preview-mom.is-down {
    display: inline-flex;
}

.market-v2-preview-mom.is-up {
    color: #062414;
    background: #3ee07a;
}

.market-v2-preview-mom.is-down {
    color: #2a0b0b;
    background: #f07171;
}

.market-v2-preview-mom-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.market-v2-preview-mom.is-up .market-v2-preview-mom-arrow {
    border-bottom: 5px solid currentColor;
}

.market-v2-preview-mom.is-down .market-v2-preview-mom-arrow {
    border-top: 5px solid currentColor;
}

.market-v2-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.market-v2-btn-snipe {
    background: var(--gold);
    color: #14110a;
    border-color: var(--gold);
}

.market-v2-btn-snipe:hover:not(:disabled) {
    background: var(--gold-dim);
}

.market-v2-btn-snipe:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.market-v2-btn {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-weight: 650;
}

.market-v2-btn-reset {
    background: #12151c;
    color: var(--text);
}

.market-v2-btn-search {
    background: #3a3f4a;
    color: #c9ced6;
    border-color: #3a3f4a;
}

.market-v2-btn-search:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.market-v2-config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.market-v2-btn-save,
.market-v2-btn-import {
    width: 100%;
    background: #12151c;
    color: var(--text);
}

.market-v2-btn-save:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--muted);
}

.market-v2-import-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.market-v2-import-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #2a2f3a;
    border-radius: 12px;
    background: #12141a;
    color: var(--text);
    padding: 12px 14px;
    cursor: pointer;
}

.market-v2-import-item:hover {
    background: #1a1e27;
}

.market-v2-import-item strong {
    display: block;
}

.market-v2-import-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.market-v2-save-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 40vh;
    overflow: auto;
}

.market-v2-save-name {
    display: block;
    margin-top: 14px;
    color: #d5d9e0;
    font-size: 0.88rem;
}

.market-v2-save-name .form-control {
    margin-top: 6px;
}

.market-v2-save-error {
    margin: 10px 0 0;
    color: #f07178;
    font-size: 0.86rem;
}

.market-v2-save-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.market-v2-save-actions .market-v2-buy-dismiss {
    margin-top: 0;
    background: #232833;
    color: #eceff4;
}

.market-v2-save-submit {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: #eceff4;
    color: #12141a;
    font-weight: 700;
    cursor: pointer;
}

.saved-configs-card {
    background: #12141a;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.saved-configs-head {
    margin-bottom: 16px;
}

.saved-configs-title {
    margin: 0;
    font-size: 1.05rem;
}

.saved-configs-count {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.saved-configs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #232833;
    border-radius: 14px;
    background: #16181e;
}

.saved-config-name {
    margin: 0 0 4px;
    font-weight: 700;
}

.saved-config-summary,
.saved-config-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.saved-config-meta {
    margin-top: 6px;
    font-size: 0.78rem;
}

.saved-config-url {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-all;
}

.saved-config-url span {
    flex-shrink: 0;
    color: #8fd4a8;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.saved-config-url a {
    color: #9ec1ff;
    text-decoration: none;
}

.saved-config-url a:hover {
    text-decoration: underline;
}

.saved-config-actions {
    margin: 0;
}

.saved-config-delete {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #1a1e27;
    color: #c9ced6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.saved-config-delete svg {
    width: 18px;
    height: 18px;
}

.saved-config-delete:hover {
    color: #f07178;
    border-color: #7a3a3e;
}

@media (max-width: 720px) {
    .saved-config-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.market-v2-results {
    margin-top: 22px;
}

.market-v2-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.market-v2-results-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
}

.market-v2-results-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.market-v2-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-v2-listing {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 16px 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #12151c;
}

.market-v2-listing-card {
    width: 72px;
    height: 100px;
    object-fit: contain;
}

.market-v2-listing-body {
    min-width: 0;
}

.market-v2-listing-name {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
}

.market-v2-listing-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.market-v2-listing-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 10px;
}

.market-v2-listing-stat {
    display: flex;
    flex-direction: column;
    min-width: 36px;
}

.market-v2-listing-stat-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.market-v2-listing-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
}

.market-v2-listing-buy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.market-v2-listing-price-label {
    color: var(--muted);
    font-size: 0.78rem;
}

.market-v2-listing-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    font-weight: 700;
}

.market-v2-listing-price img {
    width: 16px;
    height: 16px;
}

.market-v2-listing-expires {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.market-v2-listing-buynow {
    min-height: 36px;
    padding: 6px 16px;
    border: 0;
    border-radius: 10px;
    background: #1f8a56;
    color: #f3f5f7;
    font-weight: 650;
    cursor: pointer;
}

.market-v2-listing-buynow:disabled {
    background: #2f3540;
    color: #8b919c;
    cursor: default;
}

.market-v2-buy-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 8, 12, 0.72);
}

.market-v2-buy-modal {
    width: min(440px, 100%);
    background: #16181e;
    border: 1px solid #2a2f3a;
    border-radius: 18px;
    padding: 20px 20px 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.market-v2-buy-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.market-v2-buy-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.12rem;
    font-weight: 750;
}

.market-v2-buy-modal-title.is-ok {
    color: #3dd68c;
}

.market-v2-buy-modal-title.is-bad {
    color: #f07178;
}

.market-v2-buy-modal-sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.market-v2-buy-modal-close {
    appearance: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa3b2;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.market-v2-buy-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid #2a2f3a;
    border-radius: 14px;
    background: #12141a;
}

.market-v2-buy-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
}

.market-v2-buy-card-name {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
}

.market-v2-buy-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.market-v2-buy-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #232833;
    color: #c5cbd6;
    font-size: 0.75rem;
    font-weight: 650;
}

.market-v2-buy-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px;
}

.market-v2-buy-stat {
    display: flex;
    gap: 6px;
    font-size: 0.82rem;
}

.market-v2-buy-stat span {
    color: var(--muted);
    font-weight: 700;
    min-width: 2.2em;
}

.market-v2-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #2a2f3a;
    border-radius: 12px;
    background: #12141a;
    font-size: 0.92rem;
}

.market-v2-buy-row strong {
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-v2-buy-row img {
    width: 16px;
    height: 16px;
}

.market-v2-buy-note {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
}

.market-v2-buy-note.is-ok {
    background: #132033;
    color: #7eb6ff;
}

.market-v2-buy-note.is-warn {
    background: #2a2416;
    color: #e8c547;
}

.market-v2-buy-note.is-bad {
    background: #2a1518;
    color: #f07178;
}

.market-v2-buy-note strong {
    display: block;
    margin-bottom: 4px;
}

.market-v2-buy-dismiss {
    width: 100%;
    margin-top: 14px;
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: #eceff4;
    color: #12141a;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 720px) {
    .market-v2-listing {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .market-v2-listing-card {
        width: 56px;
        height: 78px;
    }

    .market-v2-listing-buy {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 960px) {
    .market-v2-grid,
    .market-v2-price-row,
    .market-v2-actions,
    .market-v2-tabs {
        grid-template-columns: 1fr;
    }

    .market-v2-preview-cards {
        grid-template-columns: 1fr 1fr;
    }

    .market-v2-preview-range {
        padding: 3px 7px;
        font-size: 0.56rem;
        letter-spacing: -0.02em;
    }

    .market-v2-preview:not(.is-expanded) .market-v2-preview-card:nth-child(n + 5) {
        display: none;
    }
}

#admin-logs .page-title span {
    font-weight: 550;
    color: #9aa3b2;
}

.admin-req-card {
    background: #12141a;
    border: 1px solid #232833;
    border-radius: 14px;
    overflow: hidden;
}

.admin-req-empty {
    margin: 0;
    padding: 8px 20px 20px;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-req-scroll {
    max-height: calc(100vh - 250px);
    overflow: auto;
}

.admin-req-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: #e8ebf0;
    font-size: 0.9rem;
}

.admin-req-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #161922;
    color: #8b93a2;
    font-weight: 500;
    font-size: 0.84rem;
    text-align: left;
    padding: 10px 16px;
    border: 0;
    border-bottom: 1px solid #232833;
    white-space: nowrap;
}

.admin-req-table tbody td {
    padding: 11px 16px;
    border: 0;
    border-bottom: 1px solid #1c2028;
    background: #101218;
    vertical-align: middle;
    white-space: nowrap;
    color: #d7dce5;
}

.admin-req-table tbody tr:nth-child(even) td {
    background: #0e1016;
}

.admin-req-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-req-table th:nth-child(n + 4),
.admin-req-table td:nth-child(n + 4) {
    font-variant-numeric: tabular-nums;
}

.admin-req-table th:nth-child(3),
.admin-req-table td:nth-child(3),
.admin-req-table th:nth-child(7),
.admin-req-table td:nth-child(7) {
    text-align: center;
}

.admin-req-user {
    color: #c5cbd6;
}

.admin-req-total {
    color: #f3f5f7;
    font-weight: 500;
}

.admin-log-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 24px;
    padding: 0 12px;
    border: 1px solid #3a4150;
    border-radius: 999px;
    background: #1a1e27;
    color: #e8ebf0;
    font-size: 0.78rem;
    line-height: 1;
    cursor: help;
}

.admin-log-wait {
    color: #5ea4ff;
}

.admin-log-recv {
    color: #3dd68c;
}

.admin-log-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid #3a4150;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1;
}

.admin-log-status.is-ok {
    color: #3dd68c;
    border-color: #2f8f5b;
}

.admin-log-status.is-bad {
    color: #f07178;
    border-color: #8a3a40;
}

.admin-err-table th:nth-child(5),
.admin-err-table td:nth-child(5) {
    text-align: center;
}

.admin-err-table td.admin-err-desc {
    min-width: 280px;
    white-space: normal;
    font-variant-numeric: normal;
    color: #c5cbd6;
    line-height: 1.4;
}

.admin-log-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 24px;
    padding: 0 10px;
    border: 1.5px solid #3a4150;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.admin-log-pill.is-ok {
    color: #3dd68c;
    border-color: #2f8f5b;
}

.admin-log-pill.is-bad {
    color: #f07178;
    border-color: #8a3a40;
}

.admin-log-none {
    color: #6b7280;
}

.admin-softban-table td {
    white-space: nowrap;
}

.admin-softban-remove {
    padding: 5px 12px;
    border: 1px solid #8a3a40;
    border-radius: 8px;
    background: transparent;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-softban-remove:hover:not(:disabled) {
    background: rgba(240, 113, 120, 0.12);
}

.admin-softban-remove:disabled {
    opacity: 0.6;
}

.admin-softban-remove.is-neutral {
    border-color: var(--line, #2c313a);
    color: var(--text, #e5e7eb);
}

.admin-softban-remove.is-neutral:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
}

.admin-log-pill.is-warn {
    color: #f5c451;
    border-color: #8a6d2a;
}

.admin-settings-card {
    max-width: 720px;
    padding: 18px 20px;
}

.admin-settings-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--green, #3fb950);
}

.admin-settings-status.is-error {
    color: var(--red);
}

.admin-syslog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.admin-syslog-toolbar > label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.8rem;
}

.admin-syslog-toolbar #admin-syslog-file {
    min-width: 260px;
}

.admin-syslog-search {
    flex: 1 1 200px;
}

.admin-syslog-toolbar > .admin-syslog-follow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
    color: var(--text, #e5e7eb);
    font-size: 0.86rem;
}

.admin-syslog-buttons {
    display: flex;
    gap: 8px;
    padding-bottom: 2px;
}

.admin-syslog-buttons a {
    text-decoration: none;
}

.admin-syslog-view {
    height: calc(100vh - 290px);
    min-height: 280px;
    overflow: auto;
    padding: 10px 0;
    background: #0b0d12;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}

.admin-syslog-line {
    display: flex;
    gap: 10px;
    padding: 1px 16px;
    color: #c5cbd6;
}

.admin-syslog-line:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-syslog-time {
    flex: none;
    color: #6b7280;
}

.admin-syslog-level {
    flex: none;
    width: 42px;
    font-weight: 650;
    color: #5ea4ff;
}

.admin-syslog-line.is-warn .admin-syslog-level {
    color: #f5c451;
}

.admin-syslog-line.is-error .admin-syslog-level,
.admin-syslog-line.is-error .admin-syslog-body {
    color: #f07178;
}

.admin-syslog-body {
    min-width: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-syslog-none {
    margin: 0;
    padding: 10px 16px;
    color: var(--muted);
}

.admin-update-unavailable {
    margin: 0 0 14px;
    color: #f5c451;
    font-size: 0.88rem;
}

.admin-update-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.admin-update-card {
    padding: 16px 20px;
}

.admin-update-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-update-commit {
    margin: 0 0 14px;
    color: #e8ebf0;
    font-variant-numeric: tabular-nums;
}

.admin-update-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-update-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.admin-update-hint:empty {
    display: none;
}

.admin-update-commits {
    margin: 8px 0 0;
    padding-left: 18px;
    max-height: 220px;
    overflow: auto;
    color: #d7dce5;
    font-size: 0.86rem;
}

.admin-update-commits small {
    color: var(--muted);
}

.admin-update-status {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d7dce5;
    font-size: 0.9rem;
}

.admin-update-warnings {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #f5c451;
    font-size: 0.86rem;
}

.admin-update-log {
    max-height: 360px;
    margin: 14px 0 0;
    padding: 12px 14px;
    overflow: auto;
    border: 1px solid #232833;
    border-radius: 10px;
    background: #0b0d12;
    color: #c5cbd6;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.admin-schedule-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--line, #2c313a);
    border-radius: 12px;
}

.admin-schedule-form > label {
    display: grid;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--muted, #9ca3af);
}

.admin-schedule-form > label .form-control,
.admin-schedule-form > label .form-select {
    min-width: 150px;
}

.admin-schedule-days {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0.85rem;
}

.admin-schedule-days legend {
    width: 100%;
    margin: 0 0 4px;
    font-size: 0.8rem;
    color: var(--muted, #9ca3af);
}

.admin-schedule-submit {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-schedule-error {
    color: var(--red);
    font-size: 0.85rem;
}

.admin-schedule-table td {
    white-space: nowrap;
}

.admin-schedule-actions {
    display: flex;
    gap: 8px;
}

.softban-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 12px 28px;
    border-bottom: 1px solid #7a1f24;
    background: #4a0d10;
    color: #fff;
}

.softban-banner[hidden] {
    display: none;
}

.softban-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.softban-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: #ffb4b8;
}

.softban-title {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
}

.softban-lead {
    color: #f3d2d4;
    font-size: 0.82rem;
}

.softban-why {
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-weight: 600;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
}

.softban-why-text {
    max-width: 640px;
    margin: 6px 0 0;
    color: #f3d2d4;
    font-size: 0.8rem;
    line-height: 1.45;
}

.softban-side {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 16px;
}

.softban-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.softban-timer-label {
    color: #f3d2d4;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.softban-countdown {
    font-size: 1.45rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.softban-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.softban-check svg {
    width: 14px;
    height: 14px;
}

.softban-check:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.market-v2-softban-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #7a1f24;
    border-radius: 10px;
    background: rgba(240, 113, 120, 0.1);
    color: var(--red);
    font-size: 0.88rem;
}

.market-v2-softban-alert[hidden] {
    display: none;
}

.market-v2-softban-alert svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

@media (max-width: 720px) {
    .softban-banner {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .softban-side {
        width: 100%;
        justify-content: space-between;
    }
    .softban-timer {
        align-items: flex-start;
    }
    .softban-countdown {
        font-size: 1.2rem;
    }
}

/* Sniper */
.snipe-btn-primary,
.snipe-btn-secondary,
.snipe-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.snipe-btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #14110a;
}

.snipe-btn-primary:hover:not(:disabled) {
    background: var(--gold-dim);
    color: #14110a;
}

.snipe-btn-secondary {
    background: #12151c;
    color: var(--text);
}

.snipe-btn-secondary:hover:not(:disabled) {
    background: var(--card-hover);
}

.snipe-btn-danger {
    background: transparent;
    border-color: #8a3a40;
    color: var(--red);
}

.snipe-btn-danger:hover:not(:disabled) {
    background: rgba(240, 113, 120, 0.12);
}

.snipe-btn-primary:disabled,
.snipe-btn-secondary:disabled,
.snipe-btn-danger:disabled {
    opacity: 0.5;
}

.snipe-modal {
    width: min(680px, 100%);
    max-height: calc(100vh - 48px);
    padding: 26px 30px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #3a4150 transparent;
}

.snipe-modal::-webkit-scrollbar {
    width: 10px;
}

.snipe-modal::-webkit-scrollbar-track {
    margin: 16px 0;
    background: transparent;
}

.snipe-modal::-webkit-scrollbar-thumb {
    background: #3a4150;
    border: 3px solid transparent;
    border-radius: 10px;
    background-clip: padding-box;
}

.snipe-modal::-webkit-scrollbar-thumb:hover {
    background-color: #4b5466;
}

.snipe-form {
    display: grid;
    gap: 24px;
}

.snipe-form-section {
    display: grid;
    gap: 14px;
}

.snipe-form-heading {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.snipe-rate {
    display: grid;
    gap: 6px;
}

.snipe-rate-head {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.snipe-rate input[type='range'] {
    width: 100%;
    accent-color: var(--rate-color, var(--gold));
}

.snipe-rate-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.snipe-rate-scale .is-r0 { color: #22c55e; }
.snipe-rate-scale .is-r1 { color: #eab308; }
.snipe-rate-scale .is-r2 { color: #f97316; }
.snipe-rate-scale .is-r3 { color: #ef4444; }
.snipe-rate-scale .is-r4 { color: #dc2626; }

.snipe-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.snipe-hint.is-warn {
    color: var(--red);
}

.snipe-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.snipe-toggle-title {
    margin: 0;
    font-weight: 600;
}

.snipe-sub,
.snipe-schedule {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #12151c;
}

.snipe-sub[hidden],
.snipe-schedule[hidden],
.snipe-sub [hidden] {
    display: none;
}

.snipe-field {
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.snipe-segment {
    display: inline-flex;
    width: fit-content;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.snipe-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.snipe-segment span {
    display: block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
}

.snipe-segment input:checked + span {
    background: var(--card-hover);
    color: var(--text);
}

.snipe-segment input:focus-visible + span {
    outline: 2px solid var(--accent);
}

.snipe-range {
    display: grid;
    grid-template-columns: 1fr 150px auto 150px;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

.snipe-num {
    display: flex;
    align-items: stretch;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0e1117;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.snipe-num:focus-within {
    border-color: var(--gold);
}

.snipe-num-btn {
    width: 36px;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.snipe-num-btn:hover {
    background: var(--card-hover);
    color: var(--text);
}

.snipe-num-btn:active {
    background: #2a2f3a;
}

.snipe-num input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 4px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.snipe-num input:focus {
    outline: none;
}

.snipe-num input::-webkit-outer-spin-button,
.snipe-num input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.snipe-range-dash {
    text-align: center;
}

.snipe-error {
    margin: 0;
    color: var(--red);
    font-size: 0.9rem;
}

.snipe-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.snipe-btn-cancel {
    margin-right: auto;
}

.snipe-view {
    display: grid;
    gap: 18px;
}

.snipe-view[hidden] {
    display: none;
}

.snipe-modal .market-v2-buy-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.snipe-title-icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.snipe-schedule-view {
    gap: 14px;
}

.snipe-schedule-heading {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

.snipe-schedule-heading-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.snipe-schedule-heading-icon svg {
    width: 16px;
    height: 16px;
}

.snipe-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.snipe-quick-btn {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #12151c;
    color: var(--text);
    font-weight: 650;
}

.snipe-quick-btn:hover {
    background: var(--card-hover);
}

.snipe-quick-btn.is-active {
    border-color: #3b82f6;
    color: #8bb8ff;
}

.snipe-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 0;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.snipe-divider::before,
.snipe-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.snipe-schedule-field {
    display: grid;
    gap: 8px;
}

.snipe-schedule-field input {
    color-scheme: dark;
}

.snipe-schedule-summary {
    padding: 12px 14px;
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #5b9cff;
}

.snipe-schedule-summary p {
    margin: 0;
}

.snipe-schedule-summary strong {
    font-weight: 700;
}

.snipe-schedule-rel {
    margin-top: 4px !important;
    font-size: 0.8rem;
}

.snipe-schedule-summary.is-invalid {
    border-color: rgba(240, 113, 120, 0.45);
    background: rgba(240, 113, 120, 0.08);
    color: var(--red);
}

.snipe-schedule-note {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #12151c;
    font-size: 0.8rem;
    color: var(--muted);
}

.snipe-schedule-note strong {
    color: var(--text);
}

.snipe-schedule-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.snipe-schedule-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-weight: 650;
}

.snipe-btn-light {
    background: #e8e8e8;
    border-color: #e8e8e8 !important;
    color: #14110a;
}

.snipe-btn-light:hover:not(:disabled) {
    background: #fff;
}

.snipe-btn-light:disabled {
    opacity: 0.5;
}

.market-locked-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: 520px;
    margin: 32px auto;
    padding: 32px 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    text-align: center;
}

.market-locked-card svg {
    width: 40px;
    height: 40px;
    color: var(--gold);
}

.market-locked-card h2 {
    margin: 0;
    font-size: 1.2rem;
}

.market-locked-card p {
    margin: 0 0 8px;
    color: var(--muted);
}

.sniping-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 18px;
}

.sniping-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.sniping-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5160;
}

.sniping-dot.is-live {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.18);
}

.sniping-dot.is-paused {
    background: var(--gold);
}

.sniping-dot[hidden],
.sniping-loading[hidden] {
    display: none;
}

.sniping-loading {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--muted);
    animation: tl-spin 0.9s linear infinite;
}

.snipe-widget-loading {
    display: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--muted);
    animation: tl-spin 0.9s linear infinite;
}

.snipe-widget.is-loading .snipe-widget-loading {
    display: inline-block;
}

.snipe-widget.is-loading .snipe-widget-dot {
    display: none;
}

.sniping-duration {
    margin: 0;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.sniping-controls {
    display: flex;
    gap: 10px;
}

.sniping-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--muted);
}

.sniping-banner[hidden] {
    display: none;
}

.sniping-banner.is-scheduled {
    border-color: #8a6d2a;
    color: var(--text);
}

.sniping-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.sniping-stat {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
}

.sniping-stat p {
    margin: 0;
}

.sniping-stat-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.sniping-stat-value {
    margin: 4px 0 !important;
    font-size: 1.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sniping-stat-value.is-up {
    color: var(--green);
}

.sniping-stat-value.is-down {
    color: var(--red);
}

.sniping-stat-sub {
    font-size: 0.8rem;
    color: var(--muted);
}

.sniping-stat-sub.is-excellent,
.sniping-stat-sub.is-good {
    color: var(--green);
}

.sniping-stat-sub.is-slow {
    color: var(--gold);
}

.sniping-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.sniping-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
}

.sniping-panel.is-activity {
    display: flex;
    flex-direction: column;
}

.sniping-panel.is-activity .sniping-activity {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

@media (min-width: 901px) {
    /* Activity takes the height of the Filters box and scrolls the rest. */
    .sniping-panel.is-activity {
        contain: size;
        min-height: 240px;
    }
    .sniping-panel.is-activity .sniping-activity {
        max-height: none;
    }
}

.sniping-lead {
    margin-bottom: 4px;
}

.sniping > .sniping-panel + .sniping-panel {
    margin-top: 16px;
}

.sniping-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sniping-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.sniping-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.sniping-link {
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 0.85rem;
}

.sniping-filters,
.sniping-activity,
.sniping-attempts {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sniping-filter {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    opacity: 0.7;
}

.sniping-filter.is-on {
    border-color: #2f8f5b;
    opacity: 1;
}

.sniping-filter-card,
.sniping-attempt-card {
    width: 44px;
    height: 56px;
    object-fit: contain;
}

.sniping-filter-card.is-blank,
.sniping-attempt-card.is-blank {
    border-radius: 8px;
    background: #12151c;
}

.sniping-filter-body,
.sniping-attempt-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sniping-filter-body strong,
.sniping-filter-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sniping-filter-summary,
.sniping-filter-stats,
.sniping-attempt-body span,
.sniping-attempt-side span {
    font-size: 0.8rem;
    color: var(--muted);
}

.sniping-filter-delete {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 1.2rem;
}

.sniping-filter-delete:hover {
    background: rgba(240, 113, 120, 0.12);
    color: var(--red);
}

.sniping-filter.is-static {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 6px 10px;
}

.sniping-scheduled {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent 60%), var(--card);
}

.sniping-scheduled[hidden] {
    display: none;
}

.sniping-scheduled-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sniping-scheduled-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.sniping-scheduled-title svg {
    width: 20px;
    height: 20px;
    color: #5b9cff;
}

.sniping-scheduled-sub {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.sniping-scheduled-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
}

.sniping-scheduled-close:hover {
    background: rgba(240, 113, 120, 0.12);
    color: var(--red);
}

.sniping-scheduled-when {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sniping-scheduled-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sniping-scheduled-date svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.sniping-scheduled-pill {
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
}

.sniping-scheduled-config {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #12151c;
}

.sniping-scheduled-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.sniping-scheduled-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sniping-scheduled-setting {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #12151c;
}

.sniping-scheduled-setting span {
    font-size: 0.78rem;
    color: var(--muted);
}

.sniping-scheduled-setting strong {
    font-size: 0.85rem;
}

.sniping-scheduled-cancel {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #12151c;
    color: var(--text);
    font-weight: 650;
}

.sniping-scheduled-cancel:hover {
    border-color: #8a3a40;
    background: rgba(240, 113, 120, 0.12);
    color: var(--red);
}

.sniping-filter-maxb {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.sniping-filter-maxb-label {
    margin-right: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sniping-filter-maxb-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #12151c;
    color: inherit;
    line-height: 1;
}

.sniping-filter-maxb-btn:hover {
    border-color: #3a4255;
}

.sniping-filter-maxb-input {
    width: 96px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #12151c;
    color: inherit;
    font-size: 0.85rem;
    text-align: center;
}

.market-v2-preview-safe-note {
    margin-left: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sniping-event {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.sniping-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4b5160;
}

.sniping-event.is-up .sniping-event-dot {
    background: var(--green);
}

.sniping-event.is-down .sniping-event-dot {
    background: var(--red);
}

.sniping-event.is-warn .sniping-event-dot {
    background: var(--gold);
}

.sniping-event-time {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.sniping-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sniping-tabs button {
    padding: 5px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 0.85rem;
}

.sniping-tabs button.is-active {
    background: var(--card-hover);
    color: var(--text);
}

.sniping-console {
    --console-line: 26px;
    max-height: calc(var(--console-line) * 10 + 16px);
    overflow-y: auto;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #07080b;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
}

.sniping-console-empty {
    margin: 0;
    line-height: var(--console-line);
    color: var(--muted);
}

.sniping-console-state {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--red);
}

.sniping-console-line summary {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--console-line);
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.sniping-console-line summary::-webkit-details-marker {
    display: none;
}

.sniping-console-line summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sniping-console-time,
.sniping-console-ms {
    color: var(--muted);
}

.sniping-console-method {
    color: var(--accent);
    font-weight: 700;
}

.sniping-console-line.is-wait .sniping-console-status,
.sniping-console-line.is-wait .sniping-console-ms,
.sniping-console-line.is-wait .sniping-console-count {
    color: var(--muted);
}

.sniping-console-line.is-ok .sniping-console-status {
    color: var(--green);
}

.sniping-console-line.is-bad .sniping-console-status {
    color: var(--red);
}

.sniping-console-count {
    min-width: 64px;
    color: var(--text);
}

.sniping-console-count.is-buy {
    color: var(--gold);
    font-weight: 700;
}

.sniping-console-url {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #b8bec9;
}

.sniping-console-line pre {
    max-height: 320px;
    margin: 0 0 8px;
    padding: 8px;
    overflow: auto;
    border-radius: 6px;
    background: #12151c;
    color: #d6dae1;
    white-space: pre;
}

.sniping-console-label {
    margin: 6px 0 4px;
    color: var(--muted);
}

.sniping-attempt {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-left: 3px solid var(--border);
    border-radius: 8px;
    background: #12151c;
}

.sniping-attempt.is-up {
    border-left-color: var(--green);
}

.sniping-attempt.is-down {
    border-left-color: var(--red);
}

.sniping-attempt-side {
    display: grid;
    justify-items: end;
    gap: 2px;
}

@media (max-width: 900px) {
    .sniping-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sniping-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .snipe-modal {
        padding: 20px 18px 18px;
    }
    .snipe-range {
        grid-template-columns: 1fr auto 1fr;
    }
    .snipe-range > span:first-child,
    .snipe-range > span[data-mode-for] {
        grid-column: 1 / -1;
    }
    .snipe-actions {
        flex-wrap: wrap;
    }
    .snipe-actions button {
        flex: 1;
    }
    .sniping-controls {
        width: 100%;
    }
    .sniping-controls button {
        flex: 1;
    }
}

.snipe-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 3500;
}

.snipe-widget[hidden] {
    display: none;
}

.snipe-widget-card {
    width: 280px;
    border: 1px solid #2a2f3a;
    border-radius: 14px;
    background: #191b20;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.snipe-widget.is-minimized .snipe-widget-card,
.snipe-widget:not(.is-minimized) .snipe-widget-pill {
    display: none;
}

.snipe-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 4px 16px;
}

.snipe-widget-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.snipe-widget-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.18);
}

.snipe-widget.is-paused .snipe-widget-dot {
    background: #f0b232;
    box-shadow: 0 0 0 3px rgba(240, 178, 50, 0.18);
}

.snipe-widget-tools {
    display: inline-flex;
    gap: 2px;
}

.snipe-widget-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--muted);
}

.snipe-widget-icon:hover {
    background: #252831;
    color: var(--text);
}

.snipe-widget-icon svg {
    width: 16px;
    height: 16px;
}

.snipe-widget-grip {
    cursor: grab;
    touch-action: none;
}

.snipe-widget.is-dragging .snipe-widget-grip,
.snipe-widget.is-dragging .snipe-widget-pill {
    cursor: grabbing;
}

.snipe-widget-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 16px 14px;
}

.snipe-widget-stats div {
    display: grid;
    gap: 2px;
}

.snipe-widget-stats span {
    font-size: 0.82rem;
    color: var(--muted);
}

.snipe-widget-stats strong {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.snipe-widget-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-top: 1px solid #2a2f3a;
}

.snipe-widget-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 650;
}

.snipe-widget-btn svg {
    width: 16px;
    height: 16px;
}

.snipe-widget-btn:hover:not(:disabled) {
    background: #252831;
}

.snipe-widget-btn.is-stop {
    color: var(--red);
}

.snipe-widget-btn:disabled {
    opacity: 0.5;
}

.snipe-widget-open {
    margin-left: auto;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.snipe-widget-open:hover {
    background: #252831;
    color: var(--text);
}

.snipe-widget-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #2a2f3a;
    border-radius: 999px;
    background: #191b20;
    color: var(--text);
    font-weight: 650;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    touch-action: none;
}

.snipe-widget-pill-count {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.snipe-widget-pill svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
}

@media (max-width: 960px) {
    .snipe-widget {
        right: 12px;
        bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px));
    }
}

/* Transfer List */
.tl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tl-title {
    margin-bottom: 4px;
}

.tl-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-weight: 600;
}

.tl-refresh:hover:not(:disabled) {
    background: var(--card-hover);
}

.tl-refresh svg {
    width: 16px;
    height: 16px;
}

.tl-refresh.is-busy svg {
    animation: tl-spin 0.9s linear infinite;
}

@keyframes tl-spin {
    to {
        transform: rotate(360deg);
    }
}

.tl-status {
    min-height: 1.2em;
    margin: 4px 0 14px;
    color: var(--muted);
    font-size: 0.85rem;
}

.tl-status.is-bad {
    color: var(--red);
}

.tl-section {
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
}

.tl-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tl-section-action {
    flex-shrink: 0;
    font-size: 0.85rem;
}

.tl-section-action:hover:not(:disabled) {
    background: var(--card-hover);
}

.tl-section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.tl-section-count {
    color: var(--muted);
    font-weight: 500;
}

.tl-section-lead {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.tl-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
}

.tl-items:empty {
    display: none;
}

.tl-empty {
    padding: 44px 12px;
    text-align: center;
}

.tl-empty[hidden] {
    display: none;
}

.tl-empty-title {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 1.05rem;
}

.tl-empty-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.tl-card {
    display: grid;
    justify-items: center;
    gap: 6px;
    width: 112px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: center;
}

.tl-card.is-listable {
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.15s ease;
}

.tl-card.is-listable:hover {
    transform: translateY(-2px);
}

.tl-card.is-listable:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.tl-card-img {
    width: 100%;
    height: auto;
}

.tl-card-fallback {
    display: grid;
    align-content: center;
    gap: 2px;
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    font-size: 0.8rem;
}

.tl-card-fallback strong {
    font-size: 1.3rem;
}

.tl-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.tl-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #0d0f13;
    font-size: 0.72rem;
    font-weight: 700;
}

.tl-chip img {
    width: 12px;
    height: 12px;
}

.tl-chip.is-sold {
    color: var(--green);
}

.tl-chip.is-suggested {
    color: var(--muted);
}

.tl-card-time {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.tl-modal .market-v2-buy-modal-sub {
    margin-bottom: 0;
}

.tl-suggest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid rgba(61, 139, 253, 0.35);
    border-radius: 12px;
    background: rgba(61, 139, 253, 0.08);
}

.tl-suggest p {
    margin: 0;
}

.tl-suggest .tl-suggest-range {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8rem;
}

.tl-apply,
.tl-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-weight: 600;
}

.tl-apply:disabled,
.tl-btn:disabled {
    opacity: 0.5;
}

.tl-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.tl-field-label {
    font-weight: 600;
}

.tl-field .market-v2-stepper-input {
    flex: 1;
}

.tl-error {
    margin: 0 0 12px;
    color: var(--red);
    font-size: 0.85rem;
}

.tl-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.tl-btn-primary {
    border-color: #e9ebee;
    background: #e9ebee;
    color: #111;
}
