:root {
    --bg: #050810;
    --bg-strong: #090d17;
    --surface: rgba(13, 18, 30, 0.84);
    --surface-alt: rgba(17, 23, 38, 0.94);
    --ink: #eff6ff;
    --muted: rgba(239, 246, 255, 0.76);
    --muted-strong: rgba(239, 246, 255, 0.9);
    --cyan: #6fe7ff;
    --cyan-strong: #5aaee8;
    --amber: #ffd166;
    --amber-strong: #f0b43a;
    --mint: #9effcf;
    --pink: #ff6b9e;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

@font-face {
    font-family: 'ChessIQ Display';
    src: url('assets/fonts/PixelatedEleganceRegular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'ChessIQ Compact';
    src: url('assets/fonts/Cairopixel-Regular.ttf') format('truetype');
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(90, 174, 232, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(255, 209, 102, 0.16), transparent 24%),
        radial-gradient(circle at 85% 55%, rgba(255, 107, 158, 0.1), transparent 18%),
        linear-gradient(180deg, #101724 0%, #090d17 42%, var(--bg) 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background-image:
        linear-gradient(to right, rgba(111, 231, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(111, 231, 255, 0.04) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 84%);
}

body::after {
    background: radial-gradient(circle at center, transparent 46%, rgba(0, 0, 0, 0.4) 100%);
}

.page-shell {
    position: relative;
    overflow: hidden;
}

.ambient-grid,
.ambient-glow,
.ambient-ring {
    position: absolute;
    pointer-events: none;
}

.ambient-grid {
    inset: 0;
    background:
        radial-gradient(circle at 20% 16%, rgba(90, 174, 232, 0.14), transparent 18%),
        radial-gradient(circle at 76% 12%, rgba(255, 209, 102, 0.12), transparent 16%),
        radial-gradient(circle at 70% 70%, rgba(255, 107, 158, 0.08), transparent 16%);
}

.ambient-glow {
    border-radius: 50%;
    filter: blur(18px);
}

.ambient-glow-cyan {
    top: -120px;
    left: -110px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(90, 174, 232, 0.34), rgba(90, 174, 232, 0));
}

.ambient-glow-amber {
    top: 140px;
    right: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.24), rgba(255, 209, 102, 0));
}

.ambient-glow-pink {
    bottom: 260px;
    left: 58%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 107, 158, 0.16), rgba(255, 107, 158, 0));
}

.ambient-ring {
    left: 52%;
    top: 210px;
    transform: translateX(-50%);
    clip-path: polygon(50% 0%, 86% 18%, 100% 50%, 86% 82%, 50% 100%, 14% 82%, 0% 50%, 14% 18%);
}

.ambient-ring-outer {
    width: min(46vw, 660px);
    height: min(46vw, 660px);
    border: 1px solid rgba(90, 174, 232, 0.18);
    box-shadow: 0 0 48px rgba(90, 174, 232, 0.08);
    animation: spinForward 34s linear infinite;
}

.ambient-ring-inner {
    top: 280px;
    width: min(30vw, 430px);
    height: min(30vw, 430px);
    border: 1px solid rgba(255, 209, 102, 0.18);
    box-shadow: 0 0 38px rgba(255, 209, 102, 0.08);
    animation: spinBackward 22s linear infinite;
}

.topbar,
.content-wrap,
.page-footer {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 0 14px;
}

.topbar-brand,
.topbar-nav a,
.text-link,
.secondary-text-link,
.page-footer a {
    color: var(--ink);
    text-decoration: none;
}

