/* Pick'Em page styles — csstats.gg */

.is-hidden {
    display: none;
}

/* ── Layout ─────────────────────────────────────────────────────── */
body.pickem-page {
    background-color: #0B0D18;
    background-size: contain, contain;
    background-repeat: no-repeat;
    color: rgba(255, 255, 255, 0.8);
}

#pickem-outer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ── Tracking badge (header-minimal) ────────────────────────────── */
.tracking-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    align-self: center;
    text-decoration: none;
}

.tracking-badge-error {
    background: #1c0809;
    border: 1px solid rgba(208, 65, 67, 0.35);
    color: #e05555;
}

.tracking-badge-error:hover {
    color: #e05555;
    text-decoration: none;
}

/* ── Page header ─────────────────────────────────────────────────── */
.pickem-page-header {
    padding: 40px 0 24px;
}

.pickem-page-header__title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.1;
}

.pickem-page-header__status {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pickem-page-header__status.is-open {
    color: #4caf7d;
}

.pickem-page-header__status.is-closed {
    color: #6B7089;
}

/* ── Banners (guest + auth code) ────────────────────────────────── */
.pickem-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pickem-banner--guest {
    background: #0D0F1C;
    border: 1px solid #1A1D2E;
    color: #BEC2CC;
    font-size: 0.95rem;
}

.pickem-banner--auth {
    background: rgba(208, 65, 67, 0.12);
    border: 1px solid rgba(208, 65, 67, 0.2);
}

.pickem-auth-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    background: #2a1518;
    border: 1px solid #481d1f;
    color: #e86264;
    margin-bottom: 8px;
}

.pickem-banner__body p {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.pickem-banner__body a {
    color: #4A7DFF;
    font-weight: 600;
}

.pickem-banner__body a:hover {
    color: #5C8CFF;
    text-decoration: underline;
}

.pickem-banner__form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pickem-banner__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #1b2838;
    color: #c6d4df;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid #2a475e;
    white-space: nowrap;
    transition: background 0.15s;
}

.pickem-banner__btn:hover {
    background: #2a475e;
    color: #fff;
    text-decoration: none;
}

.pickem-banner__inner {
    display: flex;
    flex: 1;
    gap: 20px;
    align-items: flex-start;
    min-width: 0;
}

.pickem-banner__left {
    flex: 1;
    min-width: 0;
}

.pickem-banner__image {
    flex-shrink: 0;
    align-self: center;
}

.pickem-banner__image a {
    display: contents;
}

.pickem-banner__image img {
    display: block;
    max-width: 260px;
    border-radius: 4px;

}

@media (max-width: 640px) {
    .pickem-banner__inner {
        flex-direction: column;
    }

    .pickem-banner__image img {
        max-width: 100%;
    }
}

.pickem-banner__error {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 6px 10px;
    background: #1C0B0B;
    border-left: 3px solid #e05050;
    border-radius: 3px;
    color: #f08080;
    font-size: 0.85rem;
}

.pickem-input {
    padding: 8px 12px;
    background: #1a1a22;
    border: 1px solid #2e2e3a;
    border-radius: 6px;
    color: #fff;
    font-size: 0.875rem;
    font-family: monospace;
    width: 210px;
    outline: none;
    transition: border-color 0.2s;
}

.pickem-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-family: monospace;
}

.pickem-input:focus {
    border-color: #4A7DFF;
}

.pickem-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.pickem-btn--submit {
    background: #177a31;
    color: #fff;
}

.pickem-btn--submit:hover:not(:disabled) {
    background: #1e9039;
}

.pickem-btn--submit:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Pickem navbar: always visible on mobile (Bootstrap collapse override) ── */
#header-nav-outer .navbar-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 0;
}

#header-nav-outer .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    margin: 0;
}

/* ── Pickem navbar active indicator ─────────────────────────────── */
#main-nav>li>a {
    border-radius: 0;
}

#main-nav>li.pickem-nav-active>a {
    color: #fff;
    box-shadow: inset 0 -1px 0 #4A7DFF;
}

/* ── Stage tabs ──────────────────────────────────────────────────── */
.pickem-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
    background: #0B0D18;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 73px;
    z-index: 110;
    margin-bottom: 16px;
}

.pickem-tabs::-webkit-scrollbar {
    display: none;
}

.pickem-tab {
    flex-shrink: 0;
    padding: 13px 22px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    margin-bottom: -1px;
}

.pickem-tab:hover {
    color: #ccc;
}

