
/* The local flex-column sticky footer that used to live here is gone: style.css
   now does it sitewide with `body > footer { position: sticky; top: 100vh }`.
   That matters beyond deduplication -- making body a flex container turns every
   direct child into a flex item, which is exactly what shrank the lookup bar
   from 450px to 323px when the same approach was briefly applied sitewide. No
   reason for this page to keep carrying that risk on its own. */

.live-browse {
    width: 100%;
    max-width: 1180px;
    margin: 4rem auto;
    padding: 0 2rem;
}
.live-split {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}
.live-half {
    flex: 1;
    min-width: 0;
}
.live-half-tourney {
    border-left: 1px solid var(--border);
    padding-left: 2.5rem;
}
@media (max-width: 820px) {
    .live-split { flex-direction: column; gap: 3rem; }
    .live-half-tourney { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 2rem; }
}
.live-browse-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.live-browse-header h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--gold);
    white-space: nowrap;
    margin: 0;
}
.tourney-header-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}
.tourney-header-link:hover {
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(201,168,76,0.4);
}
.live-search-input {
    width: 72px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    transition: width 0.25s ease;
}
.live-search-input:focus { outline: none; border-color: var(--gold-dim); width: 260px; max-width: calc(100% - 160px); }
.live-search-input::placeholder { color: var(--text-muted); }
.live-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.live-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.3rem;
    width: 100%;
    padding: 0.4rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s;
}
.live-card:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.live-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.live-card-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-card-tag { font-size: 0.95rem; color: var(--text-muted); }
.live-card-meta { display: flex; align-items: center; gap: 0.6rem; }
.live-card-level { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }
.live-card-rank { font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold); }
.live-card-phase {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.live-card-phase .phase-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
}
.live-card-phase .phase-info { display: flex; flex-direction: column; gap: 1px; }
.live-card-phase .phase-label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--text-muted);
}
.live-card-phase .phase-detail {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.7;
}
.live-card[data-phase="lobby"] .phase-dot { background: var(--phase-lobby); }
.live-card[data-phase="lobby"] .phase-label { color: var(--phase-lobby); }
.live-card[data-phase="matchmaking"] .phase-dot { background: var(--phase-matchmaking); box-shadow: 0 0 4px rgba(126, 170, 237, 0.4); }
.live-card[data-phase="matchmaking"] .phase-label { color: var(--phase-matchmaking); }
.live-card[data-phase="readycheck"] .phase-dot { background: var(--phase-readycheck); box-shadow: 0 0 4px rgba(224, 197, 106, 0.4); }
.live-card[data-phase="readycheck"] .phase-label { color: var(--phase-readycheck); }
.live-card[data-phase="champselect"] .phase-dot { background: var(--phase-champselect); box-shadow: 0 0 4px rgba(201, 168, 76, 0.4); animation: pulse-phase-champ 1.5s ease-in-out infinite; }
.live-card[data-phase="champselect"] .phase-label { color: var(--phase-champselect); }
.live-card[data-phase="gamestart"] .phase-dot { background: var(--phase-gamestart); }
.live-card[data-phase="gamestart"] .phase-label { color: var(--phase-gamestart); }
.live-card[data-phase="inprogress"] .phase-dot { background: var(--phase-inprogress); box-shadow: 0 0 4px rgba(76, 175, 80, 0.4); animation: pulse-phase-game 1.5s ease-in-out infinite; }
.live-card[data-phase="inprogress"] .phase-label { color: var(--phase-inprogress); }
.live-card[data-phase="waitingforstats"] .phase-dot { background: var(--phase-waitingforstats); }
.live-card[data-phase="waitingforstats"] .phase-label { color: var(--phase-waitingforstats); }
.live-card[data-phase="idle"] .phase-dot { background: var(--text-muted); }
@keyframes pulse-phase-champ { 0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(201, 168, 76, 0.4); } 50% { opacity: 0.5; box-shadow: 0 0 8px rgba(201, 168, 76, 0.7); } }
@keyframes pulse-phase-game { 0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(76, 175, 80, 0.4); } 50% { opacity: 0.5; box-shadow: 0 0 8px rgba(76, 175, 80, 0.7); } }
.live-none { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 2rem 0; }