.topbar-brand {
    font-family: 'Sora', sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.topbar-rail {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-nav a,
.topbar-status {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    font-weight: 700;
}

.topbar-status {
    color: var(--cyan);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-wrap {
    padding-bottom: 44px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(520px, 0.98fr);
    gap: 30px;
    align-items: stretch;
    padding: clamp(30px, 4vw, 44px);
    min-height: 760px;
    border-radius: 38px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(13, 18, 30, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-stage,
.section-block,
.page-footer {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow,
.card-label,
.section-number,
.leaderboard-label {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow,
.card-label {
    color: var(--cyan);
}

.hero-wordmark {
    display: block;
    width: min(490px, 100%);
    height: clamp(110px, 11vw, 176px);
    margin: 16px 0 20px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.24));
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--ink);
}

h1 {
    max-width: 8.5ch;
    margin-bottom: 22px;
    font-family: 'ChessIQ Display', 'Sora', sans-serif;
    font-size: clamp(4rem, 7vw, 7.3rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.8rem, 2.6vw, 2.8rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.42rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.72;
}

.hero-lead {
    max-width: 48rem;
    font-size: 1.16rem;
    color: var(--muted-strong);
}

.hero-note {
    max-width: 50rem;
}

.hero-actions,
.leaderboard-actions,
.mode-chip-row,
.academy-lane-list,
.play-ribbon,
.page-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 26px;
}

.hero-avatar-block {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.hero-avatar-block-head {
    display: grid;
    gap: 6px;
}

.hero-avatar-kicker {
    margin: 0;
    color: var(--amber);
    font-family: 'Sora', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-avatar-caption {
    margin: 0;
    max-width: 46rem;
    font-size: 0.96rem;
    line-height: 1.6;
}

.hero-avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hero-avatar-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-avatar-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(111, 231, 255, 0.12), transparent 46%);
    pointer-events: none;
}

.hero-avatar-card:nth-child(2)::before {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.14), transparent 46%);
}

.hero-avatar-card:nth-child(3)::before {
    background: linear-gradient(135deg, rgba(158, 255, 207, 0.12), transparent 46%);
}

.hero-avatar-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.hero-avatar-frame {
    position: relative;
    overflow: hidden;
    width: 82px;
    aspect-ratio: 0.92;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 10, 18, 0.78);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
    animation: avatarPortraitDrift 7.2s ease-in-out infinite;
}

.hero-avatar-card:nth-child(2) .hero-avatar-frame {
    animation-delay: -2.1s;
}

.hero-avatar-card:nth-child(3) .hero-avatar-frame {
    animation-delay: -4.3s;
}

.hero-avatar-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(6, 10, 18, 0.16) 100%);
    pointer-events: none;
}

.hero-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.28);
    filter: saturate(1.02) contrast(1.02);
}

.hero-avatar-card-elias .hero-avatar-image {
    object-position: 50% 44%;
}

.hero-avatar-card-ren .hero-avatar-image {
    object-position: 50% 42%;
}

.hero-avatar-card-ben .hero-avatar-image {
    object-position: 50% 46%;
}

.hero-avatar-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
}