.pickem-tab.is-active {
    color: #fff;
    border-bottom-color: #4A7DFF;
}

.pickem-tab__label {
    display: block;
}

.pickem-tab__countdown {
    display: none;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #4A7DFF;
    margin-top: 2px;
    text-transform: none;
}

.pickem-tab.is-active .pickem-tab__countdown {
    display: block;
}

.pickem-tab__countdown.is-closed {
    color: #6B7089;
}

/* ── Picks area ──────────────────────────────────────────────────── */

.pickem-picks--readonly {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

/* ── Section headings ────────────────────────────────────────────── */
.pickem-section {
    margin-bottom: 48px;
}

/* ── Team avatar (shared swiss pool + bracket) ───────────────────── */
.team-avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.team-avatar--md {
    width: 44px;
    height: 44px;
    margin: 0 auto;
}

.team-avatar--sm {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* ── Swiss group layout (pool left, buckets right on desktop) ────── */
.swiss-group-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.swiss-pool-wrap {
    flex: 0 0 auto;
    background: rgba(11, 13, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 16px 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.swiss-group-picks {
    flex: 1;
    min-width: 0;
}

.swiss-pool {
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 6px;
}

@media (max-width: 768px) {
    .swiss-group-layout {
        flex-direction: column;
    }

    .swiss-pool-wrap {
        flex: none;
        max-width: none;
        width: 100%;
        margin-bottom: 12px;
    }

    .swiss-pool {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: 64px;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
    }

    .swiss-pool::-webkit-scrollbar {
        height: 4px;
    }

    .swiss-pool::-webkit-scrollbar-track {
        background: transparent;
    }

    .swiss-pool::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 2px;
    }

    .swiss-slot {
        width: 60px;
        min-height: 68px;
    }

    .swiss-slot__name {
        width: 54px;
    }
}

.swiss-team-card {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
}

.swiss-team-card:hover:not(.is-assigned) {
    border-color: #3a3a5a;
}

.swiss-team-card.is-selected {
    border-color: #4A7DFF;
    background: rgba(74, 125, 255, 0.08);
}

.swiss-team-card.is-assigned {
    opacity: 0.28;
    cursor: default;
}

/* ── Buckets ─────────────────────────────────────────────────────── */
.swiss-buckets-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.swiss-bucket {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.swiss-bucket--advance {
    margin-bottom: 12px;
}

.swiss-bucket__header {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 6px;
}

.swiss-bucket__desc {
    font-size: 13px;
    color: #6B7089;
    line-height: 1.5;
    margin: 0;
}

.swiss-bucket__slots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* ── Slots ───────────────────────────────────────────────────────── */
.swiss-slot {
    width: 76px;
    min-height: 84px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px dashed rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.swiss-slot.is-filled {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.15);
}

.swiss-slot.is-filled:hover {
    border-color: rgba(208, 65, 67, 0.5);
}

.swiss-slot.is-replaceable {
    border-color: rgba(0, 200, 200, 0.4);
    cursor: pointer;
}

.swiss-slot.is-replaceable:hover {
    border-color: #00c8c8;
}

.swiss-slot__delete {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(208, 65, 67, 0.75);
    border: none;
    border-radius: 3px;
    color: #fff;
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1.4;
    cursor: pointer;
}

.swiss-slot.is-filled:not(.is-replaceable):hover .swiss-slot__delete {
    display: block;
}

.swiss-slot__delete:hover {
    background: #d04143;
}

.swiss-team-card[draggable="true"] {
    cursor: grab;
}

.swiss-team-card.is-dragging {
    opacity: 0.4;
}

.swiss-slot.is-target {
    border-style: dashed;
    border-color: #00c8c8;
    background: rgba(0, 200, 200, 0.10);
    cursor: pointer;
}

.swiss-slot.is-target:hover,
.swiss-slot.is-drag-over {
    border-color: #00e5e5;
    background: rgba(0, 200, 200, 0.25);
}

.swiss-slot.is-target::after {
    content: 'drop here';
    font-size: 0.55rem;
    color: #00c8c8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: absolute;
    bottom: 5px;
}

.swiss-slot__placeholder {
    color: rgba(255, 255, 255, 0.1);
    font-size: 1.3rem;
}

.swiss-slot__dash {
    color: rgba(255, 255, 255, 0.1);
    font-size: 0.65rem;
}

.swiss-slot__name {
    font-size: 10px;
    color: #888;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 70px;
    padding: 0 3px;
}

.swiss-slot__result {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.swiss-slot__result--correct {
    background: #177a31;
    color: #fff;
}

.swiss-slot__result--wrong {
    background: #8b2222;
    color: #fff;
}

/* ── Locked overlay ──────────────────────────────────────────────── */
.swiss-group-locked {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.swiss-lock-overlay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6B7089;
    pointer-events: none;
}

/* ── Swiss submit row ────────────────────────────────────────────── */
.swiss-submit-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-top: 16px;
}

/* ── Playoff bracket ─────────────────────────────────────────────── */

.bracket-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 24px 0 40px;
    width: 100%;
}

/* QF stage: two rounds of 2 stacked vertically */
.bracket-stage--qf {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
    /* = BKT_OUTER_G in JS */
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* = BKT_INNER_G in JS */
}

/* SF + GF stages: fixed height, matches absolutely positioned by JS */
.bracket-stage--sf,
.bracket-stage--gf {
    position: relative;
    flex-shrink: 0;
}

/* SVG connector strips between stages */
.bracket-conn {
    flex-shrink: 0;
    display: block;
    overflow: visible;
    align-self: flex-start;
}

/* ── Match card ──────────────────────────────────────────────────── */
.bracket-match__label {
    height: 20px;
    /* = BKT_LABEL_H in JS */
    line-height: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.2);
    padding-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bracket-match__card {
    width: 220px;
    /* = BKT_STAGE_W in JS */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
}

/* ── Team row ────────────────────────────────────────────────────── */
.bracket-team {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 38px;
    /* = BKT_TEAM_H in JS */
    cursor: pointer;
    transition: background 0.12s;
}

.bracket-team+.bracket-team {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bracket-team:not(.is-locked):not(.bracket-team--tbd):hover {
    background: rgba(255, 255, 255, 0.04);
}

.bracket-team.is-selected {
    background: rgba(74, 125, 255, 0.10);
}

.bracket-team.is-winner {
    background: rgba(76, 175, 125, 0.10);
}

.bracket-team.is-loser {
    opacity: 0.32;
}

.bracket-team.is-locked {
    cursor: default;
}

.bracket-team.is-submitting {
    opacity: 0.6;
    cursor: wait;
}

.bracket-team__logo-wrap {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bracket-team__name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bracket-team.is-winner .bracket-team__name {
    color: #4caf7d;
}

.bracket-team.is-selected .bracket-team__name {
    color: #4A7DFF;
}

.bracket-team__score {
    font-size: 10px;
    color: #4caf7d;
    flex-shrink: 0;
    margin-left: 4px;
}

.bracket-team--tbd {
    pointer-events: none;
}

.bracket-team--tbd .bracket-team__logo-wrap {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.bracket-team--tbd .bracket-team__name {
    color: rgba(255, 255, 255, 0.12);
    letter-spacing: 0.05em;
}

/* ── Two-column body layout ──────────────────────────────────────── */
.pickem-body {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.pickem-picks {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

/* ── Challenges sidebar ──────────────────────────────────────────── */
.pickem-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.challenge-panel {
    padding: 0;
}

.challenge-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.challenge-panel__title {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.challenge-panel__count {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0;
    text-transform: none;
}

.challenge-panel__chevron {
    display: none;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    transition: transform 0.2s, border-color 0.15s;
}

.challenge-panel__coin {
    text-align: center;
    margin-bottom: 12px;
}

.challenge-coin {
    max-width: 100px;
    height: auto;
}

.challenge-coin--locked {
    filter: grayscale(1) opacity(0.4);
}

.challenge-tier-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.challenge-tier-badge--bronze {
    background: #3b2810;
    color: #cd7f32;
    border: 1px solid #7a4a1a;
}

.challenge-tier-badge--silver {
    background: #1c1e26;
    color: #c0c0c0;
    border: 1px solid #606070;
}

.challenge-tier-badge--gold {
    background: #2a2210;
    color: #ffd700;
    border: 1px solid #7a6010;
}

.challenge-tier-badge--crystal {
    background: #101e2a;
    color: #7df4fc;
    border: 1px solid #1a6070;
}

.challenge-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.challenge-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.challenge-row__icon {
    flex-shrink: 0;
    width: 16px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    padding-top: 1px;
}

.challenge-row.is-completed .challenge-row__icon {
    color: #4caf7d;
}

.challenge-row__label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.35;
}

.challenge-row.is-completed .challenge-row__label {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Leaderboard tab content ─────────────────────────────────────── */
.leaderboard-loading,
.leaderboard-error {
    color: rgba(255, 255, 255, 0.4);
    padding: 32px 0;
    text-align: center;
    font-size: 0.9rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.leaderboard-table th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 12px 10px;
    border-bottom: 1px solid #1A1D2E;
}

.leaderboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    vertical-align: middle;
}

.leaderboard-row.is-self td {
    background: rgba(74, 125, 255, 0.06);
}

.leaderboard-rank {
    width: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

.leaderboard-player {
    min-width: 160px;
}

.leaderboard-player__inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.leaderboard-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.leaderboard-player__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.leaderboard-tier {
    width: 90px;
}

.leaderboard-challenges,
.leaderboard-score {
    width: 80px;
    font-variant-numeric: tabular-nums;
}

.coin-tier-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
}

.coin-tier-badge--bronze {
    background: #3b2810;
    color: #cd7f32;
    border: 1px solid #7a4a1a;
}

.coin-tier-badge--silver {
    background: #1c1e26;
    color: #c0c0c0;
    border: 1px solid #606070;
}

.coin-tier-badge--gold {
    background: #2a2210;
    color: #ffd700;
    border: 1px solid #7a6010;
}

.coin-tier-badge--crystal {
    background: #101e2a;
    color: #7df4fc;
    border: 1px solid #1a6070;
}

.leaderboard-more {
    text-align: center;
    padding: 20px 0 8px;
}

#leaderboard-load-more,
#leaderboard-optout-btn {
    background: transparent;
    border: 1px solid #2a2d3e;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

#leaderboard-load-more:hover,
#leaderboard-optout-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.leaderboard-optout {
    padding: 16px 0 4px;
    text-align: right;
}

/* ── Leaderboard page ────────────────────────────────────────────── */
.pickem-lb-header,
.pickem-lb-row {
    display: grid;
    grid-template-columns: 48px 1fr 56px 100px 110px;
    align-items: center;
    column-gap: 12px;
    padding: 10px 0;
}

.pickem-lb-header > :nth-child(3),
.pickem-lb-header > :nth-child(4),
.pickem-lb-header > :nth-child(5) {
    text-align: center;
}

.pickem-lb-header {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.pickem-lb-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pickem-lb-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pickem-lb-row--self {
    background: rgba(74, 125, 255, 0.08);
    border-left: 3px solid #4A7DFF;
    padding-left: 8px;
    margin-left: -11px;
}

.pickem-lb-rank {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    text-align: right;
}

.pickem-lb-row--self .pickem-lb-rank {
    color: #4A7DFF;
}

.pickem-lb-player {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pickem-lb-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #1a1d2e;
}

.pickem-lb-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pickem-lb-name:hover {
    color: #fff;
    text-decoration: none;
}

.pickem-lb-name--unknown {
    color: rgba(255, 255, 255, 0.35);
    font-family: monospace;
    font-size: 0.75rem;
}

.pickem-lb-name--private {
    color: rgba(255, 255, 255, 0.35);
}

.pickem-lb-you {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4A7DFF;
    border: 1px solid rgba(74, 125, 255, 0.4);
    border-radius: 3px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.pickem-lb-coin {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pickem-lb-coin img {
    width: 32px;
    height: auto;
}

.pickem-lb-score,
.pickem-lb-challenges {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.pickem-lb-empty {
    padding: 48px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.pickem-community-host-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: rgba(74, 125, 255, 0.1);
    border: 1px solid rgba(74, 125, 255, 0.3);
    border-radius: 8px;
}

.pickem-community-host-cta__label {
    flex: 1;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

.pickem-community-host-cta__btn {
    font-size: 0.825rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 5px;
    border: none;
    background: #4A7DFF;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.pickem-community-host-cta__btn:hover {
    background: #5a8dff;
}

.pickem-community-host-cta__btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.pickem-community-host-cta__link {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4A7DFF;
    text-decoration: none;
}

.pickem-community-host-cta__link:hover {
    color: #7aa5ff;
    text-decoration: none;
}

.pickem-lb-optout {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

.pickem-lb-optout__btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pickem-lb-optout__btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

.pickem-lb-optout__btn.is-opted-out {
    border-color: #4A7DFF;
    color: #4A7DFF;
}

/* ── Responsive: sidebar stacks below on narrow viewports ─────────── */
@media (max-width: 960px) {
    .pickem-body {
        flex-direction: column;
    }

    .pickem-sidebar {
        width: 100%;
    }

    .challenge-list {
        column-count: 2;
        column-gap: 16px;
    }

    .challenge-row {
        break-inside: avoid;
    }

    .challenge-panel__header {
        cursor: pointer;
        margin-bottom: 0;
        border-bottom-color: transparent;
    }

    .challenge-panel__chevron {
        display: block;
    }

    .challenge-panel__body {
        display: none;
    }

    .challenge-panel.is-open .challenge-panel__body {
        display: block;
    }

    .challenge-panel.is-open .challenge-panel__header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
        margin-bottom: 0;
    }

    .challenge-panel.is-open .challenge-panel__chevron {
        transform: rotate(180deg);
    }
}

@media (max-width: 640px) {
    .pickem-lb-header,
    .pickem-lb-row {
        grid-template-columns: 36px 1fr 36px 90px;
    }

    .pickem-lb-header > :last-child,
    .pickem-lb-row > :last-child {
        display: none;
    }
}

/* ── Picks-page "Options" sub-header (below body) ─────────────────── */
.pickem-options {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(11, 13, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.pickem-options__title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}
.pickem-options__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pickem-options__col { min-width: 0; }
.pickem-options__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.pickem-options__sub {
    margin-top: 2px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}
.pickem-options__sub a {
    color: #8aa9ff;
    font-weight: 600;
    margin-left: 6px;
}
.pickem-options__sub a:hover { text-decoration: underline; }
.pickem-options__btn {
    background: rgba(91, 138, 255, 0.12);
    color: #8aa9ff;
    border: 1px solid rgba(91, 138, 255, 0.3);
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.pickem-options__btn.is-private {
    background: rgba(255, 91, 91, 0.12);
    color: #ff8a8a;
    border-color: rgba(255, 91, 91, 0.3);
}
.pickem-options__flash {
    margin: -4px 0 12px;
    padding: 8px 12px;
    background: rgba(76, 175, 125, 0.10);
    border: 1px solid rgba(76, 175, 125, 0.30);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #8cdcae;
}
.pickem-options__flash strong { color: #fff; }

/* ── Public pick'em profile page (standalone — no pickem-ui reuse) ── */
.pp-header {
    padding: 32px 0 20px;
}
.pp-header__title {
    margin: 0 0 14px;
    /* Mirrors .pickem-page-header__status — small, bold, uppercase eyebrow. */
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4A7DFF;
    line-height: 1.2;
}
.pp-header__sub {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
}
.pp-header__avatar-wrap {
    display: inline-flex;
    width: 64px;
    height: 64px;
}
.pp-header__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.pp-header__name {
    color: #fff;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1;
}
.pp-header__divider {
    color: rgba(255, 255, 255, 0.25);
    font-size: 1.25rem;
}
.pp-header__meta {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}
.pp-header__badge {
    background: rgba(91, 138, 255, 0.15);
    color: #8aa9ff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Content: stages, each stage on a single row ──────────────────── */
.pp-content {
    margin-bottom: 24px;
}
.pp-stage + .pp-stage {
    margin-top: 18px;
}
.pp-stage__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}
.pp-stage__row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
    padding-bottom: 4px;
}
.pp-stage__row::-webkit-scrollbar { height: 6px; }
.pp-stage__row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

/* Playoffs span the full row: QF 50% / SF 25% / F 25% */
.pp-stage__row--playoffs {
    width: 100%;
    overflow: visible;
}
.pp-stage__row--playoffs .pp-bucket {
    min-width: 0;
}
.pp-stage__row--playoffs .pp-bucket--quarterfinal { flex: 2 1 0; }
.pp-stage__row--playoffs .pp-bucket--semifinal    { flex: 1 1 0; }
.pp-stage__row--playoffs .pp-bucket--final        { flex: 1 1 0; }
.pp-stage__row--playoffs .pp-bucket__picks {
    justify-content: space-around;
    flex-wrap: wrap;
}

.pp-bucket {
    /* Match the dark glass-panel style used elsewhere (.pickem-options, .swiss-pool-wrap) */
    background: rgba(11, 13, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.pp-bucket--advance {
    flex: 1;
    min-width: 0;
}
.pp-bucket__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
}
.pp-bucket__picks {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

/* ── Individual pick chip ─────────────────────────────────────────── */
.pp-pick {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.pp-pick--empty { opacity: 0.35; }

.pp-pick__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.pp-pick__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pp-pick__initials {
    display: none;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.pp-pick__avatar--fallback {
    background: #3b4fcb;
}
.pp-pick__avatar--fallback .pp-pick__initials {
    display: block;
}

.pp-pick__name {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}

.pp-pick__result {
    position: absolute;
    top: -4px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}
.pp-pick__result--correct { background: #177a31; }
.pp-pick__result--wrong   { background: #8b2222; }

/* ── Options block (sub-header beneath content) ───────────────────── */
.pp-options {
    margin-top: 8px;
    padding: 14px 18px;
    background: rgba(11, 13, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}
.pp-options__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}
.pp-options__grid {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: center;
}
.pp-options__cell {
    text-align: center;
    min-width: 70px;
}
.pp-options__coin {
    /* Source coins are 68×48 — lock height and let width follow to avoid stretching. */
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto 4px;
}
.pp-options__cell-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.pp-options__cell-label {
    margin-top: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}
.pp-options__footnote {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}
.pp-options__footnote a {
    color: #8aa9ff;
    font-weight: 600;
}
.pp-options__footnote a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .pp-bucket { padding: 8px 10px; }
    .pp-pick { width: 56px; }
    .pp-pick__name { max-width: 56px; }
}



/* ── Community leaderboards ────────────────────────────────────────── */

.pickem-leaderboard--with-actions .pickem-lb-header,
.pickem-leaderboard--with-actions .pickem-lb-row {
    grid-template-columns: 48px 1fr 56px 100px 110px 72px;
}

.pickem-lb-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pickem-lb-remove-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 80, 80, 0.3);
    background: transparent;
    color: rgba(255, 100, 100, 0.6);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pickem-lb-remove-btn:hover {
    border-color: rgba(255, 80, 80, 0.7);
    color: rgba(255, 100, 100, 1);
}

.pickem-lb-creator {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 200, 80, 0.8);
    border: 1px solid rgba(255, 200, 80, 0.25);
    border-radius: 3px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.pickem-community-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pickem-community-header__count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
}

.pickem-community-header__share {
    font-size: 0.825rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 5px;
    border: none;
    background: #4A7DFF;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.pickem-community-header__share:hover {
    background: #5a8dff;
}

.pickem-community-creator-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    flex-wrap: wrap;
}

.pickem-community-creator-bar__label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.pickem-community-creator-bar__key {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 2px;
}

.pickem-community-creator-bar__btn {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pickem-community-creator-bar__btn:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.pickem-community-creator-bar__btn--danger {
    border-color: rgba(255, 80, 80, 0.25);
    color: rgba(255, 100, 100, 0.6);
    margin-left: auto;
}

.pickem-community-creator-bar__btn--danger:hover {
    border-color: rgba(255, 80, 80, 0.7);
    color: rgba(255, 100, 100, 1);
    background: rgba(255, 80, 80, 0.06);
}

.pickem-community-join {
    max-width: 440px;
    margin: 48px auto;
    text-align: center;
}

.pickem-community-join__hint {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
}

.pickem-community-join__hint a {
    color: #4A7DFF;
    text-decoration: none;
}

.pickem-community-join__form {
    display: flex;
    gap: 8px;
}

.pickem-community-join__input {
    flex: 1;
    padding: 8px 14px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    font-family: monospace;
    letter-spacing: 0.05em;
    outline: none;
    transition: border-color 0.15s;
}

.pickem-community-join__input:focus {
    border-color: rgba(74, 125, 255, 0.5);
}

.pickem-community-join__btn {
    padding: 8px 20px;
    border-radius: 5px;
    border: none;
    background: #4A7DFF;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.pickem-community-join__btn:hover {
    background: #5a8dff;
}

.pickem-community-join__error {
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255, 100, 100, 0.85);
    min-height: 1.2em;
}

.pickem-community-leave {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.pickem-community-leave__btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pickem-community-leave__btn:hover {
    border-color: rgba(255, 80, 80, 0.4);
    color: rgba(255, 100, 100, 0.8);
}

.pickem-community-banned {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pickem-community-banned__title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
}

.pickem-community-banned__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pickem-community-banned__name {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.pickem-community-banned__unban {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pickem-community-banned__unban:hover {
    border-color: rgba(74, 125, 255, 0.4);
    color: #4A7DFF;
}

@media (max-width: 640px) {
    .pickem-leaderboard--with-actions .pickem-lb-header,
    .pickem-leaderboard--with-actions .pickem-lb-row {
        grid-template-columns: 36px 1fr 36px 90px;
    }

    .pickem-community-creator-bar {
        gap: 8px;
    }

    .pickem-community-creator-bar__btn--danger {
        margin-left: 0;
    }
}
