body.trade-market-page {
    background: #ffffff;
}

.trade-market-wrap {
    max-width: 1380px;
}

.trade-search-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 32px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.08);
    padding: 32px;
    backdrop-filter: blur(12px);
}

.trade-search-box {
    margin-bottom: 28px;
}

.trade-price-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.trade-price-filter-label {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

.trade-price-inputs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-price-field {
    width: 112px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #0f172a;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trade-price-field:focus {
    border-color: rgba(37, 99, 235, 0.58);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.trade-price-separator {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
}

.trade-price-quick-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-price-quick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-price-quick:hover {
    border-color: rgba(59, 130, 246, 0.44);
    color: #2563eb;
}

.trade-price-quick.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    font-weight: 700;
}

.trade-search-title {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.trade-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 8px 12px 8px 16px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 26px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.trade-search-icon {
    font-size: 24px;
    color: #2563eb;
}

.trade-search-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    min-width: 0;
}

.trade-search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.trade-search-btn {
    border-radius: 18px;
    padding: 10px 24px;
    min-width: 132px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.trade-mobile-filter-toggle,
.trade-mobile-filter-head,
.trade-mobile-filter-actions,
.trade-filter-drawer-backdrop {
    display: none;
}

.trade-filter-block {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.trade-filter-block + .trade-filter-block {
    margin-top: 18px;
}

.trade-filter-label {
    padding-top: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
}

.trade-filter-input-wrap {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.trade-filter-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.trade-filter-input::placeholder {
    color: #94a3b8;
}

.trade-chip-grid,
.trade-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trade-group-toolbar,
.trade-group-row {
    width: 100%;
}

.trade-group-toolbar {
    margin-bottom: 4px;
}

.trade-group-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.trade-group-row-label {
    padding-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 21px;
    white-space: nowrap;
}

.trade-group-row-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.trade-group-inline-tip {
    min-height: 21px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.trade-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
}

.trade-filter-chip,
.trade-item-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 16px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    transition: all 0.22s ease;
    cursor: pointer;
    text-align: center;
}

.trade-chip-list .trade-filter-chip {
    min-height: 21px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.trade-chip-grid .trade-filter-chip {
    min-width: 100%;
    min-height: 22px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.trade-filter-tip {
    display: block;
    margin-top: 14px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
    color: #dc2626;
}

.trade-filter-chip:hover,
.trade-item-chip:hover {
    border-color: rgba(37, 99, 235, 0.38);
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.12);
}

.trade-filter-chip.active,
.trade-item-chip.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.trade-inline-tip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    color: #64748b;
    font-size: 14px;
    border: 1px dashed rgba(203, 213, 225, 0.9);
}

.trade-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.trade-toolbar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trade-toolbar-tip {
    font-size: 14px;
    color: #64748b;
}

.trade-toolbar-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.trade-toolbar-select {
    min-width: 168px;
    border-radius: 14px;
    border-color: rgba(203, 213, 225, 0.95);
}

.trade-result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.trade-result-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f59e0b;
    margin-bottom: 8px;
}

.trade-result-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.trade-result-count {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 999px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

#tradeGrid {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
}

.trade-card {
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.trade-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 24px 46px rgba(37, 99, 235, 0.12);
}

.trade-card-col {
    width: 16.666667%;
    max-width: 16.666667%;
}

.trade-card.trade-card-compact {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 258px;
    padding: 14px;
    border-radius: 18px;
    position: relative;
}

.trade-card.trade-card-compact:hover {
    color: inherit;
}

.trade-card.trade-card-compact.is-selected {
    border-color: rgba(59, 130, 246, 0.72);
    box-shadow: 0 24px 46px rgba(37, 99, 235, 0.16);
}

.trade-card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
}

.trade-card-link:hover {
    color: inherit;
}

.trade-select-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: transparent;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}

.trade-select-btn:hover {
    border-color: rgba(59, 130, 246, 0.42);
    transform: translateY(-1px);
}

.trade-select-btn i {
    font-size: 14px;
}

.trade-select-btn.is-selected {
    border-color: #ef4444;
    background: #ef4444;
    color: #ffffff;
}

.trade-card.trade-card-compact .trade-card-name {
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.trade-card-thumb-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 142px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 14px;
    overflow: hidden;
}

.trade-card-thumb-mini img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.trade-card-thumb-mini .trade-no-thumb {
    font-size: 34px;
}

