    :root {
        --bg-dark: #0f0d0b;
        --panel-bg: #231e1a;
        --card-bg: #2c251f;
        --card-bg-hover: #382f28;
        --card-bg-selected: #3a2e22;
        --border-gold: #8c6738;
        --border-gold-bright: #d7ab63;
        --text-gold-light: #f1d59a;
        --text-main: #f5ead3;
        --text-muted: #c8b89e;
        --input-bg: #11100f;
        --pos-bg: #0e381e;
        --pos-text: #6ee7b7;
        --pos-border: rgba(110, 231, 183, 0.3);
        --neg-bg: #3b1219;
        --neg-text: #fca5a5;
        --neg-border: rgba(252, 165, 165, 0.3);
    }

    .quests-wrapper {
        width: 100% !important;
        max-width: 1520px !important;
        margin: 0 auto;
        box-sizing: border-box !important;
        padding: 10px;
    }

    /* Адаптивное название баннера*/
    .ship-calc-banner {
        width: 100%;
        max-width: 1520px;
        margin-left: auto;
        margin-right: auto;
    }

    .app-container {
        display: grid;
        gap: 20px;
        width: 100%;
        align-items: stretch;
        font-family: Georgia, 'Times New Roman', serif;
        color: var(--text-main);
    }

    /* ДЕСКТОП ВЕРСТКА (3 колонки) */
    @media (min-width: 1280px) {
        .app-container {
            /* Боковые панели плавно расширяются от 290 до 360 px;
               центральная остаётся достаточно широкой для характеристик. */
            grid-template-columns: clamp(290px, calc(50vw - 350px), 360px) minmax(0, 1fr) clamp(290px, calc(50vw - 350px), 360px);
        }
        .panel-shipyards { order: 1; }
        .panel-calculator { order: 2; }
        .panel-wood { order: 3; }

        .rpg-panel {
            height: 100%;
        }

        /* На ПК список забирает ВСЁ свободное пространство панели без темной дыры внизу */
        .card-list {
            flex: 1 1 0px !important;
            max-height: none !important;
            min-height: 0 !important;
        }
    }

    /* ПЛАНШЕТЫ (2 колонки) */
    @media (min-width: 768px) and (max-width: 1279px) {
        .app-container {
            grid-template-columns: 1fr 1fr;
        }
        .panel-calculator { grid-column: 1 / -1; order: 1; }
        .panel-shipyards { grid-column: 1 / 2; order: 2; }
        .panel-wood { grid-column: 2 / 3; order: 3; }

        .rpg-panel { height: auto; }
        .card-list { min-height: 260px; max-height: 420px; }
    }

    /* ТЕЛЕФОНЫ (1 колонка) */
    @media (max-width: 767px) {
        .quests-wrapper { padding: 10px 14px; }
        .app-container {
            grid-template-columns: 1fr;
            gap: 14px;
        }
        .panel-calculator { order: 1; }
        .panel-shipyards { order: 2; }
        .panel-wood { order: 3; }

        .rpg-panel { height: auto; }
        .card-list { min-height: 220px; max-height: 360px; }
    }

    .rpg-panel {
        background-color: var(--panel-bg);
        border: 2px solid var(--border-gold);
        border-radius: 8px;
        padding: 16px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.5);
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 10px;
        margin-bottom: 14px;
        border-bottom: 1px solid var(--border-gold);
        flex-shrink: 0;
    }

    .panel-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-gold-light);
        display: flex;
        align-items: center;
        gap: 8px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }

    .count-badge {
        font-size: 0.75rem;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        color: var(--text-muted);
        background: rgba(0, 0, 0, 0.4);
        padding: 3px 8px;
        border-radius: 4px;
        border: 1px solid rgba(140, 103, 56, 0.4);
    }

    /* СПИСОК КАРТОЧЕК И КАСТОМНЫЕ СКРОЛЛБАРЫ (ЛИФТЫ) */
    .card-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
        scrollbar-gutter: stable;
        padding-right: 4px;
        scrollbar-width: thin;
        scrollbar-color: var(--border-gold) rgba(0, 0, 0, 0.4);
    }

    .card-list::-webkit-scrollbar,
    .search-results-dropdown::-webkit-scrollbar {
        width: 6px;
    }
    .card-list::-webkit-scrollbar-track,
    .search-results-dropdown::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.4);
        border-radius: 3px;
    }
    .card-list::-webkit-scrollbar-thumb,
    .search-results-dropdown::-webkit-scrollbar-thumb {
        background: var(--border-gold);
        border-radius: 3px;
    }
    .card-list::-webkit-scrollbar-thumb:hover,
    .search-results-dropdown::-webkit-scrollbar-thumb:hover {
        background: var(--border-gold-bright);
    }

    .upgrade-card {
        background: var(--card-bg);
        border: 2px solid rgba(140, 103, 56, 0.5);
        border-radius: 7px;
        padding: 10px 12px 4px;
        cursor: pointer;
        transition: all 0.15s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 6.5rem;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 0;
    }

    .upgrade-card:hover {
        background: var(--card-bg-hover);
        border-color: var(--border-gold-bright);
    }

    .upgrade-card.selected {
        background: var(--card-bg-selected);
        border-color: var(--border-gold-bright);
        box-shadow: 0 0 12px rgba(215, 171, 99, 0.35), inset 0 0 10px rgba(0, 0, 0, 0.5);
    }

    .card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 6px;
        flex-shrink: 0;
    }

    .card-name {
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.25;
        color: var(--text-gold-light);
    }

    @media (max-width: 360px) {
        .upgrade-card { height: 7.5rem; }
    }

    .radio-indicator {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 1px solid var(--border-gold);
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .upgrade-card.selected .radio-indicator {
        border-color: var(--border-gold-bright);
    }

    .radio-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border-gold-bright);
        box-shadow: 0 0 4px var(--border-gold-bright);
    }

    /* Модификаторы в карточках: иконки из калькулятора и только текст,
       без цветных прямоугольников. Три колонки сохраняют высоту карточек. */
    .card-badges {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px 5px;
        align-items: center;
    }

    .mod-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        min-height: 28px;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 0.95rem;
        line-height: 1.2;
        font-weight: 700;
        white-space: nowrap;
        background: transparent;
        border: none;
        padding: 0;
    }

    .mod-chip-icon {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        object-fit: contain;
    }

    /* Для древесины и верфей одинаково: зелёный плюс, красный минус. */
    .mod-chip-shipyard.pos, .mod-chip-wood.pos { color: var(--pos-text); }
    .mod-chip-shipyard.neg, .mod-chip-wood.neg { color: var(--neg-text); }
    .mod-chip-empty { opacity: 0.2; }

    /* ПОИСК И СЕЛЕКТОРЫ */
    .ship-selector-container {
        background: rgba(18, 15, 12, 0.6);
        border: 1px solid rgba(140, 103, 56, 0.4);
        border-radius: 6px;
        padding: 10px;
        margin-bottom: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .ship-search-box {
        position: relative;
        width: 100%;
    }

    .ship-search-input {
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        padding-left: 30px !important;
        box-sizing: border-box !important;
    }

    .ship-search-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--border-gold-bright);
        font-size: 0.85rem;
        pointer-events: none;
    }

    .search-results-dropdown {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: #1c1814;
        border: 1.5px solid var(--border-gold-bright);
        border-radius: 6px;
        max-height: 200px;
        overflow-y: auto;
        z-index: 100;
        box-shadow: 0 8px 24px rgba(0,0,0,0.85);
        scrollbar-width: thin;
        scrollbar-color: var(--border-gold) rgba(0, 0, 0, 0.4);
    }

    .search-results-dropdown.hidden {
        display: none;
    }

    .search-result-item {
        padding: 8px 12px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(140, 103, 56, 0.2);
        font-size: 0.85rem;
        color: var(--text-main);
    }

    .search-result-item:hover {
        background: var(--card-bg-hover);
        color: var(--text-gold-light);
    }

    .search-result-cat {
        font-size: 0.7rem;
        color: var(--text-muted);
        background: rgba(0, 0, 0, 0.4);
        padding: 2px 5px;
        border-radius: 3px;
        border: 1px solid rgba(140, 103, 56, 0.3);
    }

    .ship-select-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    @media (max-width: 500px) {
        .ship-select-row {
            grid-template-columns: 1fr;
        }
    }

    .ship-select {
        background-color: var(--input-bg);
        color: var(--text-gold-light);
        border: 1px solid rgba(215, 171, 99, 0.4);
        border-radius: 4px;
        padding: 6px 8px;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        outline: none;
        width: 100%;
        box-sizing: border-box;
    }

    .ship-select option {
        background-color: var(--panel-bg);
        color: var(--text-main);
    }


    /* Собственные выпадающие списки: у нативного <select> в Windows
       системная прокрутка не поддаётся оформлению через CSS. */
    .ship-select-widget {
        position: relative;
        min-width: 0;
    }

    .ship-select-widget.is-enhanced > .ship-select {
        display: none;
    }

    .ship-select-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        min-height: 32px;
        padding: 6px 10px;
        background: var(--input-bg);
        color: var(--text-gold-light);
        border: 1px solid rgba(215, 171, 99, 0.5);
        border-radius: 4px;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
        box-sizing: border-box;
    }

    .ship-select-trigger:hover,
    .ship-select-widget.is-open .ship-select-trigger,
    .ship-select-trigger:focus-visible {
        border-color: var(--border-gold-bright);
        outline: 1px solid rgba(215, 171, 99, 0.35);
    }

    .ship-select-trigger-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ship-select-trigger-arrow {
        flex-shrink: 0;
        border: solid var(--border-gold-bright);
        border-width: 0 1.5px 1.5px 0;
        padding: 3px;
        transform: translateY(-2px) rotate(45deg);
        transition: transform .15s ease;
    }

    .ship-select-widget.is-open .ship-select-trigger-arrow {
        transform: translateY(2px) rotate(225deg);
    }

    .ship-select-menu {
        position: absolute;
        z-index: 120;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        max-height: 250px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #1c1814;
        border: 1px solid var(--border-gold-bright);
        border-radius: 6px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
        scrollbar-width: thin;
        scrollbar-color: var(--border-gold) rgba(0, 0, 0, 0.4);
    }

    .ship-select-menu[hidden] { display: none !important; }
    .ship-select-menu::-webkit-scrollbar { width: 6px; }
    .ship-select-menu::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.4);
        border-radius: 3px;
    }
    .ship-select-menu::-webkit-scrollbar-thumb {
        background: var(--border-gold);
        border-radius: 3px;
    }
    .ship-select-menu::-webkit-scrollbar-thumb:hover {
        background: var(--border-gold-bright);
    }

    .ship-select-group-title {
        position: sticky;
        top: 0;
        padding: 7px 10px 5px;
        background: #2b2118;
        border-bottom: 1px solid rgba(140, 103, 56, 0.45);
        color: var(--border-gold-bright);
        font-size: 0.79rem;
        font-weight: 700;
        pointer-events: none;
    }

    .ship-select-option {
        padding: 8px 11px 8px 17px;
        border-bottom: 1px solid rgba(140, 103, 56, 0.2);
        color: var(--text-main);
        font-size: 0.83rem;
        line-height: 1.35;
        cursor: pointer;
    }

    /* Пустой вариант виден и доступен в обоих собственных меню. */
    .ship-select-option.ship-select-empty {
        padding-left: 11px;
        color: var(--text-gold-light);
        border-bottom: 1px solid rgba(215, 171, 99, 0.45);
    }

    .ship-select-option:hover,
    .ship-select-option:focus-visible {
        background: var(--card-bg-hover);
        color: var(--text-gold-light);
        outline: none;
    }

    .ship-select-option[aria-selected="true"] {
        background: var(--card-bg-selected);
        color: var(--text-gold-light);
        box-shadow: inset 3px 0 var(--border-gold-bright);
    }

    @media (max-width: 500px) {
        .ship-select-menu { max-height: 220px; }
    }

    /* СТРОКИ КАЛЬКУЛЯТОРА */
    .stat-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: rgba(18, 15, 12, 0.7);
        border: 1px solid rgba(140, 103, 56, 0.4);
        border-radius: 6px;
        padding: 6px 10px;
        margin-bottom: 8px;
        box-sizing: border-box;
    }

    .stat-row.locked {
        opacity: 0.55;
        background: rgba(10, 8, 7, 0.5);
    }

    .stat-label {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 180px;
        flex-shrink: 0;
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
        color: var(--text-main);
    }

    .stat-icon {
        width: 26px;
        height: 26px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .stat-inputs {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        width: 150px;
        flex-shrink: 0;
    }

    .app-container input[type="number"],
    .app-container input[type="text"] {
        background-color: var(--input-bg);
        color: var(--text-main);
        border: 1px solid rgba(215, 171, 99, 0.3);
        border-radius: 4px;
        padding: 5px 6px;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 0.85rem;
        font-weight: 600;
        text-align: right;
        width: 100%;
        max-width: 150px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
        box-sizing: border-box;
    }

    .app-container input[type="number"].crew-input {
        width: 68px;
    }

    .app-container input[type="number"]:focus,
    .app-container input[type="text"]:focus {
        outline: none;
        border-color: var(--border-gold-bright);
    }

    .app-container input[type="number"]::-webkit-inner-spin-button,
    .app-container input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    .app-container input[type="number"] {
        -moz-appearance: textfield;
    }

    .stat-results {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .pct-badge {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 4px 0;
        border-radius: 4px;
        width: 52px;
        text-align: center;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(140, 103, 56, 0.3);
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .pct-badge.pos { background-color: var(--pos-bg); color: var(--pos-text); border-color: var(--pos-border); }
    .pct-badge.neg { background-color: var(--neg-bg); color: var(--neg-text); border-color: var(--neg-border); }

    .result-box {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 0.85rem;
        font-weight: 700;
        padding: 4px 6px;
        border-radius: 4px;
        width: 105px;
        text-align: right;
        background: rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(140, 103, 56, 0.3);
        color: var(--text-main);
        flex-shrink: 0;
    }

    .result-box.pos { color: var(--pos-text); background-color: rgba(14, 56, 30, 0.5); border-color: var(--pos-border); }
    .result-box.neg { color: var(--neg-text); background-color: rgba(59, 18, 25, 0.5); border-color: var(--neg-border); }

    .filter-btn {
        width: 30px;
        height: 30px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        user-select: none;
        flex-shrink: 0;
        background: #181411;
        border: 1px solid var(--border-gold);
        color: transparent;
    }

    .filter-btn.active {
        background-color: var(--pos-bg);
        border-color: #22c55e;
        color: var(--pos-text);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
    }

    .btn-pirate {
        background: linear-gradient(180deg, #38281a 0%, #1e130a 100%);
        border: 1px solid var(--border-gold);
        color: var(--text-gold-light);
        font-family: inherit;
        font-weight: 700;
        font-size: 0.8rem;
        padding: 5px 10px;
        border-radius: 4px;
        cursor: pointer;
    }

    .btn-pirate:hover {
        border-color: var(--border-gold-bright);
        color: #fff;
    }

    /* МОБИЛЬНЫЙ РЕЖИМ СМАРТФОНОВ (<640px) */
    @media (max-width: 640px) {
        .stat-row {
            flex-wrap: wrap;
            padding: 6px 8px;
        }
        .stat-label {
            width: 100%;
            margin-bottom: 2px;
        }
        .stat-inputs {
            width: auto;
        }
        .app-container input[type="number"], .app-container input[type="text"] {
            max-width: 95px;
            font-size: 0.8rem;
        }
        .app-container input[type="number"].crew-input {
            width: 48px;
        }
        .pct-badge {
            width: 44px;
            font-size: 0.72rem;
        }
        .result-box {
            width: 86px;
            font-size: 0.78rem;
        }
        .filter-btn {
            width: 26px;
            height: 26px;
            font-size: 0.75rem;
        }
    }

    /* Справочные таблицы модификаторов над калькулятором.
       Стили ограничены этим блоком и не затрагивают панели калькулятора. */
    .ship-modifiers {
        width: 100%;
        min-width: 0;
        margin: 22px 0 30px;
    }
    .ship-modifiers h2 {
        margin: 0 0 12px;
        color: #e9c47c;
        font-size: clamp(19px, 2.3vw, 24px);
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: .06em;
    }
    .ship-modifiers .ship-table-window {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        margin-bottom: 28px;
        border: 1px solid #705435;
        border-radius: 8px;
        background: #231e19;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
    }
    .ship-modifiers .ship-table-window::-webkit-scrollbar { height: 10px; }
    .ship-modifiers .ship-table-window::-webkit-scrollbar-track { background: #1a1511; }
    .ship-modifiers .ship-table-window::-webkit-scrollbar-thumb { background: #80603f; border-radius: 4px; }
    .ship-modifiers .ship-table-window::-webkit-scrollbar-thumb:hover { background: #d7ab63; }
    .ship-modifiers .ship-ref-table {
        width: max-content;
        min-width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        color: #eadfcd;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
        font-weight: 400;
        letter-spacing: normal;
        text-align: center;
        white-space: nowrap;
    }
    /* Верфи: на полном экране укладываем все столбцы в ширину контейнера.
       На меньших экранах сохраняем горизонтальную прокрутку. */
    .ship-modifiers .ship-ref-table.table-shipyards {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }
    .ship-modifiers .table-shipyards thead th {
        padding: 8px 2px;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.22;
        font-size: clamp(11px, .85vw, 13px);
        hyphens: auto;
    }
    .ship-modifiers .ship-ref-table.table-shipyards tr > :first-child {
        width: 106px;
        min-width: 106px;
    }
    @media (max-width: 1199px) {
        .ship-modifiers .ship-ref-table.table-shipyards { min-width: 1210px; }
        .ship-modifiers .table-shipyards thead th { font-size: 12px; }
    }

    /* Древесина: одинаковая ширина всех восьми материалов. */
    .ship-modifiers .ship-ref-table.table-woods {
        width: 100%;
        min-width: 1200px;
        table-layout: fixed;
    }
    .ship-modifiers .ship-ref-table th,
    .ship-modifiers .ship-ref-table td {
        padding: 8px 10px;
        border-right: 1px solid #594635;
        border-bottom: 1px solid #594635;
        line-height: 1.5;
    }
    .ship-modifiers .ship-ref-table tr > :last-child { border-right: none; }
    .ship-modifiers .ship-ref-table tfoot tr > * { border-bottom: none; }
    .ship-modifiers .ship-ref-table thead th {
        background: #30261e;
        color: #e9c47c;
        font-weight: 600;
    }
    .ship-modifiers .ship-ref-table tr > :first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        width: 130px;
        min-width: 130px;
        background: #332a21;
        text-align: left;
        font-weight: 600;
        box-shadow: 1px 0 0 #594635;
    }
    .ship-modifiers .ship-ref-table thead tr > :first-child { z-index: 2; text-align: center;}

    /* «Зебра» в тёплых тёмно-коричневых тонах, как панели калькулятора.
       Разница оттенков сдержанная, чтобы не конкурировать с цифрами. */
    .ship-modifiers .ship-ref-table tbody td { background: #211c18; }
    .ship-modifiers .ship-ref-table tbody tr:nth-child(even) > td {
        background: #29231d;
    }
    /* Закреплённые названия тоже чередуются, но чуть светлее значений. */
    .ship-modifiers .ship-ref-table tbody tr:nth-child(odd) > th:first-child {
        background: #2a241e;
    }
    .ship-modifiers .ship-ref-table tbody tr:nth-child(even) > th:first-child {
        background: #342b22;
    }
    .ship-modifiers .ship-ref-table .mod-positive {
        color: #34d399;
        font-weight: 600;
    }
    .ship-modifiers .ship-ref-table .mod-negative {
        color: #f87171;
        font-weight: 600;
    }
    .ship-modifiers .ship-ref-table .mod-neutral { color: #b7aa98; }

    /* Сумма — отдельная тёмная строка; нейтральные цифры независимо от знака. */
    .ship-modifiers .ship-ref-table tfoot tr > * {
        background: #191512;
        font-weight: 600;
    }
    .ship-modifiers .ship-ref-table tfoot tr > :first-child {
        background: #191512;
        color: #e9c47c;
    }
    .ship-modifiers .ship-ref-table tfoot .mod-positive,
    .ship-modifiers .ship-ref-table tfoot .mod-negative,
    .ship-modifiers .ship-ref-table tfoot .mod-neutral {
        color: #e0d4be;
    }
