/* ==========================================================================
   intel-breeding.css — Breeding page (Intelligence / Phase 3).
   Calculator + reverse lookup + breeding tree custom UI. Layered on top of
   intelligence.css + intel-table.css + intel-library.css. Reuses the T7 tokens
   from t7-theme.css (--fire-orange/--fire-yellow/--gold-light/--glass-border,
   ...) — never redeclares the palette. Everything is namespaced under
   .intel-breeding / .brd- so it cannot leak. Overflow-safe per the repo rule:
   the tree + any wide row scroll inside their own containers; the page body
   never scrolls horizontally. Owner rule: external stylesheet only.
   ========================================================================== */

.intel-breeding { min-width: 0; }
.intel-breeding .is-hidden { display: none !important; }

/* --- Loading / fatal states -------------------------------------------- */
.intel-breeding .brd-loading,
.intel-breeding .brd-fatal {
    text-align: center;
    padding: 40px 20px;
    color: rgba(240, 224, 196, 0.85);
    font-weight: 600;
}
.intel-breeding .brd-fatal { color: #ffb0a0; }
.intel-breeding .brd-loading i,
.intel-breeding .brd-fatal i { color: var(--fire-orange); margin-right: 8px; }

/* --- Sub-tool tabs ------------------------------------------------------ */
.intel-breeding .brd-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    min-width: 0;
}
.intel-breeding .brd-mode {
    background: rgba(10, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: #cbb99a;
    padding: 9px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
}
.intel-breeding .brd-mode i { color: var(--gold-light); flex-shrink: 0; }
.intel-breeding .brd-mode:hover { color: #fff; background: rgba(255, 69, 0, 0.12); }
.intel-breeding .brd-mode.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.4), rgba(255, 69, 0, 0.2));
    border-color: var(--fire-orange);
    box-shadow: 0 0 12px rgba(255, 69, 0, 0.35);
}
.intel-breeding .brd-mode.is-active i { color: var(--fire-yellow); }

.intel-breeding .brd-hint {
    text-align: center;
    color: rgba(240, 224, 196, 0.72);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 auto 20px;
    max-width: 640px;
}

/* --- Shared Pal thumbnails --------------------------------------------- */
.intel-breeding .brd-thumb {
    width: 42px; height: 42px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 3px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.intel-breeding .brd-thumb-sm { width: 30px; height: 30px; }
.intel-breeding .brd-thumb-lg { width: 76px; height: 76px; }
.intel-breeding .brd-thumb-xl { width: 108px; height: 108px; padding: 5px; border-radius: 12px; }
.intel-breeding .brd-thumb-empty { color: rgba(255, 180, 120, 0.4); }

/* ======================================================================
   Pal picker (combobox)
   ====================================================================== */

/* The shared .intel-panel sets overflow:hidden, which clips the absolutely-
   positioned pal-picker dropdown at the panel's bottom edge. Release the clip
   on the breeding panel ONLY (two-class specificity beats bare .intel-panel,
   and this class exists only on this page) so the dropdown floats over the
   content below it. Safe because every wide child here scrolls inside its OWN
   container — the unique table via .intel-table-scroll, the tree via
   .brd-tree-scroll — so the panel itself never needs to clip horizontally. */
.intel-panel.intel-breeding { overflow: visible; }

.intel-breeding .brd-slot { position: relative; min-width: 0; width: 100%; }
.intel-breeding .brd-picker {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(10, 0, 0, 0.45);
    color: #f1e6d2;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.intel-breeding .brd-picker:hover { border-color: var(--fire-orange); }
.intel-breeding .brd-picker.is-set { border-color: rgba(255, 140, 40, 0.5); }
.intel-breeding .brd-picker-name {
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: left;
}
.intel-breeding .brd-picker-ph { color: rgba(240, 224, 196, 0.5); flex: 1; text-align: left; }
.intel-breeding .brd-picker-caret { color: var(--gold-light); flex-shrink: 0; font-size: 0.8em; }

.intel-breeding .brd-picker-panel {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 220px;
    background: rgba(16, 4, 2, 0.98);
    border: 1px solid var(--fire-orange);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
    padding: 8px;
    box-sizing: border-box;
    /* Bound the whole panel to the viewport and let the option list (below) be
       the sole scroller, so a long roster never pushes options off-screen with
       no way to reach them. Search + filter chips stay pinned; the list flexes. */
    display: flex;
    flex-direction: column;
    max-height: min(74vh, 480px);
}
.intel-breeding .brd-picker-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.intel-breeding .brd-picker-search:focus { outline: none; border-color: var(--fire-orange); }
/* Sole scroller inside .brd-picker-panel. flex:1/min-height:0 lets it shrink on
   short viewports; overscroll-behavior:contain stops the wheel/touch scroll from
   chaining to the page once the list hits its top/bottom edge. */
.intel-breeding .brd-picker-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.intel-breeding .brd-picker-opt {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: #ecdcc2;
    cursor: pointer;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
}
.intel-breeding .brd-picker-opt:hover { background: rgba(255, 69, 0, 0.14); color: #fff; }
.intel-breeding .brd-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intel-breeding .brd-opt-power { color: rgba(240, 224, 196, 0.4); font-size: 0.75rem; flex-shrink: 0; }
.intel-breeding .brd-picker-empty { padding: 14px; text-align: center; color: rgba(240, 224, 196, 0.5); }

/* ======================================================================
   Forward calculator
   ====================================================================== */
.intel-breeding .brd-calc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    min-width: 0;
}
.intel-breeding .brd-slot-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 210px;
    max-width: 100%;
}
.intel-breeding .brd-slot-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gold-light);
    text-align: center;
}
.intel-breeding .brd-op {
    align-self: center;
    color: var(--fire-orange);
    font-size: 1.4rem;
    padding-top: 22px;
    flex-shrink: 0;
}

