/* ================================================================
   profile-broadcast.css — Broadcast dark theme profile redesign
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
    --pb-bg:       #181a1d;
    --pb-fg:       #e8edf2;
    --pb-fg2:      #a8b2bd;
    --pb-fg3:      #7d8fa0;
    --pb-fg4:      #556070;
    --pb-border:   #252b34;
    --pb-border2:  #1c2026;
    --pb-surface:  #1e2329;
    --pb-surface2: #2c3440;
    --pb-font:     'Space Grotesk', Helvetica, sans-serif;
    --pb-mono:     'Space Mono', 'Courier New', monospace;
}

/* ── Page wrapper ──────────────────────────────────────────────── */
.pb-page {
    background: var(--pb-bg);
    color: var(--pb-fg);
    font-family: var(--pb-font);
    min-height: 100vh;
}

footer{
    margin-top:0;
}

body{
    gap:0;
}

/* Ensure links are always readable on the dark page background
   (raises lightness to min 0.62 in oklch, preserving hue/chroma) */
.pb-page a               { text-decoration: none; color:var(--pb-fg)}

/* ── Banner ────────────────────────────────────────────────────── */
.pb-banner {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #161b21;
}
.pb-banner--pattern { background-repeat: repeat; }
.pb-banner__fill {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.pb-banner__blur {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.12);
    opacity: .55;
}
/* line-pattern + dark fade combined in one layer */
.pb-banner__overlay {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        repeating-linear-gradient(62deg, rgba(255,255,255,.055) 0 1px, transparent 1px 32px),
        linear-gradient(to bottom, transparent 18%, rgba(24,26,29,.68) 70%, var(--pb-bg) 100%);
}
.pb-report-btn {
    position: absolute; top: 14px; right: 14px; z-index: 5;
    background: rgba(24,26,29,.55);
    border: 1px solid var(--pb-border);
    padding: 7px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s;
}
.pb-report-btn:hover { border-color: #ff5c4d; }
.pb-report-btn img   { width: 16px; height: 16px; filter: invert(.6); }

/* ── Container ─────────────────────────────────────────────────── */
.pb-container {
    max-width: 1380px;
    margin: -150px auto 0;
    padding: 0 22px 80px;
    position: relative; z-index: 2;
}

/* ── Identity row ──────────────────────────────────────────────── */
.pb-identity {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.pb-identity__left {
    flex: 1 1 320px; min-width: 0;
    display: flex; align-items: flex-end;
    gap: clamp(16px, 2.4vw, 28px);
}

/* ── Avatar ─────────────────────────────────────────────────────── */
.pb-avatar {
    position: relative; flex: none;
    width: clamp(96px, 12vw, 124px);
    height: clamp(96px, 12vw, 124px);
}

.pb-avatar__img {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    border-radius: 50%; overflow: hidden;
    background: var(--pb-surface);
    box-shadow: 0 0 28px color-mix(in oklab, var(--pb-accent) 22%, transparent);
}
.pb-avatar__img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.pb-avatar__frame {
    position: absolute; inset: -30px; z-index: 3; pointer-events: none;
}
.pb-avatar__frame img { width: 100%; height: 100%; }

.pb-avatar__edit,
.pb-avatar__action {
    position: absolute; right: 0; bottom: 0; z-index: 4;
    width: clamp(26px, 3.2vw, 36px);
    height: clamp(26px, 3.2vw, 36px);
    border-radius: 50%;
    background: var(--pb-surface2);
    border: 2px solid var(--pb-bg);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none;
    transition: background .15s;
}
.pb-avatar__edit:hover,
.pb-avatar__action:hover         { background: #2d3644; }
.pb-avatar__edit img,
.pb-avatar__action img           { width: 13px;}
.pb-avatar__action--pending      { opacity: .6; cursor: default; }
.pb-avatar__action--friend       { background: color-mix(in oklab, #2fbf5f 28%, var(--pb-surface2)); }
.pb-avatar__badge { position: absolute; right: 0; bottom: 0; z-index: 4; line-height: 0; }
.pb-avatar__badge .vhost-badge  { margin: 0; }

/* ── Info ───────────────────────────────────────────────────────── */
.pb-info {
    flex: 1 1 260px; min-width: 0;
    padding-bottom: 4px;
}
.pb-info__role {
    font-family: var(--pb-mono);
    font-size: 10px; letter-spacing: .24em;
    color: var(--pb-accent);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    line-height: 1.6;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.76);
}
.pb-info__role .vhost-badge { display: inline-flex; }
.pb-info__name {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700; line-height: .94;
    letter-spacing: -.03em; margin-top: 8px;
    word-break: break-word; color: var(--pb-fg);
    text-decoration: none;
}
.pb-info__tag {
    font-family: var(--pb-mono);
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 400; color: var(--pb-fg3); margin-left: 8px; letter-spacing: 0;
}
.pb-info__meta {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 3px;
    font-family: var(--pb-mono);
    font-size: 11px; letter-spacing: .1em; color: var(--pb-fg3);
        text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.76);
}
.pb-meta-sep { color: var(--pb-border); }

/* ── Actions ────────────────────────────────────────────────────── */
.pb-actions {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 10px;
    flex: none; min-width: 0;
}
.pb-player-tags { display: flex; gap: 6px; align-items: center; }
.pb-player-tags img { height: 22px; border-radius: 2px; }
.pb-buttons     { display: flex; gap: 8px; }

.pb-btn {
    height: 38px; padding: 0 20px;
    font-family: var(--pb-font); font-weight: 700; font-size: 13px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; white-space: nowrap; text-decoration: none;
    letter-spacing: .02em;
    transition: opacity .15s, color .15s, border-color .15s;
}
.pb-btn:hover           { opacity: .85; }
/* Auto-contrasting text: white on dark accents, near-black on light ones */
.pb-btn--accent         { background: var(--pb-accent); color: oklch(from var(--pb-accent) calc(clamp(0, (0.6 - l) * 9999, 1)) 0 0); }
/* Higher specificity override so <a class="pb-btn--accent"> beats .pb-page a */
.pb-page .pb-btn--accent { color: oklch(from var(--pb-accent) calc(clamp(0, (0.6 - l) * 9999, 1)) 0 0); }
.pb-btn--outline        { background: transparent; border: 1px solid var(--pb-surface2); color: var(--pb-fg); }
.pb-btn--outline:hover  { border-color: var(--pb-accent); color: var(--pb-accent); opacity: 1; }
.pb-btn--following      { background: transparent; border: 1px solid var(--pb-surface2); color: var(--pb-fg); backdrop-filter: blur(2px);}
.pb-btn--following:hover{ border-color: #ff5c4d; color: #ff5c4d; opacity: 1; }
.pb-btn--sm             { height: 32px; padding: 0 14px; font-size: 12px; margin-top: 10px; }

.pb-socials { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-socials a img  { width: 20px; height: 20px; opacity: .65; transition: opacity .15s; }
.pb-socials a:hover img { opacity: 1; }
.pb-share-btn {
    background: none; border: none; cursor: pointer;
    color: var(--pb-fg4); padding: 3px;
    display: flex; align-items: center; transition: color .15s;
}
.pb-share-btn:hover,
.pb-share-btn.share-copied { color: var(--pb-accent); }
.pb-views {
    display: flex; align-items: center; gap: 4px;
    font-family: var(--pb-mono); font-size: 11px;
    color: var(--pb-fg4); letter-spacing: .08em;
}

/* ── Hero stats bar ────────────────────────────────────────────── */
.pb-hero-stats {
    margin-top: 28px;
    border-top: 1px solid var(--pb-border);
    border-bottom: 1px solid var(--pb-border);
    min-height: 4px; /* visible even while empty */
}
/* nsg-grid rendered horizontally inside hero bar */
.pb-hero-stats .nsg-grid {
    display: flex; flex-wrap: wrap;
    gap: 0; background: none; border: none;
    padding: 0; border-radius: 0;
}
.pb-hero-stats .nsg-card {
    display: flex;
    flex: 1 1 130px;
    padding: 22px 22px 22px 0;
    flex-direction: column; align-items: flex-start; justify-content: space-between;
    background: none; border: none; border-radius: 0; box-shadow: none;
    gap:5px;
}
.pb-hero-stats .nsg-card::before { display: none; }
.pb-hero-stats .nsg-card:hover   { background: none; }
.pb-hero-stats .nsg-card-value {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700; letter-spacing: -.03em; line-height: 1;
    color: var(--pb-fg); order: 1;
}

.nsg-card-value--sm>span{
    font-size: 12px;
    margin-left: 5px;
    color: var(--pb-accent);
}

.pb-hero-stats .nsg-card-label {
    font-family: var(--pb-mono); font-size: 10px;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--pb-fg4); order: 2;
}
.pb-hero-stats .nsg-label-sub   { display: none; }
.pb-hero-stats .nsg-icon        { display: none; }
/* wide cards (fav game/formula) hidden in hero bar */
.pb-hero-stats .nsg-card--wide  { display: none; }
/* ring chart — strip ring geometry, show only the number */
.pb-hero-stats .nsg-card--wr    { flex-direction: column; align-items: flex-start; }
.pb-hero-stats .nsg-wr-ring {
    order: 1;
    width: auto; height: auto;
    background: none; border-radius: 0; filter: none;
}
.pb-hero-stats .nsg-wr-ring::before { display: none; }
.pb-hero-stats .nsg-wr-val {
    position: static;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700; letter-spacing: -.03em;
    color: var(--pb-fg);
}

.nsg-wr-val>span{
    font-size:12px;
    margin-left:5px;
    color:var(--pb-accent);
}

/* hide the SVG circle, show only the text */
.pb-hero-stats .nsg-card--wr svg { display: none; }
.pb-hero-stats .nsg-card-label-top { display: none; }
.pb-hero-stats .nsg-game-img { display: none; }

/* ── Fill bar (Avg Fill card) ──────────────────────────────────── */
.nsg-fill-val { display: flex; align-items: flex-end; justify-content: center; gap: 0px; }
.nsg-fill-bar {
    width: 8px; align-self: stretch;
    background: var(--pb-surface2);
    border-radius: 2px; position: relative; overflow: hidden;
    height: calc(100% - 12px);
    margin: 5px 5px 0 0;
}
.nsg-fill-bar__inner {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--pb-accent);
    border-radius: 2px;
    transition: height .4s ease;
}

.nsg-card-value>span {
    font-size: 12px;
    margin:0 0 5px 4px;
    color: var(--pb-accent);
}

/* ── Mutual friends ────────────────────────────────────────────── */
.pb-mutual {
    display: flex; align-items: center; gap: 10px;
    margin-top: 16px; padding: 12px 0;
    border-top: 1px solid var(--pb-border); flex-wrap: wrap;
}
.pb-mutual__label  { font-family: var(--pb-mono); font-size: 10px; letter-spacing: .18em; color: var(--pb-fg4); }
.pb-mutual__avatars{ display: flex; }
.pb-mutual__item   { margin-right: -6px; }
.pb-mutual__item img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--pb-bg); object-fit: cover; }
.pb-mutual__names  { font-size: 12.5px; color: var(--pb-fg3); }
.pb-mutual__names a{ color: var(--pb-fg3); text-decoration: none; }
.pb-mutual__names a:hover { color: var(--pb-accent); }

/* ── Two-column body ───────────────────────────────────────────── */
.pb-body {
    display: flex; gap: 26px;
    margin-top: 26px; align-items: flex-start; flex-wrap: wrap;
}
.pb-main    { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 34px; }
.pb-sidebar { flex: 1 1 280px; max-width: 340px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }

/* ── Section headers ───────────────────────────────────────────── */
.pb-section-header {
    display: flex; align-items: center; gap: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pb-border);
    flex-wrap: wrap;
}
.pb-slabel {
    font-family: var(--pb-mono); font-size: 10px;
    letter-spacing: .2em; color: var(--pb-fg4);
}
.pb-scount { font-family: var(--pb-mono); font-size: 10px; color: var(--pb-accent); }
.pb-slink  {
    font-family: var(--pb-mono); font-size: 10px;
    letter-spacing: .18em; color: var(--pb-fg4);
    text-decoration: none; display: block; padding-top: 14px;
}
.pb-slink:hover { color: var(--pb-accent); }