.hero-avatar-role {
    color: var(--amber);
    font-family: 'Sora', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-avatar-name {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-avatar-text {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.48;
}

.primary-button,
.secondary-button,
.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 18px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.primary-button {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
    color: #061219;
    box-shadow: 0 18px 34px rgba(90, 174, 232, 0.26);
}

.secondary-button,
.refresh-button {
    border: 1px solid rgba(255, 209, 102, 0.22);
    background: rgba(255, 209, 102, 0.08);
    color: #fff2c5;
}

.hero-signal-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hero-signal-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.hero-signal-card-cyan {
    background: linear-gradient(180deg, rgba(111, 231, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.hero-signal-card-amber {
    background: linear-gradient(180deg, rgba(255, 209, 102, 0.14), rgba(255, 255, 255, 0.04));
}

.hero-signal-value {
    color: var(--ink);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-signal-label {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.hero-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    min-height: 680px;
    padding: 18px;
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(10, 14, 24, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 24%, rgba(111, 231, 255, 0.1), transparent 18%),
        radial-gradient(circle at 78% 24%, rgba(255, 209, 102, 0.1), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
    pointer-events: none;
}

.hero-stage-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 28px;
    clip-path: polygon(50% 0%, 86% 18%, 100% 50%, 86% 82%, 50% 100%, 14% 82%, 0% 50%, 14% 18%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stage-ring-a {
    width: 280px;
    height: 280px;
    border-color: rgba(90, 174, 232, 0.2);
    box-shadow: 0 0 28px rgba(90, 174, 232, 0.1);
    animation: spinStageForward 20s linear infinite;
}

.hero-stage-ring-b {
    width: 180px;
    height: 180px;
    border-color: rgba(255, 209, 102, 0.2);
    box-shadow: 0 0 24px rgba(255, 209, 102, 0.08);
    animation: spinStageBackward 14s linear infinite;
}

.stage-console,
.stage-card {
    position: relative;
    z-index: 1;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stage-console {
    grid-row: 1 / span 2;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stage-console-top {
    display: flex;
    gap: 8px;
}

.stage-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.stage-dot-cyan {
    background: var(--cyan);
}

.stage-dot-amber {
    background: var(--amber);
}

.stage-dot-mint {
    background: var(--mint);
}

.stage-console-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 16px;
    align-items: center;
    padding: 20px 18px;
    border-radius: 22px;
    background: rgba(7, 11, 18, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stage-app-icon {
    width: 94px;
    height: 94px;
    border-radius: 24px;
    display: block;
    margin: 0 auto 18px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

.stage-menu-stack {
    display: grid;
    gap: 12px;
}

.stage-menu-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 18px;
    color: var(--ink);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 0.94rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.stage-menu-card-primary {
    background: linear-gradient(135deg, rgba(111, 231, 255, 0.22), rgba(90, 174, 232, 0.12));
}

.stage-menu-card-secondary {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(255, 209, 102, 0.1));
}

.stage-menu-card-tertiary {
    background: linear-gradient(135deg, rgba(158, 255, 207, 0.18), rgba(111, 231, 255, 0.08));
}

.stage-meter-stack {
    display: grid;
    gap: 10px;
}

.stage-meter {
    position: relative;
    display: block;
    width: 100%;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.stage-meter::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 999px;
}

.stage-meter-cyan::after {
    background: linear-gradient(90deg, rgba(111, 231, 255, 0.2), rgba(111, 231, 255, 0.95));
}

.stage-meter-amber::after {
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.18), rgba(255, 209, 102, 0.92));
}

.stage-meter.short {
    height: 24px;
}

.stage-move-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-move-ribbon span,
.play-ribbon span,
.academy-lane-list span,
.mode-chip-row span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.stage-move-ribbon span {
    color: rgba(239, 246, 255, 0.82);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stage-card {
    padding: 18px;
}

.stage-card-study {
    transform: translateY(22px) rotate(-1.2deg);
}

.stage-card-exam {
    transform: translateY(-12px) rotate(1.1deg);
}

.stage-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.stage-card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(111, 231, 255, 0.18);
    background: rgba(111, 231, 255, 0.08);
    color: var(--cyan);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stage-card-tag-amber {
    border-color: rgba(255, 209, 102, 0.2);
    background: rgba(255, 209, 102, 0.08);
    color: var(--amber);
}

.selector-art-frame {
    position: relative;
    min-height: 280px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at center, rgba(111, 231, 255, 0.16), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(7, 10, 18, 0.38)),
        rgba(6, 10, 18, 0.82);
}

.selector-art-frame-amber {
    background:
        radial-gradient(circle at center, rgba(255, 209, 102, 0.18), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(7, 10, 18, 0.38)),
        rgba(6, 10, 18, 0.82);
}

.selector-art-base,
.selector-art-glow,
.selector-art-sweep {
    position: absolute;
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    object-fit: contain;
    object-position: center;
}

.selector-art-base {
    z-index: 1;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.24));
}

.selector-art-glow {
    z-index: 2;
    opacity: 0.14;
    mix-blend-mode: screen;
}

.selector-art-sweep {
    z-index: 3;
    opacity: 0;
    mix-blend-mode: screen;
    filter: saturate(1.22) brightness(1.12);
    -webkit-mask-image: linear-gradient(120deg, transparent 34%, rgba(0, 0, 0, 0.32) 44%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.32) 57%, transparent 68%);
    -webkit-mask-size: 250% 160%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: 140% 0;
    mask-image: linear-gradient(120deg, transparent 34%, rgba(0, 0, 0, 0.32) 44%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.32) 57%, transparent 68%);
    mask-size: 250% 160%;
    mask-repeat: no-repeat;
    mask-position: 140% 0;
    animation: selectorGlare 6.2s ease-in-out infinite;
}

.stage-card-exam .selector-art-sweep {
    animation-delay: -2.6s;
}

.hero-piece {
    position: absolute;
    width: 82px;
    height: auto;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
    animation: pieceFloat 7.2s ease-in-out infinite;
}

.hero-piece-king {
    left: 42%;
    bottom: 26px;
}

.hero-piece-queen {
    right: 8px;
    top: 50%;
    animation-delay: -1.8s;
}

.hero-piece-knight {
    right: 90px;
    bottom: 44px;
    animation-delay: -3.4s;
}

.hero-piece-bishop {
    left: 20px;
    top: 46px;
    width: 68px;
    animation-delay: -2.1s;
}

.section-block {
    margin-top: 22px;
    padding: 32px 34px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(13, 18, 30, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(111, 231, 255, 0.12);
    color: var(--cyan);
}

.section-intro {
    max-width: 58rem;
    margin-bottom: 22px;
    font-size: 1.04rem;
}

.mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 18px;
    align-items: stretch;
}

.mode-stack {
    display: grid;
    gap: 18px;
}

.mode-panel {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
}

.mode-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%);
    pointer-events: none;
}

.analysis-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(220px, 0.7fr);
    gap: 20px;
    align-items: center;
    min-height: 360px;
}

.analysis-visual {
    position: relative;
    min-height: 290px;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(111, 231, 255, 0.12), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(6, 10, 18, 0.4)),
        rgba(6, 10, 18, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.analysis-grid {
    position: absolute;
    inset: 16px;
    border-radius: 18px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.24;
}

.analysis-piece {
    position: absolute;
    height: auto;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28));
    animation: pieceFloat 7.2s ease-in-out infinite;
}

.analysis-piece-main {
    right: 18px;
    top: 12px;
    width: 180px;
}

.analysis-piece-support {
    left: 24px;
    bottom: 24px;
    width: 116px;
    animation-delay: -2.6s;
}

.play-panel {
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
}

.academy-panel {
    background:
        linear-gradient(180deg, rgba(111, 231, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
}

.challenger-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.challenger-card {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px 20px 24px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.challenger-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 38%);
    pointer-events: none;
}

.challenger-card:nth-child(2) {
    transform: translateY(22px);
}

.challenger-card:nth-child(4) {
    transform: translateY(18px);
}

.challenger-card-prime {
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
}

.challenger-portrait-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border-radius: 22px;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(6, 10, 18, 0.24)),
        rgba(7, 11, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenger-portrait {
    width: min(160px, 100%);
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
}

.challenger-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.challenger-rank,
.challenger-range {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.challenger-rank {
    color: var(--cyan);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
}

.challenger-range {
    color: rgba(239, 246, 255, 0.82);
}

.challenger-quote {
    margin-bottom: 0;
    color: var(--muted-strong);
    font-size: 0.98rem;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
    gap: 20px;
    align-items: stretch;
}

.leaderboard-spotlight,
.leaderboard-panel {
    padding: 26px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(17, 23, 38, 0.94);
}

.leaderboard-lead,
.leaderboard-privacy {
    color: var(--muted);
}

.leaderboard-desk-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-desk-note p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

.leaderboard-desk-portrait {
    position: relative;
    overflow: hidden;
    flex: 0 0 58px;
    width: 58px;
    aspect-ratio: 1;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 10, 18, 0.82);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.leaderboard-desk-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 9, 12, 0.32), transparent 38%),
        linear-gradient(90deg, rgba(7, 9, 12, 0.28), transparent 18%, transparent 82%, rgba(7, 9, 12, 0.28));
    pointer-events: none;
}