.live-mastery-panel {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    border-radius: 10px;
}
.live-mastery-label { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--gold); margin-bottom: 8px; }
.live-mastery-list { display: flex; flex-wrap: wrap; gap: 8px; }
.live-mastery-chip {
    display: flex; align-items: baseline; gap: 6px;
    background: var(--overlay-soft); border: 1px solid var(--border); border-radius: 999px;
    padding: 5px 12px; font-family: var(--font-mono);
}
.live-mastery-champ { font-size: 0.8rem; color: var(--text); }
.live-mastery-pts { font-size: 0.68rem; color: var(--text-muted); }
.live-mastery-note { font-size: 0.68rem; color: var(--text-muted); font-style: italic; margin-top: 8px; }

.live-empty {
    width: 100%;
    max-width: 500px;
    margin: 8rem auto;
    text-align: center;
    padding: 2rem;
}
.live-empty h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.live-empty p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
.live-url-hint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.live-url-hint:hover { opacity: 1; }
.hint-placeholder { color: var(--gold); }
.highlight { color: var(--text); }

.live-session {
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.nav-host {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    padding: 0 1rem;
}
.nav-host-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem;
    width: 100%;
    max-width: 640px;
    min-width: 0;
}
.nav-host-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.live-host-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-host-tag {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.nav-host-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}
.live-host-level {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}
.live-host-rank {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--gold);
}

.live-phase-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.live-phase-banner .phase-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
    transition: background 0.3s, box-shadow 0.3s;
}
.live-phase-banner .phase-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.live-phase-banner .phase-label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--text-muted);
    transition: color 0.3s;
}
.live-phase-banner .phase-detail {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.7;
}

@media (max-width: 1100px) {
    .nav-host-banner .phase-detail { display: none; }
}
@media (max-width: 860px) {
    .nav-host { display: none; }
}

.live-phase-banner[data-phase="offline"] { border-color: var(--border); }
.live-phase-banner[data-phase="offline"] .phase-dot { background: var(--text-muted); }

.live-phase-banner[data-phase="idle"] { border-color: var(--border); }
.live-phase-banner[data-phase="idle"] .phase-dot { background: var(--text-muted); }

.live-phase-banner[data-phase="lobby"] { border-color: var(--phase-lobby); }
.live-phase-banner[data-phase="lobby"] .phase-dot { background: var(--phase-lobby); }
.live-phase-banner[data-phase="lobby"] .phase-label { color: var(--phase-lobby); }

.live-phase-banner[data-phase="matchmaking"] { border-color: var(--phase-matchmaking); }
.live-phase-banner[data-phase="matchmaking"] .phase-dot { background: var(--phase-matchmaking); box-shadow: 0 0 4px rgba(126, 170, 237, 0.4); }
.live-phase-banner[data-phase="matchmaking"] .phase-label { color: var(--phase-matchmaking); }

.live-phase-banner[data-phase="readycheck"] { border-color: var(--phase-readycheck); }
.live-phase-banner[data-phase="readycheck"] .phase-dot { background: var(--phase-readycheck); box-shadow: 0 0 6px rgba(224, 197, 106, 0.5); }
.live-phase-banner[data-phase="readycheck"] .phase-label { color: var(--phase-readycheck); }

.live-phase-banner[data-phase="champselect"] { border-color: var(--phase-champselect); }
.live-phase-banner[data-phase="champselect"] .phase-dot { background: var(--phase-champselect); box-shadow: 0 0 6px rgba(201, 168, 76, 0.5); animation: pulse-phase-champ 1.5s ease-in-out infinite; }
.live-phase-banner[data-phase="champselect"] .phase-label { color: var(--phase-champselect); }

