#economy .market-ticker {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: rgba(201,169,110,0.14);
    border: 1px solid rgba(201,169,110,0.22);
    border-radius: 10px;
    overflow: hidden;
    margin: 18px 0;
}

#economy .ticker-cell {
    flex: 1 1 150px;
    padding: 12px 16px;
    background: #121110;
}

#economy .ticker-label {
    display: block;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-warm);
    margin-bottom: 4px;
}

#economy .ticker-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #e8dcc4;
}

#economy .ticker-value small {
    font-size: .72rem;
    font-weight: 500;
    color: var(--accent-warm);
    margin-left: 4px;
}

#economy .market-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    font-size: .82rem;
    color: #9a8f7d;
    margin-bottom: 12px;
}

#economy .legend-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
}

#economy .market-heatmap-grid {
    position: relative;
    width: 100%;
    height: min(100vh, 3000px);
    min-height: 420px;
    background: #0b0a09;
    border: 1px solid rgba(201,169,110,0.18);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0 8px;
}

#economy .heatmap-tile {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,0.35);
    overflow: hidden;
    cursor: default;
    transition: filter .15s ease, box-shadow .15s ease;
}

#economy .heatmap-tile:hover {
    filter: brightness(1.2);
    box-shadow: inset 0 0 0 1px #c9a96e;
    z-index: 2;
}

#economy .heatmap-tile--active {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

#economy .heatmap-tile--neutral {
    color: #cfc6b4;
}

#economy .heatmap-icon {
    width: 100%;
    height: 100%;
    max-width: 22px;
    max-height: 22px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-bottom: 2px;
}

#economy .heatmap-name {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .3px;
    white-space: nowrap;
}

#economy .heatmap-price {
    font-size: .72rem;
    font-weight: 600;
    margin-top: 1px;
    opacity: .82;
}

#economy .heatmap-change {
    font-size: .92rem;
    font-weight: 800;
    margin-top: 2px;
}

#economy .heatmap-tile.tile-sm .heatmap-price,
#economy .heatmap-tile.tile-sm .heatmap-change {
    display: none;
}

#economy .heatmap-tile.tile-xs .heatmap-name,
#economy .heatmap-tile.tile-xs .heatmap-price,
#economy .heatmap-tile.tile-xs .heatmap-change {
    display: none;
}

#economy .heatmap-tile.tile-xs {
    padding: 2px;
}

#economy .heatmap-tile.tile-xs .heatmap-icon {
    margin-bottom: 0;
}

#economy .quote-board {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: rgba(201,169,110,0.14);
    border: 1px solid rgba(201,169,110,0.22);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}

#economy .quote-cell {
    flex: 1 1 140px;
    padding: 12px 16px;
    background: #121110;
}

#economy .quote-label {
    display: block;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-warm);
    margin-bottom: 4px;
}

#economy .quote-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #e8dcc4;
}

#economy .quote-value.bid {
    color: #7bc47f;
}

#economy .quote-value.ask {
    color: #d98686;
}

#economy .quote-note {
    font-size: .72rem;
    color: var(--accent-warm);
    margin-top: 2px;
}

#economy .quote-halted {
    color: #d98686;
    font-size: .72rem;
}

#economy .chart-frame {
    position: relative;
    height: clamp(260px, 50vh, 440px);
    background: #0b0a09;
    border: 1px solid rgba(201,169,110,0.18);
    border-radius: 10px;
    padding: 14px;
}

#economy .item-picker {
    position: relative;
}

#economy .item-picker img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}

#economy .item-picker-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#economy .item-picker-panel {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    width: min(340px, calc(100vw - 32px));
    padding: 8px;
    background: #121110;
    border: 1px solid rgba(201,169,110,0.22);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#economy .item-picker.open .item-picker-panel {
    display: block;
}

#economy .item-picker-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
    padding: 8px 10px;
    color: #e8dcc4;
    background: #0b0a09;
    border: 1px solid rgba(201,169,110,0.22);
    border-radius: 8px;
}

#economy .item-picker-list {
    max-height: 320px;
    overflow-y: auto;
}

#economy .item-picker-list button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    color: #e8dcc4;
    background: none;
    border: 0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
}

#economy .item-picker-list button[hidden] {
    display: none;
}

#economy .item-picker-list button:hover {
    background: rgba(201,169,110,0.12);
}

#economy #quotesTable th,
#economy #quotesTable td {
    text-align: left;
}

#economy #quotesTable td:first-child {
    text-align: center;
}

#economy .quotes-item {
    text-align: left;
}

#economy .quotes-item img {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
}

#economy .change-up {
    color: #7bc47f;
    font-weight: 700;
}

#economy .change-down {
    color: #d98686;
    font-weight: 700;
}

#economy .change-flat {
    color: var(--accent-warm);
}

#economy .market-note {
    font-size: .8rem;
    color: var(--accent-warm);
    margin-top: 12px;
}

.legend-up {
    background: rgba(22,163,74,.75);
}

.legend-down {
    background: rgba(220,38,38,.75);
}

.legend-flat {
    background: rgba(148,163,184,.35);
}

.market-profit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0; }
.market-profit .profit-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.market-profit .profit-item img { width: 16px; height: 16px; image-rendering: pixelated; }
