/* 迷霧交易所 v23：傳聞 / 委託 / 上方回合控制 */
.hunter-black-market-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}

.hunter-black-market-rumor,
.hunter-black-market-commission {
    min-width: 0;
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, .14);
    background: rgba(15, 23, 42, .58);
    color: #e5e7eb;
}

.hunter-black-market-rumor.up {
    border-color: rgba(134, 239, 172, .28);
    background: linear-gradient(135deg, rgba(20, 83, 45, .48), rgba(15, 23, 42, .58));
}

.hunter-black-market-rumor.down {
    border-color: rgba(252, 165, 165, .26);
    background: linear-gradient(135deg, rgba(127, 29, 29, .38), rgba(15, 23, 42, .58));
}

.hunter-black-market-commission.is-complete {
    border-color: rgba(250, 204, 21, .32);
    background: linear-gradient(135deg, rgba(113, 63, 18, .46), rgba(15, 23, 42, .58));
}

.hunter-black-market-info-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 5px;
    color: #facc15;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
}

.hunter-black-market-info-label span {
    color: rgba(226, 232, 240, .78);
    font-size: 10px;
    letter-spacing: 0;
}

.hunter-black-market-rumor strong,
.hunter-black-market-commission strong {
    display: block;
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.25;
}

.hunter-black-market-rumor p,
.hunter-black-market-commission p,
.hunter-black-market-commission small {
    display: block;
    margin: 5px 0 0;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.4;
}

.hunter-black-market-commission small {
    color: #fde68a;
    font-weight: 800;
}

.hunter-black-market-round-control {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
}

.hunter-black-market-round-control .hunter-black-market-next-btn {
    margin-top: 0;
}