.live-phase-banner[data-phase="gamestart"] { border-color: var(--phase-gamestart); }
.live-phase-banner[data-phase="gamestart"] .phase-dot { background: var(--phase-gamestart); box-shadow: 0 0 4px rgba(184, 115, 51, 0.4); }
.live-phase-banner[data-phase="gamestart"] .phase-label { color: var(--phase-gamestart); }

.live-phase-banner[data-phase="inprogress"] { border-color: var(--phase-inprogress); }
.live-phase-banner[data-phase="inprogress"] .phase-dot { background: var(--phase-inprogress); box-shadow: 0 0 6px rgba(76, 175, 80, 0.5); animation: pulse-phase-game 1.5s ease-in-out infinite; }
.live-phase-banner[data-phase="inprogress"] .phase-label { color: var(--phase-inprogress); }

.live-phase-banner[data-phase="waitingforstats"] { border-color: var(--phase-waitingforstats); }
.live-phase-banner[data-phase="waitingforstats"] .phase-dot { background: var(--phase-waitingforstats); }
.live-phase-banner[data-phase="waitingforstats"] .phase-label { color: var(--phase-waitingforstats); }

.live-state { margin-top: 1rem; }
.state-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 0;
}

.code-input-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}
.code-input {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-align: center;
    width: 140px;
    padding: 0.5rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--gold);
    text-transform: uppercase;
}
.code-input:focus {
    outline: none;
    border-color: var(--gold-dim);
}
.code-submit {
    font-family: var(--font-script);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    color: var(--gold);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.code-submit:hover {
    border-color: var(--gold);
    color: var(--on-gold);
}
.code-error {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--blood-light);
    text-align: center;
    margin-top: 0.5rem;
}

