/* ============================================================
   Idol & Resonance Builder — Eternal theme
   Inherits global.css tokens + Khand/Cinzel fonts.
   ============================================================ */

.idol-page {
    padding: 1rem 6vw 4rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.idol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.5rem;
}

.panel h2 {
    margin-top: 0;
}

.hint {
    color: var(--text-mute);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.75rem 0 0;
}
.hint strong { color: var(--ember-strong); }

/* ── Planner ── */
.planner__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.controls__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 130px;
}
.controls__field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-mute);
}

.exp-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(47, 214, 191, 0.22);
    background: rgba(47, 214, 191, 0.06);
}
.exp-summary__big {
    font-family: "Cinzel", serif;
    font-size: 1.9rem;
    color: var(--ember-strong);
    line-height: 1;
}
.exp-summary__sub {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--text-mute);
    margin-top: 0.35rem;
}

/* ── Tables ── */
.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--card-stroke);
}
.idol-table {
    width: 100%;
    min-width: 460px;          /* scroll inside .table-wrap instead of bleeding out */
    border-collapse: collapse;
    font-size: 0.9rem;
}
.idol-table thead tr {
    background: rgba(47, 214, 191, 0.07);
    border-bottom: 1px solid rgba(47, 214, 191, 0.18);
}
.idol-table th {
    font-family: "Cinzel", serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--silver);
    padding: 0.6rem 0.7rem;
    text-align: left;
}
.idol-table td {
    padding: 0.5rem 0.7rem;
    color: var(--text-ice);
    border-bottom: 1px solid rgba(120, 200, 200, 0.06);
    vertical-align: middle;
}
.idol-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.idol-table tbody tr:hover { background: rgba(47, 214, 191, 0.05); }
.idol-table tr.is-lv10 td {
    background: rgba(47, 214, 191, 0.10);
    font-weight: 600;
}
.idol-table sup { color: var(--ember); cursor: help; }

/* ── Resonance builder slots ── */
.tag {
    font-family: "Khand", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0a1416;
    background: var(--ember-strong);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    vertical-align: middle;
    margin-left: 0.4rem;
}
.reso-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.6rem 0 1rem;
}
.reso-slot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.reso-slot__num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--card-stroke);
    font-size: 0.85rem;
    color: var(--ember-strong);
}
.reso-slot__sel { flex: 1; min-width: 0; }
.reso-slot__lock {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    user-select: none;
}
.reso-slot__lock input { accent-color: var(--ember-strong); cursor: pointer; }
.reso-slot__lock input:disabled { cursor: not-allowed; }
.reso-slot__kr {
    margin: -0.2rem 0 0.2rem 2.2rem;
    font-size: 0.8rem;
    color: var(--text-mute);
}
.pin-result {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(10, 16, 18, 0.55);
    border: 1px solid var(--card-stroke);
    color: var(--text-mute);
    line-height: 1.5;
}
.pin-result strong { color: var(--ember-strong); }

/* ── Per-class resonance option list ── */
.opt-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.7rem;
    margin-top: 0.9rem;
}
.opt-item {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-stroke);
    background: rgba(10, 16, 18, 0.55);
}
.opt-item__skill {
    font-family: "Cinzel", serif;
    color: var(--ember-strong);
    font-size: 1.02rem;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.opt-prob {
    font-family: "Khand", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-ice);
    background: rgba(120, 200, 200, 0.12);
    border: 1px solid rgba(120, 200, 200, 0.28);
    border-radius: 999px;
    padding: 0.02rem 0.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.reso-odds {
    color: var(--text-ice);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
}
.opt-item__eff {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.opt-item__eff li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.2rem 0.6rem;
    font-size: 0.86rem;
    line-height: 1.35;
    border-bottom: 1px dashed rgba(120, 200, 200, 0.08);
    padding-bottom: 0.26rem;
}
.opt-item__eff li:last-child { border-bottom: none; padding-bottom: 0; }
.opt-eff { color: var(--text-mute); min-width: 0; }
.opt-val { color: var(--text-ice); font-weight: 600; white-space: normal; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
    .idol-page { padding: 1rem 5vw 3rem; }
    .exp-summary__big { font-size: 1.5rem; }
}

/* ── Resonance builder layout with per-class relic figure ── */
.reso-layout { display: flex; gap: 1.2rem; align-items: flex-start; }
.reso-main { flex: 1 1 auto; min-width: 0; }
.reso-figure {
    flex: 0 0 200px; margin: 0; text-align: center;
    align-self: stretch; display: flex; flex-direction: column;
    justify-content: center; gap: 0.4rem;
    border-left: 1px solid var(--card-stroke); padding-left: 1.1rem;
}
.reso-figure img {
    width: 100%; max-width: 200px; height: auto; margin: 0 auto;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
}
.reso-figure figcaption {
    font-family: "Cinzel", serif; color: var(--ember-strong);
    font-size: 0.9rem; letter-spacing: 0.02em;
}
@media (max-width: 720px) {
    .reso-layout { flex-direction: column; }
    .reso-figure { flex-basis: auto; border-left: none; padding-left: 0;
        border-top: 1px solid var(--card-stroke); padding-top: 0.8rem; }
    .reso-figure img { max-width: 150px; }
}