/* ── Live carousel ─────────────────────────────────────────────── */
.pb-live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #ff5c4d; flex: none;
    animation: pbPulse 1.6s ease-in-out infinite;
}
@keyframes pbPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.pb-slabel--live { color: #ff8f80; }

/* single card */
.pb-live-card {
    display: flex; align-items: center;
    border: 1px solid var(--pb-surface2); background: var(--pb-surface);
    margin-top: 12px; flex-wrap: wrap; overflow: hidden;
    padding:16px;
    gap:20px;
    border-radius: 12px;
    position: relative; isolation: isolate;
    background-size: cover; background-position: center;
}
/* dark gradient overlay so game art doesn't kill readability */
.pb-live-card::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(135deg, rgba(24, 26, 29, .88) 0%, rgb(24 26 29 / 35%) 100%)
}
.pb-live-card > * { position: relative; z-index: 1; }
/* info panel — LEFT */
.pb-live-card__info {
    flex: 1 1 260px; min-width: 0;
}
/* art panel — RIGHT */
.pb-live-card__thumb {
    height: 124px;
    aspect-ratio: 1/1;
    border-radius: 12px;
    background-size: cover; background-position: center;
}
.pb-live-card__sub   { font-family: var(--pb-mono); font-size: 10px; letter-spacing: .18em; color: var(--pb-fg4); }
.pb-live-card__name  {
    display: block; font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 700; letter-spacing: -.02em; margin-top: 7px;
    color: var(--pb-fg); text-decoration: none;
}
.pb-live-card__name:hover { color: var(--pb-accent); }
.pb-live-card__meta  {
    font-family: var(--pb-mono); font-size: 11.5px; color: var(--pb-fg3);
    margin-top: 7px; display: flex; align-items: center; gap: 6px;
}
.pb-live-card__meta img { opacity: .65; vertical-align: middle; }
.pb-live-card__btn {
    display: inline-flex; align-items: center;
    height: 38px; padding: 0 18px; font-size: 12.5px;
    margin-top: 18px;
    border-radius: 8px;
}