.draft-container {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto minmax(240px, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin-top: 1.5rem;
}

.side-banners {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.9rem;
}
.suggest-side-label {
    color: var(--gold);
}
.team-header:has(.suggestion-info-bubble) {
    justify-content: space-between;
}
.team-header .suggestion-info-bubble {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
}
.draft-bans.spacer-bans {
    min-height: 41px;
}
.suggest-banner-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.suggest-banner-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1px;
    /* Fixed, and the icon grid below is clamped to two rows to match. Letting
       the row grow instead made every player's block a different height as the
       column narrowed, which is worse than showing fewer suggestions: the
       panel is a comparison between players, and rows of unequal height stop
       being comparable. Fewer icons, same shape. */
    height: 77px;
    padding: 0.2rem 0.25rem;
    border-radius: 5px;
    background: var(--overlay-soft);
    border: 1px solid transparent;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.suggest-banner-row:hover {
    border-color: rgba(201, 168, 76, 0.3);
}
.suggest-banner-row.selected-suggestions {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
}
.suggest-banner-row.bans-side {
    cursor: default;
}
.suggest-banner-row.bans-side:hover {
    border-color: transparent;
}
.suggest-banner-id {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.suggest-banner-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(27px, 1fr));
    grid-auto-rows: 27px;
    gap: 2px;
    /* Two rows exactly: 27 + 2 + 27. Anything past that is dropped rather than
       wrapping to a third row and pushing the player's name out of the box.
       The suggestions are ordered best-first, so what gets cut is the tail. */
    max-height: 56px;
    overflow: hidden;
}
.suggest-banner-icon {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    transition: transform 0.15s, border-color 0.15s, opacity 0.25s;
}
.suggest-banner-icon.iconLoading {
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 0.5rem; font-weight: 700;
    color: var(--text-muted); background: var(--overlay-soft); text-transform: uppercase;
    opacity: 0.6;
}
.suggest-grid-icon {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1.5px solid var(--border);
    transition: opacity 0.25s;
}
.suggest-grid-icon.iconLoading {
    background: var(--overlay-soft);
    opacity: 0.6;
}
.suggest-banner-empty {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.suggest-banner-icon[data-name]:hover,
.draft-ban[data-name]:hover {
    transform: scale(1.22);
    z-index: 6;
}
.suggest-banner-icon[data-name]:hover {
    border-color: var(--gold-dim);
}
.draft-ban[data-name]:hover {
    border-color: var(--side-red);
}
.suggest-banner-icon[data-name]::after,
.draft-ban[data-name]::before {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.suggest-banner-icon[data-name]:hover::after,
.draft-ban[data-name]:hover::before {
    opacity: 1;
}
.suggest-banner-icon.starred::before {
    content: '★';
    position: absolute;
    top: -4px;
    left: -4px;
    font-size: 0.6rem;
    color: var(--gold);
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
    z-index: 5;
}
.suggest-grid-item.starred::before {
    content: '★';
    position: absolute;
    top: 0px;
    left: 2px;
    font-size: 1.3rem; /* star glyphs render smaller than their font-size box suggests -- bumped up to visually match the badge's 16px circle, not just numerically match it */
    color: var(--gold);
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 5;
}
.suggest-grid-item[data-reason]::after {
    content: attr(data-reason);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text);
    white-space: normal;
    width: max-content;
    max-width: 160px;
    text-align: center;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.suggest-grid-item[data-reason]:hover::after {
    opacity: 1;
}

.draft-team {
    width: 230px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.9rem;
    transition: border-color 0.3s;
}
.draft-team.watched {
    border-color: var(--gold-dim);
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.08);
}
.draft-team.opponent.side-blue { border-left: 3px solid var(--side-blue); }
.draft-team.opponent.side-red { border-right: 3px solid var(--side-red); }

.team-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 28px;
    margin-bottom: 0.7rem;
}
.team-label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.team-label .team-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.draft-team.watched .team-label { color: var(--gold); }
.draft-team.watched .team-dot { background: var(--gold); box-shadow: 0 0 4px rgba(201, 168, 76, 0.4); }
.draft-team.opponent.side-blue .team-label { color: var(--side-blue); }
.draft-team.opponent.side-blue .team-dot { background: var(--side-blue); box-shadow: 0 0 4px rgba(126, 170, 237, 0.4); }
.draft-team.opponent.side-red .team-label { color: var(--side-red); }
.draft-team.opponent.side-red .team-dot { background: var(--side-red); box-shadow: 0 0 4px rgba(192, 57, 43, 0.4); }

.draft-picks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.draft-pick {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 5px;
    background: var(--overlay-soft);
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.draft-pick.local-player {
    background: rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.25);
}
.draft-pick.local-player .pick-name {
    color: var(--gold);
}
.draft-pick.picking {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.5);
}
.draft-pick.picking-active {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.22);
    animation: gentle-pulse 1.4s ease-in-out infinite;
}
@keyframes gentle-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
.pick-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.3s, transform 0.3s;
}
.draft-team.watched .pick-icon { border-color: rgba(201, 168, 76, 0.3); }
.draft-pick.local-player .pick-icon { border-color: var(--gold-dim); }
.pick-icon.empty {
    background: var(--overlay-soft);
    opacity: 0.4;
}
/* Hovered, not locked. A dashed border said so and the portrait underneath it
   did not -- at 0.55 on a dark page a full-colour champion still reads as a
   pick. Drained of colour it reads as what it is: what they are looking at. */
