﻿body { background:#111; color:#eee; }
.site-shell {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}
.filter-bar { position: sticky; top: 0; z-index: 999; background: #111; padding: 15px 0; border-bottom: 1px solid #333; box-shadow: none;}
.filter-bar input { background:#1b1b1b; color:#eee; border:1px solid #333; }
.filter-bar .form-control {
    box-shadow: 0 0 0 1px rgba(73, 88, 109, 0.55), 0 8px 14px rgba(0, 0, 0, 0.24);
}
.filter-bar input::placeholder { color:#ccc !important; opacity:1 !important; }
.filter-bar input:focus { background:#1b1b1b; color:#fff; border-color:#666; }
.filter-bar .form-control:focus {
    box-shadow: 0 0 0 2px rgba(23, 195, 195, 0.36), 0 8px 14px rgba(0, 0, 0, 0.28);
}
.filter-form { max-width: 100%; }
.table td { vertical-align: middle; }
.market-mobile-list { display:none; }
.market-mobile-card {
    background:#1b212a;
    border:1px solid #313b49;
    border-radius:10px;
    padding:10px;
    margin-bottom:8px;
}
.market-mobile-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
}
.market-mobile-item {
    display:flex;
    align-items:flex-start;
    gap:8px;
    min-width:0;
}
.market-mobile-name {
    color:#eef3fb;
    font-size:15px;
    line-height:1.25;
    word-break:break-word;
}
.market-mobile-price {
    color:#ffffff;
    font-weight:700;
    font-size:14px;
    white-space:nowrap;
}
.market-mobile-foot,
.market-mobile-detail-middle {
    margin-top:8px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
}
.market-mobile-detail-middle {
    align-items:flex-start;
}
.market-mobile-detail-middle .shop-link {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}
.market-mobile-detail-middle .copy {
    flex: 0 0 auto;
    white-space: nowrap;
}
.market-mobile-stores {
    color:#c9d4e4;
    font-size:13px;
}
.market-mobile-detail-owner {
    margin-top:4px;
    color:#c9d4e4;
    font-size:13px;
}
.market-mobile-details {
    margin-top:8px;
}
.market-mobile-detail-card {
    border-top:1px dashed #374355;
    padding-top:8px;
    margin-top:8px;
}
.market-mobile-detail-top {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
}
.market-mobile-detail-name {
    color:#e8eef9;
    font-size:14px;
}
.market-mobile-detail-price {
    color:#fff;
    font-weight:700;
    font-size:14px;
    white-space:nowrap;
}
.market-mobile-extra {
    margin-top:6px;
    color:#9fb2cc;
    font-size:12px;
    line-height:1.3;
}
.options, .cards { white-space: pre-line; font-size: 12px; color:#aaa; }
td img { image-rendering: auto; border-radius: 4px; }
.market-item-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    /* background: #10141b; */
    display: block;
    flex: 0 0 auto;
}
.modal-content { background:#222; color:#eee; }
.modal-header, .modal-footer { border-color:#444; }
.shop-modal-meta-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.shop-modal-meta-head p {
    margin-bottom: 0;
}
.shop-modal-updated-inline {
    font-size: 12px;
    color: #9fb2cc;
    white-space: nowrap;
    line-height: 1.2;
    padding-top: 2px;
}
.shop-modal-updated-inline i {
    margin-right: 4px;
    opacity: .95;
}
.shop-modal-coord {
    margin-bottom: 8px;
}
.shop-link-interactive {
    cursor: pointer;
    text-decoration: none;
}
.shop-link-info {
    margin-left: 4px;
    color: #aaa;
}
.shop-owner-label {
    color: #fff;
}
.shop-modal-item-details {
    font-size: 12px;
    color: #9aa4af;
    margin-top: 4px;
}
.shop-modal-table th,
.shop-modal-table td {
    vertical-align: top;
}
.item-info-trigger,
.card-info-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin-right: 5px;
    line-height: 1;
    vertical-align: middle;
    color: #7fb8ff;
    cursor: pointer;
}
.item-info-trigger:hover,
.item-info-trigger:focus-visible,
.card-info-trigger:hover,
.card-info-trigger:focus-visible {
    color: #c7e3ff;
}
#itemInfoModalLabel {
    display: flex;
    align-items: center;
    gap: 8px;
}
.item-info-desc .item-info-line {
    font-size: 0.92em;
    line-height: 1.5;
}
.item-info-desc .item-info-sep {
    margin: 6px 0;
    border-color: rgba(255,255,255,0.15);
}
.item-history-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin-left: 6px;
    line-height: 1;
    vertical-align: middle;
    color: #7fb8ff;
    cursor: pointer;
}
.item-history-trigger:hover,
.item-history-trigger:focus-visible {
    color: #c7e3ff;
}
.item-history-trigger--before-price {
    margin-left: 0;
    margin-right: 6px;
}
.price-value-no-break {
    white-space: nowrap;
}
.history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.history-range-label {
    font-size: 13px;
    color: #b4c0d3;
}
.history-status {
    font-size: 13px;
    color: #9fb2cc;
    min-height: 18px;
}
.history-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 240px;
}
.history-meta {
    font-size: 12px;
    color: #8ea4c2;
}
/* ── filter-bar icons (input-group) ── */
.filter-bar .input-group-text.filter-icon {
    background: #1b1b1b;
    color: #8aa4c2;
    border: 1px solid #333;
    border-right: none;
    padding: 0 10px;
}
.filter-bar .input-group .form-control,
.filter-bar .input-group .form-select {
    border-left: none;
}
.filter-bar .input-group .form-control:focus,
.filter-bar .input-group .form-select:focus {
    border-left: none;
}
.filter-bar .input-group:focus-within .filter-icon {
    border-color: #666;
    color: #17c3c3;
}

/* ── submit button inline ── */
.btn-filter-submit {
    border-radius: 0 6px 6px 0;
    padding: 0 14px;
}

/* ── advanced toggle button ── */
.advanced-toggle-btn {
    border-color: #3a3a3a;
    color: #aaa;
    background: transparent;
    white-space: nowrap;
    transition: border-color .2s, color .2s, background .2s;
}
.advanced-toggle-btn:hover,
.advanced-toggle-btn.is-active {
    border-color: #17c3c3;
    color: #17c3c3;
    background: rgba(23,195,195,.08);
}
.advanced-toggle-chevron { transition: transform .28s cubic-bezier(.4,0,.2,1); }
.advanced-toggle-btn[aria-expanded="true"] .advanced-toggle-chevron { transform: rotate(180deg); }

/* ── search pill box ── */
.search-pill-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    height: auto;
    min-height: 38px;
    padding: 4px 8px;
    cursor: text;
    background: #1b1b1b;
    color: #eee;
    border-color: #333;
}
.search-pill-box:focus-within {
    background: #1b1b1b;
    color: #fff;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(23, 195, 195, 0.36), 0 8px 14px rgba(0, 0, 0, 0.28);
}
.search-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--mt-accent, #17c3c3);
    color: #fff;
    border-radius: 999px;
    padding: 2px 6px 2px 10px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 200px;
}
.search-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.search-pill-x {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0 1px;
    font-size: 14px;
    line-height: 1;
    opacity: 0.75;
    flex-shrink: 0;
}
.search-pill-x:hover { opacity: 1; }
.search-pill-input {
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: inherit;
    flex: 1 1 80px;
    min-width: 60px;
    padding: 0;
    font-size: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.filter-bar .search-pill-input::placeholder {
    color: #ccc;
    opacity: 1;
    font-size: 13px;
}

/* ── advanced search expandable row ── */
.advanced-search-wrap {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .32s cubic-bezier(.4,0,.2,1), opacity .24s ease;
}
.advanced-search-wrap.is-open {
    max-height: 340px;
    opacity: 1;
}

/* ── item type select ── */
.item-type-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-color: #1b1b1b;
    color: #eee;
    border: 1px solid #333;
    min-width: 170px;
}
.item-type-select:focus {
    background-color: #1b1b1b;
    color: #fff;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(23,195,195,.3);
}
.item-type-select option { background: #1b1b1b; }

/* ── misc ── */
@media(max-width:768px){ .filter-bar .row > div { margin-bottom:0.5rem; } }
.btn-cyan { background-color: #17c3c3; color: #fff; border: none; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; }
.btn-cyan:hover { background-color: #13baba; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.copy-btn { cursor:pointer; }
.stack-toggle { white-space: nowrap; }
.stack-item-row.collapse.show { display: table-row; }
.stack-item-row.collapsing { display: table-row; height: auto !important; }
.broken-badge { background:#dc3545; color:#fff; font-size:10px; font-weight:700; padding:2px 6px; border-radius:999px; letter-spacing:.3px; }
.item-qty { color:#4ea3ff; font-weight:700; font-size:12px; }
.pagination-form { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:8px 0 12px; }
.pagination-form button { min-width:42px; }
.range-wrap { display:flex; align-items:center; gap:12px; }
.range-wrap input[type="number"] { width:72px; height:24px; padding:0 4px; }
.option-range-wrap {
    overflow: hidden;
    max-height: 64px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .25s ease, opacity .2s ease, transform .25s ease, margin-top .25s ease;
}
.option-range-wrap.is-hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    margin-top: 0 !important;
    pointer-events: none;
}
.dual-range { position: relative; width: 180px; height: 24px; overflow: visible; }
.dual-range-track { position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); height:4px; background:#444; border-radius:999px; }
.dual-range-fill { position:absolute; top:50%; transform:translateY(-50%); height:4px; background:#17c3c3; border-radius:999px; pointer-events:none; }
.dual-range-thumb { position:absolute; top:50%; transform:translate(-50%,-50%); width:16px; height:16px; border-radius:50%; background:#17c3c3; border:2px solid #111; box-shadow:0 0 0 2px rgba(23,195,195,.4), 0 2px 5px rgba(0,0,0,.5); cursor:grab; z-index:2; touch-action:none; -webkit-user-select:none; user-select:none; }
.dual-range-thumb:active { cursor:grabbing; }
.table-mobile-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.mobile-cards-inline { color:#aaa; font-size:12px; margin-top:2px; }
.mobile-options-inline { color:#9fb7d9; font-size:12px; margin-top:2px; white-space:pre-line; }

@media (min-width: 769px) {
    .table-mobile-wrap .market-table {
        border-collapse: separate;
        border-spacing: 0 10px;
        margin-bottom: 0;
    }
    .table-mobile-wrap .market-table > :not(caption) > * > * {
        border-bottom-width: 0;
    }
    .table-mobile-wrap .market-table thead th {
        background: #1a1f28;
        color: #f1f6ff;
        border-top: 1px solid #354258;
        border-bottom: 1px solid #354258;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .table-mobile-wrap .market-table thead th:first-child {
        border-left: 1px solid #354258;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    .table-mobile-wrap .market-table thead th:last-child {
        border-right: 1px solid #354258;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    .table-mobile-wrap .market-table tbody td {
        background: linear-gradient(180deg, #1b222d 0%, #171d27 100%);
        border-top: 1px solid #314056;
        border-bottom: 1px solid #314056;
        color: #e9f0ff;
        padding-top: 9px;
        padding-bottom: 9px;
    }
    .table-mobile-wrap .market-table tbody tr > td:first-child {
        border-left: 1px solid #314056;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    .table-mobile-wrap .market-table tbody tr > td:last-child {
        border-right: 1px solid #314056;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    .table-mobile-wrap .market-table tbody tr:hover td {
        background: linear-gradient(180deg, #202938 0%, #1a2230 100%);
        border-color: #3e5271;
    }
    .table-mobile-wrap .market-table .cards {
        color: #aeb9cc;
    }
    .table-mobile-wrap .market-table .options {
        color: #9fb6d8;
    }
    .table-mobile-wrap .market-table .shop-link {
        color: #eff5ff !important;
    }
    .table-mobile-wrap .market-table .copy,
    .table-mobile-wrap .market-table .stack-toggle {
        border-radius: 7px;
        border-color: #28c4ff;
        color: #5cd6ff;
        background: rgba(9, 26, 38, 0.55);
    }
    .table-mobile-wrap .market-table .copy:hover,
    .table-mobile-wrap .market-table .stack-toggle:hover {
        color: #b5ecff;
        background: rgba(13, 36, 51, 0.85);
        border-color: #59d7ff;
    }
    .table-mobile-wrap .market-table tbody tr.stack-item-row.stack-zebra-a td {
        background: linear-gradient(180deg, #171d27 0%, #141a24 100%) !important;
        border-top-color: #2a374b;
        border-bottom-color: #2a374b;
    }
    .table-mobile-wrap .market-table tbody tr.stack-item-row.stack-zebra-b td {
        background: linear-gradient(180deg, #1d2531 0%, #18202b 100%) !important;
        border-top-color: #314157;
        border-bottom-color: #314157;
    }
}

.shop-link,
#shopModalLabel {
    font-family: "MS UI Gothic", "MS Gothic", Tahoma, sans-serif;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.brand-head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.top-actions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0;
}
.top-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.quick-menu-toggle {
    width: 36px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #3a4658;
    color: #ffffff !important;
    background: rgba(11, 14, 20, 0.75);
}
.quick-menu-toggle::after {
    display: none;
}
.quick-menu-toggle i {
    font-size: 18px;
    line-height: 1;
    color: #ffffff;
}
.quick-menu-toggle:hover,
.quick-menu-toggle:focus-visible,
.quick-menu-toggle.show {
    border-color: #4e5f77;
    color: #ffffff !important;
    background: rgba(18, 24, 34, 0.9);
}
.quick-menu-panel {
    min-width: 260px;
    background: #121822;
    border: 1px solid #334055;
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}
.quick-menu-panel .dropdown-item {
    color: #d4def0;
    font-size: 13px;
    padding: 8px 12px;
}
.quick-menu-panel .dropdown-item:hover,
.quick-menu-panel .dropdown-item:focus-visible {
    background: #1a2434;
    color: #ffffff;
}
.quick-menu-panel .dropdown-item.active,
.quick-menu-panel .dropdown-item:active {
    background: #1f2b3f;
    color: #ffffff;
}
.quick-menu-profile-wrap {
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(31, 43, 63, 0.42) 0%, rgba(18, 24, 34, 0) 100%);
}
.quick-menu-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.quick-menu-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1f2b3f;
    border: 1px solid #3b4d67;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d6e6ff;
    flex: 0 0 auto;
}
.quick-menu-avatar i {
    font-size: 18px;
    line-height: 1;
}
.quick-menu-profile-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.quick-menu-profile-text strong {
    color: #eef5ff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-menu-profile-text small {
    color: #9fb2cc;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-menu-telegram {
    margin-top: 7px;
    color: #9fb2cc;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.quick-menu-section-title {
    padding: 2px 12px 6px;
    color: #93a6c0;
    font-size: 10px;
    letter-spacing: .8px;
    text-transform: uppercase;
    list-style: none;
}
.quick-menu-toggle-wrap {
    list-style: none;
}
.quick-menu-toggle-wrap .toggle-row {
    width: 100%;
}

/* Theme system (MySQL page) */
body.market-theme-enabled {
    --mt-bg: #111111;
    --mt-text: #eef3fb;
    --mt-muted: #9fb2cc;
    --mt-surface: #121822;
    --mt-surface-2: #1b222d;
    --mt-surface-3: #171d27;
    --mt-border: #334055;
    --mt-border-soft: #314056;
    --mt-accent: #17c3c3;
    --mt-accent-soft: #5cd6ff;
    --mt-hover: #202938;
    --mt-link: #eff5ff;
}
body.market-theme-enabled.market-theme-classic-dark,
.theme-preview.theme-preview--classic-dark {
    --mt-bg: #111111;
    --mt-text: #eef3fb;
    --mt-muted: #9fb2cc;
    --mt-surface: #121822;
    --mt-surface-2: #1b222d;
    --mt-surface-3: #171d27;
    --mt-border: #334055;
    --mt-border-soft: #314056;
    --mt-accent: #17c3c3;
    --mt-accent-soft: #5cd6ff;
    --mt-hover: #202938;
    --mt-link: #eff5ff;
}
body.market-theme-enabled.market-theme-light-clean,
.theme-preview.theme-preview--light-clean {
    --mt-bg: #f2f6fc;
    --mt-text: #1d2430;
    --mt-muted: #5f6f84;
    --mt-surface: #ffffff;
    --mt-surface-2: #f7faff;
    --mt-surface-3: #eff4fb;
    --mt-border: #ccd7e8;
    --mt-border-soft: #d9e3f1;
    --mt-accent: #2f6dff;
    --mt-accent-soft: #238fd8;
    --mt-hover: #e7eef9;
    --mt-link: #182230;
}
body.market-theme-enabled.market-theme-nord-ice,
.theme-preview.theme-preview--nord-ice {
    --mt-bg: #2e3440;
    --mt-text: #e5e9f0;
    --mt-muted: #c0c8d4;
    --mt-surface: #3b4252;
    --mt-surface-2: #434c5e;
    --mt-surface-3: #374151;
    --mt-border: #4c566a;
    --mt-border-soft: #58647a;
    --mt-accent: #88c0d0;
    --mt-accent-soft: #81a1c1;
    --mt-hover: #4a5467;
    --mt-link: #eef4ff;
}
body.market-theme-enabled.market-theme-retro-amber,
.theme-preview.theme-preview--retro-amber {
    --mt-bg: #17120d;
    --mt-text: #f6e8c8;
    --mt-muted: #d4bb8c;
    --mt-surface: #231a11;
    --mt-surface-2: #2b2014;
    --mt-surface-3: #21180f;
    --mt-border: #644b28;
    --mt-border-soft: #73572f;
    --mt-accent: #ffb347;
    --mt-accent-soft: #ffd37a;
    --mt-hover: #312516;
    --mt-link: #fff2cf;
}
body.market-theme-enabled.market-theme-neon-cyber,
.theme-preview.theme-preview--neon-cyber {
    --mt-bg: #070b11;
    --mt-text: #d4ffe9;
    --mt-muted: #91d3c8;
    --mt-surface: #101726;
    --mt-surface-2: #0f1a2a;
    --mt-surface-3: #0d1624;
    --mt-border: #1e3a56;
    --mt-border-soft: #2b4d6d;
    --mt-accent: #00f5d4;
    --mt-accent-soft: #3ff6ff;
    --mt-hover: #142338;
    --mt-link: #dffaff;
}
body.market-theme-enabled.market-theme-modern-graphite,
.theme-preview.theme-preview--modern-graphite {
    --mt-bg: #0f1218;
    --mt-text: #e9edf6;
    --mt-muted: #a6b1c4;
    --mt-surface: #171c25;
    --mt-surface-2: #202734;
    --mt-surface-3: #1a212d;
    --mt-border: #2f3a4d;
    --mt-border-soft: #3a455a;
    --mt-accent: #7aa2ff;
    --mt-accent-soft: #8bc5ff;
    --mt-hover: #252d3b;
    --mt-link: #f1f5ff;
}
body.market-theme-enabled.market-theme-accessible-high-contrast,
.theme-preview.theme-preview--accessible-high-contrast {
    --mt-bg: #000000;
    --mt-text: #ffffff;
    --mt-muted: #d0d0d0;
    --mt-surface: #101010;
    --mt-surface-2: #161616;
    --mt-surface-3: #0a0a0a;
    --mt-border: #ffffff;
    --mt-border-soft: #e6e6e6;
    --mt-accent: #ffd400;
    --mt-accent-soft: #fff28c;
    --mt-hover: #1f1f1f;
    --mt-link: #ffffff;
}
body.market-theme-enabled.market-theme-accessible-colorblind,
.theme-preview.theme-preview--accessible-colorblind {
    --mt-bg: #0b1020;
    --mt-text: #f3f7ff;
    --mt-muted: #bfd0ec;
    --mt-surface: #15203a;
    --mt-surface-2: #1b2b4a;
    --mt-surface-3: #132240;
    --mt-border: #4f78b4;
    --mt-border-soft: #5d85c4;
    --mt-accent: #ff9f1c;
    --mt-accent-soft: #ffd089;
    --mt-hover: #22355a;
    --mt-link: #eaf3ff;
}
body.market-theme-enabled {
    background: var(--mt-bg);
    color: var(--mt-text);
}
body.market-theme-enabled .filter-bar {
    background: var(--mt-bg);
    border-bottom-color: var(--mt-border);
}
body.market-theme-enabled .filter-bar input {
    background: var(--mt-surface);
    color: var(--mt-text);
    border-color: var(--mt-border);
}
body.market-theme-enabled .filter-bar input::placeholder {
    color: var(--mt-muted) !important;
}
body.market-theme-enabled .filter-bar .form-control {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mt-border) 80%, transparent), 0 8px 14px rgba(0, 0, 0, 0.24);
}
body.market-theme-enabled .filter-bar .form-control:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mt-accent) 36%, transparent), 0 8px 14px rgba(0, 0, 0, 0.28);
}
body.market-theme-enabled .filter-bar .search-pill-box {
    background: var(--mt-surface);
    color: var(--mt-text);
    border-color: var(--mt-border);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mt-border) 80%, transparent), 0 8px 14px rgba(0, 0, 0, 0.24);
}
body.market-theme-enabled .filter-bar .search-pill-box:focus-within {
    background: var(--mt-surface);
    color: var(--mt-text);
    border-color: var(--mt-border-soft);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mt-accent) 36%, transparent), 0 8px 14px rgba(0, 0, 0, 0.28);
}
body.market-theme-enabled .filter-bar .search-pill-input::placeholder {
    color: var(--mt-muted) !important;
    opacity: 1 !important;
}
body.market-theme-enabled .filter-bar .input-group-text.filter-icon {
    background: var(--mt-surface);
    color: var(--mt-muted);
    border-color: var(--mt-border);
}
body.market-theme-enabled .filter-bar .input-group:focus-within .filter-icon {
    border-color: var(--mt-border-soft);
    color: var(--mt-accent);
}
body.market-theme-enabled .filter-bar .input-group .form-control,
body.market-theme-enabled .filter-bar .input-group .form-select {
    border-color: var(--mt-border);
}
body.market-theme-enabled .filter-bar .form-select,
body.market-theme-enabled .item-type-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-color: var(--mt-surface);
    color: var(--mt-text);
    border-color: var(--mt-border);
}
body.market-theme-enabled .item-type-select option,
body.market-theme-enabled .filter-bar .form-select option {
    background: var(--mt-surface);
    color: var(--mt-text);
}
body.market-theme-enabled .item-type-select:focus {
    background-color: var(--mt-surface);
    color: var(--mt-text);
    border-color: var(--mt-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mt-accent) 30%, transparent);
}
body.market-theme-enabled .advanced-toggle-btn {
    border-color: var(--mt-border);
    color: var(--mt-muted);
}
body.market-theme-enabled .advanced-toggle-btn:hover,
body.market-theme-enabled .advanced-toggle-btn.is-active {
    border-color: var(--mt-accent);
    color: var(--mt-accent);
    background: color-mix(in srgb, var(--mt-accent) 8%, transparent);
}
body.market-theme-enabled .btn-filter-submit {
    background: var(--mt-accent);
    border-color: var(--mt-accent);
    color: #fff;
}
body.market-theme-enabled .btn-filter-submit:hover,
body.market-theme-enabled .btn-filter-submit:focus-visible {
    background: color-mix(in srgb, var(--mt-accent) 85%, #000 15%);
    border-color: var(--mt-accent);
    color: #fff;
}
body.market-theme-enabled.market-theme-light-clean .filter-bar .form-select,
body.market-theme-enabled.market-theme-light-clean .item-type-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23555555' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
body.market-theme-enabled .dual-range-track {
    background: color-mix(in srgb, var(--mt-border) 90%, transparent);
}
body.market-theme-enabled .dual-range-fill {
    background: var(--mt-accent);
}
body.market-theme-enabled .dual-range-thumb {
    background: var(--mt-accent);
    border-color: var(--mt-bg);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mt-accent) 40%, transparent), 0 2px 5px rgba(0,0,0,.4);
}
body.market-theme-enabled .market-mobile-card {
    background: var(--mt-surface-2);
    border-color: var(--mt-border-soft);
}
body.market-theme-enabled .market-mobile-name,
body.market-theme-enabled .market-mobile-detail-name,
body.market-theme-enabled .market-mobile-price,
body.market-theme-enabled .market-mobile-detail-price {
    color: var(--mt-text);
}
body.market-theme-enabled .market-mobile-stores,
body.market-theme-enabled .market-mobile-detail-owner,
body.market-theme-enabled .market-mobile-extra {
    color: var(--mt-muted);
}
body.market-theme-enabled .table-mobile-wrap .market-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--mt-text);
    --bs-table-striped-bg: transparent;
    --bs-table-striped-color: var(--mt-text);
    --bs-table-hover-bg: transparent;
    --bs-table-hover-color: var(--mt-text);
    --bs-table-accent-bg: transparent;
}
body.market-theme-enabled .table-mobile-wrap .market-table > :not(caption) > * > * {
    box-shadow: none;
}
body.market-theme-enabled .table-mobile-wrap .market-table thead th {
    background: var(--mt-surface);
    color: var(--mt-text);
    border-top-color: var(--mt-border);
    border-bottom-color: var(--mt-border);
}
body.market-theme-enabled .table-mobile-wrap .market-table thead th:first-child,
body.market-theme-enabled .table-mobile-wrap .market-table thead th:last-child {
    border-left-color: var(--mt-border);
    border-right-color: var(--mt-border);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody td {
    background: linear-gradient(180deg, var(--mt-surface-2) 0%, var(--mt-surface-3) 100%);
    border-top-color: var(--mt-border-soft);
    border-bottom-color: var(--mt-border-soft);
    color: var(--mt-text);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody tr > td:first-child {
    border-left-color: var(--mt-border-soft);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody tr > td:last-child {
    border-right-color: var(--mt-border-soft);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody tr:hover td {
    background: var(--mt-hover);
    border-color: var(--mt-border);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody tr.stack-item-row.stack-zebra-a td {
    background: linear-gradient(180deg, var(--mt-surface-3) 0%, var(--mt-surface) 100%) !important;
    border-top-color: var(--mt-border-soft);
    border-bottom-color: var(--mt-border-soft);
}
body.market-theme-enabled .table-mobile-wrap .market-table tbody tr.stack-item-row.stack-zebra-b td {
    background: linear-gradient(180deg, var(--mt-surface-2) 0%, var(--mt-surface) 100%) !important;
    border-top-color: var(--mt-border);
    border-bottom-color: var(--mt-border);
}
body.market-theme-enabled .quick-menu-panel,
body.market-theme-enabled .coffee-donate-menu,
body.market-theme-enabled .settings-gear .dropdown-menu,
body.market-theme-enabled .lang-globe .dropdown-menu {
    background: var(--mt-surface);
    border-color: var(--mt-border);
}
body.market-theme-enabled .quick-menu-panel .dropdown-item,
body.market-theme-enabled .coffee-donate-menu .dropdown-item,
body.market-theme-enabled .lang-globe .dropdown-item {
    color: var(--mt-text);
}
body.market-theme-enabled .quick-menu-panel .dropdown-item:hover,
body.market-theme-enabled .coffee-donate-menu .dropdown-item:hover,
body.market-theme-enabled .lang-globe .dropdown-item:hover {
    background: var(--mt-hover);
    color: var(--mt-text);
}
body.market-theme-enabled .lang-globe .dropdown-item.active,
body.market-theme-enabled .lang-globe .dropdown-item:active {
    background: var(--mt-accent);
    color: var(--mt-bg);
}
body.market-theme-enabled .quick-menu-profile-wrap {
    background: linear-gradient(180deg, rgba(31, 43, 63, 0.42) 0%, rgba(18, 24, 34, 0) 100%);
}
body.market-theme-enabled .quick-menu-profile-text small,
body.market-theme-enabled .quick-menu-telegram {
    color: var(--mt-muted);
}
body.market-theme-enabled .updated-label {
    color: var(--mt-text);
    opacity: .78;
}
body.market-theme-enabled .toggle-text {
    color: var(--mt-text);
}
body.market-theme-enabled .toggle-slider {
    background: var(--mt-border-soft);
    border-color: var(--mt-border);
}
body.market-theme-enabled .toggle-slider::before {
    background: var(--mt-surface);
}
body.market-theme-enabled .toggle-switch input:checked + .toggle-slider {
    background: var(--mt-accent);
    border-color: var(--mt-accent);
}
body.market-theme-enabled .update-available {
    color: var(--mt-accent-soft);
}
body.market-theme-enabled .pagination-form .btn-outline-light {
    color: var(--mt-text);
    border-color: var(--mt-border);
    background: var(--mt-surface);
}
body.market-theme-enabled .pagination-form .btn-outline-light:hover,
body.market-theme-enabled .pagination-form .btn-outline-light:focus-visible {
    color: var(--mt-text);
    border-color: var(--mt-accent);
    background: var(--mt-hover);
}
body.market-theme-enabled .pagination-form .btn-info {
    color: #ffffff;
    border-color: var(--mt-accent);
    background: var(--mt-accent);
}
body.market-theme-enabled .pagination-form .btn-info:hover,
body.market-theme-enabled .pagination-form .btn-info:focus-visible {
    color: #ffffff;
    border-color: var(--mt-accent);
    background: color-mix(in srgb, var(--mt-accent) 82%, #000 18%);
}
body.market-theme-enabled .table-mobile-wrap .market-table .copy,
body.market-theme-enabled .table-mobile-wrap .market-table .stack-toggle {
    border-color: var(--mt-accent);
    color: var(--mt-accent-soft);
    background: color-mix(in srgb, var(--mt-bg) 72%, transparent);
}
body.market-theme-enabled .table-mobile-wrap .market-table .copy:hover,
body.market-theme-enabled .table-mobile-wrap .market-table .stack-toggle:hover {
    color: var(--mt-text);
    background: color-mix(in srgb, var(--mt-hover) 88%, transparent);
    border-color: var(--mt-accent-soft);
}
body.market-theme-enabled .shop-link {
    color: var(--mt-link) !important;
    text-shadow: none;
}
body.market-theme-enabled .item-history-trigger,
body.market-theme-enabled .item-info-trigger,
body.market-theme-enabled .card-info-trigger {
    color: var(--mt-muted);
}
body.market-theme-enabled .item-history-trigger:hover,
body.market-theme-enabled .item-history-trigger:focus-visible,
body.market-theme-enabled .item-info-trigger:hover,
body.market-theme-enabled .item-info-trigger:focus-visible,
body.market-theme-enabled .card-info-trigger:hover,
body.market-theme-enabled .card-info-trigger:focus-visible {
    color: var(--mt-accent);
}
body.market-theme-enabled .shop-link-info {
    color: var(--mt-muted);
}
body.market-theme-enabled .shop-owner-label {
    color: var(--mt-text);
}
body.market-theme-enabled.market-theme-light-clean .table-mobile-wrap .market-table .shop-link {
    color: #0b3f9e !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(11, 63, 158, 0.35);
    text-underline-offset: 2px;
}
body.market-theme-enabled.market-theme-light-clean .table-mobile-wrap .market-table .shop-link:hover {
    color: #072f77 !important;
    text-decoration-color: rgba(7, 47, 119, 0.45);
}
body.market-theme-enabled.market-theme-light-clean .table-mobile-wrap .market-table .shop-owner-label {
    color: #1e2a39;
}
body.market-theme-enabled .modal-content {
    background: var(--mt-surface);
    color: var(--mt-text);
}
body.market-theme-enabled .modal-header,
body.market-theme-enabled .modal-footer {
    border-color: var(--mt-border);
}
body.market-theme-enabled .shop-modal-updated-inline {
    color: var(--mt-text);
    opacity: .8;
    font-weight: 600;
}
body.market-theme-enabled .shop-modal-item-details {
    color: var(--mt-muted);
}
body.market-theme-enabled .history-range-label,
body.market-theme-enabled .history-status,
body.market-theme-enabled .history-meta {
    color: var(--mt-muted);
}
body.market-theme-enabled .shop-modal-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--mt-text);
    --bs-table-border-color: var(--mt-border-soft);
    --bs-table-striped-bg: color-mix(in srgb, var(--mt-surface-3) 72%, transparent);
    --bs-table-striped-color: var(--mt-text);
    --bs-table-hover-bg: color-mix(in srgb, var(--mt-hover) 70%, transparent);
    --bs-table-hover-color: var(--mt-text);
}
body.market-theme-enabled .shop-modal-table thead th {
    background: var(--mt-surface-2);
    color: var(--mt-text);
    border-bottom-color: var(--mt-border);
}
body.market-theme-enabled .shop-modal-table td {
    color: var(--mt-text);
}
body.market-theme-enabled .rmt-home-cta,
body.market-theme-enabled .home-side-col,
body.market-theme-enabled .home-mini-card,
body.market-theme-enabled .home-modal-card {
    background: var(--mt-surface);
    border-color: var(--mt-border);
}
body.market-theme-enabled .rmt-home-cta h3,
body.market-theme-enabled .home-side-head h2,
body.market-theme-enabled .home-mini-name,
body.market-theme-enabled .home-modal-body h3 {
    color: var(--mt-text);
}
body.market-theme-enabled .rmt-home-cta p,
body.market-theme-enabled .home-modal-body p,
body.market-theme-enabled .home-empty-box {
    color: var(--mt-muted);
}
body.market-theme-enabled .rmt-home-cta p strong,
body.market-theme-enabled .home-modal-body p strong {
    color: var(--mt-text);
}
body.market-theme-enabled .community-cta-btn {
    border-color: var(--mt-border);
    background: linear-gradient(180deg, var(--mt-surface-2) 0%, var(--mt-surface-3) 100%);
    color: var(--mt-text);
}
body.market-theme-enabled .community-cta-btn i {
    color: var(--mt-accent-soft);
}
body.market-theme-enabled .home-mini-image-wrap,
body.market-theme-enabled .home-modal-image-wrap {
    background: var(--mt-surface-3);
    border-color: var(--mt-border-soft);
}
body.market-theme-enabled .home-live-social-icon {
    border-color: var(--mt-border);
    background: var(--mt-surface-2);
    color: var(--mt-accent-soft);
}
body.market-theme-enabled .home-live-social-icon:hover {
    color: var(--mt-text);
    border-color: var(--mt-accent);
    background: var(--mt-hover);
}
body.market-theme-enabled .home-mini-control .carousel-control-prev-icon,
body.market-theme-enabled .home-mini-control .carousel-control-next-icon {
    background-color: color-mix(in srgb, var(--mt-surface) 88%, transparent);
    border-color: var(--mt-border);
}
body.market-theme-enabled .live-status-badge {
    border-color: var(--mt-border);
    background: color-mix(in srgb, var(--mt-surface) 88%, transparent);
    color: var(--mt-text);
}
body.market-theme-enabled .site-copyright {
    border-top-color: var(--mt-border);
    background: linear-gradient(180deg, var(--mt-surface-2) 0%, var(--mt-surface-3) 100%);
    margin-left: -1rem;
    margin-right: -1rem;
}
body.market-theme-enabled .site-copyright-inner {
    color: var(--mt-muted);
}
body.market-theme-enabled .copyright-mark,
body.market-theme-enabled .copyright-dot {
    color: var(--mt-muted);
}
@media (max-width: 768px) {
    body.market-theme-enabled .site-copyright {
        margin-left: -10px;
        margin-right: -10px;
    }
}
.theme-preview-wrap {
    border: 1px solid #3a4658;
    border-radius: 10px;
    padding: 10px;
    background: rgba(7, 10, 16, 0.55);
}
.theme-preview {
    border-radius: 8px;
    border: 1px solid var(--mt-border);
    background: var(--mt-bg);
    color: var(--mt-text);
    overflow: hidden;
}
.theme-preview-topbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: var(--mt-surface);
    border-bottom: 1px solid var(--mt-border);
}
.theme-preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mt-muted);
    opacity: .8;
}
.theme-preview-surface {
    padding: 10px;
    background: linear-gradient(180deg, var(--mt-surface-2) 0%, var(--mt-surface-3) 100%);
}
.theme-preview-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--mt-text);
    margin-bottom: 8px;
}
.theme-preview-line {
    height: 6px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--mt-text) 22%, transparent);
    margin-bottom: 6px;
}
.theme-preview-line.short {
    width: 72%;
}
.theme-preview-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}
.theme-preview-chip {
    font-size: 10px;
    line-height: 1;
    border-radius: 999px;
    border: 1px solid var(--mt-border);
    padding: 4px 7px;
    color: var(--mt-muted);
    background: color-mix(in srgb, var(--mt-surface) 70%, transparent);
}
.theme-preview-chip.theme-preview-chip-accent {
    border-color: var(--mt-accent);
    color: var(--mt-accent-soft);
}
.theme-preview-btn-row {
    display: flex;
    justify-content: flex-end;
}
.theme-preview-btn {
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid var(--mt-accent);
    color: var(--mt-accent-soft);
    padding: 4px 8px;
    background: color-mix(in srgb, var(--mt-bg) 75%, transparent);
}
.coffee-donate-btn {
    position: sticky;
    top: 16px;
    align-self: flex-start;
    z-index: 1040;
    display: inline-block;
    margin-bottom: 0;
}
.coffee-donate-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    height: 34px;
    border: 1px solid #5a4b21;
    background: linear-gradient(135deg, #f8d778 0%, #d7a73d 100%);
    color: #2f2308;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.coffee-donate-trigger:hover,
.coffee-donate-trigger:focus-visible,
.coffee-donate-trigger:active,
.coffee-donate-trigger.show {
    color: #4a3a12 !important;
    border-color: #5a4b21 !important;
    background: linear-gradient(135deg, #f8d778 0%, #d7a73d 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
    filter: brightness(1.03);
}
.coffee-donate-menu {
    background: #121822;
    border: 1px solid #334055;
    min-width: 170px;
}
.coffee-donate-menu .dropdown-item {
    color: #d4def0;
}
.coffee-donate-menu .dropdown-item:hover {
    background: #1a2434;
    color: #ffffff;
}
.coffee-donate-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.search-col {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}
.search-col .input-group {
    flex: 1 1 auto;
    min-width: 0;
}
.filter-bar.has-donate-docked .search-col {
    gap: 6px;
}
.coffee-donate-btn.is-docked {
    position: static;
    margin: 0;
    z-index: auto;
    flex: 0 0 auto;
}
.coffee-donate-btn.is-docked .coffee-donate-trigger {
    padding: 6px 10px;
}
.brand-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}
.brand-logo-link {
    display: inline-block;
    text-decoration: none;
}
.brand-logo {
    display: block;
    max-width: min(88vw, 420px);
    width: 100%;
    height: auto;
}
.lang-globe {
    position: static;
    z-index: 20;
}
.settings-gear {
    position: static;
    z-index: 20;
}
.settings-gear .btn,
.lang-globe .btn,
.panel-link-btn {
    border-color: #3a4658;
    color: #ffffff;
    background: rgba(11, 14, 20, 0.75);
    height: 34px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
}
.settings-gear .btn:hover,
.lang-globe .btn:hover,
.panel-link-btn:hover,
.panel-link-btn:focus-visible {
    border-color: #4e5f77;
    color: #ffffff;
    background: rgba(18, 24, 34, 0.9);
}
.lang-globe .btn i {
    color: #ffffff;
}
.settings-gear .dropdown-menu,
.lang-globe .dropdown-menu {
    min-width: 84px;
    background: #121822;
    border: 1px solid #334055;
}
.settings-menu {
    min-width: 220px !important;
}
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.toggle-text {
    color: #d4def0;
    font-size: 13px;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #334258;
    border: 1px solid #445571;
    border-radius: 999px;
    transition: background-color .2s ease, border-color .2s ease;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #e9eef8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .2s ease;
}
.toggle-switch input:checked + .toggle-slider {
    background: #17c3c3;
    border-color: #17c3c3;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid rgba(23, 195, 195, .55);
    outline-offset: 2px;
}
.lang-globe .dropdown-item {
    color: #c8d3e3;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}
.lang-globe .dropdown-item.active,
.lang-globe .dropdown-item:active {
    background: #17c3c3;
    color: #0b111a;
}
.lang-globe .dropdown-item:hover {
    background: #1a2434;
    color: #e9f1ff;
}
.updated-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.updated-label {
    display: inline-block;
    text-align: center;
    font-size: 12px;
    color: #8f96a3;
    line-height: 1;
}
.update-available {
    display: none;
    align-items: center;
    font-size: 12px;
    color: #a9c2ff;
    gap: 8px;
}
.update-available button {
    padding: 0 8px;
    line-height: 1.4;
}
.sponsor-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 auto 14px;
    max-width: 1100px;
}
.sponsor-slots--1 {
    grid-template-columns: minmax(280px, 420px);
    justify-content: center;
}
.sponsor-slots--2 {
    grid-template-columns: repeat(2, minmax(280px, 420px));
    justify-content: center;
}
.sponsor-slot {
    display: block;
    padding: 0;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    position: relative;
    /* border: 1px solid rgba(255, 255, 255, 0.14); */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sponsor-slot-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 1;
    transition: opacity .35s ease;
}
.sponsor-slot-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    background: #0f1116;
    overflow: hidden;
}
.sponsor-slot-image.sponsor-slot-image-next {
    opacity: 0;
    z-index: 2;
}
.sponsor-slot-image.sponsor-slot-image-next.is-visible {
    opacity: 1;
}
.sponsor-slot-placeholder {
    aspect-ratio: 3 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
}
.sponsor-slot-placeholder strong {
    font-size: 16px;
}
.sponsor-slot-placeholder small {
    font-size: 12px;
    opacity: .9;
}
.sponsor-slot-cta {
    position: absolute;
    z-index: 6;
    display: inline-block;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(0,0,0,.35);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sponsor-slot-cta:hover,
.sponsor-slot-cta:focus-visible {
    background: var(--cta-hover-bg, #f2f2f2) !important;
    color: var(--cta-hover-color, #111111) !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,.42);
}
.sponsor-slot-cta.v-top { top: var(--offset-y, 18px); }
.sponsor-slot-cta.v-middle { top: 50%; transform: translateY(-50%); }
.sponsor-slot-cta.v-bottom { bottom: var(--offset-y, 18px); }
.sponsor-slot-cta.h-left { left: var(--offset-x, 18px); }
.sponsor-slot-cta.h-middle { left: 50%; transform: translateX(-50%); }
.sponsor-slot-cta.h-right { right: var(--offset-x, 18px); }
.sponsor-slot-cta.v-middle.h-middle { transform: translate(-50%, -50%); }
.sponsor-slot-cta.v-middle.h-left { transform: translateY(-50%); }
.sponsor-slot-cta.v-middle.h-right { transform: translateY(-50%); }
.sponsor-slot-cta.v-top.h-middle,
.sponsor-slot-cta.v-bottom.h-middle { transform: translateX(-50%); }
.sponsor-slot:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}
.sponsor-slot-1 {
    background: linear-gradient(135deg, #0a4d5b 0%, #0f6d80 100%);
}
.sponsor-slot-2 {
    background: linear-gradient(135deg, #504015 0%, #8a6b1c 100%);
}
.sponsor-slot-3 {
    background: linear-gradient(135deg, #51345f 0%, #7a4f91 100%);
}
.rmt-home {
    max-width: 1400px;
    margin: 14px auto 18px;
}
.rmt-home-head {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.rmt-home-head h2 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #e6f0ff;
    letter-spacing: .8px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(34, 162, 255, 0.25);
}
.rmt-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: center;
    gap: 10px;
}
.rmt-home-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0;
    background: #171b22;
    border: 1px solid #2a3340;
    border-radius: 10px;
    overflow: hidden;
}
.rmt-home-image-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    min-width: 120px;
    height: auto;
    background: #10141b;
    border-right: 1px solid #273040;
    text-decoration: none;
}
.rmt-home-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.rmt-home-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.rmt-home-body h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #f5f8ff;
}
.rmt-home-body p {
    margin: 0 0 6px;
    font-size: 12px;
    color: #b6c0d1;
    line-height: 1.35;
}
.rmt-home-body p strong {
    color: #d7deea;
}
.rmt-home-actions {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}
.rmt-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.rmt-home-cta {
    margin: 14px auto 4px;
    max-width: 980px;
    background: linear-gradient(180deg, #121a26 0%, #101722 100%);
    border: 1px solid #2a3340;
    border-radius: 10px;
    padding: 14px 16px;
}
.rmt-home-cta h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #e8f2ff;
}
.rmt-home-cta p {
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.4;
    color: #c1ccdc;
}
.rmt-home-cta p strong {
    color: #edf4ff;
}
.rmt-home-cta a {
    color: #7ed2ff;
    text-decoration: none;
}
.rmt-home-cta a:hover {
    color: #a6e2ff;
    text-decoration: underline;
}
.site-copyright {
    margin-top: 16px;
    border-top: 1px solid #2b3440;
    background: linear-gradient(180deg, rgba(18, 22, 28, 0.7) 0%, rgba(10, 12, 16, 0.95) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.site-copyright-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 14px 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    color: #9ca7b6;
    font-size: 12px;
    letter-spacing: .2px;
}
.copyright-mark {
    color: #c7d0dc;
    font-size: 13px;
    line-height: 1;
}
.copyright-dot {
    color: #5d6878;
}
@media (min-width: 768px) {
    .search-submit {
        width: 34px;
        height: 34px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 768px) {
    body { padding: 10px !important; }
    h3 { font-size: 1.1rem; }
    .filter-bar { padding: 10px 0; }
    .sponsor-slots {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }
    .sponsor-slot {
        padding: 0;
    }
    .sponsor-slot-image,
    .sponsor-slot-placeholder {
        aspect-ratio: 2 / 1;
    }
    .rmt-home-grid {
        grid-template-columns: 1fr;
        justify-content: center;
        gap: 8px;
    }
    .rmt-home-image-box {
        width: 100px;
        min-width: 100px;
    }
    .filter-form { max-width: 760px; }
    .filter-form .mobile-stack { margin-bottom: .5rem; }
    .range-wrap { width:100%; justify-content:space-between; }
    .range-wrap input[type="number"] { width:56px; }
    .dual-range { width: calc(100% - 124px); min-width: 120px; }
    .pagination-form { gap:4px; }
    .pagination-form button { min-width:36px; padding:.2rem .45rem; font-size:.85rem; }
    .pagination-form .me-2 { flex: 0 0 100%; margin-right: 0 !important; margin-bottom: .25rem; }
    .market-mobile-list { display:block; }
    .market-table th:nth-child(3),
    .market-table td:nth-child(3),
    .market-table th:nth-child(4),
    .market-table td:nth-child(4) { display:none; }
    .table { min-width: 760px; font-size:.9rem; }
    .table td, .table th { padding:.45rem; }
    td img { width:26px; height:26px; }
    .market-item-icon { width:28px; height:28px; }
    .site-copyright-inner {
        flex-wrap: wrap;
        gap: 6px;
        text-align: center;
    }
    .coffee-donate-btn {
        top: 16px;
        opacity: 0.95;
    }
    .filter-bar.has-donate-docked .search-col {
        gap: 6px;
    }
    .coffee-donate-trigger {
        padding: 6px 10px;
        font-size: 11px;
    }
    .updated-status {
        flex-wrap: wrap;
        gap: 6px;
    }
    .top-actions {
        top: 0;
        right: 0;
    }
}
@media (max-width: 1280px) and (min-width: 769px) {
    .rmt-home-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 980px) and (min-width: 769px) {
    .rmt-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* Lives + RMT split block */
.home-side-lists {
    max-width: 1400px;
    margin: 14px auto 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.home-side-col {
    background: #111722;
    border: 1px solid #283243;
    border-radius: 10px;
    padding: 10px;
}
.home-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.home-side-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #eaf2ff;
    letter-spacing: .4px;
}
.home-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.community-cta-wrap {
    max-width: 1400px;
    margin: 8px auto 10px;
    display: flex;
    justify-content: center;
}
.community-cta-btn {
    border: 1px solid #2f4159;
    background: linear-gradient(180deg, #172338 0%, #131d2e 100%);
    color: #dbe9ff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.community-cta-btn:hover,
.community-cta-btn:focus-visible {
    transform: translateY(-1px);
    border-color: #3f6fa8;
    color: #eef6ff;
}
.community-cta-btn i {
    color: #49c5ff;
}
.home-mini-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-mini-carousel-wrap {
    position: relative;
}
.home-slider-viewport {
    overflow: hidden;
}
.home-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    transition: transform .42s ease;
    will-change: transform;
}
.home-slider-card {
    min-width: 0;
}
.home-mini-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    opacity: 1;
    z-index: 8;
    pointer-events: auto;
}
.home-mini-control.carousel-control-prev {
    left: 6px;
}
.home-mini-control.carousel-control-next {
    right: 6px;
}
.home-mini-control .carousel-control-prev-icon,
.home-mini-control .carousel-control-next-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background-color: rgba(10, 20, 35, 0.8);
    border: 1px solid #3b4f6f;
    background-size: 60% 60%;
}
.home-mini-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #2c3749;
    background: #171f2c;
    text-decoration: none;
}
.home-mini-card-btn {
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.home-mini-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #0f141d;
    border: 1px solid #2a3342;
}
.home-mini-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-mini-name {
    display: block;
    color: #e7eefc;
    font-size: 13px;
    line-height: 1.25;
    word-break: break-word;
}
.home-live-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.home-live-social-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid #35527c;
    background: #101a2a;
    color: #b8d2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
}
.home-live-social-icon:hover {
    color: #e8f2ff;
    border-color: #5a8dd6;
    background: #14233a;
}
.live-status-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(10,14,20,.85);
    color: #d7e5fb;
}
.live-status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.live-status-badge.online .dot { background: #33d17a; box-shadow: 0 0 0 2px rgba(51,209,122,.2); }
.live-status-badge.offline .dot { background: #7d8798; }
.home-empty-box {
    grid-column: 1 / -1;
    border: 1px dashed #3b4960;
    border-radius: 10px;
    color: #9fb0c9;
    padding: 12px;
    text-align: center;
    font-size: 13px;
}
.home-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.home-modal-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #2a3340;
    border-radius: 10px;
    background: #161d29;
    overflow: hidden;
}
.home-modal-image-link { text-decoration: none; }
.home-modal-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #111723;
    border-bottom: 1px solid #2a3340;
}
.home-modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-modal-body {
    padding: 10px;
}
.home-modal-body h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #f2f6ff;
}
.home-modal-body p {
    margin: 0 0 6px;
    font-size: 12px;
    color: #b9c4d8;
}
.home-modal-body p strong {
    color: #e5edf9;
}