.vhost-badge{
    margin-left:0;
}

.vhost-badge img{
    height: 48px;
    width: 48px;
}

/* carousel wrapper */
.pb-carousel {
    position: relative; margin-top: 12px; overflow: hidden;
}
.pb-carousel-track {
    display: flex;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.pb-carousel-slide { flex: 0 0 100%; }
.pb-carousel-slide .pb-live-card { margin-top: 0; }

.pb-carousel-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; margin-top: 10px;
}
.pb-carousel-btn {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: transparent; border: 1px solid var(--pb-surface2);
    color: var(--pb-fg3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s, color .15s;
}
.pb-carousel-btn:hover { border-color: var(--pb-accent); color: var(--pb-accent); }
.pb-carousel-dots {
    display: flex; align-items: center; gap: 7px;
}
.pb-carousel-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--pb-surface2); cursor: pointer;
    transition: background .2s, transform .2s;
}
.pb-carousel-dot.active { background: var(--pb-accent); transform: scale(1.3); }

/* ── Tournament table (shared CSS grid — subgrid rows) ─────────── */

/* Parent: defines the shared column template all rows subgrid from */
.pb-trn-table {
    display: grid;
    grid-template-columns: minmax(0, .5fr) auto auto auto auto;
}

/* Each row spans all columns and subgrids from the parent */
.pb-trn-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    column-gap: 14px;
    padding: 12px;
    border-bottom: 1px solid var(--pb-border2);
    transition: background .1s;
}
.pb-trn-row:hover  { background: var(--pb-surface); }
.pb-trn-row--f     { background: linear-gradient(to left, rgba(253, 184, 19, 0.2), #181a1d) }
.pb-trn-row--s     { background: linear-gradient(to left, rgba(150, 150, 150, 0.2), #181a1d) }
.pb-trn-row--t     { background: linear-gradient(to left, rgba(148, 87, 18, 0.2), #181a1d) }

.pb-trn-header {
    border-bottom: 1px solid var(--pb-border);
    padding: 6px 12px;
}
.pb-trn-header:hover { background: none; }
.pb-trn-hcell {
    font-family: var(--pb-mono);
    font-size: 9.5px; letter-spacing: .18em;
    color: var(--pb-fg4); text-transform: uppercase;
}

.pb-trn-name { min-width: 0; }
.pb-trn-name-link {
    text-decoration: none;
    display: flex; align-items: center; gap: 10px;
}
.pb-trn-thumb {
    width: 36px; height: 36px; flex: none; border-radius: 6px;
    object-fit: cover; opacity: .85;
}
.pb-trn-thumb--blur { filter: blur(4px); }
.pb-trn-text { min-width: 0; }
.pb-trn-title {
    font-size: 14px; font-weight: 600; color: var(--pb-fg);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-trn-name-link:hover .pb-trn-title { color: var(--pb-accent); }
.pb-trn-date-str {
    font-family: var(--pb-mono); font-size: 10.5px;
    color: var(--pb-fg4); margin-top: 2px;
}
.pb-trn-private { height: 10px; opacity: .35; margin-left: 4px; vertical-align: middle; }

.pb-trn-cell { font-size: 13px; color: var(--pb-fg3); }
.pb-trn-cell a { color: var(--pb-fg3); text-decoration: none; }
.pb-trn-cell a:hover { color: var(--pb-accent); }
.pb-trn-cell--game img { height: 20px; max-width: 40px; object-fit: contain; }

.pb-trn-cell.trn-center{
    text-align: center;
}

.pb-place--top {
    font-family: var(--pb-mono); font-size: 11px; font-weight: 700;
    background: var(--pb-accent); color: #0f1318;
    padding: 3px 8px; white-space: nowrap;
}
.pb-place        { font-family: var(--pb-mono); font-size: 12px; color: var(--pb-fg2); }
.pb-place-img    { height: 20px; }

.pb-trn-winner   { font-size: 13px; }
.pb-trn-winner b { display: flex; align-items: center; gap: 5px; color: var(--pb-fg); font-size: 13px; }
.pb-trn-winner ul { margin: 4px 0 0 16px; padding: 0; list-style: disc; }
.pb-trn-winner ul li { font-size: 11.5px; color: var(--pb-fg3); }
.pb-trn-winner ul li a { color: var(--pb-fg3); text-decoration: none; }
.pb-trn-winner ul li a:hover { color: var(--pb-accent); }

/* ── Message board ─────────────────────────────────────────────── */
.pb-page .profile-feed-tab {
    background: none; border: none;
    font-family: var(--pb-mono); font-size: 10px; letter-spacing: .14em;
    color: var(--pb-fg4); cursor: pointer; padding: 4px 10px;
    transition: color .15s;
}
.pb-page .profile-feed-tab.active,
.pb-page .profile-feed-tab:hover { color: var(--pb-accent); }

/* ── About/bio ─────────────────────────────────────────────────── */
.pb-bio {
    font-size: 14px; line-height: 1.65;
    color: var(--pb-fg2); margin-top: 12px; text-wrap: pretty;
}

/* ── Stats container in sidebar ────────────────────────────────── */
.pb-stats-wrap .stats-container {
    display: flex; flex-direction: column; gap: 16px; margin-top: 0;
}

/* Section header inside AJAX stats output */
.pb-sb-hdr {
    font-family: var(--pb-mono); font-size: 10px; letter-spacing: .2em;
    color: var(--pb-fg4); padding-bottom: 10px;
    border-bottom: 1px solid var(--pb-border);
}
.pb-sb-hdr + * { margin-top: 12px; }

/* nsg-grid in sidebar — secondary + wide cards stay after JS splits to hero bar */
.pb-stats-wrap .nsg-grid {
    display: flex; flex-direction: column; gap: 0;
    background: none; border: none; padding: 0; border-radius: 0;
}
.pb-stats-wrap .nsg-card {
    display: flex; align-items: baseline;
    justify-content: space-between; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--pb-border2);
    background: none; border-radius: 0; box-shadow: none;
}
.pb-stats-wrap .nsg-card::before { display: none; }
.pb-stats-wrap .nsg-card:hover   { background: none; }
.pb-stats-wrap .nsg-card-label   {
    font-family: var(--pb-mono); font-size: 10.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--pb-fg4); order: 1;
}
.pb-stats-wrap .nsg-card-value   { font-size: 17px; font-weight: 700; color: var(--pb-fg); order: 2; }
.pb-stats-wrap .nsg-card-value--sm{ font-size: 14px; }
.pb-stats-wrap .nsg-label-sub    { display: none; }
.pb-stats-wrap .nsg-icon         { display: none; }
.pb-stats-wrap .nsg-card--wr     { flex-direction: row; }
.pb-stats-wrap .nsg-wr-ring      { width: 36px; height: 36px; order: 2; }
.pb-stats-wrap .nsg-wr-val       { font-size: 11px; }
.pb-stats-wrap hr                { display: none; }

/* Combined fav box (nsg-card--wide) */
.pb-stats-wrap .nsg-card--wide {
    flex-direction: column; align-items: flex-start;
    border: 1px solid #2d3644; padding: 16px; margin-top: 14px;
    background: none; border-radius: 12px; box-shadow: none;
}
.pb-stats-wrap .nsg-card--wide .nsg-card-label-top {
    font-family: var(--pb-mono); font-size: 9.5px;
    letter-spacing: .18em; text-transform: uppercase; color: #6b7e8e; order: 1;
}
.pb-stats-wrap .nsg-card--wide .nsg-card-value {
    font-size: 20px; font-weight: 700; color: var(--pb-accent); order: 2;
}

/* Highlights (best rated) */
.pb-stats-wrap .nsg-highlights    { margin-top: 24px; }
.pb-stats-wrap .nsg-highlight-card { background: none; border: none; padding: 0; box-shadow: none; }
.pb-stats-wrap .nsg-highlight-label { font-family: var(--pb-mono); font-size: 10px; letter-spacing: .16em; color: var(--pb-fg4); }
.pb-stats-wrap .nsg-highlight-val   { margin-top: 6px; }
.pb-stats-wrap .nsg-trn-link  { text-decoration: none; display: flex; align-items: center; gap: 8px; }
.pb-stats-wrap .nsg-trn-name  { font-size: 13.5px; color: var(--pb-fg); }
.pb-stats-wrap .nsg-trn-badge { font-family: var(--pb-mono); font-size: 11px; font-weight: 700; background: var(--pb-accent); color: #0f1318; padding: 2px 7px; }

/* Activity heatmap — 26-col grid, 52 cells = 2 rows */
.pb-stats-wrap .heat-grid {
    display: grid; grid-template-columns: repeat(26, 1fr); gap: 3px; margin-top: 14px;
}
.pb-stats-wrap .heat-cell            { aspect-ratio: 1; border-radius: 3px;}
.pb-stats-wrap .heat-cell[data-level="0"] { background: #1c2230; }
.pb-stats-wrap .heat-cell[data-level="1"] { background: color-mix(in oklab, var(--pb-accent) 28%, #1c2230); }
.pb-stats-wrap .heat-cell[data-level="2"] { background: color-mix(in oklab, var(--pb-accent) 62%, #1c2230); }
.pb-stats-wrap .heat-cell[data-level="3"] { background: var(--pb-accent); }

/* Achievements */
.pb-stats-wrap .nsg-ach-grid  { display: flex; flex-wrap: wrap; gap: 7px; }
.pb-stats-wrap .nsg-ach-badge {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--ach-color);
    border-radius: 6px; padding: 5px 9px;
}
.pb-stats-wrap .nsg-ach-icon  { margin-right: 4px; }
.pb-stats-wrap .nsg-ach-label { font-size: 12px; font-family: var(--pb-mono); letter-spacing: .08em; color: var(--cloudy-white); }

/* People rows (champions / regulars / rivals) */
.pb-stats-wrap .nsg-regular-row,
.pb-stats-wrap .nsg-rival-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-bottom: 1px solid var(--pb-border2);
}
.pb-stats-wrap .nsg-regular-row--gold { background: rgba(240,179,63,.04); }
.pb-stats-wrap .nsg-regular-pfp,
.pb-stats-wrap .nsg-rival-pfp   { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.pb-stats-wrap .nsg-regular-name,
.pb-stats-wrap .nsg-rival-name  { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--pb-fg2); text-decoration: none; }
.pb-stats-wrap .nsg-regular-name:hover,
.pb-stats-wrap .nsg-rival-name:hover { color: var(--pb-accent); }
.pb-stats-wrap .nsg-regular-wins,
.pb-stats-wrap .nsg-regular-stat,
.pb-stats-wrap .nsg-rival-meetings { font-family: var(--pb-mono); font-size: 11px; color: var(--pb-accent); }
.pb-stats-wrap .nsg-rival-win  { font-family: var(--pb-mono); font-size: 11px; color: #2fbf5f; }
.pb-stats-wrap .nsg-rival-loss { font-family: var(--pb-mono); font-size: 11px; color: #ff5c4d; }
.pb-stats-wrap .nsg-rival-tie  { font-family: var(--pb-mono); font-size: 11px; color: var(--pb-fg4); }
.pb-stats-wrap .champ-medal    { font-size: 15px; flex: none; }

.pb-stats-wrap .nsg-nodata        { color: var(--pb-fg4); font-style: normal; font-family: var(--pb-mono); font-size: 11px; }
.pb-stats-wrap .nsg-nodata--block { padding: 10px 0; display: block; }
.pb-stats-wrap .nsg-skel-wrap     { display: flex; flex-direction: column; gap: 10px; }
.pb-stats-wrap .nsg-skel-card     { height: 18px; background: var(--pb-surface2); border-radius: 2px; }

/* Podium breakdown bar (player) */
.pb-stats-wrap .nsg-podium-bar       { margin:8px 0}
.pb-stats-wrap .nsg-podium-bar-label { font-family: var(--pb-mono); font-size: 10px; letter-spacing: .18em; color: var(--pb-fg4); display: block; margin-bottom: 8px; }
.pb-stats-wrap .nsg-podium-bar-track { height: 6px; border-radius: 3px; background: var(--pb-surface2); display: flex; overflow: hidden; }
.pb-stats-wrap .nsg-podium-seg       { height: 100%; }
.pb-stats-wrap .nsg-podium-1         { background: var(--pb-accent); }
.pb-stats-wrap .nsg-podium-2         { background: color-mix(in oklab, #c0c0c0 60%, var(--pb-surface2)); }
.pb-stats-wrap .nsg-podium-3         { background: color-mix(in oklab, #cd7f32 60%, var(--pb-surface2)); }
.pb-stats-wrap .nsg-podium-legend    { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.pb-stats-wrap .nsg-podium-legend span { font-family: var(--pb-mono); font-size: 10px; border-radius: 2px; color: var(--pb-fg4); display: flex; align-items: center; gap: 4px; }
.pb-stats-wrap .nsg-dot-1 { width: 8px; height: 8px; background: var(--pb-accent); display: inline-block; }
.pb-stats-wrap .nsg-dot-2 { width: 8px; height: 8px; background: #9a9a9a; display: inline-block; }
.pb-stats-wrap .nsg-dot-3 { width: 8px; height: 8px; background: #cd7f32; display: inline-block; }
.pb-stats-wrap .nsg-dot-4 { width: 8px; height: 8px; background: var(--pb-surface2); display: inline-block; }

/* Streak badge */
.pb-stats-wrap .nsg-streak-wrap  { margin: 10px 0 0; }
.pb-stats-wrap .nsg-streak-badge { font-family: var(--pb-mono); font-size: 11px; color: #ff8f80; letter-spacing: .1em; }

/* ── Series ────────────────────────────────────────────────────── */
.pb-series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; margin-top: 12px; }
.pb-series-card {
    border: 1px solid var(--pb-surface2); border-radius: 14px;
    overflow: hidden; text-decoration: none; color: var(--pb-fg);
    display: flex; flex-direction: column; background: var(--pb-bg);
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
.pb-series-card:hover {
    border-color: var(--series-accent, var(--pb-accent)); color: var(--pb-fg);
    transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.pb-series-banner {
    position: relative; height: 72px; overflow: hidden; flex-shrink: 0;
    background: repeating-linear-gradient(135deg,
        color-mix(in srgb, #070a0d 82%, var(--series-accent, #3a8fff) 18%) 0px,
        color-mix(in srgb, #070a0d 82%, var(--series-accent, #3a8fff) 18%) 8px,
        color-mix(in srgb, #040608 92%, var(--series-accent, #3a8fff) 8%) 8px,
        color-mix(in srgb, #040608 92%, var(--series-accent, #3a8fff) 8%) 16px
    );
    display: flex; align-items: center; padding: 0 14px;
}
.pb-series-bg-blur {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .18; filter: blur(8px); transform: scale(1.1);
}
.pb-series-banner-letter {
    font-size: 30px; font-weight: 900; font-family: var(--pb-font);
    color: var(--series-accent, var(--pb-fg));
    position: relative; z-index: 1; line-height: 1;
    opacity: .65; letter-spacing: -.02em;
}
.pb-series-logo {
    height: 48px; width: auto; object-fit: contain; border-radius: 8px;
    position: relative; z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.pb-series-body {
    padding: 12px 14px; display: flex; flex-direction: column; gap: 3px;
    position: relative; overflow: hidden;
}
.pb-series-initial {
    position: absolute; right: 11px; bottom: -8px;
    font-size: 76px; font-weight: 900;
    font-family: Montserrat; line-height: 1;
    color: var(--series-accent); opacity: .055;
    pointer-events: none; user-select: none; letter-spacing: -.05em;
}
.pb-series-name  { font-size: 13.5px; font-weight: 700; position: relative; }
.pb-series-desc  { font-size: 12px; color: var(--pb-fg3); position: relative; }
.pb-series-count { font-family: var(--pb-mono); font-size: 10px; color: var(--pb-fg4); letter-spacing: .1em; margin-top: 4px; position: relative; }

/* ── Comms inside broadcast ────────────────────────────────────── */
.pb-page .comms-composer          { margin: 12px 0; border:none; background:none;}
.comms-composer-closed{ padding:0; }
.pb-page .comms-composer-placeholder { border-color: var(--pb-surface2); }
.pb-page .comms-feed-loading      { background: none; }
.comms-card { box-shadow:none; }
.pb-page .comms-post              { border-color: var(--pb-border2); background: none; }
.pb-page .comms-post:hover        { background: var(--pb-surface); }

.pb-page .comms-feed-list {
    max-height: 680px;
    overflow-y: auto;
    overflow-x: hidden;
}
.pb-page .comms-feed-list::-webkit-scrollbar       { width: 3px; }
.pb-page .comms-feed-list::-webkit-scrollbar-track  { background: transparent; }
.pb-page .comms-feed-list::-webkit-scrollbar-thumb  { background: var(--pb-border2, #2a2e32); border-radius: 3px; }
.pf-inline-loader { display: flex; justify-content: center; padding: 12px 0 4px; }

/* ── host-activities-wrapper ───────────────────────────────────── */
.pb-page .host-activities-wrapper { display: flex; flex-direction: column; gap: 12px; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 860px) { .pb-sidebar { max-width: 100%; } }

/* ── Star ratings (completed tournament table) ─────────────────── */
.stars-wrapper,
.stars-wrapper-table {
    display: flex; gap: 2px; align-items: center; justify-content: center;
    margin-top: 2px;
}
.stars-wrapper .star svg,
.stars-wrapper-table .star svg { height: 12px; width: 12px; }

/* ── Report modal content ──────────────────────────────────────── */
.report-warpper           { min-width: 240px; }
.report-warpper h3        { margin: 0; }
.report-content {
    font-family: Montserrat, sans-serif;
    display: flex; flex-direction: column;
    align-items: flex-start; color: white;
    gap: 5px; width: 100%;
}
.checkboxes-wrapper       { display: flex; flex-direction: column; gap: 4px; }
.checkbox-box             { display: flex; align-items: center; }
.checkbox-box input       { margin: 0 5px 0 0; }
.checkbox-box label       { cursor: pointer; }
#send-report, .send-report {
    margin-top: 5px; border: 1px solid #696a7c;
    width: 100%; padding: 5px; box-sizing: border-box;
    cursor: pointer; background: #4f525f; color: white;
    font-family: Montserrat, sans-serif; font-weight: 600;
    transition: background 100ms ease-in-out;
}
#send-report:hover, .send-report:hover { background: #5c5f6e; }
#send-report:disabled                  { color: #65697a; }
.report-content-login     { color: white; font-family: Montserrat, sans-serif; }
.report-content-login a   { color: rgb(104,233,53); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   Sub-page styles (completed / incoming tournaments)
   ═══════════════════════════════════════════════════════════════════ */

/* Shrink banner on sub-pages — content-focused, not profile hero */
.pb-sub-page .pb-banner { height: 200px; }
.pb-sub-page .pb-container { margin-top: -100px; padding-bottom: 60px; }

/* ── Info name link ─────────────────────────────────────────────── */
.pb-sub-page .pb-info__name a {
    color: var(--pb-fg);
    text-decoration: none;
}
.pb-sub-page .pb-info__name a:hover { color: var(--pb-accent); }

/* ── Sub tabs ───────────────────────────────────────────────────── */
.pb-sub-tabs {
    display: flex;
    gap: 0;
    margin: 28px 0 0;
    border-bottom: 1px solid var(--pb-border);
}
.pb-sub-tab {
    font-family: var(--pb-mono);
    font-size: 10.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--pb-fg4);
    text-decoration: none;
    padding: 10px 20px;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    cursor: pointer;
}
.pb-sub-tab:hover          { color: var(--pb-fg2); }
.pb-sub-tab.active         { color: var(--pb-accent); border-bottom-color: var(--pb-accent); }

/* ── Filter bar ─────────────────────────────────────────────────── */
.pb-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0 12px;
    border-bottom: 1px solid var(--pb-border2);
    flex-wrap: wrap;
}
.pb-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.pb-filter-pill {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 12px;
    cursor: pointer;
    border: 1px solid var(--pb-border);
    color: var(--pb-fg4);
    background: none;
    transition: color .12s, border-color .12s, background .12s;
    user-select: none;
}
.pb-filter-pill:hover { color: var(--pb-fg2); border-color: var(--pb-fg4); }
.pb-filter-pill.active {
    color: var(--pb-accent);
    border-color: var(--pb-accent);
    background: color-mix(in oklab, var(--pb-accent) 10%, transparent);
}

.pb-filter-select {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .1em;
    background: var(--pb-surface);
    color: var(--pb-fg3);
    border: 1px solid var(--pb-border);
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
    appearance: auto;
}
.pb-filter-select:focus { border-color: var(--pb-accent); }

.pb-filter-adv-btn {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .1em;
    background: none;
    border: 1px solid var(--pb-border);
    color: var(--pb-fg4);
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .12s, border-color .12s;
    white-space: nowrap;
}
.pb-filter-adv-btn:hover { color: var(--pb-fg2); border-color: var(--pb-fg4); }

.pb-filter-badge {
    background: var(--pb-accent);
    color: #0f1318;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 99px;
}

/* ── Advanced panel ─────────────────────────────────────────────── */
.pb-adv-panel {
    display: none;
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    padding: 18px 20px 14px;
    margin-top: 10px;
}
.pb-adv-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.pb-adv-row--checks { align-items: flex-start; }
.pb-adv-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 140px;
}
.pb-adv-field label {
    font-family: var(--pb-mono);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pb-fg4);
}
.pb-adv-field input[type="text"],
.pb-adv-field input[type="date"] {
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    color: var(--pb-fg);
    font-family: var(--pb-font);
    font-size: 12.5px;
    padding: 6px 10px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.pb-adv-field input:focus { border-color: var(--pb-accent); }

.pb-adv-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    flex: 1;
}
.pb-adv-group-label {
    font-family: var(--pb-mono);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pb-fg4);
    margin-bottom: 2px;
}
.pb-adv-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--pb-fg3);
    user-select: none;
}
.pb-adv-check input[type="checkbox"] {
    accent-color: var(--pb-accent);
    width: 13px;
    height: 13px;
    cursor: pointer;
    flex: none;
}
.pb-adv-check:hover { color: var(--pb-fg); }

.pb-adv-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--pb-border2);
}
.pb-adv-apply {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--pb-accent);
    color: #0f1318;
    border: none;
    padding: 7px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity .12s;
}
.pb-adv-apply:hover { opacity: .85; }
.pb-adv-reset {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .12em;
    background: none;
    border: 1px solid #ff5c4d44;
    color: #ff5c4d;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .12s;
}
.pb-adv-reset:hover { background: #ff5c4d18; }

/* ── Active filter tags ─────────────────────────────────────────── */
.pb-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0 4px;
}
.pb-tag {
    font-family: var(--pb-mono);
    font-size: 10px;
    letter-spacing: .1em;
    background: var(--pb-surface2);
    color: var(--pb-fg3);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pb-tag--reset {
    background: none;
    border: 1px solid #ff5c4d55;
    color: #ff5c4d;
    cursor: pointer;
    font-family: var(--pb-mono);
    font-size: 10px;
}
.pb-tag--reset:hover { background: #ff5c4d18; }
.pb-tag-x {
    cursor: pointer;
    color: var(--pb-fg4);
    font-size: 9px;
    line-height: 1;
    transition: color .1s;
}
.pb-tag-x:hover { color: #ff5c4d; }

/* ── Table column templates for sub-pages ───────────────────────── */
/* player completed: TOURNAMENT HOST GAME FORMULA PLACE */
.pb-trn-table--player-completed {
    grid-template-columns: minmax(0,1fr) 130px 60px 160px 80px;
}
/* host completed: TOURNAMENT RATING GAME FORMULA SIZE TEAMS ATT WINNER */
.pb-trn-table--hosted-completed {
    grid-template-columns: repeat(8, auto);
}
/* player incoming: TOURNAMENT HOST GAME FORMULA TEAM */
.pb-trn-table--player-incoming {
    grid-template-columns: minmax(0,1fr) 130px 60px 160px minmax(0,.6fr);
}
/* host incoming: TOURNAMENT GAME FORMULA SIZE TEAMS */
.pb-trn-table--host-incoming {
    grid-template-columns: repeat(5, auto);
}

/* ── Empty state ────────────────────────────────────────────────── */
.pb-trn-empty {
    grid-column: 1 / -1;
    padding: 40px 12px;
    font-family: var(--pb-mono);
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--pb-fg4);
    text-align: center;
}

/* ── Roster list inside team cell ───────────────────────────────── */
.pb-trn-roster {
    margin: 4px 0 0 14px;
    padding: 0;
    list-style: disc;
}
.pb-trn-roster li { font-size: 11.5px; color: var(--pb-fg3); }
.pb-trn-roster li a { color: var(--pb-fg3); text-decoration: none; }
.pb-trn-roster li a:hover { color: var(--pb-accent); }

/* ── Series badge (inside incoming table) ───────────────────────── */
.trn-series-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--pb-mono);
    font-size: 10px;
    color: var(--series-accent, var(--pb-accent));
    margin-top: 2px;
}
.trn-series-badge a {
    color: inherit;
    text-decoration: none;
}
.trn-series-badge a:hover { text-decoration: underline; }

/* ── Row fade-in animation ──────────────────────────────────────── */
.pb-trn-row:not(.pb-trn-header) {
    opacity: 0;
    animation: pbRowIn .25s ease forwards;
}
@keyframes pbRowIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

/* ── Series accent left stripe ──────────────────────────────────── */
.pb-trn-row--series {
    position: relative;
}
.pb-trn-row--series::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--series-accent, var(--pb-accent));
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .pb-trn-table--player-completed,
    .pb-trn-table--hosted-completed,
    .pb-trn-table--player-incoming,
    .pb-trn-table--host-incoming { display: block; }
    .pb-trn-header { display: none; }
    .pb-trn-row:not(.pb-trn-header) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .pb-filter-pills { gap: 4px; }
    .pb-adv-row { flex-direction: column; }
}
@media (max-width: 480px) {
    .pb-sub-page .pb-banner    { height: 140px; }
    .pb-sub-page .pb-container { margin-top: -70px; }
    .pb-info__name             { font-size: clamp(22px, 7vw, 36px) !important; }
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE — warstwa dla pbMobile.js (zakładki, zwijany nagłówek,
   dolny pasek akcji, tabele jako karty). Musi zostać na końcu pliku.
   ═══════════════════════════════════════════════════════════════════ */

/* Poza mobile elementy dokładane przez JS pozostają schowane. */
.pb-mini-bar,
.pb-action-bar { display: none; }

@media (max-width: 760px) {

/* ── Hero ──────────────────────────────────────────────────────── */
.pb-banner            { height: 150px; }
.pb-container         { margin-top: -42px; padding: 0 16px 40px; display: flex; flex-direction: column; }
.pb-report-btn        { top: 12px; right: 12px; padding: 9px; }

.pb-identity          { gap: 14px; align-items: flex-start; }
.pb-identity__left    { flex: 1 1 100%; gap: 12px; }
.pb-avatar            { width: 84px; height: 84px; }
.pb-avatar__frame     { inset: -18px; }
.nsg-card-value--sm svg,
.nsg-fill-bar{ display: none; }
.vhost-badge img { width: 25px; height:25px;}
.pb-avatar__edit,
.pb-avatar__action    { width: 30px; height: 30px; }
.pb-avatar__badge .vhost-badge img { height: 30px; width: 30px; }

.pb-info__name        { font-size: clamp(26px, 8.5vw, 34px); margin-top: 5px; }
.pb-info__tag         { font-size: 14px; margin-left: 6px; }
.pb-info__meta        { gap: 8px; font-size: 10px; }

/* Akcje z hero schodzą do dolnego paska — zostają flagi i socials */
.pb-actions           { flex: 1 1 100%; align-items: flex-start; gap: 12px; padding-bottom: 0; }
.pb-actions .pb-buttons { display: none; }
.pb-page--mobile .pb-socials { gap: 14px; }
.pb-page--mobile .pb-socials a img { width: 22px; height: 22px; opacity: .8; }

/* Kolejność elementów w pb-container na mobile: identity → mutual → stats → body */
.pb-identity  { order: 1; }
.pb-mutual    { order: 2; margin-top: 0; padding-top: 14px; }
.pb-hero-stats { order: 3; }
.pb-body      { order: 4; }

/* ── Pasek statystyk ────────────────────────────────────────────── */
.pb-hero-stats                    { margin-top: 14px; }
.pb-hero-stats .nsg-grid          { display: grid; grid-template-columns: repeat(4, 1fr); }
.pb-hero-stats .nsg-card          { padding: 13px 0 13px 12px; gap: 5px; border-right: 1px solid var(--pb-border2); }
.pb-hero-stats .nsg-card:first-child { padding-left: 0; }
.pb-hero-stats .nsg-card:last-child  { border-right: none; }
.pb-hero-stats .nsg-grid--host .nsg-card:nth-child(4) { display: none; }
.pb-hero-stats .nsg-grid:not(.nsg-grid--host) .nsg-card:nth-child(5) { display: none; }
.pb-hero-stats .nsg-card-value,
.pb-hero-stats .nsg-wr-val        { font-size: 24px; }
.pb-hero-stats .nsg-card-label    { font-size: 8px; letter-spacing: .14em; }
.pb-hero-stats .nsg-fill-bar      { width: 6px; margin: 4px 4px 0 0; }

.pb-mutual            { padding: 12px 0 0; gap: 9px; }
.pb-mutual__names     { font-size: 12.5px; }

/* ── Zakładki ──────────────────────────────────────────────────── */
.pb-body              { display: block; margin-top: 18px; }
.pb-tabs {
    display: flex; gap: 22px;
    border-bottom: 1px solid var(--pb-border);
    background: var(--pb-bg);
    position: sticky; top: 0; z-index: 6;
    overflow-x: auto; scrollbar-width: none;
}
.pb-tabs::-webkit-scrollbar { display: none; }
.pb-tab {
    background: none; border: none; cursor: pointer;
    font-family: var(--pb-mono); font-size: 10px;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--pb-fg4); padding: 14px 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap; flex: none;
    transition: color .15s, border-color .15s;
}
.pb-tab.active { color: var(--pb-accent); border-bottom-color: var(--pb-accent); }

.pb-tabpanel        { display: none; }
.pb-tabpanel.active { display: flex; flex-direction: column; gap: 26px; padding-top: 18px; }

/* ── Live card ─────────────────────────────────────────────────── */
.pb-live-card        { padding: 14px; gap: 12px; flex-wrap: nowrap; align-items: center; }
.pb-live-card__thumb { height: 56px; width: 56px; flex: none; border-radius: 10px; aspect-ratio: auto; }
.pb-live-card__info  { flex: 1 1 auto; }
.pb-live-card__name  { font-size: 19px; margin-top: 4px; }
.pb-live-card__meta  { font-size: 10.5px; margin-top: 4px; }
.pb-live-card__btn   { display: flex; margin-top: 12px; height: 44px; }
.pb-carousel-dots    { margin-top: 0; }
.pb-carousel-dot     { width: 6px; height: 6px; }

/* ── Tabele turniejów → karty ──────────────────────────────────── */
.pb-page--mobile .pb-trn-table  { display: block; }
.pb-page--mobile .pb-trn-header { display: none; }
.pb-page--mobile .pb-trn-row {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px 10px;
    grid-column: auto;
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    background: var(--pb-surface);
    padding: 11px; margin-bottom: 9px;
}
.pb-page--mobile .pb-trn-row--f { background: linear-gradient(to left, rgba(253,184,19,.16), var(--pb-surface)); }
.pb-page--mobile .pb-trn-row--s { background: linear-gradient(to left, rgba(150,150,150,.16), var(--pb-surface)); }
.pb-page--mobile .pb-trn-row--t { background: linear-gradient(to left, rgba(148,87,18,.16), var(--pb-surface)); }
.pb-page--mobile .pb-trn-name   { flex: 1 1 100%; }
.pb-page--mobile .pb-trn-thumb  { width: 44px; height: 44px; border-radius: 8px; }
.pb-page--mobile .pb-trn-title  { font-size: 14px; }

/* Pozostałe komórki jako jedna linia meta rozdzielona kropkami */
.pb-page--mobile .pb-trn-cell {
    font-family: var(--pb-mono); font-size: 10px;
    letter-spacing: .06em; color: var(--pb-fg3);
    text-align: left;
}

.pb-page--mobile .pb-trn-cell--game img { height: 16px; max-width: 34px; }
.pb-page--mobile .pb-trn-cell:last-child:not(.pb-trn-winner) { margin-left: auto; }
.pb-page--mobile .pb-trn-cell:last-child:not(.pb-trn-winner)::before { content: none; }
.pb-page--mobile .pb-place-img  { height: 24px; }

/* Prawa kolumna karty: wartość + etykieta z nagłówka tabeli */
.pb-page--mobile .pb-trn-stat {
    margin-left: auto; flex: none; text-align: right;
    max-width: 96px; min-width: 0;
}
.pb-page--mobile .pb-trn-stat-val {
    font-family: var(--pb-mono); font-size: 12px; font-weight: 700;
    color: var(--pb-fg);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-page--mobile .pb-trn-stat-val .pb-place--top { padding: 2px 6px; font-size: 10px; }
.pb-page--mobile .pb-trn-stat-lbl {
    font-family: var(--pb-mono); font-size: 8px;
    letter-spacing: .14em; color: var(--pb-fg4); margin-top: 3px;
}

/* Pod-filtry (INCOMING / COMPLETED / SERIES) */
.pb-subfilters {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: -6px;
}
.pb-subfilter {
    font-family: var(--pb-mono); font-size: 9.5px;
    letter-spacing: .12em; text-transform: uppercase;
    padding: 8px 13px; cursor: pointer;
    border: 1px solid var(--pb-border);
    border-radius: 4px;
    background: none; color: var(--pb-fg4);
    transition: color .12s, border-color .12s, background .12s;
}
.pb-subfilter b { font-weight: 700; margin-left: 5px; }
.pb-subfilter.active {
    color: var(--pb-accent);
    border-color: var(--pb-accent);
    background: color-mix(in oklab, var(--pb-accent) 10%, transparent);
}
.pb-hdr--mobile-hidden { display: none; }
.pb-page--mobile .pb-trn-winner {
    flex: 1 1 100%; order: 9;
    border-top: 1px solid var(--pb-border2);
    padding-top: 9px; margin-top: 1px;
}
.pb-page--mobile .pb-trn-winner::before { content: none; }
.pb-page--mobile .stars-wrapper-table { justify-content: flex-start; margin: 0; }
.pb-page--mobile .stars-wrapper-table .star svg { height: 11px; width: 11px; }
.pb-slink { padding-top: 12px; }

/* ── Sidebar w zakładce STATY ──────────────────────────────────── */
.pb-sidebar, .pb-main { max-width: 100%; }
.pb-stats-wrap .stats-container { gap: 24px; }
.pb-stats-wrap .nsg-grid--host,
.pb-stats-wrap .nsg-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0 1px;
}
.pb-stats-wrap .nsg-card {
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--pb-bg); padding: 12px 12px 12px 0;
}
.pb-stats-wrap .nsg-card:nth-child(even) { padding: 12px 0 12px 14px; }
.pb-stats-wrap .nsg-card-value { font-size: 19px; }
.pb-stats-wrap .nsg-card--wide {
    grid-column: 1 / -1; margin-top: 14px;
    padding: 14px; background: var(--pb-bg);
}
.pb-stats-wrap .nsg-card--wide .nsg-card-value { font-size: 17px; line-height: 1.25; }
.pb-stats-wrap .nsg-regular-row,
.pb-stats-wrap .nsg-rival-row  { padding: 12px 10px; }
.pb-stats-wrap .nsg-ach-badge  { padding: 6px 10px; }
.pb-stats-wrap .heat-grid      { gap: 2.5px; }

.pb-series-grid { grid-template-columns: 1fr; }
.pb-bio         { font-size: 14.5px; }

/* ── Zwijany nagłówek ──────────────────────────────────────────── */
.pb-mini-bar {
    display: flex; align-items: center; gap: 11px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    padding: 9px 16px;
    background: rgba(24,26,29,.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pb-border);
    transform: translateY(-100%);
    transition: transform .22s ease;
}
.pb-mini-bar.visible { transform: none; }
.pb-mini-avatar {
    width: 36px; height: 36px; flex: none;
    border-radius: 50%; overflow: hidden; background: var(--pb-surface);
}
.pb-mini-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-mini-text { min-width: 0; flex: 1; }
.pb-mini-name {
    font-size: 15px; font-weight: 700; letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-mini-sub {
    font-family: var(--pb-mono); font-size: 9px;
    letter-spacing: .2em; color: var(--pb-accent);
}
.pb-mini-btn { height: 32px; padding: 0 14px; font-size: 12px; flex: none; }

/* ── Dolny pasek akcji ─────────────────────────────────────────── */
.pb-action-bar {
    display: flex; align-items: center; gap: 9px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--pb-bg) 62%, rgba(24,26,29,0));
}
.pb-action-primary {
    flex: 1; height: 48px; border: none; cursor: pointer;
    border-radius: 10px;
    font-family: var(--pb-font); font-weight: 700; font-size: 14.5px;
}
.pb-action-primary.is-accent {
    background: var(--pb-accent);
    color: oklch(from var(--pb-accent) calc(clamp(0, (0.6 - l) * 9999, 1)) 0 0);
}
.pb-action-primary.is-outline {
    background: rgba(30,35,41,.9);
    border: 1px solid var(--pb-surface2);
    color: var(--pb-fg);
}
.pb-action-icon {
    width: 48px; height: 48px; flex: none; cursor: pointer;
    border-radius: 10px;
    background: rgba(30,35,41,.9);
    border: 1px solid var(--pb-surface2);
    color: var(--pb-fg2);
    display: flex; align-items: center; justify-content: center;
}
.pb-action-icon img { width: 17px; height: 17px; filter: invert(.7); }
.pb-action-icon svg { width: 17px; height: 17px; }
.pb-has-action-bar .pb-container { padding-bottom: 96px; }

/* Cele dotykowe */
.pb-page--mobile .profile-feed-tab { padding: 8px 12px; font-size: 11px; }
.pb-page--mobile .pb-filter-pill   { padding: 8px 13px; }
.pb-page--mobile .pb-sub-tab       { padding: 12px 16px; }

}

@media (max-width: 400px) {
    .pb-info__name             { font-size: clamp(22px, 8vw, 28px); }
    .pb-avatar                 { width: 74px; height: 74px; }
    .pb-hero-stats .nsg-card-value,
    .pb-hero-stats .nsg-wr-val { font-size: 22px; }
    .pb-tabs                   { gap: 18px; justify-content: space-between;}
}

/* ── Achievement badge tooltip (pure CSS, :focus = click) ──────── */
.pb-stats-wrap .nsg-ach-badge {
    cursor: pointer;
    outline: none;
    overflow: visible;
}

.pb-stats-wrap .nsg-ach-badge::after,
.pb-stats-wrap .nsg-ach-badge::before {
    pointer-events: none;
    position: absolute;
    left: 50%;
    opacity: 0;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 100;
}

/* Bubble */
.pb-stats-wrap .nsg-ach-badge::after {
    content: attr(data-desc);
    bottom: calc(100% + 11px);
    text-align: left;
    transform: translateX(-50%) translateY(5px);
    background: #14161e75;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-top: 2px solid var(--ach-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    font-family: var(--pb-font);
    color: #afb5ce;
    white-space: normal;
    width: max-content;
    max-width: 200px;
    line-height: 1.55;
    letter-spacing: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .65);
}

/* Arrow */
.pb-stats-wrap .nsg-ach-badge::before {
    content: '';
    bottom: calc(100% + 5px);
    transform: translateX(-50%) translateY(5px);
    border: 6px solid transparent;
    border-top-color: rgba(255, 255, 255, .1);
}

/* Show on focus (click) */
.pb-stats-wrap .nsg-ach-badge:focus::after,
.pb-stats-wrap .nsg-ach-badge:focus::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
