/* Cat Fighting — Торговля (Сундуки, Монетный двор, Алмазная лавка).
   Планшет и VK Mini App на ПК, масштаб относительно центрального #content.
   Только оформление: цены, лимиты, обработчики покупок и платёжные API не меняем. */
@media (min-width: 601px) and (min-height: 600px) {
    /* Общая область торговли: вкладки закреплены над прокручиваемыми товарами. */
    body.catfight-tablet-layout #content .trade-wrapper {
        box-sizing: border-box;
        min-width: 0;
        min-height: 0;
        padding: clamp(5px, 1.25cqw, 10px);
        border-radius: clamp(12px, 3cqw, 24px) !important;
    }
    body.catfight-tablet-layout #content .trade-tabs-container {
        box-sizing: border-box;
        min-width: 0;
        flex-shrink: 0;
        gap: clamp(4px, 1cqw, 8px) !important;
        padding: clamp(4px, 1cqw, 8px) !important;
    }
    body.catfight-tablet-layout #content .trade-tabs-container > .trade-tab {
        box-sizing: border-box;
        min-width: 0;
        padding: clamp(8px, 2cqw, 16px) clamp(5px, 1.25cqw, 10px) !important;
        font-size: clamp(13px, 3.25cqw, 21px) !important;
        white-space: normal;
        line-height: 1.25;
    }
    body.catfight-tablet-layout #content .trade-tabs-container > .trade-tab i {
        margin-right: clamp(3px, .75cqw, 6px);
        font-size: clamp(13px, 3.25cqw, 21px);
    }
    body.catfight-tablet-layout #content #tradeSubContent {
        box-sizing: border-box;
        min-width: 0;
        min-height: 0;
        flex: 1 1 auto;
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Сундуки: подкатегории обычные / ивентовые. */
    body.catfight-tablet-layout #content .chest-tabs-container {
        min-width: 0;
        gap: clamp(6px, 1.5cqw, 12px) !important;
        margin-bottom: clamp(12px, 3cqw, 24px) !important;
    }
    body.catfight-tablet-layout #content .chest-tabs-container > .chest-tab {
        min-width: 0;
        font-size: clamp(12px, 3cqw, 20px) !important;
        padding: clamp(8px, 2cqw, 16px) clamp(6px, 1.5cqw, 12px) !important;
        white-space: normal;
        overflow-wrap: break-word;
    }
    body.catfight-tablet-layout #content .chest-table {
        box-sizing: border-box;
        width: 100%;
        height: auto;
        min-width: 0;
        overflow: visible;
    }
    body.catfight-tablet-layout #content .chest-row {
        box-sizing: border-box;
        min-width: 0;
        gap: clamp(8px, 2cqw, 16px);
        padding: clamp(12px, 3cqw, 24px) clamp(8px, 2cqw, 16px);
    }
    body.catfight-tablet-layout #content .chest-icon-col {
        flex: 0 0 clamp(54px, 13.5cqw, 100px);
        min-width: 0;
    }
    body.catfight-tablet-layout #content .chest-icon-col img {
        width: clamp(50px, 12.5cqw, 92px);
        height: clamp(50px, 12.5cqw, 92px);
        max-width: 100%;
        object-fit: contain;
    }
    body.catfight-tablet-layout #content .chest-info-col {
        flex: 1 1 0;
        min-width: 0;
        gap: clamp(4px, 1cqw, 8px);
    }
    body.catfight-tablet-layout #content .chest-name {
        font-size: clamp(15px, 3.75cqw, 27px);
        line-height: 1.25;
        overflow-wrap: break-word;
    }
    body.catfight-tablet-layout #content .chest-desc {
        font-size: clamp(11px, 2.75cqw, 19px);
        line-height: 1.35;
    }
    body.catfight-tablet-layout #content .chest-price-col {
        flex: 0 0 clamp(88px, 22cqw, 155px);
        min-width: 0;
        margin-left: auto;
    }
    body.catfight-tablet-layout #content .chest-buy-btn {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
        padding: clamp(7px, 1.75cqw, 13px) clamp(7px, 1.75cqw, 13px);
        gap: clamp(4px, 1cqw, 8px);
        font-size: clamp(13px, 3.25cqw, 23px);
        justify-content: center;
    }
    body.catfight-tablet-layout #content .chest-buy-btn i {
        font-size: clamp(12px, 3cqw, 21px);
    }

    /* Ивентовые сундуки: остаток, награды в две колонки, цена за голоса/ресурсы. */
    body.catfight-tablet-layout #content .event-chest-stock {
        font-size: clamp(11px, 2.75cqw, 19px);
    }
    body.catfight-tablet-layout #content .event-chest-rewards {
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(5px, 1.25cqw, 9px);
        row-gap: clamp(3px, .75cqw, 6px);
    }
    body.catfight-tablet-layout #content .event-chest-reward-line {
        min-width: 0;
        min-height: clamp(22px, 5.5cqw, 37px);
        gap: clamp(3px, .75cqw, 6px);
        font-size: clamp(10px, 2.35cqw, 17px);
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
    }
    body.catfight-tablet-layout #content .event-chest-reward-line img {
        width: clamp(20px, 5cqw, 34px);
        height: clamp(20px, 5cqw, 34px);
    }
    body.catfight-tablet-layout #content .event-chest-votes {
        font-size: clamp(10px, 2.5cqw, 17px);
    }

    /* Монетный двор: три столбца угля, монет и свитков. */
    body.catfight-tablet-layout #content .mint-page,
    body.catfight-tablet-layout #content .gems-page {
        box-sizing: border-box;
        min-width: 0;
        height: auto;
        max-height: none;
        padding: clamp(10px, 2.5cqw, 20px);
        overflow: visible;
    }
    body.catfight-tablet-layout #content .mint-grid,
    body.catfight-tablet-layout #content .packs-grid-new {
        min-width: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(8px, 2cqw, 16px);
        margin-bottom: clamp(16px, 4cqw, 30px);
    }
    body.catfight-tablet-layout #content .mint-card {
        box-sizing: border-box;
        min-width: 0;
        height: 100%;
        border-radius: clamp(12px, 3cqw, 22px);
    }
    body.catfight-tablet-layout #content .mint-card-image {
        padding: clamp(7px, 1.75cqw, 13px) clamp(6px, 1.5cqw, 12px) 0;
        min-width: 0;
    }
    body.catfight-tablet-layout #content .mint-card-image img {
        width: 100%;
        height: clamp(80px, 20cqw, 140px);
        object-fit: contain;
    }
    body.catfight-tablet-layout #content .mint-card-title,
    body.catfight-tablet-layout #content .mint-card .mint-card-title {
        font-size: clamp(12px, 3cqw, 21px);
        padding: clamp(8px, 2cqw, 16px) clamp(4px, 1cqw, 8px) 0;
        word-break: normal;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
    body.catfight-tablet-layout #content .mint-buy-btn {
        box-sizing: border-box;
        padding: clamp(11px, 2.75cqw, 20px) clamp(3px, .75cqw, 6px);
        font-size: clamp(13px, 3.25cqw, 22px);
        border-radius: 0 0 clamp(12px, 3cqw, 22px) clamp(12px, 3cqw, 22px);
        white-space: normal;
    }
    body.catfight-tablet-layout #content .mint-buy-btn i {
        font-size: clamp(12px, 3cqw, 21px);
    }

    /* Алмазная лавка: VIP Silver, шесть пакетов, бонус и юридические строки. */
    body.catfight-tablet-layout #content .subscription-card-new {
        box-sizing: border-box;
        min-width: 0;
        gap: clamp(8px, 2cqw, 16px);
        padding: clamp(12px, 3cqw, 22px);
        margin-bottom: clamp(16px, 4cqw, 30px);
        border-radius: clamp(12px, 3cqw, 22px);
    }
    body.catfight-tablet-layout #content .subscription-left-new {
        min-width: 0;
        flex: 1 1 0;
        gap: clamp(8px, 2cqw, 16px);
    }
    body.catfight-tablet-layout #content .subscription-left-new > i {
        font-size: clamp(24px, 6cqw, 43px) !important;
        flex-shrink: 0;
    }
    body.catfight-tablet-layout #content .subscription-text {
        min-width: 0;
        font-size: clamp(14px, 3.5cqw, 25px);
    }
    body.catfight-tablet-layout #content .subscription-label {
        font-size: clamp(11px, 2.75cqw, 19px);
    }
    body.catfight-tablet-layout #content .subscription-name {
        font-size: clamp(17px, 4.25cqw, 30px);
    }
    body.catfight-tablet-layout #content .subscription-view-btn-new {
        box-sizing: border-box;
        min-width: 0;
        flex: 0 1 auto;
        font-size: clamp(12px, 3cqw, 21px);
        padding: clamp(8px, 2cqw, 15px) clamp(10px, 2.5cqw, 18px);
        white-space: normal;
    }
    body.catfight-tablet-layout #content .pack-card-new {
        min-width: 0;
        box-sizing: border-box;
        border-radius: clamp(12px, 3cqw, 22px);
    }
    body.catfight-tablet-layout #content .pack-bonus {
        min-height: clamp(30px, 7.5cqw, 53px);
        font-size: clamp(10px, 2.5cqw, 17px);
        padding: clamp(8px, 2cqw, 14px) clamp(3px, .75cqw, 6px) clamp(2px, .5cqw, 4px);
    }
    body.catfight-tablet-layout #content .pack-image-new {
        padding: 0 clamp(6px, 1.5cqw, 12px) clamp(4px, 1cqw, 8px);
    }
    body.catfight-tablet-layout #content .pack-image-new img {
        width: 100%;
        height: clamp(80px, 20cqw, 140px);
        object-fit: contain;
    }
    body.catfight-tablet-layout #content .pack-diamonds-new {
        min-width: 0;
        padding: clamp(7px, 1.75cqw, 13px) clamp(3px, .75cqw, 6px);
        font-size: clamp(12px, 3cqw, 21px);
        overflow-wrap: break-word;
    }
    body.catfight-tablet-layout #content .pack-buy-btn {
        box-sizing: border-box;
        padding: clamp(10px, 2.5cqw, 18px) clamp(3px, .75cqw, 6px);
        font-size: clamp(12px, 3cqw, 21px);
        white-space: normal;
        overflow-wrap: break-word;
        border-radius: 0 0 clamp(12px, 3cqw, 22px) clamp(12px, 3cqw, 22px);
    }
    body.catfight-tablet-layout #content .shop-note-new {
        font-size: clamp(12px, 3cqw, 21px);
        padding: clamp(10px, 2.5cqw, 18px);
        margin-top: clamp(8px, 2cqw, 15px);
        line-height: 1.4;
        border-radius: clamp(12px, 3cqw, 22px);
    }
    body.catfight-tablet-layout #content .shop-note-new .legal-btn {
        font-size: inherit;
    }

    /* Окно VIP Silver: ширину определяет modal-tablet.css, здесь только содержимое.
       Переносим длинные кнопки; состояние disabled и покупки не затрагиваем. */
    body.catfight-tablet-layout #roleModal .subscription-modal-new {
        min-width: 0;
        gap: clamp(12px, 2.5vw, 20px);
    }
    body.catfight-tablet-layout #roleModal .subscription-modal-new > div:first-child img {
        width: clamp(80px, 12vw, 110px) !important;
        height: clamp(80px, 12vw, 110px) !important;
        box-sizing: border-box;
    }
    body.catfight-tablet-layout #roleModal .sub-feature-row {
        gap: clamp(10px, 2vw, 16px);
        min-width: 0;
    }
    body.catfight-tablet-layout #roleModal .sub-icon {
        width: clamp(30px, 5vw, 45px);
        flex: 0 0 clamp(30px, 5vw, 45px);
    }
    body.catfight-tablet-layout #roleModal .sub-icon i {
        font-size: clamp(20px, 3.5vw, 30px);
    }
    body.catfight-tablet-layout #roleModal .sub-desc {
        min-width: 0;
        font-size: clamp(14px, 2.5vw, 20px);
        line-height: 1.45;
    }
    body.catfight-tablet-layout #roleModal .subscription-buttons-new {
        gap: clamp(8px, 1.6vw, 14px);
        flex-wrap: wrap;
    }
    body.catfight-tablet-layout #roleModal :is(.subscription-free-btn-new,.subscription-buy-btn-new) {
        box-sizing: border-box;
        min-width: 0;
        flex: 1 1 42%;
        font-size: clamp(14px, 2.5vw, 20px);
        white-space: normal;
        overflow-wrap: break-word;
    }
    /* Оферта — стандартное окно, оставляем ссылки и кнопки доступными. */
    body.catfight-tablet-layout #roleModal .legal-modal-btn {
        font-size: clamp(14px, 2.5vw, 20px);
        white-space: normal;
    }
}
