/* 0. Custom Fonts */
@font-face {
    font-family: "Gohan";
    src: url("../fonts/gohan.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 1. Variables */
:root {
    --afn-bg: #040812;
    --afn-bg-soft: #071021;
    --afn-surface: rgba(8, 19, 42, 0.82);
    --afn-surface-2: rgba(11, 27, 60, 0.88);
    --afn-surface-3: rgba(14, 36, 80, 0.78);
    --afn-text: #f6f9ff;
    --afn-text-soft: #d6e4f7;
    --afn-muted: rgba(214, 228, 247, 0.68);
    --afn-faint: rgba(214, 228, 247, 0.48);
    --afn-line: rgba(137, 195, 255, 0.16);
    --afn-line-strong: rgba(32, 216, 255, 0.42);
    --afn-cyan: #20d8ff;
    --afn-blue: #1677ff;
    --afn-blue-2: #0d5ee8;
    --afn-violet: #7557ff;
    --afn-green: #35e98c;
    --afn-yellow: #ffd166;
    --afn-red: #ff4d6d;
    --afn-radius-xs: 8px;
    --afn-radius-sm: 12px;
    --afn-radius-md: 16px;
    --afn-radius-lg: 22px;
    --afn-space-1: 6px;
    --afn-space-2: 10px;
    --afn-space-3: 14px;
    --afn-space-4: 18px;
    --afn-space-5: 24px;
    --afn-space-6: 32px;
    --afn-container: 1180px;
    --afn-shadow: 0 22px 60px rgba(0, 7, 28, 0.34);
    --afn-shadow-soft: 0 14px 36px rgba(0, 7, 28, 0.25);
    --afn-glow: 0 0 0 1px rgba(32, 216, 255, 0.08), 0 18px 48px rgba(22, 119, 255, 0.16);
    --afn-heading: "Gohan", "Teko", "Rajdhani", "Outfit", system-ui, sans-serif;
    --afn-display: "Gohan", "Rajdhani", "Outfit", system-ui, sans-serif;
    --afn-body: "Outfit", system-ui, sans-serif;
}

/* 2. Reset / base */
html {
    background: var(--afn-bg);
}

body {
    background:
        radial-gradient(circle at 14% 4%, rgba(22, 119, 255, 0.22), transparent 28rem),
        radial-gradient(circle at 88% 8%, rgba(117, 87, 255, 0.16), transparent 24rem),
        linear-gradient(180deg, #040812 0%, #071021 44%, #040812 100%);
    color: var(--afn-text);
    font-family: var(--afn-body);
    font-size: 15px;
    letter-spacing: 0;
    min-height: 100vh;
}

a {
    text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(32, 216, 255, 0.72) !important;
    outline-offset: 3px;
}

.pce-bg::before {
    background:
        radial-gradient(circle at 16% 12%, rgba(32, 216, 255, 0.18), transparent 24rem),
        radial-gradient(circle at 78% 0%, rgba(117, 87, 255, 0.14), transparent 26rem),
        linear-gradient(180deg, rgba(4, 8, 18, 0.18), rgba(4, 8, 18, 0.92));
}

.pce-bg::after {
    opacity: 0.16;
}

/* 3. Layout */
.container {
    max-width: var(--afn-container);
}

.page-shell {
    padding-bottom: clamp(48px, 7vw, 84px);
}

.app-page,
.form-page,
.auth-page {
    padding-top: clamp(34px, 5vw, 56px);
}

.home-section {
    padding: clamp(42px, 6vw, 76px) 0;
}

.page-title,
.app-hero,
.credits-hero,
.section-card {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(13, 34, 78, 0.88), rgba(6, 15, 34, 0.88)),
        radial-gradient(circle at 14% 0%, rgba(32, 216, 255, 0.10), transparent 20rem);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-lg);
    box-shadow: var(--afn-shadow-soft);
    display: flex;
    gap: var(--afn-space-5);
    justify-content: space-between;
    margin-bottom: var(--afn-space-5);
    overflow: hidden;
    padding: clamp(20px, 3vw, 30px);
}

.page-title > div,
.app-hero > div,
.credits-hero-copy {
    min-width: 0;
}

.page-title h1,
.app-hero h1,
.credits-hero h1,
.auth-title,
.home-title {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 0.95;
    margin: 0;
    text-transform: uppercase;
}

.page-title h1,
.app-hero h1,
.credits-hero h1,
.auth-title {
    font-size: clamp(2.35rem, 4vw, 4.2rem);
}

.page-title p,
.app-hero p,
.credits-hero p,
.auth-copy,
.home-copy,
.muted-copy {
    color: var(--afn-muted);
    line-height: 1.62;
    margin-bottom: 0;
    max-width: 760px;
}

.pce-footer {
    border-top: 1px solid var(--afn-line);
    padding: 24px 0;
}

/* 4. Navbar */
.pce-nav {
    background: rgba(4, 8, 18, 0.78);
    border-bottom: 1px solid rgba(137, 195, 255, 0.13);
    box-shadow: 0 18px 48px rgba(0, 7, 28, 0.28);
}

.pce-brand {
    gap: 11px;
}

.pce-logo {
    border-radius: 10px;
    height: 42px;
    width: 48px;
}

.pce-brand strong {
    font-size: 1.08rem;
    letter-spacing: 0.02em;
}

.pce-brand small {
    color: var(--afn-muted);
    font-size: 0.72rem;
}

.nav-link {
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(226, 239, 255, 0.75) !important;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.56rem 0.72rem !important;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(32, 216, 255, 0.08);
    border-color: rgba(32, 216, 255, 0.12);
    color: #ffffff !important;
}

.navbar-toggler {
    border-color: var(--afn-line);
    box-shadow: none !important;
}

/* 5. Buttons */
.btn,
button.btn,
a.btn {
    align-items: center;
    border-radius: 10px !important;
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.84rem;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    letter-spacing: 0.035em;
    min-height: 42px;
    padding: 0 16px;
    text-transform: uppercase;
}

.btn-lg {
    min-height: 50px;
    padding-inline: 22px;
}

.btn-sm {
    font-size: 0.75rem;
    min-height: 34px;
    padding-inline: 12px;
}

.btn-pce,
.btn-primary,
a.btn-pce,
button.btn-pce {
    animation: primaryPulse 4.2s ease-in-out infinite;
    background: linear-gradient(180deg, #25dcff 0%, #1677ff 64%, #105bd4 100%) !important;
    border: 1px solid rgba(124, 220, 255, 0.52) !important;
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.22) !important;
    color: #ffffff !important;
}

.btn-pce:hover,
.btn-primary:hover,
.btn-pce:focus-visible {
    background: linear-gradient(180deg, #56e6ff 0%, #2386ff 58%, #1465e6 100%) !important;
    box-shadow: 0 18px 38px rgba(32, 216, 255, 0.18) !important;
    transform: translateY(-2px);
}

.btn-ghost,
.btn-soft,
.btn-secondary {
    background: rgba(8, 22, 50, 0.76) !important;
    border: 1px solid rgba(137, 195, 255, 0.25) !important;
    color: var(--afn-text-soft) !important;
}

.btn-ghost:hover,
.btn-soft:hover,
.btn-secondary:hover {
    background: rgba(22, 119, 255, 0.18) !important;
    border-color: rgba(32, 216, 255, 0.48) !important;
    box-shadow: 0 14px 28px rgba(22, 119, 255, 0.14) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn[disabled],
.btn.disabled,
button:disabled {
    opacity: 0.55;
}

/* 6. Cards */
.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.auth-card,
.event-board,
.ecosystem-card,
.empty-premium,
.final-card,
.panel,
.wallet-card,
.player-card {
    background:
        linear-gradient(180deg, rgba(10, 25, 55, 0.86), rgba(5, 12, 28, 0.92)),
        radial-gradient(circle at 18% 0%, rgba(32, 216, 255, 0.07), transparent 18rem);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    box-shadow: var(--afn-shadow-soft);
    overflow: hidden;
}

.panel-card,
.team-card,
.tournament-card,
.auth-card,
.profile-card,
.stat-card,
.ecosystem-card {
    padding: var(--afn-space-5);
}

.panel-card:hover,
.team-card:hover,
.tournament-card:hover,
.profile-card:hover,
.stat-card:hover,
.ecosystem-card:hover,
.player-card:hover {
    border-color: var(--afn-line-strong);
    box-shadow: var(--afn-glow);
    transform: translateY(-3px);
}

.panel-head,
.team-top,
.tournament-status {
    align-items: flex-start;
    display: flex;
    gap: var(--afn-space-3);
    justify-content: space-between;
}

.panel-head h2,
.team-top h2,
.tournament-card h2,
.profile-card h2,
.form-head h2,
.empty-premium h3 {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.45rem, 2.2vw, 1.95rem);
    font-weight: 600;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
}

.mini-meta,
.icon-line,
.profile-lines,
.team-meta,
.tournament-meta,
.mini-info {
    display: grid;
    gap: 9px;
}

.icon-line,
.profile-lines span,
.team-meta span,
.tournament-meta span,
.mini-info span {
    align-items: center;
    color: rgba(226, 239, 255, 0.78);
    display: inline-flex;
    gap: 8px;
    min-width: 0;
}

.profile-lines i,
.team-meta i,
.tournament-meta i,
.mini-info i,
.icon-line i {
    color: var(--afn-cyan);
    flex: 0 0 auto;
}

.event-row,
.ledger-row {
    background: rgba(5, 14, 34, 0.48);
    border: 1px solid rgba(137, 195, 255, 0.10);
    border-radius: var(--afn-radius-sm);
    margin-top: 10px;
    padding: 13px 14px;
}

.event-row strong,
.ledger-main strong {
    color: var(--afn-text);
}

.event-row span,
.ledger-main span,
.ledger-main small {
    color: var(--afn-muted);
}

.empty-premium {
    min-height: 220px;
    padding: clamp(24px, 4vw, 42px);
}

.empty-premium i {
    color: var(--afn-cyan);
}

/* 7. Forms */
.auth-card {
    padding: clamp(22px, 3vw, 32px);
}

.field {
    display: grid;
    gap: 8px;
}

.field label,
.auth-card label,
.form-label {
    color: rgba(230, 241, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin: 0;
    text-transform: uppercase;
}

.form-control,
.form-select,
.auth-card input,
.auth-card select,
.auth-card textarea,
.field input,
.field select,
.field textarea {
    background: rgba(4, 13, 33, 0.80) !important;
    border: 1px solid rgba(137, 195, 255, 0.18) !important;
    border-radius: 11px !important;
    color: var(--afn-text) !important;
    min-height: 46px;
}

.form-control:focus,
.form-select:focus,
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    background: rgba(7, 20, 48, 0.96) !important;
    border-color: rgba(32, 216, 255, 0.66) !important;
    box-shadow: 0 0 0 3px rgba(32, 216, 255, 0.10) !important;
}

.input-wrap {
    background: rgba(4, 13, 33, 0.80);
    border-color: rgba(137, 195, 255, 0.18);
    border-radius: 12px;
}

.errorlist {
    color: #ffd6dd;
    font-size: 0.84rem;
    margin: 6px 0 0;
    padding-left: 18px;
}

.form-section {
    border-radius: var(--afn-radius-md);
    padding: var(--afn-space-5);
}

/* 8. Dashboard */
.app-hero {
    min-height: auto;
}

.hero-actions,
.credits-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--afn-space-2);
    justify-content: flex-end;
}

.profile-card {
    height: 100%;
}

.profile-tag {
    border-radius: 999px;
}

.profile-ring {
    margin-inline: auto;
}

.stat-card {
    min-height: 136px;
}

.stat-card strong {
    color: var(--afn-text);
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    line-height: 0.9;
}

.wallet-strip {
    background: rgba(5, 14, 34, 0.58);
    border: 1px solid rgba(137, 195, 255, 0.12);
    border-radius: var(--afn-radius-sm);
    gap: var(--afn-space-3);
    padding: var(--afn-space-4);
}

/* 9. Players */
.directory-toolbar {
    align-items: center;
    background: rgba(5, 14, 34, 0.62);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    display: flex;
    gap: var(--afn-space-3);
    margin-bottom: var(--afn-space-5);
    padding: var(--afn-space-3);
}

.directory-toolbar i {
    color: var(--afn-cyan);
    font-size: 1.1rem;
    margin-left: 6px;
}

.directory-toolbar input {
    flex: 1;
}

.player-card {
    display: flex;
    flex-direction: column;
    min-height: 238px;
}

.player-card .profile-lines {
    margin-top: auto;
}

/* 10. Teams */
.join-code {
    background: rgba(32, 216, 255, 0.07);
    border: 1px dashed rgba(32, 216, 255, 0.28);
    border-radius: var(--afn-radius-sm);
    margin-top: var(--afn-space-4);
    padding: var(--afn-space-3);
}

.join-code strong {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: 1.5rem;
    letter-spacing: 0.08em;
}

/* 11. Tournaments */
.event-focus-strip {
    background: rgba(5, 14, 34, 0.58);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: var(--afn-space-5);
    padding: 10px;
}

.event-focus-strip span {
    background: rgba(10, 25, 55, 0.72);
    border: 1px solid rgba(137, 195, 255, 0.10);
    border-radius: 11px;
    justify-content: center;
    min-height: 40px;
}

.tournament-card {
    min-height: 100%;
}

.tournament-card {
    align-items: stretch;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
    padding: 0 !important;
}

.tournament-card > .tournament-banner {
    align-self: stretch;
    border: 0;
    border-radius: var(--afn-radius-md) 0 0 var(--afn-radius-md);
    height: 100%;
    margin: 0;
    min-height: 310px;
}

.tournament-card-body {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.68fr);
    padding: var(--afn-space-5);
}

.tournament-card-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tournament-card-side {
    align-content: start;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.tournament-card-actions {
    margin-top: 0;
}

.tournament-card h2 a {
    color: var(--afn-text);
    text-decoration: none;
}

.event-urgency-card,
.event-hype-card {
    background:
        radial-gradient(circle at 15% 0%, rgba(37, 221, 255, 0.12), transparent 12rem),
        rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.14);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 13px;
}

.event-urgency-card.detail {
    grid-template-columns: 1fr 1fr 1.45fr;
    margin-bottom: 18px;
    margin-top: 0;
    padding: 15px;
}