.pick-icon.hover {
    opacity: 0.42;
    filter: grayscale(0.65);
    border-style: dashed;
    animation: gentle-pulse 1.4s ease-in-out infinite;
}
.pick-icon.pick-new {
    animation: pick-appear 0.4s ease-out;
}
@keyframes pick-appear {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.pick-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.pick-position {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.7;
    letter-spacing: 0.5px;
}
.pick-champ-line {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    text-decoration: none;
    cursor: pointer;
}
.pick-champ-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.pick-build-arrow {
    flex-shrink: 0;
    color: var(--gold-dim);
    font-size: 0.75rem;
    transition: color 0.2s;
}
.pick-champ-line:hover .pick-champ-name,
.pick-champ-line:hover .pick-build-arrow {
    color: var(--gold);
}
.pick-name {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draft-bans {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.draft-ban {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    background-color: var(--overlay-soft);
    border: 1.5px solid var(--overlay-border);
    opacity: 0.7;
    position: relative;
    transition: opacity 0.2s;
}
.draft-ban.banned {
    opacity: 0.85;
    border-color: rgba(192, 57, 43, 0.6);
}
/* Same rule as a hovered pick: not locked in, so not in colour. */
.draft-ban.ban-hover {
    opacity: 0.45;
    filter: grayscale(0.65);
    border-style: dashed;
    border-color: rgba(192, 57, 43, 0.4);
    animation: gentle-pulse 1.4s ease-in-out infinite;
}
.draft-ban.banned::after,
.draft-ban.ban-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    width: 84%;
    height: 2px;
    background: rgba(192, 57, 43, 0.85);
    transform: translateY(-50%) rotate(45deg);
    border-radius: 1px;
}

.draft-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0;
}

.side-indicator {
    width: 80px;
    height: 80px;
}
.side-map {
    width: 100%;
    height: 100%;
    position: relative;
    border: 2px solid var(--overlay-border);
    border-radius: 3px;
    background: var(--bg);
    box-sizing: border-box;
}
.map-lane {
    position: absolute;
    background: var(--border);
}
.map-lane.top {
    top: 0;
    left: 0;
    width: 2px;
    height: 60%;
}
.map-lane.top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 2px;
    background: var(--border);
}
.map-lane.mid {
    top: 50%;
    left: 50%;
    width: 60%;
    height: 2px;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: var(--border);
}
.map-lane.bot {
    bottom: 0;
    right: 0;
    width: 2px;
    height: 60%;
}
.map-lane.bot::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 2px;
    background: var(--border);
}
.side-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.side-marker.blue {
    bottom: 8px;
    left: 8px;
    background: var(--side-blue);
    box-shadow: 0 0 4px rgba(126, 170, 237, 0.5);
}
.side-marker.red {
    top: 8px;
    right: 8px;
    background: var(--side-red);
    box-shadow: 0 0 4px rgba(192, 57, 43, 0.5);
}
.side-marker.watched {
    width: 16px;
    height: 16px;
    background: var(--gold) !important;
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.7) !important;
}

.draft-timer {
    text-align: center;
}
.now-picking {
    min-height: 18px;
    min-width: 70px;
    text-align: center;
}
.picking-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--gold);
}
.picking-arrow {
    font-size: 0.85rem;
    animation: arrow-point 1s ease-in-out infinite;
}
@keyframes arrow-point {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.timer-phase {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--gold);
    display: block;
}
.timer-time {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--text);
    display: block;
    margin-top: 0.3rem;
    letter-spacing: 1px;
}

