/* Pal Sphere Tier List (Intelligence wiki). Reuses the classic tier-row shell
   from intel-tier-list.css (colored labeled rows) but swaps the round Pal chips
   for richer sphere cards: art + Capture Power + catch-strength bar + craft cost
   + where-obtained. All rules namespaced under .intel-container so nothing leaks
   into the rest of the site. Theme note: the Intelligence shell is dark; colors
   chosen for AA-legible text on the dark panel and each tier's tinted label. */

.intel-container .sph-note {
    margin: 0 0 1.1rem;
    color: rgba(240, 224, 205, 0.72);
    font-size: 0.92rem;
}

/* Two-line tier label (letter + tier name) inside the shared .tl-label block. */
.intel-container .sph-row .tl-label {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem;
}
.intel-container .sph-label-t {
    font-weight: 900;
    font-size: 1.7rem;
    line-height: 1;
}
.intel-container .sph-label-name {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0.85;
}
/* Widen the label column a touch to fit the tier name. */
.intel-container .sph-row {
    grid-template-columns: 96px 1fr;
}

/* --- Sphere card grid inside a tier row --------------------------------- */
.intel-container .sph-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.6rem;
    padding: 0.65rem;
    min-width: 0;
}

.intel-container .sph-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 12, 8, 0.55);
    border: 1px solid rgba(255, 220, 180, 0.16);
    color: #fff;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    transition: background 0.13s ease, border-color 0.13s ease, transform 0.13s ease;
}
.intel-container a.sph-card:hover {
    background: rgba(40, 32, 20, 0.85);
    border-color: rgba(255, 200, 110, 0.6);
    transform: translateY(-1px);
}
.intel-container a.sph-card:focus-visible {
    outline: 2px solid #ffcf3f;
    outline-offset: 2px;
}
.intel-container .sph-card.is-static { cursor: default; opacity: 0.94; }

/* Header: art + name + power */
.intel-container .sph-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}
.intel-container .sph-art {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.intel-container .sph-art img { width: 100%; height: 100%; object-fit: contain; }
.intel-container .sph-art-ph { color: rgba(255, 220, 180, 0.5); font-size: 1.1rem; }

.intel-container .sph-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.intel-container .sph-name {
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.intel-container .sph-power {
    font-size: 0.78rem;
    color: rgba(240, 224, 205, 0.7);
}
.intel-container .sph-power-val {
    color: #ffcf3f;
    font-size: 1.02rem;
    font-weight: 900;
}

/* Catch-strength bar */
.intel-container .sph-bar {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.intel-container .sph-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #5cc46f, #ffd257 55%, #ff9d2e);
}

/* Meta rows: craft / obtained / price */
.intel-container .sph-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    min-width: 0;
}
.intel-container .sph-meta-row {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 0.4rem;
    align-items: start;
    min-width: 0;
}
.intel-container .sph-meta-lbl {
    color: rgba(240, 224, 205, 0.5);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.03em;
    padding-top: 0.15rem;
}
.intel-container .sph-meta-val {
    color: rgba(240, 224, 205, 0.86);
    min-width: 0;
    overflow-wrap: anywhere;
}
.intel-container .sph-mats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 0;
}
.intel-container .sph-mat {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 220, 180, 0.12);
    color: rgba(240, 224, 205, 0.9);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* --- Mobile: stack the tier label above its cards ----------------------- */
@media (max-width: 560px) {
    .intel-container .sph-row { grid-template-columns: 1fr; }
    .intel-container .sph-row .tl-label {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: flex-start;
        align-items: baseline;
        padding: 0.3rem 0.75rem;
    }
    .intel-container .sph-label-t { font-size: 1.2rem; }
    .intel-container .sph-cards { grid-template-columns: 1fr; }
}