.event-urgency-card.mini {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-urgency-card.mini .urgency-progress {
    grid-column: 1 / -1;
}

.urgency-countdown,
.urgency-progress {
    background: rgba(5, 14, 34, 0.48);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 14px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
}

.urgency-countdown.featured {
    border-color: rgba(37, 221, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.urgency-countdown span,
.urgency-progress small {
    color: var(--afn-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.urgency-countdown strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.45rem, 2.8vw, 2.15rem);
    font-weight: 600;
    line-height: 0.95;
    text-transform: uppercase;
}

.urgency-countdown.featured strong {
    color: var(--afn-cyan);
    text-shadow: 0 0 22px rgba(37, 221, 255, 0.18);
}

.urgency-countdown small {
    color: var(--afn-text-soft);
}

.urgency-progress {
    align-content: center;
}

.urgency-progress > div:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.urgency-progress span {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.urgency-meter {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.urgency-meter span {
    background:
        linear-gradient(90deg, rgba(37, 221, 255, 0.95), rgba(22, 119, 255, 0.95));
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--fill, 0%);
}

.event-hype-card {
    background:
        radial-gradient(circle at 14% 0%, rgba(37, 221, 255, 0.18), transparent 14rem),
        radial-gradient(circle at 86% 18%, rgba(117, 87, 255, 0.12), transparent 13rem),
        linear-gradient(135deg, rgba(7, 18, 42, 0.92), rgba(4, 9, 22, 0.96));
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 42px rgba(0, 8, 28, 0.18);
    display: grid;
    gap: 12px;
    margin-top: 16px;
    overflow: hidden;
    padding: 14px;
    position: relative;
}

.event-hype-card::before {
    background: linear-gradient(90deg, rgba(37, 221, 255, 0.0), rgba(37, 221, 255, 0.52), rgba(117, 87, 255, 0.0));
    content: "";
    height: 1px;
    left: 16px;
    position: absolute;
    right: 16px;
    top: 0;
}

.event-hype-card.detail {
    grid-template-columns: 0.95fr 1fr 1.35fr;
    margin-bottom: 18px;
    margin-top: 0;
    padding: 16px;
}

.event-hype-card.compact {
    grid-template-columns: 0.85fr 1fr;
}

.event-hype-card.compact .hype-capacity {
    grid-column: 1 / -1;
}

.hype-deadline {
    align-content: center;
    background:
        linear-gradient(180deg, rgba(37, 221, 255, 0.10), rgba(22, 119, 255, 0.045));
    border: 1px solid rgba(37, 221, 255, 0.20);
    border-radius: 16px;
    display: grid;
    min-height: 126px;
    padding: 14px;
}

.event-hype-card.detail .hype-deadline {
    gap: 10px;
    justify-items: start;
    min-height: 0;
}

.hype-deadline small,
.hype-schedule span,
.hype-capacity small,
.hype-capacity em {
    color: var(--afn-muted);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.hype-deadline strong {
    color: var(--afn-cyan);
    font-family: var(--afn-heading);
    font-size: clamp(4.2rem, 8vw, 6.2rem);
    font-weight: 600;
    line-height: 0.82;
    text-shadow: 0 0 30px rgba(37, 221, 255, 0.22);
}

.deadline-number {
    align-items: end;
    display: flex;
    gap: 8px;
}

.deadline-number b {
    color: var(--afn-text-soft);
    font-family: var(--afn-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    line-height: 1.1;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.event-hype-card.detail .hype-deadline strong {
    font-size: clamp(3.7rem, 6vw, 5.25rem);
}

.event-hype-card.detail .hype-deadline > span {
    color: var(--afn-text-soft);
    line-height: 1.35;
    max-width: 250px;
    text-transform: none;
}

.event-hype-card.compact .hype-deadline strong {
    font-size: clamp(3.2rem, 5vw, 4.2rem);
}

.hype-deadline span,
.hype-capacity > div:first-child > span {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hype-schedule {
    display: grid;
    gap: 10px;
}

.hype-schedule > div,
.hype-capacity {
    background: rgba(5, 14, 34, 0.54);
    border: 1px solid rgba(142, 205, 255, 0.11);
    border-radius: 15px;
    display: grid;
    gap: 5px;
    padding: 13px;
}

.hype-schedule strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 0.95;
    text-transform: uppercase;
}

.hype-capacity {
    align-content: center;
}

.hype-capacity > div:first-child {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.hype-capacity > div:first-child strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 0.9;
    white-space: nowrap;
}

.event-hype-card.detail .hype-capacity {
    gap: 11px;
}

.event-hype-card.detail .hype-capacity > div:first-child {
    background: rgba(37, 221, 255, 0.055);
    border: 1px solid rgba(37, 221, 255, 0.12);
    border-radius: 12px;
    padding: 11px 12px;
}

.event-hype-card.detail .hype-capacity em {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    width: fit-content;
}

.hype-meter {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 999px;
    height: 13px;
    overflow: hidden;
}

.hype-meter span {
    background:
        linear-gradient(90deg, rgba(37, 221, 255, 0.98), rgba(22, 119, 255, 0.95), rgba(117, 87, 255, 0.88));
    border-radius: inherit;
    box-shadow: 0 0 24px rgba(37, 221, 255, 0.30);
    display: block;
    height: 100%;
    width: var(--fill, 0%);
}

.tournament-meta {
    margin-top: var(--afn-space-4);
}

.tournament-card .tournament-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tournament-prize-strip {
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 209, 102, 0.16), transparent 10rem),
        linear-gradient(135deg, rgba(255, 209, 102, 0.075), rgba(37, 221, 255, 0.045));
    border: 1px solid rgba(255, 209, 102, 0.20);
    border-radius: 16px;
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding: 16px;
}

.tournament-prize-strip span,
.tournament-prize-strip small {
    color: var(--afn-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.tournament-prize-strip strong {
    color: var(--afn-yellow);
    font-family: var(--afn-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 0.92;
    text-shadow: 0 0 28px rgba(255, 209, 102, 0.16);
    text-transform: uppercase;
}

.detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.requirement-box {
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.22);
    border-radius: var(--afn-radius-sm);
}

/* 12. Credits */
.credits-hero {
    align-items: stretch;
}

.credits-balance-panel {
    background:
        radial-gradient(circle at 50% 0%, rgba(32, 216, 255, 0.18), transparent 11rem),
        rgba(5, 14, 34, 0.78);
    border: 1px solid rgba(32, 216, 255, 0.22);
    border-radius: var(--afn-radius-md);
    min-width: 260px;
    padding: var(--afn-space-5);
}

.credits-balance-panel strong,
.wallet-balance {
    color: var(--afn-cyan);
    text-shadow: 0 0 28px rgba(32, 216, 255, 0.18);
}

.credit-flow {
    gap: var(--afn-space-3);
}

.credit-step,
.credit-pack,
.ticket-identity,
.discord-ticket-box {
    background: rgba(5, 14, 34, 0.55);
    border: 1px solid rgba(137, 195, 255, 0.12);
    border-radius: var(--afn-radius-sm);
}

.credit-pack.featured {
    border-color: rgba(32, 216, 255, 0.40);
    box-shadow: 0 0 0 1px rgba(32, 216, 255, 0.05), 0 18px 34px rgba(22, 119, 255, 0.12);
}

/* 13. Status */
.status-badge,
.status-pill,
.badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    gap: 6px;
    letter-spacing: 0.055em;
    line-height: 1;
    min-height: 27px;
    padding: 0 10px;
    text-transform: uppercase;
}

.status-open,
.status-verified,
.status-confirmed,
.status-approved,
.status-clean,
.status-paid {
    background: rgba(53, 233, 140, 0.10);
    border-color: rgba(53, 233, 140, 0.28);
    color: #b9ffd9;
}

.status-pending,
.status-payment_pending,
.status-draft,
.status-upcoming {
    background: rgba(255, 209, 102, 0.10);
    border-color: rgba(255, 209, 102, 0.28);
    color: #ffe7a3;
}

.status-rejected,
.status-refunded,
.status-banned,
.status-suspended,
.status-cancelled,
.status-closed {
    background: rgba(255, 77, 109, 0.10);
    border-color: rgba(255, 77, 109, 0.28);
    color: #ffc0ca;
}

.status-watchlist,
.status-ongoing {
    background: rgba(117, 87, 255, 0.12);
    border-color: rgba(117, 87, 255, 0.30);
    color: #d8d1ff;
}

/* 14. Animations */
.animate-in {
    animation: afnFadeUp 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes afnFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes primaryPulse {
    0%,
    100% {
        box-shadow: 0 12px 28px rgba(22, 119, 255, 0.20);
    }
    50% {
        box-shadow: 0 16px 36px rgba(32, 216, 255, 0.22);
    }
}

/* 15. Responsive */
@media (max-width: 1024px) {
    :root {
        --afn-container: 960px;
    }

    .event-focus-strip,
    .detail-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-urgency-card.detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-urgency-card.detail .urgency-progress {
        grid-column: 1 / -1;
    }

    .event-hype-card.detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-hype-card.detail .hype-capacity {
        grid-column: 1 / -1;
    }

    .tournament-card {
        grid-template-columns: 1fr;
    }

    .tournament-card > .tournament-banner {
        border-radius: var(--afn-radius-md) var(--afn-radius-md) 0 0;
        min-height: 220px;
    }

    .tournament-card-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title,
    .app-hero,
    .credits-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions,
    .credits-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .hero-actions .btn,
    .credits-actions .btn,
    .page-title .btn,
    .app-hero .btn {
        width: 100%;
    }

    .directory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .event-focus-strip,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .event-urgency-card.detail,
    .event-urgency-card.mini {
        grid-template-columns: 1fr;
    }

    .event-urgency-card.detail .urgency-progress {
        grid-column: auto;
    }

    .event-urgency-card.mini .urgency-progress {
        grid-column: auto;
    }

    .event-hype-card.detail,
    .event-hype-card.compact {
        grid-template-columns: 1fr;
    }

    .event-hype-card.detail .hype-capacity,
    .event-hype-card.compact .hype-capacity {
        grid-column: auto;
    }

    .hype-capacity > div:first-child {
        align-items: flex-start;
        flex-direction: column;
    }

    .tournament-card .tournament-meta {
        grid-template-columns: 1fr;
    }

    .tournament-card > .tournament-banner {
        min-height: 180px;
    }

    .credits-balance-panel {
        min-width: 0;
        width: 100%;
    }

    .navbar-nav {
        align-items: stretch !important;
        padding-top: 12px;
    }

    .navbar-nav .btn,
    .navbar-nav form,
    .navbar-nav form .btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    body {
        font-size: 14px;
    }

    .container {
        --bs-gutter-x: 1rem;
    }

    .panel-card,
    .team-card,
    .tournament-card,
    .auth-card,
    .profile-card,
    .stat-card,
    .ecosystem-card {
        padding: 18px;
    }

    .page-title h1,
    .app-hero h1,
    .credits-hero h1,
    .auth-title {
        font-size: 2.6rem;
    }

    .panel-head,
    .team-top,
    .tournament-status {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Strict UI review pass */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.container,
.row,
[class*="col-"] {
    min-width: 0;
}

.page-title,
.app-hero,
.credits-hero {
    column-gap: clamp(16px, 3vw, 28px);
    row-gap: 16px;
}

.page-title > .d-flex,
.app-hero > .hero-actions,
.credits-actions {
    flex: 0 0 auto;
    max-width: 100%;
}

.page-title p + p {
    margin-top: 6px;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card {
    width: 100%;
}

.row.g-4 > [class*="col-"] > .panel-card,
.row.g-4 > [class*="col-"] > .team-card,
.row.g-4 > [class*="col-"] > .tournament-card,
.row.g-4 > [class*="col-"] > .profile-card,
.row.g-4 > [class*="col-"] > .stat-card,
.row.g-4 > [class*="col-"] > .player-card {
    height: 100%;
}

.team-card,
.tournament-card,
.player-card,
.panel-card.h-100 {
    display: flex;
    flex-direction: column;
}

.team-card > a.btn:last-child,
.tournament-card > .mt-4,
.player-card .profile-lines {
    margin-top: auto !important;
}

.panel-head {
    margin-bottom: 16px;
}

.panel-head > a:not(.btn) {
    align-items: center;
    background: rgba(8, 22, 50, 0.76);
    border: 1px solid rgba(137, 195, 255, 0.22);
    border-radius: 999px;
    color: var(--afn-text-soft);
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.76rem;
    font-weight: 900;
    gap: 7px;
    min-height: 32px;
    padding: 0 11px;
    text-decoration: none;
    text-transform: uppercase;
}

.panel-head > a:not(.btn):hover {
    border-color: rgba(32, 216, 255, 0.42);
    color: #ffffff;
}

.btn,
button.btn,
a.btn {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
}

.btn-sm {
    min-height: 36px;
}

.event-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.invite-row {
    align-items: center;
}

.invite-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.invite-actions form {
    margin: 0;
}

.invite-search-field small {
    color: var(--afn-text-muted);
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 0.55rem;
}

.invite-search-field {
    position: relative;
}

.invite-suggestions {
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 221, 255, 0.12), transparent 12rem),
        rgba(4, 12, 31, 0.98);
    border: 1px solid rgba(37, 221, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    display: grid;
    gap: 6px;
    margin-top: 8px;
    max-height: 292px;
    overflow-y: auto;
    padding: 8px;
    position: relative;
    z-index: 120;
}

.invite-suggestions[hidden] {
    display: none;
}

.invite-suggestion,
.invite-suggestion-empty {
    border-radius: 11px;
    padding: 10px 12px;
}

.invite-suggestion {
    background: rgba(11, 28, 64, 0.72);
    border: 1px solid rgba(142, 205, 255, 0.10);
    color: var(--afn-text);
    cursor: pointer;
    display: grid;
    gap: 2px;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
    width: 100%;
}

.invite-suggestion:hover,
.invite-suggestion:focus-visible {
    background: rgba(18, 51, 111, 0.92);
    border-color: rgba(37, 221, 255, 0.42);
    outline: 0;
    transform: translateY(-1px);
}

.invite-suggestion strong {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.invite-suggestion span,
.invite-suggestion small,
.invite-suggestion-empty {
    color: var(--afn-text-muted);
    font-size: 0.86rem;
    line-height: 1.25;
}

.invite-suggestion-empty {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(142, 205, 255, 0.14);
}

.invite-search-field.has-selected-player .input-wrap {
    border-color: rgba(37, 221, 255, 0.54);
    box-shadow: 0 0 0 3px rgba(37, 221, 255, 0.10);
}

.event-row > div {
    min-width: 0;
}

.event-row strong,
.event-row span {
    overflow-wrap: anywhere;
}

.event-row .btn,
.event-row .status-badge {
    flex: 0 0 auto;
}

.empty-inline {
    background: rgba(5, 14, 34, 0.54);
    border: 1px solid rgba(137, 195, 255, 0.12);
    border-radius: var(--afn-radius-sm);
    color: var(--afn-muted);
    display: grid;
    gap: 12px;
    padding: 18px;
}

.empty-inline i {
    color: var(--afn-cyan);
    font-size: 1.5rem;
}

.action-empty .d-flex {
    margin-top: 2px;
}

.table-wrap {
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    overflow-x: auto;
    width: 100%;
}

.table-wrap table {
    margin: 0;
}

.panel {
    margin-top: clamp(34px, 5vw, 56px);
}

.auth-card .form-head {
    margin-bottom: 20px;
}

.settings-card .form-head p,
.form-head p {
    color: var(--afn-muted);
    margin: 4px 0 0;
}

.form-page .row > [class*="col-"] {
    min-width: 0;
}

.signup-strip {
    gap: 8px;
}

.signup-strip span {
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.credit-pack-grid,
.credit-flow {
    align-items: stretch;
}

.credit-pack,
.credit-step {
    height: 100%;
}

.pce-alert {
    border-radius: var(--afn-radius-sm);
}

.pce-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

@media (max-width: 1024px) {
    .home-hero {
        min-height: auto;
    }

    .page-title h1,
    .app-hero h1,
    .credits-hero h1,
    .auth-title {
        font-size: clamp(2.2rem, 6vw, 3.7rem);
    }
}

@media (max-width: 768px) {
    .page-title > .d-flex,
    .app-hero > .hero-actions,
    .credits-actions {
        width: 100%;
    }

    .page-title > .d-flex {
        align-items: stretch;
        flex-direction: column;
    }

    .event-row,
    .ledger-row,
    .wallet-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .event-row .btn,
    .event-row .status-badge,
    .ledger-row .status-badge {
        justify-content: center;
        width: 100%;
    }

    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-head .btn,
    .panel-head > a {
        justify-content: center;
        width: 100%;
    }

    .auth-page .row,
    .form-page .row {
        --bs-gutter-y: 1rem;
    }

    .home-title {
        font-size: clamp(3.5rem, 18vw, 5rem);
    }
}

@media (max-width: 430px) {
    .btn,
    button.btn,
    a.btn {
        min-height: 44px;
        padding-inline: 14px;
    }

    .btn-sm {
        min-height: 40px;
    }

    .status-badge,
    .badge {
        min-height: 29px;
        text-align: center;
    }

    .empty-premium {
        min-height: 180px;
    }
}

/* Final premium pass */
.pce-bg .glow {
    filter: blur(56px);
    opacity: 0.16;
}

.glow-blue {
    animation: eliteGlowA 16s ease-in-out infinite;
}

.glow-cyan {
    animation: eliteGlowB 18s ease-in-out infinite;
}

.glow-purple {
    animation: eliteGlowC 20s ease-in-out infinite;
}

.pce-bg::before {
    background:
        radial-gradient(circle at 18% 10%, rgba(32, 216, 255, 0.16), transparent 24rem),
        radial-gradient(circle at 82% 4%, rgba(117, 87, 255, 0.13), transparent 25rem),
        radial-gradient(circle at 50% 92%, rgba(22, 119, 255, 0.09), transparent 28rem),
        linear-gradient(180deg, rgba(4, 8, 18, 0.08), rgba(4, 8, 18, 0.94));
}

.pce-nav {
    box-shadow: 0 16px 44px rgba(0, 7, 28, 0.30), inset 0 -1px 0 rgba(32, 216, 255, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link.active {
    background: linear-gradient(180deg, rgba(32, 216, 255, 0.12), rgba(22, 119, 255, 0.06));
    border-color: rgba(32, 216, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.nav-link.active::after {
    background: linear-gradient(90deg, transparent, var(--afn-cyan), transparent);
    border-radius: 999px;
    bottom: 3px;
    content: "";
    height: 2px;
    left: 14px;
    position: absolute;
    right: 14px;
}

.page-title,
.app-hero,
.credits-hero {
    box-shadow: var(--afn-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-title::before,
.app-hero::before,
.credits-hero::before {
    background: linear-gradient(90deg, rgba(32, 216, 255, 0.38), rgba(117, 87, 255, 0.14), transparent);
    bottom: 0;
    content: "";
    height: 2px;
    left: 22px;
    opacity: 0.8;
    position: absolute;
    right: 22px;
}

.home-section + .home-section,
.final-cta {
    position: relative;
}

.home-section + .home-section::before,
.final-cta::before {
    background: linear-gradient(90deg, transparent, rgba(137, 195, 255, 0.16), transparent);
    content: "";
    height: 1px;
    left: max(16px, calc((100vw - var(--afn-container)) / 2));
    position: absolute;
    right: max(16px, calc((100vw - var(--afn-container)) / 2));
    top: 0;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.ecosystem-card,
.event-board,
.final-card,
.empty-premium {
    position: relative;
}

.panel-card::before,
.profile-card::before,
.stat-card::before,
.team-card::before,
.tournament-card::before,
.player-card::before,
.auth-card::before,
.ecosystem-card::before,
.event-board::before,
.final-card::before,
.empty-premium::before {
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(32, 216, 255, 0.12), transparent 13rem);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 220ms ease;
}

.panel-card:hover::before,
.profile-card:hover::before,
.stat-card:hover::before,
.team-card:hover::before,
.tournament-card:hover::before,
.player-card:hover::before,
.auth-card:hover::before,
.ecosystem-card:hover::before,
.event-board:hover::before,
.final-card:hover::before,
.empty-premium:hover::before {
    opacity: 1;
}

.panel-card > *,
.profile-card > *,
.stat-card > *,
.team-card > *,
.tournament-card > *,
.player-card > *,
.auth-card > *,
.ecosystem-card > *,
.event-board > *,
.final-card > *,
.empty-premium > * {
    position: relative;
    z-index: 1;
}

.btn-pce,
a.btn-pce,
button.btn-pce {
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.24), 0 0 0 1px rgba(32, 216, 255, 0.08) !important;
}

.btn-pce:hover,
.btn-pce:focus-visible {
    box-shadow: 0 18px 40px rgba(32, 216, 255, 0.20), 0 0 0 4px rgba(32, 216, 255, 0.07) !important;
}

.status-badge,
.badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-badge::before,
.badge::before {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: 6px;
    opacity: 0.74;
    width: 6px;
}

.tournament-card {
    background:
        linear-gradient(180deg, rgba(12, 31, 70, 0.92), rgba(5, 12, 28, 0.94)),
        radial-gradient(circle at 88% 4%, rgba(32, 216, 255, 0.12), transparent 11rem);
}

.tournament-card::after {
    background: linear-gradient(180deg, var(--afn-cyan), rgba(22, 119, 255, 0));
    content: "";
    opacity: 0.58;
    position: absolute;
    right: 0;
    top: 18px;
    width: 2px;
    height: 68px;
}

.tournament-card h2 {
    margin-top: 4px;
}

.credits-balance-panel {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 48px rgba(22, 119, 255, 0.16);
    position: relative;
}

.credits-balance-panel::after {
    background:
        linear-gradient(90deg, transparent, rgba(32, 216, 255, 0.34), transparent);
    bottom: 16px;
    content: "";
    height: 1px;
    left: 22px;
    position: absolute;
    right: 22px;
}

.credits-balance-panel span,
.credits-balance-panel small {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.empty-premium {
    background:
        linear-gradient(180deg, rgba(10, 25, 55, 0.72), rgba(5, 12, 28, 0.88)),
        radial-gradient(circle at 50% 0%, rgba(32, 216, 255, 0.10), transparent 16rem);
}

.empty-premium i {
    filter: drop-shadow(0 0 18px rgba(32, 216, 255, 0.18));
}

@keyframes eliteGlowA {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(18px, 10px, 0) scale(1.08);
    }
}

@keyframes eliteGlowB {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-14px, -12px, 0) scale(1.06);
    }
}

@keyframes eliteGlowC {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -16px, 0) scale(1.05);
    }
}

@media (max-width: 768px) {
    .nav-link.active::after {
        left: 10px;
        right: auto;
        top: 50%;
        bottom: auto;
        height: 18px;
        width: 2px;
        transform: translateY(-50%);
    }

    .page-title::before,
    .app-hero::before,
    .credits-hero::before {
        left: 18px;
        right: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .glow-blue,
    .glow-cyan,
    .glow-purple,
    .btn-pce {
        animation: none !important;
    }
}

/* Dashboard correction: remove generated card overlays that can surface as unwanted boxes */
.panel-card::before,
.profile-card::before,
.stat-card::before,
.team-card::before,
.tournament-card::before,
.player-card::before,
.auth-card::before,
.ecosystem-card::before,
.event-board::before,
.final-card::before,
.empty-premium::before {
    content: none !important;
    display: none !important;
}

.panel-card > *,
.profile-card > *,
.stat-card > *,
.team-card > *,
.tournament-card > *,
.player-card > *,
.auth-card > *,
.ecosystem-card > *,
.event-board > *,
.final-card > *,
.empty-premium > * {
    z-index: auto;
}

.stat-card > i {
    bottom: -14px;
    color: rgba(32, 216, 255, 0.10);
    font-size: 70px;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    right: -8px;
    z-index: 0;
}

.stat-card > span,
.stat-card > strong,
.stat-card > small {
    position: relative;
    z-index: 1;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.player-card,
.auth-card,
.ecosystem-card,
.event-board,
.final-card,
.empty-premium {
    isolation: isolate;
}

/* Theme system and layout stability pass */
:root,
[data-theme="dark"] {
    --afn-page-bg: #040812;
    --afn-page-bg-2: #071021;
    --afn-card-bg: linear-gradient(180deg, rgba(10, 25, 55, 0.88), rgba(5, 12, 28, 0.94));
    --afn-card-bg-soft: rgba(5, 14, 34, 0.58);
    --afn-elevated-bg: rgba(8, 22, 50, 0.86);
    --afn-input-bg: rgba(4, 13, 33, 0.86);
    --afn-input-bg-focus: rgba(7, 20, 48, 0.96);
    --afn-control-bg: rgba(8, 22, 50, 0.92);
    --afn-control-text: #f6f9ff;
    --afn-control-muted: rgba(214, 228, 247, 0.78);
    --afn-menu-bg: #08162f;
    --afn-menu-text: #f6f9ff;
    --afn-border: rgba(137, 195, 255, 0.16);
    --afn-success: #35e98c;
    color-scheme: dark;
}

[data-theme="light"] {
    --afn-page-bg: #eef6ff;
    --afn-page-bg-2: #f8fbff;
    --afn-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(229, 241, 255, 0.84));
    --afn-card-bg-soft: rgba(255, 255, 255, 0.72);
    --afn-elevated-bg: rgba(244, 249, 255, 0.92);
    --afn-input-bg: rgba(255, 255, 255, 0.94);
    --afn-input-bg-focus: #ffffff;
    --afn-control-bg: rgba(255, 255, 255, 0.96);
    --afn-control-text: #07162e;
    --afn-control-muted: rgba(17, 35, 63, 0.76);
    --afn-menu-bg: #ffffff;
    --afn-menu-text: #07162e;
    --afn-border: rgba(16, 91, 180, 0.16);
    --afn-success: #12875c;
    --afn-text: #07162e;
    --afn-text-soft: #193354;
    --afn-muted: rgba(20, 42, 74, 0.78);
    --afn-faint: rgba(20, 42, 74, 0.58);
    --afn-line: rgba(16, 91, 180, 0.16);
    --afn-line-strong: rgba(22, 119, 255, 0.34);
    --afn-shadow: 0 22px 58px rgba(24, 73, 132, 0.16);
    --afn-shadow-soft: 0 14px 34px rgba(24, 73, 132, 0.12);
    --afn-glow: 0 0 0 1px rgba(22, 119, 255, 0.08), 0 18px 42px rgba(22, 119, 255, 0.14);
    color-scheme: light;
}

html {
    background: var(--afn-page-bg);
}

body {
    background:
        radial-gradient(circle at 14% 4%, color-mix(in srgb, var(--afn-blue) 18%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--afn-violet) 12%, transparent), transparent 24rem),
        linear-gradient(180deg, var(--afn-page-bg) 0%, var(--afn-page-bg-2) 48%, var(--afn-page-bg) 100%) !important;
    color: var(--afn-text);
}

.page-shell {
    min-height: auto !important;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.app-page,
.form-page,
.auth-page {
    padding-top: clamp(20px, 3vw, 34px) !important;
}

.app-page .container,
.dashboard-stats,
.dashboard-lobby,
.row.g-4.mt-1 {
    position: relative;
    z-index: 1;
}

.dashboard-stats {
    margin-bottom: var(--afn-space-5);
}

.dashboard-lobby {
    align-items: stretch;
}

.dashboard-lobby + .row {
    margin-top: var(--afn-space-5) !important;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.auth-card,
.event-board,
.ecosystem-card,
.empty-premium,
.final-card,
.panel,
.wallet-card,
.player-card {
    background: var(--afn-card-bg) !important;
    color: var(--afn-text);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.page-title,
.app-hero,
.credits-hero,
.section-card {
    background:
        var(--afn-card-bg),
        radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--afn-cyan) 10%, transparent), transparent 20rem) !important;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.page-title::before,
.app-hero::before,
.credits-hero::before,
.tournament-card::after,
.credits-balance-panel::after {
    pointer-events: none;
}

.panel-card:hover,
.team-card:hover,
.tournament-card:hover,
.profile-card:hover,
.stat-card:hover,
.ecosystem-card:hover,
.player-card:hover {
    transform: none !important;
}

.stat-card {
    min-height: 132px;
    overflow: hidden !important;
    padding-right: 74px;
}

.stat-card > i {
    opacity: 1;
}

.panel-head,
.team-top,
.tournament-status {
    align-items: center;
}

.panel-head h2,
.team-top h2,
.tournament-card h2,
.profile-card h2,
.form-head h2,
.empty-premium h3 {
    color: var(--afn-text);
    line-height: 1.05;
}

.page-title p,
.app-hero p,
.credits-hero p,
.auth-copy,
.home-copy,
.muted-copy,
.event-row span,
.ledger-main span,
.ledger-main small,
.wallet-note {
    color: var(--afn-muted) !important;
}

.profile-lines span,
.team-meta span,
.tournament-meta span,
.mini-info span,
.icon-line {
    color: var(--afn-control-muted);
}

.event-row,
.ledger-row,
.wallet-strip,
.empty-inline,
.credit-step,
.credit-pack,
.ticket-identity,
.discord-ticket-box,
.event-focus-strip {
    background: var(--afn-card-bg-soft) !important;
    border-color: var(--afn-line) !important;
}

.empty-premium {
    display: grid;
    place-items: center;
    text-align: center;
}

.empty-premium > * {
    max-width: 560px;
}

.empty-inline {
    color: var(--afn-muted);
}

.status-badge,
.status-pill,
.badge {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn,
button.btn,
a.btn {
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.theme-control {
    align-items: center;
    background: var(--afn-control-bg);
    border: 1px solid var(--afn-line);
    border-radius: 10px;
    color: var(--afn-control-text);
    display: inline-flex;
    gap: 7px;
    min-height: 36px;
    padding: 0 8px;
}

.theme-control i,
.theme-control span {
    color: var(--afn-cyan);
    font-size: 0.9rem;
}

.theme-control select {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    color: var(--afn-control-text) !important;
    cursor: pointer;
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    min-height: 30px;
    padding: 0 18px 0 0;
    text-transform: uppercase;
}

input,
select,
textarea,
button,
option,
optgroup,
dialog {
    color: var(--afn-control-text);
    color-scheme: inherit;
}

select,
option,
optgroup {
    background-color: var(--afn-menu-bg) !important;
    color: var(--afn-menu-text) !important;
}

.form-control,
.form-select,
.auth-card input,
.auth-card select,
.auth-card textarea,
.field input,
.field select,
.field textarea,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="file"] {
    background: var(--afn-input-bg) !important;
    border-color: var(--afn-line) !important;
    color: var(--afn-control-text) !important;
}

.form-control:focus,
.form-select:focus,
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
textarea:focus,
input:focus,
select:focus {
    background: var(--afn-input-bg-focus) !important;
    border-color: var(--afn-line-strong) !important;
    color: var(--afn-control-text) !important;
}

::placeholder {
    color: var(--afn-faint) !important;
    opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: 0.68 !important;
}

details,
summary,
.dropdown-menu {
    background: var(--afn-menu-bg);
    color: var(--afn-menu-text);
}

[data-theme="light"] .pce-nav,
[data-theme="light"] .pce-footer {
    background: rgba(248, 251, 255, 0.84);
}

[data-theme="light"] .nav-link {
    color: rgba(7, 22, 46, 0.76) !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #07162e !important;
}

[data-theme="light"] .btn-ghost,
[data-theme="light"] .btn-soft,
[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.82) !important;
    color: #102b50 !important;
}

[data-theme="light"] .pce-bg .glow {
    opacity: 0.10;
}

@media (max-width: 768px) {
    .theme-control {
        justify-content: center;
        width: 100%;
    }

    .dashboard-stats {
        margin-bottom: var(--afn-space-4);
    }
}

/* Visual QA final fixes */
.page-shell {
    padding-top: 76px !important;
    padding-bottom: 56px !important;
}

.pce-nav {
    z-index: 50;
}

.pce-bg {
    z-index: 0 !important;
}

.pce-bg,
.pce-bg * {
    pointer-events: none !important;
}

.page-title,
.app-hero,
.credits-hero,
.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.empty-premium,
.event-board,
.final-card {
    contain: none;
}

.page-title::before,
.app-hero::before,
.credits-hero::before {
    z-index: 0;
}

.page-title > *,
.app-hero > *,
.credits-hero > * {
    position: relative;
    z-index: 1;
}

.dashboard-stats,
.dashboard-lobby,
.dashboard-lobby + .row {
    clear: both;
    display: flex;
}

.dashboard-lobby > [class*="col-"],
.dashboard-stats > [class*="col-"],
.dashboard-lobby + .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.dashboard-lobby > [class*="col-"] > *,
.dashboard-stats > [class*="col-"] > *,
.dashboard-lobby + .row > [class*="col-"] > * {
    flex: 1 1 auto;
}

.dashboard-lobby .col-lg-8 {
    gap: var(--afn-space-5);
}

.dashboard-lobby .col-lg-8 > .panel-card {
    flex: 0 0 auto;
}

.dashboard-lobby .col-lg-8 > .panel-card + .panel-card {
    margin-top: var(--afn-space-5) !important;
}

.dashboard-lobby + .row {
    align-items: stretch;
    margin-top: var(--afn-space-5) !important;
}

.panel-card,
.profile-card,
.stat-card {
    min-height: 0;
}

.empty-premium.m-0 {
    min-height: 190px;
}

.empty-premium .btn {
    margin-top: 4px;
}

.status-badge,
.badge {
    vertical-align: middle;
}

.event-row .status-badge {
    min-width: max-content;
}

.navbar-toggler {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
}

.navbar-toggler-icon {
    background-image: none !important;
    height: 18px;
    position: relative;
    width: 22px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
    border-top: 2px solid var(--afn-control-text);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    left: 0;
    position: absolute;
    width: 22px;
}

.navbar-toggler-icon::before {
    top: 6px;
}

.navbar-toggler-icon::after {
    top: 14px;
}

.dropdown-menu,
details,
summary {
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-sm);
}

select option:checked {
    background-color: var(--afn-blue) !important;
    color: #ffffff !important;
}

textarea {
    line-height: 1.55;
    min-height: 118px;
    resize: vertical;
}

label,
.form-label,
.field label {
    line-height: 1.25;
}

[data-theme="light"] .pce-badge,
[data-theme="light"] .profile-tag {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(16, 91, 180, 0.16);
    color: #102b50;
}

[data-theme="light"] .status-open,
[data-theme="light"] .status-verified,
[data-theme="light"] .status-confirmed,
[data-theme="light"] .status-approved,
[data-theme="light"] .status-clean,
[data-theme="light"] .status-paid {
    color: #08703c;
}

[data-theme="light"] .status-pending,
[data-theme="light"] .status-payment_pending,
[data-theme="light"] .status-draft,
[data-theme="light"] .status-upcoming {
    color: #8a5a00;
}

[data-theme="light"] .status-rejected,
[data-theme="light"] .status-refunded,
[data-theme="light"] .status-banned,
[data-theme="light"] .status-suspended,
[data-theme="light"] .status-cancelled,
[data-theme="light"] .status-closed {
    color: #a31632;
}

[data-theme="light"] .status-watchlist,
[data-theme="light"] .status-ongoing {
    color: #4430b2;
}

@media (max-width: 991px) {
    .page-shell {
        padding-top: 70px !important;
    }
}

@media (max-width: 768px) {
    .dashboard-stats,
    .dashboard-lobby,
    .dashboard-lobby + .row {
        display: flex;
    }

    .dashboard-lobby .col-lg-8 {
        gap: 0;
    }

    .empty-premium.m-0 {
        min-height: 170px;
    }
}

/* Normal-flow enforcement: real content uses Grid/Flex, not absolute layers */
.page-title,
.app-hero,
.credits-hero,
.section-card,
.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.empty-premium,
.event-board,
.final-card,
.wallet-card,
.ecosystem-card,
.credits-balance-panel,
.credit-step,
.path-card {
    position: static !important;
}

.page-title::before,
.page-title::after,
.app-hero::before,
.app-hero::after,
.credits-hero::before,
.credits-hero::after,
.section-card::before,
.section-card::after,
.panel-card::before,
.panel-card::after,
.profile-card::before,
.profile-card::after,
.stat-card::before,
.stat-card::after,
.team-card::before,
.team-card::after,
.tournament-card::before,
.tournament-card::after,
.player-card::before,
.player-card::after,
.auth-card::before,
.auth-card::after,
.empty-premium::before,
.empty-premium::after,
.event-board::before,
.event-board::after,
.final-card::before,
.final-card::after,
.wallet-card::before,
.wallet-card::after,
.ecosystem-card::before,
.ecosystem-card::after,
.credits-balance-panel::before,
.credits-balance-panel::after,
.credit-step::before,
.credit-step::after,
.path-card::before,
.path-card::after {
    content: none !important;
    display: none !important;
}

.page-title > *,
.app-hero > *,
.credits-hero > *,
.section-card > *,
.panel-card > *,
.profile-card > *,
.stat-card > *,
.team-card > *,
.tournament-card > *,
.player-card > *,
.auth-card > *,
.empty-premium > *,
.event-board > *,
.final-card > *,
.wallet-card > *,
.ecosystem-card > *,
.credits-balance-panel > *,
.credit-step > *,
.path-card > * {
    position: static !important;
    z-index: auto !important;
}

.stat-card {
    align-items: center;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
}

.stat-card > span,
.stat-card > strong,
.stat-card > small {
    grid-column: 1;
}

.stat-card > i {
    align-self: center;
    color: color-mix(in srgb, var(--afn-cyan) 32%, transparent);
    font-size: 42px;
    grid-column: 2;
    grid-row: 1 / span 3;
    justify-self: end;
    line-height: 1;
    margin-left: var(--afn-space-4);
    position: static !important;
}

.profile-avatar {
    align-items: center;
    aspect-ratio: 1;
    background:
        linear-gradient(145deg, rgba(32, 216, 255, 0.24), rgba(22, 119, 255, 0.10) 42%, rgba(117, 87, 255, 0.22)),
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.20), transparent 32%);
    border: 1px solid rgba(137, 195, 255, 0.28);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 8, 28, 0.28);
    color: #ffffff;
    display: flex;
    justify-content: center;
    margin: 0 auto var(--afn-space-4);
    max-width: 142px;
    overflow: hidden;
    width: min(46%, 142px);
}

.profile-avatar span {
    font-family: var(--afn-heading);
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.9;
    text-shadow: 0 0 24px rgba(32, 216, 255, 0.34);
}

.profile-avatar img,
.profile-picture-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.profile-avatar img {
    border-radius: inherit;
    flex: 1 1 auto;
    min-height: 100%;
    min-width: 100%;
}

.profile-avatar.has-image span,
.profile-picture-preview.has-image .profile-picture-fallback {
    display: none;
}

.profile-avatar.has-image.is-missing span,
.profile-picture-preview.has-image.is-missing .profile-picture-fallback {
    display: flex;
}

.profile-avatar-sm {
    aspect-ratio: auto;
    border-radius: 14px;
    flex: 0 0 52px;
    height: 52px;
    margin: 0;
    max-width: none;
    min-height: 52px;
    min-width: 52px;
    width: 52px;
}

.profile-avatar-sm span {
    font-size: 1.55rem;
}

.player-card-head {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.player-card-head h2 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-picture-preview {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
}

.profile-picture-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(142, 205, 255, 0.14);
    border-radius: 18px;
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
}

.profile-picture-panel > span {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-picture-panel > small {
    color: var(--afn-muted);
    line-height: 1.45;
}

.profile-picture-preview.large {
    aspect-ratio: 1;
    border-radius: 18px;
    display: grid;
    height: auto;
    margin-bottom: 2px;
    max-width: 190px;
    overflow: hidden;
    padding: 0;
    width: min(100%, 190px);
}

.profile-picture-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.profile-picture-actions form {
    margin: 0;
}

.profile-picture-actions .btn {
    min-width: 92px;
}

.profile-picture-input {
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    width: 1px !important;
}

.profile-picture-fallback {
    align-items: center;
    background:
        linear-gradient(145deg, rgba(32, 216, 255, 0.24), rgba(22, 119, 255, 0.10) 42%, rgba(117, 87, 255, 0.22)),
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.20), transparent 32%);
    color: var(--afn-text);
    display: flex;
    font-family: var(--afn-heading);
    font-size: 4rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
}

.profile-picture-upload-field {
    margin-top: 4px;
}

.profile-picture-preview img {
    border-radius: 12px;
    flex: 0 0 72px;
    height: 72px;
    width: 72px;
}

.profile-picture-preview.large img {
    border-radius: inherit;
    flex: 1 1 auto;
    height: 100%;
    width: 100%;
}

.profile-picture-preview span {
    color: var(--afn-muted);
    font-family: var(--afn-display);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-completion-badge {
    align-items: center;
    background: rgba(32, 216, 255, 0.08);
    border: 1px solid rgba(32, 216, 255, 0.18);
    border-radius: 999px;
    color: var(--afn-text-soft);
    display: inline-flex;
    gap: 7px;
    justify-content: center;
    margin: 2px auto var(--afn-space-4);
    min-height: 32px;
    padding: 0 12px;
}

.profile-completion-badge i {
    color: var(--afn-cyan);
}

.profile-completion-badge span {
    font-family: var(--afn-display);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

[data-theme="light"] .profile-avatar {
    background:
        linear-gradient(145deg, rgba(22, 119, 255, 0.16), rgba(255, 255, 255, 0.86) 44%, rgba(117, 87, 255, 0.16)),
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.80), transparent 32%);
    border-color: rgba(16, 91, 180, 0.18);
    box-shadow: 0 18px 34px rgba(14, 61, 128, 0.12);
    color: #0d5ee8;
}

[data-theme="light"] .profile-completion-badge {
    background: rgba(22, 119, 255, 0.08);
    border-color: rgba(22, 119, 255, 0.16);
    color: #102b50;
}

/* Dashboard hardening: named grid areas prevent module overlap */
.dashboard-stats,
.dashboard-lobby,
.dashboard-bottom {
    clear: both;
    display: grid !important;
    float: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    width: 100%;
}

.dashboard-stats {
    gap: var(--afn-space-5);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 var(--afn-space-5) !important;
}

.dashboard-lobby {
    align-items: start;
    gap: var(--afn-space-5);
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
    margin: 0 !important;
}

.dashboard-side {
    display: grid;
    gap: var(--afn-space-5);
    min-width: 0;
}

.dashboard-side > .panel-card {
    margin: 0 !important;
}

.dashboard-bottom {
    align-items: stretch;
    gap: var(--afn-space-5);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: var(--afn-space-5) 0 0 !important;
}

.dashboard-stats > *,
.dashboard-lobby > *,
.dashboard-bottom > * {
    min-width: 0;
    position: static !important;
}

.dashboard-bottom .panel-card,
.dashboard-lobby .panel-card,
.dashboard-lobby .profile-card {
    background:
        linear-gradient(180deg, #07142c, #050d1f),
        radial-gradient(circle at 18% 0%, rgba(32, 216, 255, 0.05), transparent 18rem) !important;
    overflow: visible !important;
}

[data-theme="light"] .dashboard-bottom .panel-card,
[data-theme="light"] .dashboard-lobby .panel-card,
[data-theme="light"] .dashboard-lobby .profile-card {
    background:
        linear-gradient(180deg, #ffffff, #f4f8ff),
        radial-gradient(circle at 18% 0%, rgba(22, 119, 255, 0.08), transparent 18rem) !important;
}

.dashboard-stats .animate-in,
.dashboard-lobby .animate-in,
.dashboard-bottom .animate-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 991px) {
    .dashboard-stats,
    .dashboard-lobby,
    .dashboard-bottom {
        grid-template-columns: 1fr !important;
    }
}

/* Tournament detail and footer polish */
.tournament-detail-page {
    padding-bottom: clamp(46px, 7vw, 88px) !important;
}

.tournament-detail-grid {
    align-items: start;
    display: grid;
    gap: var(--afn-space-5);
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    margin-bottom: var(--afn-space-6);
}

.tournament-main,
.tournament-side {
    display: grid;
    gap: var(--afn-space-5);
    min-width: 0;
}

.event-detail-card,
.registration-card,
.captain-teams-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.captain-teams-card {
    margin: 0 !important;
}

.event-detail-card .detail-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-detail-card .detail-meta span {
    background: rgba(5, 14, 34, 0.42);
    border: 1px solid rgba(137, 195, 255, 0.10);
    border-radius: var(--afn-radius-sm);
    min-height: 46px;
    padding: 11px 12px;
}

.registration-card .requirement-box {
    margin-bottom: var(--afn-space-3);
}

.tournament-side .d-flex {
    align-items: center;
}

.pce-footer {
    background:
        linear-gradient(180deg, rgba(5, 12, 28, 0.94), rgba(3, 7, 18, 0.98)),
        radial-gradient(circle at 18% 0%, rgba(32, 216, 255, 0.10), transparent 22rem);
    border-top: 1px solid rgba(137, 195, 255, 0.16);
    box-shadow: 0 -22px 60px rgba(0, 7, 28, 0.24);
    color: var(--afn-text);
    margin-top: 0;
    padding: 34px 0;
}

.footer-grid {
    align-items: start;
    display: grid;
    gap: var(--afn-space-5);
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
}

.footer-brand {
    align-items: center;
    display: flex;
    gap: var(--afn-space-3);
    min-width: 0;
}

.footer-logo {
    flex: 0 0 auto;
}

.footer-brand strong {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.9;
    text-transform: uppercase;
}

.footer-brand p {
    color: var(--afn-muted);
    line-height: 1.55;
    margin: 6px 0 0;
    max-width: 520px;
}

.footer-panel {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(137, 195, 255, 0.10);
    border-radius: var(--afn-radius-sm);
    display: grid;
    gap: 8px;
    padding: 14px;
}

.footer-panel span {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-panel a,
.footer-panel small {
    color: var(--afn-text-soft);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-panel a:hover {
    color: var(--afn-cyan);
}

[data-theme="light"] .event-detail-card .detail-meta span {
    background: rgba(255, 255, 255, 0.70);
    border-color: rgba(16, 91, 180, 0.12);
}

[data-theme="light"] .pce-footer {
    background:
        linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(232, 240, 252, 0.98)),
        radial-gradient(circle at 18% 0%, rgba(22, 119, 255, 0.08), transparent 22rem);
    box-shadow: 0 -18px 42px rgba(14, 61, 128, 0.10);
    color: #07162e;
}

[data-theme="light"] .footer-brand strong {
    color: #07162e;
}

[data-theme="light"] .footer-brand p,
[data-theme="light"] .footer-panel a,
[data-theme="light"] .footer-panel small {
    color: #315174;
}

[data-theme="light"] .footer-panel {
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(16, 91, 180, 0.12);
}

@media (max-width: 991px) {
    .tournament-detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .event-detail-card .detail-meta {
        grid-template-columns: 1fr;
    }
}

/* Brand asset integration */
.brand-wordmark {
    display: block;
    height: auto;
    object-fit: contain;
}

.brand-wordmark-nav {
    filter: drop-shadow(0 10px 18px rgba(0, 8, 28, 0.28));
    max-height: 42px;
    width: clamp(132px, 15vw, 192px);
}

.brand-text-fallback {
    border-left: 1px solid rgba(137, 195, 255, 0.18);
    margin-left: 2px;
    padding-left: 10px;
}

.brand-wordmark-footer {
    filter: drop-shadow(0 14px 24px rgba(0, 8, 28, 0.22));
    width: clamp(170px, 22vw, 260px);
}

.footer-brand {
    align-items: center;
}

.footer-brand .brand-wordmark + div {
    border-left: 1px solid rgba(137, 195, 255, 0.18);
    padding-left: var(--afn-space-4);
}

[data-theme="light"] .brand-wordmark-nav,
[data-theme="light"] .brand-wordmark-footer {
    filter: drop-shadow(0 10px 18px rgba(14, 61, 128, 0.14));
}

@media (max-width: 760px) {
    .brand-wordmark-nav {
        width: 138px;
    }

    .brand-text-fallback {
        display: none;
    }

    .footer-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-brand .brand-wordmark + div {
        border-left: 0;
        padding-left: 0;
    }
}

/* Sidebar navigation and tighter landing rhythm */
:root {
    --atlas-sidebar-width: 282px;
}

.atlas-sidebar {
    background:
        linear-gradient(180deg, rgba(6, 14, 32, 0.94), rgba(3, 7, 18, 0.97)),
        var(--afn-card-bg);
    border-right: 1px solid var(--afn-border);
    bottom: 0;
    box-shadow: 18px 0 60px rgba(0, 0, 0, 0.22);
    flex-direction: column;
    gap: 22px;
    left: 0;
    padding: 22px 18px;
    position: fixed;
    top: 0;
    width: var(--atlas-sidebar-width);
    z-index: 50;
}

.atlas-sidebar-brand,
.atlas-mobile-brand {
    align-items: center;
    color: var(--afn-text);
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.atlas-sidebar-brand {
    align-items: flex-start;
    border-bottom: 1px solid var(--afn-border);
    flex-direction: column;
    padding: 4px 4px 18px;
}

.atlas-sidebar-brand .brand-wordmark {
    max-height: 42px;
    object-fit: contain;
    width: min(190px, 100%);
}

.atlas-sidebar-brand span {
    color: var(--afn-muted);
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atlas-sidebar-nav {
    display: grid;
    gap: 8px;
}

.atlas-sidebar-nav .nav-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--afn-muted) !important;
    display: flex;
    font-family: var(--afn-display);
    font-size: 0.92rem;
    font-weight: 900;
    gap: 11px;
    letter-spacing: 0.035em;
    line-height: 1;
    min-height: 46px;
    padding: 0 13px;
    text-transform: uppercase;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.atlas-sidebar-nav .nav-link i {
    align-items: center;
    color: var(--afn-cyan);
    display: inline-flex;
    flex: 0 0 20px;
    font-size: 1rem;
    justify-content: center;
    opacity: 0.9;
}

.atlas-sidebar-nav .nav-link:hover,
.atlas-sidebar-nav .nav-link.active {
    background: rgba(32, 216, 255, 0.10);
    border-color: rgba(32, 216, 255, 0.22);
    color: var(--afn-text) !important;
    transform: translateX(2px);
}

.atlas-sidebar-nav .nav-link.active {
    box-shadow: inset 3px 0 0 var(--afn-cyan), 0 12px 30px rgba(22, 119, 255, 0.10);
}

.atlas-sidebar-bottom {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.atlas-sidebar-bottom form {
    margin: 0;
}

.atlas-sidebar .theme-control,
.atlas-offcanvas .theme-control {
    margin: 0 !important;
    width: 100%;
}

.atlas-sidebar .theme-control select,
.atlas-offcanvas .theme-control select {
    flex: 1;
}

.atlas-mobile-nav {
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(5, 10, 24, 0.86);
    border-bottom: 1px solid var(--afn-border);
    display: flex;
    height: 68px;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 50;
}

.atlas-mobile-brand .brand-wordmark {
    max-height: 34px;
    object-fit: contain;
    width: 138px;
}

.atlas-menu-button {
    align-items: center;
    background: rgba(32, 216, 255, 0.08);
    border: 1px solid rgba(32, 216, 255, 0.20);
    border-radius: 13px;
    color: var(--afn-text);
    display: inline-flex;
    font-size: 1.35rem;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 42px;
}

.atlas-offcanvas {
    background:
        linear-gradient(180deg, rgba(6, 14, 32, 0.97), rgba(3, 7, 18, 0.98)),
        var(--afn-card-bg);
    border-right: 1px solid var(--afn-border);
    color: var(--afn-text);
}

.atlas-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--afn-border);
    min-height: 68px;
}

.atlas-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

[data-theme="light"] .atlas-sidebar,
[data-theme="light"] .atlas-offcanvas,
[data-theme="light"] .atlas-mobile-nav {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 243, 255, 0.96)),
        var(--afn-card-bg);
}

[data-theme="light"] .atlas-menu-button {
    background: rgba(22, 119, 255, 0.08);
    color: var(--afn-text);
}

@media (min-width: 992px) {
    .page-shell,
    .pce-footer,
    .message-stack {
        margin-left: var(--atlas-sidebar-width) !important;
    }

    .page-shell {
        padding-top: 0 !important;
    }

    .pce-footer .container,
    .page-shell > section > .container,
    .message-stack.container {
        max-width: min(1280px, calc(100vw - var(--atlas-sidebar-width) - 44px));
    }
}

.landing-hero {
    padding: clamp(42px, 7vw, 88px) 0 clamp(20px, 4vw, 42px) !important;
}

.landing-band {
    padding: clamp(22px, 4vw, 46px) 0 !important;
}

.landing-band-tight {
    padding-top: 8px !important;
}

.landing-final {
    padding: clamp(28px, 5vw, 56px) 0 clamp(42px, 6vw, 72px) !important;
}

.landing-section-head h2,
.flow-copy h2,
.landing-final-card h2 {
    margin-top: 8px !important;
}

.launch-grid,
.flow-panel,
.landing-split {
    margin-top: 18px !important;
}

.landing-hero h1 {
    font-size: clamp(3.2rem, 7.5vw, 7.4rem);
    margin: 16px 0 14px;
}

.landing-proof-strip,
.landing-actions {
    margin-top: 22px !important;
}

@media (max-width: 991.98px) {
    .page-shell {
        padding-top: 68px !important;
    }

    .landing-hero {
        padding-top: 38px !important;
    }
}

@media (max-width: 760px) {
    .landing-hero {
        padding: 28px 0 18px !important;
    }

    .landing-band {
        padding: 20px 0 !important;
    }

    .landing-final {
        padding: 24px 0 46px !important;
    }

    .landing-hero h1 {
        font-size: clamp(3rem, 15vw, 4.6rem);
    }
}

/* Account connection modules */
.connect-notice,
.connect-card {
    align-items: center;
    background: rgba(32, 216, 255, 0.075);
    border: 1px solid rgba(32, 216, 255, 0.18);
    border-radius: var(--afn-radius-md);
    color: var(--afn-text);
    display: flex;
    gap: var(--afn-space-3);
    padding: var(--afn-space-4);
}

.connect-notice > i,
.connect-card-main > i {
    align-items: center;
    background: rgba(32, 216, 255, 0.10);
    border: 1px solid rgba(32, 216, 255, 0.20);
    border-radius: 12px;
    color: var(--afn-cyan);
    display: inline-flex;
    flex: 0 0 44px;
    font-size: 1.25rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.connect-notice strong,
.connect-card strong,
.connect-card span {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.connect-notice span,
.connect-card small {
    color: var(--afn-muted);
    display: block;
    line-height: 1.45;
    margin-top: 2px;
}

.connect-card {
    justify-content: space-between;
}

.connect-card-main {
    align-items: center;
    display: flex;
    gap: var(--afn-space-3);
    min-width: 0;
}

.connect-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--afn-space-2);
    justify-content: flex-end;
}

.connect-actions form {
    margin: 0;
}

[data-theme="light"] .connect-notice,
[data-theme="light"] .connect-card {
    background: rgba(22, 119, 255, 0.07);
    border-color: rgba(22, 119, 255, 0.16);
}

@media (max-width: 760px) {
    .connect-card {
        align-items: stretch;
        flex-direction: column;
    }

    .connect-actions {
        justify-content: stretch;
    }

    .connect-actions .btn,
    .connect-actions form {
        width: 100%;
    }
}

/* Premium public landing page */
.landing-hero,
.landing-band,
.landing-final {
    overflow: clip;
}

.landing-hero {
    padding: clamp(72px, 10vw, 132px) 0 clamp(42px, 7vw, 82px);
}

.landing-hero-grid {
    align-items: center;
    display: grid;
    gap: clamp(26px, 5vw, 72px);
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.landing-hero-copy {
    max-width: 720px;
}

.landing-eyebrow {
    align-items: center;
    background: rgba(32, 216, 255, 0.09);
    border: 1px solid rgba(32, 216, 255, 0.20);
    border-radius: 999px;
    color: var(--afn-cyan);
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.8rem;
    font-weight: 900;
    gap: 8px;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 10px 14px;
    text-transform: uppercase;
}

.landing-hero h1,
.landing-section-head h2,
.flow-copy h2,
.landing-final-card h2 {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-weight: 700;
    letter-spacing: 0;
}

.landing-hero h1 {
    font-size: clamp(3.7rem, 8.6vw, 8.4rem);
    line-height: 0.82;
    margin: 20px 0 18px;
    max-width: 820px;
}

.landing-hero-copy > p {
    color: var(--afn-muted);
    font-size: clamp(1.02rem, 1.6vw, 1.22rem);
    line-height: 1.65;
    margin: 0;
    max-width: 660px;
}

.landing-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.landing-proof-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.landing-proof-strip span {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--afn-border);
    border-radius: 999px;
    color: var(--afn-muted);
    display: inline-flex;
    font-size: 0.88rem;
    gap: 8px;
    line-height: 1;
    padding: 10px 13px;
}

.landing-proof-strip strong {
    color: var(--afn-text);
    font-family: var(--afn-display);
    letter-spacing: 0.08em;
}

.landing-command,
.launch-card,
.flow-panel,
.landing-event,
.landing-empty,
.landing-final-card {
    background:
        linear-gradient(180deg, rgba(13, 30, 65, 0.82), rgba(4, 9, 22, 0.94)),
        var(--afn-card-bg);
    border: 1px solid var(--afn-border);
    border-radius: var(--afn-radius-lg);
    box-shadow: var(--afn-shadow);
    color: var(--afn-text);
}

.landing-command {
    display: grid;
    gap: 16px;
    padding: clamp(18px, 3vw, 28px);
}

.command-header,
.command-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.command-header span,
.launch-card > span,
.landing-section-head > span {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.command-header strong {
    color: var(--afn-success);
    font-family: var(--afn-display);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.command-player {
    align-items: center;
    background: linear-gradient(135deg, rgba(32, 216, 255, 0.14), rgba(124, 58, 237, 0.09));
    border: 1px solid rgba(32, 216, 255, 0.20);
    border-radius: var(--afn-radius-md);
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr auto;
    padding: 16px;
}

.command-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--afn-cyan), var(--afn-blue));
    border-radius: 16px;
    color: #ffffff;
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 1.25rem;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    letter-spacing: 0.08em;
    width: 58px;
}

.command-player span,
.command-stack span,
.command-footer span {
    color: var(--afn-muted);
    display: block;
    font-size: 0.9rem;
}

.command-player strong,
.command-stack strong {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-display);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.command-player > i {
    color: var(--afn-success);
    font-size: 1.45rem;
}

.command-stack {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-stack > div {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--afn-border);
    border-radius: var(--afn-radius-md);
    min-height: 118px;
    padding: 16px;
}

.command-stack i {
    color: var(--afn-cyan);
    display: block;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.command-footer {
    border-top: 1px solid var(--afn-border);
    padding-top: 14px;
}

.command-footer span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.landing-band {
    padding: clamp(34px, 6vw, 76px) 0;
}

.landing-band-tight {
    padding-top: 20px;
}

.landing-section-head {
    max-width: 740px;
}

.landing-section-head h2,
.flow-copy h2,
.landing-final-card h2 {
    font-size: clamp(2.2rem, 4.2vw, 4.6rem);
    line-height: 0.92;
    margin: 12px 0 0;
}

.landing-section-head p,
.landing-final-card p {
    color: var(--afn-muted);
    font-size: 1rem;
    line-height: 1.65;
    margin: 14px 0 0;
    max-width: 620px;
}

.launch-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.launch-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: clamp(18px, 2.4vw, 26px);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.launch-card:hover,
.landing-command:hover,
.landing-event:hover,
.landing-empty:hover,
.flow-panel:hover,
.landing-final-card:hover {
    border-color: var(--afn-line-strong);
    box-shadow: var(--afn-glow);
    transform: translateY(-2px);
}

.launch-card-primary {
    background:
        radial-gradient(circle at 22% 0%, rgba(32, 216, 255, 0.26), transparent 32%),
        linear-gradient(135deg, rgba(10, 34, 76, 0.94), rgba(5, 10, 24, 0.96));
}

.launch-card i {
    color: var(--afn-cyan);
    font-size: 1.55rem;
    margin-bottom: 22px;
}

.launch-card h3 {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: clamp(1.45rem, 2.4vw, 2.3rem);
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 0.92;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.launch-card p {
    color: var(--afn-muted);
    line-height: 1.55;
    margin: 0;
}

.launch-card .btn {
    margin-top: auto;
    width: fit-content;
}

.flow-panel {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    padding: clamp(20px, 3vw, 30px);
}

.flow-steps {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flow-steps article {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--afn-border);
    border-radius: var(--afn-radius-md);
    min-height: 150px;
    padding: 16px;
}

.flow-steps b {
    color: var(--afn-cyan);
    display: block;
    font-family: var(--afn-display);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.flow-steps strong,
.landing-event h3,
.landing-empty h3 {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-display);
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
}

.flow-steps span,
.landing-event p,
.landing-empty p {
    color: var(--afn-muted);
    display: block;
    line-height: 1.45;
    margin: 8px 0 0;
}

.landing-split {
    align-items: start;
    display: grid;
    gap: clamp(20px, 5vw, 54px);
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.landing-event-list {
    display: grid;
    gap: 12px;
}

.landing-event {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px;
}

.landing-event .status-badge {
    margin-bottom: 12px;
}

.landing-event-meta {
    align-items: center;
    background: rgba(32, 216, 255, 0.08);
    border: 1px solid rgba(32, 216, 255, 0.18);
    border-radius: var(--afn-radius-md);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-height: 84px;
    min-width: 96px;
    padding: 12px;
}

.landing-event-meta strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 2.2rem;
    line-height: 0.9;
}

.landing-event-meta span {
    color: var(--afn-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.landing-empty {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 260px;
    padding: 28px;
    text-align: center;
}

.landing-empty i {
    color: var(--afn-cyan);
    font-size: 2.1rem;
    margin-bottom: 10px;
}

.landing-final {
    padding: clamp(36px, 7vw, 88px) 0 clamp(54px, 8vw, 100px);
}

.landing-final-card {
    align-items: center;
    display: grid;
    justify-items: center;
    margin: 0 auto;
    max-width: 980px;
    padding: clamp(30px, 5vw, 56px);
    text-align: center;
}

[data-theme="light"] .landing-command,
[data-theme="light"] .launch-card,
[data-theme="light"] .flow-panel,
[data-theme="light"] .landing-event,
[data-theme="light"] .landing-empty,
[data-theme="light"] .landing-final-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(235, 243, 255, 0.88)),
        var(--afn-card-bg);
}

[data-theme="light"] .landing-proof-strip span,
[data-theme="light"] .command-stack > div,
[data-theme="light"] .flow-steps article {
    background: rgba(22, 119, 255, 0.055);
}

@media (max-width: 1180px) {
    .landing-hero-grid,
    .launch-grid,
    .flow-panel,
    .landing-split {
        grid-template-columns: 1fr;
    }

    .landing-command {
        max-width: 720px;
    }

    .launch-card {
        min-height: 210px;
    }
}

@media (max-width: 760px) {
    .landing-hero {
        padding-top: 48px;
    }

    .landing-actions .btn,
    .landing-final-card .btn {
        justify-content: center;
        width: 100%;
    }

    .landing-proof-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-proof-strip span {
        justify-content: center;
    }

    .landing-command {
        padding: 16px;
    }

    .command-stack,
    .flow-steps {
        grid-template-columns: 1fr;
    }

    .command-player,
    .landing-event {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .command-player {
        display: flex;
        flex-direction: column;
    }

    .landing-event {
        flex-direction: column;
    }

    .landing-event-meta {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .launch-card,
    .landing-command,
    .landing-event,
    .landing-empty,
    .flow-panel,
    .landing-final-card {
        transition: none;
    }

    .launch-card:hover,
    .landing-command:hover,
    .landing-event:hover,
    .landing-empty:hover,
    .flow-panel:hover,
    .landing-final-card:hover {
        transform: none;
    }
}

/* Global UI spacing and button alignment pass */
:root {
    --afn-page-top: clamp(24px, 4vw, 48px);
    --afn-page-gap: clamp(18px, 3vw, 30px);
    --afn-card-pad: clamp(18px, 2.6vw, 28px);
    --afn-row-pad-y: 14px;
    --afn-row-pad-x: 16px;
}

.page-shell {
    padding-top: 76px !important;
}

.app-page,
.form-page,
.credits-page {
    padding-top: var(--afn-page-top) !important;
}

.app-page .container,
.form-page .container,
.credits-page .container,
.landing-hero .container,
.landing-band .container,
.landing-final .container {
    width: min(100% - 32px, var(--afn-container));
}

.page-title,
.app-hero,
.credits-hero,
.dashboard-stats,
.dashboard-lobby,
.dashboard-bottom,
.teams-grid,
.tournament-grid,
.players-grid,
.credits-grid,
.launch-grid,
.flow-panel,
.landing-split {
    gap: var(--afn-page-gap) !important;
}

.page-title,
.app-hero,
.credits-hero {
    margin-bottom: var(--afn-page-gap) !important;
}

.dashboard-lobby,
.dashboard-bottom,
.credits-grid,
.landing-band + .landing-band {
    margin-top: var(--afn-page-gap) !important;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.wallet-card,
.empty-premium,
.connect-card,
.landing-command,
.launch-card,
.flow-panel,
.landing-event,
.landing-empty,
.landing-final-card {
    padding: var(--afn-card-pad) !important;
}

.btn,
button.btn,
a.btn,
input[type="submit"].btn,
input[type="button"].btn {
    align-items: center !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 44px;
    padding: 0 18px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

.btn > i,
button.btn > i,
a.btn > i,
.btn .bi {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1em;
    height: 1em;
    justify-content: center;
    line-height: 1 !important;
    margin: 0 !important;
    width: 1em;
}

.btn > span,
button.btn > span,
a.btn > span {
    line-height: 1 !important;
}

.btn-lg {
    font-size: 0.92rem !important;
    min-height: 52px !important;
    padding-inline: 24px !important;
}

.btn-sm {
    font-size: 0.76rem !important;
    min-height: 38px !important;
    padding-inline: 13px !important;
}

.btn.w-100,
.landing-actions .btn,
.hero-actions .btn,
.credits-actions .btn,
.connect-actions .btn {
    min-width: 0;
}

.navbar-nav form,
.connect-actions form {
    align-items: stretch;
    display: flex;
    margin: 0 !important;
}

.navbar-nav .btn {
    min-height: 38px;
}

.status-badge,
.status-pill,
.badge {
    align-items: center !important;
    display: inline-flex !important;
    gap: 6px !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 30px;
    padding: 0 11px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

.status-badge::before,
.status-pill::before,
.badge::before {
    flex: 0 0 auto;
}

.panel-head,
.form-head,
.board-heading,
.command-header,
.landing-event,
.wallet-strip,
.event-row,
.ledger-row {
    align-items: center;
}

.panel-head {
    gap: 14px !important;
    margin-bottom: 16px !important;
}

.panel-head h2,
.form-head h2,
.landing-section-head h2,
.flow-copy h2,
.landing-final-card h2,
.app-hero h1,
.credits-hero h1,
.page-title h1 {
    text-wrap: balance;
}

.event-row,
.ledger-row,
.wallet-strip {
    border-radius: var(--afn-radius-md);
    gap: 14px !important;
    padding: var(--afn-row-pad-y) var(--afn-row-pad-x) !important;
}

.event-row > div,
.ledger-row > div,
.wallet-strip > div {
    min-width: 0;
}

.event-row strong,
.event-row span,
.ledger-row strong,
.ledger-row span,
.wallet-strip strong,
.wallet-strip span {
    line-height: 1.25;
}

.event-row .btn,
.ledger-row .btn,
.wallet-strip .btn,
.panel-head .btn,
.team-card .btn,
.tournament-card .btn,
.player-card .btn {
    flex: 0 0 auto;
}

.empty-premium,
.empty-inline,
.landing-empty {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.empty-inline.action-empty {
    gap: 12px;
}

.empty-inline.action-empty .d-flex {
    justify-content: center;
}

.field,
.auth-card .field {
    display: grid;
    gap: 8px;
}

.field label,
.auth-card label,
.settings-card label {
    line-height: 1.1;
    margin: 0 !important;
}

.form-control,
.form-select,
.pce-control {
    min-height: 46px;
}

textarea.form-control {
    min-height: 118px;
    padding-top: 13px;
}

.landing-actions,
.hero-actions,
.credits-actions,
.connect-actions {
    row-gap: 10px !important;
}

@media (max-width: 992px) {
    .page-shell {
        padding-top: 70px !important;
    }

    .app-hero,
    .credits-hero,
    .page-title {
        align-items: stretch !important;
    }

    .hero-actions,
    .credits-actions,
    .page-title > .d-flex {
        justify-content: flex-start !important;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .app-page .container,
    .form-page .container,
    .credits-page .container,
    .landing-hero .container,
    .landing-band .container,
    .landing-final .container {
        width: min(100% - 24px, var(--afn-container));
    }

    .btn,
    button.btn,
    a.btn,
    input[type="submit"].btn,
    input[type="button"].btn {
        min-height: 46px;
        white-space: normal;
    }

    .btn-sm {
        min-height: 42px !important;
    }

    .hero-actions .btn,
    .credits-actions .btn,
    .landing-actions .btn,
    .connect-actions .btn,
    .event-row .btn,
    .ledger-row .btn,
    .wallet-strip .btn,
    .panel-head .btn,
    .panel-head > a,
    .navbar-nav .btn,
    .navbar-nav form,
    .navbar-nav form .btn {
        width: 100%;
    }

    .event-row,
    .ledger-row,
    .wallet-strip,
    .landing-event,
    .panel-head {
        align-items: stretch !important;
        flex-direction: column;
    }

    .status-badge,
    .status-pill,
    .badge {
        white-space: normal;
    }
}

/* Final sidebar/layout overrides: keep this at the end of the cascade */
@media (min-width: 992px) {
    .page-shell,
    .pce-footer,
    .message-stack {
        margin-left: var(--atlas-sidebar-width) !important;
    }

    .page-shell {
        padding-top: 0 !important;
    }

    .pce-footer .container,
    .page-shell > section > .container,
    .message-stack.container {
        max-width: min(1280px, calc(100vw - var(--atlas-sidebar-width) - 44px)) !important;
    }
}

@media (max-width: 991.98px) {
    .page-shell {
        padding-top: 68px !important;
    }
}

.landing-hero {
    padding: clamp(42px, 7vw, 88px) 0 clamp(20px, 4vw, 42px) !important;
}

.landing-band {
    padding: clamp(22px, 4vw, 46px) 0 !important;
}

.landing-band-tight {
    padding-top: 8px !important;
}

.landing-final {
    padding: clamp(28px, 5vw, 56px) 0 clamp(42px, 6vw, 72px) !important;
}

.landing-hero h1 {
    font-size: clamp(3.2rem, 7.5vw, 7.4rem) !important;
    margin: 16px 0 14px !important;
}

.landing-section-head h2,
.flow-copy h2,
.landing-final-card h2 {
    margin-top: 8px !important;
}

.launch-grid,
.flow-panel,
.landing-split {
    margin-top: 18px !important;
}

.landing-proof-strip,
.landing-actions {
    margin-top: 22px !important;
}

@media (max-width: 760px) {
    .landing-hero {
        padding: 28px 0 18px !important;
    }

    .landing-band {
        padding: 20px 0 !important;
    }

    .landing-final {
        padding: 24px 0 46px !important;
    }

    .landing-hero h1 {
        font-size: clamp(3rem, 15vw, 4.6rem) !important;
    }
}

/* Footer redesign, theme switch, and light theme refinement */
.theme-switch {
    align-items: center;
    background: var(--afn-control-bg);
    border: 1px solid var(--afn-border);
    border-radius: 999px;
    color: var(--afn-text);
    display: inline-flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 44px;
    padding: 5px 12px 5px 5px;
    width: 100%;
}

.theme-switch-track {
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    height: 32px;
    padding: 3px;
    position: relative;
    width: 62px;
}

.theme-switch-track i {
    align-items: center;
    color: var(--afn-muted);
    display: inline-flex;
    font-size: 0.86rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.theme-switch-thumb {
    background: linear-gradient(135deg, var(--afn-cyan), var(--afn-blue));
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(22, 119, 255, 0.28);
    height: 24px;
    left: 4px;
    position: absolute;
    top: 3px;
    transition: transform 180ms ease;
    width: 24px;
}

.theme-switch[aria-pressed="true"] .theme-switch-thumb {
    transform: translateX(29px);
}

.theme-switch-label {
    font-family: var(--afn-display);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.pce-footer {
    background:
        radial-gradient(circle at 16% 0%, rgba(32, 216, 255, 0.14), transparent 22rem),
        linear-gradient(180deg, rgba(5, 12, 28, 0.92), rgba(3, 7, 18, 0.98)) !important;
    border-top: 1px solid var(--afn-border);
    color: var(--afn-text);
    margin-top: 0;
    padding: clamp(28px, 5vw, 54px) 0 24px !important;
}

.atlas-footer-inner {
    display: grid;
    gap: 20px;
}

.atlas-footer-top {
    align-items: center;
    border: 1px solid var(--afn-border);
    border-radius: var(--afn-radius-lg);
    display: flex;
    gap: 22px;
    justify-content: space-between;
    padding: clamp(18px, 3vw, 28px);
}

.atlas-footer-brand {
    align-items: center;
    display: flex;
    gap: 18px;
    min-width: 0;
}

.atlas-footer-brand .brand-wordmark {
    flex: 0 0 auto;
    width: clamp(150px, 18vw, 230px);
}

.atlas-footer-brand p {
    border-left: 1px solid var(--afn-border);
    color: var(--afn-muted);
    line-height: 1.55;
    margin: 0;
    max-width: 520px;
    padding-left: 18px;
}

.atlas-footer-cta {
    align-items: flex-end;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.atlas-footer-cta span,
.atlas-footer-card > span,
.atlas-footer-bottom small:first-child {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atlas-footer-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.atlas-footer-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--afn-border);
    border-radius: var(--afn-radius-md);
    display: grid;
    gap: 9px;
    min-height: 160px;
    padding: 18px;
}

.atlas-footer-card a,
.atlas-footer-card small {
    color: var(--afn-muted);
    font-weight: 700;
    text-decoration: none;
}

.atlas-footer-card a:hover {
    color: var(--afn-cyan);
}

.atlas-footer-status strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 0.9;
    margin: 8px 0 2px;
    text-transform: uppercase;
}

.atlas-footer-bottom {
    align-items: center;
    border-top: 1px solid var(--afn-border);
    color: var(--afn-muted);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-top: 18px;
}

[data-theme="light"] {
    --afn-page-bg: #f3f8ff;
    --afn-page-bg-2: #e8f2ff;
    --afn-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.94));
    --afn-card-bg-soft: rgba(255, 255, 255, 0.82);
    --afn-elevated-bg: rgba(255, 255, 255, 0.92);
    --afn-input-bg: #ffffff;
    --afn-input-bg-focus: #ffffff;
    --afn-control-bg: rgba(255, 255, 255, 0.92);
    --afn-control-text: #07162e;
    --afn-control-muted: #496584;
    --afn-menu-bg: #ffffff;
    --afn-menu-text: #07162e;
    --afn-text: #07162e;
    --afn-text-soft: #173150;
    --afn-muted: #496584;
    --afn-faint: #6a829d;
    --afn-line: rgba(14, 61, 128, 0.16);
    --afn-line-strong: rgba(22, 119, 255, 0.34);
    --afn-shadow: 0 22px 54px rgba(14, 61, 128, 0.13);
    --afn-shadow-soft: 0 14px 34px rgba(14, 61, 128, 0.10);
    --afn-glow: 0 0 0 1px rgba(22, 119, 255, 0.08), 0 18px 42px rgba(22, 119, 255, 0.13);
}

[data-theme="light"] body {
    background:
        radial-gradient(circle at 12% 0%, rgba(22, 119, 255, 0.13), transparent 26rem),
        radial-gradient(circle at 88% 8%, rgba(32, 216, 255, 0.10), transparent 22rem),
        linear-gradient(180deg, #f7fbff 0%, #edf5ff 46%, #f8fbff 100%);
}

[data-theme="light"] .pce-bg::before {
    background:
        radial-gradient(circle at 16% 12%, rgba(22, 119, 255, 0.10), transparent 24rem),
        radial-gradient(circle at 78% 0%, rgba(117, 87, 255, 0.08), transparent 26rem);
}

[data-theme="light"] .pce-bg::after {
    opacity: 0.09;
}

[data-theme="light"] .atlas-sidebar,
[data-theme="light"] .atlas-offcanvas,
[data-theme="light"] .atlas-mobile-nav {
    background:
        radial-gradient(circle at 0% 0%, rgba(22, 119, 255, 0.10), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.97)) !important;
    box-shadow: 18px 0 50px rgba(14, 61, 128, 0.10);
}

[data-theme="light"] .atlas-sidebar-nav .nav-link {
    color: #46627f !important;
}

[data-theme="light"] .atlas-sidebar-nav .nav-link:hover,
[data-theme="light"] .atlas-sidebar-nav .nav-link.active {
    background: rgba(22, 119, 255, 0.08);
    border-color: rgba(22, 119, 255, 0.16);
    color: #07162e !important;
}

[data-theme="light"] .panel-card,
[data-theme="light"] .profile-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .team-card,
[data-theme="light"] .tournament-card,
[data-theme="light"] .player-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .wallet-card,
[data-theme="light"] .empty-premium,
[data-theme="light"] .connect-card,
[data-theme="light"] .landing-command,
[data-theme="light"] .launch-card,
[data-theme="light"] .flow-panel,
[data-theme="light"] .landing-event,
[data-theme="light"] .landing-empty,
[data-theme="light"] .landing-final-card {
    background:
        radial-gradient(circle at 10% 0%, rgba(22, 119, 255, 0.06), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.94)) !important;
    border-color: rgba(14, 61, 128, 0.15) !important;
    box-shadow: 0 18px 44px rgba(14, 61, 128, 0.10) !important;
}

[data-theme="light"] .btn-ghost,
[data-theme="light"] .btn-soft,
[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(14, 61, 128, 0.18) !important;
    color: #173150 !important;
}

[data-theme="light"] .btn-ghost:hover,
[data-theme="light"] .btn-soft:hover,
[data-theme="light"] .btn-secondary:hover {
    background: rgba(22, 119, 255, 0.10) !important;
    color: #07162e !important;
}

[data-theme="light"] .theme-switch {
    background: rgba(255, 255, 255, 0.90);
    border-color: rgba(14, 61, 128, 0.16);
    color: #07162e;
}

[data-theme="light"] .theme-switch-track {
    background: rgba(22, 119, 255, 0.08);
    border-color: rgba(22, 119, 255, 0.14);
}

[data-theme="light"] .pce-footer {
    background:
        radial-gradient(circle at 16% 0%, rgba(22, 119, 255, 0.10), transparent 22rem),
        linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(231, 241, 255, 0.98)) !important;
    box-shadow: 0 -18px 42px rgba(14, 61, 128, 0.08);
}

[data-theme="light"] .atlas-footer-top,
[data-theme="light"] .atlas-footer-card {
    background: rgba(255, 255, 255, 0.64);
    border-color: rgba(14, 61, 128, 0.14);
}

[data-theme="light"] .atlas-footer-card a,
[data-theme="light"] .atlas-footer-card small,
[data-theme="light"] .atlas-footer-brand p,
[data-theme="light"] .atlas-footer-bottom {
    color: #496584;
}

@media (max-width: 900px) {
    .atlas-footer-top,
    .atlas-footer-brand,
    .atlas-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .atlas-footer-cta {
        align-items: stretch;
        justify-items: stretch;
        width: 100%;
    }

    .atlas-footer-grid {
        grid-template-columns: 1fr;
    }

    .atlas-footer-brand p {
        border-left: 0;
        border-top: 1px solid var(--afn-border);
        padding-left: 0;
        padding-top: 14px;
    }
}

/* Dark-only premium finish */
:root,
[data-theme="dark"],
[data-theme="light"] {
    --afn-bg: #030611;
    --afn-bg-soft: #060d1d;
    --afn-page-bg: #030611;
    --afn-page-bg-2: #081126;
    --afn-surface: rgba(7, 17, 39, 0.88);
    --afn-surface-2: rgba(10, 28, 62, 0.88);
    --afn-surface-3: rgba(13, 38, 82, 0.80);
    --afn-card-bg: linear-gradient(180deg, rgba(9, 23, 54, 0.92), rgba(3, 8, 22, 0.96));
    --afn-card-bg-soft: rgba(5, 15, 36, 0.70);
    --afn-elevated-bg: rgba(8, 23, 54, 0.92);
    --afn-input-bg: rgba(3, 12, 30, 0.92);
    --afn-input-bg-focus: rgba(8, 23, 54, 0.98);
    --afn-control-bg: rgba(7, 20, 47, 0.94);
    --afn-control-text: #f7fbff;
    --afn-control-muted: rgba(214, 228, 247, 0.78);
    --afn-menu-bg: #07142d;
    --afn-menu-text: #f7fbff;
    --afn-text: #f7fbff;
    --afn-text-soft: #d9e8fb;
    --afn-muted: rgba(217, 232, 251, 0.74);
    --afn-faint: rgba(217, 232, 251, 0.52);
    --afn-line: rgba(142, 205, 255, 0.17);
    --afn-line-strong: rgba(32, 216, 255, 0.48);
    --afn-cyan: #25ddff;
    --afn-blue: #1677ff;
    --afn-violet: #7c5cff;
    --afn-shadow: 0 28px 70px rgba(0, 5, 20, 0.46);
    --afn-shadow-soft: 0 18px 44px rgba(0, 5, 20, 0.34);
    --afn-glow: 0 0 0 1px rgba(32, 216, 255, 0.10), 0 22px 58px rgba(22, 119, 255, 0.22);
    color-scheme: dark;
}

html,
body,
[data-theme="light"] body {
    background:
        radial-gradient(circle at 18% -8%, rgba(37, 221, 255, 0.22), transparent 28rem),
        radial-gradient(circle at 88% 10%, rgba(124, 92, 255, 0.18), transparent 30rem),
        radial-gradient(circle at 54% 88%, rgba(22, 119, 255, 0.13), transparent 28rem),
        linear-gradient(180deg, #030611 0%, #071226 45%, #030611 100%) !important;
    color: var(--afn-text) !important;
}

.theme-switch,
.theme-control,
[data-theme-toggle],
[data-theme-select] {
    display: none !important;
}

.pce-bg::before,
[data-theme="light"] .pce-bg::before {
    background:
        radial-gradient(circle at 14% 8%, rgba(37, 221, 255, 0.18), transparent 24rem),
        radial-gradient(circle at 84% 4%, rgba(124, 92, 255, 0.16), transparent 28rem),
        linear-gradient(180deg, rgba(3, 6, 17, 0.08), rgba(3, 6, 17, 0.92)) !important;
}

.pce-bg::after,
[data-theme="light"] .pce-bg::after {
    opacity: 0.18 !important;
}

.atlas-sidebar,
.atlas-offcanvas,
.atlas-mobile-nav,
[data-theme="light"] .atlas-sidebar,
[data-theme="light"] .atlas-offcanvas,
[data-theme="light"] .atlas-mobile-nav {
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 221, 255, 0.13), transparent 18rem),
        linear-gradient(180deg, rgba(6, 14, 34, 0.97), rgba(2, 6, 18, 0.985)) !important;
    border-color: rgba(142, 205, 255, 0.16) !important;
    box-shadow: 20px 0 70px rgba(0, 4, 18, 0.42) !important;
}

.atlas-sidebar-brand {
    border-bottom-color: rgba(142, 205, 255, 0.16) !important;
}

.atlas-sidebar-nav .nav-link,
[data-theme="light"] .atlas-sidebar-nav .nav-link {
    color: rgba(217, 232, 251, 0.72) !important;
}

.atlas-sidebar-nav .nav-link:hover,
.atlas-sidebar-nav .nav-link.active,
[data-theme="light"] .atlas-sidebar-nav .nav-link:hover,
[data-theme="light"] .atlas-sidebar-nav .nav-link.active {
    background:
        linear-gradient(90deg, rgba(37, 221, 255, 0.14), rgba(22, 119, 255, 0.08)) !important;
    border-color: rgba(37, 221, 255, 0.28) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 var(--afn-cyan), 0 14px 34px rgba(22, 119, 255, 0.14) !important;
}

.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.wallet-card,
.empty-premium,
.connect-card,
.landing-command,
.launch-card,
.flow-panel,
.landing-event,
.landing-empty,
.landing-final-card,
[data-theme="light"] .panel-card,
[data-theme="light"] .profile-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .team-card,
[data-theme="light"] .tournament-card,
[data-theme="light"] .player-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .wallet-card,
[data-theme="light"] .empty-premium,
[data-theme="light"] .connect-card,
[data-theme="light"] .landing-command,
[data-theme="light"] .launch-card,
[data-theme="light"] .flow-panel,
[data-theme="light"] .landing-event,
[data-theme="light"] .landing-empty,
[data-theme="light"] .landing-final-card {
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 221, 255, 0.08), transparent 19rem),
        linear-gradient(180deg, rgba(10, 27, 63, 0.92), rgba(3, 8, 22, 0.965)) !important;
    border-color: rgba(142, 205, 255, 0.16) !important;
    box-shadow: 0 24px 64px rgba(0, 5, 20, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    color: var(--afn-text) !important;
}

.panel-card:hover,
.team-card:hover,
.tournament-card:hover,
.player-card:hover,
.stat-card:hover,
.launch-card:hover,
.landing-command:hover,
.landing-event:hover {
    border-color: rgba(37, 221, 255, 0.34) !important;
    box-shadow: 0 28px 76px rgba(0, 5, 20, 0.44), 0 0 0 1px rgba(37, 221, 255, 0.08) !important;
}

.btn-pce,
a.btn-pce,
button.btn-pce {
    background:
        linear-gradient(180deg, #39e4ff 0%, #1677ff 56%, #0c48bf 100%) !important;
    border-color: rgba(142, 231, 255, 0.66) !important;
    box-shadow: 0 16px 38px rgba(22, 119, 255, 0.32), 0 0 0 1px rgba(37, 221, 255, 0.12) !important;
    color: #ffffff !important;
}

.btn-pce:hover,
.btn-pce:focus-visible {
    box-shadow: 0 22px 52px rgba(37, 221, 255, 0.26), 0 0 0 5px rgba(37, 221, 255, 0.08) !important;
}

.btn-ghost,
.btn-soft,
.btn-secondary,
[data-theme="light"] .btn-ghost,
[data-theme="light"] .btn-soft,
[data-theme="light"] .btn-secondary {
    background: rgba(7, 20, 47, 0.82) !important;
    border-color: rgba(142, 205, 255, 0.20) !important;
    color: var(--afn-text-soft) !important;
}

.btn-ghost:hover,
.btn-soft:hover,
.btn-secondary:hover {
    background: rgba(22, 119, 255, 0.18) !important;
    border-color: rgba(37, 221, 255, 0.42) !important;
    color: #ffffff !important;
}

.pce-footer,
[data-theme="light"] .pce-footer {
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 221, 255, 0.13), transparent 24rem),
        radial-gradient(circle at 82% 20%, rgba(124, 92, 255, 0.11), transparent 25rem),
        linear-gradient(180deg, rgba(4, 10, 25, 0.94), rgba(2, 5, 15, 0.99)) !important;
    border-top-color: rgba(142, 205, 255, 0.16) !important;
    color: var(--afn-text) !important;
}

.atlas-footer-top,
.atlas-footer-card,
[data-theme="light"] .atlas-footer-top,
[data-theme="light"] .atlas-footer-card {
    background: rgba(8, 22, 50, 0.64) !important;
    border-color: rgba(142, 205, 255, 0.16) !important;
}

.atlas-footer-card a,
.atlas-footer-card small,
.atlas-footer-brand p,
.atlas-footer-bottom,
[data-theme="light"] .atlas-footer-card a,
[data-theme="light"] .atlas-footer-card small,
[data-theme="light"] .atlas-footer-brand p,
[data-theme="light"] .atlas-footer-bottom {
    color: var(--afn-muted) !important;
}

/* Toast notifications */
.atlas-toast-stack {
    bottom: 18px;
    display: grid;
    gap: 12px;
    max-width: min(420px, calc(100vw - 28px));
    pointer-events: none;
    position: fixed;
    right: 18px;
    width: 420px;
    z-index: 220;
}

.atlas-toast {
    align-items: center;
    animation: toastIn 260ms ease both;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 221, 255, 0.12), transparent 14rem),
        linear-gradient(180deg, rgba(10, 27, 63, 0.96), rgba(3, 8, 22, 0.98));
    border: 1px solid rgba(142, 205, 255, 0.18);
    border-left: 3px solid var(--afn-cyan);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 5, 20, 0.44), 0 0 0 1px rgba(37, 221, 255, 0.05);
    color: var(--afn-text);
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 74px;
    overflow: hidden;
    padding: 14px;
    pointer-events: auto;
}

.atlas-toast.is-leaving {
    animation: toastOut 180ms ease both;
}

.atlas-toast-success {
    border-left-color: var(--afn-green);
}

.atlas-toast-error {
    border-left-color: var(--afn-red);
}

.atlas-toast-warning {
    border-left-color: var(--afn-yellow);
}

.atlas-toast-icon {
    align-items: center;
    background: rgba(37, 221, 255, 0.10);
    border: 1px solid rgba(37, 221, 255, 0.16);
    border-radius: 12px;
    color: var(--afn-cyan);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.atlas-toast-success .atlas-toast-icon {
    color: var(--afn-green);
}

.atlas-toast-error .atlas-toast-icon {
    color: var(--afn-red);
}

.atlas-toast-warning .atlas-toast-icon {
    color: var(--afn-yellow);
}

.atlas-toast-body {
    min-width: 0;
}

.atlas-toast-body span {
    color: var(--afn-cyan);
    display: block;
    font-family: var(--afn-display);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.atlas-toast-body p {
    color: var(--afn-text-soft);
    font-size: 0.92rem;
    line-height: 1.35;
    margin: 0;
}

.atlas-toast-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--afn-muted);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.atlas-toast-close:hover {
    color: var(--afn-text);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate3d(18px, 8px, 0) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate3d(18px, 8px, 0) scale(0.98);
    }
}

@media (min-width: 992px) {
    .atlas-toast-stack {
        bottom: 18px;
        left: auto;
        right: 18px;
    }
}

@media (max-width: 760px) {
    .atlas-toast-stack {
        bottom: 12px;
        left: auto;
        max-width: none;
        right: 12px;
        width: auto;
    }

    .atlas-toast {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atlas-toast,
    .atlas-toast.is-leaving {
        animation: none;
    }
}
.tournament-banner,
.tournament-detail-banner {
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 213, 255, 0.18);
    background: rgba(6, 16, 36, 0.76);
}

.tournament-banner {
    margin: -2px -2px 18px;
    border-radius: 18px;
    aspect-ratio: 16 / 7;
}

.tournament-banner img,
.tournament-detail-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tournament-banner::after,
.tournament-detail-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, transparent 45%, rgba(3, 9, 22, 0.54)),
        radial-gradient(circle at 20% 0%, rgba(66, 217, 255, 0.2), transparent 36%);
}

.tournament-detail-banner {
    margin: 0 0 24px;
    border-radius: 24px;
    aspect-ratio: 21 / 7;
    box-shadow: 0 26px 70px rgba(0, 5, 20, 0.36);
}

@media (max-width: 768px) {
    .tournament-detail-banner {
        border-radius: 18px;
        aspect-ratio: 16 / 8;
    }
}

/* Header control polish */
.atlas-mobile-nav {
    min-height: 66px;
}

.atlas-mobile-brand {
    min-width: 0;
}

.atlas-mobile-brand .brand-wordmark {
    display: block;
    max-width: min(46vw, 154px);
}

.atlas-menu-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    border-color: rgba(37, 221, 255, 0.24) !important;
    background:
        linear-gradient(180deg, rgba(37, 221, 255, 0.12), rgba(22, 119, 255, 0.08)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 8, 26, 0.24) !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

.atlas-menu-button i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 1.32rem;
    line-height: 1;
}

.atlas-menu-button:hover,
.atlas-menu-button:focus-visible {
    border-color: rgba(37, 221, 255, 0.42) !important;
    background:
        linear-gradient(180deg, rgba(37, 221, 255, 0.18), rgba(22, 119, 255, 0.12)) !important;
    color: #ffffff !important;
    outline: 0 !important;
    transform: translateY(-1px);
}

.atlas-sidebar-bottom .btn,
.atlas-offcanvas .atlas-sidebar-bottom .btn {
    justify-content: center;
    min-height: 40px;
    width: 100%;
}

@media (max-width: 430px) {
    .atlas-mobile-nav {
        padding-inline: 12px;
    }

    .atlas-mobile-brand .brand-wordmark {
        max-width: 132px;
    }
}

/* Minimal home page rebuild */
.atlas-home-minimal {
    padding-bottom: clamp(28px, 5vw, 52px) !important;
}

.atlas-home-minimal .landing-hero-grid {
    align-items: center;
    gap: clamp(22px, 4vw, 56px);
}

.atlas-home-minimal .landing-hero-copy {
    max-width: 720px;
}

.atlas-home-minimal .landing-hero-copy h1 {
    max-width: 680px;
}

.atlas-home-minimal .landing-hero-copy > p {
    max-width: 620px;
}

.home-intent-panel {
    align-self: center;
    min-height: 0;
    padding: clamp(18px, 2vw, 24px);
}

.home-intent-list {
    display: grid;
    gap: 10px;
}

.home-intent-list > div {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 14px;
    color: var(--afn-text);
    display: flex;
    gap: 12px;
    min-height: 48px;
    padding: 11px 12px;
}

.home-intent-list i {
    align-items: center;
    background: rgba(37, 221, 255, 0.10);
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 12px;
    color: var(--afn-cyan);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
}

.home-intent-list span {
    font-family: var(--afn-display);
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.atlas-home-guide,
.atlas-home-event {
    padding-block: clamp(18px, 4vw, 42px) !important;
}

.atlas-home-guide .flow-panel,
.atlas-home-event .landing-split {
    gap: clamp(18px, 3vw, 34px);
}

.atlas-home-guide .flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.atlas-home-event .landing-section-head {
    max-width: 520px;
}

.atlas-home-event .landing-empty {
    min-height: 260px;
}

@media (max-width: 991.98px) {
    .atlas-home-minimal {
        padding-top: 92px !important;
    }

    .atlas-home-guide .flow-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .atlas-home-minimal .landing-hero-copy {
        text-align: left;
    }

    .home-intent-list > div {
        min-height: 44px;
    }
}

/* Tournament registration pills */
.player-card .panel-head h2::before {
    content: none !important;
    display: none !important;
}

.registered-teams-card {
    margin-top: 18px;
}

.team-pill-grid,
.team-pill-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.team-pill-grid {
    margin-top: 16px;
}

.team-pill-strip {
    margin-top: 16px;
}

.team-pill {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(37, 221, 255, 0.10), rgba(22, 119, 255, 0.07));
    border: 1px solid rgba(142, 205, 255, 0.16);
    border-radius: 999px;
    color: var(--afn-text) !important;
    display: inline-flex;
    gap: 8px;
    max-width: 100%;
    min-height: 38px;
    padding: 7px 12px;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.team-pill:hover,
.team-pill:focus-visible {
    background:
        linear-gradient(135deg, rgba(37, 221, 255, 0.16), rgba(22, 119, 255, 0.11));
    border-color: rgba(37, 221, 255, 0.34);
    color: #ffffff !important;
    outline: 0;
    transform: translateY(-1px);
}

.team-pill i {
    color: var(--afn-cyan);
    flex: 0 0 auto;
    font-size: 0.9rem;
}

.team-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-pill small {
    border-left: 1px solid rgba(142, 205, 255, 0.16);
    color: var(--afn-muted);
    font-family: var(--afn-display);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding-left: 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.team-pill.mini {
    font-family: var(--afn-display);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    min-height: 32px;
    padding: 6px 10px;
    text-transform: uppercase;
}

.team-pill.status-confirmed,
.team-pill.status-verified,
.team-pill.status-paid {
    border-color: rgba(51, 214, 159, 0.24);
    background:
        linear-gradient(135deg, rgba(51, 214, 159, 0.11), rgba(37, 221, 255, 0.07));
}

.team-pill.status-pending,
.team-pill.status-payment_pending {
    border-color: rgba(255, 191, 77, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 191, 77, 0.10), rgba(37, 221, 255, 0.06));
}

.team-pill-static,
.team-pill-static:hover,
.team-pill-static:focus-visible {
    cursor: default;
    text-decoration: none;
    transform: none;
}

.compact-side-card,
.tournament-timeline-card {
    margin-top: 18px;
}

.scoring-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.scoring-summary > div,
.scoring-rule,
.timeline-step {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 14px;
}

.scoring-summary > div {
    display: grid;
    gap: 4px;
    min-height: 74px;
    padding: 14px;
}

.scoring-summary span,
.scoring-rule span,
.timeline-step span,
.timeline-step p {
    color: var(--afn-muted);
}

.scoring-summary strong,
.scoring-rule strong,
.timeline-step strong {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.scoring-rule-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
}

.scoring-rule {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 12px;
}

.scoring-rule strong {
    color: var(--afn-cyan);
    white-space: nowrap;
}

.scoring-rule.victory-rule {
    border-color: rgba(255, 209, 102, 0.28);
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.10), rgba(37, 221, 255, 0.045));
}

.scoring-rule.victory-rule strong {
    color: var(--afn-yellow);
}

.scoring-rule.muted-rule {
    opacity: 0.78;
}

.scoring-rule.muted-rule strong {
    color: var(--afn-muted);
}

.event-timeline {
    display: grid;
    gap: 12px;
}

.timeline-step {
    align-items: flex-start;
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr;
    padding: 15px;
}

.timeline-step b {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(37, 221, 255, 0.16), rgba(22, 119, 255, 0.10));
    border: 1px solid rgba(37, 221, 255, 0.26);
    border-radius: 13px;
    color: var(--afn-cyan);
    display: inline-flex;
    font-family: var(--afn-display);
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 44px;
}

.timeline-step span,
.timeline-step p {
    display: block;
    line-height: 1.5;
    margin: 4px 0 0;
}

.event-timeline-graphic {
    display: grid;
    gap: 16px;
}

.pipeline-wrapper {
    position: relative;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.horizontal-pipeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    min-width: 600px;
    gap: 16px;
    padding-top: 24px;
    margin-bottom: 24px;
}

.pipeline-line-bg {
    position: absolute;
    top: 44px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(142, 205, 255, 0.12);
    border-radius: 4px;
    z-index: 0;
}

.pipeline-line-progress {
    position: absolute;
    top: 44px;
    left: 10%;
    height: 3px;
    background: linear-gradient(90deg, var(--afn-cyan), var(--afn-violet));
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(32, 216, 255, 0.5);
    z-index: 1;
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.pipeline-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 0 8px;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.pipeline-node:hover {
    transform: translateY(-4px);
}

.pipeline-node .node-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    background: rgba(4, 8, 18, 0.95);
    border: 1px solid rgba(32, 216, 255, 0.3);
    border-radius: 20px;
    box-shadow: inset 0 0 12px rgba(32, 216, 255, 0.1), 0 8px 24px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
}

.pipeline-node.is-final .node-marker {
    border-color: rgba(255, 209, 102, 0.5);
    box-shadow: inset 0 0 12px rgba(255, 209, 102, 0.15), 0 8px 24px rgba(0,0,0,0.4);
}

.pipeline-node .node-marker b {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-weight: 900;
    font-size: 1.1rem;
    margin-top: 2px;
}

.pipeline-node .node-marker i {
    color: var(--afn-text-soft);
    font-size: 1.1rem;
}

.pipeline-node.is-final .node-marker b,
.pipeline-node.is-final .node-marker i {
    color: var(--afn-yellow);
}

.pipeline-node .node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pipeline-node .node-content strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.pipeline-node .node-content p {
    color: var(--afn-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.timeline-advance-note {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-advance-note span {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 14px;
    color: var(--afn-text-soft);
    display: inline-flex;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
}

.timeline-advance-note i {
    color: var(--afn-cyan);
}

.compact-side-card .panel-head {
    align-items: flex-start;
}

.compact-side-card .panel-head h2 {
    font-size: clamp(1.28rem, 1.8vw, 1.55rem);
}

.compact-side-card .scoring-summary {
    grid-template-columns: 1fr;
}

.compact-side-card .scoring-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-pill-grid.compact {
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

@media (max-width: 620px) {
    .scoring-summary {
        grid-template-columns: 1fr;
    }

    .timeline-step {
        grid-template-columns: 1fr;
    }

    .timeline-advance-note {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) and (min-width: 621px) {
    .timeline-advance-note {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .team-pill-grid,
    .team-pill-strip {
        display: grid;
        grid-template-columns: 1fr;
    }

    .team-pill {
        border-radius: 14px;
        justify-content: flex-start;
        width: 100%;
    }
}

/* Brand alignment polish */
.atlas-sidebar-brand {
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 6px 20px !important;
    text-align: center !important;
    width: 100% !important;
}

.atlas-sidebar-brand .brand-wordmark {
    display: block !important;
    margin-inline: auto !important;
    max-height: none !important;
    width: min(252px, 100%) !important;
}

.atlas-sidebar-brand span {
    color: rgba(218, 232, 250, 0.76) !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.12em !important;
    line-height: 1.1 !important;
    text-align: center !important;
}

.atlas-footer-top {
    align-items: center !important;
}

.atlas-footer-brand {
    align-items: center !important;
    display: grid !important;
    gap: 12px !important;
    justify-items: center !important;
    text-align: center !important;
}

.atlas-footer-brand .brand-wordmark {
    display: block !important;
    margin-inline: auto !important;
    width: clamp(250px, 34vw, 430px) !important;
}

.brand-logo-full {
    filter: drop-shadow(0 18px 34px rgba(0, 8, 28, 0.32)) !important;
}

.atlas-mobile-brand .brand-logo-full {
    max-width: min(54vw, 210px) !important;
    width: min(54vw, 210px) !important;
}

@media (max-width: 430px) {
    .atlas-mobile-brand .brand-logo-full {
        max-width: 176px !important;
        width: 176px !important;
    }
}

.atlas-footer-brand p,
[data-theme="light"] .atlas-footer-brand p {
    border-left: 0 !important;
    border-top: 1px solid rgba(142, 205, 255, 0.16) !important;
    color: rgba(218, 232, 250, 0.76) !important;
    margin: 0 !important;
    max-width: 470px !important;
    padding-left: 0 !important;
    padding-top: 12px !important;
}

.atlas-footer-cta {
    text-align: center;
}

@media (max-width: 900px) {
    .atlas-footer-top {
        align-items: center !important;
        text-align: center !important;
    }

    .atlas-footer-brand {
        width: 100% !important;
    }
}

/* Product UX polish pass */
.setup-command {
    margin: 18px 0;
}

.setup-command .panel-head p {
    color: var(--afn-muted);
    margin: 4px 0 0;
}

.setup-step-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.setup-step {
    align-items: start;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 16px;
    color: var(--afn-text) !important;
    display: grid;
    gap: 10px;
    min-height: 164px;
    padding: 14px;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.setup-step:hover,
.setup-step:focus-visible {
    background: rgba(37, 221, 255, 0.08);
    border-color: rgba(37, 221, 255, 0.28);
    outline: 0;
    transform: translateY(-2px);
}

.setup-step > i {
    align-items: center;
    background: rgba(37, 221, 255, 0.10);
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 13px;
    color: var(--afn-cyan);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.setup-step strong,
.requirements-checklist span {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.setup-step span {
    color: var(--afn-muted);
    display: block;
    font-size: 0.92rem;
    line-height: 1.45;
    margin-top: 4px;
}

.setup-step b,
.setup-step em {
    align-self: end;
    border-radius: 999px;
    color: var(--afn-cyan);
    font-style: normal;
    font-weight: 900;
}

.setup-step.is-complete {
    border-color: rgba(51, 214, 159, 0.26);
    background: rgba(51, 214, 159, 0.055);
}

.setup-step.is-complete b {
    color: var(--afn-success, #33d69f);
}

.requirements-checklist {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.requirements-checklist > div {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 14px;
    display: flex;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
}

.requirements-checklist i {
    color: var(--afn-muted);
}

.requirements-checklist .is-complete {
    border-color: rgba(51, 214, 159, 0.24);
    background: rgba(51, 214, 159, 0.06);
}

.requirements-checklist .is-complete i {
    color: var(--afn-success, #33d69f);
}

.profile-readiness-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(142, 205, 255, 0.14);
    border-radius: 18px;
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 16px;
}

.profile-readiness-card span,
.field-help,
.directory-filter-row small {
    color: var(--afn-muted);
}

.profile-readiness-card strong {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
}

.field-help {
    display: block;
    font-size: 0.82rem;
    margin-top: 6px;
}

.directory-filter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -8px 0 22px;
}

.directory-filter-row span,
.directory-filter-row small {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 999px;
    display: inline-flex;
    gap: 7px;
    min-height: 32px;
    padding: 6px 10px;
}

.directory-filter-row i {
    color: var(--afn-cyan);
}

@media (max-width: 1180px) {
    .setup-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .setup-step-grid,
    .requirements-checklist {
        grid-template-columns: 1fr;
    }

    .setup-step {
        min-height: 0;
    }

    .directory-filter-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Production UX QA hardening */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.pce-bg,
.pce-bg *,
.panel-card::before,
.panel-card::after,
.team-card::before,
.team-card::after,
.tournament-card::before,
.tournament-card::after,
.player-card::before,
.player-card::after,
.empty-premium::before,
.empty-premium::after {
    pointer-events: none !important;
}

.page-shell,
.app-page,
.form-page,
.auth-page,
.page-title,
.app-hero,
.credits-hero,
.panel-card,
.profile-card,
.stat-card,
.team-card,
.tournament-card,
.player-card,
.auth-card,
.empty-premium,
.event-row,
.ledger-row {
    min-width: 0;
    position: relative;
}

.btn,
a.btn,
button.btn,
.br-action,
.atlas-menu-button {
    align-items: center !important;
    display: inline-flex !important;
    gap: 8px !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    min-width: 0;
    text-align: center !important;
    white-space: normal;
}

.btn i,
.br-action i,
.atlas-menu-button i {
    flex: 0 0 auto;
    line-height: 1;
}

.btn:disabled,
.btn.disabled,
button:disabled {
    cursor: not-allowed;
    filter: saturate(0.82);
}

.setup-step-grid {
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
}

.setup-step {
    grid-template-rows: auto 1fr auto;
}

.setup-step b {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.panel-head {
    align-items: center;
}

.panel-head > div {
    min-width: 0;
}

.panel-head a,
.panel-head .status-badge {
    flex: 0 0 auto;
}

.empty-premium,
.empty-inline,
.action-empty {
    align-items: center;
    justify-items: center;
    text-align: center;
}

.empty-inline {
    display: grid;
    gap: 10px;
    min-height: 134px;
    padding: 18px;
}

.empty-inline p {
    color: var(--afn-muted);
    margin: 0;
}

.errorlist {
    background: rgba(255, 77, 109, 0.09);
    border: 1px solid rgba(255, 77, 109, 0.24);
    border-radius: 12px;
    color: #ffd9df !important;
    display: grid;
    gap: 4px;
    list-style: none;
    margin: 8px 0 0 !important;
    padding: 9px 11px !important;
}

.errorlist li {
    line-height: 1.35;
    margin: 0;
}

.pce-alert,
.pce-alert-error {
    align-items: flex-start;
    border-radius: 14px;
    display: flex;
    gap: 10px;
    line-height: 1.45;
}

.pce-alert-error {
    background: rgba(255, 77, 109, 0.10);
    border: 1px solid rgba(255, 77, 109, 0.25);
    color: #ffd9df;
}

.form-control,
.form-select,
input,
select,
textarea {
    color-scheme: dark;
}

select option,
select optgroup {
    background: var(--afn-menu-bg, #08162f);
    color: var(--afn-menu-text, #f6f9ff);
}

.input-wrap {
    align-items: center;
    display: flex;
    min-width: 0;
}

.input-wrap .form-control,
.input-wrap .form-select,
.input-wrap input,
.input-wrap select {
    min-width: 0;
}

.directory-toolbar {
    min-width: 0;
}

.directory-toolbar input {
    min-width: 0;
}

.team-pill-grid,
.team-pill-strip {
    max-width: 100%;
}

.team-pill,
.status-badge {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.1;
    min-width: 0;
}

.event-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.event-row > div {
    min-width: 0;
}

.event-row strong,
.event-row span {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    body {
        overflow-x: hidden;
    }

    .page-title,
    .app-hero,
    .credits-hero,
    .panel-head,
    .event-row,
    .ledger-row {
        align-items: stretch;
        flex-direction: column;
    }

    .invite-actions {
        justify-content: stretch;
        width: 100%;
    }

    .invite-actions form,
    .invite-actions .btn {
        width: 100%;
    }

    .page-title .btn,
    .app-hero .btn,
    .credits-actions .btn,
    .hero-actions .btn,
    .event-row .btn,
    .panel-head a {
        width: 100%;
    }

    .directory-toolbar {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .empty-inline .d-flex {
        width: 100%;
    }

    .empty-inline .btn {
        flex: 1 1 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Sidebar active state: no underline */
.atlas-sidebar-nav .nav-link::after,
.atlas-sidebar-nav .nav-link.active::after,
.atlas-offcanvas .nav-link::after,
.atlas-offcanvas .nav-link.active::after {
    content: none !important;
    display: none !important;
}

/* Auth onboarding polish */
.auth-flow-layout {
    align-items: start;
}

.auth-pipeline {
    border: 1px solid rgba(142, 205, 255, 0.14);
    border-radius: 18px;
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding: 12px;
}

.auth-pipeline article {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    padding: 13px;
}

.auth-pipeline b {
    align-items: center;
    background: rgba(37, 221, 255, 0.10);
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 12px;
    color: var(--afn-cyan);
    display: inline-flex;
    flex: 0 0 36px;
    font-family: var(--afn-display);
    font-size: 0.86rem;
    font-weight: 900;
    height: 36px;
    justify-content: center;
}

.auth-pipeline strong {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-display);
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1.1;
    text-transform: uppercase;
}

.auth-pipeline span {
    color: var(--afn-muted);
    display: block;
    line-height: 1.45;
    margin-top: 4px;
}

.auth-pipeline.compact {
    margin-top: 18px;
}

.signup-card .form-section:first-of-type {
    margin-top: 0;
}

@media (max-width: 991px) {
    .auth-pipeline {
        margin-bottom: 6px;
    }
}

@media (max-width: 520px) {
    .auth-pipeline article {
        padding: 11px;
    }
}

/* AtlasFN local PR leaderboard */
.leaderboard-page .container {
    max-width: 1180px;
}

.leaderboard-hero {
    align-items: center;
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 221, 255, 0.14), transparent 20rem),
        linear-gradient(180deg, rgba(10, 27, 63, 0.92), rgba(3, 8, 22, 0.97)) !important;
    border-color: rgba(37, 221, 255, 0.20) !important;
}

.leaderboard-hero h1 {
    max-width: 720px;
}

.leaderboard-hero p {
    max-width: 700px;
}

.leaderboard-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.leaderboard-summary article {
    background:
        linear-gradient(180deg, rgba(11, 28, 64, 0.78), rgba(5, 13, 30, 0.88));
    border: 1px solid rgba(142, 205, 255, 0.14);
    border-radius: 15px;
    display: grid;
    gap: 5px;
    min-height: 104px;
    padding: 16px 18px;
}

.leaderboard-summary span,
.leaderboard-player small {
    color: var(--afn-muted);
}

.leaderboard-summary strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    font-weight: 600;
    line-height: 0.95;
    text-transform: uppercase;
}

.leaderboard-card {
    overflow: hidden !important;
    padding: 0 !important;
}

.leaderboard-table-wrap {
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 221, 255, 0.08), transparent 22rem),
        rgba(2, 9, 22, 0.36);
    overflow-x: auto;
    scrollbar-width: thin;
}

.leaderboard-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.leaderboard-table th,
.leaderboard-table td {
    border-bottom: 1px solid rgba(142, 205, 255, 0.10);
    padding: 14px 16px;
    vertical-align: middle;
}

.leaderboard-table th {
    background: rgba(255, 255, 255, 0.025);
    color: var(--afn-muted);
    font-family: var(--afn-display);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.leaderboard-table td {
    color: var(--afn-text-soft);
    height: 76px;
}

.atlas-leaderboard-table tbody td {
    vertical-align: middle;
}

.atlas-leaderboard-table .rank-cell,
.atlas-leaderboard-table .value-cell {
    line-height: 1;
}

.leaderboard-table tbody tr:hover {
    background: rgba(37, 221, 255, 0.045);
}

.leaderboard-player {
    align-items: center;
    display: flex;
    gap: 13px;
    min-width: 0;
}

.leaderboard-player > div:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.leaderboard-player strong,
.atlas-points {
    color: var(--afn-text);
}

.leaderboard-player strong,
.rank-chip,
.atlas-points {
    font-family: var(--afn-display);
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.profile-avatar-xs {
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
}

.leaderboard-player .profile-avatar-xs {
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 8, 28, 0.22);
    flex: 0 0 42px;
    height: 42px;
    margin: 0;
    max-width: none;
    min-height: 42px;
    min-width: 42px;
    width: 42px;
}

.leaderboard-player .profile-avatar-xs span {
    font-size: 1.15rem;
    line-height: 1;
}

.leaderboard-player .profile-avatar-xs img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.rank-chip {
    align-items: center;
    background: rgba(37, 221, 255, 0.10);
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 12px;
    color: var(--afn-cyan);
    display: inline-flex;
    justify-content: center;
    min-height: 36px;
    min-width: 58px;
    padding: 0 10px;
}

.atlas-points {
    color: var(--afn-cyan);
    font-size: 1.25rem;
}

.leaderboard-pagination {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto 1fr;
    padding: 16px;
}

.leaderboard-pagination a:last-child {
    justify-self: end;
}

.atlas-leaderboard-table {
    min-width: 760px;
}

.atlas-leaderboard-table .rank-col,
.atlas-leaderboard-table .rank-cell {
    padding-left: 22px;
    width: 96px;
}

.atlas-leaderboard-table .player-col {
    width: auto;
}

.atlas-leaderboard-table .value-col,
.atlas-leaderboard-table .value-cell {
    padding-right: 22px;
    text-align: right;
    white-space: nowrap;
    width: 190px;
}

.leaderboard-player small {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    line-height: 1.1;
    margin-top: 3px;
    min-width: 0;
}

.leaderboard-player strong,
.leaderboard-player small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-player small i {
    color: var(--afn-cyan);
}

.earnings-chip {
    align-items: center;
    background: rgba(255, 200, 87, 0.10);
    border: 1px solid rgba(255, 200, 87, 0.22);
    border-radius: 999px;
    color: #ffe4a3;
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.94rem;
    font-weight: 900;
    justify-content: center;
    min-height: 36px;
    min-width: 92px;
    padding: 6px 12px;
}

.atlas-leaderboard-table .atlas-points {
    align-items: center;
    background: linear-gradient(180deg, rgba(57, 228, 255, 0.18), rgba(22, 119, 255, 0.12));
    border: 1px solid rgba(37, 221, 255, 0.28);
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.1rem;
    justify-content: center;
    min-height: 38px;
    min-width: 88px;
    padding: 6px 13px;
}

.page-number-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.page-number-strip a,
.page-number-strip span {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(142, 205, 255, 0.13);
    border-radius: 10px;
    color: var(--afn-text-soft);
    display: inline-flex;
    font-family: var(--afn-display);
    font-weight: 900;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 9px;
    text-decoration: none;
}

.page-number-strip a:hover,
.page-number-strip .is-current {
    background: rgba(37, 221, 255, 0.12);
    border-color: rgba(37, 221, 255, 0.28);
    color: var(--afn-cyan);
}

@media (max-width: 768px) {
    .leaderboard-summary,
    .leaderboard-pagination {
        grid-template-columns: 1fr;
    }

    .leaderboard-summary article {
        min-height: 88px;
    }

    .leaderboard-pagination a,
    .leaderboard-pagination a:last-child {
        justify-self: stretch;
        width: 100%;
    }

    .leaderboard-table {
        min-width: 680px;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 12px;
    }

    .leaderboard-table td {
        height: 68px;
    }

    .leaderboard-player .profile-avatar-xs {
        flex-basis: 38px;
        height: 38px;
        min-height: 38px;
        min-width: 38px;
        width: 38px;
    }

    .leaderboard-player .profile-avatar-xs span {
        font-size: 1rem;
    }

    .atlas-leaderboard-table .rank-col,
    .atlas-leaderboard-table .rank-cell {
        padding-left: 14px;
        width: 78px;
    }

    .atlas-leaderboard-table .value-col,
    .atlas-leaderboard-table .value-cell {
        padding-right: 14px;
        width: 150px;
    }
}

/* Compact logo and footer final pass */
.atlas-sidebar {
    gap: 16px !important;
    padding-top: 14px !important;
}

.atlas-sidebar-brand {
    padding: 0 4px 12px !important;
}

.atlas-sidebar-brand .brand-wordmark {
    width: min(196px, 100%) !important;
}

.atlas-mobile-nav {
    min-height: 68px !important;
    padding-block: 8px !important;
}

.atlas-mobile-brand .brand-logo-full {
    max-width: min(46vw, 166px) !important;
    width: min(46vw, 166px) !important;
}

.pce-footer {
    padding: 30px 0 18px !important;
}

.atlas-footer-inner {
    gap: 16px !important;
}

.atlas-footer-grid {
    margin-top: 0 !important;
}

.atlas-footer-brandline {
    align-items: center !important;
    display: grid !important;
    gap: 14px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(142, 205, 255, 0.16) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 221, 255, 0.12), transparent 16rem),
        linear-gradient(135deg, rgba(8, 22, 50, 0.78), rgba(4, 10, 25, 0.92)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 44px rgba(0, 7, 28, 0.20) !important;
}

.atlas-footer-brandline > div {
    display: grid !important;
    gap: 2px !important;
}

.atlas-footer-brandline strong {
    color: var(--afn-text) !important;
    font-family: var(--afn-display) !important;
    font-size: clamp(1.9rem, 4vw, 3.15rem) !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em !important;
    line-height: 0.9 !important;
    text-transform: uppercase !important;
}

.atlas-footer-brandline span {
    color: var(--afn-cyan) !important;
    font-family: var(--afn-display) !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.atlas-footer-brandline p {
    justify-self: end !important;
    margin: 0 !important;
    max-width: 360px !important;
    color: var(--afn-text-soft) !important;
    font-family: var(--afn-display) !important;
    font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    text-align: right !important;
}

.atlas-footer-card {
    border-radius: 16px !important;
    min-height: 170px !important;
    padding: 18px !important;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease !important;
}

.atlas-footer-card:hover {
    border-color: rgba(37, 221, 255, 0.26) !important;
    box-shadow: 0 16px 38px rgba(0, 7, 28, 0.22) !important;
    transform: translateY(-2px) !important;
}

.atlas-footer-card a {
    align-items: center !important;
    display: inline-flex !important;
    gap: 8px !important;
    width: fit-content !important;
}

.atlas-footer-card a:hover {
    color: var(--afn-cyan) !important;
}

.atlas-footer-status {
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 221, 255, 0.13), transparent 15rem),
        linear-gradient(180deg, rgba(10, 28, 62, 0.78), rgba(5, 14, 35, 0.88)) !important;
}

.atlas-footer-discord {
    align-items: center !important;
    align-self: start !important;
    display: inline-flex !important;
    justify-content: center !important;
    min-height: 38px !important;
    margin-top: 4px !important;
    padding: 0 13px !important;
    border: 1px solid rgba(37, 221, 255, 0.28) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(37, 221, 255, 0.18), rgba(37, 109, 255, 0.22)) !important;
    font-family: var(--afn-display) !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.atlas-footer-bottom {
    align-items: center !important;
    border-top: 1px solid rgba(142, 205, 255, 0.13) !important;
    display: flex !important;
    gap: 18px !important;
    justify-content: space-between !important;
    margin-top: 2px !important;
    padding: 16px 2px 0 !important;
}

.atlas-footer-bottom small {
    color: var(--afn-muted) !important;
    font-size: 0.76rem !important;
    line-height: 1.4 !important;
}

.atlas-footer-signature {
    align-items: center !important;
    display: inline-flex !important;
    gap: 9px !important;
    font-family: var(--afn-display) !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.atlas-footer-signature::before {
    background: var(--afn-cyan) !important;
    border-radius: 50% !important;
    box-shadow: 0 0 12px rgba(37, 221, 255, 0.55) !important;
    content: "" !important;
    height: 6px !important;
    width: 6px !important;
}

.atlas-footer-signature span {
    color: var(--afn-text-soft) !important;
    font-family: var(--afn-body) !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.atlas-footer-copyright {
    color: var(--afn-text-soft) !important;
    margin-left: auto !important;
    text-align: right !important;
}

@media (max-width: 430px) {
    .atlas-mobile-brand .brand-logo-full {
        max-width: 142px !important;
        width: 142px !important;
    }
}

@media (max-width: 760px) {
    .atlas-footer-brandline {
        grid-template-columns: 1fr !important;
    }

    .atlas-footer-brandline p {
        justify-self: start !important;
        text-align: left !important;
    }

    .atlas-footer-card {
        min-height: 0 !important;
    }

    .atlas-footer-bottom {
        align-items: flex-start !important;
        display: grid !important;
        gap: 7px !important;
        grid-template-columns: 1fr !important;
    }

    .atlas-footer-copyright {
        margin-left: 0 !important;
        text-align: left !important;
    }
}

/* Profile page premium neon pass */
.profile-settings-layout {
    align-items: start;
}

.profile-settings-aside,
.profile-settings-main {
    display: grid;
    gap: 18px;
}

.profile-page-intro {
    display: grid;
    gap: 12px;
}

.profile-page-intro .pce-badge {
    justify-self: start;
    margin: 0 !important;
}

.profile-page-intro .auth-title {
    margin: 0;
    text-shadow: 0 0 34px rgba(37, 221, 255, 0.13);
}

.profile-page-intro .auth-copy {
    max-width: 34rem;
}

.neon-card {
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

.neon-card::before {
    background:
        conic-gradient(
            from var(--neon-angle, 0deg),
            transparent 0deg,
            transparent 42deg,
            rgba(37, 221, 255, 0.92) 82deg,
            rgba(37, 109, 255, 0.76) 118deg,
            transparent 158deg,
            transparent 222deg,
            rgba(124, 92, 255, 0.62) 270deg,
            transparent 316deg,
            transparent 360deg
        );
    content: "";
    inset: -1px;
    opacity: 0.72;
    pointer-events: none;
    position: absolute;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    z-index: 2;
}

.neon-card::after {
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 221, 255, 0.16), transparent 18rem),
        radial-gradient(circle at 100% 18%, rgba(37, 109, 255, 0.12), transparent 20rem);
    border: 1px solid rgba(37, 221, 255, 0.12);
    border-radius: inherit;
    content: "";
    inset: 0;
    opacity: 0.42;
    pointer-events: none;
    position: absolute;
    transition: opacity 220ms ease;
    z-index: -1;
}

.neon-card:hover::after,
.neon-card:focus-within::after {
    opacity: 1;
}

.profile-picture-panel,
.profile-readiness-card,
.connect-card,
.settings-card {
    border: 1px solid rgba(142, 205, 255, 0.13) !important;
    background:
        linear-gradient(180deg, rgba(10, 28, 62, 0.78), rgba(4, 10, 25, 0.94)) !important;
    box-shadow: 0 24px 70px rgba(0, 7, 28, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.profile-picture-panel {
    align-items: center;
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 20px !important;
    text-align: center;
}

.profile-picture-preview.large {
    border: 1px solid rgba(37, 221, 255, 0.24) !important;
    box-shadow:
        0 0 0 7px rgba(37, 221, 255, 0.045),
        0 22px 50px rgba(0, 7, 28, 0.34),
        inset 0 0 24px rgba(37, 221, 255, 0.08) !important;
    height: 164px !important;
    width: 164px !important;
}

.profile-picture-preview.large img {
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
}

.profile-picture-panel > span,
.profile-readiness-card span,
.connect-card-main span,
.settings-card .form-head span {
    color: var(--afn-cyan) !important;
    font-family: var(--afn-display) !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.profile-picture-panel > small,
.profile-readiness-card small,
.connect-card-main small,
.settings-card .form-head p,
.settings-card .field-help {
    color: rgba(218, 232, 250, 0.76) !important;
}

.profile-picture-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
    justify-content: center !important;
    width: 100% !important;
}

.profile-picture-actions .btn {
    min-height: 38px !important;
}

.profile-picture-input {
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.profile-readiness-card {
    border-radius: 18px;
    display: grid;
    gap: 5px;
    padding: 18px;
}

.profile-readiness-card strong {
    color: var(--afn-text) !important;
    font-size: 1.75rem !important;
    line-height: 0.95 !important;
}

.connect-card {
    align-items: center !important;
    border-radius: 22px !important;
    gap: 16px !important;
    padding: 20px !important;
}

.connect-card-main {
    min-width: 0;
}

.connect-card-main > i {
    align-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(37, 221, 255, 0.34), transparent 56%),
        linear-gradient(135deg, rgba(37, 221, 255, 0.16), rgba(37, 109, 255, 0.22));
    border: 1px solid rgba(37, 221, 255, 0.24);
    box-shadow: 0 0 30px rgba(37, 221, 255, 0.13);
    color: var(--afn-cyan) !important;
    display: inline-flex;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.connect-card-main strong {
    color: var(--afn-text) !important;
    font-family: var(--afn-display);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.connect-actions {
    gap: 10px !important;
}

.settings-card {
    border-radius: 24px !important;
    padding: clamp(22px, 3vw, 36px) !important;
}

.settings-card .form-head {
    border-bottom: 1px solid rgba(142, 205, 255, 0.12);
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.settings-card .form-head h2 {
    color: var(--afn-text) !important;
    font-size: clamp(2rem, 3vw, 2.7rem) !important;
    margin: 4px 0 6px !important;
    text-shadow: 0 0 28px rgba(37, 221, 255, 0.11);
}

.settings-card .field {
    display: grid;
    gap: 8px;
}

.settings-card label {
    color: rgba(218, 232, 250, 0.86) !important;
    font-family: var(--afn-display);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    margin: 0 !important;
    text-transform: uppercase;
}

.settings-card .form-control,
.settings-card .form-select {
    border: 1px solid rgba(142, 205, 255, 0.15) !important;
    border-radius: 16px !important;
    min-height: 60px !important;
    padding: 15px 17px !important;
    background:
        linear-gradient(180deg, rgba(4, 13, 31, 0.96), rgba(2, 8, 22, 0.98)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    color: var(--afn-text) !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease !important;
}

.settings-card .form-control:focus,
.settings-card .form-select:focus {
    background:
        linear-gradient(180deg, rgba(7, 20, 47, 0.98), rgba(3, 12, 30, 0.99)) !important;
    border-color: rgba(37, 221, 255, 0.66) !important;
    box-shadow:
        0 0 0 4px rgba(37, 221, 255, 0.12),
        0 0 38px rgba(37, 221, 255, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    transform: translateY(-1px);
}

.settings-card .form-control::placeholder {
    color: rgba(218, 232, 250, 0.38) !important;
}

.settings-card .row.g-3 {
    --bs-gutter-x: 18px;
    --bs-gutter-y: 18px;
}

.settings-card .errorlist {
    margin: 0 !important;
    padding: 0 !important;
}

.settings-card .errorlist li {
    background: rgba(255, 107, 120, 0.10);
    border: 1px solid rgba(255, 107, 120, 0.22);
    border-radius: 10px;
    color: #ffd7dc;
    list-style: none;
    padding: 8px 10px;
}

.settings-card > .btn-pce {
    border-radius: 16px !important;
    min-height: 60px !important;
    box-shadow: 0 18px 46px rgba(37, 109, 255, 0.24), 0 0 30px rgba(37, 221, 255, 0.13) !important;
}

.account-settings-card {
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 221, 255, 0.10), transparent 18rem),
        radial-gradient(circle at 100% 0%, rgba(37, 109, 255, 0.10), transparent 20rem),
        linear-gradient(180deg, rgba(6, 17, 40, 0.92), rgba(2, 7, 20, 0.98)) !important;
}

.settings-section-stack {
    display: grid;
    gap: 14px;
}

.settings-section-card {
    display: grid;
    gap: 16px;
    padding: clamp(16px, 2vw, 20px);
    border: 1px solid rgba(142, 205, 255, 0.13);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(10, 28, 62, 0.58), rgba(3, 12, 30, 0.72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.settings-section-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
}

.settings-section-head > span {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    height: 38px;
    width: 38px;
    border: 1px solid rgba(37, 221, 255, 0.24);
    border-radius: 12px;
    color: var(--afn-cyan);
    background: rgba(37, 221, 255, 0.075);
    font-family: var(--afn-display);
    font-weight: 900;
}

.settings-section-head h3 {
    color: var(--afn-text);
    font-family: var(--afn-display);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.settings-section-head p {
    color: rgba(218, 232, 250, 0.68);
    line-height: 1.45;
    margin: 0;
}

.settings-field-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setting-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.setting-field-wide {
    grid-column: 1 / -1;
}

.setting-field label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.setting-field label::before {
    background: var(--afn-cyan);
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(37, 221, 255, 0.45);
    content: "";
    flex: 0 0 6px;
    height: 6px;
    width: 6px;
}

.setting-field .form-control,
.setting-field .form-select {
    min-height: 56px !important;
}

.setting-field .field-help {
    margin-top: -2px;
}

.account-settings-card > .btn-pce {
    margin-top: 18px !important;
}

@media (prefers-reduced-motion: no-preference) {
    .neon-card::before {
        animation: neonBorderSpin 5.8s linear infinite;
    }
}

@property --neon-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes neonBorderSpin {
    to {
        --neon-angle: 360deg;
    }
}

@media (max-width: 991px) {
    .profile-page-intro {
        max-width: 680px;
    }

    .profile-picture-preview.large {
        height: 142px !important;
        width: 142px !important;
    }
}

@media (max-width: 560px) {
    .connect-card,
    .connect-card-main,
    .connect-actions {
        align-items: stretch !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .connect-card-main {
        justify-items: start;
    }

    .settings-section-head,
    .settings-field-grid {
        grid-template-columns: 1fr;
    }

    .settings-section-head > span {
        height: 34px;
        width: 34px;
    }
}

/* Player directory grid/list controller */
.directory-toolbar {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
}

.directory-view-toggle {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    min-height: 42px;
    padding: 4px;
    border: 1px solid rgba(142, 205, 255, 0.16);
    border-radius: 14px;
    background: rgba(5, 14, 34, 0.72);
}

.directory-view-toggle button {
    align-items: center;
    border: 0;
    border-radius: 10px;
    color: rgba(218, 232, 250, 0.72);
    display: inline-flex;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    background: transparent;
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.directory-view-toggle button:hover,
.directory-view-toggle button:focus-visible,
.directory-view-toggle button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 221, 255, 0.16), rgba(37, 109, 255, 0.18));
    box-shadow: inset 0 0 0 1px rgba(37, 221, 255, 0.22);
    outline: 0;
}

.player-list-header {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(230px, 1.4fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(116px, 0.62fr) minmax(130px, 0.72fr) minmax(112px, auto);
    margin: 18px 0 10px;
    padding: 0 20px;
    color: rgba(218, 232, 250, 0.58);
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.player-list-header[hidden] {
    display: none !important;
}

.player-directory-grid[data-player-view="list"] {
    display: grid;
    gap: 7px;
}

.player-directory-grid[data-player-view="list"] > [data-player-card] {
    width: 100%;
    max-width: 100%;
}

.player-directory-grid[data-player-view="list"] .player-card {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(230px, 1.4fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(116px, 0.62fr) minmax(130px, 0.72fr) minmax(112px, auto);
    min-height: 64px;
    padding: 9px 14px;
    border-radius: 12px;
}

.player-directory-grid[data-player-view="list"] .player-card .panel-head {
    align-items: center;
    display: contents;
}

.player-directory-grid[data-player-view="list"] .player-card-head {
    align-items: center;
    display: flex;
    gap: 10px;
    grid-column: 1;
    min-width: 0;
}

.player-directory-grid[data-player-view="list"] .player-card-head h2 {
    font-size: clamp(1.45rem, 2.2vw, 1.95rem);
}

.player-directory-grid[data-player-view="list"] .player-card-head h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-directory-grid[data-player-view="list"] .profile-avatar-sm {
    flex: 0 0 36px;
    height: 36px;
    width: 36px;
}

.player-directory-grid[data-player-view="list"] .profile-lines {
    display: contents;
}

.player-directory-grid[data-player-view="list"] .profile-lines span {
    align-items: center;
    background: rgba(37, 221, 255, 0.065);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 999px;
    color: rgba(226, 239, 255, 0.86);
    display: inline-flex;
    gap: 7px;
    font-family: var(--afn-display);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.015em;
    min-height: 32px;
    min-width: 0;
    overflow: hidden;
    padding: 5px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-directory-grid[data-player-view="list"] .profile-lines span i {
    font-size: 0.92rem;
}

/* Tournament marketplace polish */
.tournament-card {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    overflow: hidden !important;
    padding: 0 !important;
}

.tournament-card-media {
    background:
        radial-gradient(circle at 24% 18%, rgba(37, 221, 255, 0.18), transparent 12rem),
        linear-gradient(135deg, rgba(5, 16, 40, 0.94), rgba(4, 8, 23, 0.98));
    border-right: 1px solid rgba(142, 205, 255, 0.14);
    color: var(--afn-text);
    display: block;
    min-height: 100%;
    position: relative;
}

.tournament-card-media::after {
    background:
        linear-gradient(180deg, transparent 36%, rgba(2, 7, 18, 0.70)),
        linear-gradient(90deg, transparent, rgba(37, 221, 255, 0.10));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.tournament-card-media img {
    display: block;
    height: 100%;
    min-height: 246px;
    object-fit: cover;
    width: 100%;
}

.tournament-media-fallback {
    align-items: center;
    display: grid;
    gap: 10px;
    height: 100%;
    min-height: 246px;
    place-items: center;
    text-align: center;
}

.tournament-media-fallback i {
    color: var(--afn-cyan);
    font-size: 2.4rem;
    filter: drop-shadow(0 0 18px rgba(37, 221, 255, 0.28));
}

.tournament-media-fallback b {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 1.45rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tournament-card-body {
    display: grid;
    gap: clamp(18px, 2vw, 28px);
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    padding: clamp(18px, 2.4vw, 28px);
}

.tournament-card-main {
    align-content: start;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.tournament-card-kicker {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.tournament-card h2 {
    font-size: clamp(2.1rem, 3.6vw, 3.4rem) !important;
    line-height: 0.92 !important;
    max-width: 760px;
}

.tournament-card h2 a {
    color: var(--afn-text);
    text-decoration: none;
}

.tournament-card h2 a:hover {
    color: var(--afn-cyan);
}

.tournament-format-pill {
    white-space: nowrap;
}

.tournament-card .tournament-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tournament-card .tournament-meta span {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 999px;
    color: var(--afn-text-soft);
    min-height: 34px;
    padding: 7px 11px;
}

.tournament-card-side {
    align-content: start;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.tournament-prize-strip {
    background:
        radial-gradient(circle at 14% 0%, rgba(255, 211, 93, 0.28), transparent 10rem),
        linear-gradient(135deg, rgba(78, 55, 12, 0.90), rgba(9, 17, 38, 0.98) 62%, rgba(5, 15, 38, 0.96));
    border: 1px solid rgba(255, 211, 93, 0.34);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 244, 190, 0.10), 0 18px 42px rgba(0, 7, 24, 0.22), 0 0 34px rgba(255, 196, 61, 0.08);
    display: grid;
    gap: 3px;
    padding: 16px;
    position: relative;
}

.tournament-prize-strip::before {
    background: linear-gradient(90deg, transparent, rgba(255, 218, 99, 0.68), transparent);
    content: "";
    height: 1px;
    left: 16px;
    position: absolute;
    right: 16px;
    top: 0;
}

.tournament-prize-strip span,
.tournament-prize-strip small {
    color: rgba(255, 232, 169, 0.74);
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tournament-prize-strip strong {
    color: #ffe8a3;
    font-family: var(--afn-heading);
    font-size: clamp(1.7rem, 2.5vw, 2.3rem);
    line-height: 0.98;
    text-shadow: 0 0 22px rgba(255, 196, 61, 0.22);
}

.tournament-card .event-hype-card.compact {
    margin: 0;
    padding: 13px;
}

.tournament-card .tournament-countdown {
    display: grid;
    gap: 9px;
    grid-column: 1 / -1;
    min-height: 0;
    padding: 13px;
}

.tournament-card .tournament-countdown > small {
    color: rgba(226, 239, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.deadline-stat-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deadline-stat-grid > div {
    background: rgba(37, 221, 255, 0.055);
    border: 1px solid rgba(37, 221, 255, 0.14);
    border-radius: 13px;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px;
}

.deadline-stat-grid span,
.deadline-stat-grid strong {
    font-family: var(--afn-display);
    font-weight: 900;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.deadline-stat-grid span {
    color: rgba(226, 239, 255, 0.58);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.deadline-stat-grid strong {
    color: var(--afn-cyan);
    font-size: 0.92rem;
    letter-spacing: 0.035em;
}

@media (max-width: 420px) {
    .deadline-stat-grid {
        grid-template-columns: 1fr;
    }
}

.tournament-card-actions .btn {
    min-height: 48px;
}

/* Compact tournament urgency: deadline + locked teams only */
.tournament-card .event-hype-card.compact {
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 221, 255, 0.14), transparent 10rem),
        linear-gradient(180deg, rgba(7, 19, 45, 0.94), rgba(4, 10, 25, 0.98));
    border-color: rgba(37, 221, 255, 0.20);
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    overflow: hidden;
}

.tournament-deadline-brief {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(37, 221, 255, 0.10), rgba(22, 119, 255, 0.045)),
        rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(37, 221, 255, 0.16);
    border-radius: 15px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 13px 14px;
}

.tournament-deadline-brief span,
.tournament-deadline-brief small,
.lock-progress-head span,
.lock-progress-head small {
    color: rgba(226, 239, 255, 0.68);
    font-family: var(--afn-display);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.tournament-deadline-brief strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: clamp(1.55rem, 2.6vw, 2.1rem);
    font-weight: 700;
    line-height: 0.98;
    text-shadow: 0 0 22px rgba(37, 221, 255, 0.18);
}

.tournament-deadline-brief small {
    color: var(--afn-cyan);
}

.tournament-lock-progress {
    background: rgba(255, 255, 255, 0.026);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 15px;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px 14px;
}

.event-hype-card.detail {
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1fr);
}

.event-hype-card.detail .tournament-lock-progress,
.event-hype-card.compact .tournament-lock-progress {
    grid-column: auto;
}

.lock-progress-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
}

.lock-progress-head strong,
.lock-progress-head span {
    min-width: 0;
}

.lock-progress-head strong {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 1.35rem;
    line-height: 1;
}

.tournament-lock-progress em {
    align-self: start;
    background: rgba(37, 221, 255, 0.08);
    border: 1px solid rgba(37, 221, 255, 0.14);
    border-radius: 999px;
    color: rgba(226, 239, 255, 0.78);
    font-family: var(--afn-display);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 7px 10px;
    text-transform: uppercase;
}

/* Team card refinement */
.team-card-pro {
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 221, 255, 0.12), transparent 16rem),
        linear-gradient(180deg, rgba(10, 27, 63, 0.94), rgba(3, 8, 22, 0.98)) !important;
    border-color: rgba(142, 205, 255, 0.18) !important;
    gap: 16px;
}

.team-card-pro .team-top {
    border-bottom: 1px solid rgba(142, 205, 255, 0.12);
    padding-bottom: 14px;
}

.team-card-pro .team-top h2 a {
    color: var(--afn-text);
    text-decoration: none;
}

.team-card-pro .team-top > div > span {
    color: rgba(226, 239, 255, 0.58);
    display: block;
    font-family: var(--afn-display);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    margin-top: 5px;
    text-transform: uppercase;
}

.team-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-card-stats span {
    align-items: center;
    background: rgba(255, 255, 255, 0.042);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 999px;
    color: rgba(226, 239, 255, 0.78);
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.82rem;
    font-weight: 800;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
}

.team-card-stats i {
    color: var(--afn-cyan);
}

.team-card-stats .is-ready {
    background: rgba(35, 213, 139, 0.10);
    border-color: rgba(35, 213, 139, 0.24);
    color: #baf7d9;
}

.join-code-compact {
    background:
        linear-gradient(135deg, rgba(37, 221, 255, 0.085), rgba(22, 119, 255, 0.035));
    display: grid;
    gap: 5px;
    margin-top: 0;
    padding: 13px 14px;
}

.join-code-compact span {
    color: rgba(226, 239, 255, 0.58);
    font-family: var(--afn-display);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.join-code-compact strong {
    color: var(--afn-text);
    font-size: 1.3rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .event-hype-card.detail {
        grid-template-columns: 1fr;
    }

    .lock-progress-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 1180px) {
    .tournament-card {
        grid-template-columns: 1fr;
    }

    .tournament-card-media {
        border-bottom: 1px solid rgba(142, 205, 255, 0.14);
        border-right: 0;
    }

    .tournament-card-media img,
    .tournament-media-fallback {
        min-height: 210px;
    }
}

@media (max-width: 860px) {
    .tournament-card-body {
        grid-template-columns: 1fr;
    }

    .tournament-card-kicker {
        align-items: flex-start;
        flex-direction: column;
    }
}

.player-directory-grid[data-player-view="list"] .profile-lines span:nth-child(1) {
    grid-column: 2;
}

.player-directory-grid[data-player-view="list"] .profile-lines span:nth-child(2) {
    grid-column: 3;
}

.player-directory-grid[data-player-view="list"] .profile-lines span:nth-child(3) {
    grid-column: 4;
}

.player-directory-grid[data-player-view="list"] .profile-lines span:nth-child(4) {
    grid-column: 5;
}

.player-directory-grid[data-player-view="list"] .status-badge {
    grid-column: 6;
    justify-self: end;
    min-width: 86px;
    min-height: 32px;
    padding: 5px 9px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .player-list-header {
        display: none !important;
    }

    .player-directory-grid[data-player-view="list"] .player-card {
        align-items: start;
        gap: 12px;
        grid-template-columns: 1fr auto;
        padding: 15px;
    }

    .player-directory-grid[data-player-view="list"] .player-card .panel-head {
        display: flex;
        grid-column: 1 / -1;
    }

    .player-directory-grid[data-player-view="list"] .profile-lines {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-directory-grid[data-player-view="list"] .profile-lines span:nth-child(n) {
        grid-column: auto;
    }

    .player-directory-grid[data-player-view="list"] .profile-lines span {
        align-items: start;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(142, 205, 255, 0.10);
        border-radius: 12px;
        display: grid;
        gap: 4px;
        padding: 10px;
        white-space: normal;
    }

    .player-directory-grid[data-player-view="list"] .profile-lines span::before {
        content: attr(data-label);
        color: var(--afn-cyan);
        font-family: var(--afn-display);
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .player-directory-grid[data-player-view="list"] .profile-lines span i {
        display: none;
    }

    .player-directory-grid[data-player-view="list"] .status-badge {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .directory-toolbar {
        grid-template-columns: 1fr;
    }

    .directory-view-toggle,
    .directory-view-toggle button {
        width: 100%;
    }

    .directory-view-toggle button {
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .player-directory-grid[data-player-view="list"] .profile-lines {
        grid-template-columns: 1fr;
    }
}

/* Early access password recovery */
.auth-card-links {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 18px;
}

.auth-card-links a {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.auth-card-links a:hover {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(32, 216, 255, 0.42);
}

.recovery-page {
    min-height: calc(100vh - 120px);
}

.recovery-shell {
    align-items: stretch;
    display: grid;
    gap: clamp(18px, 3vw, 34px);
    grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
}

.recovery-hero {
    align-content: center;
    background:
        linear-gradient(135deg, rgba(5, 15, 34, 0.72), rgba(8, 28, 64, 0.48)),
        radial-gradient(circle at 16% 12%, rgba(32, 216, 255, 0.18), transparent 18rem);
    border: 1px solid rgba(32, 216, 255, 0.16);
    border-radius: var(--afn-radius-lg);
    box-shadow: var(--afn-shadow-soft);
    display: grid;
    min-height: 440px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 46px);
    position: relative;
}

.recovery-hero::after {
    background:
        linear-gradient(90deg, rgba(32, 216, 255, 0.13) 1px, transparent 1px),
        linear-gradient(0deg, rgba(32, 216, 255, 0.10) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.65), transparent 72%);
    opacity: 0.42;
    pointer-events: none;
    position: absolute;
}

.recovery-hero > * {
    position: relative;
    z-index: 1;
}

.recovery-card {
    align-self: center;
}

.recovery-steps {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.recovery-steps article {
    align-items: center;
    background: rgba(4, 12, 28, 0.5);
    border: 1px solid rgba(137, 195, 255, 0.14);
    border-radius: var(--afn-radius-md);
    display: grid;
    gap: 14px;
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 15px;
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.recovery-steps article:hover {
    background: rgba(11, 31, 68, 0.58);
    border-color: rgba(32, 216, 255, 0.28);
    transform: translateY(-2px);
}

.recovery-steps b {
    align-items: center;
    background: linear-gradient(135deg, rgba(32, 216, 255, 0.18), rgba(22, 119, 255, 0.16));
    border: 1px solid rgba(32, 216, 255, 0.28);
    border-radius: 14px;
    color: #ffffff;
    display: inline-flex;
    font-family: var(--afn-heading);
    font-size: 1.2rem;
    height: 48px;
    justify-content: center;
    line-height: 1;
    width: 48px;
}

.recovery-steps strong {
    color: var(--afn-text);
    display: block;
    font-family: var(--afn-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.recovery-steps span,
.recovery-note {
    color: var(--afn-muted);
    line-height: 1.55;
}

.recovery-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.recovery-actions .btn {
    justify-content: center;
}

.recovery-note {
    border-top: 1px solid rgba(137, 195, 255, 0.12);
    font-size: 0.92rem;
    margin: 22px 0 0;
    padding-top: 16px;
}

@media (max-width: 991.98px) {
    .recovery-shell {
        grid-template-columns: 1fr;
    }

    .recovery-hero {
        min-height: 320px;
    }
}

@media (max-width: 575.98px) {
    .auth-card-links {
        justify-content: center;
    }

    .recovery-actions {
        grid-template-columns: 1fr;
    }

    .recovery-steps article {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 13px;
    }

    .recovery-steps b {
        height: 42px;
        width: 42px;
    }
}

/* Mobile production UX pass */
@media (max-width: 991.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        background:
            radial-gradient(circle at 50% -8%, rgba(32, 216, 255, 0.22), transparent 19rem),
            radial-gradient(circle at 100% 8%, rgba(117, 87, 255, 0.16), transparent 18rem),
            linear-gradient(180deg, #040812 0%, #071021 44%, #040812 100%);
    }

    .pce-bg .glow {
        opacity: 0.35;
        transform: scale(0.82);
    }

    .atlas-mobile-nav {
        align-items: center;
        backdrop-filter: blur(20px);
        background:
            linear-gradient(180deg, rgba(5, 12, 28, 0.96), rgba(5, 12, 28, 0.78));
        border-bottom: 1px solid rgba(142, 205, 255, 0.14);
        box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
        display: flex;
        height: 72px;
        justify-content: space-between;
        padding: 10px 14px;
        z-index: 1050;
    }

    .atlas-mobile-brand {
        align-items: center;
        display: inline-flex;
        min-width: 0;
        text-decoration: none;
    }

    .atlas-mobile-brand .brand-logo-full {
        display: block;
        height: 48px;
        max-width: 142px;
        object-fit: contain;
        object-position: left center;
        width: auto;
    }

    .atlas-menu-button {
        align-items: center;
        background:
            linear-gradient(135deg, rgba(32, 216, 255, 0.14), rgba(22, 119, 255, 0.08)),
            rgba(8, 18, 39, 0.92);
        border: 1px solid rgba(32, 216, 255, 0.22);
        border-radius: 14px;
        color: #ffffff;
        display: inline-flex;
        flex: 0 0 auto;
        height: 46px;
        justify-content: center;
        padding: 0;
        width: 46px;
    }

    .atlas-menu-button i {
        font-size: 1.35rem;
        line-height: 1;
    }

    .atlas-offcanvas {
        background:
            radial-gradient(circle at 10% 0%, rgba(32, 216, 255, 0.14), transparent 16rem),
            linear-gradient(180deg, rgba(5, 12, 28, 0.98), rgba(3, 7, 18, 0.99)) !important;
        border-right: 1px solid rgba(142, 205, 255, 0.16) !important;
        color: var(--afn-text);
        max-width: min(86vw, 360px);
    }

    .atlas-offcanvas .offcanvas-header {
        border-bottom: 1px solid rgba(142, 205, 255, 0.12);
        padding: 14px;
    }

    .atlas-offcanvas .offcanvas-body {
        display: flex;
        flex-direction: column;
        gap: 18px;
        min-height: 0;
        overflow-y: auto;
        padding: 16px 14px;
    }

    .atlas-offcanvas .atlas-sidebar-nav {
        display: grid;
        gap: 8px;
    }

    .atlas-offcanvas .nav-link {
        align-items: center;
        border-radius: 14px;
        display: flex;
        font-size: 0.92rem;
        gap: 10px;
        min-height: 48px;
        padding: 12px 13px !important;
    }

    .atlas-offcanvas .nav-link i {
        color: var(--afn-cyan);
        width: 20px;
    }

    .atlas-offcanvas .atlas-sidebar-bottom {
        display: grid;
        gap: 10px;
        margin-top: auto;
        padding-top: 14px;
    }

    .page-shell {
        padding-top: 72px;
        padding-bottom: 36px;
    }

    .app-page,
    .form-page,
    .auth-page {
        padding-top: 20px;
    }

    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .page-title,
    .app-hero,
    .credits-hero,
    .section-card {
        align-items: stretch;
        border-radius: 20px;
        display: grid;
        gap: 18px;
        margin-bottom: 18px;
        padding: 20px;
    }

    .page-title h1,
    .app-hero h1,
    .credits-hero h1,
    .auth-title,
    .home-title {
        font-size: clamp(2.4rem, 15vw, 3.6rem);
        line-height: 0.92;
        overflow-wrap: anywhere;
    }

    .page-title p,
    .app-hero p,
    .credits-hero p,
    .auth-copy,
    .home-copy,
    .muted-copy {
        font-size: 0.98rem;
        line-height: 1.56;
    }

    .hero-actions,
    .page-title > .btn,
    .app-hero > .btn,
    .credits-hero > .btn {
        display: grid;
        gap: 10px;
        width: 100%;
    }

    .hero-actions .btn,
    .page-title > .btn,
    .app-hero > .btn,
    .credits-hero > .btn {
        justify-content: center;
        width: 100%;
    }

    .panel-card,
    .auth-card,
    .profile-card,
    .team-card,
    .tournament-card,
    .player-card,
    .stat-card,
    .empty-premium {
        border-radius: 18px !important;
        padding: 16px !important;
    }

    .panel-head {
        align-items: flex-start;
        display: grid;
        gap: 10px;
    }

    .panel-head h2 {
        font-size: 1.55rem;
        line-height: 1;
    }

    .panel-head > a,
    .panel-head > .status-badge {
        justify-self: start;
    }

    .btn,
    button.btn,
    a.btn {
        min-height: 46px;
        white-space: normal;
    }

    .btn-sm {
        min-height: 40px;
    }

    .dashboard-stats,
    .dashboard-lobby,
    .dashboard-bottom,
    .setup-step-grid,
    .tournament-detail-grid,
    .profile-settings-layout,
    .auth-flow-layout {
        display: grid !important;
        gap: 14px !important;
        grid-template-columns: 1fr !important;
    }

    .dashboard-profile,
    .dashboard-side,
    .tournament-main,
    .tournament-side,
    .profile-settings-aside,
    .profile-settings-main {
        min-width: 0;
        width: 100%;
    }

    .stat-card {
        min-height: 122px;
    }

    .stat-card strong {
        font-size: 2.15rem;
    }

    .setup-command .panel-head {
        grid-template-columns: 1fr;
    }

    .setup-step {
        align-items: start;
        border-radius: 16px;
        grid-template-columns: 38px minmax(0, 1fr);
        min-height: 0;
        padding: 14px;
    }

    .setup-step em,
    .setup-step b {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
    }

    .profile-card {
        text-align: center;
    }

    .profile-card .profile-avatar {
        height: 118px;
        margin-left: auto;
        margin-right: auto;
        width: 118px;
    }

    .profile-lines,
    .tournament-meta,
    .detail-meta,
    .team-card-stats {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .profile-lines span,
    .tournament-meta span,
    .team-card-stats span {
        align-items: center;
        border-radius: 12px;
        min-height: 40px;
        overflow-wrap: anywhere;
        padding: 9px 10px;
        white-space: normal;
    }

    .event-row,
    .invite-row {
        align-items: stretch;
        display: grid !important;
        gap: 10px;
        grid-template-columns: 1fr !important;
        padding: 13px !important;
    }

    .event-row .btn,
    .invite-actions,
    .invite-actions form,
    .invite-actions .btn {
        width: 100%;
    }

    .invite-actions {
        display: grid;
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .event-row > .status-badge {
        justify-self: start;
    }
}

@media (max-width: 767.98px) {
    .home-section {
        padding: 30px 0;
    }

    .home-hero,
    .home-grid,
    .platform-grid,
    .final-cta,
    .auth-flow-layout {
        display: grid !important;
        gap: 16px !important;
        grid-template-columns: 1fr !important;
    }

    .auth-pipeline,
    .auth-pipeline.compact {
        gap: 10px;
    }

    .auth-pipeline article {
        align-items: start;
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 13px;
    }

    .signup-card,
    .login-card,
    .settings-card {
        padding: 18px !important;
    }

    .form-section,
    .settings-section-card {
        border-radius: 16px;
        padding: 14px;
    }

    .form-section-title,
    .settings-section-head {
        align-items: start;
        display: grid;
        gap: 10px;
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .settings-field-grid,
    .form-grid,
    .row.g-3 {
        --bs-gutter-x: 0.85rem;
        --bs-gutter-y: 0.85rem;
    }

    .auth-card input,
    .auth-card select,
    .auth-card textarea,
    .setting-field input,
    .setting-field select,
    .setting-field textarea {
        min-height: 48px;
        width: 100%;
    }

    .connect-card,
    .profile-picture-panel,
    .profile-readiness-card {
        border-radius: 18px !important;
        display: grid !important;
        gap: 14px !important;
        padding: 16px !important;
    }

    .connect-card-main,
    .connect-actions,
    .profile-picture-actions {
        align-items: stretch !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .profile-picture-preview.large {
        height: 132px;
        width: 132px;
    }

    .directory-toolbar {
        border-radius: 18px;
        display: grid !important;
        gap: 10px;
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 12px;
    }

    .directory-toolbar > .status-badge,
    .directory-view-toggle {
        grid-column: 1 / -1;
    }

    .directory-view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .player-directory-grid {
        --bs-gutter-y: 0.9rem;
    }

    .player-card .panel-head {
        grid-template-columns: 1fr;
    }

    .player-card-head {
        align-items: center;
    }

    .player-card .status-badge {
        justify-self: start;
    }

    .player-directory-grid[data-player-view="list"] .player-card {
        grid-template-columns: 1fr !important;
    }

    .leaderboard-table-wrap,
    .br-participants-table-wrap {
        border-radius: 16px;
        margin-left: -2px;
        overflow-x: auto;
        padding-bottom: 4px;
        width: calc(100% + 4px);
    }

    .leaderboard-table {
        min-width: 680px;
    }

    .leaderboard-pagination,
    .directory-pagination {
        display: grid !important;
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .leaderboard-pagination .btn,
    .directory-pagination .btn,
    .page-number-strip {
        justify-content: center;
        width: 100%;
    }

    .page-number-strip {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    .tournament-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .tournament-card-media {
        aspect-ratio: 16 / 9;
        border-bottom: 1px solid rgba(142, 205, 255, 0.14);
        border-right: 0 !important;
        min-height: 0;
        width: 100%;
    }

    .tournament-card-media img,
    .tournament-media-fallback {
        height: 100%;
        min-height: 0 !important;
        width: 100%;
    }

    .tournament-card-body,
    .tournament-card-main,
    .tournament-card-side,
    .event-hype-card.compact,
    .event-hype-card.detail {
        display: grid !important;
        grid-template-columns: 1fr !important;
        min-width: 0;
    }

    .tournament-card-body {
        gap: 14px;
        padding: 16px;
    }

    .tournament-card h2 {
        font-size: clamp(2rem, 12vw, 2.8rem);
        line-height: 0.95;
    }

    .tournament-card-kicker,
    .tournament-status,
    .lock-progress-head {
        align-items: flex-start !important;
        display: grid !important;
        gap: 8px !important;
        grid-template-columns: 1fr !important;
        justify-content: start !important;
    }

    .tournament-prize-strip,
    .tournament-deadline-brief,
    .tournament-lock-progress {
        border-radius: 15px;
        padding: 13px;
    }

    .tournament-card-actions {
        display: grid;
        gap: 9px;
    }

    .deadline-number {
        justify-content: start;
    }

    .deadline-number strong {
        font-size: clamp(2.5rem, 22vw, 4.2rem);
    }

    .timeline-stage-grid,
    .timeline-advance-note,
    .team-pill-grid,
    .scoring-rule-grid,
    .scoring-summary {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .timeline-stage {
        border-radius: 16px;
        display: grid !important;
        gap: 12px;
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 14px;
    }

    .stage-copy p {
        line-height: 1.45;
    }

    .tournament-side {
        display: grid;
        gap: 14px;
    }

    .scoring-rule-grid {
        max-height: none;
    }

    .team-pill {
        align-items: flex-start;
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .pce-footer {
        margin-left: 0 !important;
        padding: 26px 0 20px;
    }

    .atlas-footer-inner,
    .atlas-footer-grid,
    .atlas-footer-brandline,
    .atlas-footer-bottom {
        display: grid !important;
        gap: 14px !important;
        grid-template-columns: 1fr !important;
        text-align: left;
    }

    .atlas-footer-card {
        border-radius: 16px;
        padding: 14px;
    }

    .atlas-footer-discord {
        justify-content: center;
        width: 100%;
    }

    .atlas-toast-stack {
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        max-width: none !important;
    }

    .atlas-toast {
        border-radius: 16px;
        padding: 12px;
        width: 100%;
    }
}

@media (max-width: 430px) {
    .atlas-mobile-nav {
        height: 66px;
        padding: 9px 11px;
    }

    .atlas-mobile-brand .brand-logo-full {
        height: 42px;
        max-width: 124px;
    }

    .atlas-menu-button {
        height: 42px;
        width: 42px;
    }

    .page-shell {
        padding-top: 66px;
    }

    .container {
        padding-left: 11px;
        padding-right: 11px;
    }

    .page-title,
    .app-hero,
    .panel-card,
    .auth-card,
    .profile-card,
    .team-card,
    .player-card,
    .empty-premium {
        padding: 14px !important;
    }

    .pce-badge,
    .status-badge,
    .tournament-format-pill {
        max-width: 100%;
        white-space: normal;
    }

    .page-title h1,
    .app-hero h1,
    .auth-title {
        font-size: clamp(2.15rem, 16vw, 3.15rem);
    }

    .profile-picture-actions .btn,
    .connect-actions .btn,
    .hero-actions .btn,
    .tournament-card-actions .btn {
        width: 100%;
    }

    .profile-avatar-sm {
        height: 50px;
        min-width: 50px;
        width: 50px;
    }

    .player-card-head h2 {
        font-size: 1.55rem;
    }
}

/* Sidebar social links */
.atlas-social-links {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}

.atlas-social-links a {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(32, 216, 255, 0.10), rgba(22, 119, 255, 0.05)),
        rgba(8, 18, 39, 0.78);
    border: 1px solid rgba(142, 205, 255, 0.18);
    border-radius: 13px;
    color: rgba(226, 239, 255, 0.86);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.atlas-social-links a:hover,
.atlas-social-links a:focus-visible {
    border-color: rgba(32, 216, 255, 0.42);
    box-shadow: 0 0 24px rgba(32, 216, 255, 0.14);
    color: #ffffff;
    transform: translateY(-2px);
}

.atlas-social-links i {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .atlas-social-links {
        margin-bottom: 0;
    }
}

/* Sidebar hierarchy and language switch refinement */
.atlas-sidebar {
    gap: 11px !important;
    overflow: hidden !important;
    padding: 10px 16px 14px !important;
}

.atlas-sidebar-brand {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 5px 4px 12px !important;
}

.atlas-sidebar-brand .brand-wordmark {
    height: auto !important;
    max-height: 132px !important;
    object-fit: contain !important;
    width: min(146px, 78%) !important;
}

.atlas-sidebar-nav {
    gap: 5px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 1px 2px !important;
    scrollbar-width: none;
}

.atlas-sidebar-nav::-webkit-scrollbar {
    display: none;
}

.atlas-sidebar-nav .nav-link {
    border-radius: 12px !important;
    font-size: 0.86rem !important;
    min-height: 42px !important;
    padding-inline: 12px !important;
}

.atlas-sidebar-bottom {
    background: linear-gradient(180deg, rgba(4, 12, 29, 0.12), rgba(4, 12, 29, 0.72));
    border-top: 1px solid rgba(142, 205, 255, 0.12);
    flex: 0 0 auto !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding-top: 10px !important;
}

.atlas-sidebar-bottom > form,
.atlas-sidebar-bottom > .btn {
    width: 100%;
}

.atlas-sidebar-bottom .btn {
    min-height: 38px !important;
}

.atlas-social-links {
    gap: 8px !important;
    margin: 0 !important;
}

.atlas-social-links a {
    border-radius: 11px !important;
    height: 36px !important;
}

.atlas-language-switch {
    align-items: center;
    background: rgba(5, 16, 38, 0.82);
    border: 1px solid rgba(142, 205, 255, 0.15);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 40px;
    padding: 5px 6px 5px 10px;
    transition: border-color 180ms ease, background 180ms ease;
}

.atlas-language-switch:hover,
.atlas-language-switch:focus-within {
    background: rgba(8, 24, 53, 0.92);
    border-color: rgba(37, 221, 255, 0.34);
}

.atlas-language-label {
    align-items: center;
    color: var(--afn-muted);
    display: flex;
    gap: 7px;
    min-width: 0;
}

.atlas-language-label i {
    color: var(--afn-cyan);
    font-size: 0.9rem;
}

.atlas-language-label span {
    font-family: var(--afn-display);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.atlas-language-options {
    background: rgba(0, 6, 18, 0.72);
    border: 1px solid rgba(142, 205, 255, 0.12);
    border-radius: 9px;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(2, 34px);
    padding: 2px;
}

.atlas-language-options form {
    display: contents;
}

.atlas-language-options button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--afn-muted);
    display: inline-flex;
    font-family: var(--afn-display);
    font-size: 0.68rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    letter-spacing: 0.04em;
    padding: 0;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.atlas-language-options button:hover,
.atlas-language-options button:focus-visible {
    color: var(--afn-text);
}

.atlas-language-options button.is-active {
    background: linear-gradient(135deg, rgba(37, 221, 255, 0.24), rgba(22, 119, 255, 0.28));
    box-shadow: inset 0 0 0 1px rgba(37, 221, 255, 0.32), 0 0 14px rgba(37, 221, 255, 0.10);
    color: #ffffff;
}

@media (max-height: 780px) and (min-width: 992px) {
    .atlas-sidebar-brand .brand-wordmark {
        max-height: 104px !important;
        width: min(124px, 70%) !important;
    }

    .atlas-sidebar-nav .nav-link {
        min-height: 38px !important;
    }

    .atlas-sidebar-bottom {
        gap: 6px !important;
        padding-top: 8px !important;
    }

    .atlas-social-links a {
        height: 32px !important;
    }
}

@media (max-width: 991.98px) {
    .atlas-offcanvas .atlas-sidebar-bottom {
        flex: 0 0 auto !important;
    }

    .atlas-language-switch {
        min-height: 44px;
    }
}

/* Flat, precise sidebar selection without an under-tab glow. */
.atlas-sidebar-nav .nav-link:hover,
.atlas-offcanvas .nav-link:hover {
    box-shadow: none !important;
}

.atlas-sidebar-nav .nav-link.active,
.atlas-offcanvas .nav-link.active {
    background: rgba(20, 57, 92, 0.56) !important;
    border-color: rgba(37, 221, 255, 0.30) !important;
    box-shadow: inset 3px 0 0 var(--afn-cyan) !important;
    transform: none !important;
}

.duo-finder-top {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    margin-bottom: 18px;
}

.duo-listing-form,
.duo-finder-guide {
    margin: 0 !important;
}

.duo-listing-form {
    overflow: hidden;
}

.duo-listing-head {
    align-items: flex-start;
    border-bottom: 1px solid rgba(142, 205, 255, 0.12);
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.duo-listing-title {
    align-items: center;
    display: grid;
    gap: 13px;
    grid-template-columns: 46px minmax(0, 1fr);
}

.duo-listing-title h2 {
    margin: 2px 0 3px;
}

.duo-listing-title .muted-copy {
    line-height: 1.45;
    margin: 0;
    max-width: 610px;
}

.duo-listing-icon {
    align-items: center;
    background: rgba(37, 221, 255, 0.09);
    border: 1px solid rgba(37, 221, 255, 0.24);
    border-radius: 13px;
    color: var(--afn-cyan);
    display: inline-flex;
    font-size: 1.15rem;
    height: 46px;
    justify-content: center;
    width: 46px;
}

@media (max-width: 560px) {
    .duo-listing-head {
        display: grid;
        gap: 12px;
    }

    .duo-listing-head > .status-badge {
        justify-self: start;
        margin-left: 59px;
    }
}

.duo-form-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
}

.duo-form-grid label,
.duo-card-actions label {
    color: var(--afn-text-soft);
    display: block;
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.duo-form-field {
    align-content: start;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.duo-form-grid .duo-form-field > label {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0 !important;
    min-height: 20px;
}

.duo-form-field > label i {
    color: var(--afn-cyan);
    font-size: 0.92rem;
}

.duo-select-wrap {
    align-items: center;
    background: rgba(4, 17, 45, 0.72);
    border: 1px solid rgba(146, 202, 255, 0.16);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 54px;
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.duo-select-wrap:focus-within {
    background: rgba(6, 25, 63, 0.92);
    border-color: rgba(35, 216, 255, 0.70);
    box-shadow: 0 0 0 0.22rem rgba(35, 216, 255, 0.12);
}

.duo-select-wrap > i {
    align-items: center;
    border-right: 1px solid rgba(146, 202, 255, 0.13);
    color: var(--afn-cyan);
    display: flex;
    height: 100%;
    justify-content: center;
}

.duo-select-wrap .form-select {
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 52px;
    min-height: 52px;
    min-width: 0;
    padding: 0 42px 0 14px !important;
    width: 100%;
}

.duo-form-grid textarea {
    display: block;
    min-height: 112px;
    padding: 14px 16px;
    resize: vertical;
    width: 100%;
}

.duo-form-field > small {
    color: var(--afn-muted);
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
    min-height: 1.45em;
}

.duo-form-field .errorlist {
    margin: 0;
}

.duo-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.duo-finder-guide {
    align-content: start;
    display: grid;
    gap: 10px;
}

.duo-guide-kicker,
.duo-player-label {
    color: var(--afn-cyan);
    font-family: var(--afn-display);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.duo-guide-step {
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 14px;
    display: grid;
    gap: 11px;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 11px;
}

.duo-guide-step b {
    align-items: center;
    background: rgba(32, 216, 255, 0.10);
    border: 1px solid rgba(32, 216, 255, 0.20);
    border-radius: 11px;
    color: #ffffff;
    display: inline-flex;
    font-family: var(--afn-heading);
    height: 36px;
    justify-content: center;
}

.duo-guide-step span,
.duo-finder-guide > small {
    color: var(--afn-muted);
    line-height: 1.45;
}

.duo-directory-toolbar {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    margin-bottom: 18px;
}

.duo-directory-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.duo-player-card {
    background:
        radial-gradient(circle at 8% 0%, rgba(32, 216, 255, 0.12), transparent 15rem),
        linear-gradient(180deg, rgba(10, 27, 63, 0.92), rgba(3, 8, 22, 0.98));
    border: 1px solid rgba(142, 205, 255, 0.17);
    border-radius: 20px;
    box-shadow: var(--afn-shadow-soft);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.duo-player-card:hover {
    border-color: rgba(32, 216, 255, 0.34);
    box-shadow: var(--afn-glow);
    transform: translateY(-3px);
}

.duo-player-head {
    align-items: center;
    border-bottom: 1px solid rgba(142, 205, 255, 0.11);
    display: grid;
    gap: 11px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    margin-bottom: 13px;
    padding-bottom: 13px;
}

.duo-player-head h2 {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 1.85rem;
    line-height: 0.95;
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.duo-identity-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.duo-identity-grid span {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(142, 205, 255, 0.10);
    border-radius: 12px;
    color: var(--afn-text-soft);
    display: grid;
    font-size: 0.82rem;
    gap: 3px;
    grid-template-columns: 18px minmax(0, 1fr);
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 9px;
}

.duo-identity-grid span i {
    color: var(--afn-cyan);
    grid-row: 1 / 3;
}

.duo-identity-grid span b {
    color: var(--afn-muted);
    font-family: var(--afn-display);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.duo-availability-line {
    align-items: center;
    background: linear-gradient(135deg, rgba(32, 216, 255, 0.10), rgba(22, 119, 255, 0.04));
    border: 1px solid rgba(32, 216, 255, 0.15);
    border-radius: 13px;
    display: flex;
    gap: 11px;
    margin-top: 10px;
    padding: 10px 12px;
}

.duo-availability-line > i {
    color: var(--afn-cyan);
    font-size: 1.1rem;
}

.duo-availability-line span,
.duo-availability-line strong {
    display: block;
}

.duo-availability-line span {
    color: var(--afn-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.duo-availability-line strong {
    color: var(--afn-text);
}

.duo-player-message {
    color: var(--afn-muted);
    line-height: 1.52;
    margin: 13px 0;
    min-height: 3.05em;
}

.duo-card-actions {
    margin-top: auto;
}

.duo-card-actions form {
    display: grid;
    gap: 9px;
}

.duo-empty-state {
    grid-column: 1 / -1;
}

@media (max-width: 1180px) {
    .duo-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .duo-finder-top,
    .duo-form-grid {
        grid-template-columns: 1fr;
    }

    .duo-form-grid {
        gap: 18px;
    }
}

@media (max-width: 767.98px) {
    .duo-directory-grid,
    .duo-identity-grid {
        grid-template-columns: 1fr;
    }

    .duo-directory-toolbar {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .duo-directory-toolbar .status-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .duo-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .duo-form-actions .btn {
        width: 100%;
    }

    .duo-player-card {
        border-radius: 18px;
        padding: 14px;
    }
}

@media (max-width: 430px) {
    .duo-player-head {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .duo-player-head > .status-badge {
        grid-column: 2;
        justify-self: start;
    }
}

/* Player notification inbox */
.atlas-inbox {
    bottom: 22px;
    position: fixed;
    right: 22px;
    z-index: 120;
}

.atlas-inbox-trigger {
    align-items: center;
    background:
        radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.18), transparent 38%),
        linear-gradient(145deg, #168cff, #0b5ce1 62%, #073a9b);
    border: 1px solid rgba(125, 220, 255, 0.72);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(0, 73, 203, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: inline-flex;
    height: 56px;
    justify-content: center;
    padding: 0;
    position: relative;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    width: 56px;
}

.atlas-inbox-trigger > i {
    font-size: 1.28rem;
    line-height: 1;
}

.atlas-inbox-trigger:hover,
.atlas-inbox-trigger:focus-visible,
.atlas-inbox.is-open .atlas-inbox-trigger {
    border-color: rgba(197, 245, 255, 0.92);
    box-shadow: 0 20px 50px rgba(0, 98, 255, 0.48), 0 0 0 4px rgba(37, 221, 255, 0.10);
    outline: 0;
    transform: translateY(-3px);
}

.atlas-inbox-count {
    align-items: center;
    background: #ff3b56;
    border: 2px solid #071126;
    border-radius: 999px;
    color: #ffffff;
    display: flex;
    font-family: var(--afn-display);
    font-size: 0.68rem;
    font-weight: 900;
    height: 23px;
    justify-content: center;
    min-width: 23px;
    padding: 0 5px;
    position: absolute;
    right: -7px;
    top: -7px;
    z-index: 2;
}

.atlas-inbox-ring {
    animation: atlasInboxRing 2.4s ease-out infinite;
    border: 1px solid rgba(37, 221, 255, 0.72);
    border-radius: 18px;
    inset: -5px;
    pointer-events: none;
    position: absolute;
}

.atlas-inbox-panel {
    background:
        radial-gradient(circle at 100% 0%, rgba(22, 119, 255, 0.16), transparent 18rem),
        linear-gradient(180deg, rgba(9, 24, 53, 0.985), rgba(3, 10, 25, 0.995));
    border: 1px solid rgba(116, 188, 255, 0.22);
    border-radius: 20px;
    bottom: 70px;
    box-shadow: 0 32px 80px rgba(0, 4, 18, 0.60), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(14px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.25, 1), visibility 180ms ease;
    visibility: hidden;
    width: min(410px, calc(100vw - 32px));
}

.atlas-inbox.is-open .atlas-inbox-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.atlas-inbox-head {
    align-items: center;
    border-bottom: 1px solid rgba(142, 205, 255, 0.12);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 17px 18px 15px;
}

.atlas-inbox-head > div {
    min-width: 0;
}

.atlas-inbox-head span {
    color: var(--afn-cyan);
    display: block;
    font-family: var(--afn-display);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.atlas-inbox-head h2 {
    color: var(--afn-text);
    font-family: var(--afn-heading);
    font-size: 1.85rem;
    line-height: 1;
    margin: 3px 0 0;
    text-transform: uppercase;
}

.atlas-inbox-head form {
    margin: 0;
}

.atlas-inbox-head button {
    background: rgba(37, 221, 255, 0.07);
    border: 1px solid rgba(37, 221, 255, 0.18);
    border-radius: 9px;
    color: #ccefff;
    font-family: var(--afn-display);
    font-size: 0.68rem;
    font-weight: 900;
    min-height: 34px;
    padding: 0 10px;
    text-transform: uppercase;
}

.atlas-inbox-head button:hover,
.atlas-inbox-head button:focus-visible {
    background: rgba(37, 221, 255, 0.13);
    border-color: rgba(37, 221, 255, 0.42);
    color: #ffffff;
    outline: 0;
}

.atlas-inbox-list {
    max-height: min(510px, calc(100vh - 220px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    scrollbar-color: rgba(37, 221, 255, 0.24) transparent;
    scrollbar-width: thin;
}

.atlas-inbox-item {
    margin: 0;
}

.atlas-inbox-item + .atlas-inbox-item {
    border-top: 1px solid rgba(142, 205, 255, 0.08);
}

.atlas-inbox-item > button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 13px;
    color: inherit;
    display: grid;
    gap: 11px;
    grid-template-columns: 42px minmax(0, 1fr) 10px;
    padding: 11px;
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
    width: 100%;
}

.atlas-inbox-item > button:hover,
.atlas-inbox-item > button:focus-visible {
    background: rgba(37, 221, 255, 0.055);
    border-color: rgba(37, 221, 255, 0.13);
    outline: 0;
    transform: translateX(-2px);
}

.atlas-inbox-item.is-unread > button {
    background: linear-gradient(90deg, rgba(22, 119, 255, 0.12), rgba(37, 221, 255, 0.025));
}

.atlas-inbox-item-icon {
    align-items: center;
    background: rgba(22, 119, 255, 0.11);
    border: 1px solid rgba(71, 151, 255, 0.20);
    border-radius: 12px;
    color: #72b6ff;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.atlas-inbox-item-team {
    background: rgba(37, 221, 255, 0.09);
    border-color: rgba(37, 221, 255, 0.20);
    color: var(--afn-cyan);
}

.atlas-inbox-item-tournament {
    background: rgba(255, 189, 74, 0.09);
    border-color: rgba(255, 189, 74, 0.20);
    color: #ffd36d;
}

.atlas-inbox-item-copy {
    display: grid;
    min-width: 0;
}

.atlas-inbox-item-copy strong {
    color: var(--afn-text);
    font-size: 0.9rem;
    line-height: 1.25;
}

.atlas-inbox-item-copy > span {
    color: var(--afn-muted);
    font-size: 0.79rem;
    line-height: 1.4;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.atlas-inbox-item-copy small {
    color: rgba(159, 182, 215, 0.68);
    font-size: 0.68rem;
    margin-top: 5px;
}

.atlas-inbox-unread-dot {
    background: var(--afn-cyan);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(37, 221, 255, 0.72);
    height: 7px;
    justify-self: end;
    width: 7px;
}

.atlas-inbox-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 32px 22px;
    text-align: center;
}

.atlas-inbox-empty > span {
    align-items: center;
    background: rgba(37, 221, 255, 0.07);
    border: 1px solid rgba(37, 221, 255, 0.15);
    border-radius: 15px;
    color: var(--afn-cyan);
    display: flex;
    font-size: 1.25rem;
    height: 54px;
    justify-content: center;
    margin-bottom: 13px;
    width: 54px;
}

.atlas-inbox-empty strong {
    color: var(--afn-text);
    font-size: 1rem;
}

.atlas-inbox-empty p {
    color: var(--afn-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 6px 0 0;
    max-width: 250px;
}

.atlas-inbox-foot {
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(142, 205, 255, 0.10);
    color: var(--afn-muted);
    display: flex;
    font-size: 0.69rem;
    justify-content: space-between;
    padding: 10px 17px;
}

.atlas-inbox-foot i {
    color: var(--afn-cyan);
}

@keyframes atlasInboxRing {
    0% { opacity: 0.72; transform: scale(0.92); }
    70%, 100% { opacity: 0; transform: scale(1.25); }
}

@media (max-width: 767.98px) {
    .atlas-inbox {
        bottom: 15px;
        right: 15px;
    }

    .atlas-inbox-trigger {
        border-radius: 15px;
        height: 52px;
        width: 52px;
    }

    .atlas-inbox-panel {
        bottom: calc(96px + env(safe-area-inset-bottom));
        max-height: calc(100vh - 120px);
        width: calc(100vw - 30px);
        will-change: transform, opacity;
    }

    .atlas-inbox-list {
        max-height: calc(100vh - 250px);
    }

    .atlas-toast-stack {
        bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atlas-inbox-panel,
    .atlas-inbox-trigger,
    .atlas-inbox-item > button,
    .atlas-inbox-ring {
        animation: none !important;
        transition: none !important;
    }
}
/* Team management workspace */
.team-page-actions,
.team-roster-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-lock-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 15px 18px;
    border: 1px solid rgba(255, 191, 77, 0.28);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(255, 191, 77, 0.09), rgba(8, 20, 47, 0.84));
}

.team-lock-banner > i {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 191, 77, 0.32);
    border-radius: 10px;
    color: #ffbf4d;
    background: rgba(255, 191, 77, 0.08);
}

.team-lock-banner div {
    display: grid;
    gap: 2px;
}

.team-lock-banner strong {
    color: #fff3d6;
}

.team-lock-banner span {
    color: rgba(230, 237, 249, 0.72);
}

.team-roster-list {
    display: grid;
    gap: 10px;
}

.team-capacity {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 14px;
}

.team-capacity span {
    height: 5px;
    border-radius: 999px;
    background: rgba(129, 190, 255, 0.14);
}

.team-capacity span.is-filled {
    background: linear-gradient(90deg, #20d8ff, #1677ff);
    box-shadow: 0 0 12px rgba(32, 216, 255, 0.22);
}

.team-roster-row {
    min-height: 68px;
    border: 1px solid rgba(129, 190, 255, 0.12);
    border-radius: 11px;
    background: rgba(3, 12, 31, 0.36);
}

.team-icon-action {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(129, 190, 255, 0.2);
    border-radius: 9px;
    background: rgba(8, 24, 53, 0.86);
    color: rgba(232, 242, 255, 0.82);
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.team-icon-action:hover:not(:disabled) {
    border-color: rgba(66, 217, 255, 0.56);
    color: #42d9ff;
    transform: translateY(-1px);
}

.team-icon-action.is-danger:hover:not(:disabled) {
    border-color: rgba(255, 107, 120, 0.55);
    background: rgba(255, 107, 120, 0.1);
    color: #ff8792;
}

.team-icon-action:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.team-exit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 107, 120, 0.18);
    border-radius: 12px;
    background: rgba(35, 10, 26, 0.28);
}

.team-exit-panel > div {
    display: grid;
    gap: 3px;
}

.team-exit-panel strong {
    color: #fff;
}

.team-exit-panel span {
    color: rgba(218, 232, 250, 0.68);
}

@media (max-width: 767px) {
    .team-page-actions,
    .team-exit-panel {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .team-page-actions .btn,
    .team-exit-panel .btn {
        width: 100%;
    }

    .team-roster-row {
        align-items: flex-start;
        gap: 12px;
    }

    .team-roster-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================================================
   Section 1: Scroll-Reveal Foundation
   ============================================================================ */
.atlas-loaded .animate-in:not(.is-visible) {
    opacity: 0;
    transform: translateY(18px);
}

.atlas-loaded .animate-in.is-visible {
    animation: afnFadeUp 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-1 { animation-delay: 60ms; }
.stagger-2 { animation-delay: 120ms; }
.stagger-3 { animation-delay: 180ms; }
.stagger-4 { animation-delay: 240ms; }
.stagger-5 { animation-delay: 300ms; }
.stagger-6 { animation-delay: 360ms; }
.stagger-7 { animation-delay: 420ms; }
.stagger-8 { animation-delay: 480ms; }

/* ============================================================================
   Section 2: Card Hover Glow (Mouse Tracking)
   ============================================================================ */
.panel-card,
.team-card,
.tournament-card,
.player-card,
.stat-card {
    position: relative;
    overflow: hidden;
}

.panel-card::before,
.team-card::before,
.tournament-card::before,
.player-card::before,
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(32, 216, 255, 0.06),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.panel-card:hover::before,
.team-card:hover::before,
.tournament-card:hover::before,
.player-card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

/* ============================================================================
   Section 3: Button Press Feedback
   ============================================================================ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 10%, transparent 10.01%);
    transform: scale(10);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}

.btn:active:not(:disabled)::after {
    transform: scale(0);
    opacity: 0.12;
    transition: 0s;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* ============================================================================
   Section 4: Page Transition Overlay
   ============================================================================ */
.page-shell,
main {
    animation: atlasPageScaleIn 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-shell.is-leaving,
main.is-leaving {
    transform: scale(0.97);
    opacity: 0;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes atlasPageScaleIn {
    from { transform: scale(0.97); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ============================================================================
   Section 5: Sidebar Active Indicator Enhancement
   ============================================================================ */
.atlas-sidebar-nav .nav-link {
    position: relative;
}

.atlas-sidebar-nav .nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(32, 216, 255, 0.08);
    opacity: 0;
    transition: opacity 280ms cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.atlas-sidebar-nav .nav-link:hover::before,
.atlas-sidebar-nav .nav-link.active::before {
    opacity: 1;
}

/* ============================================================================
   Section 6: Skeleton Loader
   ============================================================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--afn-surface) 25%,
        var(--afn-surface-2) 50%,
        var(--afn-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
    border-radius: var(--afn-radius-xs);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-heading {
    height: 28px;
    width: 40%;
    margin-bottom: 16px;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--afn-radius-sm);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ============================================================================
   Section 7: Number Counter
   ============================================================================ */
.counter-value {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}

.counter-value.is-counting {
    animation: counterPulse 120ms ease;
}

@keyframes counterPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================================================================
   Section 8: Toast Progress Bar
   ============================================================================ */
.atlas-toast {
    position: relative;
}

.atlas-toast::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--afn-cyan);
    animation: toastProgress 5.2s linear forwards;
}

.atlas-toast-success::after {
    background: var(--afn-green);
}

.atlas-toast-error::after {
    background: var(--afn-red);
}

.atlas-toast-warning::after {
    background: var(--afn-yellow);
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0; }
}

/* ============================================================================
   Section 9: Notification Bell Enhancement
   ============================================================================ */
.atlas-inbox-trigger:hover i {
    animation: bellBounce 0.4s ease;
}

@keyframes bellBounce {
    0%   { transform: rotate(0); }
    20%  { transform: rotate(14deg); }
    40%  { transform: rotate(-10deg); }
    60%  { transform: rotate(6deg); }
    80%  { transform: rotate(-2deg); }
    100% { transform: rotate(0); }
}

/* ============================================================================
   Section 10: prefers-reduced-motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .atlas-loaded .animate-in:not(.is-visible) {
        opacity: 1;
        transform: none;
    }
}

/* ----------------------------------
   PREMIUM STAT CARDS
----------------------------------- */
.premium-stat-card {
    background: linear-gradient(145deg, rgba(32, 216, 255, 0.08), rgba(4, 8, 18, 0.6) 60%);
    border: 1px solid rgba(32, 216, 255, 0.15);
    border-radius: var(--afn-radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    height: 100%;
}
.premium-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(32, 216, 255, 0.4);
    box-shadow: 0 12px 40px rgba(32, 216, 255, 0.1);
}
.premium-stat-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at top right, rgba(32, 216, 255, 0.1), transparent 50%);
    pointer-events: none;
}
.premium-stat-card .stat-icon {
    font-size: 32px;
    color: var(--afn-cyan);
    background: rgba(32, 216, 255, 0.1);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid rgba(32, 216, 255, 0.2);
}
.premium-stat-card span {
    font-size: 14px;
    color: var(--afn-text-soft);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.premium-stat-card strong {
    font-family: var(--afn-heading);
    font-size: 48px;
    line-height: 1.1;
    color: #fff;
    margin: 8px 0;
}
.premium-stat-card small {
    font-size: 14px;
    color: var(--afn-cyan);
    font-weight: 500;
}

.premium-stat-card.variant-purple {
    background: linear-gradient(145deg, rgba(117, 87, 255, 0.08), rgba(4, 8, 18, 0.6) 60%);
    border-color: rgba(117, 87, 255, 0.15);
}
.premium-stat-card.variant-purple:hover {
    border-color: rgba(117, 87, 255, 0.4);
    box-shadow: 0 12px 40px rgba(117, 87, 255, 0.1);
}
.premium-stat-card.variant-purple::after {
    background: radial-gradient(circle at top right, rgba(117, 87, 255, 0.1), transparent 50%);
}
.premium-stat-card.variant-purple .stat-icon {
    color: var(--afn-violet);
    background: rgba(117, 87, 255, 0.1);
    border-color: rgba(117, 87, 255, 0.2);
}
.premium-stat-card.variant-purple small {
    color: var(--afn-violet);
}

.premium-stat-card.variant-green {
    background: linear-gradient(145deg, rgba(53, 233, 140, 0.08), rgba(4, 8, 18, 0.6) 60%);
    border-color: rgba(53, 233, 140, 0.15);
}
.premium-stat-card.variant-green:hover {
    border-color: rgba(53, 233, 140, 0.4);
    box-shadow: 0 12px 40px rgba(53, 233, 140, 0.1);
}
.premium-stat-card.variant-green::after {
    background: radial-gradient(circle at top right, rgba(53, 233, 140, 0.1), transparent 50%);
}
.premium-stat-card.variant-green .stat-icon {
    color: var(--afn-green);
    background: rgba(53, 233, 140, 0.1);
    border-color: rgba(53, 233, 140, 0.2);
}
.premium-stat-card.variant-green small {
    color: var(--afn-green);
}

/* ----------------------------------
   PLAYER CARDS (GLOBAL)
----------------------------------- */
.player-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.player-card .panel-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
    border-bottom: none !important;
}
.player-card .player-card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.player-card-head h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
}
.player-card .profile-avatar-sm {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    font-size: 1.5rem;
}
.player-card .profile-lines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}
.player-card .profile-lines span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 50rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    font-size: 0.85rem;
}
.player-card .profile-lines span b {
    color: #fff;
    font-weight: normal;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Revert for list view */
.player-directory-grid[data-player-view="list"] .player-card .profile-lines span {
    border: none !important;
    background: transparent !important;
    padding: 0 10px !important;
    border-radius: 0 !important;
}
.player-directory-grid[data-player-view="list"] .player-card .panel-head {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.player-directory-grid[data-player-view="list"] .player-card .profile-avatar-sm {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    font-size: 1rem !important;
}

/* ============================================================================
   Custom Confirm Modal
   ============================================================================ */
.atlas-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(4, 8, 18, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.atlas-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.atlas-modal-dialog {
    background: var(--afn-surface);
    border: 1px solid var(--afn-line-strong);
    border-radius: var(--afn-radius-md);
    padding: 24px;
    width: 90%;
    max-width: 420px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--afn-shadow), 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}
.atlas-modal-dialog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--afn-cyan), var(--afn-violet));
}
.atlas-modal-backdrop.is-visible .atlas-modal-dialog {
    transform: translateY(0) scale(1);
}
.atlas-modal-title {
    font-family: var(--afn-heading);
    font-size: 26px;
    color: var(--afn-text);
    margin-bottom: 8px;
    line-height: 1.2;
    text-transform: uppercase;
}
.atlas-modal-message {
    color: var(--afn-text-soft);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}
.atlas-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


/* ==========================================================================
   Home Page — follows --afn-* design system
   Poster is featured, not used as palette driver
   ========================================================================== */

/* ---- Section label ---- */
.h2-section-label {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
}
.h2-section-label span {
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--afn-muted);
    white-space: nowrap;
}
.h2-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--afn-line);
}

/* ---- Shared buttons ---- */
.h2-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: var(--afn-radius-xs);
    font-family: var(--afn-display);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s ease;
}
.h2-btn:active { transform: scale(0.97); }
.h2-btn-primary {
    background: linear-gradient(135deg, var(--afn-blue), var(--afn-cyan));
    color: var(--afn-bg);
    box-shadow: 0 6px 24px rgba(22, 119, 255, 0.35);
}
.h2-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(32, 216, 255, 0.4);
    color: var(--afn-bg);
}
.h2-btn-ghost {
    background: transparent;
    color: var(--afn-text-soft);
    border: 1px solid var(--afn-line-strong);
}
.h2-btn-ghost:hover {
    border-color: var(--afn-cyan);
    color: var(--afn-cyan);
    transform: translateY(-2px);
}

/* ================================================================
   HERO — editorial 50/50 split
   ================================================================ */
.h2-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 40px;
}
.h2-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.h2-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--afn-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--afn-line) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: h2GridDrift 28s linear infinite;
    opacity: 0.6;
}
@keyframes h2GridDrift {
    from { transform: translateY(0); }
    to   { transform: translateY(64px); }
}
.h2-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}
.h2-glow-left {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(22, 119, 255, 0.18), transparent 70%);
    top: 10%; left: -5%;
}
.h2-glow-right {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(117, 87, 255, 0.12), transparent 70%);
    top: -5%; right: 0%;
}
.h2-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 64px;
    padding-top: 40px;
    padding-bottom: 100px;
}

/* Copy */
.h2-copy { display: flex; flex-direction: column; gap: 28px; }

.h2-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--afn-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--afn-cyan);
}
.h2-eyebrow-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--afn-cyan);
    box-shadow: 0 0 10px var(--afn-cyan);
    animation: h2DotPulse 2.4s ease-in-out infinite;
}
@keyframes h2DotPulse {
    0%,100% { box-shadow: 0 0 6px var(--afn-cyan); }
    50%      { box-shadow: 0 0 20px var(--afn-cyan), 0 0 36px rgba(32,216,255,0.3); }
}
.h2-headline {
    font-family: var(--afn-heading);
    font-size: clamp(3.6rem, 6.5vw, 7rem);
    font-weight: 900;
    line-height: 0.88;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--afn-text);
}
.h2-line-accent {
    color: var(--afn-cyan);
    text-shadow: 0 0 28px rgba(32, 216, 255, 0.3);
}
.h2-desc {
    color: var(--afn-text-soft);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 0;
}
.h2-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.h2-stats-row {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--afn-line);
}
.h2-stat { display: flex; flex-direction: column; gap: 3px; }
.h2-stat strong {
    font-family: var(--afn-heading);
    font-size: 1.9rem;
    color: var(--afn-text);
    line-height: 1;
}
.h2-stat span {
    font-size: 0.75rem;
    color: var(--afn-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.h2-stat-divider { width: 1px; height: 36px; background: var(--afn-line); }

/* Poster */
.h2-poster-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.h2-poster-frame {
    position: relative;
    border-radius: var(--afn-radius-md);
    overflow: hidden;
    max-width: 380px;
    width: 100%;
    border: 1px solid var(--afn-line-strong);
    box-shadow: var(--afn-shadow), 0 0 0 1px rgba(32, 216, 255, 0.08), 0 0 50px rgba(22, 119, 255, 0.18);
    animation: h2Float 7s ease-in-out infinite;
}
@keyframes h2Float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.h2-poster-img { display: block; width: 100%; height: auto; border-radius: var(--afn-radius-md); }
.h2-corner { position: absolute; width: 20px; height: 20px; z-index: 3; }
.h2-corner-tl { top:12px; left:12px;     border-top:2px solid var(--afn-cyan); border-left:2px solid var(--afn-cyan); }
.h2-corner-tr { top:12px; right:12px;    border-top:2px solid var(--afn-cyan); border-right:2px solid var(--afn-cyan); }
.h2-corner-bl { bottom:12px; left:12px;  border-bottom:2px solid var(--afn-line-strong); border-left:2px solid var(--afn-line-strong); }
.h2-corner-br { bottom:12px; right:12px; border-bottom:2px solid var(--afn-line-strong); border-right:2px solid var(--afn-line-strong); }
.h2-poster-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--afn-display);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--afn-muted);
}
.h2-poster-label i { color: var(--afn-cyan); }

/* ================================================================
   TICKER / MARQUEE
   ================================================================ */
.h2-ticker {
    overflow: hidden;
    background: var(--afn-surface);
    border-top: 1px solid var(--afn-line);
    border-bottom: 1px solid var(--afn-line);
    padding: 14px 0;
}
.h2-ticker-track { display: flex; overflow: hidden; }
.h2-ticker-content {
    display: flex;
    align-items: center;
    gap: 36px;
    white-space: nowrap;
    padding-left: 36px;
    animation: h2Ticker 30s linear infinite;
}
.h2-ticker-content span {
    font-family: var(--afn-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--afn-muted);
}
.h2-tick-accent { color: var(--afn-cyan) !important; font-size: 0.65rem !important; }
@keyframes h2Ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ================================================================
   TOURNAMENT SPOTLIGHT
   ================================================================ */
.h2-spotlight { padding: 100px 0; }
.h2-event-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-lg);
    overflow: hidden;
    background: var(--afn-surface);
    box-shadow: var(--afn-shadow), 0 0 0 1px rgba(32, 216, 255, 0.05);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.h2-event-card:hover {
    border-color: var(--afn-line-strong);
    box-shadow: var(--afn-shadow), 0 0 50px rgba(22, 119, 255, 0.1);
}
.h2-event-poster { position: relative; overflow: hidden; }
.h2-event-poster img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.h2-event-card:hover .h2-event-poster img { transform: scale(1.04); }
.h2-event-poster-fade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 50%, var(--afn-surface) 100%);
}
.h2-event-body {
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.h2-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--afn-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--afn-cyan);
    border: 1px solid var(--afn-line-strong);
    padding: 5px 14px;
    border-radius: var(--afn-radius-xs);
    width: fit-content;
    background: rgba(32, 216, 255, 0.06);
}
.h2-live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--afn-green);
    box-shadow: 0 0 8px var(--afn-green);
    animation: h2DotPulse 2.2s ease-in-out infinite;
}
.h2-event-name {
    font-family: var(--afn-heading);
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 900;
    color: var(--afn-text);
    line-height: 0.9;
    text-transform: uppercase;
    margin: 0;
}
.h2-event-meta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.h2-event-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--afn-text-soft);
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--afn-line);
    padding: 5px 12px;
    border-radius: var(--afn-radius-xs);
}
.h2-event-meta-row i { color: var(--afn-cyan); }
.h2-event-desc {
    color: var(--afn-text-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    max-width: 440px;
}

/* ================================================================
   COMMUNITY / DISCORD WIDGET
   ================================================================ */
.h2-community { padding: 60px 0 130px; }
.discord-widget-card { background: rgba(7, 16, 33, 0.6); border: 1px solid rgba(32, 216, 255, 0.1); border-radius: var(--afn-radius-lg); padding: 40px; margin-top: 30px; }
.discord-widget-icon { font-size: 3rem; color: #5865F2; margin-bottom: 20px; display: inline-block; }
.discord-widget-title { font-size: 2.2rem; margin-bottom: 1rem; color: var(--afn-text); }
.discord-widget-desc { font-size: 1.1rem; max-width: 480px; margin: 0 auto 1.5rem auto; }

/* ================================================================
   FEATURE CARDS
   ================================================================ */
.h2-features { padding: 60px 0; }
.h2-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.h2-feat-card {
    position: relative;
    padding: 40px 32px;
    background: var(--afn-surface);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.h2-feat-card:hover {
    transform: translateY(-5px);
    border-color: var(--afn-line-strong);
    box-shadow: var(--afn-shadow-soft), 0 0 24px rgba(32,216,255,0.06);
}
.h2-feat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 12%, rgba(32,216,255,0.05), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.h2-feat-card:hover::before { opacity: 1; }
.h2-feat-number {
    font-family: var(--afn-heading);
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,0.03);
    position: absolute;
    top: 10px; right: 18px;
    user-select: none;
}
.h2-feat-icon { font-size: 1.9rem; color: var(--afn-cyan); position: relative; z-index: 1; }
.h2-feat-icon.discord { color: #5865F2; }
.h2-feat-icon.team    { color: var(--afn-violet); }
.h2-feat-card h3 {
    font-family: var(--afn-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--afn-text);
    text-transform: uppercase;
    margin: 0;
    position: relative;
    z-index: 1;
}
.h2-feat-card p {
    color: var(--afn-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .h2-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .h2-copy { align-items: center; }
    .h2-headline { align-items: center; }
    .h2-poster-wrap { order: -1; }
    .h2-poster-frame { max-width: 300px; }
    .h2-stats-row { justify-content: center; }
    .h2-desc { max-width: 580px; text-align: center; }
    .h2-event-card { grid-template-columns: 240px 1fr; }
    .h2-features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .h2-event-card { grid-template-columns: 1fr; }
    .h2-event-poster { height: 260px; }
    .h2-event-poster-fade { background: linear-gradient(180deg, transparent 50%, var(--afn-surface) 100%); }
    .h2-event-body { padding: 32px 24px; }
    .h2-actions { flex-direction: column; width: 100%; }
    .h2-btn { justify-content: center; }
    .h2-features-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Animation System & Transitions
   ========================================================================== */

/* ## Section 1: Scroll-Reveal Foundation */
.atlas-loaded .animate-in:not(.is-visible) {
    opacity: 0;
    transform: translateY(18px);
}
.atlas-loaded .animate-in.is-visible {
    animation: afnFadeUp 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stagger-1 { animation-delay: 60ms; }
.stagger-2 { animation-delay: 120ms; }
.stagger-3 { animation-delay: 180ms; }
.stagger-4 { animation-delay: 240ms; }
.stagger-5 { animation-delay: 300ms; }
.stagger-6 { animation-delay: 360ms; }
.stagger-7 { animation-delay: 420ms; }
.stagger-8 { animation-delay: 480ms; }

/* ## Section 2: Card Hover Glow (Mouse Tracking) */
.panel-card, .team-card, .tournament-card, .player-card, .stat-card {
    position: relative;
    overflow: hidden;
}
.panel-card::before, .team-card::before, .tournament-card::before, .player-card::before, .stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(32, 216, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}
.panel-card:hover::before, .team-card:hover::before, .tournament-card:hover::before, .player-card:hover::before, .stat-card:hover::before {
    opacity: 1;
}

/* ## Section 3: Button Press Feedback */
.btn, .h2-btn {
    position: relative;
    overflow: hidden;
}
.btn::after, .h2-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 10%, transparent 10.01%);
    transform: scale(10);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}
.btn:active:not(:disabled)::after, .h2-btn:active:not(:disabled)::after {
    transform: scale(0);
    opacity: 0.12;
    transition: 0s;
}

/* ## Section 4: Page Transition Overlay */
.atlas-page-transition {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--afn-bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.atlas-page-transition.is-leaving {
    opacity: 1;
    pointer-events: auto;
}
.atlas-page-transition.is-entering {
    animation: atlasPageFadeOut 400ms ease forwards;
}
@keyframes atlasPageFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ## Section 5: Sidebar Active Indicator Enhancement */
.atlas-sidebar-nav .nav-link {
    position: relative;
    transition: background 280ms cubic-bezier(0.23,1,0.32,1), border-color 280ms cubic-bezier(0.23,1,0.32,1), color 280ms cubic-bezier(0.23,1,0.32,1), transform 280ms cubic-bezier(0.23,1,0.32,1);
}
.atlas-sidebar-nav .nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(32,216,255,0.08);
    opacity: 0;
    transition: opacity 280ms cubic-bezier(0.23,1,0.32,1);
    pointer-events: none;
}
.atlas-sidebar-nav .nav-link:hover::before, .atlas-sidebar-nav .nav-link.active::before {
    opacity: 1;
}

/* ## Section 6: Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--afn-surface) 25%, var(--afn-surface-2) 50%, var(--afn-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
    border-radius: var(--afn-radius-xs);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-heading { height: 28px; width: 40%; margin-bottom: 16px; }
.skeleton-card { height: 200px; border-radius: var(--afn-radius-sm); }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

/* ## Section 7: Number Counter */
.counter-value {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
.counter-value.is-counting {
    animation: counterPulse 120ms ease;
}
@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ## Section 8: Toast Progress Bar */
.atlas-toast {
    position: relative;
    overflow: hidden;
}
.atlas-toast::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--afn-cyan);
    animation: toastProgress 5.2s linear forwards;
}
.atlas-toast-success::after { background: var(--afn-green); }
.atlas-toast-error::after { background: var(--afn-red); }
.atlas-toast-warning::after { background: var(--afn-yellow); }
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0; }
}

/* ## Section 9: Notification Bell Enhancement */
.atlas-inbox-trigger:hover i {
    animation: bellBounce 0.4s ease;
}
@keyframes bellBounce {
    0% { transform: rotate(0); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(6deg); }
    80% { transform: rotate(-2deg); }
    100% { transform: rotate(0); }
}

/* ## Section 10: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .atlas-loaded .animate-in:not(.is-visible) {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Players Directory Enhancements (Pagination & Cards)
   ========================================================================== */

/* Modern Pagination */
.modern-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--afn-line);
}
.modern-pagination .page-number-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.02);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--afn-line);
}
.modern-pagination .page-number-strip a,
.modern-pagination .page-number-strip span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-family: var(--afn-display, Outfit, sans-serif);
    font-weight: 700;
    font-size: 1rem;
    color: var(--afn-text-soft);
    text-decoration: none;
    transition: all 0.2s ease;
}
.modern-pagination .page-number-strip a:hover {
    background: rgba(255,255,255,0.06);
    color: var(--afn-text);
}
.modern-pagination .page-number-strip .is-current {
    background: var(--afn-cyan);
    color: var(--afn-bg);
    box-shadow: 0 4px 12px rgba(32, 216, 255, 0.3);
}
.modern-pagination .page-number-strip .ellipsis {
    color: var(--afn-faint);
    background: transparent;
}

/* Card Stats Pills (Uniform 2-column grid instead of flex-wrap) */
.player-card .profile-lines {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding-top: 12px !important;
}
.player-card .profile-lines span {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 10px !important;
    border-radius: var(--afn-radius-xs, 8px) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    background: rgba(255,255,255,0.02) !important;
    font-size: 0.82rem !important;
    width: 100% !important;
}
.player-card .profile-lines span b {
    color: var(--afn-text-soft) !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: none !important;
}


/* ─── Modal ────────────────────────────────────────── */
/* Custom entrance animation */
@keyframes atlasModalSlideIn {
    0% { opacity: 0; transform: scale(0.92) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes atlasModalSlideOut {
    0% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.92) translateY(20px); }
}
.modal .modal-dialog {
    animation: none;
}
.modal.show .modal-dialog {
    animation: atlasModalSlideIn 0.35s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.modal.hiding .modal-dialog {
    animation: atlasModalSlideOut 0.2s ease forwards;
}

.atlas-modal {
    background: var(--afn-bg-soft);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    color: var(--afn-text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.atlas-modal .modal-header {
    border-bottom: 1px solid var(--afn-line);
    padding: 1.25rem 1.5rem;
}
.atlas-modal .modal-title {
    font-family: var(--afn-display);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.atlas-modal .modal-body {
    padding: 1.5rem;
}

/* Order summary */
.modal-order-summary {
    display: flex;
    justify-content: space-between;
    background: var(--afn-card-bg-soft);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-xs);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.modal-order-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.modal-label {
    font-size: 0.72rem;
    font-family: var(--afn-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--afn-faint);
}
.modal-order-item strong {
    font-family: var(--afn-display);
    font-size: 1.15rem;
    font-weight: 700;
}
.modal-price-highlight {
    color: var(--afn-cyan) !important;
}

/* Player info */
.modal-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(53, 233, 140, 0.05);
    border: 1px solid rgba(53, 233, 140, 0.12);
    border-radius: var(--afn-radius-xs);
    padding: 10px 14px;
    margin-bottom: 1.25rem;
}
.modal-player-info > i {
    color: var(--afn-green);
    font-size: 1.2rem;
}
.modal-player-info span {
    font-weight: 600;
    font-size: 0.9rem;
}
.modal-player-info small {
    display: block;
    font-size: 0.78rem;
    color: var(--afn-muted);
}

/* Payment methods */
.modal-payment-section {
    margin-bottom: 1.25rem;
}
.modal-payment-section > h6 {
    font-family: var(--afn-display);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--afn-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-payment-section > h6 i { color: var(--afn-cyan); }
.modal-payment-method {
    background: var(--afn-card-bg-soft);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-xs);
    padding: 12px 14px;
    margin-bottom: 8px;
}
.modal-payment-method-head strong {
    font-size: 0.84rem;
}
.modal-rib-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 6px 10px;
}
.modal-rib-row code {
    font-size: 0.78rem;
    color: var(--afn-cyan);
    letter-spacing: 0.02em;
}
.modal-payment-note {
    font-size: 0.8rem;
    color: var(--afn-muted);
    margin: 6px 0 0;
}

/* Copy feedback */
.modal-copy-btn .bi-check2 { color: var(--afn-green); }

/* CTA */
.modal-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.modal-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--afn-faint);
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ==========================================================================
   PWA & MOBILE UI OPTIMIZATIONS (2026-07)
   ========================================================================== */

/* ── Mobile Topbar ── */
.atlas-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 66px;
    background: rgba(4, 8, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--afn-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1030;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
.atlas-mobile-notif {
    color: var(--afn-text-soft);
    font-size: 1.2rem;
    padding: 8px;
}

/* ── Bottom Navigation Bar ── */
.atlas-bottom-nav {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    width: calc(100% - 32px);
    border-radius: 32px;
    background: rgba(18, 25, 43, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    z-index: 1030;
    padding: 2px 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
.atlas-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--afn-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}
.atlas-bnav-item i {
    font-size: 1.3rem;
    margin-bottom: 3px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.atlas-bnav-item span {
    font-family: var(--afn-body);
    font-size: 0.65rem;
    font-weight: 500;
}
.atlas-bnav-item:hover, .atlas-bnav-item:active {
    color: var(--afn-text-soft);
}
.atlas-bnav-item.is-active {
    color: var(--afn-cyan);
}
.atlas-bnav-item.is-active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(32, 216, 255, 0.4));
}

/* Override body padding for mobile navs */
@media (max-width: 991.98px) {
    .page-shell {
        /* Height of bottom nav + floating margins */
        padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
    }
}

/* ── PWA Install Banner ── */
.atlas-install-banner {
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    background: rgba(7, 16, 33, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--afn-line-strong);
    border-radius: var(--afn-radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1040;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (min-width: 992px) {
    .atlas-install-banner {
        bottom: 24px;
        left: 282px; /* Sidebar width */
        right: auto;
        width: 380px;
    }
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.atlas-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--afn-bg);
}
.atlas-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.atlas-install-text strong {
    font-family: var(--afn-heading);
    font-size: 1.1rem;
    color: var(--afn-text);
    line-height: 1.1;
}
.atlas-install-text small {
    font-size: 0.75rem;
    color: var(--afn-text-soft);
}
.atlas-install-close {
    background: none;
    border: none;
    color: var(--afn-muted);
    padding: 4px;
    font-size: 1.1rem;
}

/* ── Matchmaking Key Card ── */
.matchmaking-key-card {
    background: var(--afn-bg-soft);
    border: 1px solid var(--afn-line);
    border-radius: var(--afn-radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}
.matchmaking-key-header {
    margin-bottom: 16px;
}
.matchmaking-key-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(32, 216, 255, 0.1);
    color: var(--afn-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(32, 216, 255, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(32, 216, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(32, 216, 255, 0); }
}
.matchmaking-key-display {
    background: #000;
    border-radius: var(--afn-radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px inset rgba(255,255,255,0.05);
}
.matchmaking-key-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--afn-text);
    letter-spacing: 0.1em;
}
.matchmaking-key-copy {
    width: 100%;
    min-height: 56px; /* Thumb friendly */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--afn-surface);
    border: 1px solid var(--afn-line-strong);
    border-radius: var(--afn-radius-sm);
    color: var(--afn-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.matchmaking-key-copy:active {
    transform: scale(0.98);
}
.matchmaking-key-copy.is-copied {
    background: rgba(53, 233, 140, 0.1);
    color: var(--afn-green);
    border-color: var(--afn-green);
}

/* ── Bracket & Table Scroll Optimizations ── */
.bracket-wrapper, .pipeline-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 16px; /* Space for scrollbar */
}
.horizontal-pipeline {
    min-width: max(100%, 800px); /* Ensure it doesn't squish too much */
}
.bracket-round, .pipeline-col {
    scroll-snap-align: start;
}
/* Table responsive wrapper with fade edges */
.table-responsive-atlas {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    background-image: 
        linear-gradient(to right, var(--afn-bg-soft), rgba(7,16,33,0)),
        linear-gradient(to left, var(--afn-bg-soft), rgba(7,16,33,0));
    background-position: left center, right center;
    background-repeat: no-repeat;
    background-size: 20px 100%;
    background-attachment: local, local;
}


/* Mobile PWA Enhancements */
body { overscroll-behavior-y: none; }