.trade-compact-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.trade-class-badge.trade-class-badge-compact {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.trade-price-wrap {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

.trade-price.trade-price-compact {
    font-size: 22px;
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.trade-thumb-wrap {
    position: relative;
    height: 236px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 36%),
        linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}

.trade-thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.trade-no-thumb {
    font-size: 42px;
    color: #cbd5e1;
}

.trade-hot-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    font-size: 12px;
    font-weight: 700;
}

.trade-card-body {
    padding: 24px;
}

.trade-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.trade-card-name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    word-break: break-all;
}

.trade-class-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.trade-card-no {
    margin-bottom: 14px;
    font-size: 13px;
    color: #64748b;
}

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

.trade-meta-card {
    min-height: 74px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.trade-meta-label {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.trade-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    line-height: 1.55;
    word-break: break-word;
}

.trade-goods-wrap {
    min-height: 116px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.92);
    margin-bottom: 18px;
}

.trade-goods-label {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.trade-goods-text {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.trade-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.trade-price-label {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.trade-price {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #dc2626;
}

.trade-detail-btn {
    border-radius: 999px;
    padding-left: 20px;
    padding-right: 20px;
    font-weight: 700;
}

.trade-empty-card {
    padding: 64px 20px;
    border-radius: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.52);
    background: rgba(255, 255, 255, 0.84);
    text-align: center;
    color: #64748b;
}

.trade-empty-card i {
    font-size: 42px;
    color: #94a3b8;
}

.trade-back-top {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: #2563eb;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.22s ease;
}

.trade-back-top:hover {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

.trade-back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.trade-back-top i {
    font-size: 20px;
}

.trade-share-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 1090;
    width: min(1120px, calc(100% - 24px));
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 18px);
    transition: all 0.22s ease;
    pointer-events: none;
}

.trade-share-bar.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.trade-share-bar-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background:
        radial-gradient(circle at 0 0, rgba(191, 219, 254, 0.75), transparent 18%),
        radial-gradient(circle at 100% 100%, rgba(191, 219, 254, 0.72), transparent 16%),
        rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    position: relative;
}

.trade-share-bar-close {
    display: none;
}

.trade-share-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #475569;
    font-size: 15px;
}

.trade-share-bar-info strong {
    color: #2563eb;
    font-size: 20px;
    font-weight: 800;
}

.trade-share-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trade-share-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.trade-share-btn.btn-primary {
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.trade-poster-modal .modal-dialog {
    max-width: 1240px;
}

.trade-poster-modal .modal-content,
.trade-phone-modal .modal-content {
    border: 0;
    border-radius: 28px;
    box-shadow: 0 32px 70px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.trade-poster-modal .modal-header,
.trade-phone-modal .modal-header {
    padding: 20px 24px;
    border-bottom-color: rgba(226, 232, 240, 0.9);
}

.trade-poster-modal .modal-body {
    padding: 22px 24px 26px;
    background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
}

.poster-config-panel {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.poster-config-title {
    margin-bottom: 16px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
}

.poster-config-row + .poster-config-row {
    margin-top: 16px;
}

.poster-config-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.poster-config-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.poster-config-input:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.poster-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.poster-option-btn,
.poster-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    min-width: 48px;
    padding: 0 14px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.poster-toggle-btn {
    justify-content: flex-start;
    min-width: 120px;
}

#posterColumnsOptions,
#posterMetaOptions,
#posterExtraOptions {
    flex-wrap: nowrap;
    gap: 6px;
}

#posterColumnsOptions .poster-option-btn,
#posterMetaOptions .poster-toggle-btn,
#posterExtraOptions .poster-toggle-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.poster-option-btn:hover,
.poster-toggle-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: #2563eb;
}

.poster-option-btn.is-active,
.poster-toggle-btn.is-active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.poster-config-tip {
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

.poster-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.poster-action-btn {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 700;
}

#tradePhoneShareModal .trade-share-btn {
    min-height: 38px;
    padding: 0 16px;
}

.poster-preview-panel {
    min-height: 100%;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.poster-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.poster-preview-title {
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
}

.poster-preview-status {
    color: #64748b;
    font-size: 12px;
}

.poster-preview-canvas-wrap {
    position: relative;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.96);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.poster-preview-canvas {
    width: min(100%, 560px);
    height: auto;
    display: block;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.poster-preview-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.72);
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

.poster-preview-loading.is-visible {
    display: flex;
}

.trade-phone-modal .modal-body {
    padding: 26px 24px 30px;
    text-align: center;
}

.trade-share-qr-shell {
    width: 220px;
    height: 220px;
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-share-phone-tip {
    margin-bottom: 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.75;
}

.trade-share-url-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.trade-share-url-input {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
}

.trade-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.trade-pagination-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trade-summary-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.trade-summary-pill strong {
    margin-left: 6px;
    color: #0f172a;
    font-weight: 800;
}

#marketPagination .pagination {
    gap: 8px;
    margin: 0;
}

#marketPagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 30px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid rgba(203, 213, 225, 0.88);
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

#marketPagination .page-link:hover {
    border-color: rgba(59, 130, 246, 0.42);
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.1);
}