@media (max-width: 1200px) {
    .home-modal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .home-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .home-side-lists {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .home-side-head h2 {
        font-size: 18px;
    }
    .home-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-mini-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-modal-grid {
        grid-template-columns: 1fr;
    }
    #livesModal .home-modal-card,
    #rmtModal .home-modal-card {
        display: grid;
        grid-template-columns: 42% 58%;
        align-items: stretch;
    }
    #livesModal .home-modal-image-link,
    #rmtModal .home-modal-image-link {
        display: block;
        height: 100%;
    }
    #livesModal .home-modal-image-wrap,
    #rmtModal .home-modal-image-wrap {
        height: 100%;
        aspect-ratio: auto;
        border-bottom: 0;
        border-right: 1px solid #2a3340;
    }
    #livesModal .home-modal-body,
    #rmtModal .home-modal-body {
        padding: 8px;
    }
    #livesModal .home-modal-body h3,
    #rmtModal .home-modal-body h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    #livesModal .home-modal-body p,
    #rmtModal .home-modal-body p {
        margin-bottom: 4px;
        font-size: 12px;
    }
    #livesModal .home-modal-body .btn,
    #rmtModal .home-modal-body .btn {
        margin-top: 6px !important;
    }
}
@media (max-width: 1280px) and (min-width: 981px) {
    .home-mini-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 980px) and (min-width: 769px) {
    .home-mini-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── item autocomplete dropdown ── */
.search-ac-dropdown {
    position: absolute;
    z-index: 1200;
    background: #1e2330;
    border: 1px solid #3a4e68;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #3a4e68 #1e2330;
}
.search-ac-dropdown::-webkit-scrollbar { width: 5px; }
.search-ac-dropdown::-webkit-scrollbar-track { background: #1e2330; }
.search-ac-dropdown::-webkit-scrollbar-thumb { background: #3a4e68; border-radius: 99px; }
.search-ac-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #dbe7ff;
    border-bottom: 1px solid rgba(58,78,104,0.35);
    transition: background 0.1s;
    user-select: none;
}
.search-ac-row:last-child { border-bottom: none; }
.search-ac-row:hover,
.search-ac-row.is-active { background: rgba(23,195,195,0.12); }
.search-ac-row--all {
    color: #17c3c3;
    font-weight: 500;
    border-bottom: 1px solid #3a4e68;
    position: sticky;
    top: 0;
    background: #1e2330;
    z-index: 1;
}
.search-ac-row--all:hover,
.search-ac-row--all.is-active { background: #212840; }
.search-ac-row--all strong { color: #eef3fb; font-weight: 600; }
.search-ac-icon { flex-shrink: 0; font-size: 13px; opacity: 0.75; }
.search-ac-empty,
.search-ac-loader {
    padding: 10px 14px;
    font-size: 13px;
    color: #6a8090;
    text-align: center;
}
.search-ac-more {
    padding: 8px 14px;
    font-size: 12px;
    color: #4a6070;
    text-align: center;
}
.search-ac-separator {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #f0a030;
    background: rgba(240,160,48,0.07);
    border-bottom: 1px solid rgba(240,160,48,0.18);
    border-top: 1px solid rgba(240,160,48,0.18);
}
.search-ac-separator .search-ac-icon { font-size: 12px; opacity: 0.85; }
