main, main.container, .container {
    width: min(90vw, 1480px);
    max-width: none;
    margin: 28px auto;
    padding: 20px;
}

.public-content {
    display: grid;
    gap: 18px;
}

.public-page header,
.public-page footer,
body:not(.member-shell-page):not(.acp):not(.admin) > header,
body:not(.member-shell-page):not(.acp):not(.admin) > footer {
    width: min(90vw, 1480px);
    max-width: none;
    margin: 24px auto;
    padding: 0 20px;
}

.center-frame {
    width: min(94vw, 460px);
    margin: 80px auto;
    padding: 24px;
}

.page-content { max-width: 900px; }
.account-panel { display: grid; gap: 14px; }
.account-nav { border-bottom: 1px solid var(--tgb-border); padding-bottom: 12px; }

.portal-dashboard { margin-top: 24px; }
.portal-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}
.portal-stat {
    border: 1px solid #333;
    border-radius: var(--tgb-radius);
    background: var(--tgb-surface-3);
    padding: 18px;
}
.portal-stat strong { display: block; color: #0f0; font-size: 28px; margin-bottom: 6px; }
.portal-stat span { color: #bdbdbd; }
.portal-leaderboard { overflow-x: auto; }

.public-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.public-profile-card, .public-channel-profile {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--tgb-radius);
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.public-profile-card {
    display: grid;
    align-content: start;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
    padding: 1rem;
    min-width: 0;
}
.public-profile-card:hover { border-color: rgba(52,211,153,0.7); }
.public-profile-heading, .public-channel-heading { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.public-profile-heading > div, .public-channel-heading > div { min-width: 0; }
.public-profile-heading h2, .public-channel-heading h1, .public-profile-heading span, .public-channel-heading p { overflow-wrap: anywhere; }
.public-profile-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(52,211,153,0.5);
}
.public-profile-fallback { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.public-profile-meta, .public-channel-facts { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .9rem; opacity: .85; min-width: 0; }
.public-profile-status-frame {
    border: 1px solid rgba(52,211,153,0.22);
    border-radius: var(--tgb-radius);
    background: rgba(0,0,0,0.16);
    padding: .75rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.public-channel-status-frame { margin-top: 1rem; }
.public-profile-status-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; min-width: 0; }
.public-profile-status-row span, .public-channel-facts span {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    padding: .24rem .55rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.public-profile-status.is-live { border-color: rgba(52,211,153,0.72); color: var(--tgb-accent-soft); }
.public-profile-status.is-offline { color: var(--tgb-muted); }
.public-profile-title { margin: .65rem 0 0; font-weight: 700; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.public-channel-banner { height: 190px; background-size: cover; background-position: center; border-bottom: 1px solid rgba(255,255,255,0.12); }
.public-channel-body { padding: 1rem; }
.public-channel-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(52,211,153,0.65);
}
.public-channel-sections {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    align-items: stretch;
}
.public-channel-section {
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--tgb-radius);
    padding: 1rem;
    background: rgba(255,255,255,0.04);
}
.public-link-list { display: grid; gap: .5rem; }

@media (max-width: 1180px) {
    .public-profile-grid, .public-channel-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    main, main.container, .container { width: min(94vw, 1480px); margin: 16px auto; padding: 16px; }
    .public-profile-grid, .public-channel-sections { grid-template-columns: 1fr; }
    .public-channel-heading { align-items: flex-start; flex-direction: column; }
}

.access-denied-shell {
                min-height: 100vh;
                display: grid;
                place-items: center;
                padding: 24px;
            }

            .access-denied-panel {
                width: min(560px, 100%);
                background: #151515;
                border: 1px solid #333;
                border-radius: 8px;
                box-shadow: 0 0 28px rgba(0, 255, 120, 0.1);
                padding: 32px;
            }

            .access-denied-kicker {
                color: #89f29f;
                font-size: 0.82rem;
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }

            .access-denied-panel h1 {
                margin: 10px 0;
            }

            .access-denied-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 12px;
                align-items: center;
                margin-top: 22px;
            }

            .access-denied-actions .button {
                border: 1px solid #36d95f;
                border-radius: 8px;
                background: #202820;
                color: #89f29f;
                padding: 10px 14px;
            }

            .access-denied-timer {
                color: #aaa;
                font-size: 0.92rem;
            }
