:root {
  --navy: #081126;
  --navy-2: #0e1a36;
  --ink: #101a34;
  --muted: #63708a;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #edf2fa;
  --line: rgba(15, 30, 61, .13);
  --blue: #2864ff;
  --blue-dark: #1945ba;
  --cyan: #19d3c5;
  --violet: #7c6ff2;
  --lime: #b9ee74;
  --coral: #ff806e;
  --yellow: #ffcf66;
  --white: #fff;
  --game-gradient: linear-gradient(125deg, var(--blue), var(--violet) 54%, var(--cyan));
  --shadow-sm: 0 8px 24px rgba(8, 17, 38, .08);
  --shadow: 0 24px 65px rgba(8, 17, 38, .15);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --page: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: "Space Grotesk", system-ui, sans-serif; line-height: 1.5; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ambient-grid { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(40,100,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(40,100,255,.025) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, #000, transparent 72%); }
.ambient-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient-orbs i { position: absolute; border-radius: 50%; filter: blur(4px); opacity: .13; }
.ambient-orbs i:nth-child(1) { width: 410px; height: 410px; top: 14%; right: -250px; background: var(--violet); }
.ambient-orbs i:nth-child(2) { width: 300px; height: 300px; top: 54%; left: -210px; background: var(--cyan); }
.ambient-orbs i:nth-child(3) { width: 220px; height: 220px; bottom: 3%; right: 16%; background: var(--blue); }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(18px, 3vw, 48px); min-height: 80px; padding: 12px max(20px, calc((100vw - var(--page)) / 2)); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: clamp(178px, 16vw, 238px); height: auto; }
.main-nav { display: flex; justify-content: center; gap: 4px; }
.nav-link, .author-tab { padding: 10px 13px; color: var(--muted); border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 600; }
.nav-link:hover, .nav-link.active, .author-tab:hover, .author-tab.active { color: var(--ink); background: var(--surface-2); }
.nav-link.active { box-shadow: inset 0 0 0 1px rgba(40,100,255,.08); }
.account-area { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.language-switcher { display: flex; align-items: center; gap: 3px; padding: 5px; color: #9ca6b9; border: 1px solid var(--line); border-radius: 999px; }
.language-option { min-width: 28px; display:flex; align-items:center; gap:6px; padding:6px 9px; color: #77829a; border: 0; border-radius: 999px; background: transparent; font: 10px "DM Mono", monospace; font-weight: 500; }
.language-option b { font:inherit; }
.language-option[aria-pressed="true"] { color: var(--white); background: var(--navy); }
.flag-icon{width:18px;height:12px;display:inline-block;flex:0 0 auto;border-radius:2px;box-shadow:0 0 0 1px rgba(11,25,48,.16)}
.flag-us{background:linear-gradient(#3c3b6e 0 0) left top/45% 54% no-repeat,repeating-linear-gradient(to bottom,#b22234 0 7.7%,#fff 7.7% 15.4%)}
.flag-gt{background:linear-gradient(to right,#4997d0 0 33%,#fff 33% 67%,#4997d0 67%)}
.motion-toggle, .icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.motion-toggle:hover, .icon-button:hover { color: var(--ink); border-color: rgba(40,100,255,.35); }
.mode-badge, .tag, .overline, .eyebrow, .game-course, .private-badge, .verified-badge { font: 500 10px "DM Mono", monospace; letter-spacing: .1em; }
.mode-badge { padding: 6px 8px; color: var(--blue-dark); border: 1px solid rgba(40,100,255,.23); border-radius: 999px; background: rgba(40,100,255,.07); }
.account-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 13px 4px 5px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 700; }
.account-button:hover { border-color: rgba(40,100,255,.35); box-shadow: var(--shadow-sm); }

.page-wrap { width: min(var(--page), calc(100% - 40px)); margin: 0 auto; padding: 18px 0 80px; }
.mode-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 10px 14px; color: #37435b; border: 1px solid rgba(255,207,102,.7); border-radius: var(--radius-sm); background: rgba(255,207,102,.17); font-size: 12px; }
.mode-notice .icon-button { width: 28px; height: 28px; margin-left: auto; border: 0; background: transparent; font-size: 21px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(25,211,197,.15); }
.view { display: none; animation: view-in .35s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.eyebrow, .overline { display: block; margin: 0 0 10px; color: var(--blue); }
h1, h2, h3, p { overflow-wrap: anywhere; }

.primary-button, .ghost-button, .light-button, .text-button, .google-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 12px; font-size: 13px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.primary-button { padding: 13px 17px; color: var(--white); border: 1px solid var(--blue); background: var(--blue); box-shadow: 4px 4px 0 var(--navy); }
.primary-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.primary-button:disabled { cursor: not-allowed; opacity: .52; transform: none; box-shadow: none; }
.ghost-button { padding: 12px 16px; color: var(--ink); border: 1px solid rgba(8,17,38,.2); background: rgba(255,255,255,.75); }
.ghost-button:hover { border-color: rgba(40,100,255,.35); background: var(--surface); }
.light-button { padding: 14px 18px; color: var(--navy); border: 0; background: var(--white); box-shadow: 4px 4px 0 rgba(25,211,197,.8); }
.light-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(25,211,197,.9); }
.text-button { padding: 8px; color: var(--blue); border: 0; background: transparent; }
.wide { width: 100%; }

.game-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(390px, .97fr); align-items: center; gap: clamp(36px, 6vw, 86px); min-height: 580px; padding: clamp(46px, 6vw, 78px); overflow: hidden; color: var(--white); border-radius: var(--radius-lg); background: radial-gradient(circle at 82% 20%, rgba(124,111,242,.35), transparent 28%), radial-gradient(circle at 15% 90%, rgba(25,211,197,.13), transparent 30%), var(--navy); box-shadow: var(--shadow); }
.game-hero::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(circle at 75% 45%, #000, transparent 70%); }
.game-hero::after { content: "∫  π  ∂  ∞  Σ"; position: absolute; right: -34px; bottom: -25px; color: rgba(255,255,255,.035); font-size: 150px; font-weight: 700; letter-spacing: -.08em; white-space: nowrap; }
.hero-copy, .game-launcher { position: relative; z-index: 1; }
.hero-brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: #dce5ff; font-size: 13px; font-weight: 700; letter-spacing: .13em; }
.hero-brandline i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.game-hero .eyebrow { color: var(--cyan); }
.hero-copy h1 { max-width: 690px; margin: 0; font-size: clamp(46px, 6.3vw, 82px); line-height: .94; letter-spacing: -.065em; }
.hero-lead { max-width: 560px; margin: 25px 0 30px; color: #b9c4db; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.game-hero .ghost-button { color: var(--white); border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.06); }
.game-hero .ghost-button:hover { background: rgba(255,255,255,.13); }
.hero-proof { display: flex; align-items: center; gap: 10px; margin-top: 38px; color: #7584a5; font: 500 9px "DM Mono", monospace; letter-spacing: .12em; }
.hero-proof i { width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); }

.game-launcher { border: 1px solid rgba(255,255,255,.16); border-radius: 22px; background: rgba(13,25,53,.82); box-shadow: 0 28px 70px rgba(0,0,0,.35); backdrop-filter: blur(15px); transform: perspective(1000px) rotateY(-2deg) rotateX(1deg); }
.launcher-topbar, .launcher-footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #8291b1; font: 500 9px "DM Mono", monospace; letter-spacing: .08em; }
.launcher-topbar { border-bottom: 1px solid rgba(255,255,255,.1); }
.launcher-topbar b { margin-left: auto; color: var(--cyan); font-size: 8px; }
.launcher-dots { display: flex; gap: 4px; }
.launcher-dots i { width: 6px; height: 6px; border-radius: 50%; background: #445170; }
.launcher-dots i:first-child { background: var(--coral); }
.launcher-dots i:nth-child(2) { background: var(--yellow); }
.launcher-dots i:nth-child(3) { background: var(--cyan); }
.launcher-stack { display: grid; gap: 9px; min-height: 350px; padding: 17px; }
.launcher-footer { justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); }
.launcher-game { position: relative; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px; padding: 11px; overflow: hidden; color: var(--white); border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.045); text-align: left; }
.launcher-game:hover { border-color: rgba(25,211,197,.45); background: rgba(255,255,255,.08); transform: translateX(3px); }
.launcher-game .mini-cover { height: 70px; border-radius: 10px; }
.launcher-game strong { display: block; margin-bottom: 3px; font-size: 13px; }
.launcher-game small { display: block; color: #8fa0c1; font: 9px "DM Mono", monospace; }
.launcher-game > b { display: grid; place-items: center; width: 32px; height: 32px; color: var(--navy); border-radius: 50%; background: var(--cyan); }

.home-section { padding: clamp(68px, 8vw, 104px) 0 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading.compact { align-items: center; }
.section-heading h2, .player-page-heading h1, .how-intro h2, .join-cta h2, .dashboard-start h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.045em; }
.section-heading p, .player-page-heading p, .how-intro > p:last-child { max-width: 660px; margin: 11px 0 0; color: var(--muted); }
.category-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.category-chip { padding: 9px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 600; }
.category-chip:hover, .category-chip.active { color: var(--white); border-color: var(--navy); background: var(--navy); }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(8,17,38,.04); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.game-card:hover { transform: translateY(-6px); border-color: rgba(40,100,255,.28); box-shadow: var(--shadow); }
.game-cover { position: relative; min-height: 208px; overflow: hidden; isolation: isolate; color: var(--white); background: var(--navy); }
.game-cover::before, .mini-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .28; background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 23px 23px; mask-image: radial-gradient(circle, #000, transparent 75%); }
.game-cover::after, .mini-cover::after { content: attr(data-symbol); position: absolute; right: 14px; bottom: -20px; color: rgba(255,255,255,.18); font-size: 112px; font-weight: 700; line-height: 1; transform: rotate(-8deg); }
.game-cover-inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; }
.game-cover-label { align-self: flex-start; padding: 6px 8px; color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(8,17,38,.25); font: 8px "DM Mono", monospace; letter-spacing: .1em; }
.game-cover-icon { display: grid; place-items: center; width: 72px; height: 72px; color: var(--white); border: 1px solid rgba(255,255,255,.35); border-radius: 22px; background: rgba(8,17,38,.34); box-shadow: 0 0 0 9px rgba(255,255,255,.06); font-size: 37px; font-weight: 700; backdrop-filter: blur(5px); }
.cover-orbit { background: radial-gradient(circle at 70% 25%, rgba(25,211,197,.85), transparent 25%), linear-gradient(135deg, #163a9d, #7c6ff2); }
.cover-vector { background: radial-gradient(circle at 20% 25%, rgba(185,238,116,.55), transparent 22%), linear-gradient(135deg, #075e67, #2864ff); }
.cover-boss { background: radial-gradient(circle at 70% 28%, rgba(255,207,102,.7), transparent 23%), linear-gradient(135deg, #c63d69, #6c46ce); }
.cover-quantum { background: radial-gradient(circle at 24% 70%, rgba(25,211,197,.65), transparent 24%), linear-gradient(135deg, #152b62, #8d4ed7); }
.cover-mountain { background: radial-gradient(circle at 76% 22%, rgba(255,207,102,.85), transparent 20%), linear-gradient(145deg, #17697c, #233766 62%, #7c6ff2); }
.cover-invaders { background: radial-gradient(circle at 30% 22%, rgba(255,128,110,.75), transparent 20%), linear-gradient(135deg, #151a44, #2864ff 58%, #19d3c5); }
.cover-archipelago {
  min-height: 260px;
  background: linear-gradient(180deg, rgba(3,17,37,.08), rgba(2,14,30,.76)), url("games/m4-parcial-2-world/assets/worlds/archipelago-atmosphere.webp") center 48% / cover no-repeat;
  box-shadow: inset 0 -70px 80px rgba(2,14,30,.5);
}
.cover-archipelago::before {
  z-index: 0;
  opacity: .9;
  background: radial-gradient(circle at 78% 20%, rgba(255,222,119,.35), transparent 17%), linear-gradient(105deg, rgba(2,14,30,.68), transparent 48%);
  mask-image: none;
}
.cover-archipelago::after { content: none; }
.archipelago-sky { position: absolute; inset: 0; z-index: 1; background: linear-gradient(120deg, transparent 38%, rgba(71,233,255,.1) 56%, transparent 72%); background-size: 180% 100%; animation: archipelago-light 7s linear infinite; pointer-events: none; }
.archipelago-route { position: absolute; inset: auto 3% 3%; z-index: 2; width: 94%; height: 78%; overflow: visible; fill: #fff6b8; filter: drop-shadow(0 0 7px rgba(255,200,74,.85)); pointer-events: none; }
.archipelago-route path { fill: none; stroke: #ffd05d; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 13; animation: archipelago-route 1.4s linear infinite; }
.archipelago-route circle { stroke: #fff9cb; stroke-width: 3; }
.archipelago-compass { position: absolute; top: 23px; right: 24px; z-index: 3; width: 72px; aspect-ratio: 1; border: 1px solid rgba(255,223,126,.72); border-radius: 50%; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: archipelago-compass 18s linear infinite; }
.archipelago-compass i { position: absolute; inset: 8px 34px; background: #ffe08a; transform: rotate(45deg); }
.archipelago-compass i:nth-child(2) { transform: rotate(-45deg); }
.archipelago-compass b { position: absolute; inset: 17px; display: grid; place-items: center; border-radius: 50%; background: #071a35; color: #fff1ac; font-size: 22px; }
.archipelago-cover-copy { position: absolute; z-index: 4; left: clamp(18px, 4vw, 34px); bottom: clamp(20px, 4vw, 32px); display: grid; max-width: min(76%, 420px); color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.85); }
.archipelago-cover-copy span { color: #ffe6a0; font: 700 9px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.archipelago-cover-copy strong { margin-top: 7px; font: 750 clamp(21px, 3vw, 34px)/1.02 Georgia, serif; letter-spacing: -.025em; text-wrap: balance; }
.archipelago-cover-copy small { margin-top: 9px; color: #dff9ff; font-size: 11px; font-weight: 700; }
.archipelago-audio { position: absolute; z-index: 5; top: 22px; left: 22px; display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.45); border-radius: 12px; background: rgba(4,20,43,.78); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.archipelago-audio svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.archipelago-audio span { font-size: 10px; font-weight: 750; }
.archipelago-audio[aria-pressed="true"] { border-color: #61efff; color: #d8fbff; background: rgba(4,53,74,.88); }
.archipelago-audio:focus-visible { outline: 3px solid #47e9ff; outline-offset: 3px; }
.game-card--archipelago { border-color: rgba(25,126,156,.34); background: #fff9e9; }
.game-card--archipelago .game-card-body { background: linear-gradient(145deg, #fffdf5, #fff5dc); }
.game-card--archipelago h3 { color: #10243b; font-family: Georgia, serif; }
.game-card--archipelago .game-card-description { color: #536078; }
.game-card--archipelago .game-card-cta { min-height: 44px; padding: 10px 14px; border-radius: 11px; background: #0a6278; color: #fff; }
.game-card--archipelago .game-card-cta:hover { background: #074d61; transform: translateY(-2px); }
.game-card--archipelago .game-card-cta:active { transform: scale(.97); }
@keyframes archipelago-light { to { background-position: -180% 0; } }
@keyframes archipelago-route { to { stroke-dashoffset: -30; } }
@keyframes archipelago-compass { to { transform: rotate(360deg); } }
.game-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.game-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-course { color: var(--blue); }
.tag { padding: 5px 7px; color: var(--blue-dark); border-radius: 999px; background: rgba(40,100,255,.09); }
.tag.available { color: #09685f; background: rgba(25,211,197,.15); }
.tag.pilot { color: #765500; background: rgba(255,193,7,.18); }
.tag.maintenance { color: #9a3049; background: rgba(255,86,124,.13); }
.game-card h3 { margin: 13px 0 7px; font-size: 21px; line-height: 1.15; letter-spacing: -.025em; }
.game-card-meta { color: var(--muted); font-size: 12px; }
.game-card-description { display: -webkit-box; margin: 13px 0 15px; overflow: hidden; color: #59647a; font-size: 13px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.game-topic-row { display: flex; flex-wrap: wrap; gap: 6px; }
.game-topic-row span { padding: 5px 8px; color: #59647a; border-radius: 999px; background: var(--surface-2); font: 9px "DM Mono", monospace; }
.game-card-progress { margin-top: 15px; }
.game-card-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font: 9px "DM Mono", monospace; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dfe6f1; }
.progress-value { height: 100%; width: 0; border-radius: inherit; background: var(--game-gradient); }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; }
.game-card-footer small { color: var(--muted); font: 9px "DM Mono", monospace; }
.game-card-cta { display: inline-flex; align-items: center; gap: 7px; padding: 0; color: var(--blue); border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.empty-state { padding: 50px; text-align: center; border: 1px dashed rgba(40,100,255,.3); border-radius: var(--radius); background: var(--surface); }
.empty-state > span { color: var(--violet); font-size: 44px; }
.empty-state h3 { margin: 10px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); }

.continue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.continue-card { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 15px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.mini-cover { position: relative; min-height: 76px; overflow: hidden; border-radius: 12px; }
.mini-cover::after { right: 7px; bottom: -8px; font-size: 50px; }
.continue-card h3 { margin: 0 0 4px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.continue-card p { margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.continue-card .progress-track { height: 5px; }
.continue-play { display: grid; place-items: center; width: 36px; height: 36px; color: var(--white); border: 0; border-radius: 50%; background: var(--blue); }
.new-player-banner { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 55px; padding: 30px 34px; color: var(--white); border-radius: var(--radius); background: linear-gradient(115deg, #162955, #2864ff); }
.new-player-banner .eyebrow { color: var(--cyan); }
.new-player-banner h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.new-player-banner p { margin: 7px 0 0; color: #cfdbf4; }

.how-it-works { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 90px); margin-top: clamp(80px, 10vw, 130px); padding: clamp(45px, 6vw, 75px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.how-intro h2 { max-width: 520px; }
.how-steps { display: grid; gap: 0; }
.how-steps article { display: grid; grid-template-columns: 38px 50px 1fr; grid-template-rows: auto auto; gap: 0 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.how-steps article:last-child { border-bottom: 0; }
.how-steps article > span { grid-row: 1 / 3; color: #9ba6b9; font: 10px "DM Mono", monospace; }
.how-steps article > i { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; color: var(--white); border-radius: 13px; background: var(--navy); font-style: normal; }
.how-steps h3 { margin: 0; font-size: 17px; }
.how-steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.join-cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 32px; padding: clamp(35px, 5vw, 58px); overflow: hidden; color: var(--white); border-radius: var(--radius-lg); background: var(--game-gradient); }
.join-cta::after { content: "GA·MATH"; position: absolute; right: -25px; bottom: -55px; color: rgba(255,255,255,.09); font-size: 110px; font-weight: 700; letter-spacing: -.07em; }
.join-cta > * { position: relative; z-index: 1; }
.join-cta .eyebrow { color: var(--navy); }
.join-cta h2 { margin: 0; }
.join-cta p { margin: 8px 0 0; color: rgba(255,255,255,.82); }

.player-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 55px 0 35px; }
.dashboard-start { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 35px; padding: 40px; color: var(--white); border-radius: var(--radius-lg); background: radial-gradient(circle at 15% 50%, rgba(25,211,197,.25), transparent 25%), var(--navy); }
.dashboard-start p:not(.eyebrow) { max-width: 590px; color: #afbdd7; }
.start-orbit { position: relative; display: grid; place-items: center; width: 150px; height: 150px; margin: auto; border: 1px solid rgba(25,211,197,.5); border-radius: 50%; }
.start-orbit::before, .start-orbit::after { content: ""; position: absolute; inset: 18px -8px; border: 1px solid rgba(124,111,242,.65); border-radius: 50%; transform: rotate(55deg); }
.start-orbit::after { inset: -5px 26px; border-color: rgba(40,100,255,.75); transform: rotate(-45deg); }
.start-orbit b { z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; color: var(--navy); border-radius: 50%; background: var(--cyan); }
.dashboard-continue { margin-bottom: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.card-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.progress-summary { display: grid; grid-template-columns: repeat(5, 1fr); overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.progress-summary article { min-width: 0; padding: 23px; border-right: 1px solid var(--line); }
.progress-summary article:last-child { border-right: 0; }
.progress-summary span, .progress-summary small { display: block; color: var(--muted); font: 9px "DM Mono", monospace; letter-spacing: .07em; }
.progress-summary strong { display: block; margin: 7px 0 4px; font-size: 29px; letter-spacing: -.04em; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.mastery-list { display: grid; gap: 16px; }
.mastery-row-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 6px; font-size: 12px; }
.mastery-row-head span:last-child { color: var(--muted); font-family: "DM Mono", monospace; }
.recent-runs { display: grid; gap: 9px; }
.recent-run { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 13px; background: var(--surface-2); }
.recent-run > span { display: grid; place-items: center; width: 42px; height: 42px; color: var(--white); border-radius: 11px; background: var(--navy); }
.recent-run strong, .recent-run small { display: block; }
.recent-run strong { font-size: 12px; }
.recent-run small { color: var(--muted); font-size: 10px; }
.recent-run b { color: var(--blue); font: 11px "DM Mono", monospace; }
.helper-text { color: var(--muted); font-size: 12px; line-height: 1.55; }

.player-avatar { --avatar-a: #2864ff; --avatar-b: #7c6ff2; position: relative; display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; color: var(--white); border: 2px solid rgba(255,255,255,.9); border-radius: 13px; background: linear-gradient(140deg, var(--avatar-a), var(--avatar-b)); box-shadow: 0 5px 14px rgba(8,17,38,.18); }
.player-avatar::before { content: ""; position: absolute; width: 90%; height: 90%; border: 1px solid rgba(255,255,255,.27); border-radius: 50%; transform: translate(35%, -38%); }
.player-avatar i { position: relative; z-index: 1; font-style: normal; font-weight: 700; }
.player-avatar.xl { width: 98px; height: 98px; border-radius: 28px; font-size: 34px; }
.avatar-vector { --avatar-a: #075e67; --avatar-b: #19d3c5; }
.avatar-orbit { --avatar-a: #1945ba; --avatar-b: #19d3c5; }
.avatar-delta { --avatar-a: #c34270; --avatar-b: #ff806e; }
.avatar-matrix { --avatar-a: #273659; --avatar-b: #b9ee74; }
.avatar-infinity { --avatar-a: #6844ca; --avatar-b: #ffcf66; }
.profile-player-card { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 24px; padding: 30px; color: var(--white); border-radius: var(--radius-lg); background: radial-gradient(circle at 78% 20%, rgba(124,111,242,.35), transparent 28%), var(--navy); box-shadow: var(--shadow); }
.profile-player-copy h2 { margin: 0; font-size: 29px; }
.profile-player-copy p { margin: 3px 0 10px; color: #97a6c4; }
.identity-chip { display: inline-flex; padding: 5px 8px; color: var(--cyan); border-radius: 999px; background: rgba(25,211,197,.12); font: 9px "DM Mono", monospace; }
.identity-chip.pending { color: var(--yellow); background: rgba(255,207,102,.12); }
.profile-player-stats { display: flex; gap: 8px; }
.profile-player-stats > div { min-width: 104px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.05); }
.profile-player-stats strong, .profile-player-stats span { display: block; }
.profile-player-stats strong { font-size: 22px; }
.profile-player-stats span { color: #8fa0c1; font-size: 9px; }
.profile-actions { display: grid; gap: 8px; }
.profile-actions a { text-decoration: none; }
.profile-player-card .ghost-button { color: var(--white); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); }
.profile-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.private-badge { padding: 6px 8px; color: var(--violet); border-radius: 999px; background: rgba(124,111,242,.1); }
.identity-list { margin: 22px 0 0; }
.identity-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.identity-list dt { color: var(--muted); font-size: 11px; }
.identity-list dd { margin: 0; font-size: 12px; font-weight: 600; text-align: right; }
.player-benefits { display: grid; gap: 8px; margin-top: 18px; }
.player-benefits > div { display: grid; grid-template-columns: 36px 1fr; gap: 13px; padding: 13px; border-radius: 13px; background: var(--surface-2); }
.player-benefits i { color: var(--blue); font: 10px "DM Mono", monospace; font-style: normal; }
.player-benefits b { font-size: 12px; }
.player-benefits p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }

.staff-view { padding-top: 35px; }
.page-intro h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.06em; }
.page-intro > p:last-child { color: var(--muted); }
.author-tabs { display: flex; gap: 6px; margin: 30px 0 18px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); width: fit-content; }
.author-panel { display: none; }
.author-panel.active { display: block; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 760px); }
.upload-form { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.form-heading { display: flex; align-items: center; gap: 14px; }
.form-heading h2 { margin: 0; }
.step-number { display: grid; place-items: center; width: 44px; height: 44px; color: var(--white); border-radius: 13px; background: var(--navy); font: 11px "DM Mono", monospace; }
.file-drop { position: relative; display: grid; place-items: center; margin: 22px 0; padding: 32px; border: 1px dashed rgba(40,100,255,.38); border-radius: var(--radius); background: rgba(40,100,255,.035); text-align: center; }
.file-drop.dragging { border-color: var(--cyan); background: rgba(25,211,197,.08); }
.file-drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-drop small { color: var(--muted); }
.upload-icon { font-size: 28px; color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label, .profile-field { display: grid; gap: 6px; color: #3c4860; font-size: 11px; font-weight: 700; }
.form-grid .span-2 { grid-column: span 2; }
input, select, textarea { width: 100%; padding: 12px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,100,255,.1); }
textarea { resize: vertical; }
.consent-line, .profile-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; color: var(--muted); font-size: 11px; }
.consent-line input, .profile-confirm input { width: auto; margin-top: 2px; }
.docs-link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.docs-link-row a { padding: 10px 13px; color: var(--blue); border: 1px solid rgba(40,100,255,.25); border-radius: 10px; text-decoration: none; font-size: 12px; font-weight: 700; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,8,20,.74); backdrop-filter: blur(8px); }
.access-window, .onboarding-window, .game-detail-window, .modal-window { position: relative; z-index: 1; width: min(100%, 530px); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid rgba(255,255,255,.18); border-radius: 25px; background: var(--surface); box-shadow: 0 35px 100px rgba(0,0,0,.38); }
.access-window { padding: 35px; text-align: center; }
.access-close, .detail-close { position: absolute; top: 16px; right: 16px; z-index: 5; }
.access-brand img { width: 230px; margin-bottom: 24px; }
.access-window h2, .onboarding-window h2, .game-detail-content h2 { margin: 4px 0 10px; font-size: 30px; line-height: 1.08; letter-spacing: -.04em; }
.access-window > p:not(.helper-text) { color: var(--muted); }
.google-button { width: 100%; margin: 18px 0; padding: 13px; color: var(--ink); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.google-button:hover { border-color: rgba(40,100,255,.38); }
.google-button b { margin-left: auto; }
.google-mark { display: grid; place-items: center; width: 27px; height: 27px; color: var(--white); border-radius: 8px; background: var(--blue); }
.access-points { display: grid; gap: 8px; color: #526078; font-size: 11px; text-align: left; }
.access-points span::before { content: "✓"; margin-right: 8px; color: #078b7d; font-weight: 700; }
.onboarding-window { width: min(100%, 620px); padding: 30px; }
.onboarding-progress { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--muted); font: 9px "DM Mono", monospace; }
.onboarding-progress div { display: flex; gap: 5px; }
.onboarding-progress i { width: 25px; height: 4px; border-radius: 99px; background: #dfe4ed; }
.onboarding-progress i.active { background: var(--blue); }
.onboarding-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.onboarding-brand span, .onboarding-brand small { display: block; }
.onboarding-brand span { font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.onboarding-brand small { color: var(--muted); font: 8px "DM Mono", monospace; }
.onboarding-step { display: none; }
.onboarding-step.active { display: block; animation: view-in .25s ease both; }
.onboarding-lead { margin-bottom: 23px; color: var(--muted); }
.avatar-fieldset, .locale-fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.avatar-fieldset legend, .locale-fieldset legend { margin-bottom: 8px; color: #3c4860; font-size: 11px; font-weight: 700; }
.avatar-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-choice { display: grid; place-items: center; gap: 6px; padding: 9px 5px; color: var(--muted); border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.avatar-choice:hover, .avatar-choice.active { color: var(--blue); border-color: var(--blue); background: rgba(40,100,255,.045); }
.avatar-choice small { font-size: 8px; }
.profile-field { margin: 14px 0; }
.profile-field > span { display: flex; justify-content: space-between; gap: 8px; }
.profile-field b { color: var(--blue); font: 8px "DM Mono", monospace; }
.profile-field small { color: var(--muted); font-size: 10px; font-weight: 400; }
.locale-fieldset div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.profile-locale-option { padding: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 11px; font-weight: 700; }
.profile-locale-option.active { color: var(--white); border-color: var(--navy); background: var(--navy); }
.form-error { min-height: 18px; margin: 8px 0; color: #bd2d50; font-size: 11px; }
.verified-account { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; margin: 18px 0 22px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.verified-account b, .verified-account span { display: block; }
.verified-account b { font-size: 12px; }
.verified-account div:nth-child(2) span { color: var(--muted); font-size: 10px; }
.verified-badge { padding: 5px 7px; color: #08786e; border-radius: 999px; background: rgba(25,211,197,.15); }
.onboarding-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.onboarding-actions .primary-button { grid-column: span 2; }
.center-text { text-align: center; }

.game-detail-window { display: grid; grid-template-columns: .85fr 1.15fr; width: min(100%, 950px); overflow: hidden; }
.detail-cover { min-height: 590px; }
.detail-cover::after { font-size: 180px; }
.game-detail-content { padding: clamp(28px, 5vw, 48px); overflow: auto; }
.detail-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.detail-meta { color: var(--muted); font: 10px "DM Mono", monospace; }
.detail-description { color: #536078; line-height: 1.65; }
.release-note { margin: 16px 0 0; padding: 12px 14px; color: #65511b; border: 1px solid rgba(180,132,0,.24); border-radius: 12px; background: rgba(255,193,7,.1); font-size: 13px; line-height: 1.55; }
.detail-progress { margin: 23px 0; padding: 15px; border-radius: 13px; background: var(--surface-2); }
.detail-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font: 9px "DM Mono", monospace; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0; }
.detail-stats div { padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.detail-stats dt { color: var(--muted); font: 8px "DM Mono", monospace; }
.detail-stats dd { margin: 5px 0 0; font-size: 12px; font-weight: 700; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.detail-leaderboard { margin:20px 0 24px; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }.detail-leaderboard>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.detail-leaderboard span{color:var(--blue);font:500 8px "DM Mono",monospace;letter-spacing:.1em}.detail-leaderboard h3{margin:0;font-size:17px}.detail-leaderboard ol{display:grid;gap:7px;margin:13px 0 0;padding:0;list-style:none}.detail-leaderboard li{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:9px;padding:7px 9px;border-radius:9px;background:#fff;font-size:11px}.detail-leaderboard li i{color:var(--blue);font:500 9px "DM Mono",monospace;font-style:normal}.detail-leaderboard li b{font:500 10px "DM Mono",monospace}.detail-leaderboard li.leaderboard-empty{display:block;color:var(--muted);background:transparent;line-height:1.5}.game-detail-window{animation:modal-pop 260ms cubic-bezier(.16,1,.3,1)}@keyframes modal-pop{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
.modal-window { display: flex; flex-direction: column; width: min(100%, 1180px); height: min(92vh, 820px); overflow: hidden; }
.game-player-window { width: calc(100vw - 24px); max-width: none; height: calc(100dvh - 24px); max-height: none; border-radius: 18px; }
.game-player-window:fullscreen,
.game-player-window.pseudo-fullscreen { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
.game-player-window.pseudo-fullscreen { position: fixed; z-index: 220; inset: 0; max-width: none; max-height: none; }
body.game-immersive { overflow: hidden; }
.game-player-window:fullscreen .modal-header,
.game-player-window.pseudo-fullscreen .modal-header { position: absolute; z-index: 4; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); padding: 0; border: 0; background: transparent; pointer-events: none; }
.game-player-window:fullscreen .modal-header > div:first-child,
.game-player-window.pseudo-fullscreen .modal-header > div:first-child,
.game-player-window:fullscreen .modal-footer,
.game-player-window.pseudo-fullscreen .modal-footer { display: none; }
.game-player-window:fullscreen .modal-header-actions,
.game-player-window.pseudo-fullscreen .modal-header-actions { pointer-events: auto; }
.game-player-window:fullscreen #gameFullscreenButton,
.game-player-window.pseudo-fullscreen #gameFullscreenButton { min-width: 48px; min-height: 48px; padding: 10px 12px; color: #fff; border-color: rgba(255,255,255,.32); background: rgba(4,10,22,.78); backdrop-filter: blur(12px); }
.game-player-window:fullscreen .modal-header [data-close-modal],
.game-player-window.pseudo-fullscreen .modal-header [data-close-modal] { min-width: 48px; min-height: 48px; color: #fff; border-color: rgba(255,255,255,.32); background: rgba(4,10,22,.78); backdrop-filter: blur(12px); }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 20px; }
.game-player-window .modal-header, .game-player-window .modal-footer { flex: 0 0 auto; padding: 9px 14px; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 19px; }
.modal-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.modal-header-actions { display: flex; align-items: center; gap: 8px; }
.compact-button { padding: 8px 11px; font-size: 11px; }
.game-frame-wrap { position: relative; flex: 1; min-height: 0; background: #050a16; }
.game-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #050a16; }
.frame-fallback { position: absolute; inset: 0; display: grid; place-content: center; padding: 30px; color: #94a2bd; text-align: center; }
.frame-fallback span { color: var(--cyan); font-size: 65px; }
.modal-footer { border-top: 1px solid var(--line); }
.session-status { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.toast { position: fixed; z-index: 150; right: 24px; bottom: 24px; max-width: min(380px, calc(100% - 48px)); padding: 13px 16px; color: var(--white); border-radius: 12px; background: var(--navy); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .2s ease; font-size: 12px; }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .site-header { grid-template-columns: auto 1fr; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .account-area { margin-left: auto; }
  .game-hero { grid-template-columns: 1fr 410px; padding: 48px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .continue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-summary { grid-template-columns: repeat(3, 1fr); }
  .progress-summary article:nth-child(3) { border-right: 0; }
  .progress-summary article:nth-child(n+4) { border-top: 1px solid var(--line); }
  .profile-player-card { grid-template-columns: auto 1fr auto; }
  .profile-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .page-wrap { width: min(100% - 28px, var(--page)); }
  .game-hero { grid-template-columns: 1fr; min-height: 0; padding: 42px 28px; }
  .game-launcher { transform: none; }
  .section-heading, .player-page-heading { align-items: flex-start; flex-direction: column; }
  .category-filters { justify-content: flex-start; }
  .continue-grid { grid-template-columns: 1fr; }
  .how-it-works { grid-template-columns: 1fr; }
  .dashboard-grid, .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-player-card { grid-template-columns: auto 1fr; }
  .profile-player-stats, .profile-actions { grid-column: 1 / -1; }
  .profile-player-stats > div { flex: 1; }
  .game-detail-window { grid-template-columns: 1fr; }
  .detail-cover { min-height: 230px; }
}

@media (max-width: 620px) {
  .language-option b, .language-switcher > span { display:none; }
  .language-option { padding:6px 8px; }
  .site-header { grid-template-columns: 1fr auto; gap: 9px; padding: 9px 14px; }
  .brand-logo { width: 155px; }
  .account-area { gap: 6px; }
  .mode-badge, .motion-toggle { display: none; }
  .account-button { min-height: 38px; padding-right: 8px; }
  #accountLabel { display: none; }
  .main-nav { width: calc(100vw - 28px); gap: 2px; }
  .nav-link { flex: 1 0 auto; padding: 9px 10px; font-size: 11px; }
  .page-wrap { width: calc(100% - 20px); padding-top: 10px; }
  .mode-notice { align-items: flex-start; }
  .game-hero { padding: 38px 21px; border-radius: 22px; }
  .hero-copy h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-lead { font-size: 15px; }
  .hero-actions > * { flex: 1 1 100%; }
  .hero-proof { justify-content: center; }
  .launcher-stack { min-height: 0; padding: 11px; }
  .launcher-game { grid-template-columns: 72px 1fr auto; padding: 8px; }
  .launcher-game .mini-cover { height: 58px; }
  .launcher-game:nth-child(n+3) { display: none; }
  .launcher-footer { font-size: 8px; }
  .home-section { padding-top: 65px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-cover { min-height: 190px; }
  .new-player-banner, .join-cta { align-items: flex-start; flex-direction: column; padding: 27px 22px; }
  .how-it-works { padding: 32px 21px; }
  .how-steps article { grid-template-columns: 28px 44px 1fr; gap: 0 10px; }
  .player-page-heading { padding-top: 35px; }
  .dashboard-start { grid-template-columns: 1fr; padding: 30px 22px; }
  .start-orbit { width: 120px; height: 120px; }
  .progress-summary { grid-template-columns: 1fr 1fr; }
  .progress-summary article, .progress-summary article:nth-child(3) { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .progress-summary article:nth-child(-n+2) { border-top: 0; }
  .progress-summary article:nth-child(even) { border-right: 0; }
  .progress-summary article:last-child { grid-column: 1 / -1; border-right: 0; }
  .profile-player-card { grid-template-columns: 1fr; text-align: center; padding: 26px 20px; }
  .profile-player-card > .player-avatar { margin: auto; }
  .profile-player-stats { width: 100%; }
  .profile-player-stats > div { min-width: 0; padding: 9px 5px; }
  .identity-list > div { grid-template-columns: 1fr; gap: 3px; }
  .identity-list dd { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .modal { padding: 10px; }
  .access-window, .onboarding-window { padding: 26px 20px; border-radius: 19px; }
  .avatar-options { grid-template-columns: repeat(3, 1fr); }
  .verified-account { grid-template-columns: auto 1fr; }
  .verified-badge { grid-column: 2; width: fit-content; }
  .game-detail-window { grid-template-rows: 180px minmax(0, 1fr); height: calc(100svh - 20px); height: calc(100dvh - 20px); max-height: none; overflow: hidden; }
  .detail-cover { min-height: 180px; }
  .game-detail-content { min-height: 0; padding: 26px 20px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .detail-actions { position: sticky; z-index: 3; top: -26px; margin-inline: -20px; padding: 12px 20px; background: rgba(255,255,255,.96); border-block: 1px solid var(--line); backdrop-filter: blur(14px); }
  .detail-actions .primary-button { flex: 1; }
  .detail-stats { grid-template-columns: 1fr; }
  .modal-window { height: calc(100vh - 20px); border-radius: 18px; }
  .game-player-window { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 12px; }
  .game-player-window .modal-header p { display: none; }
  .game-player-window .modal-header .overline { display: none; }
  .modal-footer { align-items: flex-start; flex-direction: column; }
  .game-player-window .modal-footer { align-items: center; flex-direction: row; }
  .modal-footer .ghost-button { width: 100%; }
  .game-player-window .modal-footer .ghost-button { width: auto; }
}

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

.detail-leaderboard li span strong,
.detail-leaderboard li span small { display: block; }
.detail-leaderboard li span strong { font-size: 11px; }
.detail-leaderboard li span small { margin-top: 2px; color: var(--muted); font: 500 8px "DM Mono", monospace; }
.detail-leaderboard li.leaderboard-self { border: 1px solid rgba(45,105,255,.34); background: rgba(45,105,255,.09); }
.detail-leaderboard li.leaderboard-self i,
.detail-leaderboard li.leaderboard-self small { color: var(--blue); }
.detail-leaderboard h3:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 4px; }
.leaderboard-cohort-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 4px; }
.leaderboard-cohort-filter button { min-height: 44px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; transition: transform 140ms cubic-bezier(.23,1,.32,1), border-color 180ms cubic-bezier(.23,1,.32,1), background-color 180ms cubic-bezier(.23,1,.32,1); }
.leaderboard-cohort-filter button span, .leaderboard-cohort-filter button small { display: block; }
.leaderboard-cohort-filter button span { font: 700 10px "DM Mono", monospace; }
.leaderboard-cohort-filter button small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.leaderboard-cohort-filter button.active { border-color: var(--blue); background: var(--ink); color: #fff; }
.leaderboard-cohort-filter button.active small { color: #c9d5ed; }
.leaderboard-cohort-filter button:active { transform: scale(.97); }
.leaderboard-cohort-filter button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 2026 public experience refresh: quieter chrome, larger gameplay, fewer dashboard cues. */
.ambient-orbs, .mode-badge, .mode-notice { display: none !important; }
.page-wrap { padding-top: 28px; }
.game-hero { min-height: 680px; border-radius: 20px; background: var(--navy); box-shadow: none; }
.game-hero::before { opacity: .24; background-size: 48px 48px; mask-image: linear-gradient(to right, transparent, #000 45%, transparent); }
.game-hero::after { opacity: .65; }
.hero-copy h1 { max-width: 620px; }
.game-launcher { box-shadow: 0 36px 90px rgba(0,0,0,.38); transition: transform 600ms cubic-bezier(.16,1,.3,1); }
.game-launcher:hover { transform: perspective(1000px) rotateY(0) rotateX(0) translateY(-4px); }
.launcher-game { min-height: 92px; transition: transform 180ms cubic-bezier(.16,1,.3,1), border-color 160ms ease, background 160ms ease; }
.primary-button { box-shadow: none; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(40,100,255,.28); }
.games-section { padding-top: 125px; }
.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.game-card { display: grid; grid-template-columns: 190px 1fr; border-radius: 16px; box-shadow: none; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(8,17,38,.1); }
.game-cover { min-height: 100%; }
.game-card-body { min-height: 295px; }
.game-card:first-child { grid-column: 1 / -1; grid-template-columns: minmax(380px, .9fr) 1.1fr; }
.game-card:first-child .game-cover { min-height: 390px; }
.game-card:first-child .game-card-body { justify-content: center; padding: 38px; }
.game-card:first-child h3 { font-size: 32px; }
.game-card.current-focus { border-color: rgba(35,213,232,.34); }
.game-grid-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin: 18px 0 0; color: var(--muted); font: 600 11px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.game-grid-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.how-it-works { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.how-steps article { border-left: 1px solid var(--line); border-radius: 0; background: transparent; }
.join-cta { border-radius: 18px; background: var(--navy); }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card:first-child { grid-column: auto; grid-template-columns: 210px 1fr; }
  .game-card:first-child .game-cover { min-height: 100%; }
  .game-card:first-child .game-card-body { min-height: 295px; padding: 25px; }
  .game-card:first-child h3 { font-size: 25px; }
}

@media (max-width: 620px) {
  .page-wrap { width: min(100% - 24px, var(--page)); }
  .game-hero { min-height: 0; border-radius: 16px; }
  .game-card, .game-card:first-child { display: flex; }
  .game-cover, .game-card:first-child .game-cover { min-height: 235px; }
  .game-card-body, .game-card:first-child .game-card-body { min-height: 0; padding: 20px; }
  .game-card:first-child h3 { font-size: 23px; }
  .how-it-works { padding-right: 8px; padding-left: 8px; }
  .how-steps article { border-left: 0; border-top: 1px solid var(--line); }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.section-admin-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; }
[data-author-panel="upload"].active ~ [data-author-panel="sections"] { display: none; }
.section-form .primary-button { margin-top: 20px; }
.staff-sections-list { display: grid; gap: 10px; margin-top: 18px; }
.staff-section { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,.7fr) auto; align-items: end; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.staff-section > div { display: grid; gap: 4px; }
.staff-section span,
.staff-section small { color: var(--muted); font-size: 12px; }
.staff-section label { display: grid; gap: 6px; }
.staff-section select { min-height: 44px; }
.class-key-result { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: center; gap: 24px; margin-top: 18px; padding: 22px; border: 1px solid rgba(35,213,232,.32); background: #eefbfc; color: #08111f; }
.class-key-result strong { display: block; margin-top: 8px; font: 800 clamp(24px,4vw,40px)/1 ui-monospace,monospace; letter-spacing: .08em; }
.class-key-result p { overflow-wrap: anywhere; color: #4d6078; }
.class-key-qr svg { display: block; width: 100%; height: auto; background: white; }
.class-key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.compact-modal { width: min(520px, calc(100% - 28px)); padding: 28px; }
.compact-modal form { display: grid; gap: 12px; margin-top: 20px; }
.compact-modal label { display: grid; gap: 8px; }
.compact-modal .primary-button,
.compact-modal .ghost-button { margin-top: 0; }

@media (max-width: 820px) {
  .section-admin-layout { grid-template-columns: 1fr; }
  .staff-section { grid-template-columns: 1fr; align-items: stretch; }
  .class-key-result { grid-template-columns: 1fr; }
  .class-key-qr { width: min(220px,100%); }
}

/* Active challenges keep the course and its attempt board in the same glance. */
.challenge-tabs{display:flex;gap:8px;grid-column:1/-1;margin:0 0 20px;padding:5px;border:1px solid var(--line);border-radius:14px;background:#f3f7fc;width:max-content;max-width:100%}.challenge-tabs button{min-height:44px;padding:10px 16px;border:0;border-radius:10px;background:transparent;color:#53647c;font:700 13px Inter,system-ui,sans-serif;cursor:pointer}.challenge-tabs button[aria-selected="true"]{background:#101b31;color:#fff}.challenge-tabs button:focus-visible{outline:3px solid #23d5e8;outline-offset:2px}@media(max-width:600px){.challenge-tabs{width:100%;overflow-x:auto}.challenge-tabs button{flex:1;min-width:max-content}}
.current-course-picker { grid-column: 1 / -1; display: flex; min-height: clamp(280px, 30vw, 370px); align-items: center; flex-direction: column; justify-content: center; gap: clamp(24px, 4vw, 38px); margin-bottom: 18px; padding: clamp(28px, 5vw, 58px); border-radius: 16px; background: #0d1830; color: #f7f9ff; box-shadow: 0 16px 38px rgba(8, 17, 38, .16); transition: opacity 160ms ease-out, transform 160ms ease-out, filter 160ms ease-out; }
.current-course-picker.is-leaving { opacity: 0; transform: scale(.985); filter: blur(5px); pointer-events: none; }
.current-course-copy { max-width: 620px; text-align: center; }
.current-course-picker h2 { margin: 0 0 9px; font-size: clamp(28px, 3.2vw, 43px); letter-spacing: -.035em; }
.current-course-picker p { margin: 0; color: #c4d0e4; font-size: clamp(14px, 1.4vw, 17px); line-height: 1.5; }
.current-course-options { display: grid; grid-template-columns: repeat(2, minmax(260px, 340px)); justify-content: center; gap: 16px; width: 100%; }
.current-course-options button { display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; align-items: center; gap: 16px; min-height: 126px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.17); border-radius: 14px; background: rgba(255,255,255,.065); color: #f7f9ff; text-align: left; cursor: pointer; transition: transform 180ms cubic-bezier(.16,1,.3,1), background-color 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out; }
.current-course-options button svg { width: 58px; height: 58px; padding: 10px; border-radius: 13px; background: rgba(94,229,239,.1); color: #5ee5ef; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.25; }
.current-course-options button > span { min-width: 0; }
.current-course-options strong, .current-course-options small { display: block; }
.current-course-options strong { font-size: clamp(18px, 1.8vw, 23px); letter-spacing: -.025em; }
.current-course-options small { margin-top: 7px; color: #bac8df; font-size: 12px; line-height: 1.35; }
.current-course-options button b { color: #5ee5ef; font-size: 20px; }
.current-course-options button:hover { transform: translateY(-3px); border-color: rgba(94,229,239,.72); background: rgba(255,255,255,.1); box-shadow: 0 15px 28px rgba(0,0,0,.2); }
.current-course-options button:active { transform: translateY(-1px); }
.current-course-options button:focus-visible { outline: 3px solid #5ee5ef; outline-offset: 4px; }
.current-course-view { grid-template-columns: 1fr; animation: currentChallengeReveal 340ms cubic-bezier(.16,1,.3,1) both; }
.current-course-view.is-leaving { opacity: 0; transform: translateY(8px); filter: blur(5px); transition: opacity 160ms ease-out, transform 160ms ease-out, filter 160ms ease-out; pointer-events: none; }
.current-course-return { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.current-course-return button { display: inline-flex; min-height: 46px; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid #cbd6e7; border-radius: 11px; background: #fff; color: #192641; font-weight: 750; cursor: pointer; }
.current-course-return button:hover { border-color: #8399bb; background: #f5f8fc; }
.current-course-return button:focus-visible { outline: 3px solid #23d5e8; outline-offset: 3px; }
.current-course-return > span { color: #60718a; font-size: 13px; font-weight: 700; }
@keyframes currentChallengeReveal { from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 10% 0 round 16px); } to { opacity: 1; transform: none; clip-path: inset(0 round 16px); } }
.current-challenges {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.current-course-view.current-challenges { grid-template-columns: minmax(0, 1fr); }
.math2-activity-picker { margin-block: 12px; }
.math2-activity-return { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #dce4ef; }
.math2-activity-return button { min-height: 44px; padding: 10px 14px; border: 1px solid #cbd6e7; border-radius: 10px; background: #fff; color: #192641; font: inherit; font-weight: 650; cursor: pointer; }
.math2-activity-return button:focus-visible { outline: 3px solid #23d5e8; outline-offset: 3px; }
.math2-activity-return span { color: #60718a; font-size: 13px; }
.math2-invaders-heading h2 { margin: 8px 0 10px; font-size: clamp(26px, 3vw, 38px); color: #101b31; }
.math2-invaders-heading p { max-width: 65ch; margin: 0 0 24px; color: #60718a; line-height: 1.55; }
.math2-invaders-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cover-integral-invaders-2 { position: relative; background: #0d0c22; overflow: hidden; }
.cover-integral-invaders-2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-integral-invaders-2 > span { position: absolute; left: 22px; bottom: 22px; color: #ffd700; text-shadow: 2px 2px 0 #ff4f7a; font-size: 26px; font-weight: 800; line-height: 1.15; }
@media (max-width:700px) { .math2-invaders-games { grid-template-columns: minmax(0, 1fr); } .math2-activity-return { align-items: flex-start; flex-direction: column; gap: 8px; } }
.current-challenge {
  min-width: 0;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid rgba(35, 213, 232, .3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(243,248,255,.96));
  box-shadow: 0 20px 55px rgba(8, 17, 38, .08);
}
.procedure-hub { grid-column: 1 / -1; padding: clamp(20px, 3vw, 40px); }
.procedure-hub .current-challenge-heading { margin-bottom: 24px; }
.procedure-challenge-list { display: grid; gap: 12px; }
.procedure-challenge-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); gap: 16px; align-items: stretch; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.procedure-challenge-intro { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 10px; }
.procedure-challenge-number { color: #078a9a; font: 700 11px "DM Mono", monospace; letter-spacing: .1em; }
.procedure-challenge-intro h3 { margin: 10px 0 18px; color: #101b31; font-size: clamp(20px, 2vw, 27px); line-height: 1.15; letter-spacing: -.035em; }
.procedure-challenge-intro button { display: inline-flex; align-items: center; gap: 18px; min-height: 42px; padding: 10px 16px; border: 0; border-radius: 10px; background: #285fff; color: #fff; font-weight: 700; cursor: pointer; }
.procedure-challenge-intro button:hover { background: #194bd9; }
.procedure-challenge-board, .procedure-global { min-width: 0; padding: 16px; border-radius: 12px; background: #081126; color: #f5f8ff; }
.procedure-challenge-board > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.procedure-challenge-board strong { font-size: 14px; }
.procedure-challenge-board button { border: 0; background: none; color: #7ee6ef; font-size: 12px; font-weight: 700; cursor: pointer; }
.procedure-challenge-board ol, .procedure-global ol { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.procedure-challenge-board li, .procedure-global li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.06); font-size: 11px; }
.procedure-challenge-board li i, .procedure-global li i { color: #7ee6ef; font: 700 10px "DM Mono", monospace; font-style: normal; }
.procedure-challenge-board li span, .procedure-global li span { min-width: 0; }
.procedure-challenge-board li strong, .procedure-challenge-board li small, .procedure-global li strong, .procedure-global li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.procedure-challenge-board li small, .procedure-global li small { margin-top: 3px; color: #a1b2d0; font-size: 10px; }
.procedure-challenge-board li b, .procedure-global li b { white-space: nowrap; font: 700 11px "DM Mono", monospace; }
.procedure-challenge-board .leaderboard-empty, .procedure-global .leaderboard-empty { display: block; color: #a1b2d0; }
.procedure-global { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; margin-top: 20px; padding: clamp(20px, 2.5vw, 32px); background: linear-gradient(130deg, #0d1730, #152b52); }
.procedure-global > div > span { color: #7ee6ef; font: 700 10px "DM Mono", monospace; letter-spacing: .12em; }
.procedure-global h3 { margin: 8px 0 10px; font-size: clamp(24px, 2.8vw, 36px); letter-spacing: -.04em; }
.procedure-global p { max-width: 34ch; color: #c3cee4; font-size: 14px; line-height: 1.5; }
.procedure-global ol { margin-top: 0; }
@media (max-width: 700px) { .procedure-challenge-row, .procedure-global { grid-template-columns: 1fr; } .procedure-challenge-row { padding: 10px; } .procedure-challenge-intro { padding: 8px; } .procedure-global { gap: 18px; } }
.current-challenge-heading { margin-bottom: 16px; }
.current-challenge-heading span {
  color: #0a8e9c;
  font: 600 10px "DM Mono", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.current-challenge-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(25px, 2.1vw, 34px);
  line-height: 1;
  letter-spacing: -.045em;
}
.current-challenge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr);
  gap: 12px;
  height: calc(100% - 54px);
}
.current-challenge .game-card,
.current-challenge .game-card:first-child {
  grid-column: auto;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border-color: rgba(40, 100, 255, .18);
}
.current-challenge .game-card:hover { transform: translateY(-2px); }
.current-challenge .game-cover,
.current-challenge .game-card:first-child .game-cover { min-height: 172px; }
.current-challenge .game-card--archipelago .game-cover,
.current-challenge .game-card--archipelago:first-child .game-cover { min-height: 236px; }
.current-challenge .game-card-body,
.current-challenge .game-card:first-child .game-card-body {
  min-height: 0;
  justify-content: flex-start;
  padding: 18px;
}
.current-challenge .game-card h3,
.current-challenge .game-card:first-child h3 { font-size: 22px; }
.current-challenge .game-card-top { display: none; }
.current-challenge .game-card-description { -webkit-line-clamp: 2; }
.current-challenge .game-card--archipelago .game-card-description { display: block; overflow: visible; -webkit-line-clamp: unset; }
.current-challenge .game-topic-row { display: none; }
.current-leaderboard {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 16px;
  border-radius: 14px;
  color: #f5f8ff;
  background: #081126;
}
.current-leaderboard > div span {
  color: #25d4e4;
  font: 600 8px "DM Mono", monospace;
  letter-spacing: .12em;
}
.current-leaderboard h3 { margin: 5px 0 0; font-size: 17px; }
.current-leaderboard ol { display: grid; gap: 7px; margin: 15px 0; padding: 0; list-style: none; }
.current-leaderboard li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
}
.current-leaderboard li i { color: #25d4e4; font: 500 8px "DM Mono", monospace; font-style: normal; }
.current-leaderboard li span { min-width: 0; }
.current-leaderboard li strong,
.current-leaderboard li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-leaderboard li strong { font-size: 10px; }
.current-leaderboard li small { margin-top: 2px; color: #91a1bd; font: 500 7px "DM Mono", monospace; }
.current-leaderboard li b { font: 500 8px "DM Mono", monospace; white-space: nowrap; }
.current-leaderboard .leaderboard-cohort-filter { margin-top: 10px; }
.current-leaderboard .leaderboard-cohort-filter button { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #fff; }
.current-leaderboard .leaderboard-cohort-filter button small { color: #91a1bd; }
.current-leaderboard .leaderboard-cohort-filter button.active { border-color: #25d4e4; background: rgba(37,212,228,.14); }
.current-leaderboard .leaderboard-empty { display: block; color: #91a1bd; font-size: 11px; line-height: 1.5; }
.current-leaderboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 11px 12px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  font-size: 11px;
  font-weight: 700;
}
.current-leaderboard-action:hover { background: rgba(255,255,255,.12); }
.detail-leaderboard ol { max-height: min(360px, 42vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }

@media (max-width: 1180px) {
  .current-challenges { grid-template-columns: 1fr; }
  .current-challenge-layout { grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); }
}

@media (max-width: 700px) {
  .current-course-picker { min-height: 0; gap: 22px; padding: 26px 16px; }
  .current-course-options { grid-template-columns: 1fr; gap: 12px; }
  .current-course-options button { min-width: 0; min-height: 106px; grid-template-columns: 54px minmax(0, 1fr) 20px; gap: 13px; padding: 16px; }
  .current-course-options button svg { width: 50px; height: 50px; }
  .current-course-return { align-items: flex-start; flex-direction: column-reverse; gap: 8px; }
  .current-challenge { padding: 16px; }
  .current-challenge-heading h2 { font-size: 29px; }
  .current-challenge-layout { grid-template-columns: 1fr; height: auto; }
  .current-challenge .game-cover,
  .current-challenge .game-card:first-child .game-cover { min-height: 205px; }
  .current-challenge .game-card--archipelago .game-cover,
  .current-challenge .game-card--archipelago:first-child .game-cover { min-height: 250px; }
  .archipelago-compass { width: 58px; top: 18px; right: 18px; }
  .archipelago-compass i { inset: 7px 27px; }
  .archipelago-compass b { inset: 13px; font-size: 18px; }
  .archipelago-audio { top: 16px; left: 16px; }
  .archipelago-audio span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .current-leaderboard { min-height: 0; }
  .current-leaderboard ol { margin-bottom: 12px; }
  .detail-leaderboard ol { max-height: none; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .current-course-picker, .current-course-view, .current-course-options button, .archipelago-sky, .archipelago-route path, .archipelago-compass { animation: none; transition: none; }
}
body.reduce-motion .current-course-picker, body.reduce-motion .current-course-view, body.reduce-motion .current-course-options button, body.reduce-motion .archipelago-sky, body.reduce-motion .archipelago-route path, body.reduce-motion .archipelago-compass { animation: none; transition: none; }

.game-detail-window.leaderboard-only {
  display: block;
  width: min(calc(100% - 24px), 820px);
  height: min(88dvh, 820px);
  max-height: none;
  overflow: hidden;
}
.leaderboard-only .detail-cover,
.leaderboard-only .game-detail-content > :not(.detail-leaderboard) { display: none; }
.leaderboard-only .game-detail-content {
  height: 100%;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
}
.leaderboard-only .detail-leaderboard {
  display: flex;
  height: 100%;
  flex-direction: column;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
}
.leaderboard-only .detail-leaderboard > div { padding-right: 46px; }
.leaderboard-only .detail-leaderboard h3 { font-size: clamp(20px, 3vw, 30px); }
.leaderboard-only .detail-leaderboard ol {
  flex: 1;
  max-height: none;
  margin-top: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.leaderboard-only .detail-leaderboard li {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 12px 14px;
}
.leaderboard-only .detail-leaderboard li i { font-size: 11px; }
.leaderboard-only .detail-leaderboard li span strong { font-size: 14px; }
.leaderboard-only .detail-leaderboard li span small { font-size: 10px; }
.leaderboard-only .detail-leaderboard li b { font-size: 12px; }

@media (max-width: 700px) {
  .game-detail-window.leaderboard-only {
    width: 100%;
    height: calc(100dvh - 20px);
  }
  .leaderboard-only .game-detail-content { padding: 18px 12px calc(16px + env(safe-area-inset-bottom)); }
  .leaderboard-only .detail-leaderboard { padding: 18px 12px; }
  .leaderboard-only .detail-leaderboard h3 { font-size: 20px; }
  .leaderboard-only .detail-leaderboard li { min-height: 54px; padding: 10px; }
}
