/* Handelsposten - die tradepost-Regeln aus public/style/modules.css und mobile-fix.css (live), unverändert übernommen. */
/* aus style/modules.css */
.tradepost-screen {
    gap: 16px !important;
}

.tradepost-screen .tradepost-hero,
.tradepost-screen .siege-hero {
    border-radius: 19px !important;
    border: 1px solid rgba(116, 203, 232, 0.18) !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(93, 255, 177, 0.075), transparent 36%),
        radial-gradient(circle at 90% 0%, rgba(255, 184, 82, 0.052), transparent 34%),
        linear-gradient(180deg, rgba(21, 25, 28, 0.95), rgba(10, 12, 14, 0.985)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.045),
        inset 0 0 34px rgba(116, 203, 232, 0.025),
        0 16px 34px rgba(0,0,0,0.36) !important;
    overflow: hidden !important;
}

.tradepost-hero .tradepost-stat-grid > span,
.tradepost-stat-grid > span {
    min-width: 118px !important;
    padding: 9px 11px !important;
    border: 1px solid rgba(193, 197, 204, 0.14) !important;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, 0.28) !important;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.26) !important;
}

.tradepost-stat-grid strong,
.tradepost-stat-grid div[style*="font-weight:bold"] {
    color: #f7fdff !important;
    font-family: 'Orbitron', monospace !important;
    letter-spacing: 0.6px !important;
}

.tradepost-card {
    border-radius: 18px !important;
    border: 1px solid rgba(193, 197, 204, 0.15) !important;
    background:
        linear-gradient(180deg, rgba(193, 197, 204, 0.043), rgba(255, 255, 255, 0.010) 44%, rgba(0, 0, 0, 0.10)),
        rgba(7, 8, 10, 0.90) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.045),
        0 14px 30px rgba(0,0,0,0.30) !important;
}

.tradepost-card h3 {
    margin-top: 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(193, 197, 204, 0.10) !important;
    color: #f7fdff !important;
    font: 900 0.86rem 'Orbitron', monospace !important;
    letter-spacing: 1.1px !important;
    text-transform: uppercase !important;
}

.tradepost-form-grid {
    gap: 9px !important;
}

.tradepost-form-grid label {
    display: grid !important;
    gap: 6px !important;
    color: rgba(242, 243, 244, 0.68) !important;
    font: 800 0.66rem 'Orbitron', monospace !important;
    letter-spacing: 1.1px !important;
    text-transform: uppercase !important;
}

.tradepost-form-grid input,
.tradepost-form-grid select,
.tradepost-card input,
.tradepost-card select {
    min-height: 39px !important;
    border: 1px solid rgba(193, 197, 204, 0.18) !important;
    border-radius: 10px !important;
    background: rgba(0, 0, 0, 0.38) !important;
    color: #eafdff !important;
    padding: 8px 10px !important;
    font: 800 0.82rem 'Courier New', monospace !important;
    box-shadow: inset 0 0 16px rgba(0,0,0,0.28) !important;
    outline: none !important;
}

.tradepost-form-grid input:focus,
.tradepost-form-grid select:focus,
.tradepost-card input:focus,
.tradepost-card select:focus {
    border-color: rgba(251, 103, 86, 0.38) !important;
    box-shadow: inset 0 0 16px rgba(0,0,0,0.28), 0 0 0 3px rgba(251, 103, 86, 0.055) !important;
}

.tradepost-offer-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 15px !important;
    border: 1px solid rgba(193, 197, 204, 0.13) !important;
    background:
        linear-gradient(180deg, rgba(193, 197, 204, 0.036), rgba(0,0,0,0.10)),
        rgba(6, 7, 8, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035) !important;
}

.tradepost-offer-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(205, 209, 214, 0.7), rgba(251, 103, 86, 0.42));
    opacity: 0.85;
    pointer-events: none;
}

.tradepost-own-offer::before {
    background: linear-gradient(180deg, rgba(255, 184, 82, 0.78), rgba(255, 92, 92, 0.34));
}