/* --- Browse (grid picker) affordance + parent breeding-power stat ------- */
.intel-breeding .brd-browse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 140, 40, 0.08);
    color: #f0dcc2;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.intel-breeding .brd-browse-btn i { color: var(--gold-light); }
.intel-breeding .brd-browse-btn:hover {
    border-color: var(--fire-orange);
    background: rgba(255, 69, 0, 0.16);
    color: #fff;
}
.intel-breeding .brd-parent-power {
    min-height: 1em;
    text-align: center;
    font-size: 0.74rem;
    color: rgba(240, 224, 196, 0.7);
}
.intel-breeding .brd-parent-power i { color: var(--gold-light); margin-right: 4px; }
.intel-breeding .brd-parent-power b { color: var(--fire-yellow); font-weight: 800; }

/* --- Hero child result panel ------------------------------------------- */
.intel-breeding .brd-hero {
    margin-top: 20px;
    min-height: 148px;
    border: 1px dashed var(--glass-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 140% at 50% 0%, rgba(255, 69, 0, 0.08), rgba(0, 0, 0, 0.28));
    padding: 18px;
    box-sizing: border-box;
    min-width: 0;
}
.intel-breeding .brd-result-empty { color: rgba(240, 224, 196, 0.35); font-size: 1.6rem; }

