/* ── Skill progression detail (Command tab sub-view) ─────────────────────── */

#pp-skills-grid-root .pp-skill-card {
    cursor: pointer;
}

#pp-skills-grid-root .pp-skill-card:hover {
    border-color: var(--text-secondary);
}

#pp-skills-grid-root .pp-skill-card::after {
    content: '›';
    position: absolute;
    right: 14px;
    top: 10px;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1.2;
    color: rgba(197, 160, 89, 0.45);
    opacity: 0.55;
    pointer-events: none;
}

#pp-skills-grid-root .pp-skill-card:hover::after {
    opacity: 0.85;
}

#char-tab-command.command-view--skill-detail #pp-profile-root {
    display: none;
}

#char-tab-command.command-view--skill-detail #pp-skill-detail-root {
    display: block;
}

#pp-skill-detail-root[hidden] {
    display: none !important;
}

/* ── Primary surface ─────────────────────────────────────────────────────── */

.sp-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(197, 160, 89, 0.015);
    overflow: hidden;
}

.sp-detail__highlight {
    color: var(--gold);
    font-weight: 600;
}

/* ── Skill summary header ────────────────────────────────────────────────── */

.sp-detail__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: 20px;
    align-items: start;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    background: rgba(0, 0, 0, 0.12);
}

.sp-detail__summary-main {
    min-width: 0;
}

.sp-detail__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
}

.sp-detail__icon-col {
    flex-shrink: 0;
}

.sp-detail__icon-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #5a4a2b;
    background: rgba(197, 160, 89, 0.06);
    border-radius: 3px;
}

.sp-detail__icon-wrap img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.sp-detail__identity-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-detail__identity-body .ph-name-row {
    margin-bottom: 0;
}

.sp-detail__identity-body .ph-name {
    font-size: var(--font-size-2xl);
    text-transform: none;
}

.sp-detail__identity-body .ph-meta-row {
    margin-top: 2px;
}

.sp-detail__identity-body .pp-skill-bar {
    width: 100%;
    height: 5px;
}

.sp-detail__blurb {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.45;
    max-width: 52ch;
}

/* ── Next unlock (integrated) ────────────────────────────────────────────── */

.sp-detail__next {
    padding: 0 14px;
    border-left: 1px solid rgba(197, 160, 89, 0.12);
    min-width: 0;
}

.sp-detail__next--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-detail__next-empty {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

.sp-detail__next-kicker {
    margin: 0 0 8px;
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.sp-detail__next-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sp-detail__next-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sp-detail__next-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.sp-detail__next-sub {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.35;
}

/* ── Unlocks section ─────────────────────────────────────────────────────── */

.sp-detail__unlocks {
    --sp-unlock-row-bleed: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px var(--sp-unlock-row-bleed) 16px;
}

.sp-detail__unlocks-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-detail__unlocks-head-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.sp-detail__unlocks-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.sp-detail__unlocks-count {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    white-space: nowrap;
}

.sp-detail__unlocks-sub {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Unlock list rows ────────────────────────────────────────────────────── */

.sp-unlock-list {
    display: flex;
    flex-direction: column;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sp-unlock-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
}

.sp-unlock-row:last-child {
    border-bottom: none;
}

.sp-unlock-row--next {
    background: rgba(197, 160, 89, 0.04);
    margin-left: calc(-1 * var(--sp-unlock-row-bleed));
    margin-right: calc(-1 * var(--sp-unlock-row-bleed));
    padding-left: var(--sp-unlock-row-bleed);
    padding-right: var(--sp-unlock-row-bleed);
}

.sp-unlock-row--locked {
    opacity: 0.62;
}

.sp-unlock-row--locked .mkt-item-name {
    opacity: 0.85;
}

.sp-unlock-row__level {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

.sp-unlock-row__item {
    min-width: 0;
}

.sp-unlock-row__status-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 148px;
}

.sp-unlock-row__status {
    font-family: var(--font-body);
    font-size: var(--font-size-md);
    font-weight: 500;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
}

.sp-unlock-row__status--done {
    color: var(--text-success);
}

.sp-unlock-row__status--next {
    color: var(--gold);
}

.sp-unlock-row__status--locked {
    color: var(--text-muted);
}

.sp-unlock-row__badge-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.55;
}

.sp-unlock-row:not(.sp-unlock-row--locked) .sp-unlock-row__badge-icon {
    opacity: 0.75;
}

/* ── Footer tip ──────────────────────────────────────────────────────────── */

.sp-detail__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 14px;
    border-top: 1px solid rgba(197, 160, 89, 0.08);
    background: rgba(0, 0, 0, 0.08);
}

.sp-detail__footer-icon {
    flex-shrink: 0;
    opacity: 0.6;
}

.sp-detail__footer-text {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: 1.45;
}

.sp-empty-msg {
    margin: 0;
    padding: 16px 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .sp-detail__summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sp-detail__next {
        border-left: none;
        border-top: 1px solid rgba(197, 160, 89, 0.1);
        padding-top: 12px;
        padding-left: 0;
    }

    .sp-detail__unlocks-head-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .sp-unlock-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 6px 8px;
    }

    .sp-unlock-row__status-col {
        min-width: 120px;
        gap: 6px;
    }
}