#marketPagination .page-item.active .page-link {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

#marketPagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.92);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

#marketPagination .page-link-page {
    min-width: 30px;
    padding: 0;
}

#marketPagination .page-link-nav {
    gap: 6px;
    min-width: auto;
}

@media (max-width: 991.98px) {
    .trade-search-panel {
        padding: 24px 20px;
        border-radius: 28px;
    }

    .trade-price-filter {
        gap: 10px;
    }

    .trade-filter-block {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .trade-filter-label {
        padding-top: 0;
    }

    .trade-group-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .trade-group-row-label {
        padding-top: 0;
        line-height: 1.4;
    }

    .trade-search-input-wrap {
        min-height: auto;
        flex-wrap: wrap;
    }

    .trade-search-btn {
        width: 100%;
    }

    .trade-card-col {
        width: 33.333333%;
        max-width: 33.333333%;
    }

    .trade-pagination-bar {
        padding: 14px;
    }

    .trade-share-bar-shell {
        padding: 14px;
    }

    .trade-share-bar-actions {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    body.trade-market-filter-open {
        overflow: hidden;
    }

    .trade-market-wrap {
        padding-top: 12px !important;
        padding-bottom: 24px !important;
    }

    .trade-search-panel {
        margin-bottom: 14px !important;
        padding: 10px;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        backdrop-filter: none;
    }

    .trade-search-box {
        margin-bottom: 0;
    }

    .trade-search-input-wrap {
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr) auto auto;
        gap: 8px;
        min-height: 46px;
        padding: 6px 6px 6px 12px;
        border-radius: 10px;
    }

    .trade-search-icon {
        font-size: 18px;
    }

    .trade-result-title {
        font-size: 20px;
    }

    .trade-search-input {
        font-size: 15px;
        font-weight: 600;
    }

    .trade-search-btn {
        width: auto;
        min-width: 0;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 8px;
        box-shadow: none;
        font-size: 13px;
        white-space: nowrap;
    }

    .trade-search-btn .bi {
        margin-right: 0 !important;
    }

    .trade-mobile-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 34px;
        padding: 0 10px;
        border: 1px solid rgba(37, 99, 235, 0.28);
        border-radius: 8px;
        background: #f8fbff;
        color: #1d4ed8;
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
    }

    .trade-mobile-filter-toggle.is-active {
        border-color: #2563eb;
        background: rgba(37, 99, 235, 0.08);
    }

    .trade-filter-drawer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1120;
        display: flex;
        max-height: min(82vh, 680px);
        padding: 0 14px calc(14px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        background: #ffffff;
        box-shadow: 0 -18px 44px rgba(15, 23, 42, 0.18);
        flex-direction: column;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateY(104%);
        transition: transform 0.24s ease;
    }

    .trade-filter-drawer.is-open {
        transform: translateY(0);
    }

    .trade-filter-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1110;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .trade-filter-drawer-backdrop.is-visible {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .trade-mobile-filter-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex: 0 0 auto;
        min-height: 52px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
        position: sticky;
        top: 0;
        z-index: 2;
        background: #ffffff;
    }

    .trade-mobile-filter-head strong {
        color: #0f172a;
        font-size: 16px;
        font-weight: 800;
    }

    .trade-mobile-filter-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 10px;
        background: #f1f5f9;
        color: #334155;
    }

    .trade-filter-drawer > .trade-price-filter {
        margin-top: 14px;
    }

    .trade-filter-drawer > .trade-price-filter,
    .trade-filter-drawer > .trade-filter-block {
        display: block;
        flex: 0 0 auto;
        margin-bottom: 16px;
    }

    .trade-filter-drawer > .trade-toolbar {
        flex: 0 0 auto;
    }

    .trade-price-filter {
        gap: 8px;
    }

    .trade-price-filter-label,
    .trade-filter-label {
        display: block;
        margin-bottom: 8px;
        padding-top: 0;
        color: #0f172a;
        font-size: 13px;
        font-weight: 800;
    }

    .trade-filter-tip {
        margin-top: 6px;
        font-size: 10px;
    }

    .trade-price-field {
        width: 96px;
        height: 34px;
        border-radius: 8px;
    }

    .trade-price-quick-list,
    .trade-chip-list {
        gap: 7px;
    }

    .trade-price-quick,
    .trade-filter-chip,
    .trade-item-chip,
    .trade-chip-list .trade-filter-chip,
    .trade-chip-grid .trade-filter-chip {
        min-height: 30px;
        padding: 5px 9px;
        border-radius: 8px;
        font-size: 12px;
        line-height: 1.25;
    }

    .trade-chip-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
        max-height: 168px;
        overflow: auto;
        padding-right: 2px;
    }

    .trade-filter-input-wrap {
        min-height: 38px;
        border-radius: 8px;
    }

    .trade-toolbar {
        display: block;
        margin-top: 0;
        padding-top: 12px;
    }

    .trade-toolbar-info {
        display: block;
    }

    #clearFiltersBtn {
        display: none;
    }

    .trade-toolbar-tip {
        display: block;
        margin-bottom: 10px;
        font-size: 12px;
        line-height: 1.45;
    }

    .trade-toolbar-controls,
    .trade-toolbar-select {
        width: 100%;
    }

    .trade-mobile-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
        gap: 10px;
        flex: 0 0 auto;
        padding-top: 12px;
        border-top: 1px solid rgba(226, 232, 240, 0.9);
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #ffffff;
    }

    .trade-mobile-filter-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 42px;
        border: 0;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 800;
    }

    .trade-mobile-filter-reset {
        background: #f1f5f9;
        color: #334155;
    }

    .trade-mobile-filter-apply {
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    }

    .trade-result-head {
        align-items: center;
        margin-bottom: 10px !important;
    }

    .trade-result-count {
        min-height: 30px;
        padding: 5px 9px;
        border-radius: 8px;
        font-size: 12px;
        box-shadow: none;
    }

    .trade-meta-grid {
        grid-template-columns: 1fr;
    }

    .trade-price {
        font-size: 18px;
    }

    .trade-card-col {
        width: 50%;
        max-width: 50%;
    }

    #tradeGrid {
        --bs-gutter-x: 8px;
        --bs-gutter-y: 8px;
    }

    .trade-back-top {
        right: 16px;
        bottom: 98px;
    }

    .trade-card.trade-card-compact {
        min-height: 0;
        padding: 8px;
        border-radius: 10px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    }

    .trade-card-thumb-mini {
        height: auto;
        aspect-ratio: 1 / 1;
        margin-bottom: 8px;
        padding: 6px;
        border-radius: 8px;
        background: #f8fafc;
    }

    .trade-card.trade-card-compact .trade-card-name {
        min-height: 18px;
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.35;
        -webkit-line-clamp: 1;
    }

    .trade-select-btn {
        top: 8px;
        left: 8px;
        width: 22px;
        height: 22px;
    }

    .trade-compact-meta {
        align-items: center;
        gap: 6px;
        width: 100%;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .trade-class-badge.trade-class-badge-compact {
        flex: 0 0 auto;
        min-height: 24px;
        padding: 3px 7px;
        border-radius: 6px;
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .trade-price-label {
        display: none;
    }

    .trade-price.trade-price-compact {
        font-size: var(--trade-price-fit-size, 15px);
        line-height: 1.2;
        letter-spacing: 0;
    }

    .trade-pagination-bar {
        flex-direction: column;
        align-items: stretch;
        margin-top: 14px !important;
        padding: 10px;
        border-radius: 12px;
        box-shadow: none;
    }

    .trade-pagination-summary {
        justify-content: center;
    }

    #marketPagination .pagination {
        justify-content: center;
    }

    .trade-mobile-load-more {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 40px;
        border: 1px solid rgba(37, 99, 235, 0.24);
        border-radius: 10px;
        background: #f8fbff;
        color: #1d4ed8;
        font-size: 14px;
        font-weight: 800;
    }

    .trade-mobile-load-more[disabled] {
        color: #94a3b8;
        background: #f8fafc;
        border-color: rgba(226, 232, 240, 0.9);
    }

    .trade-share-bar {
        bottom: 12px;
        width: calc(100% - 16px);
    }

    .trade-share-bar-shell {
        gap: 10px;
        padding: 10px;
        border-radius: 14px;
    }

    .trade-share-bar-info {
        width: 100%;
        gap: 6px;
        font-size: 12px;
    }

    .trade-share-bar-info strong {
        font-size: 16px;
    }

    .trade-share-bar-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .trade-share-btn {
        min-height: 34px;
        padding: 0 8px;
        border-radius: 8px;
        font-size: 12px;
        box-shadow: none;
    }

    #openSharePosterBtn {
        grid-column: 1 / -1;
        min-height: 38px;
    }

    .poster-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .poster-action-btn {
        width: 100%;
    }

    .trade-share-url-group {
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .trade-card-col {
        width: 50%;
        max-width: 50%;
    }

    .trade-back-top {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
}

/* =============================================
   筛选抽屉优化
   ============================================= */

/* 1. 类别chips强制单行显示，4列布局（5列过窄易换行） */
@media (max-width: 767.98px) {
    .trade-filter-drawer .trade-chip-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-height: 196px;
    }

    .trade-filter-drawer .trade-chip-grid .trade-filter-chip {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        text-align: center;
    }
}