.intel-breeding .brd-hero-split {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.intel-breeding .brd-hero-child {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(20, 4, 2, 0.6);
    border: 1px solid rgba(255, 140, 40, 0.4);
    box-shadow: 0 0 22px rgba(255, 69, 0, 0.18);
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
}
.intel-breeding .brd-hero-split .brd-hero-child { flex: 1 1 300px; }
.intel-breeding .brd-hero-art { flex-shrink: 0; }
.intel-breeding .brd-hero-body { min-width: 0; }
.intel-breeding .brd-hero-toplabel {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.intel-breeding .brd-hero-name {
    font-weight: 800;
    color: var(--fire-yellow);
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 3px 0 4px;
    text-shadow: 0 0 14px rgba(255, 140, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.intel-breeding .brd-hero-child.is-female .brd-hero-name { color: #ff9fd0; text-shadow: 0 0 14px rgba(255, 100, 180, 0.5); }
.intel-breeding .brd-hero-child.is-male .brd-hero-name { color: #8fc2ff; text-shadow: 0 0 14px rgba(90, 160, 255, 0.5); }
.intel-breeding .brd-hero-power {
    font-size: 0.82rem;
    color: rgba(240, 224, 196, 0.8);
    margin-bottom: 10px;
}
.intel-breeding .brd-hero-power i { color: var(--gold-light); margin-right: 5px; }
.intel-breeding .brd-hero-power b { color: var(--fire-yellow); font-weight: 800; }
.intel-breeding .brd-hero-subnote {
    font-size: 0.72rem;
    color: rgba(240, 224, 196, 0.6);
    margin-bottom: 8px;
}
.intel-breeding .brd-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.intel-breeding .brd-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(10, 0, 0, 0.4);
    color: #ecdcc2;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.intel-breeding .brd-hero-btn i { color: var(--gold-light); }
.intel-breeding .brd-hero-btn:hover {
    border-color: var(--fire-orange);
    background: rgba(255, 69, 0, 0.16);
    color: #fff;
}
.intel-breeding .brd-hero-btn:hover i { color: var(--fire-yellow); }

/* ======================================================================
   Grid picker (Browse) modal sheet
   ====================================================================== */
/* The Browse modal is mounted on <body> (see openGridPicker in intel-breeding.js)
   to escape the .intel-panel backdrop-filter containing block + stacking context,
   so it carries the .intel-breeding class on ITSELF — match both that (compound)
   and any nested usage. z-index outranks .intel-nav (calc(--site-nav-z + 4) ~=
   1084) and the site drawer/ticker so the nav can no longer paint over the modal. */
.intel-breeding.brd-grid-overlay,
.intel-breeding .brd-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--site-nav-z, 1080) + 220);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    box-sizing: border-box;
}
.intel-breeding .brd-grid-sheet {
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: rgba(16, 4, 2, 0.98);
    border: 1px solid var(--fire-orange);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    padding: 16px;
    box-sizing: border-box;
    min-width: 0;
}
.intel-breeding .brd-grid-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.intel-breeding .brd-grid-title {
    font-weight: 800;
    color: var(--fire-yellow);
    font-size: 1rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.intel-breeding .brd-grid-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(10, 0, 0, 0.4);
    color: #f0dcc2;
    cursor: pointer;
    font-size: 1rem;
}
.intel-breeding .brd-grid-close:hover { border-color: var(--fire-orange); color: #fff; background: rgba(255, 69, 0, 0.16); }
.intel-breeding .brd-grid-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.intel-breeding .brd-grid-search:focus { outline: none; border-color: var(--fire-orange); }
.intel-breeding .brd-grid-tiles {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    padding: 2px;
    -webkit-overflow-scrolling: touch;
}
.intel-breeding .brd-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px;
    border-radius: 11px;
    border: 1px solid var(--glass-border);
    background: rgba(20, 4, 2, 0.6);
    color: #ecdcc2;
    cursor: pointer;
    font-family: inherit;
    min-width: 0;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.intel-breeding .brd-tile:hover {
    border-color: var(--fire-orange);
    background: rgba(255, 69, 0, 0.14);
    transform: translateY(-2px);
}
.intel-breeding .brd-tile-art { width: 84px; height: 84px; }
.intel-breeding .brd-tile-name {
    font-weight: 700;
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.intel-breeding .brd-tile-meta { font-size: 0.68rem; color: rgba(240, 224, 196, 0.5); }
.intel-breeding .brd-tile-pow { color: var(--gold-light); }

.intel-breeding .brd-gender-split { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.intel-breeding .brd-gender-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    color: #f0dcc2;
    background: rgba(255, 255, 255, 0.04);
}
.intel-breeding .brd-gender-tag.brd-inline { margin-left: 8px; }

/* ======================================================================
   Reverse lookup
   ====================================================================== */
.intel-breeding .brd-single-pick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 280px;
    margin: 0 auto 8px;
    min-width: 0;
}
.intel-breeding .brd-rev-out, .intel-breeding .brd-tree-out { margin-top: 18px; min-width: 0; }
.intel-breeding .brd-rev-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--glass-border);
    margin-bottom: 14px;
    min-width: 0;
}
.intel-breeding .brd-rev-title { font-weight: 800; color: var(--fire-yellow); font-size: 1.1rem; }
.intel-breeding .brd-rev-sub { font-size: 0.8rem; color: rgba(240, 224, 196, 0.62); }
.intel-breeding .brd-rev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    min-width: 0;
}
.intel-breeding .brd-rev-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 140, 40, 0.06);
    border: 1px solid var(--glass-border);
    min-width: 0;
    overflow: hidden;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.intel-breeding .brd-rev-card:hover {
    border-color: var(--fire-orange);
    background: rgba(255, 69, 0, 0.14);
}
.intel-breeding .brd-rev-cta {
    margin-left: auto;
    color: rgba(240, 224, 196, 0.35);
    font-size: 0.78rem;
    flex-shrink: 0;
}
.intel-breeding .brd-rev-card:hover .brd-rev-cta { color: var(--fire-orange); }
.intel-breeding .brd-plus { color: var(--fire-orange); flex-shrink: 0; font-size: 0.8rem; }
.intel-breeding .brd-palchip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.intel-breeding .brd-palchip-name {
    font-weight: 600; font-size: 0.85rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px;
}
.intel-breeding .brd-note-box {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--glass-border);
    color: rgba(240, 224, 196, 0.82);
    font-size: 0.9rem;
    line-height: 1.5;
}
.intel-breeding .brd-note-box i { color: var(--fire-orange); margin-right: 6px; }

/* ======================================================================
   Breeding tree
   ====================================================================== */