.tradepost-offer-exchange {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) minmax(112px, auto) !important;
}

.tradepost-resource-box {
    border-radius: 12px !important;
    border: 1px solid rgba(116, 203, 232, 0.13) !important;
    background: rgba(0, 0, 0, 0.27) !important;
    color: rgba(221, 247, 255, 0.62) !important;
    font: 800 0.72rem 'Orbitron', monospace !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
}

.tradepost-resource-box strong {
    display: block !important;
    margin-top: 4px !important;
    color: #f7fdff !important;
    font: 900 0.88rem 'Courier New', monospace !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.tradepost-scroll-list {
    padding-right: 4px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(193, 197, 204, 0.34) rgba(0, 0, 0, 0.25);
}

.tradepost-action-btn,
.tradepost-card .tech-card-btn {
    border-radius: 10px !important;
    border: 1px solid rgba(193, 197, 204, 0.20) !important;
    color: #0d0f11 !important;
    background: linear-gradient(135deg, rgba(205, 209, 214, 0.95), rgba(251, 103, 86, 0.86)) !important;
    font: 900 0.70rem 'Orbitron', monospace !important;
    letter-spacing: 1.1px !important;
    text-transform: uppercase !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25) !important;
}

.tradepost-action-btn:hover,
.tradepost-card .tech-card-btn:hover {
    filter: brightness(1.06) saturate(1.05) !important;
    transform: translateY(-1px) !important;
}

.tradepost-scrap-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(130px, 0.9fr) minmax(116px, auto) !important;
    border-bottom: 1px solid rgba(193, 197, 204, 0.08) !important;
}

@media (max-width: 900px) {
    .tradepost-offer-exchange,
    .tradepost-scrap-row {
        grid-template-columns: 1fr !important;
    }
}

.tradepost-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.tradepost-hero {
    border-color: rgba(188, 193, 200, 0.25) !important;
    box-shadow: 0 0 25px rgba(157, 164, 175, 0.08) !important;
    min-width: 0;
}

.tradepost-hero-copy {
    min-width: min(100%, 520px);
}

.tradepost-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 7px;
    padding: 4px 9px;
    border: 1px solid rgba(191, 196, 203, 0.24);
    border-radius: 999px;
    background: rgba(17, 20, 23, 0.72);
    color: rgba(217, 220, 224, 0.86);
    font: 900 0.66rem 'Orbitron', monospace;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tradepost-hero p,
.tradepost-help {
    color: rgba(204, 208, 213, 0.82);
    line-height: 1.52;
}

.tradepost-hero p {
    max-width: 920px;
    margin: 0;
}

.tradepost-stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
}

.tradepost-stat-card {
    min-width: 152px;
    padding: 11px 13px;
    border: 1px solid rgba(164, 171, 181, 0.20);
    border-radius: 12px;
    background:
        linear-gradient(145deg, rgba(15, 17, 20, 0.94), rgba(6, 7, 9, 0.9)),
        radial-gradient(circle at 20% 0%, rgba(191, 196, 203, 0.12), transparent 62%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 28px rgba(0, 0, 0, 0.20);
}

.tradepost-stat-card span {
    display: block;
    color: rgba(143, 163, 177, 0.84);
    font-size: 0.72em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tradepost-stat-card strong {
    display: block;
    margin-top: 5px;
    color: rgba(240, 250, 255, 0.96);
    font: 900 1.02rem 'Orbitron', monospace;
}

.tradepost-stat-card.info { border-color: rgba(188, 193, 200, 0.27);
}

.tradepost-stat-card.warning { border-color: rgba(255, 184, 77, 0.23);
}

.tradepost-stat-card.scrap { border-color: rgba(255, 120, 104, 0.22);
}

.tradepost-stat-card.neutral { border-color: rgba(211, 214, 219, 0.15);
}

.tradepost-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 15px;
    border-radius: 14px;
    line-height: 1.48;
}

.tradepost-notice-warning {
    border: 1px solid rgba(255, 184, 77, 0.34);
    background: linear-gradient(135deg, rgba(44, 29, 5, 0.86), rgba(14, 12, 8, 0.94));
    color: rgba(255, 216, 154, 0.95);
}

.tradepost-forms-grid,
.tradepost-offers-grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.tradepost-forms-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.tradepost-offers-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    align-items: start;
}