.leaderboard-desk-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.28);
    object-position: 50% 44%;
}

.leaderboard-label {
    color: var(--amber);
}

.podium-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.podium-card,
.podium-placeholder {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(7, 11, 18, 0.72);
}

.podium-placeholder {
    grid-column: 1 / -1;
    color: var(--muted);
}

.podium-card-rank-1 {
    grid-row: 1 / span 2;
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(7, 11, 18, 0.72);
}

.podium-card-rank-2 {
    background:
        linear-gradient(180deg, rgba(111, 231, 255, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(7, 11, 18, 0.72);
}

.podium-card-rank-3 {
    background:
        linear-gradient(180deg, rgba(255, 107, 158, 0.1), rgba(255, 255, 255, 0.02)),
        rgba(7, 11, 18, 0.72);
}

.podium-rank {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--amber);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.podium-card-rank-2 .podium-rank {
    color: var(--cyan);
}

.podium-card-rank-3 .podium-rank {
    color: var(--pink);
}

.podium-handle {
    display: block;
    margin: 18px 0 8px;
    color: var(--ink);
    font-family: 'ChessIQ Display', 'Sora', sans-serif;
    font-size: 2rem;
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.podium-card-rank-2 .podium-handle,
.podium-card-rank-3 .podium-handle {
    font-size: 1.54rem;
}

.podium-country,
.podium-title,
.podium-score {
    display: block;
}

.podium-country {
    color: rgba(239, 246, 255, 0.82);
    font-weight: 700;
}

.podium-title {
    margin-top: 8px;
    color: rgba(239, 246, 255, 0.62);
    font-size: 0.94rem;
}

.podium-score {
    margin-top: 16px;
    color: var(--ink);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chessiq-scoreboard-status,
.chessiq-scoreboard-meta {
    margin-bottom: 12px;
}

.chessiq-scoreboard-status {
    color: var(--cyan);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 0.96rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chessiq-scoreboard-meta {
    color: var(--muted);
}

.leaderboard-shell {
    margin-top: 14px;
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 9, 16, 0.66);
}

.leaderboard-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table thead th {
    position: sticky;
    top: 0;
    background: rgba(8, 11, 18, 0.96);
    z-index: 1;
    color: rgba(239, 246, 255, 0.72);
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leaderboard-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.chessiq-rank-cell {
    width: 48px;
    color: var(--amber);
    font-family: 'ChessIQ Display', 'Sora', sans-serif;
    font-size: 1rem;
}

.chessiq-player-cell,
.chessiq-score-cell {
    color: var(--ink);
}

.chessiq-player-handle {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.chessiq-player-title {
    display: block;
    color: rgba(239, 246, 255, 0.62);
    font-size: 0.88rem;
    line-height: 1.4;
}

.chessiq-country-cell {
    color: rgba(239, 246, 255, 0.86);
}

.chessiq-country-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chessiq-score-cell {
    text-align: right;
    font-family: 'ChessIQ Compact', 'Sora', sans-serif;
}

.leaderboard-actions {
    margin-top: 18px;
    align-items: center;
}

.refresh-button {
    cursor: pointer;
}

.refresh-button:disabled {
    opacity: 0.72;
    cursor: progress;
}

.text-link,
.secondary-text-link,
.page-footer a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 34px;
}

.page-footer p {
    margin: 0;
    font-size: 0.94rem;
}

@keyframes spinForward {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@keyframes spinBackward {
    from {
        transform: translateX(-50%) rotate(360deg);
    }

    to {
        transform: translateX(-50%) rotate(0deg);
    }
}

@keyframes spinStageForward {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spinStageBackward {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes selectorGlare {

    0%,
    18% {
        opacity: 0;
        -webkit-mask-position: 140% 0;
        mask-position: 140% 0;
    }

    30% {
        opacity: 0.84;
    }

    52% {
        opacity: 1;
        -webkit-mask-position: 34% 0;
        mask-position: 34% 0;
    }

    72%,
    100% {
        opacity: 0;
        -webkit-mask-position: -120% 0;
        mask-position: -120% 0;
    }
}

@keyframes pieceFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes avatarPortraitDrift {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -6px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .hero-avatar-card,
    .hero-avatar-frame {
        animation: none;
        transition: none;
    }
}

@media (max-width: 1280px) {

    .hero,
    .leaderboard-grid,
    .mode-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 760px;
    }

    .challenger-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .challenger-card:nth-child(2),
    .challenger-card:nth-child(4) {
        transform: none;
    }
}

@media (max-width: 980px) {

    .hero-signal-row,
    .challenger-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-avatar-grid {
        grid-template-columns: 1fr;
    }

    .analysis-panel {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }

    .stage-console {
        grid-row: auto;
    }

    .stage-card-study,
    .stage-card-exam {
        transform: none;
    }

    .podium-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .podium-card-rank-1 {
        grid-row: auto;
    }
}

@media (max-width: 720px) {

    .topbar,
    .content-wrap,
    .page-footer {
        width: min(100% - 20px, 1440px);
    }

    .topbar,
    .page-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-rail,
    .topbar-nav,
    .hero-actions,
    .leaderboard-actions,
    .page-footer-links {
        width: 100%;
    }

    .topbar-nav {
        justify-content: flex-start;
    }

    .hero,
    .section-block {
        padding: 22px;
        border-radius: 24px;
    }

    h1 {
        max-width: none;
        font-size: 2.9rem;
    }

    .primary-button,
    .secondary-button,
    .refresh-button,
    .topbar-nav a,
    .topbar-status {
        width: 100%;
    }

    .hero-signal-row,
    .challenger-grid {
        grid-template-columns: 1fr;
    }

    .stage-console-body {
        grid-template-columns: 1fr;
    }

    .stage-meter-stack {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-piece {
        width: 56px;
    }

    .hero-piece-queen {
        top: 58%;
    }

    .leaderboard-table {
        min-width: 0;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 12px 10px;
        font-size: 0.92rem;
    }
}

/* Premium alignment pass: sharper ChessIQ surface with polygon motion instead of soft ambient glow. */
:root {
    --bg: #050608;
    --bg-strong: #0a0d10;
    --surface: rgba(244, 246, 241, 0.06);
    --surface-alt: rgba(244, 246, 241, 0.09);
    --ink: #f7f8f4;
    --muted: rgba(247, 248, 244, 0.66);
    --muted-strong: rgba(247, 248, 244, 0.86);
    --cyan: #d8f4ff;
    --cyan-strong: #83d8f2;
    --amber: #f0df9e;
    --amber-strong: #d7c177;
    --mint: #dff5e6;
    --pink: #e5b4c5;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

body {
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.075), transparent 33%),
        linear-gradient(180deg, #0b0d10 0%, #050608 52%, #0a0b0d 100%);
}

body::before {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(247, 248, 244, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(247, 248, 244, 0.035) 1px, transparent 1px);
}

body::after {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
}

.ambient-grid {
    background:
        linear-gradient(130deg, rgba(216, 244, 255, 0.1), transparent 32%),
        repeating-linear-gradient(45deg, rgba(247, 248, 244, 0.06) 0 1px, transparent 1px 34px);
    clip-path: polygon(4% 16%, 54% 0%, 96% 34%, 82% 92%, 24% 100%, 0% 48%);
    inset: 7% -18% auto auto;
    width: min(62vw, 820px);
    aspect-ratio: 1;
    opacity: 0.28;
    animation: chessiqPremiumPolygon 22s ease-in-out infinite;
}

.ambient-glow {
    border-radius: 0;
    filter: none;
    border: 1px solid rgba(247, 248, 244, 0.12);
    background: repeating-linear-gradient(120deg, rgba(247, 248, 244, 0.09) 0 1px, transparent 1px 26px);
    clip-path: polygon(50% 0%, 100% 28%, 86% 88%, 24% 100%, 0% 42%);
    opacity: 0.16;
}

.ambient-glow-cyan,
.ambient-glow-amber,
.ambient-glow-pink {
    width: 260px;
    height: 260px;
}

.ambient-ring {
    border-radius: 0;
}

.topbar,
.content-wrap,
.page-footer {
    width: min(1240px, calc(100% - 40px));
}

.topbar {
    position: relative;
    z-index: 2;
    padding-top: 20px;
}

.topbar-brand,
.topbar-nav a,
.topbar-status,
.primary-button,
.secondary-button,
.refresh-button,
.hero-signal-card,
.stage-console,
.stage-card,
.section-block,
.mode-panel,
.challenger-card,
.leaderboard-spotlight,
.leaderboard-panel,
.podium-card,
.podium-placeholder,
.leaderboard-shell,
.stage-menu-card,
.stage-meter,
.stage-move-ribbon span,
.play-ribbon span,
.academy-lane-list span,
.mode-chip-row span,
.chessiq-country-badge {
    border-radius: 8px;
}

.topbar-nav a,
.topbar-status {
    background: rgba(247, 248, 244, 0.055);
    border-color: rgba(247, 248, 244, 0.12);
}

.hero {
    min-height: auto;
    padding: clamp(38px, 6vw, 76px) 0 clamp(32px, 5vw, 62px);
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(247, 248, 244, 0.12);
    background: transparent;
    box-shadow: none;
}

.hero-wordmark {
    filter: grayscale(1) contrast(1.05) brightness(1.16) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
}

.hero .hero-wordmark {
    width: min(320px, 100%);
    height: clamp(74px, 8vw, 116px);
    margin-bottom: 10px;
}

.hero h1 {
    max-width: 13ch;
    font-size: clamp(2.8rem, 5vw, 4.9rem);
    line-height: 0.98;
}

.hero-lead {
    font-size: 1.08rem;
}

.hero-stage {
    min-height: 560px;
}

h1,
h2,
h3 {
    letter-spacing: 0;
}

.primary-button {
    background: var(--ink);
    color: #050608;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.secondary-button,
.refresh-button,
.secondary-text-link {
    border-color: rgba(247, 248, 244, 0.14);
    background: rgba(247, 248, 244, 0.055);
    color: var(--ink);
}

.hero-stage,
.section-block,
.mode-panel,
.challenger-card,
.leaderboard-spotlight,
.leaderboard-panel,
.stage-console,
.stage-card,
.podium-card,
.podium-placeholder {
    background:
        linear-gradient(180deg, rgba(247, 248, 244, 0.08), rgba(247, 248, 244, 0.025)),
        rgba(7, 9, 12, 0.82);
    border-color: rgba(247, 248, 244, 0.12);
    box-shadow: var(--shadow);
}

.section-block {
    margin-top: 0;
    padding: clamp(38px, 7vw, 82px) 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(247, 248, 244, 0.12);
    background: transparent;
    box-shadow: none;
}

.section-number,
.hero-signal-card,
.stage-card-tag,
.challenger-rank,
.challenger-range,
.podium-rank {
    background: rgba(247, 248, 244, 0.07);
    border-color: rgba(247, 248, 244, 0.12);
}

.hero-stage::after,
.analysis-visual::after,
.challenger-portrait-wrap::after,
.leaderboard-spotlight::after {
    content: "";
    position: absolute;
    inset: 14px 14px auto auto;
    width: 82px;
    aspect-ratio: 1;
    border: 1px solid rgba(247, 248, 244, 0.14);
    clip-path: polygon(50% 0%, 100% 30%, 84% 100%, 20% 84%, 0% 22%);
    opacity: 0.54;
    pointer-events: none;
}

.analysis-visual,
.challenger-portrait-wrap,
.leaderboard-spotlight {
    position: relative;
}

.challenger-card:nth-child(2),
.challenger-card:nth-child(4),
.stage-card-study,
.stage-card-exam {
    transform: none;
}

.selector-art-frame,
.analysis-visual,
.challenger-portrait-wrap,
.leaderboard-shell {
    border-radius: 8px;
}

.hero-avatar-card,
.leaderboard-desk-note {
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(247, 248, 244, 0.08), rgba(247, 248, 244, 0.025)),
        rgba(7, 9, 12, 0.82);
    border-color: rgba(247, 248, 244, 0.12);
    box-shadow: var(--shadow);
}

.hero-avatar-frame,
.leaderboard-desk-portrait {
    border-radius: 8px;
    border-color: rgba(247, 248, 244, 0.12);
}

.leaderboard-desk-portrait {
    background: rgba(7, 9, 12, 0.88);
}

@keyframes chessiqPremiumPolygon {

    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    50% {
        transform: translate3d(-20px, 18px, 0) rotate(6deg);
    }
}

@media (max-width: 1280px) {
    .hero {
        min-height: auto;
    }
}

@media (max-width: 980px) {
    .hero-stage {
        min-height: auto;
    }
}

@media (max-width: 720px) {

    .topbar,
    .content-wrap,
    .page-footer {
        width: min(100% - 20px, 1240px);
    }

    .hero,
    .section-block {
        padding: 32px 0;
    }

    .hero-avatar-card {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 12px;
    }

    .hero-avatar-frame {
        width: 68px;
    }

    .leaderboard-desk-note {
        flex-direction: column;
        align-items: flex-start;
    }

    .ambient-grid,
    .ambient-glow {
        opacity: 0.22;
    }
}