.hunter-black-market-round-control span {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 760px) {
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-game-views,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-game-views,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-game-views {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-grid,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-grid,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin-bottom: 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-rumor,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-commission,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-rumor,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-commission,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-rumor,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-commission {
        border-radius: 12px !important;
        padding: 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-label,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-label,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-label {
        margin-bottom: 3px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-label span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-label span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-label span {
        font-size: 9px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-rumor strong,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-commission strong,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-rumor strong,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-commission strong,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-rumor strong,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-commission strong {
        font-size: 11px !important;
        line-height: 1.18 !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-rumor p,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-commission p,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-commission small,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-rumor p,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-commission p,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-commission small,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-rumor p,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-commission p,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-commission small {
        margin-top: 3px !important;
        font-size: 9px !important;
        line-height: 1.25 !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-round-control,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-round-control,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-round-control {
        gap: 4px !important;
        margin-bottom: 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-round-control span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-round-control span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-round-control span {
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-hint,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-hint,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-hint {
        display: none !important;
    }
}

/* =========================
   Explore playing fill fix v24
   - keep bottom nav at shell bottom
   - fill the empty white area after entering mine / mist exchange
   - CSS only, no API or game logic changes
========================= */
.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode > .hunter-game-shell {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-game-views {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background:
        radial-gradient(circle at 80% 4%, rgba(245, 158, 11, .24), transparent 30%),
        linear-gradient(180deg, rgba(71, 39, 22, .96), rgba(36, 20, 14, .98)) !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-game-view[data-hunter-view="explore"].active,
.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-explore-room.active.is-playing-explore-game {
    flex: 1 1 auto !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    background: transparent !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-explore-room .hunter-subtab-panel.active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-minigame-shell {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-card {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-panel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-panel > .hunter-black-market-empty {
    flex: 1 1 auto !important;
    min-height: 240px !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-subtab-panel[data-hunter-subtab-panel="mine"].active {
    padding-bottom: 10px !important;
}

.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-system-card.hunter-mine-card,
.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-mine-pool-card,
.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-mine-log-card {
    flex: 0 0 auto !important;
}

@media (max-width: 768px) {
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-game-views {
        padding: 8px !important;
    }

    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-explore-room .hunter-subtab-panel.active {
        gap: 8px !important;
    }

    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-card {
        min-height: calc(100svh - 245px) !important;
    }

    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-system-card.hunter-mine-card {
        margin-bottom: 0 !important;
    }
}

/* =========================
   Mine result wrap fix v29
   - prevent ten-cut result text from overflowing horizontally
   - CSS only; no LINE / API / JS changes
========================= */
.hunter-page #hunterGameRoot.hunter-game-card .hunter-explore-room #hunterMineResult.hunter-mine-result,
.hunter-page #hunterGameRoot.hunter-game-card .hunter-explore-room .hunter-mine-result {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-break: anywhere !important;
    overflow-x: hidden !important;
    text-overflow: clip !important;
}

@media (max-width: 768px) {
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-system-card.hunter-mine-card,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-system-card.hunter-mine-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode #hunterMineResult.hunter-mine-result,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card #hunterMineResult.hunter-mine-result {
        display: block !important;
        margin-top: 10px !important;
        padding: 10px 12px !important;
        max-height: none !important;
        overflow-y: visible !important;
        font-size: 11px !important;
        line-height: 1.55 !important;
    }
}

/* Mist Exchange item image rendering: prefer real item art, no emoji overlay. */
.hunter-black-market-item-media {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(245, 158, 11, .14);
}

.hunter-black-market-item-media.has-image {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(146, 64, 14, .18);
}

.hunter-black-market-item-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.hunter-black-market-item-media.has-image.image-failed {
    background: transparent;
    border-color: transparent;
}

.hunter-black-market-item-media.has-image.image-failed .hunter-black-market-item-image {
    display: none;
}

@media (max-width: 768px) {
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-media,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-media,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-media {
        flex: 0 0 32px !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 11px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-image,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-image,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
}

/* Mist Exchange v38: compact item controls. Keep item data readable without crowding cards. */
.hunter-black-market-trade-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    margin: 4px 0 7px;
    font-size: 11px;
    line-height: 1.1;
    color: #64748b;
}

.hunter-black-market-trade-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 251, 235, .9);
    border: 1px solid rgba(180, 83, 9, .16);
    white-space: nowrap;
}

.hunter-black-market-quantity-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 5px;
    margin: 6px 0 8px;
}

.hunter-black-market-quantity-row input {
    min-width: 0;
    flex: 1 1 72px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(100, 116, 139, .36);
    padding: 0 9px;
    font-size: 14px;
    font-weight: 900;
    color: #111827;
    background: rgba(255, 255, 255, .92);
}

.hunter-black-market-quantity-row button {
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(100, 116, 139, .28);
    padding: 0 8px;
    font-size: 12px;
    font-weight: 900;
    color: #111827;
    background: rgba(255, 255, 255, .92);
    cursor: pointer;
    white-space: nowrap;
}

.hunter-black-market-quantity-row button[data-black-market-quantity-control="decrease"],
.hunter-black-market-quantity-row button[data-black-market-quantity-control="increase"] {
    flex: 0 0 34px;
    padding: 0;
    font-size: 16px;
}

.hunter-black-market-quantity-row button[data-black-market-quantity-control="max-buy"],
.hunter-black-market-quantity-row button[data-black-market-quantity-control="max-sell"] {
    flex: 1 1 calc(50% - 4px);
    color: #78350f;
    background: rgba(254, 243, 199, .92);
    border-color: rgba(180, 83, 9, .22);
}

.hunter-black-market-quantity-row button:disabled,
.hunter-black-market-actions button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.hunter-black-market-actions button {
    min-height: 34px;
    font-size: 12px;
    letter-spacing: .01em;
}

@media (max-width: 768px) {
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-card,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-card,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-card {
        padding: 9px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-holding,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-holding,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-holding {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 3px 7px !important;
        margin: 5px 0 3px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-holding > *,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-holding > *,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-holding > * {
        white-space: nowrap !important;
        font-size: 10px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-trade-meta,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-trade-meta,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-trade-meta {
        justify-content: flex-start !important;
        margin: 4px 0 5px !important;
        gap: 4px !important;
        font-size: 10px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-trade-meta span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-trade-meta span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-trade-meta span {
        min-height: 18px !important;
        padding: 2px 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row {
        gap: 4px !important;
        margin: 5px 0 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row input,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row input,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row input {
        height: 30px !important;
        flex: 1 1 calc(100% - 68px) !important;
        font-size: 12px !important;
        padding: 0 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row button,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row button,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row button {
        height: 30px !important;
        border-radius: 8px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
        line-height: 1 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row button[data-black-market-quantity-control="decrease"],
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row button[data-black-market-quantity-control="increase"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row button[data-black-market-quantity-control="decrease"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row button[data-black-market-quantity-control="increase"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row button[data-black-market-quantity-control="decrease"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row button[data-black-market-quantity-control="increase"] {
        flex: 0 0 30px !important;
        padding: 0 !important;
        font-size: 14px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-buy"],
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-sell"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-buy"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-sell"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-buy"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row button[data-black-market-quantity-control="max-sell"] {
        flex: 1 1 calc(50% - 3px) !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-actions,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-actions,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-actions {
        gap: 4px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-actions button,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-actions button,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-actions button {
        min-height: 30px !important;
        padding: 5px 2px !important;
        font-size: 10px !important;
    }
}

/* Mist Exchange v39: floating rumor/commission + compact product grid. */
.hunter-black-market-card {
    position: relative;
}

.hunter-black-market-info-float {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
}

.hunter-black-market-info-mini {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
}

.hunter-black-market-info-mini span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hunter-black-market-info-buttons {
    display: inline-flex;
    gap: 6px;
    flex: 0 0 auto;
}

.hunter-black-market-info-toggle {
    border: 1px solid rgba(250, 204, 21, .32);
    border-radius: 999px;
    padding: 5px 10px;
    color: #fde68a;
    background: rgba(15, 23, 42, .74);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.hunter-black-market-info-toggle.active {
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fb923c);
    border-color: rgba(251, 191, 36, .72);
}

.hunter-black-market-info-popover {
    position: absolute;
    z-index: 20;
    top: 52px;
    left: 14px;
    right: 14px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(15, 23, 42, .96);
    border: 1px solid rgba(250, 204, 21, .22);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .42);
}

.hunter-black-market-info-popover .hunter-black-market-rumor,
.hunter-black-market-info-popover .hunter-black-market-commission {
    margin: 0;
}

.hunter-black-market-holding.compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 6px 0;
}

.hunter-black-market-holding.compact span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hunter-black-market-quantity-row.compact {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px 58px;
    gap: 5px;
    margin: 6px 0;
}

.hunter-black-market-quantity-row.compact input,
.hunter-black-market-quantity-row.compact button {
    width: 100%;
}

.hunter-black-market-actions.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 768px) {
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-card,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-card,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-card {
        padding: 8px !important;
        border-radius: 16px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-header,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-header,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-header {
        padding-right: 92px !important;
        margin-bottom: 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-header h3,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-header h3,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-header h3 {
        font-size: 18px !important;
        line-height: 1.05 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-desc,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-desc,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-desc {
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-badge,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-badge,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-badge {
        padding: 5px 8px !important;
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-dashboard,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-dashboard,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-dashboard {
        gap: 5px !important;
        margin-bottom: 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-dashboard > div,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-dashboard > div,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-dashboard > div {
        padding: 5px 6px !important;
        border-radius: 12px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-float,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-float,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-float {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        z-index: 12 !important;
        margin: 0 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-mini,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-mini,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-mini {
        display: none !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-toggle,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-toggle,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-toggle {
        padding: 4px 7px !important;
        font-size: 10px !important;
        line-height: 1 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-info-popover,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-info-popover,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-info-popover {
        top: 38px !important;
        left: 8px !important;
        right: 8px !important;
        padding: 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-round-control,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-round-control,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-round-control {
        margin-bottom: 6px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-next-btn,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-next-btn,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-next-btn {
        margin-top: 6px !important;
        padding: 9px 10px !important;
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-items,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-items,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-items {
        gap: 7px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-card,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-card,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-card {
        padding: 7px !important;
        border-radius: 15px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-head,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-head,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-head {
        gap: 5px !important;
        align-items: flex-start !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-title,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-title,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-title {
        gap: 5px !important;
        min-width: 0 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-title > div,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-title > div,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-title > div {
        min-width: 0 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-title strong,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-title strong,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-title strong {
        font-size: 12px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-title span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-title span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-title span {
        display: none !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-price strong,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-price strong,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-price strong {
        font-size: 12px !important;
        line-height: 1 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-price span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-price span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-price span {
        font-size: 9px !important;
        line-height: 1 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-media,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-media,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-media {
        flex-basis: 28px !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 9px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-holding.compact,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-holding.compact,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-holding.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 2px !important;
        margin: 4px 0 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-holding.compact span,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-holding.compact span,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-holding.compact span {
        font-size: 9px !important;
        line-height: 1.05 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row.compact,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row.compact,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row.compact {
        display: grid !important;
        grid-template-columns: 24px minmax(0, 1fr) 24px 38px !important;
        gap: 3px !important;
        margin: 4px 0 !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row.compact input,
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row.compact button,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row.compact input,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row.compact button,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row.compact input,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row.compact button {
        height: 24px !important;
        min-height: 24px !important;
        border-radius: 7px !important;
        font-size: 10px !important;
        padding: 0 3px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="decrease"],
    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="increase"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="decrease"],
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="increase"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="decrease"],
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-quantity-row.compact button[data-black-market-quantity-control="increase"] {
        flex-basis: auto !important;
        font-size: 13px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-actions.compact,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-actions.compact,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-actions.compact {
        gap: 3px !important;
    }

    body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-actions.compact button,
    .hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-actions.compact button,
    .hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-actions.compact button {
        min-height: 24px !important;
        padding: 3px 1px !important;
        border-radius: 8px !important;
        font-size: 9px !important;
        line-height: 1 !important;
    }
}

/* v41: keep compact item risk tags visible without restoring long hints. */
.hunter-black-market-item-risk {
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(245, 158, 11, .13);
    color: #92400e !important;
    border: 1px solid rgba(245, 158, 11, .22);
    font-size: 11px !important;
    font-weight: 800;
    line-height: 1.1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.hunter-page.hunter-explore-playing-mode #hunterGameRoot.hunter-game-card .hunter-black-market-item-title .hunter-black-market-item-risk,
.hunter-page #hunterGameRoot.hunter-game-card.hunter-explore-playing-mode .hunter-black-market-item-title .hunter-black-market-item-risk,
.hunter-page #hunterGameRoot.hunter-game-card:has(.hunter-explore-room.active.is-playing-explore-game) .hunter-black-market-item-title .hunter-black-market-item-risk {
    display: inline-flex !important;
    margin-top: 2px !important;
    padding: 1px 5px !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
}