.suggestions-expanded {
    margin: 1.2rem 2rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.suggestions-expanded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.suggestions-expanded-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--gold);
}
.team-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.suggest-sort-select,
.ban-sort-select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.suggest-sort-select:hover,
.suggest-sort-select:focus,
.ban-sort-select:hover,
.ban-sort-select:focus {
    border-color: var(--gold-dim);
    color: var(--text);
    outline: none;
}
.suggestions-placeholder {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.suggestions-api-note {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 0.5rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 4px;
}
.suggest-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    padding: 5px 3px 4px;
    background: var(--overlay-soft);
    cursor: pointer;
    transition: transform 0.15s ease-out, border-color 0.2s;
}
.suggest-grid-item:hover {
    transform: scale(1.06);
    z-index: 10;
    border-color: var(--gold-dim);
}
.suggest-grid-name {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 3px;
    opacity: 0.7;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.suggest-grid-score {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
}
.suggest-grid-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 500;
    color: #0c0808;
    z-index: 10; /* the icon comes after this in the DOM and has its own position:relative stacking context, so without this it painted right over the badge */
}
.suggest-grid-badge.tier-1 { background: var(--gold); }
.suggest-grid-badge.tier-2 { background: var(--silver); }
.suggest-grid-badge.tier-3 { background: var(--bronze); }
.suggestion-info-bubble {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s, color 0.2s;
}
.suggestion-info-bubble:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}
.suggestion-reason-popup {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: max-content;
    max-width: 180px;
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    line-height: 1.4;
    color: var(--text);
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1100px) {
    .draft-container {
        grid-template-columns: auto auto auto;
    }
    .side-banners { display: none; }
}
@media (max-width: 900px) {
    .draft-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .draft-center {
        order: -1;
        flex-direction: row;
        padding-top: 0;
    }
    .side-indicator { width: 50px; height: 50px; }
}

/* Suggestion analytics modal -- opens on clicking a suggestion cell in the
   expanded grid, showing score/mastery/winrate/games/reason concisely,
   replacing the old click-to-show-just-the-reason info bubble. */
.suggestion-analytics-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.suggestion-analytics-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    border-radius: 10px;
    padding: 1.25rem;
    width: 280px;
    max-width: 90vw;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.suggestion-analytics-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.7rem;
    transition: border-color 0.15s, color 0.15s;
}
.suggestion-analytics-close:hover { border-color: var(--gold-dim); color: var(--gold); }
.suggestion-analytics-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.suggestion-analytics-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
}
.suggestion-analytics-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gold);
}
.suggestion-analytics-score {
    font-family: var(--font-mono);
    font-size: 0.7rem;
}
.suggestion-analytics-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.suggestion-analytics-stats > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--overlay-soft);
    border-radius: 5px;
    padding: 0.4rem 0.5rem;
}
.suggestion-analytics-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
}
.suggestion-analytics-stats span:last-child {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
}
.suggestion-analytics-reason {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
}

/* A rehearsal is a real, watchable live draft, so it belongs in this list --
   but it is a mock, and a card that reads "Lv. 0" with no rank sitting beside
   real players looks like a broken entry rather than a deliberate one. The
   badge says what it is; the muted border keeps it from competing with games. */
.live-card.is-rehearsal { border-style: dashed; opacity: 0.9; }
.live-card-mock {
    margin-left: 7px;
    padding: 1px 6px;
    border: 1px solid var(--gold-dim);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    vertical-align: middle;
}

/* ===== THE GAME ITSELF =====
   The same rows as the draft, carrying what a draft has no answer for: what
   they have built and how it is going. Fed by the client's own in-game API
   through the Connector -- Riot publishes nothing about a game in progress. */
.live-row .pick-info { gap: 2px; }
.live-line {
    display: flex; gap: 0.5rem; align-items: baseline;
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--text-muted);
}
.live-kda { color: var(--text); }
.live-items { display: flex; gap: 2px; margin-top: 3px; }
.live-item {
    width: 18px; height: 18px;
    border-radius: 3px;
    background-size: cover; background-position: center;
    background-color: var(--overlay-soft);
    border: 1px solid var(--border);
}
/* Dead is a state you want to read at a glance, not a line to parse. */
.live-row.is-dead { opacity: 0.45; }
.live-row.is-dead .pick-icon { filter: grayscale(1); }

/* What wins on this champion, and what you build on it. An item you already
   hold is marked rather than hidden: the gap is the point. */
.item-advice { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.item-advice-label {
    width: 9ch; flex: none;
    font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-muted);
}
.item-advice .live-item { width: 26px; height: 26px; }
.item-advice .live-item.held { border-color: var(--gold); opacity: 0.5; }
.item-advice-note { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-muted); margin: 4px 0 0; }
