body.menu { overflow: hidden; }
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; }

.rail { display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; background: var(--ink-2); border-right: 1px solid var(--line); overflow-y: auto; }
.rail .brand { padding: 0 8px; }
.rail-links { display: flex; flex-direction: column; gap: 2px; }
.rail-link { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.rail-link:hover { background: var(--ink-3); color: var(--text); }
.rail-link.active { background: var(--ink-3); color: var(--text); box-shadow: inset 3px 0 0 var(--pink); }
.rail-ext { margin-top: 10px; border: 1px dashed var(--line-2); }
.rail-h { font-family: var(--ui); font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 8px 6px; }
.rail-friend-list { display: flex; flex-direction: column; gap: 2px; }
.rail-friend { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; text-decoration: none; }
.rail-friend:hover { background: var(--ink-3); }
.rail-friend-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rail-friend-text b { font-size: 13px; font-weight: 600; }
.rail-friend-text span { font-size: 11.5px; color: var(--mint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.rail-guest { font-size: 13px; color: var(--muted); padding: 0 4px; }
.discord-btn { background: #5865f2; border-color: #5865f2; color: #fff; }
.discord-btn:hover { background: #6d78f5; border-color: #6d78f5; }
.rail-me { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; background: var(--ink); border: 1px solid var(--line); }
.rail-me:hover { border-color: var(--line-2); }
.rail-me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rail-me-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-me-text span { font-size: 12px; color: var(--pink-2); font-weight: 600; }
.rail-logout { align-self: flex-start; }

.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.view { overflow-y: auto; min-width: 0; flex: 1; min-height: 0; }
.view[data-route="play"] { overflow: hidden; }

.play-view { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); height: 100%; }
.library { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.lib-tools { padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.lib-search { height: 38px; font-size: 14px; }
.lib-filters { display: flex; gap: 6px; align-items: center; }
.lib-filters select { width: auto; height: 30px; font-size: 12.5px; }
.lib-count { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.lib-groups { flex: 1; overflow-y: auto; padding: 8px; }
.lib-group { border-radius: 14px; margin-bottom: 4px; }
.lib-group.open { background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.lib-group-head { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 7px; background: none; border: 0; border-radius: 14px; text-align: left; cursor: pointer; }
.lib-group-head:hover { background: var(--ink-2); }
.lib-thumb { width: 46px; height: 46px; border-radius: 10px; background: var(--ink-3) center / cover; }
.lib-group-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lib-group-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-group-artist { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-group-pips { display: flex; gap: 3px; padding-right: 4px; }
.lib-group-pips i { width: 6px; height: 16px; border-radius: 3px; }
.lib-diffs { display: flex; flex-direction: column; padding: 0 6px 6px; gap: 2px; }
.lib-diff { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 26px 14px; gap: 10px; align-items: center; padding: 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
.lib-diff:hover { background: var(--ink-3); }
.lib-diff.active { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.lib-diff-name { font-weight: 600; font-size: 13.5px; }
.lib-diff-stars { font-weight: 700; font-size: 13px; }
.rank-badge { font-size: 15px; text-align: center; }
.rank-badge.muted { color: var(--faint); font-weight: 600; }
.fav-dot { color: var(--pink); font-size: 12px; }
.glyph-wrap { display: inline-flex; }

.stage { overflow-y: auto; min-width: 0; }
.stage-art { position: relative; height: 300px; background: linear-gradient(135deg, #2a1650, #120f24) center / cover; }
.stage-art-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,15,36,.15) 0%, rgba(18,15,36,.55) 55%, var(--ink) 100%); }
.stage-head { position: absolute; left: 32px; right: 32px; bottom: 18px; }
.stage-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(18,15,36,.7); color: var(--muted); margin-bottom: 10px; }
.stage-status.rated { color: var(--mint); }
.stage-title { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.035em; line-height: .95; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.stage-artist { font-size: 18px; font-weight: 500; margin-top: 8px; }
.stage-mapper { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.stage-body { padding: 8px 32px 40px; display: flex; flex-direction: column; gap: 22px; max-width: 980px; }
.diff-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.diff-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; font-weight: 600; font-size: 13px; }
.diff-tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.diff-tab span { color: var(--c); font-weight: 700; }
.diff-tab:hover { border-color: var(--line-2); }
.diff-tab.active { border-color: var(--c); background: var(--ink-3); }
.stage-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.facts { display: flex; gap: 34px; margin: 0; flex-wrap: wrap; }
.fact dt { color: var(--muted); font-size: 12px; }
.fact dd { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 24px; }
.stage-glyph { padding: 6px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); }
.stage-desc { color: var(--muted); max-width: 70ch; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.tag:hover { color: var(--text); border-color: var(--line-2); }
.stage-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.play-btn { min-width: 170px; font-size: 17px; height: 54px; border-radius: 14px; font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; }
.fav-btn span:first-child { font-size: 15px; }
.fav-btn.on { color: var(--pink); }

.mods { display: flex; flex-direction: column; gap: 10px; }
.mods-head, .lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mods-head h3, .lb-head h3 { font-size: 18px; }
.mods-mult { font-weight: 700; font-size: 13px; color: var(--muted); }
.mods-mult.up { color: var(--mint); }
.mods-mult.down { color: #ffb36b; }
.mods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.mod { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; text-align: left; font-size: 13px; }
.mod:hover { border-color: var(--line-2); }
.mod.on { border-color: var(--pink); background: rgba(255,79,154,.1); }
.mod-icon { font-size: 15px; }
.mod-name { font-weight: 600; }
.mod-x { color: var(--muted); font-size: 12px; }
.mod.on .mod-x { color: var(--pink-2); }

.lb { display: flex; flex-direction: column; gap: 10px; }
.lb-list { display: flex; flex-direction: column; }
.lb-row { display: grid; grid-template-columns: 30px 28px minmax(0, 1fr) 34px auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.lb-row:nth-child(odd) { background: rgba(27,23,52,.6); }
.lb-row.me { box-shadow: inset 0 0 0 1px var(--pink); }
.lb-pos { font-weight: 700; color: var(--muted); text-align: right; }
.lb-row.top1 .lb-pos { color: #ffe58a; }
.lb-row.top2 .lb-pos { color: #d8dcf0; }
.lb-row.top3 .lb-pos { color: #e9a36b; }
.lb-main { min-width: 0; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.lb-score { text-align: right; display: flex; flex-direction: column; line-height: 1.25; }
.lb-score span { font-size: 12px; color: var(--pink-2); font-weight: 600; }
.lb-sep { font-size: 12px; color: var(--faint); padding: 10px 10px 4px; }
.uname { text-decoration: none; font-weight: 600; }
.uname:hover { text-decoration: underline; }
.mod-mini { display: inline-flex; gap: 3px; }
.mod-mini span { font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: var(--ink-3); color: var(--pink-2); }
.flag { font-size: 15px; line-height: 1; }

.view-tabs { flex-wrap: wrap; }
.page { padding: 36px 40px 60px; max-width: 1180px; display: flex; flex-direction: column; gap: 22px; }
.page-head h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; }
.page-lede { color: var(--muted); margin-top: 8px; max-width: 62ch; }
.page-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.loading { display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card-h { font-family: var(--ui); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-count { color: var(--faint); font-weight: 600; }


.play-list { display: flex; flex-direction: column; }
.play-row { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.play-row:hover { background: var(--ink-2); }
.play-row.failed { opacity: .55; }
.play-row .pos { color: var(--muted); font-weight: 700; min-width: 28px; }
.play-row .rank-badge { font-size: 20px; }
.play-main { min-width: 0; }
.play-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-diff { color: var(--pink-2); font-size: 12.5px; font-weight: 600; margin-left: 8px; }
.play-sub { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 12.5px; }
.play-sub .when { color: var(--faint); }
.play-right { text-align: right; line-height: 1.3; }
.play-pp { font-weight: 700; color: var(--pink-2); }
.play-score { font-size: 12.5px; color: var(--muted); }

.user-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.user-row-main { flex: 1; min-width: 0; }
.user-row-name { display: flex; align-items: center; gap: 6px; }
.user-row-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; gap: 6px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }

.friends-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.friends-col, .friend-lists { display: flex; flex-direction: column; gap: 18px; }
.search-results { display: flex; flex-direction: column; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-item a { text-decoration: none; }
.feed-sub { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.feed-time { color: var(--faint); font-size: 12px; white-space: nowrap; }

.profile { padding-top: 36px; }
.prof-cover { padding: 120px 28px 24px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, var(--ink)) 0%, var(--ink) 75%) center / cover; }
.prof-id { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.prof-avatar .avatar { border: 4px solid var(--ink-2); box-shadow: 0 0 0 2px var(--accent); }
.prof-avatar .avatar-wrap .dot { width: 20px; height: 20px; border-width: 4px; border-color: var(--ink); right: 4px; bottom: 4px; }
.prof-name-block { flex: 1; min-width: 220px; padding-bottom: 6px; }
.prof-name { font-size: 48px; font-weight: 800; letter-spacing: -0.035em; }
.prof-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-top: 6px; }
.prof-meta .online { color: var(--mint); font-weight: 600; }
.prof-roles { display: flex; gap: 6px; margin-top: 8px; }
.prof-actions { padding-bottom: 10px; }
.prof-numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-2); }
.big-stat { display: flex; flex-direction: column; padding: 16px 18px; border-left: 1px solid var(--line); min-width: 0; }
.big-stat:first-child { border-left: 0; }
.big-stat:first-child .big-value { color: var(--accent); }
.big-label { color: var(--muted); font-size: 12px; }
.big-value { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-sub { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-mid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; }
.bio { white-space: pre-wrap; line-height: 1.6; }
.prof-facts { display: flex; gap: 28px; margin: 0; }
.prof-facts dt { color: var(--muted); font-size: 12px; }
.prof-facts dd { margin: 0; font-weight: 600; }
.grades { display: flex; gap: 8px; flex-wrap: wrap; }
.grade { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); }
.grade .rank { font-size: 18px; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-grid i { border-radius: 3px; background: var(--ink-3); }
.heat-grid i.on { background: var(--accent); }
.heat-grid i.empty { background: none; }
.showcase { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); text-decoration: none; }
.showcase:hover { border-color: var(--line-2); }
.showcase-art { width: 54px; height: 54px; border-radius: 10px; background: var(--ink-3) center / cover; flex: none; }
.showcase-text { display: flex; flex-direction: column; line-height: 1.35; }
.showcase-text span:last-child { color: var(--muted); font-size: 12.5px; }
.prof-tabs { display: flex; flex-direction: column; gap: 12px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); opacity: .45; filter: grayscale(1); }
.ach.got { opacity: 1; filter: none; border-color: rgba(255,207,74,.35); }
.ach .ach-icon { font-size: 26px; }
.ach p { color: var(--muted); font-size: 12.5px; }
.map-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.map-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.map-tile-art { aspect-ratio: 16 / 10; border-radius: 12px; background: var(--ink-3) center / cover; margin-bottom: 6px; }
.map-tile span:last-child { color: var(--muted); font-size: 12.5px; }
.edit-grid { display: flex; flex-direction: column; gap: 14px; }
.edit-grid input[type="color"] { padding: 2px; height: 34px; }

.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.set-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.set-group .set-row:first-of-type { border-top: 0; }
.set-text { display: flex; flex-direction: column; min-width: 0; }
.set-text b { font-weight: 600; }
.set-text span { color: var(--muted); font-size: 12.5px; }
.set-control { flex: none; }
.set-control select { width: 170px; }
.slider { display: flex; align-items: center; gap: 10px; }
.slider input { width: 140px; }
.slider output { min-width: 56px; text-align: right; font-weight: 600; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-3); border: 1px solid var(--line-2); transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--pink); border-color: var(--pink); }
.switch input:checked + span::after { transform: translateX(16px); background: #1a0612; }
.switch input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
.sessions { display: flex; flex-direction: column; }
.session { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.news-bar { display: flex; flex-direction: column; }
.notice-strip { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,79,154,.16), rgba(181,140,255,.08)); font-size: 13.5px; }
.notice-strip.tone-success { background: linear-gradient(90deg, rgba(79,227,193,.16), rgba(79,227,193,.04)); }
.notice-strip.tone-warning { background: linear-gradient(90deg, rgba(255,207,74,.18), rgba(255,207,74,.04)); }
.notice-strip.tone-danger { background: linear-gradient(90deg, rgba(255,84,112,.2), rgba(255,84,112,.05)); }
.notice-strip-text { flex: 1; display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
.notice-strip-text span { color: var(--muted); }
.news-x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.whatsnew-card { display: flex; flex-direction: column; gap: 8px; }
.news-version { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--pink-2); background: rgba(255,79,154,.12); padding: 3px 9px; border-radius: 6px; }
.md { display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.md h2, .md h3 { font-size: 16px; margin-top: 8px; color: var(--text); }
.md p { color: var(--muted); }
.md ul { margin: 0; padding-left: 20px; color: var(--muted); }
.md code { font-family: var(--mono, monospace); font-size: 12.5px; background: var(--ink); padding: 1px 5px; border-radius: 4px; }

.rail-me-row { display: flex; gap: 8px; align-items: center; }
.rail-me-row .rail-me { flex: 1; min-width: 0; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); cursor: pointer; font-size: 17px; flex: none; }
.bell:hover { border-color: var(--line-2); }
.bell .badge { position: absolute; top: -6px; right: -6px; }
.rail-admin { color: var(--gold); }
.rail-version { font-size: 11.5px; color: var(--faint); text-decoration: none; padding: 0 8px; }
.rail-version:hover { color: var(--pink-2); }
.notif-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: 12px; justify-content: space-between; padding: 10px 4px; border-top: 1px solid var(--line); font-size: 13.5px; }
.notif:first-child { border-top: 0; }
.notif.unread p::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); margin-right: 8px; vertical-align: middle; }
.notif p { color: var(--text) !important; }
.notif time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.login-prompt { display: flex; flex-direction: column; gap: 14px; }
.login-perks { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.guest-warn { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,179,107,.35); background: rgba(255,179,107,.08); font-size: 13px; }
.guest-warn span { color: var(--muted); }
.fullscreen-msg { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.fullscreen-card { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; color: var(--pink); }
.fullscreen-card h1 { font-size: 32px; font-weight: 800; color: var(--text); }
.fullscreen-card p { color: var(--muted); }
.mobile-note { padding: 12px 14px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; max-width: 420px; }
.mobile-note b { color: var(--text); }
body.mobile .rail-ext { display: none; }

.lib-thumb { position: relative; }
.lib-video { position: absolute; right: 3px; bottom: 3px; font-size: 8px; background: rgba(0,0,0,.65); color: #fff; border-radius: 4px; padding: 1px 4px; }
.rated-dot { color: var(--mint); margin-left: 6px; font-size: 12px; }
.hidden-tag { margin-left: 6px; font-size: 10.5px; color: #ffb36b; font-weight: 700; }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-tags { display: flex; gap: 6px; margin-bottom: 10px; }
.stage-tags .stage-status { margin-bottom: 0; }
.stage-status.warn { color: #ffb36b; }
.preview-btn span:first-child { font-size: 11px; width: 14px; }
.preview-btn.on { color: var(--pink); }
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-item { text-align: left; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--text); cursor: pointer; font-weight: 600; }
.menu-item:hover { border-color: var(--pink); }
.mods-head { gap: 10px; }
.mods-head h3 { margin-right: auto; }
.mod-groups { display: flex; flex-direction: column; gap: 10px; }
.mod-group { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: start; }
.mod-group-label { font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 12px; }

.lb-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lb-mods { width: auto; height: 32px; font-size: 12.5px; }
button.lb-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.lb-row:nth-child(odd) { background: rgba(27,23,52,.6); }
button.lb-row:hover { background: var(--ink-3); }
.lb-name { display: flex; align-items: center; gap: 6px; }
.lb-sub .when { color: var(--faint); }
.lb-more { align-self: center; margin-top: 6px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin-bottom: 10px; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; color: inherit; position: relative; min-width: 0; }
.podium-step:hover { border-color: var(--line-2); }
.podium-step.p1 { padding-top: 24px; border-color: rgba(255,229,138,.45); background: linear-gradient(180deg, rgba(255,229,138,.12), var(--ink-2)); }
.podium-step.p2 { border-color: rgba(216,220,240,.3); }
.podium-step.p3 { border-color: rgba(233,163,107,.35); }
.podium-medal { position: absolute; top: 8px; left: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1a0612; background: #e9a36b; }
.p1 .podium-medal { background: #ffe58a; }
.p2 .podium-medal { background: #d8dcf0; }
.podium-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-family: var(--display); font-size: 19px; font-weight: 800; }
.podium-sub { font-size: 12px; color: var(--muted); }

.rankings .page-tools { justify-content: space-between; }
.rank-scope { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rank-country { width: auto; min-width: 190px; }
.rank-search { width: 220px; }
.rank-podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; align-items: end; max-width: 760px; margin: 6px auto 10px; width: 100%; }
.rank-step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; position: relative; min-width: 0; }
.rank-step-name { font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-step-flag { font-size: 12px; color: var(--muted); min-height: 1em; }
.rank-step-value { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--pink-2); }
.rank-step-block { display: block; width: 100%; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); border-bottom: 0; }
.rank-step.p1 .rank-step-block { height: 90px; background: linear-gradient(180deg, rgba(255,229,138,.22), var(--ink-2)); border-color: rgba(255,229,138,.35); }
.rank-step.p2 .rank-step-block { height: 60px; }
.rank-step.p3 .rank-step-block { height: 40px; }
.rank-step .podium-medal { top: auto; left: auto; position: static; }
.rank-you { color: var(--muted); }
.rank-table tbody tr { cursor: pointer; }
.rank-more { align-self: center; margin-top: 10px; }
.online-pill { font-size: 10.5px; font-weight: 700; color: var(--mint); border: 1px solid rgba(79,227,193,.4); border-radius: 999px; padding: 0 6px; }

.play-row { grid-template-columns: auto 34px minmax(0, 1fr) auto; }
.play-row.has-detail { grid-template-columns: auto 34px minmax(0, 1fr) auto auto; }
.play-detail { opacity: 0; }
.play-row:hover .play-detail { opacity: 1; }
.sd-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sd-who { flex: 1; display: flex; flex-direction: column; min-width: 160px; }
.sd-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sd-score b { font-family: var(--display); font-size: 28px; font-weight: 800; }
.sd-score .rank-badge { font-size: 28px; }
.sd-score span { color: var(--muted); }

.challenge { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.challenge:first-of-type { border-top: 0; }
.challenge a { text-decoration: none; }
.challenge-status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--ink-3); white-space: nowrap; }
.challenge.st-open .challenge-status { color: var(--pink-2); }
.challenge.st-won .challenge-status { color: var(--mint); }
.challenge.st-lost .challenge-status { color: var(--gold); }

.prof-cover.from-avatar { position: relative; overflow: hidden; background: var(--ink-2); }
.prof-cover.from-avatar::before { content: ""; position: absolute; inset: -40px; background: var(--av) repeat-x center / auto 160%; filter: blur(16px) saturate(1.35); opacity: .6; transform: scale(1.1); }
.prof-cover.from-avatar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,15,36,.05) 0%, rgba(18,15,36,.9) 100%); }
.prof-cover.from-avatar > * { position: relative; z-index: 1; }
.prof-cover { background-size: cover; background-position: center; }
.prof-actions { display: flex; gap: 8px; align-items: center; }
.restricted-note { padding: 10px 14px; border-radius: 12px; background: rgba(255,179,107,.1); border: 1px solid rgba(255,179,107,.3); color: #ffcf9a; font-size: 13px; }
.map-tile-art { position: relative; }
.tile-tag { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; color: var(--mint); background: rgba(13,11,27,.8); border-radius: 6px; padding: 2px 7px; }
.uploads { display: flex; flex-direction: column; gap: 14px; }
.upload-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.upload-row:first-of-type { border-top: 0; }
.upload-art { width: 48px; height: 48px; border-radius: 10px; background: var(--ink-3) center / cover; flex: none; }
.upload-main { flex: 1; min-width: 0; }
.upload-main a { text-decoration: none; }
.sub-status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--ink-3); white-space: nowrap; }
.sub-status.st-pending { color: var(--gold); }
.sub-status.st-approved { color: var(--mint); }
.sub-status.st-rejected { color: #ff8aa0; }
.compare-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.compare-side { display: flex; align-items: center; gap: 10px; }
.compare-side strong { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--pink-2); }
.compare-vs { color: var(--muted); font-size: 13px; }
.compare-table td { padding: 8px; }
.compare-table td.win { color: var(--mint); font-weight: 700; }
.compare-map { text-align: center; }
.compare-map a { text-decoration: none; font-weight: 600; }

@media (max-width: 1200px) {
    .prof-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .big-stat:nth-child(4) { border-left: 0; }
    .big-stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 980px) {
    body.menu { overflow: auto; }
    .app { grid-template-columns: 1fr; height: auto; }
    .main-col { height: auto; }
    .podium { grid-template-columns: 1fr; }
    .rank-podium { gap: 6px; }
    .mod-group { grid-template-columns: 1fr; }
    .rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; position: sticky; top: 0; z-index: 5; }
    .rail-links { flex-direction: row; flex-wrap: wrap; }
    .rail-link { padding: 6px 10px; font-size: 13.5px; }
    .rail-link.active { box-shadow: inset 0 -2px 0 var(--pink); }
    .rail-ext { margin-top: 0; }
    .rail-friends { display: none; }
    .rail-user { margin-top: 0; margin-left: auto; flex-direction: row; align-items: center; }
    .rail-guest { display: none; }
    .view, .view[data-route="play"] { overflow: visible; }
    .play-view { grid-template-columns: 1fr; height: auto; }
    .library { border-right: 0; border-bottom: 1px solid var(--line); }
    .lib-groups { max-height: 46vh; }
    .stage-art { height: 220px; }
    .stage-head { left: 16px; right: 16px; }
    .stage-body { padding: 8px 16px 40px; }
    .page { padding: 24px 16px 48px; }
    .prof-cover { padding: 90px 16px 18px; }
    .friends-grid, .prof-mid { grid-template-columns: 1fr; }
    .set-grid { grid-template-columns: 1fr; }
    .table { font-size: 13px; }
    .table th:nth-child(3), .table td:nth-child(3), .table th:nth-child(4), .table td:nth-child(4) { display: none; }
}
@media (max-width: 560px) {
    .prof-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .big-stat { border-left: 0 !important; border-top: 1px solid var(--line); }
    .big-stat:nth-child(-n + 2) { border-top: 0; }
    .prof-name, .page-head h1 { font-size: 34px; }
    .facts { gap: 20px; }
    .set-row { flex-direction: column; align-items: stretch; }
}

.vs-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.vs-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vs-filters select { width: auto; height: 34px; }
.vs-search { width: 240px; height: 34px; }
.vs-lobbies { display: flex; flex-direction: column; }
.vs-lobby { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.vs-lobby:nth-child(odd) { background: rgba(27,23,52,.6); }
.vs-lobby:hover { background: var(--ink-2); }
.vs-lobby.busy { opacity: .7; }
.vs-lobby-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vs-lobby-title { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; }
.vs-lobby-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-lobby-sub { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; align-items: center; }
.vs-lobby-sub span:first-child { color: var(--text); }
.vs-friends { color: var(--mint); }
.vs-players { font-weight: 700; color: var(--muted); min-width: 34px; text-align: right; }
.vs-players.full { color: var(--faint); }
.vs-code { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .12em; padding: 3px 9px; border-radius: 7px; background: var(--ink); border: 1px dashed var(--line-2); color: var(--pink-2); }
.vs-map { display: flex; gap: 12px; align-items: center; min-width: 0; }
.vs-map-art { width: 72px; height: 72px; border-radius: 12px; background: var(--ink-3) center / cover; flex: none; }
.vs-map.compact .vs-map-art { width: 52px; height: 52px; }
.vs-map-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.vs-map-text b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-map-text span { color: var(--muted); font-size: 13px; }
.vs-map-diff span { font-weight: 700; }
.vs-map-empty { padding: 12px; color: var(--muted); }
.vs-modpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.vs-create { display: flex; flex-direction: column; gap: 14px; }
.vs-create-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); }
.vs-pick { display: flex; flex-direction: column; gap: 10px; }
.vs-maplist { max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.vs-maplist .lib-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--text); cursor: pointer; }
.vs-maplist .lib-item:hover, .vs-maplist .lib-item.active { border-color: var(--pink); }
.vs-maplist .lib-title { font-weight: 700; }
.vs-maplist .lib-diff { font-weight: 700; font-size: 12.5px; }
.vs-maplist .lib-meta { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.vs-pick-art { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 8px; background: var(--ink-3) center / cover; }

.vs-room { gap: 16px; }
.vs-room-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vs-room-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vs-room-title h1 { font-size: 30px; letter-spacing: -0.03em; }
.vs-room-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.vs-room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.vs-room-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vs-mapcard { gap: 12px; }
.vs-settings { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.vs-sel { width: auto; height: 30px; font-size: 12.5px; }
.vs-teampick { display: flex; gap: 8px; align-items: center; }
.vs-team-btn { border-color: var(--team); color: var(--team); }
.vs-team-btn.on { background: var(--team); color: #120f24; }
.vs-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vs-slot { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); min-height: 70px; position: relative; }
.vs-slot.ready { border-color: rgba(79,227,193,.45); }
.vs-slot.me { box-shadow: inset 0 0 0 1px var(--pink); }
.vs-slot.away { opacity: .55; }
.vs-slot.team-red, .vs-slot.team-blue { border-left: 4px solid var(--team); }
.vs-slot.empty { grid-template-columns: 22px minmax(0, 1fr) auto; border-style: dashed; color: var(--muted); background: transparent; min-height: 54px; }
.vs-slot.locked { opacity: .6; }
.vs-slot-num { font-family: var(--display); font-weight: 800; color: var(--faint); font-size: 14px; }
.vs-slot-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vs-slot-name { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.vs-hostpill { color: var(--gold); height: 18px; font-size: 10.5px; }
.vs-slot-sub { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.vs-slot-sub .warn { color: #ffb36b; }
.vs-slot-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; }
.vs-ready-tag { font-weight: 700; color: var(--muted); }
.vs-ready-tag.on { color: var(--mint); }
.vs-ready-tag.host { color: var(--gold); }
.vs-away { color: #ffb36b; font-weight: 700; }
.vs-slot-actions { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: flex-end; }
.vs-mymods { display: flex; gap: 10px; align-items: center; }
.vs-room-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.vs-start { min-width: 200px; font-family: var(--display); font-weight: 800; }
.vs-chat { display: flex; flex-direction: column; gap: 8px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; position: sticky; top: 16px; max-height: calc(100vh - 80px); }
.vs-chat-log { flex: 1; min-height: 260px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; padding-right: 4px; }
.vs-msg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: baseline; }
.vs-msg b { color: var(--pink-2); white-space: nowrap; }
.vs-msg span { overflow-wrap: anywhere; }
.vs-msg time { color: var(--faint); font-size: 10.5px; }
.vs-msg.system { grid-template-columns: minmax(0, 1fr) auto; color: var(--muted); font-style: italic; }
.vs-last { gap: 8px; }
.vs-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.vs-team-total { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); }
.vs-team-total.red { border-color: var(--team-red); } .vs-team-total.blue { border-color: var(--team-blue); }
.vs-team-total.won { background: rgba(255,207,74,.08); }
.vs-team-total b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.vs-team-total.red b { color: var(--team-red); } .vs-team-total.blue b { color: var(--team-blue); }
.vs-team-total strong { font-family: var(--display); font-size: 26px; font-weight: 800; }
.vs-team-total span { font-size: 12px; color: var(--muted); }
.vs-result-table tbody tr { cursor: pointer; }
.vs-result-table tr.forfeited { opacity: .55; }
.vs-result-table tr.failed td { color: var(--muted); }
.vs-teamdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.vs-failtag { color: var(--danger); font-weight: 800; }
.vs-rating-delta .up { color: var(--mint); font-weight: 700; } .vs-rating-delta .down { color: #ff8aa0; font-weight: 700; }
.vs-match-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px; border: 0; background: none; color: inherit; cursor: pointer; }
.vs-match-row:hover { background: var(--ink-2); }
.vs-match-art { width: 48px; height: 48px; border-radius: 10px; background: var(--ink-3) center / cover; }
.vs-match-main { min-width: 0; }
.vs-match-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-match-sub { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.vs-match-right { text-align: right; display: flex; flex-direction: column; line-height: 1.3; }
.vs-match-right b { font-family: var(--display); font-size: 17px; }
.vs-match-right b.won { color: var(--mint); } .vs-match-right b.lost { color: var(--muted); }
.vs-match-right span.up { color: var(--mint); font-size: 12px; } .vs-match-right span.down { color: #ff8aa0; font-size: 12px; }
.vs-match-detail { display: flex; flex-direction: column; gap: 14px; }
.vs-match-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.vs-match-meta { display: flex; flex-direction: column; gap: 2px; }
.vs-profile { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vs-profile .big-stat { border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
@media (max-width: 1100px) { .vs-room-grid { grid-template-columns: 1fr; } .vs-chat { position: static; max-height: none; } .vs-chat-log { min-height: 160px; max-height: 300px; } }
@media (max-width: 760px) { .vs-slots { grid-template-columns: 1fr; } .vs-lobby { grid-template-columns: 46px minmax(0, 1fr) auto; } .vs-lobby > .btn, .vs-lobby > .hint { grid-column: 2 / -1; justify-self: start; } .vs-search { width: 100%; } .vs-profile { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.keybind-row { display: flex; gap: 6px; align-items: center; }
.keybind { min-width: 84px; font-family: var(--mono); }
.keybind.listening { border-color: var(--pink); color: var(--pink-2); }
.practice-form { display: flex; flex-direction: column; gap: 12px; }
.practice-form .slider input { width: 220px; }

.intro { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 42%, #221a4a 0%, var(--ink) 60%); cursor: pointer; user-select: none; animation: fade .4s ease; }
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-text { position: absolute; left: 0; right: 0; top: calc(50vh - 30px + min(17vw, 17vh) + 14px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.intro-title { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 7vw, 92px); letter-spacing: -0.04em; line-height: 1; color: var(--text); text-shadow: 0 0 40px rgba(255,79,154,.35); display: flex; }
.intro-title span { display: inline-block; animation: intro-letter 1.1s cubic-bezier(.2,.9,.2,1.1) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
.intro-sub { color: var(--muted); font-size: 15px; animation: fade 1s ease 1s both; }
.intro-click { margin-top: 18px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-2); animation: intro-blink 1.6s ease-in-out 1.4s infinite; }
.intro.leaving .intro-text { animation: intro-out .5s ease forwards; }
body.has-intro { overflow: hidden; }
@keyframes intro-letter { from { opacity: 0; transform: translateY(40px) scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes intro-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; transform: translateY(-20px); } }
@media (prefers-reduced-motion: reduce) { .intro-title span { animation: none; } .intro-click { animation: none; opacity: 1; } }
