/* Player page — overview section. Owned by the overview worker. */
#overview .ov-stack { display: flex; flex-direction: column; gap: var(--sp-4); }
#overview .ov-cols { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
#overview .ov-col { align-self: start; display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
@media (min-width: 960px) { #overview .ov-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Profile */
.ov-profile { position: relative; overflow: hidden; padding: var(--sp-5) var(--sp-4); }
.ov-profile-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: .35;
}
.ov-profile-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--surface-1) 10%, rgba(20,22,27,.55) 100%);
}
.ov-profile-body { position: relative; display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.ov-name { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; margin: 0; line-height: 1.1; }
.ov-title { color: var(--text-2); margin: 2px 0 var(--sp-2); }
.ov-meta { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; color: var(--text-2); font-size: var(--fs-sm); }
.ov-status { display: inline-flex; align-items: center; gap: 6px; }

/* Rank cards */
.ov-rank { display: flex; align-items: center; gap: var(--sp-3); border-top: 3px solid var(--rank-color, var(--border)); }
.ov-rank.is-clickable { cursor: pointer; }
.ov-rank.unranked { opacity: .55; border-top-color: var(--border); }
.ov-rank-icon { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.ov-rank-icon.blank { border-radius: 50%; background: var(--surface-2); }
.ov-rank-main { min-width: 0; }
.ov-rank-value { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; }
.ov-rank-peak { color: var(--text-3); font-size: var(--fs-xs); }

/* Shared bits */
.ov-heroes { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.ov-heroes button { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; }
.ov-heroes button:hover .hero-icon { outline: 2px solid var(--border-strong); }
.ov-tiles { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ov-tile-sub { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-3); min-height: 22px; }
.ov-line { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: var(--fs-sm); }
.ov-line + .ov-line, .ov-line + .ov-tiles, .ov-tiles + .ov-line { margin-top: var(--sp-3); }
.ov-controls { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Role split */
.ov-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.ov-bar span { background: var(--role-color); min-width: 3px; }
.ov-bar-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-3); font-size: var(--fs-sm); }

/* Session rows */
.ov-session {
    display: grid; gap: var(--sp-1) var(--sp-3); align-items: center;
    /* fixed tracks so columns line up across rows (each row is its own grid) */
    grid-template-columns: 200px 56px 84px 120px 156px minmax(0, 1fr);
    padding: var(--sp-2); border-top: 1px solid var(--border);
    cursor: pointer; border-radius: var(--radius-sm);
}
.card-head + .ov-session { border-top: 0; }
.ov-session:hover { background: var(--surface-2); }
.ov-session .mode-badge { justify-self: start; }
@media (min-width: 768px) and (max-width: 1100px) {
    .ov-session { grid-template-columns: 180px 56px 84px 120px minmax(0, 1fr); }
    .ov-with { grid-column: 2 / -1; }
}
.ov-when { font-weight: 600; font-size: var(--fs-sm); }
.ov-with { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-more { margin-top: var(--sp-3); }
@media (max-width: 767px) {
    .ov-session { grid-template-columns: auto auto 1fr; }
    .ov-when { grid-column: 1 / -1; }
    .ov-wr { text-align: right; }
    .ov-session .ov-heroes { grid-column: 1 / 3; }
    .ov-with { grid-column: 3; text-align: right; }
}

/* Records */
.ov-records { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ov-record { background: var(--surface-2); border-radius: var(--radius-md); padding: var(--sp-3); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ov-record-hero { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); margin-top: 2px; flex-wrap: wrap; }
.ov-record-hero span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Session detail modal */
.ov-detail-row { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; border-top: 1px solid var(--border); }
.ov-detail-row:first-child { border-top: 0; }
.ov-detail-stats { display: flex; gap: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-2); }

/* Rank cards: 4 across on desktop, 2x2 on phones */
.ov-ranks { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .ov-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
    .ov-ranks { gap: var(--sp-2); }
    .ov-rank { flex-direction: column; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-3); }
    .ov-rank-icon { width: 40px; height: 40px; }
    .ov-rank-value { font-size: var(--fs-lg); }
}