.tradepost-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(153, 160, 171, 0.22);
    border-radius: 16px;
    background:
        linear-gradient(155deg, rgba(14, 16, 19, 0.96), rgba(6, 7, 8, 0.94)),
        radial-gradient(circle at 0 0, rgba(191, 196, 203, 0.08), transparent 58%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 16px 34px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.tradepost-card h3 {
    margin: 0 0 12px;
    color: rgba(239, 240, 242, 0.96);
    font: 900 1.02rem 'Orbitron', monospace;
    letter-spacing: 0.04em;
}

.tradepost-own-list-card { border-color: rgba(255, 157, 73, 0.22);
}

.tradepost-public-list-card { border-color: rgba(188, 193, 200, 0.22);
}

.tradepost-scrap-card { border-color: rgba(252, 133, 119, 0.22);
}

.tradepost-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.tradepost-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.tradepost-field > span {
    color: rgba(190, 195, 202, 0.82);
    font-size: 0.78em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tradepost-card select,
.tradepost-card input[type="number"] {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid rgba(161, 168, 178, 0.30);
    border-radius: 10px;
    background: rgba(5, 6, 7, 0.88);
    color: rgba(235, 248, 255, 0.95);
    font: 800 0.9rem 'Rajdhani', monospace;
    outline: none;
}

.tradepost-card select:focus,
.tradepost-card input[type="number"]:focus {
    border-color: rgba(194, 198, 205, 0.62);
    box-shadow: 0 0 0 3px rgba(184, 189, 197, 0.12);
}

.tradepost-help {
    margin: 12px 0 13px;
    font-size: 0.84em;
}

.tradepost-help strong {
    color: rgba(253, 171, 162, 0.96);
}

.tradepost-full-btn {
    width: 100%;
}

.tradepost-scroll-list {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.tradepost-own-scroll { max-height: 365px;
}

.tradepost-public-scroll { max-height: 430px;
}

.tradepost-offer-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    margin-bottom: 10px;
    padding: 13px;
    border: 1px solid rgba(151, 159, 170, 0.22);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(11, 12, 14, 0.92), rgba(5, 6, 7, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.tradepost-public-offer {
    border-left: 3px solid rgba(188, 193, 200, 0.75);
}

.tradepost-own-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-left: 3px solid rgba(255, 150, 72, 0.75);
}

.tradepost-offer-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    min-width: 0;
}

.tradepost-offer-commander,
.tradepost-own-main strong {
    display: block;
    min-width: 0;
    color: rgba(245, 252, 255, 0.96);
    font-weight: 900;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.tradepost-offer-base,
.tradepost-own-main small,
.tradepost-own-main em,
.tradepost-offer-time,
.tradepost-offer-meta {
    color: rgba(145, 165, 180, 0.72);
    font-style: normal;
    line-height: 1.38;
}

.tradepost-offer-base,
.tradepost-own-main small,
.tradepost-own-main em {
    display: block;
    margin-top: 3px;
    font-size: 0.78em;
}

.tradepost-offer-time {
    flex: 0 0 auto;
    font-size: 0.75em;
    text-align: right;
}

.tradepost-own-main span {
    color: rgba(145, 165, 180, 0.62);
}

.tradepost-offer-exchange {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.tradepost-resource-box {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 11px;
    border: 1px solid rgba(88, 129, 154, 0.22);
    background: rgba(10, 12, 14, 0.84);
    color: rgba(160, 224, 255, 0.88);
    overflow: hidden;
}

.tradepost-resource-box span {
    display: block;
    color: rgba(145, 165, 180, 0.74);
    font-size: 0.72em;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.tradepost-resource-box strong {
    display: block;
    margin-top: 4px;
    color: rgba(245, 252, 255, 0.96);
    overflow-wrap: anywhere;
}

.tradepost-resource-request {
    border-color: rgba(255, 128, 96, 0.22);
    color: rgba(255, 186, 172, 0.86);
}

.tradepost-exchange-arrow {
    color: rgba(175, 181, 189, 0.68);
    font: 900 1.15rem 'Orbitron', monospace;
}

.tradepost-action-btn,
.tradepost-cancel-btn,
.tradepost-scrap-btn {
    white-space: nowrap;
    border-radius: 10px;
}

.tradepost-action-btn.is-disabled,
.tradepost-full-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.45);
}

.tradepost-cancel-btn {
    padding: 9px 12px;
    border: 1px solid rgba(255, 105, 96, 0.44);
    background: linear-gradient(135deg, rgba(73, 17, 16, 0.90), rgba(27, 7, 8, 0.92));
    color: rgba(255, 175, 166, 0.96);
    font-weight: 900;
    cursor: pointer;
}

.tradepost-scrap-btn {
    padding: 9px 12px;
    border: 1px solid rgba(251, 112, 96, 0.46);
    background: linear-gradient(135deg, rgba(74, 15, 8, 0.90), rgba(25, 14, 5, 0.92));
    color: rgba(252, 166, 157, 0.96);
    font-weight: 900;
    cursor: pointer;
}

.tradepost-offer-meta {
    font-size: 0.75em;
}

.tradepost-empty-state {
    padding: 18px 14px;
    border: 1px dashed rgba(170, 177, 186, 0.22);
    border-radius: 12px;
    background: rgba(8, 9, 11, 0.66);
    color: rgba(184, 189, 197, 0.70);
    text-align: center;
}

.tradepost-scrap-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(108px, 0.68fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(161, 168, 178, 0.10);
}

.tradepost-scrap-row:last-child {
    border-bottom: 0;
}

.tradepost-scrap-unit strong {
    display: block;
    color: rgba(245, 252, 255, 0.95);
    overflow-wrap: anywhere;
}

.tradepost-scrap-unit span,
.tradepost-scrap-refund span {
    color: rgba(186, 192, 199, 0.78);
    font-size: 0.80em;
}

.tradepost-scrap-refund {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tradepost-scrap-refund span {
    padding: 3px 7px;
    border: 1px solid rgba(252, 133, 119, 0.18);
    border-radius: 999px;
    background: rgba(251, 105, 89, 0.06);
    color: rgba(252, 167, 158, 0.82);
}

.tradepost-card select,
.tradepost-card select option,
.tradepost-card select optgroup,
.tradepost-form-grid select,
.tradepost-form-grid select option,
.tradepost-form-grid select optgroup {
    background-color: #0e1013 !important;
    color: #f4fbff !important;
    color-scheme: dark !important;
}

.tradepost-card select option,
.tradepost-form-grid select option {
    padding: 8px 10px !important;
}

.tradepost-card select option:checked,
.tradepost-card select option:hover,
.tradepost-card select option:focus,
.tradepost-form-grid select option:checked,
.tradepost-form-grid select option:hover,
.tradepost-form-grid select option:focus {
    background-color: #282c31 !important;
    color: #ffffff !important;
}

.tradepost-card select:disabled,
.tradepost-card select:disabled option,
.tradepost-form-grid select:disabled,
.tradepost-form-grid select:disabled option {
    background-color: #15181b !important;
    color: rgba(238, 239, 241, 0.72) !important;
}

/* aus style/mobile-fix.css */
.tradepost-screen,
.tradepost-screen * {
    box-sizing: border-box;
}

.tradepost-screen {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.tradepost-card,
.tradepost-offer-card,
.tradepost-resource-box,
.tradepost-scroll-list,
.tradepost-stat-grid,
.tradepost-forms-grid,
.tradepost-offers-grid,
.tradepost-form-grid,
.tradepost-offer-exchange,
.tradepost-scrap-row {
    min-width: 0;
    max-width: 100%;
}

.tradepost-card,
.tradepost-offer-card,
.tradepost-resource-box {
    overflow-wrap: anywhere;
}

.tradepost-resource-box strong,
.tradepost-own-offer > div,
.tradepost-public-offer > div,
.tradepost-scroll-list {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tradepost-scroll-list {
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.tradepost-action-btn {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .tradepost-screen {
        gap: 12px !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    .tradepost-hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }
    .tradepost-hero h2 {
        font-size: 1.08rem !important;
        line-height: 1.2 !important;
        overflow-wrap: anywhere !important;
    }
    .tradepost-hero p {
        max-width: 100% !important;
        font-size: 0.84rem !important;
        line-height: 1.35 !important;
    }
    .tradepost-stat-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        justify-content: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .tradepost-stat-grid > div {
        min-width: 0 !important;
        width: 100% !important;
        padding: 8px !important;
        overflow: hidden !important;
    }
    .tradepost-stat-grid > div > div:last-child {
        font-size: 0.86rem !important;
        line-height: 1.15 !important;
        white-space: normal !important;
    }
    .tradepost-forms-grid,
    .tradepost-offers-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .tradepost-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }
    .tradepost-form-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .tradepost-form-grid > div,
    .tradepost-card input,
    .tradepost-card select,
    .tradepost-card button {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .tradepost-offer-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        overflow: hidden !important;
    }
    .tradepost-offer-exchange {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        gap: 8px !important;
    }
    .tradepost-offer-exchange .tradepost-action-btn {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-height: 38px !important;
    }
    .tradepost-own-offer {
        align-items: stretch !important;
    }
    .tradepost-own-offer .tradepost-action-btn {
        width: 100% !important;
        min-height: 38px !important;
    }
    .tradepost-scroll-list {
        max-height: min(42dvh, 420px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 2px !important;
        touch-action: pan-y !important;
    }
    .tradepost-scrap-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(92px, 0.7fr) !important;
        gap: 8px !important;
    }
    .tradepost-scrap-row .tradepost-action-btn {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-height: 38px !important;
    }
}

@media (max-width: 520px) {
    .tradepost-stat-grid,
    .tradepost-form-grid {
        grid-template-columns: 1fr !important;
    }
    .tradepost-offer-exchange {
        grid-template-columns: 1fr !important;
    }
    .tradepost-offer-exchange > div:nth-child(2) {
        display: none !important;
    }
    .tradepost-resource-box {
        padding: 9px !important;
    }
    .tradepost-resource-box strong {
        display: block !important;
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }
    .tradepost-scrap-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
    }
    .tradepost-scrap-row input,
    .tradepost-action-btn {
        width: 100% !important;
        min-height: 40px !important;
    }
}


/* ==================================================================
   Rebuild (Basti, 23.10.2026): Marktkurse nach Seltenheit, Vorschau,
   Filter und Bewertung der Angebote. Live gibt es das nicht.
   Seltenheitsfarben wie üblich: grau, grün, blau, violett.
   ================================================================== */

.tradepost-rates-card {
    margin-bottom: 14px;
}

.tradepost-rates-card .tradepost-help {
    margin: 4px 0 12px;
}

.tradepost-rate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.tradepost-rate {
    --rarity: #9aa7b2;
    position: relative;
    min-width: 0;
    padding: 11px 12px 10px;
    border: 1px solid color-mix(in srgb, var(--rarity) 30%, transparent);
    border-top: 2px solid var(--rarity);
    border-radius: 12px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--rarity) 12%, transparent), transparent 60%),
        rgba(0, 0, 0, 0.28);
}

.tradepost-rate.rarity-1 { --rarity: #5fd18a; }
.tradepost-rate.rarity-2 { --rarity: #b8bdc5; }
.tradepost-rate.rarity-3 { --rarity: #cdd1d6; }

.tradepost-rate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tradepost-rate-head strong {
    color: #eafdff;
    font-size: 0.95rem;
}

.tradepost-rarity {
    padding: 2px 7px;
    border: 1px solid color-mix(in srgb, var(--rarity) 55%, transparent);
    border-radius: 999px;
    color: var(--rarity);
    font: 800 0.58rem 'Orbitron', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tradepost-rate-value {
    margin: 6px 0 4px;
    color: var(--rarity);
    font: 900 1.45rem/1 'Orbitron', monospace;
    text-shadow: 0 0 14px color-mix(in srgb, var(--rarity) 45%, transparent);
}

.tradepost-rate-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 10px;
    color: rgba(204, 208, 213, 0.72);
    font: 700 0.68rem monospace;
}

.tradepost-rate-trend.up { color: #ff9b6b; }
.tradepost-rate-trend.down { color: #6be3a2; }

.tradepost-rate-stamp {
    margin: 8px 0 0;
    color: rgba(204, 208, 213, 0.5);
    font: 700 0.66rem monospace;
    text-align: right;
}

.tradepost-preview {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed rgba(193, 197, 204, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    color: rgba(204, 208, 213, 0.78);
    font-size: 0.82em;
}

.tradepost-preview small {
    color: rgba(204, 208, 213, 0.6);
}

.tradepost-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tradepost-preview-row strong {
    color: #fc8a7d;
    font-size: 1.02em;
}

.tradepost-preview-row strong small {
    color: rgba(204, 208, 213, 0.7);
    font-weight: 600;
}

.tradepost-preview-row strong.bad {
    color: #ff7d7d;
}

.tradepost-mini-btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(251, 103, 86, 0.35);
    border-radius: 9px;
    background: rgba(251, 103, 86, 0.08);
    color: #fc8a7d;
    font: 800 0.62rem 'Orbitron', monospace;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.tradepost-mini-btn:hover {
    background: rgba(251, 103, 86, 0.18);
    color: #fff;
}

.tradepost-exchange-card .tradepost-form-grid {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
}

.tradepost-swap {
    width: 39px;
    height: 39px;
    border: 1px solid rgba(193, 197, 204, 0.25);
    border-radius: 10px;
    background: rgba(193, 197, 204, 0.07);
    color: #d4d7dc;
    font-size: 1.1rem;
    cursor: pointer;
}

.tradepost-swap:hover {
    background: rgba(193, 197, 204, 0.16);
    color: #fff;
}

.tradepost-amount-row {
    display: flex;
    gap: 8px;
}

.tradepost-amount-row input {
    flex: 1;
    min-width: 0;
}

.tradepost-amount-row .tradepost-mini-btn {
    min-height: 39px;
}

.tradepost-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.tradepost-filter button {
    padding: 5px 10px;
    border: 1px solid rgba(193, 197, 204, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(242, 243, 244, 0.7);
    font: 700 0.7rem monospace;
    cursor: pointer;
}

.tradepost-filter button.active {
    border-color: rgba(251, 103, 86, 0.5);
    background: rgba(251, 103, 86, 0.12);
    color: #fc8a7d;
}

.tradepost-filter-gap {
    flex: 1;
}

.tradepost-offer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.tradepost-deal {
    padding: 2px 8px;
    border-radius: 999px;
    font: 800 0.66rem monospace;
    white-space: nowrap;
}

.tradepost-deal.good { color: #6be3a2; background: rgba(107, 227, 162, 0.12); border: 1px solid rgba(107, 227, 162, 0.35); }
.tradepost-deal.fair { color: #d4d7dc; background: rgba(212, 215, 220, 0.08); border: 1px solid rgba(212, 215, 220, 0.25); }
.tradepost-deal.bad { color: #ff8f8f; background: rgba(255, 110, 110, 0.1); border: 1px solid rgba(255, 110, 110, 0.32); }

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

@media (max-width: 520px) {
    .tradepost-rate-value { font-size: 1.2rem; }
    .tradepost-preview-row { flex-direction: column; align-items: stretch; }
}