/* 搜索按钮：移动端只显示图标 */
@media (max-width: 767.98px) {
    .trade-search-btn-text {
        display: none;
    }
}

/* 筛选按钮有激活条件时显示红点 */
.trade-mobile-filter-toggle {
    position: relative;
}

.trade-mobile-filter-toggle.has-filter::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    border: 1px solid #fff;
}

/* 移动端排序快捷 Chip 行 */
@media (max-width: 767.98px) {
    .trade-mobile-sort-row {
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .trade-sort-chip {
        display: inline-flex;
        align-items: center;
        height: 26px;
        padding: 0 12px;
        border: 1px solid rgba(203, 213, 225, 0.9);
        border-radius: 999px;
        background: #fff;
        color: #475569;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.18s ease;
    }

    .trade-sort-chip.is-active {
        border-color: #2563eb;
        background: rgba(37, 99, 235, 0.08);
        color: #1d4ed8;
        font-weight: 700;
    }
}

/* 卡片：移动端2行名称 + 图片背景 + 点击反馈 */
@media (max-width: 767.98px) {
    .trade-card.trade-card-compact .trade-card-name {
        -webkit-line-clamp: 2;
        min-height: 32px;
    }

    .trade-card-thumb-mini {
        background: #f0f4f8;
    }

    .trade-card.trade-card-compact:active {
        transform: scale(0.96);
        opacity: 0.88;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }
}

/* 骨架屏样式 */
@keyframes trade-skeleton-shimmer {
    0%   { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.trade-card-skeleton {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: #fff;
    overflow: hidden;
}

.trade-skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 400px 100%;
    animation: trade-skeleton-shimmer 1.4s ease-in-out infinite;
}

.trade-skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.trade-skeleton-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 400px 100%;
    animation: trade-skeleton-shimmer 1.4s ease-in-out infinite;
}

.trade-skeleton-line-name {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.trade-skeleton-line-badge {
    height: 20px;
    width: 44px;
}

.trade-skeleton-line-price {
    height: 16px;
    width: 40px;
}

/* 2. 价格快捷按钮改为横向单行滚动，节省抽屉纵向空间 */
@media (max-width: 767.98px) {
    .trade-filter-drawer .trade-price-quick-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .trade-filter-drawer .trade-price-quick-list::-webkit-scrollbar {
        display: none;
    }

    .trade-filter-drawer .trade-price-quick {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* 3. 群组chips区域限高，防止撑开抽屉 */
@media (max-width: 767.98px) {
    .trade-filter-drawer #groupChipList {
        max-height: 108px;
        overflow-y: auto;
    }
}

/* 4. 排序 select 在抽屉内移到底部、label文字缩短 */
@media (max-width: 767.98px) {
    .trade-filter-drawer .trade-toolbar-select {
        font-size: 13px;
    }
}

/* 分享栏关闭按钮（移动端显示） */
@media (max-width: 767.98px) {
    .trade-share-bar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -10px;
        right: -6px;
        width: 24px;
        height: 24px;
        border: 1px solid rgba(203, 213, 225, 0.9);
        border-radius: 50%;
        background: #ffffff;
        color: #64748b;
        font-size: 16px;
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
        cursor: pointer;
        z-index: 2;
        transition: all 0.18s ease;
    }

    .trade-share-bar-close:hover,
    .trade-share-bar-close:active {
        background: #f1f5f9;
        color: #0f172a;
    }
}