.intel-breeding .brd-tree-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}
.intel-breeding .brd-owned {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 280px;
    min-width: 0;
}
.intel-breeding .brd-owned-add { position: relative; min-width: 0; }
.intel-breeding .brd-owned-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.intel-breeding .brd-owned-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(90, 200, 120, 0.12);
    color: #cdf2d8;
    cursor: pointer;
}
.intel-breeding .brd-owned-chip:hover { background: rgba(255, 69, 0, 0.14); color: #fff; }
.intel-breeding .brd-owned-chip i { font-size: 0.75em; }

.intel-breeding .brd-tree-scroll {
    margin-top: 8px;
    overflow-x: auto;
    padding: 10px 4px;
    -webkit-overflow-scrolling: touch;
}
.intel-breeding .brd-tree-scroll::-webkit-scrollbar { height: 8px; }
.intel-breeding .brd-tree-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.intel-breeding .brd-tree-scroll::-webkit-scrollbar-thumb { background: var(--fire-orange); border-radius: 4px; }

.intel-breeding ul.brd-tree-root,
.intel-breeding ul.brd-tree-lvl { list-style: none; margin: 0; padding: 0; }
.intel-breeding ul.brd-tree-lvl {
    padding-left: 22px;
    margin-top: 8px;
    border-left: 2px solid rgba(255, 140, 40, 0.28);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.intel-breeding li.brd-node { position: relative; min-width: 0; }
.intel-breeding li.brd-node.has-kids { padding-bottom: 2px; }
.intel-breeding .brd-node-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 10px;
    background: rgba(20, 4, 2, 0.7);
    border: 1px solid var(--glass-border);
    min-width: 0;
    max-width: 100%;
}
.intel-breeding li.brd-node.has-kids > .brd-node-card { border-color: rgba(255, 140, 40, 0.5); }
.intel-breeding .brd-node-name {
    font-weight: 700;
    color: #f6ead3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}
.intel-breeding .brd-node-op {
    display: inline-block;
    margin: 4px 0 0 6px;
    color: var(--fire-orange);
    font-size: 0.7rem;
}
.intel-breeding .brd-node-tag {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
    flex-shrink: 0;
}
.intel-breeding .brd-node-tag.is-catch { background: rgba(90, 200, 120, 0.14); border-color: #7ad79a; color: #cdf2d8; }
.intel-breeding .brd-node-tag.is-catchonly { background: rgba(255, 200, 60, 0.14); border-color: var(--gold-light); color: #ffe08a; }
.intel-breeding .brd-node-tag.is-owned { background: rgba(80, 160, 255, 0.16); border-color: #6fb0ff; color: #cfe4ff; }
.intel-breeding .brd-node-tag i { font-size: 0.85em; }
.intel-breeding .brd-tree-legend {
    margin-top: 14px;
    font-size: 0.78rem;
    color: rgba(240, 224, 196, 0.6);
    line-height: 1.8;
}

/* ======================================================================
   Unique-combo table accents (type badge)
   ====================================================================== */
.intel-breeding .brd-type { min-width: 96px; text-align: center; }
.intel-breeding .brd-type-same-species { background: rgba(200, 200, 200, 0.1); border-color: rgba(220, 220, 220, 0.4); color: #e6e6e6; }
.intel-breeding .brd-type-limited-cross {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 69, 0, 0.16));
    border-color: var(--gold-light); color: #ffe08a;
}
.intel-breeding .brd-type-gender-cross { background: rgba(190, 110, 255, 0.16); border-color: #c58cff; color: #ecd9ff; }
.intel-breeding .brd-inline-note { font-size: 0.72rem; color: rgba(240, 224, 196, 0.55); }

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 640px) {
    .intel-breeding .brd-slot-wrap { width: 100%; }
    .intel-breeding .brd-op { padding-top: 0; }
    .intel-breeding .brd-mode { padding: 8px 12px; font-size: 0.78rem; }
    .intel-breeding .brd-node-name { max-width: 110px; }
    .intel-breeding .brd-palchip-name { max-width: 92px; }

    /* Hero stacks vertically; child art sits above the details. */
    .intel-breeding .brd-hero { padding: 14px; }
    .intel-breeding .brd-hero-child {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }
    .intel-breeding .brd-hero-toplabel,
    .intel-breeding .brd-hero-actions { justify-content: center; }
    .intel-breeding .brd-hero-name { white-space: normal; }

    /* Grid picker becomes a full-width bottom-anchored sheet. */
    .intel-breeding.brd-grid-overlay,
    .intel-breeding .brd-grid-overlay { padding: 0; align-items: stretch; }
    .intel-breeding .brd-grid-sheet {
        max-width: none;
        max-height: 100%;
        border-radius: 0;
        border-width: 0;
    }
    .intel-breeding .brd-grid-tiles { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
    .intel-breeding .brd-tile-art { width: 70px; height: 70px; }
}
