:root {
  --pink: #ff66aa;
  --pink-dark: #e04b8f;
  --bg: #150f13;
  --panel: #1e1519;
  --surface: #251b20;
  --surface-2: #31242b;
  --line: #3a2c33;
  --text: #f6eef2;
  --muted: #b39aa6;
  --accent: #8be04b;
  --gold: #ffd15c;
  --radius: 12px;
}
* { box-sizing: border-box; }
/* `hidden` must always win over component display rules (modals, buttons). */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 24px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.pink { color: var(--pink); }
.sub { margin: 20px 0 10px; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }

/* --- Layout: top bar + centered content --------------------------------- */
.app { min-height: calc(100vh / var(--zall, 1)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  padding: 0 clamp(16px, 3vw, 40px); height: 60px;
  background: rgba(21, 15, 19, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.logo { color: var(--pink); font-weight: 800; }
.nav { display: flex; gap: 2px; }
.nav-item {
  padding: 8px 14px; border: none; background: transparent; color: var(--muted);
  font: inherit; font-weight: 600; border-radius: 8px; cursor: pointer;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); background: var(--surface-2); }
.topbar-spacer { flex: 1; }
.auth { display: flex; align-items: center; gap: 10px; }
.auth .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.auth .n { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth .signout { background: none; border: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; padding: 4px; }
.auth .signout:hover { color: var(--pink); }

.content { max-width: 1500px; margin: 0 auto; padding: 34px clamp(16px, 3vw, 40px) 80px; width: 100%; }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-head { margin-bottom: 20px; }
.view-head p { margin: 6px 0 0; max-width: 60ch; }

/* --- Buttons / inputs --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: none; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: 15px; }
.btn.big { padding: 12px 20px; font-size: 16px; margin-top: 6px; }
.btn.sm { padding: 6px 10px; font-size: 13.5px; }
.btn.primary { background: var(--pink); color: #2a0a1a; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.accent { background: var(--accent); color: #10240a; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.ghost:hover { background: var(--line); }
input, textarea {
  width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; color: var(--text); font: inherit; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--pink); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.row .btn { white-space: nowrap; }


/* --- Room cards / grid -------------------------------------------------- */
.join-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.join-card .row { margin-top: 6px; }
.join-card input { text-transform: uppercase; }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.room-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  cursor: pointer; transition: border-color .12s ease, transform .06s ease;
}
.room-card:hover { border-color: var(--pink); }
.room-card:active { transform: translateY(1px); }
.room-card .rc-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .rc-owner { display: flex; align-items: center; gap: 7px; margin: 8px 0; color: var(--muted); font-size: 14px; }
.room-card .rc-owner img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.room-card .rc-meta { color: var(--muted); font-size: 13.5px; }
.room-card .rc-actions { display: flex; gap: 8px; margin-top: 12px; }
.room-card .code-pill { font-family: ui-monospace, monospace; }

.code-pill { background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-family: ui-monospace, monospace; color: var(--pink); }

/* --- Friends ------------------------------------------------------------ */
.add-friend { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; max-width: 460px; }
.friends-list { display: flex; flex-direction: column; gap: 8px; }
.friend-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.friend-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.friend-row .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 400px) { #friends-list .friend-row > .muted.small { display: none; } } /* (a small phone: the name, Message and ✕ fit; how many rooms is on their profile) */

/* --- Room detail -------------------------------------------------------- */
.back { background: none; border: none; color: var(--muted); font-weight: 600; cursor: pointer; padding: 0 0 12px; }
.back:hover { color: var(--pink); }
.room-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.room-top h1 { margin-bottom: 6px; }
.room-top-actions { display: flex; gap: 8px; flex: none; }
#room-owner { margin-left: 8px; }

.lb-tabs { display: flex; gap: 6px; margin: 18px 0 10px; }
.lb-tab { padding: 8px 13px; border: none; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-weight: 600; cursor: pointer; }
.lb-tab.active { background: var(--pink); color: #2a0a1a; }

.leaderboard { list-style: none; margin: 0; padding: 0; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 10px; background: var(--surface); margin-bottom: 6px; }
.lb-rank { width: 28px; text-align: center; font-weight: 800; color: var(--muted); font-size: 16px; }
.lb-row:nth-child(1) .lb-rank { color: var(--gold); }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.lb-name { flex: 1; font-weight: 600; }
.lb-metric { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--pink); }
.lb-sub { color: var(--muted); font-size: 13.5px; }

/* --- Map cards ---------------------------------------------------------- */
.map-list { display: flex; flex-direction: column; gap: 8px; }
.map-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 10px; padding: 8px; }
.map-cover { width: 100px; height: 56px; border-radius: 7px; object-fit: cover; background: var(--surface-2); flex: none; }
.map-meta { flex: 1; min-width: 0; }
.map-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-sub { color: var(--muted); font-size: 13.5px; }
.map-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-x { width: 32px; height: 32px; border: none; border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 15px; }
.icon-x:hover { background: #5a2330; color: #ffd9e2; }

.owner-add { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.owner-add > input { margin-bottom: 8px; }

/* --- Search widget ------------------------------------------------------ */
.search-results { max-height: 280px; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.result { display: flex; gap: 10px; background: var(--bg); border-radius: 9px; padding: 8px; }
.result-cover { width: 92px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; }
.result-meta { min-width: 0; flex: 1; }
.result-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diffs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.diff { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 13.5px; cursor: pointer; }
.diff:hover { border-color: var(--pink); color: var(--pink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; background: var(--surface-2); border-radius: 999px; font-size: 14px; color: var(--text); }
.chip .x { cursor: pointer; color: var(--muted); margin-left: 4px; }
.chip .x:hover { color: var(--pink); }
.staged { margin: 12px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.add-tab { padding: 6px 10px; border: none; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 600; cursor: pointer; font-size: 14px; }
.add-tab.active { background: var(--pink); color: #2a0a1a; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 13.5px; }

.empty { color: var(--muted); padding: 10px 2px; }

/* --- Modal windows ------------------------------------------------------ */
.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(480px, 100%); max-height: calc(88vh / var(--zall, 1)); overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-x:hover { color: var(--pink); }

/* --- Toast -------------------------------------------------------------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; padding: 11px 16px; border-radius: 10px;
  background: var(--surface-2); box-shadow: 0 8px 26px rgba(0,0,0,0.5); font-size: 15px; z-index: 60; }
.toast.error { background: #5a2330; color: #ffd9e2; }


/* --- Live indicator + tab bar ------------------------------------------- */
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.lb-bar .lb-tabs { margin: 0; }
.live-dot { color: #ff5e6b; font-size: 13.5px; font-weight: 700; letter-spacing: .03em; animation: livep 1.6s ease-in-out infinite; }
@keyframes livep { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* --- Leaderboard flourish ---------------------------------------------- */
.lb-right { text-align: right; display: inline-flex; flex-direction: column; align-items: flex-end; }
.lb-metric { font-size: 16px; }
.lb-top1 { background: linear-gradient(90deg, rgba(255,209,92,.14), var(--surface) 60%); }
.lb-top2 { background: linear-gradient(90deg, rgba(217,221,230,.12), var(--surface) 60%); }
.lb-top3 { background: linear-gradient(90deg, rgba(224,149,92,.12), var(--surface) 60%); }
.lb-top1 .lb-rank { color: #ffd15c; }
.lb-top2 .lb-rank { color: #d9dde6; }
.lb-top3 .lb-rank { color: #e0955c; }

/* --- Grades (osu! letters): one look everywhere, as the app shows them too: osu!'s colour, the letter on a tint of it --- */
.rank-badge, .pf-grade, .tp-grade, .wt-grade { --gc: var(--muted); color: var(--gc); background: color-mix(in srgb, var(--gc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gc) 36%, transparent); font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.rank-ss, .rank-s, .pf-grade.g-x, .pf-grade.g-s, .tp-grade.g-x, .tp-grade.g-s, .wt-grade.g-SS, .wt-grade.g-S { --gc: #ffd15c; }
.pf-grade.g-xh, .pf-grade.g-sh, .tp-grade.g-xh, .tp-grade.g-sh, .wt-grade.silver { --gc: #dfe3ea; }
.rank-a, .pf-grade.g-a, .tp-grade.g-a, .wt-grade.g-A { --gc: #88da20; } .rank-b, .pf-grade.g-b, .tp-grade.g-b, .wt-grade.g-B { --gc: #58b8ff; }
.rank-c, .pf-grade.g-c, .tp-grade.g-c, .wt-grade.g-C { --gc: #c57bdb; } .rank-d, .pf-grade.g-d, .tp-grade.g-d, .wt-grade.g-D { --gc: #ff6a6a; }
.rank-badge { flex: none; min-width: 30px; text-align: center; padding: 4px 6px; border-radius: 7px; font-size: 13.5px; }

/* --- Per-map score rows (osu! style) ----------------------------------- */
.score-row { align-items: center; gap: 10px; }
.score-main { flex: 1; min-width: 0; }
.score-line1 { display: flex; align-items: center; gap: 6px; }
.score-line1 .lb-name { font-weight: 700; }
.score-line2 { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-line2 .acc { color: #ffd15c; font-weight: 700; }
.score-line2 .combo { color: var(--text); }
.hits b { font-weight: 800; }
.hits .h300 { color: #66ccff; }
.hits .h100 { color: #8be04b; }
.hits .h50  { color: #ffc857; }
.hits .hmiss { color: #ff5d6c; }
.score-right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.score-right .pp { color: var(--pink); font-weight: 900; font-size: 16px; }
.score-right .pp small { font-size: 11.5px; font-weight: 700; opacity: .8; }
.score-right .score-total { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mod { background: var(--surface-2); color: var(--pink); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; font-weight: 800; }

/* --- Rule badges -------------------------------------------------------- */
.room-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--surface-2); color: var(--text); }
.badge.mod-badge { color: var(--pink); }
.badge.onetry { background: #4a2330; color: #ffb3c6; }
.badge.timer { background: #1f3320; color: #9be89b; font-variant-numeric: tabular-nums; }
.badge.timer.locked { background: #5a2330; color: #ffd9e2; }

/* --- Settings modal controls ------------------------------------------- */
/* one of a few: a track with the choices in it, so two groups side by side never read as one */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg-btn { padding: 7px 14px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--pink); color: #2a0a1a; }
.seg-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.mod-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.modchip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-weight: 800; cursor: pointer; font-size: 13.5px; }
.modchip.on { background: var(--pink); color: #2a0a1a; border-color: var(--pink); }
.toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0; cursor: pointer; }
.toggle input { width: auto; }
#timer-minutes-wrap { margin-top: 8px; }
#timer-current { margin-top: 6px; }

/* --- Mapset cards (grouped by set) -------------------------------------- */
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.set-top { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.set-meta { flex: 1; min-width: 0; }
.set-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-sub { color: var(--muted); font-size: 13.5px; }
.set-dl { flex: none; }
.diff-rows { border-top: 1px solid var(--line); }
.diff-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-top: 1px solid rgba(255,255,255,0.03); }
.diff-row:first-child { border-top: none; }
.star { font-weight: 800; font-variant-numeric: tabular-nums; flex: none; min-width: 56px; }
.diff-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diff-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.diff-link { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.diff-link:hover { color: var(--pink); }
.btn.xs { padding: 4px 9px; font-size: 13.5px; }
.icon-x.xs { width: 26px; height: 26px; font-size: 13.5px; }

/* --- Clickable leaderboard rows ---------------------------------------- */
.lb-clickable { cursor: pointer; transition: background .1s ease; }
.lb-clickable:hover { outline: 1px solid var(--line); }
.lb-clickable:hover .lb-name { color: var(--pink); }

/* --- Player scores modal ----------------------------------------------- */
.ps-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ps-head .lb-avatar { width: 46px; height: 46px; }
.ps-sum { font-weight: 800; color: var(--pink); font-size: 16px; }
.ps-list { list-style: none; margin: 0; padding: 0; }
.ps-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; background: var(--surface); margin-bottom: 5px; }
.ps-row.not-played { opacity: 0.55; }
.ps-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-stats { display: flex; align-items: center; gap: 10px; flex: none; font-variant-numeric: tabular-nums; }
.ps-stats .pp { color: var(--pink); font-weight: 800; }
.ps-stats .acc { color: var(--gold); font-weight: 700; }
.ps-stats .score-total { color: var(--muted); font-size: 13.5px; }

/* --- Wider room: leaderboard + maps side by side, both bigger ----------- */
.room-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; margin-top: 8px; }
.room-col { min-width: 0; }
@media (max-width: 900px) { .room-split { grid-template-columns: 1fr; gap: 18px; } }

/* Bigger, more readable leaderboard */
.leaderboard .lb-row { padding: 14px 16px; gap: 14px; }
.leaderboard .lb-rank { width: 34px; font-size: 18px; }
.leaderboard .lb-avatar { width: 46px; height: 46px; }
.leaderboard .lb-name { font-size: 16px; }
.leaderboard .lb-metric { font-size: 20px; }
.leaderboard .lb-sub { font-size: 14px; }

/* Bigger room heading + badges */
.room-top h1 { font-size: 30px; }
.badge { font-size: 14px; padding: 4px 11px; }
.set-title { font-size: 16px; }
.diff-row { padding: 10px 14px; }
.diff-name { font-size: 15px; }
.star { min-width: 62px; font-size: 15px; }

/* Roomier cards on wide screens */
.room-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* --- Inline per-map scores panel (right column) ------------------------- */
.scores-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.scores-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 16px; }
.scores-title .st-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scores-actions { display: flex; gap: 6px; flex: none; }
.back.sm { padding: 0 0 8px; }

.diff-row.clickable { cursor: pointer; transition: background .1s ease; }
.diff-row.clickable:hover { background: rgba(255,102,170,0.06); }
.diff-row.clickable:hover .diff-name { color: var(--pink); }

/* Your own row, highlighted wherever scores appear */
.me-row { background: linear-gradient(90deg, rgba(255,102,170,0.16), var(--surface) 70%); outline: 1px solid rgba(255,102,170,0.5); }
.you-tag { background: var(--pink); color: #2a0a1a; border-radius: 999px; padding: 1px 7px; font-size: 11.5px; font-weight: 900; }

/* --- Left = leaderboard / clicked-map scores; wider split -------------- */
.room-split { grid-template-columns: 1.3fr 1fr; }
/* Selected difficulty on the right, while its scores show on the left */
.diff-row.active { background: rgba(255,102,170,0.14); box-shadow: inset 3px 0 0 var(--pink); }
.diff-row.active .diff-name { color: var(--pink); }

/* --- Bot status (sidebar) ---------------------------------------------- */
.bot-status { font-size: 13.5px; padding: 4px 4px 8px; color: var(--muted); }
.bot-status.on { color: #9be89b; }
.bot-status.off { color: var(--gold); }

/* Danger button (delete room) */
.btn.danger { width: 100%; justify-content: center; background: #5a2330; color: #ffd9e2; }
.btn.danger:hover { background: #6e2a3b; }

/* --- Landing + new-site additions --------------------------------------- */
.hero { text-align: left; padding: clamp(36px, 8vh, 90px) 0 30px; max-width: 880px; }
.hero h2 { font-size: clamp(32px, 5vw, 54px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; text-wrap: balance; }
.hero .lead { font-size: 18px; color: var(--muted); margin: 0 0 26px; max-width: 56ch; text-wrap: pretty; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta .btn.big { margin-top: 0; }
.points { list-style: none; padding: 0; margin: 46px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.points li { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.points b { font-size: 16px; color: var(--pink); }
.points span { color: var(--muted); line-height: 1.45; }
.app-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.bar select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font: inherit; }
.runs-table table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.runs-table th { text-align: left; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 10px 14px; }
.runs-table td { padding: 12px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.runs-table .r { text-align: right; } .runs-table .strong { font-weight: 800; color: var(--pink); }
.runs-table tr.me td { background: rgba(255, 102, 170, .12); }
@media (prefers-reduced-motion: reduce) { .view.active { animation: none; } }

/* --- room: per-map player count, played tick, collapsible beatmap drawer --- */
.pcount { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pcount.has { color: var(--text); }
.pcount svg { opacity: .8; }
.done-tick { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(139, 224, 75, .18); color: var(--accent); font-size: 13.5px; font-weight: 900; }
#maps-toggle.on { background: var(--pink); color: #2a0a1a; }
.room-split.maps-collapsed { grid-template-columns: 1fr; }
.room-split.maps-collapsed .room-maps { display: none; }

/* --- profile page + replay links --- */
.auth .avatar, .auth .n { cursor: pointer; }
/* your plan, in the top bar by the language: ★ Plus, lit when you have it, grey when you do not; to the Plus page */
.plan-chip { display: inline-flex; align-items: center; flex: none; height: 30px; margin-right: 8px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: color .15s, background-color .15s; }
.plan-chip:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 80%, #ffffff); }
.plan-chip.on { background: linear-gradient(120deg, #ffc857, #ff9ac4); color: #2a1220; }
.plan-chip:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
@media (max-width: 560px) { .plan-chip { height: 28px; margin-right: 4px; padding: 0 9px; font-size: 12px; } }
@media (max-width: 480px) { .plan-n { display: none; } .topbar { gap: 6px; } } /* (a phone: the star alone, its name in its title; the search gets the room to say what it finds) */
@media (max-width: 400px) { .topbar .brand-m { display: none !important; } } /* (a small phone: the logo is in the menu, with Home) */
@media (max-width: 560px) { .topbar:has(.search:focus-within) :is(.plan-chip, .nt-btn) { display: none; } } /* (typing a name: the search takes the bar) */
.auth .n:hover { color: var(--pink); }
.replay-dl { margin-top: 4px; font-size: 12.5px; font-weight: 800; color: var(--accent); }
.replay-dl:hover { text-decoration: underline; }
.pf-avatar { width: 104px; height: 104px; border-radius: 22px; object-fit: cover; background: var(--surface-2); border: 3px solid var(--accent); flex: none; }
.pf-id { flex: 1; min-width: 0; }
.pf-id h1 { font-size: 30px; margin-bottom: 4px; }
.pf-stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.pf-stats b { color: var(--text); font-size: 17px; }
.pf-stats a:hover { color: var(--pink); }
.pf-edit { max-width: 560px; margin-bottom: 18px; }
.pf-edit input[type=color] { width: 64px; height: 38px; padding: 2px; }
.pf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 9px 12px; }
.pf-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-num { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.pf-num.strong { color: var(--text); font-weight: 800; }

.code-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 2px 4px 2px 10px; }
.code-mask { font-family: ui-monospace, monospace; letter-spacing: .1em; color: var(--pink); }
.copy-btn { border: 0; background: rgba(255, 102, 170, .18); color: var(--pink); border-radius: 999px; width: 26px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.copy-btn:hover { background: var(--pink); color: #2a0a1a; }

/* run detail + clickable rows */
.runs-table tr.clickable, .pf-row.clickable-row { cursor: pointer; }
.runs-table tr.clickable:hover td { background: rgba(255, 102, 170, .08); }
.pf-row.clickable-row:hover { outline: 1px solid var(--pink); }
.rn-head { display: flex; align-items: center; gap: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); margin-bottom: 14px; }
.rn-av { width: 84px; height: 84px; }
.rn-id h1 { font-size: 28px; margin: 2px 0 8px; } .rn-id h1 a:hover { color: var(--pink); }
.rn-stats { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); } .rn-stats b { color: var(--text); font-size: 17px; }
.rn-wrap { overflow-x: auto; }
.rn-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rn-table th { text-align: left; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 10px 12px; }
.rn-table td { padding: 10px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.rn-table .r { text-align: right; } .rn-table .strong { font-weight: 800; color: var(--pink); } .rn-i { color: var(--muted); width: 30px; }
.rn-map { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.rn-cover { width: 68px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--surface-2); flex: none; display: block; }
.rn-title { font-weight: 700; }

/* --- brand icon + landing page -------------------------------------------- */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-icon { width: 26px; height: 26px; border-radius: 7px; }
.landing { max-width: 1100px; margin: 0 auto; }
.l-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: 24px 0 56px; }
.l-icon { border-radius: 18px; box-shadow: 0 8px 30px rgba(255, 102, 170, .25); margin-bottom: 18px; }
.l-copy h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; text-wrap: balance; }
.l-copy .lead { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 52ch; margin: 0 0 20px; }
.l-copy .cta { display: flex; flex-wrap: wrap; gap: 10px; }
.l-note { margin: 12px 0 0; }
.l-soon { margin: 6px 0 0; }
.l-mock { display: flex; flex-direction: column; gap: 12px; position: relative; }
.m-run, .m-board { background: rgba(34, 26, 31, .92); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.m-run { padding: 14px 16px; width: 78%; align-self: flex-end; }
.m-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.m-pill { background: rgba(139, 224, 75, .14); color: #9be89b; border-radius: 99px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; }
.m-time { font-size: 44px; font-weight: 800; color: #fff; text-align: center; letter-spacing: -0.02em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.m-bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.m-bar i { display: block; height: 100%; width: 56%; background: var(--pink); border-radius: 99px; }
.m-row { display: flex; justify-content: space-between; margin-top: 9px; font-size: 14px; }
.m-row b span { color: var(--muted); font-weight: 600; }
.m-board { padding: 8px; display: flex; flex-direction: column; gap: 6px; width: 92%; }
.m-lz { display: grid; grid-template-columns: 30px 34px 1fr auto 26px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.m-lz.you { background: rgba(255, 102, 170, .2); outline: 1px solid rgba(255, 102, 170, .5); }
.m-lz em { font-style: normal; color: var(--gold); font-weight: 800; }
.m-av { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #5a3f4d, #3a2c33); }
.m-s { font-variant-numeric: tabular-nums; color: var(--muted); }
.m-g { color: var(--accent); font-weight: 800; text-align: center; }
.m-cap { font-size: 12.5px; color: var(--muted); text-align: center; opacity: .7; }
.l-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding: 8px 0 52px; }
.l-feats article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.l-feats h3 { margin: 0 0 6px; font-size: 16px; color: var(--pink); }
.l-feats p { margin: 0; line-height: 1.5; color: var(--muted); font-size: 14.5px; }
.l-steps { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 32px); }
.l-steps h2 { margin: 0 0 16px; font-size: 20px; }
.l-steps ol { list-style: none; counter-reset: s; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.l-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 4px; padding-left: 40px; position: relative; }
.l-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--pink); color: #2a0a1a; font-weight: 800; display: grid; place-items: center; }
.l-steps li span { color: var(--muted); line-height: 1.45; font-size: 14.5px; }
kbd { background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font: inherit; font-size: 13.5px; }
@media (max-width: 820px) { .l-hero { grid-template-columns: 1fr; } .m-run, .m-board { width: 100%; } }

/* --- run leaderboard ------------------------------------------------------ */
.lb { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.lb > .lb-row { display: grid; grid-template-columns: 44px 44px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.lb > .lb-row:hover { border-color: rgba(255, 102, 170, .5); transform: translateX(2px); }
.lb > .lb-row.me { outline: 1px solid rgba(255, 102, 170, .6); background: rgba(255, 102, 170, .1); }
.lb > .lb-row .lb-rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--muted); justify-self: center; }
.lb > .lb-row .lb-av { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.lb > .lb-row .lb-who { display: flex; flex-direction: column; min-width: 0; }
.lb > .lb-row .lb-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.lb > .lb-row .lb-who small { color: var(--muted); font-size: 13.5px; }
.lb > .lb-row .lb-val { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.lb > .lb-row .lb-val i { font-style: normal; font-size: .62em; opacity: .65; margin-left: 1px; }
.lb > .lb-row.rk1 { background: linear-gradient(90deg, rgba(255, 209, 92, .16), var(--panel) 60%); border-color: rgba(255, 209, 92, .55); }
.lb > .lb-row.rk1 .lb-rank { background: #ffd15c; color: #3a2a00; box-shadow: 0 0 14px rgba(255, 209, 92, .55); }
.lb > .lb-row.rk1 .lb-val { color: #ffd15c; }
.lb > .lb-row.rk2 .lb-rank { background: #cfd6e4; color: #1d2430; } .lb-row.rk2 { border-color: rgba(207, 214, 228, .35); }
.lb > .lb-row.rk3 .lb-rank { background: #e0955b; color: #2e1708; } .lb-row.rk3 { border-color: rgba(224, 149, 91, .35); }
@media (max-width: 560px) { .lb > .lb-row { grid-template-columns: 34px 38px 1fr auto; gap: 10px; } .lb > .lb-row .lb-val { font-size: 18px; } }

/* --- profile: ranks, run history, replays --------------------------------- */
.place-badge { display: inline-grid; place-items: center; min-width: 40px; padding: 2px 9px; border-radius: 99px; font-weight: 800; font-size: 13.5px; background: var(--surface-2); color: var(--muted); }
.place-badge.r1 { background: #ffd15c; color: #3a2a00; box-shadow: 0 0 12px rgba(255, 209, 92, .5); }
.place-badge.r2 { background: #cfd6e4; color: #1d2430; } .place-badge.r3 { background: #e0955b; color: #2e1708; }
.pf-row.rec-gold { border: 1px solid rgba(255, 209, 92, .5); background: linear-gradient(90deg, rgba(255, 209, 92, .12), var(--surface) 70%); }
.pf-sub { color: var(--muted); font-size: 13.5px; }
.pf-star { color: var(--gold); font-weight: 700; }
.pf-hid { opacity: .55; }
.pf-acts { display: inline-flex; gap: 6px; }
.btn.xs { padding: 3px 8px; font-size: 12.5px; border-radius: 8px; }
.pf-row .pf-name small { display: block; color: var(--muted); font-weight: 500; font-size: 13.5px; }

/* --- profile rank + share link, clickable friends ------------------------- */
.pf-rank { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.pf-rk { display: inline-flex; align-items: baseline; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-rk small { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.copy-link { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 13.5px; cursor: pointer; }
.copy-link:hover { color: var(--text); border-color: var(--pink); }
.friend-row.clickable { cursor: pointer; } .friend-row.clickable:hover { background: var(--surface-2); }

/* --- profile: osu! top 200 plays ------------------------------------------ */
.pf-scroll { max-height: 560px; overflow-y: auto; padding-right: 4px; list-style: none; margin: 8px 0 0; }
.pf-idx { width: 30px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; text-align: right; flex: none; }
.pf-name a:hover { color: var(--pink); text-decoration: underline; }
.pf-grade { min-width: 28px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; font-size: 13px; flex: none; } /* (its look: with the grades, by .rank-badge) */

/* --- osu!-profile-style best scores --------------------------------------- */
.tp-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 12px 0 10px; }
.tp-n { background: var(--surface-2); border-radius: 99px; padding: 1px 10px; font-size: 13.5px; color: var(--muted); }
.tp-list { display: flex; flex-direction: column; gap: 7px; }
.tp-row { position: relative; display: grid; grid-template-columns: 34px 46px minmax(0, 1fr) auto 76px 92px 96px; gap: 14px; align-items: center; min-height: 54px; padding: 0 0 0 10px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .12s ease, background .12s ease; }
.tp-row:hover { border-color: rgba(255, 102, 170, .55); background: var(--surface-2); }
.tp-grade { width: 40px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; } /* (its look: with the grades, by .rank-badge) */
.tp-map { display: flex; flex-direction: column; min-width: 0; padding: 7px 0; }
.tp-map b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.tp-map b i { font-style: normal; font-weight: 500; font-size: 13.5px; color: var(--muted); }
.tp-map small { font-size: 13.5px; color: var(--muted); } .tp-map small span { font-weight: 600; }
.tp-mods { display: flex; gap: 4px; justify-content: flex-end; }
.mod-hex { min-width: 30px; height: 24px; padding: 0 5px; display: grid; place-items: center; font-size: 11.5px; font-weight: 900; letter-spacing: .02em; color: #1a1014;
  clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%); background: #a08cff; }
.mod-hex.up { background: #ff7480; } .mod-hex.down { background: #7fd98a; }
.tp-acc, .tp-pp { display: flex; flex-direction: column; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; }
.tp-acc { color: var(--gold); font-weight: 800; font-size: 15px; }
.tp-pp b { font-size: 15px; } .tp-acc small, .tp-pp small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tp-w { align-self: stretch; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--pink); background: rgba(0, 0, 0, .22);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); padding-left: 14px; font-variant-numeric: tabular-nums; }
.tp-w i { font-style: normal; font-size: .6em; margin-left: 1px; opacity: .75; }
.tp-more { display: block; margin: 12px auto 0; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 7px 22px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tp-more:hover { color: var(--text); border-color: var(--pink); }
@media (max-width: 760px) {
  .tp-row { grid-template-columns: 30px 40px minmax(0, 1fr) 84px; row-gap: 0; padding-bottom: 0; }
  .tp-mods, .tp-acc { display: none; } .tp-pp { display: none; }
}

/* --- notices + admin ------------------------------------------------------ */
.site-notice { background: rgba(255, 209, 92, .14); color: var(--gold); border-bottom: 1px solid rgba(255, 209, 92, .35); padding: 9px clamp(16px, 3vw, 40px); font-weight: 600; font-size: 14px; text-align: center; }
.ad-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 22px; }
.ad-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ad-card b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; } .ad-card span { color: var(--muted); font-size: 13.5px; }
.ad-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 18px; }
.ad-sec h3 { margin: 0 0 10px; font-size: 16px; }
.ad-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.ad-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 6px 8px; } .ad-table td { padding: 7px 8px; border-top: 1px solid var(--line); }
.ad-table .r { text-align: right; } .ad-scroll { max-height: 340px; overflow: auto; }
.ad-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 80px; } .ad-bar i { display: block; height: 100%; background: var(--pink); }
/* the admin panel's osu! API tab: its state, and its column charts (a column a minute or an hour: people's calls at the bottom, background
   work on them, a red cap where osu! said "too many" or failed, the limit dashed) */
.oa-state { font-weight: 800; font-size: 14px; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.oa-state.ok { background: rgba(166, 233, 107, .14); color: var(--accent); } .oa-state.bad { background: #5a2330; color: #ffd9e2; }
.oa-alarm { border-color: #ff5d6c; } .oa-alarm b, .oa-red { color: #ff5d6c; }
.oa-h { margin: 20px 0 8px; font-size: 14.5px; }
.oa-chart { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; }
.oa-y { display: flex; flex-direction: column; justify-content: space-between; height: 130px; font-size: 11.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.oa-plot { position: relative; height: 130px; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--gap); align-items: end; border-bottom: 1px solid var(--line); }
.oa-col { position: relative; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.oa-bar { width: 100%; display: flex; flex-direction: column; gap: 1px; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.oa-bar b { display: block; min-height: 1px; } .oa-bar b.oa-pp { background: var(--pink-dark); } .oa-bar b.oa-bg { background: #b9831e; }
.oa-col em { position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: #ff5d6c; }
.oa-col.oa-on .oa-bar { filter: brightness(1.3); } .oa-col.oa-on::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .05); pointer-events: none; }
.oa-limit { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); opacity: .75; pointer-events: none; z-index: 1; }
.oa-limit span { position: absolute; right: 0; bottom: 2px; font-size: 11px; color: var(--muted); }
.oa-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.oa-tip { position: absolute; z-index: 2; transform: translate(-50%, -100%); pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; color: var(--text); white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.oa-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin: 8px 0 4px; }
.oa-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; } .oa-legend .oa-dash { width: 14px; height: 0; border-top: 1px dashed var(--muted); border-radius: 0; vertical-align: 3px; }
.oa-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 18px; }
.oa-what { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .oa-plot { --gap: 1px !important; } .oa-tip { white-space: normal; width: 220px; } }
.ad-form { display: grid; gap: 10px; max-width: 640px; } .ad-form label { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.ad-form input, .ad-form select, .ad-form textarea { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; }
.ad-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* --- setup guide (Material 3 motion + shape: emphasized easing, 28dp cards, tonal surfaces) ------------------- */
:root { --ease-emph: cubic-bezier(0.2, 0, 0, 1); --ease-dec: cubic-bezier(0.05, 0.7, 0.1, 1); --sh-xl: 28px; --sc: #221920; --sc-high: #2b2028; }
.l-setup h2 { font-size: 22px; margin: 0 0 16px; }
.l-setup { margin-top: 8px; }
.sg { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; max-width: 880px; }
.sg-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; background: var(--sc); border: 1px solid var(--line); border-radius: var(--sh-xl); padding: 20px 24px 20px 20px;
  transition: background-color 250ms var(--ease-emph), border-color 250ms var(--ease-emph); }
.sg-step:hover { background: var(--sc-high); border-color: rgba(255, 102, 170, .4); }
html.js .sg-step { opacity: 0; transform: translateY(18px); }
html.js .sg-step.in { opacity: 1; transform: none;
  transition: opacity 400ms var(--ease-dec) var(--d, 0ms), transform 400ms var(--ease-dec) var(--d, 0ms), background-color 250ms var(--ease-emph), border-color 250ms var(--ease-emph); }
.sg-num { width: 56px; height: 56px; border-radius: 18px; background: var(--pink); color: #2a0a1a; font-weight: 800; font-size: 24px; display: grid; place-items: center; }
html.js .sg-step.in .sg-num { animation: sgPop 500ms var(--ease-emph) calc(var(--d, 0ms) + 120ms) both; }
@keyframes sgPop { from { transform: scale(.45) rotate(-14deg); } to { transform: none; } }
.sg-step h3 { margin: 4px 0 6px; font-size: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sg-step p { margin: 0 0 8px; line-height: 1.55; color: var(--muted); max-width: 64ch; }
.sg-step code { background: var(--surface-2); border-radius: 6px; padding: 1px 6px; font-size: 14px; color: var(--text); }
.sg-chip { background: rgba(255, 209, 92, .16); color: var(--gold); border-radius: 99px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; }
.sg-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
.sg-note { font-size: 14px; }
.btn.tonal { background: rgba(255, 102, 170, .18); color: var(--pink); } .btn.tonal:hover { background: rgba(255, 102, 170, .28); }
.sg-help { max-width: 880px; background: var(--sc); border: 1px solid var(--line); border-radius: 20px; padding: 14px 20px; }
.sg-help summary { cursor: pointer; font-weight: 700; } .sg-help ul { margin: 12px 0 2px; padding-left: 18px; color: var(--muted); line-height: 1.6; } .sg-help li b { color: var(--text); }
@media (max-width: 560px) { .sg-step { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px; } .sg-num { width: 44px; height: 44px; border-radius: 14px; font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { html.js .sg-step { opacity: 1; transform: none; } html.js .sg-step.in .sg-num { animation: none; } .sg-step { transition: none; } }

/* ====================================================================================================================
   v2 look — warmer and more hand-made: a bit of brown in the blacks, chunky friendly type, pill buttons, doodle icons,
   a sticker and a hand-drawn underline on the home page, springy hovers. Later rules win, so this re-skins every page.
   ==================================================================================================================== */
:root {
  --bg: #16110f; --panel: #1f1917; --surface: #282120; --surface-2: #342b29; --line: #3d3330;
  --text: #f8efe8; --muted: #bcaea6; --pink: #ff6fa9; --pink-dark: #e8548f; --accent: #a6e96b; --gold: #ffc857; --radius: 18px;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1); --ease-dec: cubic-bezier(0.05, 0.7, 0.1, 1);
}
body {
  font-family: var(--font-body); font-size: 16px;
  background: radial-gradient(1100px 560px at 88% -8%, rgba(255, 111, 169, .11), transparent 60%), radial-gradient(900px 520px at -8% 108%, rgba(255, 200, 87, .07), transparent 55%), var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, .brand, .wordmark, .lb-val, .m-time, .pf-rk, .ad-card b, .rc-title { font-family: var(--font-head); letter-spacing: -0.015em; }
h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; }
.sub { text-transform: none; letter-spacing: -0.01em; font-family: var(--font-head); font-size: 19px; color: var(--text); margin: 30px 0 12px; }
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.2em; }

/* --- top bar --- */
.topbar { height: 68px; gap: 18px; background: rgba(22, 17, 15, .8); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.brand-icon { width: 30px; height: 30px; border-radius: 9px; transition: transform .35s var(--ease); }
.brand:hover .brand-icon { transform: rotate(-10deg) scale(1.08); }
.wordmark b { color: var(--pink); }
.nav { gap: 4px; }
.nav-item { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 16px; transition: background-color .2s var(--ease), color .2s; }
.nav-item .ic { width: 19px; height: 19px; transition: transform .3s var(--ease); }
.nav-item:hover .ic { animation: wiggle .5s var(--ease); }
.nav-item.active { background: rgba(255, 111, 169, .16); color: var(--pink); }
.nav-item[data-badge]:not([data-badge=""])::after { content: attr(data-badge); background: var(--pink); color: #2a0a1a; border-radius: 99px; font-size: 12.5px; font-weight: 800; padding: 0 6px; min-width: 18px; text-align: center; animation: pop .45s var(--ease); }
.auth .avatar { border-radius: 11px; width: 34px; height: 34px; }

/* --- search with suggestions --- */
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; width: min(250px, calc(26vw / var(--zall, 1))); padding: 0 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: width .28s var(--ease), border-color .2s, background-color .2s; }
.search:focus-within { width: min(380px, calc(42vw / var(--zall, 1))); border-color: var(--pink); background: var(--surface-2); color: var(--text); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; padding: 0; box-shadow: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search-key { font: inherit; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.search:focus-within .search-key { display: none; }
.search-pop { position: absolute; top: calc(100% + 10px); left: 0; right: 0; min-width: 270px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); animation: popIn .2s var(--ease-dec); z-index: 40; }
.sp-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; color: var(--text); padding: 8px 10px; border-radius: 14px; cursor: pointer; font: inherit; text-align: left; opacity: 0; animation: spIn .25s var(--ease-dec) calc(var(--i, 0) * 35ms) forwards; }
.sp-item.sel, .sp-item:hover { background: var(--surface-2); }
.sp-item > img { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.sp-item mark { background: rgba(255, 111, 169, .28); color: inherit; border-radius: 3px; }
.sp-empty { padding: 14px 12px; color: var(--muted); } .sp-empty small { display: block; margin-top: 3px; font-size: 13.5px; opacity: .8; }

/* --- buttons and inputs --- */
.btn { border-radius: 999px; padding: 10px 18px; font-family: var(--font-body); transition: transform .16s var(--ease), filter .16s, background-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); } .btn:active { transform: translateY(1px) scale(.97); }
.btn.primary { box-shadow: 0 6px 20px rgba(255, 111, 169, .25); } .btn.primary:hover { box-shadow: 0 9px 26px rgba(255, 111, 169, .38); }
.btn.big { padding: 13px 24px; font-size: 16px; } .btn .ic { width: 1.15em; height: 1.15em; }
input[type=text], input[type=search], input[type=number], textarea, select { border-radius: 14px; }
.toast { border-radius: 999px; }
.modal { border-radius: 28px; } .modal-scrim { backdrop-filter: blur(4px); }

/* --- views: they rise in, lists stagger --- */
.view.active { animation: viewIn .38s var(--ease-dec); }
.room-grid > *, .friends-list > *, .lb > *, .pf-list > li { animation: rise .45s var(--ease-dec) both; }
.room-grid > :nth-child(2), .friends-list > :nth-child(2), .lb > :nth-child(2) { animation-delay: 45ms; }
.room-grid > :nth-child(3), .friends-list > :nth-child(3), .lb > :nth-child(3) { animation-delay: 90ms; }
.room-grid > :nth-child(4), .friends-list > :nth-child(4), .lb > :nth-child(4) { animation-delay: 135ms; }
.room-grid > :nth-child(5), .friends-list > :nth-child(5), .lb > :nth-child(5) { animation-delay: 180ms; }
.room-grid > :nth-child(n+6), .friends-list > :nth-child(n+6), .lb > :nth-child(n+6) { animation-delay: 220ms; }
.view-head.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.room-card { border-radius: 22px; transition: transform .22s var(--ease), border-color .2s, background-color .2s; }
.room-card:hover { transform: translateY(-4px) rotate(-.25deg); border-color: rgba(255, 111, 169, .55); }

/* --- rooms: the join-by-code card --- */
.join-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 16px 20px; margin: 0 0 8px; max-width: none; }
.join-card > .ic { width: 32px; height: 32px; color: var(--gold); transform: rotate(-12deg); }
.join-copy { display: flex; flex-direction: column; flex: 1; min-width: 160px; } .join-copy b { font-family: var(--font-head); font-size: 17px; }
.join-card .row { display: flex; gap: 8px; } .join-card input { width: 160px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* --- friends --- */
.add-friend { margin: 0 0 8px; }
.friend-row { border-radius: 20px; background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; transition: border-color .2s, transform .2s var(--ease), background-color .2s; }
.friend-row:hover { border-color: rgba(255, 111, 169, .45); transform: translateX(3px); }
.friend-row img { border-radius: 12px; width: 40px; height: 40px; }
.fr-acts { display: inline-flex; gap: 8px; margin-left: auto; }
.friends-list.invites .friend-row { border-color: rgba(255, 200, 87, .5); background: linear-gradient(90deg, rgba(255, 200, 87, .12), var(--panel) 65%); }

/* --- profile --- */
.pf-avatar { border-radius: 28px; }
.pf-row { border-radius: 16px; } .pf-list { gap: 8px; }
.place-badge, .sg-chip, .tp-more { font-family: var(--font-body); }

/* --- home --- */
.landing { max-width: 1080px; }
.l-hero { padding: 18px 0 40px; }
.l-sticker { display: inline-block; margin: 0 0 16px; padding: 5px 14px; background: var(--gold); color: #3a2a00; font-weight: 800; font-size: 14px; border-radius: 99px; transform: rotate(-3deg); box-shadow: 0 6px 16px rgba(255, 200, 87, .22); }
.squiggle { color: var(--pink); padding-bottom: .1em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M1 7c6-6 10 6 16 0s10 6 16 0 10 6 16 0 10 6 16 0 10 6 16 0 10 6 16 0' fill='none' stroke='%23ff6fa9' stroke-width='3.2' stroke-linecap='round'/></svg>") left bottom / 100% .32em no-repeat; }
.l-copy h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; }
.l-copy > * { animation: rise .6s var(--ease-dec) both; }
.l-copy > :nth-child(2) { animation-delay: 70ms; } .l-copy > :nth-child(3) { animation-delay: 140ms; } .l-copy > :nth-child(4) { animation-delay: 210ms; } .l-copy > :nth-child(5) { animation-delay: 280ms; }
.m-run { animation: floaty 6.5s ease-in-out infinite; } .m-board { animation: floaty 7.5s ease-in-out -2.5s infinite; }
.m-run, .m-board { border-radius: 22px; }
.l-bits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 52px; }
.l-bits article { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); transition: transform .22s var(--ease), border-color .2s; }
.l-bits article:hover { transform: translateY(-4px); border-color: rgba(255, 111, 169, .45); }
.l-bits .ic { width: 28px; height: 28px; padding: 8px; box-sizing: content-box; border-radius: 14px; color: var(--pink); background: rgba(255, 111, 169, .14); }
.l-bits h3 { margin: 2px 0 4px; font-size: 18px; } .l-bits p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.l-setup h2 { font-family: var(--font-head); font-size: 26px; }
.sg-step { border-radius: 26px; } .sg-num { border-radius: 20px; font-family: var(--font-head); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes spIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes wiggle { 0% { transform: rotate(0); } 30% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg) scale(1.1); } 100% { transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 560px) { .join-card input { width: 120px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- friends, tidier profile -------------------------------------------------------------------------------------- */
#view-runs .lb { max-width: none; }
#view-friends .add-friend { max-width: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
#view-friends .add-friend .row input { flex: 1; min-width: 0; }
#friend-invites, #friends-list, #friend-sent { max-width: 760px; }

.pf-avatar { width: 112px; height: 112px; flex: none; object-fit: cover; }
.pf-id h1 { font-size: clamp(28px, 4vw, 38px); }
.pf-row { flex-wrap: wrap; row-gap: 4px; }
.pf-row .pf-name { flex: 1 1 240px; }

/* decoration and controls are not selectable (the preview mock, the top bar, buttons, badges); text you may want to copy still is */
.l-mock, .l-mock *, .topbar, .btn, .nav-item, .l-sticker, .sg-num, .sg-chip, .tp-grade, .mod-hex, .lb-rank, .rank-badge, .search-key, .brand, .l-bits .ic, .ic { -webkit-user-select: none; user-select: none; }
.l-mock, .ls-stage { pointer-events: none; }
.ls-stage, .ls-stage * { -webkit-user-select: none; user-select: none; }
.search input, .join-card input, input, textarea { -webkit-user-select: text; user-select: text; }


/* ==== room page, same look as the rest ==== */
.back { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; margin-bottom: 14px; color: var(--muted); font-family: var(--font-body); transition: color .2s, border-color .2s, transform .16s var(--ease); }
.back:hover { color: var(--text); border-color: var(--pink); transform: translateX(-2px); } .back.sm { padding: 5px 13px; margin-bottom: 10px; }
.room-top { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 20px 24px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.room-top h1 { font-size: clamp(26px, 3.2vw, 36px); }
.room-top-actions { flex-wrap: wrap; }
.code-pill { border-radius: 99px; padding: 3px 12px; }
.badge { border-radius: 99px; }
#sync-status { margin: 0 4px 6px; }
.room-split { gap: 22px; }

/* leaderboard of the room + the map's scores */
.lb-bar { margin: 6px 0 12px; }
.lb-tabs { gap: 6px; flex-wrap: wrap; } .lb-tab { border-radius: 999px; padding: 8px 15px; font-family: var(--font-body); transition: background-color .2s, color .2s, transform .16s var(--ease); } .lb-tab:hover { transform: translateY(-1px); }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.leaderboard .lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 0; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); transition: transform .18s var(--ease), border-color .18s; }
.leaderboard .lb-clickable { cursor: pointer; } .leaderboard .lb-clickable:hover { transform: translateX(3px); border-color: rgba(255, 111, 169, .5); }
.leaderboard .lb-rank { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 16px; font-family: var(--font-head); }
.leaderboard .lb-top1 { background: linear-gradient(90deg, rgba(255, 200, 87, .14), var(--panel) 60%); border-color: rgba(255, 200, 87, .5); }
.leaderboard .lb-top1 .lb-rank { background: #ffc857; color: #3a2a00; box-shadow: 0 0 14px rgba(255, 200, 87, .5); }
.leaderboard .lb-top2 .lb-rank { background: #cfd6e4; color: #1d2430; } .leaderboard .lb-top3 .lb-rank { background: #e0955b; color: #2e1708; }
.leaderboard .lb-avatar { width: 44px; height: 44px; border-radius: 14px; }
.leaderboard .lb-name { font-size: 16px; }
.leaderboard .lb-metric { font-family: var(--font-head); font-size: 21px; letter-spacing: -0.01em; }
.leaderboard .me-row { outline: 1px solid rgba(255, 111, 169, .55); background: rgba(255, 111, 169, .09); }
.score-row { gap: 12px; }
.score-row .rank-badge { border-radius: 10px; min-width: 34px; padding: 4px 8px; }
.score-main { flex: 1; min-width: 0; }
.score-right { gap: 1px; } .score-right .pp { font-family: var(--font-head); font-size: 20px; } .score-right .score-total { font-size: 14px; }
.replay-dl { display: inline-block; background: rgba(166, 233, 107, .14); border-radius: 99px; padding: 2px 10px; }
.replay-dl:hover { text-decoration: none; background: rgba(166, 233, 107, .26); }
.scores-head { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 12px 16px; }

/* beatmaps */
.maps-head .sub { margin-top: 4px; }
.owner-add { border-radius: 22px; background: var(--panel); border-style: dashed; padding: 14px; }
.map-list { gap: 10px; }
.map-card, .set-card { border-radius: 24px; }
.diff-row.clickable:hover { background: rgba(255, 111, 169, .08); }
.diff-row.active { background: rgba(255, 111, 169, .16); box-shadow: inset 4px 0 0 var(--pink); }

/* readability: base text 16px; small text is never below ~12px */
body { font-size: 16px; }
.small { font-size: 13.5px; }

/* room-code box: sized to the code (OSU-XXXXXX), text centred so it fills the box edge to edge */
.join-card input { width: 148px; padding: 10px 12px; text-align: center; letter-spacing: .06em; font-size: 15px; }
.join-card input::placeholder { letter-spacing: .06em; }
@media (max-width: 560px) { .join-card input { width: 140px; } }


/* ==== room chat, per-map rules ==== */
.chat-panel { margin-top: 22px; }
.chat-log { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 12px; height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.chat-log:empty::before { content: 'No messages yet. Say hi!'; color: var(--muted); margin: auto; }
.cl { animation: rise .3s var(--ease-dec) both; }
.cl.chat { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.cl.chat > img { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; background: var(--surface-2); }
.cl.chat b { font-size: 14.5px; } .cl time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.cl.chat p { margin: 2px 0 0; line-height: 1.45; overflow-wrap: anywhere; user-select: text; }
.cl.ev { display: flex; align-items: center; gap: 10px; background: rgba(255, 200, 87, .1); border: 1px solid rgba(255, 200, 87, .25); border-radius: 16px; padding: 7px 12px; font-size: 14px; }
.cl.ev time { margin-left: auto; } .cl.ev i { font-style: normal; font-weight: 700; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; } .chat-form input { flex: 1; min-width: 0; border-radius: 999px; padding: 11px 18px; }
.forced-badge { background: rgba(255, 111, 169, .18); color: var(--pink); border-radius: 99px; padding: 2px 9px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.att-badge { background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; } .att-badge.out { background: rgba(255, 94, 107, .2); color: #ff8a94; }
.badge.att-room { color: var(--gold); }
.mods-btn { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 2px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mods-btn:hover { color: var(--pink); border-color: var(--pink); }
#forced-modal .modchip { min-width: 60px; }


/* ==== room settings window ==== */
.rs-modal { max-width: 520px; width: calc(94vw / var(--zall, 1)); max-height: calc(92vh / var(--zall, 1)); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.rs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rs-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .rs-title b { font-family: var(--font-head); font-size: 16px; }
.rs-note { margin: 0; line-height: 1.5; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { width: 84px; text-align: center; font-size: 20px; font-family: var(--font-head); border-radius: 14px; padding: 8px; }
.step-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 22px; cursor: pointer; transition: transform .16s var(--ease), border-color .2s; }
.step-btn:hover { border-color: var(--pink); transform: scale(1.06); } .step-btn:active { transform: scale(.94); }
.rs-switch { display: flex; align-items: center; gap: 14px; cursor: pointer; } .rs-switch input { position: absolute; opacity: 0; }
.rs-switch .sw { width: 46px; height: 28px; border-radius: 99px; background: var(--surface-2); position: relative; flex: none; transition: background-color .2s var(--ease); }
.rs-switch .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .22s var(--ease); }
.rs-switch input:checked + .sw { background: var(--pink); } .rs-switch input:checked + .sw::after { transform: translateX(18px); background: #2a0a1a; }
.rs-switch input:focus-visible + .sw { outline: 2px solid var(--pink); outline-offset: 2px; }
.rs-switch span:last-child { display: flex; flex-direction: column; } .rs-switch small { font-size: 13px; }
.timer-box { display: flex; flex-direction: column; gap: 10px; }
.dur-row { display: flex; gap: 8px; } .dur-row input { flex: 1; min-width: 0; } .dur-row select { width: 130px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; } .quick button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .2s, border-color .2s; }
.quick button:hover { color: var(--pink); border-color: var(--pink); }
#timer-date { color-scheme: dark; width: 100%; }
.timer-preview { background: rgba(255, 200, 87, .12); border: 1px solid rgba(255, 200, 87, .3); color: var(--gold); border-radius: 14px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.rs-modal select, .rs-modal input[type=number], .rs-modal input[type=datetime-local] { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; color-scheme: dark; }
.rs-modal select:focus, .rs-modal input:focus { outline: 2px solid var(--pink); outline-offset: 1px; border-color: transparent; }

.rc-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }


/* ==== settings page, language button, big text / calm mode ==== */
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; transition: color .2s, border-color .2s, transform .16s var(--ease); }
.icon-btn:hover { color: var(--text); border-color: var(--pink); transform: translateY(-1px); } .icon-btn .ic { width: 20px; height: 20px; }
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html:lang(pl) .chat-log:empty::before { content: 'Brak wiadomości. Przywitaj się!'; }
@media (max-width: 760px) { .lang-btn { display: none; } }
.rs-switch { position: relative; } .rs-switch input { left: 0; top: 0; width: 46px; height: 28px; margin: 0; }


/* country flags */
.flag { height: .8em; width: auto; border-radius: 3px; vertical-align: -.06em; margin-right: .45em; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); display: inline-block; }
.flag.lg { height: .62em; margin-right: .35em; vertical-align: .02em; }
.fn, .lb-name, .lb-who b, .sp-item span { display: inline-flex; align-items: center; } .fn { display: flex; } .lb-name { flex: 1; }
.pf-rk .flag { align-self: center; margin-right: .3em; }


/* folded beatmap sets, top-5 lists */
.set-card:not(.open) .diff-rows { display: none; }
.set-card .set-top { cursor: pointer; transition: background-color .15s; } .set-card .set-top:hover { background: rgba(255, 255, 255, .03); }
.set-chev { color: var(--muted); font-size: 14px; transition: transform .25s var(--ease); margin-left: 4px; } .set-card.open .set-chev { transform: rotate(90deg); color: var(--pink); }
.maps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-more.sm { margin: 0; padding: 5px 14px; font-size: 13px; }

/* flags: normal size everywhere, smaller only in the search suggestions */
.flag { height: .8em; margin-right: .45em; border-radius: 3px; vertical-align: -.06em; }
.flag.lg { height: .62em; margin-right: .35em; vertical-align: .02em; }
.sp-item > img { width: 32px; height: 32px; } /* the avatar, not the flag */
.sp-item .flag { width: auto; height: .6em; margin-right: .4em; }


/* live status under the profile name */
.pf-pres { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.06); width: fit-content; max-width: 100%; font-size: 14px; }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; background: #5dd68a; box-shadow: 0 0 0 0 rgba(93,214,138,.6); }
.pf-pres.play .pf-dot { background: var(--pink, #ff66aa); animation: pfPulse 1.8s infinite; }
.pf-pres.dnd .pf-dot { background: #ff5d6c; } .pf-pres.brb .pf-dot { background: #ffc857; }
.pf-pw { font-weight: 700; } .pf-pm { opacity: .85; overflow: hidden; text-overflow: ellipsis; } .pf-pm small { opacity: .7; }
.pf-pl { display: inline-flex; gap: 6px; flex-wrap: wrap; } .pf-pl b { background: rgba(255,255,255,.08); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; font-size: 13px; }
@keyframes pfPulse { 70% { box-shadow: 0 0 0 9px rgba(255,102,170,0); } 100% { box-shadow: 0 0 0 0 rgba(255,102,170,0); } }
@media (prefers-reduced-motion: reduce) { .pf-pres.play .pf-dot { animation: none; } }

/* website chat: floating box, bottom right */
.wc { position: fixed; right: 18px; bottom: 18px; z-index: 80; font-size: 14px; }
.wc[hidden] { display: none; }
.wc-pill { display: flex; align-items: center; gap: 8px; background: var(--pink); color: #1a0d14; border: 0; border-radius: 999px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(0,0,0,.45); transition: transform .2s var(--ease), opacity .2s; }
.wc-pill:hover { transform: translateY(-2px); }
.wc-total { background: #1a0d14; color: var(--pink); border-radius: 999px; font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 8px; }
.wc.open .wc-pill { opacity: 0; pointer-events: none; transform: scale(.9); position: absolute; right: 0; bottom: 0; }
.wc-panel { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw / var(--zall, 1) - 36px)); height: min(480px, calc(100vh / var(--zall, 1) - 100px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.96); transform-origin: bottom right; transition: opacity .2s var(--ease), transform .28s var(--ease), visibility 0s linear .28s, width .25s var(--ease); }
.wc.open .wc-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.wc.wide .wc-panel { width: min(720px, calc(100vw / var(--zall, 1) - 36px)); }
.wc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.wc-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; } .wc-tabs::-webkit-scrollbar { display: none; }
.wc-tab { display: flex; align-items: center; gap: 5px; flex: none; max-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 5px 4px 11px; cursor: pointer; transition: border-color .15s, background .15s; }
.wc-tab.on { border-color: var(--pink); background: rgba(255, 111, 169, .12); } .wc-tab > span { color: var(--pink); font-weight: 800; } .wc-tab b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-tab i { background: var(--pink); color: #1a0d14; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 800; padding: 0 6px; }
.wc-tab button { background: none; border: 0; color: var(--muted); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; } .wc-tab button:hover { background: rgba(255,255,255,.1); color: var(--text); }
.wc-add, .wc-wide, .wc-min { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 15px; } .wc-add:hover, .wc-wide:hover, .wc-min:hover { color: var(--pink); border-color: var(--pink); }
.wc-menu { position: absolute; right: 10px; top: 52px; width: 250px; max-height: 280px; overflow-y: auto; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 44px rgba(0,0,0,.55); z-index: 5; }
.wc-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 8px 12px; color: var(--text); font: inherit; cursor: pointer; } .wc-menu button:hover { background: var(--surface); }
.wc-mh { color: var(--muted); font-size: 12px; padding: 6px 12px 2px; }
.wc-st { width: 9px; height: 9px; border-radius: 50%; background: #5dd68a; flex: none; } .wc-st.play { background: var(--pink); } .wc-st.dnd { background: #ff5d6c; } .wc-st.brb { background: #ffc857; } .wc-st.off { background: #5b5252; }
.wc-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.wc-l b { font-weight: 700; } .wc-l time { color: var(--muted); font-size: 11.5px; margin-left: 8px; } .wc-l p { margin: 2px 0 0; overflow-wrap: anywhere; } .wc-l.mine b { color: var(--pink); } .wc-l.ev { color: var(--gold); }
.wc-empty { margin: auto; color: var(--muted); text-align: center; }
.wc-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); } .wc-form[hidden] { display: none; } .wc-form input { flex: 1; min-width: 0; border-radius: 999px; padding: 10px 16px; }
@media (prefers-reduced-motion: reduce) { .wc-panel, .wc-pill { transition: opacity .01s; transform: none !important; } }

/* speedrun page: category chips + podium + rows with the gap to #1 */
#runs-cat { display: none; }
.rc-groups, #runs-chips { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.rc-group { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rc-label { color: var(--muted); font-size: 13.5px; min-width: 170px; }
.rc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.rc-chip:hover { transform: translateY(-2px); border-color: rgba(255, 111, 169, .55); }
.rc-chip.on { background: var(--pink); border-color: var(--pink); color: #1a0d14; }
@media (max-width: 700px) { .rc-label { min-width: 0; width: 100%; } }
.rb-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 18px 0 14px; } .rb-head b { font-family: var(--font-head); font-size: 24px; }
.podium { display: grid; gap: 12px; max-width: 920px; margin: 0 auto 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.podium.n1 { grid-template-columns: minmax(0, 360px); justify-content: center; } .podium.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; }
.pod:hover { transform: translateY(-4px); }
.pod1 { padding-top: 34px; padding-bottom: 24px; border-color: rgba(255, 200, 87, .6); background: linear-gradient(170deg, rgba(255, 200, 87, .12), var(--panel) 65%); }
.pod2 { border-color: rgba(205, 215, 230, .45); background: linear-gradient(170deg, rgba(205, 215, 230, .08), var(--panel) 65%); }
.pod3 { border-color: rgba(214, 140, 90, .5); background: linear-gradient(170deg, rgba(214, 140, 90, .1), var(--panel) 65%); }
.pod.me { box-shadow: 0 0 0 2px var(--pink); }
.pod-medal { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #1a0d14; background: #c8d0dc; }
.pod1 .pod-medal { background: var(--gold); width: 36px; height: 36px; top: -18px; font-size: 18px; } .pod3 .pod-medal { background: #d9915b; }
.pod-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; } .pod1 .pod-av { width: 84px; height: 84px; }
.pod-who { display: flex; flex-direction: column; min-width: 0; max-width: 100%; } .pod-who b { font-family: var(--font-head); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pod-who small { color: var(--muted); }
.pod-val { font-family: var(--font-head); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; } .pod1 .pod-val { font-size: 34px; color: var(--gold); } .pod-val i { font-size: .55em; font-style: normal; opacity: .7; }
.pod-gap { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .podium { grid-template-columns: 1fr; } }
.rb-rest { max-width: 920px; margin: 0 auto; }
.rb-gap { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; margin-right: 6px; }

/* friends: the avatar rule must not stretch the little country flag */
.friend-row > img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.friend-row .fn .flag, .friend-row .flag { width: auto; height: .8em; border-radius: 3px; object-fit: contain; margin-right: .45em; vertical-align: -.06em; background: none; }

/* larger-text slider: drawn by us, clean track + fill + round thumb (global input styles reset first) */
.stg-range input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; outline: none; cursor: pointer; accent-color: unset; }
.stg-range input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) calc(11px + (100% - 22px) * var(--p, 0)), #3d3330 calc(11px + (100% - 22px) * var(--p, 0))); }
.stg-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: #fff3f8; border: 0; box-shadow: 0 0 0 4px var(--pink), 0 3px 10px rgba(0,0,0,.5); transition: transform .15s var(--ease); }
.stg-range input[type=range]:hover::-webkit-slider-thumb, .stg-range input[type=range]:focus-visible::-webkit-slider-thumb { transform: scale(1.1); }
.stg-range input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: #3d3330; }
.stg-range input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--pink); }
.stg-range input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff3f8; border: 0; box-shadow: 0 0 0 4px var(--pink); }
.rs-range output { min-width: 3.2em; }
/* podium: room above the cards for the medals */
.rb-head { margin-bottom: 34px; }
.podium { padding-top: 6px; }

/* premium: badge, plan card, admin gift box, room history */
.pf-prem { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 3px 12px; border-radius: 999px; background: linear-gradient(120deg, #ffc857, #ff9ac4); color: #2a1220; font-family: var(--font-body); font-size: 13px; font-weight: 800; letter-spacing: 0; } .pf-prem.sm { padding: 0 8px; font-size: 12px; margin-left: 6px; }
.pf-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0; border: 1px dashed rgba(255, 200, 87, .5) !important; }
.pf-admin-h { display: flex; flex-direction: column; } .pf-admin-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-lock { background: rgba(255, 200, 87, .08); border: 1px solid rgba(255, 200, 87, .3); border-radius: 16px; padding: 10px 14px; margin: 0 0 10px; font-size: 14px; }
.badge.closed { background: rgba(255,255,255,.08); color: var(--muted); border: 1px solid var(--line); }
#hist-head { margin-top: 30px; } #myhistory .room-card { opacity: .8; }
#close-room { margin-right: 8px; }

/* phones: room actions wrap instead of pushing the page sideways */
.room-top-actions { flex-wrap: wrap; }
@media (max-width: 560px) { .room-top { flex-wrap: wrap; } .room-top-actions { width: 100%; } .room-top-actions .btn { flex: 1 1 auto; } }

.tp-n { font-size: 13px; font-weight: 800; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* room cards: title centred over the card */
.room-card .rc-title { text-align: center; }

/* notifications */
.nt-btn { position: relative; }
.nt-btn i { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--pink); color: #1a0d14; font: 700 10px/16px var(--font, inherit); font-style: normal; text-align: center; }
.nt-pop { position: fixed; top: 74px; right: 16px; z-index: 90; width: min(380px, calc(100vw / var(--zall, 1) - 32px)); max-height: calc(70vh / var(--zall, 1)); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.nt-pop[hidden] { display: none; }
.nt-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nt-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.nt-row.new { background: rgba(255, 102, 170, .07); }
.nt-row img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.nt-row p { margin: 0; line-height: 1.4; }
.nt-row time { color: var(--muted); font-size: 12px; }
.nt-acts { display: flex; gap: 6px; margin-top: 6px; } .nt-acts:empty { display: none; }
.nt-empty { padding: 18px 14px; color: var(--muted); margin: 0; font-size: 13.5px; }

/* chat cards (shared scores and maps in parties) */
.wc-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.wc-card .wc-ct { color: var(--muted); font-size: 12px; margin-left: 6px; }
.wc-card .wc-cm { margin: 4px 0 2px; font-weight: 600; }
.wc-card .wc-cs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.wc-card .wc-rk { font-weight: 800; color: var(--gold); } .wc-card .wc-md { color: var(--gold); }
.wc-card a { color: var(--pink); font-size: 12.5px; }
.wc-share { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 0; } .wc-share[hidden] { display: none; }

/* party page */
.pa-head p { max-width: 640px; }
.pa-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 16px 0 22px; }
.pa-form { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.pa-form .row { display: flex; gap: 8px; } .pa-form input { flex: 1; min-width: 0; }
.pa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pa-card { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--text); font: inherit; cursor: pointer; }
.pa-card:hover { border-color: var(--pink); }
.pa-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin: 12px 0 18px; }
.pa-top h1 { margin: 0 0 4px; } .pa-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pa-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pa-m { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13.5px; }
.pa-m img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.pt-s { font-size: 12.5px; } .pt-s.off { color: var(--muted); } .pt-s.on { color: var(--accent); } .pt-s.play { color: var(--pink); } .pt-s.dnd { color: var(--gold); }
.pa-inv { display: flex; flex-wrap: wrap; gap: 6px; }

/* rooms page tabs */
.rm-tabs { display: flex; gap: 4px; margin: 18px 0 12px; border-bottom: 1px solid var(--line); }
.rm-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 12px; cursor: pointer; margin-bottom: -1px; }
.rm-tab.active { color: var(--text); border-bottom-color: var(--pink); }
.rm-tab[hidden] { display: none; }
.rm-tab i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.rm-panel[hidden] { display: none; }

/* nav badge */
.nav-item { position: relative; }
.nav-badge { margin-left: 4px; background: var(--pink); color: #1a0d14; border-radius: 999px; font: 800 10.5px/16px inherit; font-style: normal; padding: 0 6px; }
.nav-badge[hidden] { display: none; }
#chat-full { margin-left: 8px; vertical-align: middle; }

/* ================= Chat page (Discord-style) ================= */
#view-chat.active { max-width: none; }
.ch { display: grid; grid-template-columns: 250px minmax(0, 1fr) 260px; height: calc(100vh / var(--zall, 1) - 120px); min-height: 460px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ch-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); position: relative; }
.ch-lh { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; }
.ch-lh b { font-size: 16px; }
.ch-convs { overflow-y: auto; padding: 0 8px 12px; flex: 1; }
.ch-grp { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 12px 8px 4px; }
.ch-conv { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.ch-conv:hover { background: rgba(255,255,255,.04); color: var(--text); }
.ch-conv.on { background: rgba(255, 102, 170, .14); color: var(--text); }
.ch-cn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ch-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--panel); color: var(--pink); font-weight: 800; }
.ch-ic.big { width: 36px; height: 36px; font-size: 17px; }
.ch-av { position: relative; flex: none; width: 30px; height: 30px; }
.ch-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.ch-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); background: #6b5b63; }
.ch-menu .ch-dot { position: static; display: inline-block; margin-right: 8px; vertical-align: middle; }
.ch-dot.on { background: #43b581; } .ch-dot.play { background: var(--pink); } .ch-dot.dnd { background: #f04747; }
.ch-un { background: var(--pink); color: #1a0d14; border-radius: 999px; font: 800 11px/17px inherit; font-style: normal; padding: 0 6px; }
.ch-x { border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; font-size: 15px; } .ch-conv:hover .ch-x { opacity: 1; }
.ch-menu { position: absolute; top: 52px; left: 10px; right: 10px; z-index: 5; max-height: calc(60vh / var(--zall, 1)); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.ch-menu[hidden] { display: none; }
.ch-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 10px; color: var(--text); font: inherit; cursor: pointer; } .ch-menu button:hover { background: var(--surface); }
.ch-mh { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 2px; }
.ch-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 61px; }
.ch-head:empty { display: none; }
.ch-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ch-ht b { font-size: 16px; } .ch-ht small { color: var(--muted); }
.ch-back { display: none; border: 0; background: none; color: var(--text); font-size: 20px; cursor: pointer; }
.ch-log { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.ch-log > :first-child { margin-top: auto; }
.ch-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 6px 4px; border-radius: 6px; }
.ch-msg:hover { background: rgba(255,255,255,.025); }
.ch-msg.cont { padding-top: 0; } .ch-msg.cont > * { grid-column: 2; }
.ch-mav { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); cursor: pointer; }
.ch-mt b { cursor: pointer; } .ch-mt b.me { color: var(--pink); } .ch-mt time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.ch-msg p { margin: 2px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.ch-ev { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; padding: 6px 4px 6px 56px; }
.ch-ev time { margin-left: auto; font-size: 12px; }
.ch-card { margin-top: 4px; max-width: 460px; border: 1px solid var(--line); border-left: 3px solid var(--pink); border-radius: 8px; background: var(--surface); padding: 8px 12px; }
.ch-ct { color: var(--muted); font-size: 12px; } .ch-cm { font-weight: 700; }
.ch-cs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ch-rk, .ch-md { color: var(--gold); font-weight: 700; }
.ch-card a { color: var(--pink); font-size: 13px; }
.ch-share { display: flex; gap: 6px; padding: 0 16px 8px; } .ch-share[hidden] { display: none; }
.ch-form { display: flex; gap: 8px; padding: 0 16px 16px; } .ch-form[hidden] { display: none; }
.ch-form input { flex: 1; min-width: 0; }
.ch-empty { color: var(--muted); padding: 12px; font-size: 13.5px; } .ch-empty.big { margin: auto; text-align: center; }
.ch-side { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 14px; }
.ch-side[hidden] { display: block; visibility: hidden; }
@media (min-width: 1201px) { .ch-side:empty { display: none; } .ch:has(> .ch-side:empty) { grid-template-columns: 260px minmax(0, 1fr); } } /* no chat open: no empty column */
.ch-side h4 { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 8px; }
.ch-mem { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer; }
.ch-mem:hover { background: rgba(255,255,255,.04); }
.ch-mem div { min-width: 0; display: flex; flex-direction: column; } .ch-mem small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-rank { width: 26px; text-align: right; color: var(--muted); font-size: 12px; font-weight: 700; }
.ch-host { font-style: normal; font-size: 10.5px; color: var(--gold); }
.ch-inv { display: block; width: 100%; text-align: left; margin-bottom: 4px; }
.ch-prof { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 10px; }
.ch-prof img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.ch-prof b { font-size: 17px; } .ch-prof small { color: var(--muted); }
@media (max-width: 1100px) { .ch { grid-template-columns: 230px minmax(0, 1fr); } .ch-side { display: none; } }
@media (max-width: 720px) {
  .ch { grid-template-columns: 1fr; height: calc(100vh / var(--zall, 1) - 140px); }
  .ch-main { display: none; } .ch.show-conv .ch-main { display: flex; } .ch.show-conv .ch-list { display: none; }
  .ch-back { display: block; }
}

/* chat: friends list, friend picker, map cards, leaderboard panel */
.ch-cn { display: flex; flex-direction: column; line-height: 1.2; }
.ch-cs2 { font-weight: 500; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-conv.off { opacity: .55; } .ch-conv.off:hover, .ch-conv.off.on { opacity: 1; }
.ch-hint { color: var(--muted); font-size: 12.5px; align-self: center; margin-left: 4px; }
.ch-search { width: 100%; margin: 2px 0 6px; }
.ch-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; padding: 2px 2px 6px; }
.ch-menu .ch-fchip { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; text-align: center; font-size: 12px; }
.ch-fchip .ch-av { width: 40px; height: 40px; }
.ch-fchip span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-menu [hidden] { display: none !important; }
.ch-msg p a { color: var(--pink); overflow-wrap: anywhere; }
.ch-mapc { position: relative; overflow: hidden; }
.ch-cov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; pointer-events: none; }
.ch-mapc > :not(.ch-cov) { position: relative; }
.ch-side { width: auto; }
.ch { grid-template-columns: 260px minmax(0, 1fr) 320px; }
.ch-lb { display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; align-items: center; padding: 9px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.ch-lb:hover { border-color: rgba(255, 102, 170, .5); }
.ch-lb.r1 { border-color: rgba(255, 209, 92, .55); background: linear-gradient(90deg, rgba(255, 209, 92, .12), var(--panel) 70%); }
.ch-lb.r2 { border-color: rgba(200, 210, 230, .45); background: linear-gradient(90deg, rgba(200, 210, 230, .10), var(--panel) 70%); }
.ch-lb.r3 { border-color: rgba(230, 150, 90, .45); background: linear-gradient(90deg, rgba(230, 150, 90, .10), var(--panel) 70%); }
.ch-lbr { grid-row: 1 / 3; text-align: center; font-weight: 800; color: var(--muted); font-size: 15px; }
.ch-lb .ch-av { grid-row: 1 / 3; width: 36px; height: 36px; }
.ch-lbm { display: flex; flex-direction: column; min-width: 0; } .ch-lbm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-lbs { font-variant-numeric: tabular-nums; color: var(--pink); font-weight: 700; font-size: 13.5px; }
.ch-dmb { grid-row: 1; border: 0; background: var(--surface); border-radius: 8px; padding: 4px 7px; cursor: pointer; }
.ch-dmb:hover { background: rgba(255, 102, 170, .2); }
.ch-lbx { grid-column: 3 / 5; display: flex; flex-wrap: wrap; gap: 4px; }
.ch-lbx span { font-size: 11.5px; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.ch-lbx b { color: var(--text); font-weight: 700; }
.ch-invp { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ch-invp:hover { border-color: var(--pink); } .ch-invp i { margin-left: auto; font-style: normal; color: var(--pink); font-weight: 800; }
@media (max-width: 1200px) { .ch { grid-template-columns: 240px minmax(0, 1fr); } .ch-side { display: none; } }
@media (max-width: 720px) { .ch { grid-template-columns: 1fr; } }
.ch-lbm { grid-column: 3; grid-row: 1; } .ch-dmb { grid-column: 4; grid-row: 1; }
.pf-acts:has(.pf-msg) { flex-direction: column; align-items: stretch; } /* Message sits under "Friends ✓", so the banner keeps its size */
.ch-sys { margin: 6px 0 6px 52px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.ch-sys b { color: var(--text); } .ch-sys code { color: var(--pink); background: var(--panel); padding: 0 5px; border-radius: 4px; margin-right: 4px; }

/* Chat page: fills the screen, no page scroll, no visible scrollbars */
.content:has(#view-chat.active) { max-width: none; padding-top: 14px; padding-bottom: 14px; }
html:has(#view-chat.active), body:has(#view-chat.active) { overflow: hidden; }
#view-chat .ch { height: calc(100dvh / var(--zall, 1) - 100px); }
.ch-log, .ch-convs, .ch-side { scrollbar-width: none; }
.ch-log::-webkit-scrollbar, .ch-convs::-webkit-scrollbar, .ch-side::-webkit-scrollbar { display: none; }

/* Room chat: its own column on the left, so the leaderboard never gets pushed around */
.room-split:has(#chat-panel:not([hidden])) { grid-template-columns: minmax(260px, 340px) 1.3fr 1fr; }
.room-split.maps-collapsed:has(#chat-panel:not([hidden])) { grid-template-columns: minmax(260px, 340px) 1fr; }
.room-chat { margin-top: 0; position: sticky; top: 84px; display: flex; flex-direction: column; min-width: 0; }
.room-chat .sub { margin-top: 0; }
.room-chat .chat-log { height: calc(100vh / var(--zall, 1) - 230px); min-height: 320px; scrollbar-width: none; scroll-behavior: auto; }
.room-chat .chat-log::-webkit-scrollbar { display: none; }
.room-chat .chat-log .ch-card { max-width: 100%; }
@media (max-width: 1200px) { .room-split:has(#chat-panel:not([hidden])) { grid-template-columns: 1fr 1fr; } .room-chat { grid-column: 1 / -1; order: 3; position: static; } .room-chat .chat-log { height: 360px; } }
@media (max-width: 900px) { .room-split:has(#chat-panel:not([hidden])) { grid-template-columns: 1fr; } }

/* ===== Landing showcase: the overlays sliding by over a fake playfield ===== */
.l-show { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ls-stage { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line); aspect-ratio: 16 / 11;
  background: radial-gradient(circle at 22% 30%, rgba(255, 102, 170, .22) 0 9%, transparent 9.5%), radial-gradient(circle at 22% 30%, transparent 0 12%, rgba(255, 102, 170, .35) 12.4%, transparent 13%),
    radial-gradient(circle at 68% 72%, rgba(102, 204, 255, .18) 0 7%, transparent 7.5%), radial-gradient(circle at 68% 72%, transparent 0 10%, rgba(102, 204, 255, .3) 10.4%, transparent 11%),
    linear-gradient(140deg, #2a1d26, #15101a 60%, #1d1422); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.ls-stage::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .015) 0 2px, transparent 2px 4px); pointer-events: none; }
.ls-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.65, 0, .25, 1); }
.ls-slide { flex: 0 0 100%; height: 100%; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.ls-slide .m-run { width: 70%; align-self: flex-end; } .ls-slide .m-board { width: 88%; }
.ls-nav { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.ls-name { font-weight: 800; color: var(--pink); font-size: 14px; }
.ls-dots { display: flex; gap: 6px; }
.ls-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: var(--surface-2); cursor: pointer; transition: width .3s, background .3s; }
.ls-dots button.on { width: 26px; background: var(--pink); }
.m-duel, .m-party, .m-chat { background: rgba(34, 26, 31, .92); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.md-map { margin: 6px 0 12px; color: var(--muted); font-size: 13px; }
.md-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.md-vs em { font-style: normal; font-weight: 900; color: var(--pink); font-family: var(--font-head); }
.md-p { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.md-p .m-av { grid-row: span 2; } .md-p small { color: var(--muted); font-variant-numeric: tabular-nums; }
.md-p.you { outline: 1px solid rgba(255, 102, 170, .6); }
.md-p.r { grid-template-columns: 1fr 34px; text-align: right; } .md-p.r .m-av { grid-column: 2; grid-row: 1 / 3; } .md-p.r b, .md-p.r small { grid-column: 1; }
.md-clocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.md-clocks div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 6px 10px; }
.md-clocks small { display: block; color: var(--muted); font-size: 11.5px; } .md-clocks b { font-family: var(--font-head); font-size: 22px; font-variant-numeric: tabular-nums; }
.m-ban { align-self: center; text-align: center; font-family: var(--font-head); font-weight: 900; font-size: 20px; color: #9be89b; background: rgba(20, 40, 20, .85); border: 1px solid rgba(155, 232, 155, .3); padding: 10px 18px; border-radius: 18px; }
.m-ban small { display: block; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; opacity: .8; }
.m-party { width: 78%; display: flex; flex-direction: column; gap: 7px; }
.mp-r { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 13.5px; }
.mp-r.you { background: rgba(255, 102, 170, .18); }
.mp-r .m-av { width: 30px; height: 30px; } .mp-r small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.mp-r i { display: block; height: 4px; margin-top: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--pink) var(--p), var(--surface-2) var(--p)); }
.mp-r .m-s { font-variant-numeric: tabular-nums; }
.m-chat { width: 86%; align-self: flex-end; display: flex; flex-direction: column; gap: 10px; }
.mc-l { display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 13.5px; } .mc-l .m-av { width: 30px; height: 30px; }
.mc-l p { margin: 2px 0 0; } .mc-l.ev { display: block; color: var(--muted); padding-left: 40px; }
.mc-card { margin-top: 6px; border-left: 3px solid var(--pink); background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.mc-card small { color: var(--muted); font-size: 11.5px; } .mc-card span { font-size: 12.5px; color: var(--muted); } .mc-card em { font-style: normal; color: var(--gold); font-weight: 800; }
@media (max-width: 820px) { .ls-stage { aspect-ratio: auto; height: 380px; } .ls-slide .m-run, .ls-slide .m-board, .m-party, .m-chat { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ls-track { transition: none; } }
.dl-phone { display: inline-block; max-width: 44ch; padding: 10px 14px; border-radius: 16px; background: rgba(255, 209, 92, .1); border: 1px solid rgba(255, 209, 92, .35); color: var(--gold); font-weight: 600; font-size: 14px; line-height: 1.4; }
/* phones */
@media (max-width: 700px) {
  #view-chat .ch { height: calc(100dvh / var(--zall, 1) - 150px); min-height: 0; }
  .search-key { display: none; }
  .ls-slide { padding: 14px; } .md-clocks b { font-size: 18px; } .m-ban { font-size: 16px; }
  .lb-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
.topbar .btn { white-space: nowrap; }

/* Size to the screen: the layout was tuned on 2K (2560 wide); smaller screens get the same look, scaled down.
   Viewport-height sizes divide by --z so full-height pages still fill the window. */
/* the page's zoom (--zall): smaller on mid-size screens (--z) times Settings → Larger text (--tz, settings.js), held back on narrow screens where
   more cannot fit (--tzmax). Whatever is as tall or as wide as the window divides by it, or the zoom would make it bigger than the window. */
:root { --z: 1; --tzmax: 1.5; --zall: calc(var(--z) * min(var(--tz, 1), var(--tzmax))); }
@media (max-width: 2299px) { :root { --z: .9; } }
@media (max-width: 2099px) { :root { --z: .85; } }
@media (max-width: 1799px) { :root { --z: .8; } }
@media (max-width: 1299px) { :root { --z: .9; } }
@media (max-width: 900px) { :root { --z: 1; --tzmax: 1.3; } }
@media (max-width: 600px) { :root { --tzmax: 1.15; } }
html { zoom: var(--zall); }
.ch-dot.brb { background: #ffc857; } .pt-s.brb { color: #ffc857; }

.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fb-item.done { opacity: .55; }
.fb-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-act { margin-left: auto; display: flex; gap: 6px; }
.fb-msg { margin: 8px 0 4px; white-space: pre-wrap; word-break: break-word; }
.fb-kind { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: #31242b; color: #ffd0e3; }
.fb-kind.bug { background: #4a1f2a; color: #ff8fa6; }
.fb-kind.idea { background: #1f3a2a; color: #8be04b; }
/* a reported skin's pictures (Admin → Moderation), on a checkerboard so see-through parts show */
.sk-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.sk-pics[hidden] { display: none; }
.sk-pics figure { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; margin: 0; padding: 6px; border-radius: 10px; background: repeating-conic-gradient(#221b1e 0 25%, #2c2427 0 50%) 0 0 / 12px 12px; }
.sk-pics img { max-width: 100%; max-height: 80px; object-fit: contain; }
.sk-pics figcaption { max-width: 100%; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; text-align: center; }

.ch-lb { position: relative; grid-template-columns: 30px 36px minmax(0, 1fr); padding-right: 46px; }
.ch-lb .ch-dmb { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgba(255, 102, 170, .12); font-size: 14px; line-height: 1; display: grid; place-items: center; transition: transform .15s, background .15s; }
.ch-lb .ch-dmb:hover { background: rgba(255, 102, 170, .3); transform: scale(1.1); }
.ch-lb .ch-lbx { grid-column: 3 / -1; }

.ch-ic .ic { width: 18px; height: 18px; } .ch-ic.big .ic { width: 20px; height: 20px; }
.ch-mh + button .ic, .ch-menu .ic, [data-add="party"] .ic, [data-parties] .ic { width: 15px; height: 15px; vertical-align: -3px; }
.ch-lb .ch-dmb { color: var(--pink); } .ch-lb .ch-dmb .ic { width: 16px; height: 16px; }

.ch-lb .ch-dmb { top: 50%; right: 10px; width: 32px; height: 32px; margin-top: -16px; color: var(--pink); background: rgba(255, 102, 170, .1); border: 1px solid rgba(255, 102, 170, .35); box-sizing: border-box; display: grid; place-items: center; padding: 0; cursor: pointer; transition: transform .15s, background .15s, color .15s; }
.ch-lb .ch-dmb .ic { width: 16px; height: 16px; vertical-align: 0; }
.ch-lb .ch-dmb:hover { background: var(--pink); color: #1a0d14; border-color: var(--pink); transform: scale(1.06); }
.ch-lb { padding-right: 54px; }

.ad-pre { max-height: 320px; overflow: auto; margin: 12px 0 0; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
#ad-detail h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } #ad-detail h4 { margin: 14px 0 6px; font-size: 14px; }

.mg-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .mg-head > div { flex: 1; min-width: 200px; } .mg-head .avatar { width: 56px; height: 56px; border-radius: 50%; } .mg-head h3 { margin: 0 0 4px; }
.mg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; } .mg-stats > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; } .mg-stats b { font-size: 18px; } .mg-stats span { color: var(--muted); font-size: 12.5px; }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; } .mg-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; } .mg-card.wide { grid-column: 1 / -1; } .mg-card h4 { margin: 0 0 8px !important; }
.mg-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; margin: 10px 0; } .mg-perm { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.ad-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 18px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; }
.ad-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; } .ad-tabs button:hover { color: var(--text); } .ad-tabs button.on { background: var(--pink); color: #1a0d14; }
.tab-off { display: none !important; }
.ad-drawer { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; } .ad-drawer[hidden] { display: none; }
.ad-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s; } .ad-drawer.open .ad-back { opacity: 1; }
.ad-panel { position: relative; width: min(760px, 100%); height: 100%; overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line); padding: 22px; transform: translateX(40px); opacity: 0; transition: transform .22s cubic-bezier(.2, 0, 0, 1), opacity .2s; box-shadow: -20px 0 50px rgba(0, 0, 0, .4); } .ad-drawer.open .ad-panel { transform: none; opacity: 1; }
body.ad-lock { overflow: hidden; }
.ad-panel .mg-card { background: var(--panel); }
.mg-dur { display: grid; gap: 8px; margin-bottom: 12px; } .mg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 99px; cursor: pointer; } .chip:hover { border-color: var(--pink); color: var(--pink); }
.mg-num { width: 84px !important; } .mg-unit { width: auto !important; } .mg-why { flex: 1; min-width: 180px; }
.mg-acts { margin-top: 4px; }
.mg-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0; }
label.mg-perm { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.25; }
label.mg-perm input { width: 18px !important; height: 18px; flex: none; margin: 0; padding: 0; accent-color: var(--pink); }
label.mg-perm:has(input:checked) { border-color: var(--pink); background: rgba(255, 102, 170, .1); }
.ad-sec { transition: opacity .15s; }
@media (max-width: 700px) { .ad-panel { padding: 16px; } .ad-tabs { width: 100%; } .ad-tabs button { flex: 1; padding: 8px 10px; } }

.nav-badge.inl { position: static; display: inline-grid; margin-left: 6px; vertical-align: 1px; }

.rc-bar { margin: 6px 0 10px; } .rc-bar input[type=search] { flex: 1; min-width: 200px; }
.rc-log { max-height: 440px; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px; scroll-behavior: smooth; }
.rc-day { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 6px; } .rc-day::before, .rc-day::after { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--line); vertical-align: middle; margin: 0 8px; }
.rc-msg { display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; } .rc-msg:hover { background: var(--surface); }
.rc-msg img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.rc-body { min-width: 0; flex: 1; } .rc-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); } .rc-meta b { color: var(--text); font-size: 14px; }
.rc-room { color: var(--pink); } .rc-text { margin-top: 2px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; } .rc-text mark { background: rgba(255, 209, 92, .35); color: inherit; border-radius: 3px; padding: 0 2px; }
.rc-del { margin-left: auto; opacity: 0; border: 0; background: none; color: #ff7a8a; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; } .rc-msg:hover .rc-del { opacity: 1; }

html[data-boot] .view.active { display: none !important; animation: none !important; }
html[data-boot="rooms"] #view-rooms, html[data-boot="runs"] #view-runs, html[data-boot="friends"] #view-friends, html[data-boot="chat"] #view-chat, html[data-boot="party"] #view-party, html[data-boot="settings"] #view-settings, html[data-boot="admin"] #view-admin, html[data-boot="profile"] #view-profile, html[data-boot="room"] #view-room { display: block !important; animation: none !important; }
html.nofx .view.active { animation: none !important; }
html[data-boot] .nav-item.active { background: none; color: var(--muted); }
html[data-boot="rooms"] .nav-item[data-view="rooms"], html[data-boot="runs"] .nav-item[data-view="runs"], html[data-boot="friends"] .nav-item[data-view="friends"], html[data-boot="chat"] .nav-item[data-view="chat"], html[data-boot="party"] .nav-item[data-view="party"], html[data-boot="settings"] .nav-item[data-view="settings"], html[data-boot="admin"] .nav-item[data-view="admin"] { background: rgba(255, 111, 169, .16); color: var(--pink); }
html[data-boot] .nav-item { transition: none; }


/* Tournaments */
.l-tourn { margin: 8px 0 26px; } .l-tourn h2 { font-size: 22px; margin: 0 0 14px; }
.tn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; } .tn-head p { max-width: 640px; }
.tn-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; } .tn-bar input[type=search] { min-width: 220px; }
.tn-code { display: flex; gap: 6px; margin-left: auto; } .tn-code input { width: 120px; }
.tn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tn-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; transition: transform .2s var(--ease-emph), border-color .2s; }
.tn-card:hover { transform: translateY(-3px); border-color: rgba(255, 111, 169, .5); } .tn-card b { font-size: 16px; } .tn-card-top { display: flex; gap: 8px; align-items: center; }
.tn-st { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tn-st-registration, .tn-st-qualifiers { background: rgba(255, 209, 92, .15); color: #ffd15c; } .tn-st-live { background: rgba(155, 232, 155, .15); color: #9be89b; } .tn-st-ready, .tn-st-seeding { background: rgba(102, 204, 255, .15); color: #66ccff; }
.tn-priv { padding: 2px 9px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.tn-title { margin: 12px 0 6px; } .tn-title h1 { margin: 0 0 4px; } .tn-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tn-desc { max-width: 70ch; line-height: 1.55; } .tn-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 14px 0; }
.tn-facts > div { padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); } .tn-facts small { display: block; color: var(--muted); font-size: 12px; } .tn-facts b { font-size: 15px; }
.tn-dates { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; } .tn-dates li { display: flex; gap: 12px; } .tn-dates span { width: 150px; color: var(--muted); }
.tn-box { margin: 14px 0; padding: 16px 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); } .tn-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; } .tn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tn-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; } .tn-form > b, .tn-form .wide { grid-column: 1 / -1; } .tn-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.tn-form label.chk { flex-direction: row; align-items: center; } .tn-form textarea { font: inherit; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; resize: vertical; }
.tn-table { overflow-x: auto; } .tn-table table { width: 100%; border-collapse: collapse; } .tn-table th, .tn-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; } .tn-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tn-table tr.tn-in td:first-child { color: var(--pink); font-weight: 800; }
.tn-map { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); } .tn-map > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tn-slot { min-width: 46px; color: var(--pink); }
.tn-bracket { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 14px; } .tn-round { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 210px; } .tn-round h3 { font-size: 13px; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: .05em; }
.tn-match { padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; } .tn-match.st-live { border-color: var(--pink); }
.tn-side { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 9px; background: var(--surface); } .tn-side.win { background: rgba(255, 111, 169, .2); font-weight: 700; } .tn-side i { color: var(--muted); font-style: normal; font-size: 12px; margin-right: 6px; }
.tn-tabs .chip, .tn-bar .chip { transition: background-color .2s, color .2s, border-color .2s; } .tn-tabs .chip:hover, .tn-bar .chip:hover { border-color: rgba(255, 111, 169, .5); }
.tn-tabs .chip.active, .tn-bar .chip.active { background: rgba(255, 111, 169, .16); border-color: var(--pink); color: var(--pink); }
.tn-form select, .tn-bar select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; }
.tn-match[data-match] { cursor: pointer; transition: border-color .2s, transform .15s; } .tn-match[data-match]:hover { border-color: rgba(255, 111, 169, .55); transform: translateY(-1px); }
.tn-mh { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 18px; } .tn-mp { display: flex; align-items: center; gap: 12px; font-weight: 700; } .tn-mp b { font-size: 28px; color: var(--pink); }
.tn-status { margin: 8px 0; } .tn-sched { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tn-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.tn-pm { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); } .tn-pm > b { color: var(--pink); }
.tn-pm.st-banned { opacity: .45; text-decoration: line-through; } .tn-pm.st-playing { border-color: var(--pink); } .tn-pm.st-played { border-color: rgba(155, 232, 155, .4); }
.tn-form label.chk { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; font-size: 14px; color: var(--text); } .tn-form label.chk input { width: 20px; height: 20px; flex: none; accent-color: var(--pink); }
/* Relax runs: plays whose pp the desktop app worked out (osu! keeps none for Relax) */
.run-app { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gold, #ffc857); border: 1px solid rgba(255, 200, 87, .45); border-radius: 6px; padding: 1px 5px; vertical-align: 2px; }
.rn-app { color: var(--gold, #ffc857); }
/* run boards: rank, avatar, player, gap to #1, time — five cells (the gap used to push the time onto a second line) */
.lb.rb-rest > .lb-row { grid-template-columns: 44px 44px 1fr auto auto; }
.lb.rb-rest .rb-gap { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
@media (max-width: 560px) { .lb.rb-rest > .lb-row { grid-template-columns: 34px 38px 1fr auto; } .lb.rb-rest .rb-gap { display: none; } }
/* ranked leaderboard */
.rk-stats { display: flex; gap: 18px; color: var(--muted); margin: -4px 0 14px; font-size: 14px; } .rk-stats b { color: var(--text); }
.lb.rk-web > .lb-row { grid-template-columns: 44px 44px 1fr auto 70px; }
.lb.rk-web > .lb-row.rk1 .lb-rank { background: #ffd15c; color: #3a2a00; } .lb.rk-web > .lb-row.rk2 .lb-rank { background: #cfd6e4; color: #1d2430; } .lb.rk-web > .lb-row.rk3 .lb-rank { background: #e0955b; color: #2e1708; }
.lb.rk-web .lb-val { text-align: right; }
.rk-tier { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--tc, var(--muted)); }
.rk-tier i { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 3px; background: var(--tc, var(--muted)); box-shadow: 0 0 10px var(--tc, transparent); }
.rk-t-unranked { --tc: #8a7c84; } .rk-t-iron { --tc: #9a9a9a; } .rk-t-bronze { --tc: #d08a52; } .rk-t-silver { --tc: #cfd6e0; } .rk-t-gold { --tc: #ffc857; }
.rk-t-platinum { --tc: #6fe0d0; } .rk-t-diamond { --tc: #7fb2ff; } .rk-t-master { --tc: #c48bff; } .rk-t-grandmaster { --tc: #ff6fa9; }
@media (max-width: 560px) { .lb.rk-web > .lb-row { grid-template-columns: 34px 38px 1fr 56px; } .lb.rk-web .rk-tier { display: none; } }
#view-ranked #rk-list { max-width: 900px; }

/* ---- Watch: live matches and replays ---- */
.wt-sec { margin-top: 26px; }
.wt-sh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; } .wt-sh h2 { margin: 0; font-family: var(--font-head); font-size: 22px; }
.wt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wt-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 17, 15, .72), rgba(22, 17, 15, .95)), var(--cover, none) center / cover, var(--panel); transition: transform .2s var(--ease-emph, ease), border-color .2s; }
.wt-card:hover { transform: translateY(-3px); border-color: rgba(255, 111, 169, .5); }
.wt-card.k-tournament { border-color: rgba(255, 200, 87, .35); } .wt-card.k-ranked { border-color: rgba(127, 178, 255, .3); }
.wt-run { font-size: 12.5px; color: #ffd36e; margin-top: 2px; } .wt-runbox { border-color: rgba(255, 211, 110, .4) !important; }
.wt-card.k-friend { border-color: rgba(139, 224, 75, .35); } .wt-av { width: 26px; height: 26px; border-radius: 50%; vertical-align: -6px; margin-right: 4px; }
.wt-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.wt-kind { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.wt-live { font-size: 12px; font-weight: 800; color: #ff5d6c; letter-spacing: .04em; animation: wtBlink 1.6s ease-in-out infinite; }
@keyframes wtBlink { 50% { opacity: .45; } }
.wt-vs { margin: 0; font-family: var(--font-head); font-size: 20px; line-height: 1.2; } .wt-vs i { font-style: normal; color: var(--pink); font-size: .75em; margin: 0 4px; }
.wt-map { color: var(--muted); font-size: 13.5px; } .wt-map b { color: var(--text); font-weight: 600; }
.wt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.wt-res { font-family: var(--font-head); font-weight: 800; font-variant-numeric: tabular-nums; }
.wt-player { background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 18px; margin-top: 8px; animation: wtIn .35s var(--ease-dec, ease) both; }
.wt-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.wt-head .wt-vs { font-size: 26px; margin: 2px 0; }
.wt-acts { display: flex; gap: 8px; }
.wt-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.wt-stage canvas { width: 100%; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, #1d1519, #0d0a0f); border-radius: 18px; border: 1px solid var(--line); display: block; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.wt-chips .chip { cursor: pointer; border: 1px solid var(--line); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.wt-chips .chip.on { background: var(--pink); color: #2a0a1a; border-color: var(--pink); }
.wt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--pink)); display: inline-block; }
.wt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 38px; }
.wt-bar input[type="range"] { flex: 1; min-width: 160px; accent-color: var(--pink); }
.wt-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; min-width: 92px; text-align: right; }
.wt-bar select { padding: 6px 8px; border-radius: 10px; }
.wt-over { color: var(--muted); }
.wt-side { display: flex; flex-direction: column; gap: 10px; }
.wt-pl { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--pink)); border-radius: 16px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.wt-pn { display: flex; align-items: center; gap: 8px; } .wt-pn b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-st { font-size: 12px; color: var(--muted); white-space: nowrap; }
.wt-big { font-family: var(--font-head); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wt-hits { display: flex; gap: 10px; font-variant-numeric: tabular-nums; font-size: 14px; }
.wt-hits .h3 { color: #66ccff; } .wt-hits .h1 { color: #8be04b; } .wt-hits .h5 { color: #ffc857; } .wt-hits .hx { color: #ff5d6c; }
.wt-result { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 200, 87, .16), var(--surface)); border: 1px solid rgba(255, 200, 87, .4); }
.wt-result b { font-family: var(--font-head); font-size: 18px; } .wt-result small { color: var(--muted); }
@media (max-width: 900px) { .wt-body { grid-template-columns: 1fr; } .wt-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@keyframes wtIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wt-player { scroll-margin-top: 80px; }
/* tournament match: what is being played, the referee panel, the log */
.tn-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 8px 0; }
.tn-ref { border: 1px solid rgba(255, 200, 87, .4); background: linear-gradient(135deg, rgba(255, 200, 87, .08), transparent 60%); border-radius: 16px; padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.tn-ref > b { color: var(--gold); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.tn-ref input[type="number"] { width: 110px; }
.tn-settle input[type="number"] { width: 130px; }
.tn-log { margin: 8px 0; font-size: 14px; } .tn-log summary { cursor: pointer; color: var(--muted); } .tn-log > div { padding: 3px 0; border-bottom: 1px solid var(--line); }
.tn-check { display: flex; align-items: center; gap: 8px; }
/* home: what is new, live matches, the ranked top, clickable feature cards */
.l-new { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #2a0a1a; background: var(--pink); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.l-bits article[data-go] { cursor: pointer; }
.l-live, .l-top { margin: 0 0 40px; }
.l-live-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .l-live-h h2 { margin: 0; font-size: 22px; }
.l-more { color: var(--pink); font-weight: 700; text-decoration: none; font-size: 14px; } .l-more:hover { text-decoration: underline; }
.l-top-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.l-top-list .tp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; }
.l-top-list .tp:hover { border-color: rgba(255, 111, 169, .45); }
.l-top-list .tp img { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); }
.l-top-list .tp b { display: block; } .l-top-list .tp small { color: var(--muted); }
.l-top-list .tp .n { font-family: var(--font-head); font-weight: 800; color: var(--muted); width: 22px; } .l-top-list .tp:first-child .n { color: var(--gold); }
.l-bits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .l-bits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .l-bits { grid-template-columns: 1fr; } }
.l-live-h h2 .wt-live { font-size: 12px; vertical-align: 3px; margin-right: 4px; }

/* ---- watching full screen ---- */
.wt-stage:fullscreen { background: #000; position: relative; padding: 0; }
.wt-stage:fullscreen canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.wt-stage:fullscreen > :not(canvas) { position: absolute; left: 0; right: 0; z-index: 2; margin: 0; padding: 10px 18px; transition: opacity .35s ease; }
.wt-stage:fullscreen .wt-chips { top: 0; padding-bottom: 26px; background: linear-gradient(rgba(0, 0, 0, .85), transparent); }
.wt-stage:fullscreen .wt-bar { bottom: 0; padding-top: 26px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.wt-stage:fullscreen .sound-ctl { top: 46px; left: auto; right: 0; }
.wt-stage:fullscreen .skin-pick { display: none; }
.wt-stage:fullscreen:not(.wt-awake) > :not(canvas) { opacity: 0; pointer-events: none; }
.wt-stage:fullscreen:not(.wt-awake) { cursor: none; }

/* ==== Watch page: stream cards, the full-window player, the chat column (same look as the app) ==== */

/* ==== Watch: live now (stream cards), your stream, watching settings ==== */
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lv-count { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 99px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.lv-count:empty { display: none; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px 14px; }
/* a stream card: the thumbnail (the map's cover) and below it who and what */
.lv { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; animation: lvIn .3s var(--ease-dec) both; }
.lv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #241b1f var(--cover, none) center / cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.lv-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 35%, transparent 60%, rgba(0, 0, 0, .55)); }
.lv:hover .lv-thumb, .lv:focus-visible .lv-thumb { transform: translate(3px, -3px); box-shadow: -6px 6px 0 var(--pink); }
.lv:focus-visible { outline: none; } .lv:focus-visible .lv-name b { text-decoration: underline; }
.lv.on .lv-thumb { box-shadow: -6px 6px 0 var(--pink), 0 0 0 2px var(--pink) inset; }
.lv-badge { position: absolute; z-index: 1; top: 8px; left: 8px; height: 20px; line-height: 20px; padding: 0 7px; border-radius: 5px; background: #e5194b; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lv-badge.idle { background: rgba(10, 8, 9, .78); color: #e8dce2; letter-spacing: .01em; text-transform: none; font-weight: 700; }
.lv-kind { position: absolute; z-index: 1; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(10, 8, 9, .78); color: #fff; font-size: 11.5px; font-weight: 700; max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-kind .i { width: 13px; height: 13px; }
.lv-viewers { position: absolute; z-index: 1; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; background: rgba(10, 8, 9, .78); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-viewers .i { width: 13px; height: 13px; }
.lv-mods { position: absolute; z-index: 1; right: 8px; bottom: 8px; height: 20px; line-height: 20px; padding: 0 7px; border-radius: 5px; background: var(--gold); color: #1b1408; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.lv-meta { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.lv-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface); }
.lv-faces { display: flex; flex: none; } .lv-faces img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface); box-shadow: 0 0 0 2px var(--bg); }
.lv-faces img + img { margin-left: -9px; }
.lv-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.lv-name { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }
.lv-name b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lv-vs { color: var(--muted); font-weight: 500; }
.lv-tag { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: rgba(255, 111, 169, .16); color: var(--pink); }
.lv-tag.fr { background: rgba(124, 196, 255, .14); color: #8fd0ff; }
.lv-title { overflow: hidden; color: var(--text); font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; } /* (what is played: the stream's title, as Twitch's) */
.lv-map { overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; } /* (a stream with a title of its own: the map played, under it) */
.lv-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } /* (its game, mods, what it does: as Twitch's tags) */
.lv-tags i { padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: #d8cbc3; font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.lv-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #e5194b; } /* (live: its viewers, as Twitch's) */
.lv-stat { position: absolute; z-index: 1; right: 8px; bottom: 8px; height: 20px; padding: 0 7px; border-radius: 5px; background: rgba(10, 8, 9, .78); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; font-variant-numeric: tabular-nums; }
.lv-av.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #e5194b; }
.lv-live { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s var(--ease); } .lv-live.on { opacity: 1; } /* (its own live picture: watch-live.js) */
/* the top of Watch (watch-live.js): the channel most worth watching, live and muted, beside who and what; the friends on, in a strip */
.wl-hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.wl-screen { position: relative; display: block; aspect-ratio: 16 / 9; padding: 0; border: 0; overflow: hidden; background: #0d0a0f; cursor: pointer; }
.wl-cover { position: absolute; inset: 0; background: var(--cover, none) center / cover; filter: brightness(.55); }
.wl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s var(--ease); } .wl-canvas.on { opacity: 1; }
.wl-screen .lv-badge { top: 12px; left: 12px; } .wl-screen .lv-viewers { left: 12px; bottom: 12px; } .wl-screen .lv-viewers:empty { display: none; }
.wl-screen:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.wl-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 22px; }
.wl-chan { display: flex; align-items: center; gap: 12px; min-width: 0; } .wl-chan .lv-av { width: 46px; height: 46px; }
.wl-chan > span:last-child { display: flex; flex-direction: column; min-width: 0; } .wl-chan b { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; } .wl-chan small { color: var(--muted); font-size: 12.5px; }
.wl-title { margin: 0; font-family: var(--font-head); font-size: clamp(17px, 1.6vw, 22px); line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.wl-map { margin: -4px 0 0; overflow: hidden; color: var(--muted); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; } .wl-map:empty { display: none; }
.wl-stats { color: var(--gold); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: pre; } .wl-stats:empty { display: none; }
.wl-go { align-self: flex-start; margin-top: 4px; }
.wl-chan small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.wl-seen { display: inline-flex; align-items: center; gap: 5px; color: #ff7a93; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-more { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); } .wl-more:empty { display: none; }
.wl-more > small { color: var(--muted); font-size: 12px; font-weight: 700; }
.wl-alt { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .15s; }
.wl-alt:hover { background: var(--surface-2); } .wl-alt:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.wl-alt img { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.wl-alt span { display: flex; flex-direction: column; min-width: 0; } .wl-alt b, .wl-alt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wl-alt b { font-size: 13.5px; } .wl-alt small { color: var(--muted); font-size: 12px; }
.wl-alt > i { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-follow { margin: 0 0 16px; } .wl-follow h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.wl-strip { display: flex; gap: 12px; padding: 6px 2px 4px; overflow-x: auto; scrollbar-width: none; } .wl-strip::-webkit-scrollbar { display: none; }
.wl-f { display: flex; flex: none; flex-direction: column; align-items: center; gap: 3px; width: 78px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.wl-ring { position: relative; width: 56px; height: 56px; margin-bottom: 4px; padding: 2px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line); transition: box-shadow .2s; }
.wl-f.live .wl-ring { box-shadow: 0 0 0 2px #e5194b; } .wl-f:hover .wl-ring, .wl-f:focus-visible .wl-ring { box-shadow: 0 0 0 2px var(--pink); } .wl-f:focus-visible { outline: none; }
.wl-ring img { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--surface); object-fit: cover; }
.wl-ring i { position: absolute; left: 50%; bottom: -7px; padding: 0 5px; border-radius: 4px; background: #e5194b; color: #fff; font-size: 9.5px; font-style: normal; font-weight: 800; letter-spacing: .04em; line-height: 15px; text-transform: uppercase; transform: translateX(-50%); }
.wl-f b { max-width: 100%; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; } .wl-f small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .wl-hero { grid-template-columns: 1fr; } .wl-info { padding: 14px 16px 16px; } .wl-go { align-self: stretch; } }
@media (prefers-reduced-motion: reduce) { .lv-live, .wl-canvas, .wl-ring { transition: none; } }
.lv-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.lv-empty .i { width: 30px; height: 30px; color: var(--pink); margin-bottom: 6px; } .lv-empty b { color: var(--text); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .lv, .lv-thumb { animation: none; transition: none; } .lv:hover .lv-thumb { transform: none; } }
/* watching settings: one setting a row */
.ws-card h3 { margin: 0 0 6px; }
.ws-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ws-row:first-child { border-top: 0; }
.ws-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ws-l b { font-size: 14px; } .ws-l span { color: var(--muted); font-size: 13px; }
.ws-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* volume: on / off and two short sliders */
.vol { display: inline-flex; align-items: center; gap: 10px; }
.vol-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .06); color: var(--text); cursor: pointer; transition: background-color .15s; }
.vol-btn:hover { background: rgba(255, 255, 255, .12); }
.vol-sl { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.vol input[type=range] { -webkit-appearance: none; appearance: none; width: 84px; height: 4px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink) var(--v, 50%), rgba(255, 255, 255, .18) var(--v, 50%)); cursor: pointer; }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.vol.off .vol-sl { opacity: .45; }
/* ==== the player: what is watched fills the window; the bars and the chat sit over it ==== */
body.th-open { overflow: hidden; }
.th.sp-view { position: fixed; inset: 0; z-index: 80; margin: 0; display: block; background: #050405; color: #fff; --chatw: 0px; overflow: hidden; animation: thIn .26s var(--ease-dec); }
.th.chat-on, .th.view-on { --chatw: 340px; }
@keyframes thIn { from { opacity: 0; } }
.th-stage { position: absolute; top: 0; bottom: 0; left: 0; right: var(--chatw); transition: right .3s var(--ease); }
.th .th-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; display: block; }
/* the picture and its bars (and a live game's chat) in one box; a replay's own page, as a video site has it: the box on top (sticky on a phone),
   its About and comments under it, what to watch next beside them (under them when narrow); full screen: the box alone */
.th-box { position: absolute; inset: 0; }
.th.th-page { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.th.th-page .th-box { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; max-height: calc((100vh - 150px) / var(--zall, 1)); min-height: 220px; background: #050405; }
.th.th-page:not(.awake) { cursor: auto; } .th.th-page:not(.awake) .th-box { cursor: none; }
.th.th-page .th-turn { display: none !important; } /* (the picture is on top: no need to turn the phone) */
.th-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px; align-items: start; max-width: 1480px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 32px) 64px; color: var(--text); }
.th.th-page .th-about { position: static; z-index: auto; width: auto; max-height: none; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; opacity: 1; pointer-events: auto; transition: none; }
.th.th-page .th-about .th-view-head { display: none; }
.th.th-page .ab-body { overflow: visible; margin: 0; padding: 0; gap: 18px; }
.th.th-page .ab-title { font-size: clamp(19px, 1.9vw, 24px); }
.th-recs { display: flex; flex-direction: column; gap: 10px; min-width: 0; } .th-recs:empty { display: none; } .th-recs h3 { margin: 0; font-size: 16px; }
@media (max-width: 1000px) { /* (narrow: the box is small and stays in sight; what it says is under it, so it shows the picture, Watch and the controls alone) */
  .th-below { grid-template-columns: minmax(0, 1fr); } .th.th-page .th-box { position: sticky; top: 0; z-index: 5; max-height: calc(56vh / var(--zall, 1)); overflow: hidden; }
  .th.th-page .th-pv-title, .th.th-page .th-pv-who, .th.th-page .th-pv-line, .th.th-page .th-pv-soc, .th.th-page .th-pv-acts [data-ab="info"], .th.th-page .th-stats, .th.th-page .th-who { display: none; }
  .th.th-page .th-top { padding: 10px 12px 28px; } .th.th-page .th-bottom { padding: 28px 12px 8px; gap: 4px; } .th.th-page .th-ctl-l .vol { display: none; } }
.th-top, .th-bottom { position: absolute; left: 0; right: var(--chatw); z-index: 2; padding: 16px 20px; transition: opacity .2s var(--ease), transform .2s var(--ease), right .3s var(--ease); }
.th-top { top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 54px; background: linear-gradient(rgba(5, 4, 5, .95), rgba(5, 4, 5, .8) 55%, transparent); }
.th-bottom { bottom: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 56px; background: linear-gradient(transparent, rgba(5, 4, 5, .82) 38%, rgba(5, 4, 5, .96)); }
.th:not(.awake) .th-top, .th:not(.awake) .th-bottom { opacity: 0; pointer-events: none; }
.th:not(.awake) .th-top { transform: translateY(-8px); } .th:not(.awake) .th-bottom { transform: translateY(8px); } /* (they slip away to their edge) */
.th:not(.awake) { cursor: none; }
.th-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.th-back { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background-color .15s; }
.th-back:hover { background: rgba(255, 255, 255, .18); }
.th-av { width: 42px; height: 42px; border-radius: 50%; flex: none; object-fit: cover; }
.th-who { display: flex; flex-direction: column; min-width: 0; }
.th-kind { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); } .th-kind i { font-style: normal; }
.th-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-sub { font-size: 13px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(60vw / var(--zall, 1)); }
.th-mods { color: var(--gold); }
.th-act { display: flex; align-items: center; gap: 12px; flex: none; }
.th-live { height: 22px; line-height: 22px; padding: 0 8px; border-radius: 5px; background: #e5194b; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.th-viewers { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-variant-numeric: tabular-nums; } .th-viewers .i { width: 16px; height: 16px; } .th-viewers:empty { display: none; }
.th-net { color: rgba(255, 255, 255, .6); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: default; }
.th-net.slow { color: var(--gold); } /* (behind for a while: the connection is slow right now) */
@media (max-width: 640px) { .th-net:not(.slow) { display: none; } } /* (a phone: the player's name has the room; a slow connection still says so) */
.th-ib { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: rgba(255, 255, 255, .88); cursor: pointer; transition: background-color .15s, color .15s; }
.th-ib:hover:not(:disabled) { background: rgba(255, 255, 255, .12); color: #fff; }
.th-ib.on { color: var(--pink); } .th-ib:disabled { opacity: .35; cursor: default; }
.th-ib .i { width: 21px; height: 21px; } .th-ib.big .i { width: 24px; height: 24px; }
.th-ib:focus-visible, .th-back:focus-visible, .th .chip:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.th-ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.th-ctl-l, .th-ctl-r { display: flex; align-items: center; gap: 4px; }
.th .vol { margin-left: 6px; } .th .vol-btn { background: none; } .th .vol-btn:hover { background: rgba(255, 255, 255, .12); }
.th .vol-sl { color: rgba(255, 255, 255, .62); }
.th-speed { height: 34px; padding: 0 8px; background: rgba(255, 255, 255, .08); border: 0; color: #fff; border-radius: 8px; font-size: 13px; color-scheme: dark; } .th-speed option { background: #1d1619; color: #fff; } /* (its list: on the see-through colour it opened white, the speeds white on white) */
/* who to follow */
.th .th-chips { margin: 0; gap: 6px; } .th .th-chips:empty { display: none; }
.th .th-chips .chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .86); font-size: 13px; transform: none; }
.th .th-chips .chip:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.th .th-chips .chip.on { background: #fff; color: #120d0f; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #fff); flex: none; }
.chip-n { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .7; }
/* match details (the duel's clocks, each player's numbers) */
.th-stats:empty { display: none; }
.th .sp-timers { margin: 0; gap: 6px 10px; }
.th .sp-rules { color: rgba(255, 255, 255, .7); }
.th .sp-pl { background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; }
.th .sp-run { background: rgba(0, 0, 0, .5); border-color: rgba(255, 211, 110, .35); }
/* a replay's timeline */
.th-time { display: flex; align-items: center; gap: 12px; }
.th-time input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 5px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink) calc(7px + (100% - 14px) * var(--p, 0)), rgba(255, 255, 255, .25) 0); accent-color: var(--pink); cursor: pointer; } /* (played: pink, up to the knob's middle) */
.th-time input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px rgba(255, 111, 169, .25); }
.th-time-n { font-size: 12.5px; color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the chat column */
.th-chat { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 340px; display: flex; flex-direction: column; background: #151012; border-left: 1px solid rgba(255, 255, 255, .07); transition: transform .3s var(--ease); }
.th:not(.chat-on) .th-chat, .th.view-on .th-chat { transform: translateX(100%); pointer-events: none; }
.th-chat .sc { flex: 1; border: 0; border-radius: 0; }
.th-chat .sc-log { min-height: 0; }
/* View (view.js, the app's own panel): what the picture shows, beside it, changed as it plays (the chat steps aside meanwhile) */
.th-view { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 340px; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; overflow-y: auto; background: #151012; border-left: 1px solid rgba(255, 255, 255, .07); color: var(--text);
  transform: translateX(100%); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.th.view-on .th-view { transform: none; opacity: 1; pointer-events: auto; }
.th-view-head { display: flex; align-items: center; justify-content: space-between; } .th-view-head h3 { margin: 0; font-size: 16px; }
.th-view .vx-skin .skin-pick { flex-wrap: wrap !important; margin: 0 !important; }
.th-view .vx-skin .btn { flex: none; padding: 5px 11px; font-size: 12.5px; }
/* the skin choice (skins.js): the skin now, an .osk of your own, the default */
.skin-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.skin-pick-now { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.skin-pick .btn[hidden] { display: none; }
/* your skins and the ones everyone shares (skins.js library): a little picture of each, two to a row */
.sk-lib { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sk-lib.off { opacity: .45; pointer-events: none; }
.sk-lib-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13.5px; } .sk-lib-h small { color: var(--muted); font-size: 12px; }
.sk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sk-grid .sk-none { grid-column: 1 / -1; margin: 0; }
.sk-tile { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, opacity .15s; }
.sk-tile:hover { border-color: rgba(255, 102, 170, .5); } .sk-tile.on { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; } .sk-tile.busy { opacity: .6; pointer-events: none; }
.sk-tile:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sk-pic { width: 100%; height: auto; aspect-ratio: 192 / 112; border-radius: 8px; background: repeating-conic-gradient(#221b1e 0 25%, #2c2427 0 50%) 0 0 / 12px 12px; }
.sk-name, .sk-tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sk-name { font-size: 12.5px; font-weight: 700; } .sk-tag { color: var(--muted); font-size: 11.5px; }
.sk-x, .sk-add, .sk-have, .sk-flag { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(14, 10, 12, .82); color: var(--text); font: inherit; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; }
.sk-add { background: var(--pink); color: #2a0a1a; } .sk-have { color: var(--pink); cursor: default; } .sk-flag { right: auto; left: 10px; font-size: 12px; }
.sk-x, .sk-flag { opacity: 0; transition: opacity .15s; } .sk-tile:hover .sk-x, .sk-tile:hover .sk-flag, .sk-x:focus-visible, .sk-flag:focus-visible { opacity: 1; }
.sk-find { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); } .sk-find:focus-within { border-color: var(--pink); }
.sk-find input[type=search] { flex: 1; min-width: 0; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); font: inherit; font-size: 13px; outline: none; box-shadow: none; }
.sk-more { align-self: center; } .sk-msg { margin: 0; }
@media (hover: none) { .sk-x, .sk-flag { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-tile, .sk-x, .sk-flag { transition: none; } }
.th-view-note { margin: auto 0 0; padding-top: 10px; font-size: 12px; color: var(--muted); }
.vx-pane { display: flex; flex-direction: column; gap: 10px; } .vx-pane[hidden] { display: none; }
.vx-range { display: grid; grid-template-columns: 112px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 13.5px; }
.vx-range output { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; }
.vx-range input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink) var(--v, 50%), rgba(255, 255, 255, .18) var(--v, 50%)); cursor: pointer; }
.vx-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.vx-range input[type=range]:focus-visible { outline: 2px solid var(--pink); outline-offset: 5px; }
.vx-range.off { opacity: .45; }
/* View's tabs (icons), the parts to show as tiles, osu!lazer's screen scaling; on a phone a sheet from the bottom */
.vx-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.vx-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 4px 7px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s; }
.vx-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-tab .i, .vx-tile .i { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vx-tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.vx-tab.on { color: var(--text); background: rgba(255, 111, 169, .16); } .vx-tab.on .i { color: var(--pink); }
.vx-tab:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.th-view-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px 2px; } /* (the part that scrolls: the tabs and the foot stay) */
.vx-hint { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.vx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vx-tile { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 46px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; user-select: none; transition: background-color .15s, border-color .15s, color .15s; }
.vx-tile span { min-width: 0; overflow-wrap: anywhere; }
.vx-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.vx-tile:hover { border-color: rgba(255, 111, 169, .5); color: var(--text); }
.vx-tile:has(input:checked) { border-color: rgba(255, 111, 169, .7); background: rgba(255, 111, 169, .13); color: var(--text); } .vx-tile:has(input:checked) .i { color: var(--pink); }
.vx-tile:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
.vx-group { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.vx-gh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: 13.5px; }
.vx-scales { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .06); }
.vx-scales.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } /* (the resolution, the frame rate) */
.vx-scales button { min-width: 0; padding: 8px 4px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s; }
.vx-scales button:hover { color: var(--text); } .vx-scales button.on { background: var(--pink); color: #2a0a1a; }
.vx-scales button:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.vx-scale { display: flex; flex-direction: column; gap: 12px; } .vx-scale[hidden] { display: none; }
.vx-link { padding: 0; border: 0; background: none; color: var(--pink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vx-link:hover { text-decoration: underline; } .vx-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
/* the look of the player watched (skins.js): whose it is, the way back to yours; their View shown as it is meanwhile */
.vx-lent { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255, 111, 169, .45); border-radius: 12px; background: rgba(255, 111, 169, .1); }
.vx-lent[hidden] { display: none; }
.vx-lent p { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.35; } .vx-lent p b { overflow-wrap: anywhere; } .vx-lent p span { color: var(--muted); font-size: 12px; }
.vx-lent .btn { flex: none; padding: 5px 11px; font-size: 12.5px; }
.vx-tile:has(input:disabled), .vx-range:has(input:disabled), .vx-scales button:disabled, .th-view .vx-def:disabled, .th-view .vx-link:disabled, .th-view .skin-pick :disabled { opacity: .45; pointer-events: none; }
.th-view .vx-range { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "l d o" "r r r"; row-gap: 8px; column-gap: 6px; }
.th-view .vx-range > .vx-def { grid-area: d; }
/* a slider back to its value at first (shown once it is moved) */
.vx-def { display: grid; place-items: center; width: 22px; height: 22px; margin: -4px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.vx-def[hidden] { display: none; }
.vx-def .i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vx-def:hover { color: var(--text); background: rgba(255, 255, 255, .08); } .vx-def:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.th-view .vx-range > span { grid-area: l; } .th-view .vx-range > output { grid-area: o; } .th-view .vx-range > input { grid-area: r; height: 6px; }
.th-view-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.th-view-foot .th-view-note { margin: 0; padding: 0; }
@media (max-width: 640px) { /* a phone: View as a sheet from the bottom, bigger to touch */
  .th-view { top: auto; left: 0; right: 0; width: auto !important; max-height: 64vh; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 18px 18px 0 0; transform: translateY(100%); box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); }
  .vx-tile { min-height: 50px; } .th-view .vx-range > input::-webkit-slider-thumb { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .vx-tab, .vx-tile, .vx-scales button { transition: none; } }
@media (max-width: 900px) { .th.chat-on, .th.view-on { --chatw: 0px; } .th-chat, .th-view { width: min(340px, calc(88vw / var(--zall, 1))); box-shadow: -20px 0 40px rgba(0, 0, 0, .5); } }
/* a phone held upright, watching live with the chat: as Twitch's app, the picture on top (the playfield's own shape: as wide as the phone)
   and the chat under it, both at once */
@media (orientation: portrait) and (max-width: 640px) {
  .th.chat-on:not(.view-on) { --pic: calc(min(75vw, 52vh) / var(--zall, 1)); }
  .th.chat-on:not(.view-on) .th-stage { bottom: auto; height: var(--pic); }
  .th.chat-on:not(.view-on) .th-bottom { bottom: calc(100% - var(--pic)); padding-top: 22px; }
  .th.chat-on:not(.view-on) .th-top { padding-bottom: 22px; }
  .th.chat-on:not(.view-on) .th-chat { top: var(--pic); left: 0; width: auto; border-top: 1px solid rgba(255, 255, 255, .08); border-left: 0; box-shadow: none; }
}
/* a phone: the volume sliders go (its own keys set it) so every button fits, the bars thinner on a short screen; upright, a word to turn it
   sideways (where the page cannot turn it itself: watch.js), with the bars; two taps on a side: 10 s that way, marked a moment */
@media (max-width: 640px) { .th .vol-sl { display: none; } .th-ctl .th-ib { width: 34px; height: 34px; } .th-ctl-l, .th-ctl-r { gap: 2px; } }
@media (max-height: 500px) { .th-top { padding: 8px 14px 28px; } .th-bottom { gap: 6px; padding: 28px 14px 8px; } }
.th-turn { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 640px) {
  .th-rp .th-turn { position: absolute; top: 84px; left: 50%; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; transform: translateX(-50%); pointer-events: none; transition: opacity .2s var(--ease); }
  .th-rp:not(.awake) .th-turn { opacity: 0; }
  .th-turn .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}
.th-skip { position: absolute; top: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 18px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; animation: thSkip .7s ease-out both; }
.th-skip.l { left: 12%; } .th-skip.r { right: 12%; }
.th-skip .i { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes thSkip { from { opacity: 0; transform: translateY(-50%) scale(.85); } 30% { opacity: 1; transform: translateY(-50%) scale(1); } to { opacity: 0; transform: translateY(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .th-skip { animation: none; transform: translateY(-50%); } .th-turn { transition: none; } }
/* chat lines over the picture while the chat is hidden */
.th-ticker { position: absolute; left: 20px; bottom: 150px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-width: min(440px, 44%); pointer-events: none; }
.th-tick { background: rgba(0, 0, 0, .68); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; animation: thTick 6.5s var(--ease) forwards; }
.th-tick b { margin-right: 4px; }
@keyframes thTick { 0% { opacity: 0; transform: translateY(6px); } 5% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .th.sp-view, .th-tick { animation: none; } .th-stage, .th-top, .th-bottom, .th-chat, .th-view { transition: none; } }
/* replays: one row a match, the map's cover as its thumbnail */
.rp-list { display: flex; flex-direction: column; gap: 4px; }
.rp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .15s; }
.rp-row:hover, .rp-row:focus-visible { background: var(--surface); outline: none; }
.rp-thumb { position: relative; display: grid; place-items: center; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #241b1f var(--cover, none) center / cover; color: #fff; }
.rp-thumb::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); transition: background-color .15s; }
.rp-thumb .i { position: relative; width: 20px; height: 20px; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s var(--ease); }
.rp-row:hover .rp-thumb .i, .rp-row:focus-visible .rp-thumb .i { opacity: 1; transform: none; }
.rp-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rp-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-text span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-res { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); padding-right: 6px; }
@keyframes lvIn { from { opacity: 0; transform: translateY(6px); } }
/* the watch page's panels */
.wt-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; margin-bottom: 16px; }
.wt-panel .wt-sh { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wt-panel .wt-sh h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
/* the player's cards for each player (when watching everybody) and a match's result */
.th-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.th-pc { display: flex; flex-direction: column; gap: 2px; min-width: 170px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .08); }
.th-pc-h { display: flex; align-items: center; gap: 7px; font-size: 13px; } .th-pc-h span { margin-left: auto; color: rgba(255, 255, 255, .6); font-size: 12px; }
.th-pc-sc { font-family: var(--font-head); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.th-pc-n { font-size: 12px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.th-pc-n .h1 { color: #8be04b; } .th-pc-n .h5 { color: #ffc857; } .th-pc-n .hx { color: #ff5d6c; }
/* a saved replay file's own result (the game's) */
.th-pc.wt-file { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.wt-grade, .th-res b.wt-grade { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.36em; padding: 0 .24em; border-radius: .32em; font-size: 15px; } /* (its look: with the grades, by .rank-badge) */
.th-res { align-items: flex-start; gap: 6px; } .th-res b { font-size: 14px; }
.th .btn.primary { align-self: flex-start; }
/* the watch list's tabs: Friends · Matches · Everyone · Replays, underlined like a stream site's */
.wt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.wt-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: color .15s; }
.wt-tab:hover { color: var(--text); }
.wt-tab.on { color: var(--text); }
.wt-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--pink); transform: scaleX(0); transition: transform .22s var(--ease); }
.wt-tab.on::after { transform: scaleX(1); }
.wt-tab:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; border-radius: 8px; }
.wt-tab .lv-count { font-size: 11.5px; padding: 1px 7px; }
.wt-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wt-tools:empty { display: none; }
.wt-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.wt-search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.wt-search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; }
.wt-more { display: flex; justify-content: center; margin-top: 18px; }
.sp-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 18px 0 10px; }
.sp-sub:first-child { margin-top: 0; }
#wt-tools .seg-btn { padding: 7px 12px; font-size: 13px; }

/* ==== The frame: a sidebar with every section (on phones a menu that slides in), a slim top bar (search, notifications, you), the page ==== */
:root { --side-w: 244px; --top-h: 64px; }
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
.side { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; height: calc(100vh / var(--zall, 1)); padding: 16px 12px; border-right: 1px solid var(--line); background: rgba(19, 14, 13, .72); overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.side .brand { padding: 6px 10px 14px; font-size: 19px; }
.side .nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 18px 12px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.side .nav-item { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left; color: var(--muted); }
.side .nav-item .ic { width: 20px; height: 20px; }
.side .nav-item:hover { background: var(--surface); color: var(--text); }
.side .nav-item:hover .ic { animation: none; }
.side .nav-item.active { background: rgba(255, 111, 169, .14); color: var(--pink); }
.side .nav-item:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.side .nav-badge, .side .nav-item[data-badge]:not([data-badge=""])::after { margin-left: auto; }
.nav-end { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 clamp(16px, 3vw, 40px); background: rgba(22, 17, 15, .84); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .search, .topbar .search:focus-within { flex: 0 1 420px; width: auto; }
.auth { padding: 3px; border-radius: 999px; }
.menu-btn, .brand-m { display: none !important; }
.content { max-width: none; padding: 30px clamp(16px, 3vw, 40px) 80px; } /* (the whole width beside the menu: grids take more columns, long text keeps its own measure) */
.nt-pop { top: calc(var(--top-h) + 8px); }
.side-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); animation: scrimIn .2s ease-out; }
@keyframes scrimIn { from { opacity: 0; } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(290px, calc(84vw / var(--zall, 1))); height: calc(100dvh / var(--zall, 1)); background: var(--bg); box-shadow: 24px 0 60px rgba(0, 0, 0, .5); transform: translateX(-105%); transition: transform .26s var(--ease); }
  .app.side-open .side { transform: none; }
  .menu-btn { display: inline-grid !important; }
  .brand-m { display: flex !important; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .search, .topbar .search:focus-within { flex: 1 1 auto; min-width: 0; }
  .topbar-spacer { display: none; } /* (the search takes the room: it shared it with this) */
  .auth .n { display: none; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } .side-scrim { animation: none; } }

/* ==== Settings: the parts on the left (a row of chips on phones); each part is a card of rows: what it is, then its control ==== */
.stg { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1000px; }
.stg-nav { position: sticky; top: calc(var(--top-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.stg-nav a { padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; transition: background-color .15s, color .15s; }
.stg-nav a:hover { background: var(--surface); color: var(--text); }
.stg-nav a.on { background: rgba(255, 111, 169, .14); color: var(--pink); }
.stg-nav a:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.stg-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.stg-sec { scroll-margin-top: calc(var(--top-h) + 24px); }
.stg-head { margin-bottom: 12px; }
.stg-head h2 { margin: 0; font-size: 22px; }
.stg-head p { margin: 4px 0 0; font-size: 14.5px; max-width: 65ch; }
.stg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.stg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px; }
.stg-row + .stg-row { border-top: 1px solid var(--line); }
label.stg-row { cursor: pointer; }
.stg-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stg-l b { font-size: 15.5px; font-weight: 700; }
.stg-l small { color: var(--muted); font-size: 13.5px; line-height: 1.45; max-width: 60ch; }
.stg-c { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: none; max-width: 100%; }
.stg-row.stack { flex-direction: column; align-items: stretch; }
.stg-row.stack .stg-c { justify-content: flex-start; }
.stg-me .stg-l { flex-direction: row; align-items: center; gap: 14px; }
.stg-me img { width: 48px; height: 48px; flex: none; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.stg-me .stg-l span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stg-me .stg-l b { font-family: var(--font-head); font-size: 19px; }
.stg-row.danger .stg-l b { color: #ff9aa8; }
/* osu!bridge Plus (plus.js): Free and Plus side by side, the Plus column lit */
a.pf-prem { text-decoration: none; }
.plus-you { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 600; } .plus-you .pf-prem { margin-left: 0; }
.plus-card { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.plus-cmp { width: 100%; border-collapse: collapse; }
.plus-cmp th, .plus-cmp td { padding: 14px 18px; text-align: center; vertical-align: middle; }
.plus-cmp thead th { font-size: 14px; font-weight: 800; color: var(--muted); } .plus-cmp thead .pf-prem { margin-left: 0; }
.plus-cmp tbody tr + tr > * { border-top: 1px solid var(--line); }
.plus-cmp tbody th { display: flex; flex-direction: column; gap: 3px; text-align: left; font-weight: 400; }
.plus-cmp tbody th b { font-size: 15.5px; font-weight: 700; } .plus-cmp tbody th small { color: var(--muted); font-size: 13.5px; line-height: 1.45; max-width: 52ch; }
.plus-cmp td { width: 22%; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus-cmp .plus-col { background: rgba(255, 111, 169, .07); color: var(--text); }
.plus-y { color: var(--accent); font-size: 18px; } .plus-n { color: var(--muted); }
/* the Plus page's pictures: your profile with Plus (your name and picture), then a little picture of each thing Plus adds */
.pp { position: relative; overflow: hidden; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.pp-banner { position: relative; height: 120px; overflow: hidden; background: linear-gradient(120deg, #ff66aa, #8a5cff 55%, #66ccff); }
.pp-banner i { position: absolute; width: 60px; height: 60px; border: 4px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 0 0 8px rgba(255, 255, 255, .14); }
.pp-banner .c1 { left: 12%; top: 24px; } .pp-banner .c2 { left: 47%; top: 46px; width: 46px; height: 46px; } .pp-banner .c3 { left: 79%; top: 16px; width: 54px; height: 54px; }
.pp-main { position: relative; display: flex; align-items: flex-end; gap: 14px; margin-top: -34px; padding: 0 22px; }
.pp-av { flex: none; width: 76px; height: 76px; border-radius: 20px; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 4px var(--panel); }
.pp-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding-bottom: 6px; } .pp-who .pf-prem { margin-left: 0; }
.pp-name, .pv-name { font-family: var(--font-head); background: linear-gradient(90deg, #66ccff, #ff66aa 55%, #ffc857); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.pp-name { font-size: 26px; } .pv-name { font-size: 28px; }
.pp-parts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; padding: 16px 22px 20px; }
.pp-me, .pp-sec { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pp-me > span { color: var(--muted); font-size: 14px; } .pp-me em { font-style: normal; font-weight: 700; } .pp-me .c-blue { color: #66ccff; } .pp-me .c-pink { color: #ff66aa; }
.pp-rpl { display: flex; gap: 6px; } .pp-rpl i { flex: 1; height: 38px; border-radius: 8px; background: linear-gradient(135deg, #3b2a33, #2a2026); }
.plus-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0 0 8px; }
.plus-f { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: border-color .2s, transform .22s var(--ease); }
.plus-f:hover { border-color: rgba(255, 111, 169, .45); transform: translateY(-3px); }
.plus-f h3 { margin: 6px 0 0; font-size: 16.5px; } .plus-f p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.plus-prev { display: grid; place-items: center; height: 108px; overflow: hidden; border-radius: 14px; background: var(--surface); }
.pv-prof { position: relative; width: 150px; height: 84px; overflow: hidden; border-radius: 10px; background: linear-gradient(rgba(22, 17, 15, .5), rgba(22, 17, 15, .78)), linear-gradient(45deg, #2b3a5c, #5c2b4a); }
.pv-prof .b { position: absolute; inset: 0 0 auto; height: 34px; background: linear-gradient(120deg, #ff66aa, #8a5cff 60%, #66ccff); }
.pv-prof .a { position: absolute; left: 10px; top: 22px; width: 26px; height: 26px; border-radius: 8px; background: #ffc857; box-shadow: 0 0 0 2px var(--surface); }
.pv-prof .l1, .pv-prof .l2 { position: absolute; left: 10px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .35); } .pv-prof .l1 { top: 56px; width: 90px; } .pv-prof .l2 { top: 68px; width: 64px; }
.pv-me { display: flex; flex-direction: column; gap: 6px; width: 160px; } .pv-me b { font-size: 14px; } .pv-me i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.pv-me .pink { background: rgba(255, 102, 170, .75); } .pv-me .w70 { width: 70%; } .pv-me .w90 { width: 90%; } .pv-me .w50 { width: 50%; }
.pv-lay { display: flex; flex-direction: column; gap: 4px; width: 170px; } .pv-lay i { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 11.5px; font-style: normal; } .pv-lay .off { opacity: .35; text-decoration: line-through; }
.pv-room { display: flex; flex-direction: column; gap: 12px; width: 180px; } .pv-room > span { display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; gap: 8px; }
.pv-room i { position: relative; height: 10px; overflow: hidden; border-radius: 5px; background: var(--surface-2); }
.pv-room i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 5px; background: var(--muted); } .pv-room .on i::after { background: linear-gradient(90deg, #ffc857, #ff9ac4); }
.pv-room small, .pv-hz small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.pv-hz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: 100%; padding: 0 10px; } .pv-hz > span { display: flex; flex-direction: column; align-items: center; gap: 2px; } .pv-hz svg { width: 100%; height: auto; }
.pv-hz .pc-true { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 7; stroke-linecap: round; } .pv-hz .pc-got { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; } .pv-hz circle { fill: var(--muted); }
.pv-hz .on .pc-got { stroke: #ff9ac4; } .pv-hz .on circle { fill: #ffc857; }
.pv-br { width: 156px; height: 84px; } .pv-br path { fill: none; stroke: var(--muted); stroke-width: 1.6; } .pv-br rect { fill: var(--surface-2); } .pv-br .win { fill: #ffc857; }
.pv-pats { display: flex; gap: 8px; } .pv-pats i { width: 58px; height: 74px; padding: 0; border-radius: 12px; }
.pv-rooms { display: grid; grid-template-columns: repeat(5, 22px); gap: 6px; } .pv-rooms i { height: 22px; border-radius: 6px; background: linear-gradient(135deg, #ffc857, #ff9ac4); } .pv-rooms .free { background: var(--muted); }
@media (max-width: 640px) { .pp-parts { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .plus-f { transition: none; } .plus-f:hover { transform: none; } }
.plus-h { margin: 28px 0 10px; font-size: 18px; }
.plus-both { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; margin: 0 0 18px; padding-left: 20px; color: var(--muted); line-height: 1.5; }
@media (max-width: 560px) { .plus-cmp th, .plus-cmp td { padding: 12px 10px; } .plus-cmp td { white-space: normal; } }
.stg-c .btn.danger { width: auto; }
.stg-wide .skin-pick { margin: 0 !important; }
#set-skin, #set-sound { min-width: 0; } #set-sound .vol { flex-wrap: wrap; } /* (a long skin name ends in "…", the sliders go under each other: not wider than a phone) */
/* a switch */
.tgl { position: relative; display: inline-flex; flex: none; }
.tgl input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.tgl i { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background-color .2s var(--ease), border-color .2s; }
.tgl i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .22s var(--ease), background-color .2s; }
.tgl input:checked + i { background: var(--pink); border-color: var(--pink); }
.tgl input:checked + i::after { transform: translateX(18px); background: #2a0a1a; }
.tgl input:focus-visible + i { outline: 2px solid var(--pink); outline-offset: 2px; }
/* one of a few */
.seg2 { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg2 button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 10px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg2 button:hover { color: var(--text); }
.seg2 button.on { background: var(--pink); color: #2a0a1a; }
.seg2 button:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.st-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #5dd68a; }
.st-dot.st-dnd { background: #ff5d6c; } .st-dot.st-brb { background: #ffc857; } .st-dot.st-invisible { background: #8b8b93; }
.seg2 button.on .st-dot { box-shadow: 0 0 0 2px rgba(42, 10, 26, .4); }
/* text size, plan */
.stg-range { display: flex; align-items: center; gap: 12px; width: 260px; max-width: 100%; }
.stg-range output { min-width: 40px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.stg-chip { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; }
.stg-chip.on { background: rgba(255, 200, 87, .14); border-color: rgba(255, 200, 87, .45); color: var(--gold); }
.stg-use { display: flex; align-items: center; gap: 12px; width: 300px; max-width: 100%; }
.stg-use i { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stg-use i b { display: block; height: 100%; border-radius: 999px; background: var(--pink); }
.stg-use em { min-width: 92px; font-style: normal; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 900px) {
  .stg { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .stg-nav { top: var(--top-h); z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 10px 16px; background: rgba(22, 17, 15, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .stg-nav::-webkit-scrollbar { display: none; }
  .stg-nav a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; }
  .stg-sec { scroll-margin-top: calc(var(--top-h) + 70px); }
}
@media (max-width: 600px) {
  .stg-row { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .stg-c { justify-content: flex-start; }
  label.stg-row { flex-direction: row; align-items: center; }
  .stg-use, .stg-range { width: 100%; }
}
/* room page: the number of maps on the Beatmaps button */
.btn-n { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.btn-n:empty { display: none; }
#maps-toggle.on .btn-n { background: rgba(42, 10, 26, .22); color: inherit; }

/* ==== Empty pages, room cards with their map's cover, your own home page, the feature tiles, page headers, phones ==== */
/* a page with nothing in it yet: what is missing and what to do about it (the Watch lists' empty state matches) */
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px 34px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 22px; background: rgba(255, 255, 255, .015); animation: rise .45s var(--ease-dec) both; }
.empty-state > .ic, .lv-empty .i { width: 26px; height: 26px; padding: 13px; box-sizing: content-box; margin-bottom: 6px; border-radius: 18px; color: var(--pink); background: rgba(255, 111, 169, .12); }
.empty-state > b, .lv-empty b { color: var(--text); font-family: var(--font-head); font-size: 18px; letter-spacing: -0.01em; }
.empty-state > p { margin: 0; max-width: 46ch; font-size: 14.5px; line-height: 1.5; text-wrap: pretty; }
.es-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
#view-runs .empty-state, #view-ranked .empty-state { max-width: 920px; }

/* room cards: the cover of the room's first map on top (no cover: hit circles), then who and what */
.room-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: var(--panel); }
.room-card.is-active { border-color: rgba(255, 111, 169, .6); box-shadow: 0 0 0 1px rgba(255, 111, 169, .3); }
.rc-cover { position: relative; flex: none; height: 96px; background: linear-gradient(180deg, transparent 35%, rgba(22, 17, 15, .72)), var(--cover) center / cover, #2a2024; }
.rc-cover.plain { background: radial-gradient(circle at 26% 46%, rgba(255, 111, 169, .34) 0 15px, transparent 16px), radial-gradient(circle at 26% 46%, transparent 0 21px, rgba(255, 111, 169, .5) 22px 24px, transparent 25px),
  radial-gradient(circle at 64% 60%, rgba(102, 204, 255, .24) 0 11px, transparent 12px), radial-gradient(circle at 64% 60%, transparent 0 16px, rgba(102, 204, 255, .4) 17px 18.5px, transparent 19.5px), linear-gradient(140deg, #2c1e28, #17111a 75%); }
.rc-maps { position: absolute; right: 10px; bottom: 10px; padding: 2px 9px; border-radius: 99px; background: rgba(10, 8, 9, .74); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; padding: 12px 16px 14px; }
.room-card .rc-title { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-family: var(--font-head); font-size: 18px; font-weight: 700; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .rc-title:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.room-card .rc-owner { flex-wrap: wrap; gap: 6px; margin: 0; font-size: 13.5px; }
.room-card .rc-owner img { width: 20px; height: 20px; border-radius: 7px; }
.rc-sep { opacity: .55; }
.room-card .rc-rules { margin: 0; }
.room-card .rc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.room-card .rc-actions .code-chip { margin-right: auto; }
.room-card .rc-actions .btn .ic { width: 15px; height: 15px; }

/* your home page when signed in: you, your rooms, your friends (instead of the introduction) */
html:not(.signed-in) .hub, html.signed-in .l-hero { display: none; }
.hub { margin: 4px 0 44px; animation: rise .5s var(--ease-dec) both; }
.hub-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.hub-av { width: 64px; height: 64px; flex: none; border-radius: 20px; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255, 111, 169, .55); }
.hub-id { flex: 1; min-width: 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hub-id h1 { font-size: clamp(26px, 3vw, 36px); text-wrap: balance; }
.hub-st { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .2s, background-color .2s; }
.hub-st:hover { border-color: var(--pink); } .hub-st:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.hub-st-v { color: var(--muted); font-weight: 500; } .hub-st-v::before { content: '·'; margin-right: 8px; }
.hub-st .ic { width: 15px; height: 15px; color: var(--muted); }
.hub-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.hub .l-live-h h2 { display: flex; align-items: center; gap: 8px; }
html.signed-in .landing { max-width: none; } /* (yours: the whole width, as the Replays page) */
.hub-replays.is-empty { display: block; }
.hub-friends { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; }
.hub-friends.is-empty { padding: 0; background: none; border: 0; }
.hf { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 16px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s, opacity .15s; }
.hf:hover, .hf:focus-visible { background: var(--surface); outline: none; }
.hf-av { position: relative; flex: none; width: 40px; height: 40px; }
.hf-av img { display: block; width: 100%; height: 100%; border-radius: 13px; object-fit: cover; background: var(--surface-2); }
.hf-av i { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--panel); background: #6b5b63; transition: border-color .15s; }
.hf:hover .hf-av i, .hf:focus-visible .hf-av i { border-color: var(--surface); }
.hf.on .hf-av i { background: #5dd68a; } .hf.play .hf-av i { background: var(--pink); } .hf.dnd .hf-av i { background: #ff5d6c; } .hf.brb .hf-av i { background: #ffc857; }
.hf-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hf-t b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-t small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf.play small { color: var(--pink); }
.hf.off { opacity: .6; } .hf.off:hover, .hf.off:focus-visible { opacity: 1; }
@media (max-width: 1000px) { .hub-grid { grid-template-columns: minmax(0, 1fr); } }

/* the home page's feature tiles: the two big ones show what they are about, the four small ones sit under them */
.l-bits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.l-bits article:not(.lb-big) { flex-direction: column; gap: 12px; }
.l-bits .lb-big { grid-column: span 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; column-gap: 14px; padding: 22px; }
.l-bits .lb-big h3 { font-size: 21px; }
.l-bits .lb-big p { max-width: 34ch; }
.lb-tiers { display: flex; align-items: flex-end; gap: 9px; align-self: end; height: 92px; padding: 0 4px 4px 8px; }
.lb-tiers i { --k: 0; flex: none; width: 13px; height: 13px; margin-bottom: calc(var(--k) * 9px); border-radius: 3px; transform: rotate(45deg); background: var(--tc); box-shadow: 0 0 12px var(--tc); transition: transform .35s var(--ease); transition-delay: calc(var(--k) * 30ms); }
.lb-tiers i:nth-child(2) { --k: 1; } .lb-tiers i:nth-child(3) { --k: 2; } .lb-tiers i:nth-child(4) { --k: 3; } .lb-tiers i:nth-child(5) { --k: 4; } .lb-tiers i:nth-child(6) { --k: 5; } .lb-tiers i:nth-child(7) { --k: 6; }
.lb-tiers i:nth-child(8) { --k: 7; width: 17px; height: 17px; }
.l-bits .lb-big:hover .lb-tiers i { transform: translateY(-4px) rotate(45deg); }
.lb-play { position: relative; align-self: center; width: 196px; height: 110px; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 30%, #2a1d26, #110c10 78%); }
.lb-play i { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2.5px solid #fff; background: rgba(255, 111, 169, .85); box-shadow: 0 0 0 5px rgba(255, 111, 169, .16); }
.lb-play .c1 { left: 24%; top: 64%; } .lb-play .c3 { left: 80%; top: 62%; }
.lb-play .c2 { left: 52%; top: 36%; background: rgba(102, 204, 255, .85); box-shadow: 0 0 0 5px rgba(102, 204, 255, .16); }
.lb-play b { position: absolute; inset: 0; animation: lbCursor 3.6s cubic-bezier(.45, 0, .25, 1) infinite; }
.lb-play b::after { content: ''; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: #ffe7a3; box-shadow: 0 0 0 3px rgba(255, 200, 87, .3), 0 0 14px #ffc857; }
@keyframes lbCursor { 0%, 12% { transform: translate(24%, 64%); } 33%, 45% { transform: translate(52%, 36%); } 66%, 78% { transform: translate(80%, 62%); } 100% { transform: translate(24%, 64%); } }
@media (max-width: 980px) { .l-bits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .l-bits { grid-template-columns: minmax(0, 1fr); }
  .l-bits .lb-big { grid-column: auto; grid-template-columns: auto minmax(0, 1fr); }
  .lb-tiers, .lb-play { grid-column: 1 / -1; justify-self: start; margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .lb-play b { animation: none; transform: translate(52%, 36%); } .lb-tiers i { transition: none; } }
/* the home page's replays (watch.js plays one dropped anywhere): what they do, and a big button that picks one */
.l-rep { margin: 0 0 52px; }
.l-rep-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 14px 32px; align-items: center; margin-bottom: 18px; }
.l-rep-head h2 { grid-column: 1 / -1; margin: 0; font-family: var(--font-head); font-size: 26px; text-wrap: balance; }
.l-rep-head .lead { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.l-rep-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 18px; border: 2px dashed rgba(255, 111, 169, .55); border-radius: 24px; background: rgba(255, 111, 169, .06); color: var(--text); font: inherit; text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s, transform .22s var(--ease); }
.l-rep-drop:hover { border-color: var(--pink); background: rgba(255, 111, 169, .11); transform: translateY(-2px); }
.l-rep-drop:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.l-rep-drop .ic { width: 30px; height: 30px; color: var(--pink); }
.l-rep-drop b { font-size: 17px; } .l-rep-drop span { color: var(--muted); font-size: 13.5px; }
.l-bits.l-rep-bits { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
@media (max-width: 980px) { .l-bits.l-rep-bits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .l-rep-head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .l-bits.l-rep-bits { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .l-rep-drop { transition: none; } .l-rep-drop:hover { transform: none; } }
/* the introduction's preview: tall enough that every slide fits inside its frame */
.ls-stage { min-height: 384px; }

/* page headers: a page's own button sits level with its title */
.view-head.row-head, .tn-head { align-items: flex-start; }
.view-head.row-head > .btn, .tn-head-acts { margin-top: 3px; }
/* tournaments: search, the stage filter (the same kind of control as every other filter) and a code */
.tn-bar input[type=search] { flex: 1 1 220px; width: auto; max-width: 340px; }
.tn-bar .seg { flex: none; }
/* a profile's buttons are one size; the admin's premium box is a proper box */
.pf-acts .btn { justify-content: center; }
.pf-admin { padding: 12px 16px; border-radius: 18px; background: rgba(255, 200, 87, .05); }

/* phones */
@media (max-width: 700px) {
  .tn-bar input[type=search] { max-width: none; flex-basis: 100%; }
  .tn-bar .seg { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tn-bar .seg::-webkit-scrollbar { display: none; }
  .tn-bar .seg-btn { flex: none; white-space: nowrap; }
  .tn-code { width: 100%; margin-left: 0; } .tn-code input { flex: 1; width: auto; min-width: 0; }
}
@media (max-width: 620px) { .l-bits article:not(.lb-big) { flex-direction: row; gap: 14px; } }
@media (max-width: 560px) {
  .lb-bar { flex-wrap: nowrap; gap: 8px; }
  .lb-tabs { flex: 1; min-width: 0; flex-wrap: nowrap; gap: 4px; } .lb-tab { flex: none; padding: 7px 9px; font-size: 13px; }
  .live-dot { flex: none; width: 9px; height: 9px; overflow: hidden; border-radius: 50%; background: #ff5e6b; color: transparent; font-size: 0; } /* just the dot: the room updates by itself */
  .leaderboard .lb-row { gap: 10px; padding: 10px 12px; }
  .leaderboard .lb-avatar { width: 38px; height: 38px; border-radius: 12px; }
  .leaderboard .lb-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .leaderboard .lb-sub { display: none; }
  .hub-acts { width: 100%; } .hub-acts .btn { flex: 1 1 auto; justify-content: center; }
}

/* ================= Replays (replays.js): your replays, their room, and the player's extras for them (watch.js) ================= */
.rpl-room { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: min(320px, 100%); }
.rpl-meter { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rpl-meter i { flex: 1; height: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.rpl-meter b { display: block; height: 100%; background: var(--pink); border-radius: inherit; transition: width .3s var(--ease); }
.rpl-meter.over b { background: #ff7a7a; } .rpl-meter.over span { color: #ff9a9a; font-weight: 700; }
.rpl-warn { margin: 0; max-width: 46ch; font-size: 13px; color: #ffb3b3; text-align: right; text-wrap: pretty; }
#rpl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; } #rpl-tools:empty { display: none; }
.rpl-staronly { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); }
.rpl-staronly .i { width: 15px; height: 15px; } .rpl-staronly.active .i { fill: currentColor; }
.rpl { display: flex; align-items: center; gap: 6px; border-radius: 12px; transition: background-color .15s; }
.rpl:hover, .rpl:focus-within { background: var(--surface); }
.rpl .rp-row { flex: 1; min-width: 0; } .rpl .rp-row:hover, .rpl .rp-row:focus-visible { background: none; }
.rpl-kind { position: absolute; left: 4px; bottom: 4px; z-index: 1; padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .02em; background: rgba(0, 0, 0, .7); color: #fff; }
.rpl-kind.k-ranked { color: var(--gold); } .rpl-kind.k-run { color: #8fd8ff; } .rpl-kind.k-clip { color: var(--pink); }
/* your replay's buttons, the same on every card: who may watch it (left), the star of a match replay, ⋮ (always last: a file's star place stays empty) */
.rpl-acts { display: grid; grid-template-columns: auto minmax(0, 1fr) 34px 34px; align-items: center; column-gap: 2px; padding-right: 8px; flex: none; }
.rpl-acts .rpl-vis { grid-column: 1; } .rpl-acts [data-rpl-star] { grid-column: 3; } .rpl-acts [data-rpl-menu] { grid-column: 4; }
.rpl-ib { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.rpl-ib .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rpl-ib:hover, .rpl-ib:focus-visible, .rpl-ib[aria-expanded="true"] { background: var(--panel); color: var(--text); outline: none; }
.rpl-ib.on { color: var(--gold); } .rpl-ib.on .i { fill: currentColor; }
.rpl-vis { display: inline-flex; align-items: center; gap: 6px; height: 32px; max-width: 100%; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s; }
.rpl-vis:hover, .rpl-vis[aria-expanded="true"] { background: var(--surface-2); border-color: rgba(255, 255, 255, .2); }
.rpl-vis:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.rpl-vis .i { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rpl-vis .i:last-child { width: 14px; height: 14px; color: var(--muted); transition: transform .15s var(--ease); } .rpl-vis[aria-expanded="true"] .i:last-child { transform: rotate(180deg); }
/* its menu: over everything, by its button (replays.js places it) */
.rpl-menu { position: fixed; z-index: 100; width: max-content; min-width: 200px; max-width: min(300px, calc(100vw / var(--zall, 1) - 16px)); padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); animation: popIn .16s var(--ease-dec); }
.rpl-mi { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.rpl-mi:hover, .rpl-mi:focus-visible { background: var(--surface-2); outline: none; }
.rpl-mi .i { flex: none; width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.rpl-mi span { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.rpl-mi b { font-weight: 700; } .rpl-mi small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.rpl-mi[aria-checked="true"] .i { color: var(--pink); }
.rpl-mi.danger, .rpl-mi.danger .i { color: #ff8a8a; }
/* a replay not everyone may watch, on someone's channel or a friend's: marked on its picture */
.rpl-vis-chip { position: absolute; right: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
.rpl-vis-chip .i { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .rpl-menu { animation: none; } .rpl-vis .i:last-child { transition: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .rpl { flex-wrap: wrap; } .rpl-acts { width: 100%; justify-content: flex-end; padding: 0 8px 8px; } .rpl-room { align-items: stretch; } .rpl-warn { text-align: left; }
  .rpl-filters { flex-wrap: nowrap; max-width: 100%; } #rpl-kind { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } /* (the kinds in one row that slides) */
  #rpl-kind::-webkit-scrollbar { display: none; } #rpl-kind .seg-btn { flex: none; }
  .rpl-right { width: 100%; margin-left: 0; } .rpl-q { flex: 1 1 100%; min-width: 0; }
}
/* the Replays page, as a video site has it: no box around it, the tabs and a bar to find and order them over a grid of cards; your room in a
   card with the upload (with yours) */
#view-replays > .wt-panel { background: none; border: 0; border-radius: 0; padding: 0; }
.rpl-roomcard { display: flex; flex-direction: column; gap: 10px; width: min(380px, 100%); padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.rpl-roomhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .rpl-roomhead b { font-family: var(--font-head); font-size: 15px; }
.rpl-roomhead .btn { display: inline-flex; align-items: center; gap: 6px; } .rpl-roomhead .btn .i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rpl-roomcard .rpl-meter { font-size: 14px; font-weight: 700; color: var(--text); } .rpl-roomcard .rpl-meter i { height: 10px; }
.rpl-roomnote { color: var(--muted); font-size: 12px; }
.rpl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .rpl-filters:empty { display: none; }
.rpl-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.rpl-q { min-width: 270px; } .rpl-q .i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rpl-shot .rpl-grade { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 16px; background-color: rgba(0, 0, 0, .6); } /* (a file's grade: the chip every grade has) */
.rpl-sort { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface); color: var(--text); font: inherit; font-size: 14px; color-scheme: dark; cursor: pointer; }
.rpl-views .seg-btn { display: grid; place-items: center; padding: 6px 9px; } .rpl-views .i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 30px 18px; }
.rpl.rpl-card { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; min-width: 0; background: none; } /* (a long word or line cannot widen it, nor the page: not wrapped as a list's row is on a phone) */
.rpl-shot { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #241b1f; color: #fff; cursor: pointer; }
.rpl-img { position: absolute; inset: 0; background: var(--cover, none) center / cover; transition: transform .35s var(--ease); }
.rpl-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55)); transition: background-color .15s; }
.rpl-shot:hover .rpl-img, .rpl-shot:focus-visible .rpl-img { transform: scale(1.05); } .rpl-shot:hover::after { background-color: rgba(0, 0, 0, .2); }
/* a speedrun's picture (replays.js runShot): its maps' covers cut side by side on a slant (each slice's slant meets the next one's), and the
   app's speedrun timer over them as it stood at the end (its look: the player's timer, .rl-timer) */
.rpl-runs { position: absolute; inset: 0; overflow: hidden; background: #120d10; transition: transform .35s var(--ease); --sl: 26px; }
.rpl-runs i { position: absolute; top: 0; bottom: 0; left: calc(var(--k) * (100% - var(--sl)) / var(--n)); width: calc((100% - var(--sl)) / var(--n) + var(--sl)); background: #241b1f var(--cover, none) center / cover;
  clip-path: polygon(calc(var(--sl) + 2px) 0, 100% 0, calc(100% - var(--sl)) 100%, 2px 100%); }
.rpl-runs i:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - var(--sl)) 100%, 0 100%); } .rpl-runs i:last-child { clip-path: polygon(calc(var(--sl) + 2px) 0, 100% 0, 100% 100%, 2px 100%); }
.rpl-runs i:only-child { clip-path: none; }
.rpl-shot:hover .rpl-runs, .rpl-shot:focus-visible .rpl-runs { transform: scale(1.05); } .rp-thumb .rpl-runs { --sl: 10px; } .th-pv-bg .rpl-runs { --sl: 7vw; }
.rpl-rt { position: absolute; top: 50%; left: 50%; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 44%; padding: 6px 14px 7px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(21, 15, 19, .9); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); color: var(--text); transform: translate(-50%, -50%); transition: opacity .15s; pointer-events: none; }
.rpl-rt-h { font-size: 11px; font-weight: 700; white-space: nowrap; }
.rpl-rt-t { font-size: clamp(18px, 1.9vw, 26px); font-weight: 800; line-height: 1.15; color: #9be89b; font-variant-numeric: tabular-nums; }
.rpl-rt-pp { color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; } .rpl-rt-pp b { color: var(--gold); }
.rpl-shot:hover .rpl-rt, .rpl-shot:focus-visible .rpl-rt { opacity: 0; } /* (the play button in its place) */
.rpl-shot:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.rpl-shot > .i { position: relative; z-index: 1; width: 34px; height: 34px; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s var(--ease); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.rpl-shot:hover > .i, .rpl-shot:focus-visible > .i { opacity: 1; transform: none; }
.rpl-shot .rpl-kind { left: 8px; bottom: 8px; z-index: 2; }
.rpl-len { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .7); font-size: 11px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
/* what a replay's picture says: a speedrun's place on its leaderboard now (top left); a replay file's info row (bottom left: its map's status, its
   pp or score, its place on its map, or what its uploader chose); 1st, 2nd and 3rd in gold, silver and bronze */
.rpl-place { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpl-place.p1 { background: #ffd15c; color: #1a1206; } .rpl-place.p2 { background: #dfe3ea; color: #15171b; } .rpl-place.p3 { background: #e0a26b; color: #1b1009; }
.rp-thumb .rpl-place { left: 4px; top: 4px; padding: 1px 5px; font-size: 10.5px; }
.rpl-info { position: absolute; left: 8px; right: 64px; bottom: 8px; z-index: 2; display: flex; flex-wrap: wrap-reverse; align-items: flex-end; gap: 4px; pointer-events: none; }
.rpl-info > i, .rpl-info > .rpl-place { position: static; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpl-info > .rpl-place.p1 { background: #ffd15c; color: #1a1206; } .rpl-info > .rpl-place.p2 { background: #dfe3ea; color: #15171b; } .rpl-info > .rpl-place.p3 { background: #e0a26b; color: #1b1009; }
.rpl-shot .rpl-info .rpl-kind { position: static; }
.rpl-st.st-ranked, .rpl-st.st-approved { color: #b3ff66; } .rpl-st.st-qualified { color: #66ccff; } .rpl-st.st-loved { color: #ff66ab; } .rpl-st.st-pending, .rpl-st.st-wip { color: #ffd966; } .rpl-st.st-graveyard { color: #b8b0b4; }
/* a card's words: whose it is (their picture beside them, their name under the title: to their channel), what it was, how many watched it
   and when; more cards coming as the page scrolls down */
.rpl-meta { display: flex; flex: 1; gap: 12px; min-width: 0; }
.rpl-av { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.rpl-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rpl-body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px; }
.rpl-title { margin-bottom: 2px; font-size: 15px; font-weight: 700; line-height: 1.35; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rpl-chan { align-self: flex-start; max-width: 100%; overflow: hidden; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.rpl-chan:hover { color: var(--text); } .rpl-chan:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
.rpl-by a { color: inherit; font-weight: 700; text-decoration: none; } .rpl-by a:hover { color: var(--text); text-decoration: underline; } /* (someone else's play: who put it up) */
.rpl-about, .rpl-seen { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpl-next { display: grid; place-items: center; padding: 26px 0 10px; }
.rpl-spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--pink); border-radius: 50%; animation: rpl-spin .8s linear infinite; }
@keyframes rpl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rpl-spin { animation-duration: 2.4s; } }
.rpl-card .rpl-acts { margin-top: auto; padding: 6px 0 0; } /* (at the card's foot: in line with the cards beside it) */
#view-replays.rpl-dropping .wt-panel { outline: 2px dashed var(--pink); outline-offset: 6px; background: rgba(255, 111, 169, .05); }
@media (prefers-reduced-motion: reduce) { .rpl-img, .rpl-runs, .rpl-shot > .i { transition: none; } }

/* the player's board on the left (who leads; a speedrun's clock and maps), the moment between rounds, and the timeline's ticks */
.th-board { position: absolute; left: 16px; top: 50%; z-index: 1; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; width: min(240px, 26%); pointer-events: none; }
.th-board:empty { display: none; }
.tb-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .55); }
.tb-h b { font-family: var(--font-head); font-size: 22px; font-variant-numeric: tabular-nums; } .tb-h span { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-r { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, .45); font-size: 13px; }
.tb-r i { font-style: normal; color: rgba(255, 255, 255, .55); font-weight: 800; font-variant-numeric: tabular-nums; }
.tb-r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c, #fff); font-weight: 700; }
.tb-r b { font-variant-numeric: tabular-nums; } .tb-r small { grid-column: 2 / 4; color: rgba(255, 255, 255, .6); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tb-r.on { background: rgba(255, 255, 255, .14); } .tb-r.past { opacity: .55; } .th-board .tb-r.on span { color: #fff; }
.tb-hp { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .55); }
.tb-hpr span { display: block; font-size: 12px; color: rgba(255, 255, 255, .75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-hpr i { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.tb-hpr b { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.tb-hpr.t1 b { background: var(--pink); } .tb-hpr.t2 b { background: #66ccff; }
.th-moment { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 28px; border-radius: 18px; background: rgba(10, 8, 12, .78); text-align: center; pointer-events: none; animation: tmIn .3s var(--ease-dec, ease) both; }
.th-moment b { font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 30px); } .th-moment span { font-size: 15px; color: rgba(255, 255, 255, .85); } .th-moment span i { font-style: normal; color: rgba(255, 255, 255, .5); }
.th-moment small { color: rgba(255, 255, 255, .6); }
/* a speedrun replay made of its plays' replay files: its timer and maps beside the picture, its moments over it: reel.css (the same in the app) */
@keyframes tmIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); } }
.th-tick.th-mark { background: rgba(255, 102, 170, .22); border: 1px solid rgba(255, 102, 170, .35); animation-duration: 4s; }
.th-run { font-family: var(--font-body, inherit); font-size: .7em; font-weight: 600; color: var(--gold); margin-left: 6px; }
.wt-track { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.wt-track input[type=range] { flex: 1; }
.wt-ticks { position: absolute; left: 7px; right: 7px; top: 50%; height: 0; pointer-events: none; }
.wt-ticks i { position: absolute; top: -6px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: rgba(255, 255, 255, .55); }
/* a clip being cut (watch.js), as the app has it: its part on the timeline between two handles, and its bar over the timeline */
.wt-lane { position: absolute; left: 7px; right: 7px; top: 50%; height: 0; pointer-events: none; } /* (where the knob's middle runs) */
.wt-clip { position: absolute; top: -10px; height: 20px; border-radius: 6px; background: rgba(255, 102, 170, .2); box-shadow: inset 0 0 0 2px var(--pink); }
.wt-hd { position: absolute; top: -4px; bottom: -4px; width: 12px; padding: 0; border: 0; border-radius: 5px; background: var(--pink); box-shadow: 0 0 0 2px #050405; cursor: ew-resize; pointer-events: auto; touch-action: none; }
.wt-hd[data-hd="a"] { left: -6px; } .wt-hd[data-hd="b"] { right: -6px; }
.wt-hd::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; border-radius: 1px; background: rgba(26, 13, 20, .55); }
.wt-hd:hover { filter: brightness(1.1); } .wt-hd:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.th-clip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border-radius: 12px; background: rgba(255, 102, 170, .1); border: 1px solid rgba(255, 102, 170, .3); }
.th-clip-t { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; padding-left: 4px; font-size: 13.5px; font-variant-numeric: tabular-nums; } .th-clip-t .i { width: 18px; height: 18px; color: var(--pink); }
#wt-clipname { width: 190px; height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 13.5px; }
#wt-clipname::placeholder { color: rgba(255, 255, 255, .55); } #wt-clipname:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.th-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .15s, filter .15s; }
.th-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); } .th-btn:disabled { opacity: .6; cursor: default; }
.th-btn.main { background: var(--pink); color: #1a0d14; } .th-btn.main:hover:not(:disabled) { background: var(--pink); filter: brightness(1.08); }
.th-btn .i { width: 18px; height: 18px; } .th-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
@media (max-width: 760px) { #wt-clipname { flex: 1 1 100%; width: auto; } }
@media (prefers-reduced-motion: reduce) { .th-moment { animation: none; } .tb-hpr b, .rpl-meter b { transition: none; } }

/* where to watch: asked once (watch.js), then remembered */
/* a replay file carried over any page (watch.js): dropped anywhere, it plays at once (over the player too; under a question) */
.osr-drop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 24px; background: rgba(12, 8, 10, .74); pointer-events: none; animation: fade .15s ease; }
.osr-drop[hidden] { display: none; }
.osr-drop-c { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 52px; border: 2px dashed rgba(255, 111, 169, .75); border-radius: 26px; background: rgba(255, 111, 169, .08); text-align: center; }
.osr-drop-c .i { width: 46px; height: 46px; color: var(--pink); }
.osr-drop-c b { font-size: 22px; } .osr-drop-c span { color: var(--muted); }
/* a speedrun's replay, from the leaderboard and the run's page */
.rb-watch { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 8px; padding: 0 0 0 2px; border: 0; border-radius: 50%; background: var(--pink); color: #2a0a1a; font-size: 10px; line-height: 1; vertical-align: middle; cursor: pointer; transition: transform .15s var(--ease), filter .15s; }
.rb-watch:hover, .rb-watch:focus-visible { transform: scale(1.12); filter: brightness(1.1); outline: none; }
.rn-head .rn-watch { margin-left: auto; align-self: center; }
/* a player's channel (profile.js): a banner with who they are, then tabs (overview, replays, speedruns, top plays) */
.chn-head { position: relative; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); }
.chn-banner { position: relative; height: clamp(110px, 15vw, 200px); background: var(--cover, none) center 30% / cover, linear-gradient(120deg, color-mix(in srgb, var(--accent) 45%, #1a1216), color-mix(in srgb, var(--accent) 10%, var(--panel))); }
.chn-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .1), color-mix(in srgb, var(--panel) 92%, transparent)); }
.chn-main { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 22px; align-items: start; padding: 0 26px 16px; }
.chn-avatar { width: 128px; height: 128px; margin-top: -56px; border-radius: 28px; box-shadow: 0 0 0 5px var(--panel); }
.chn-who { padding-top: 14px; }
.chn-who h1 { margin: 0 0 6px; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.1; overflow-wrap: anywhere; }
/* the links a player pins under their name (profiles.js): Discord, YouTube, Twitch, each its own color */
.pf-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.pf-link.discord, .pe-link.discord { --brand: #7983f5; } .pf-link.youtube, .pe-link.youtube { --brand: #ff4d4d; } .pf-link.twitch, .pe-link.twitch { --brand: #a970ff; }
.pf-link .ic, .pe-link .ic { color: var(--brand); }
.chn-who .pf-hint { margin: 6px 0 8px; }
.chn-counts { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
/* osu!bridge Plus on a profile (profile.js): its picture behind the whole page (dimmed), its own banner, the name in two colors, About */
body.pf-bg-on { background: linear-gradient(rgba(16, 11, 13, .6), rgba(16, 11, 13, .82)) fixed, var(--pf-bg) center / cover no-repeat fixed, var(--bg); }
.chn-banner.own { height: clamp(130px, 18vw, 240px); background: var(--cover) center / cover no-repeat, var(--panel); }
.chn-banner.own::after { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--panel) 88%, transparent)); }
.pf-uname.grad { background: linear-gradient(90deg, var(--n1), var(--n2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-me-page { padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.pf-box .pf-me-page { background: rgba(255, 255, 255, .03); }
.bb { line-height: 1.6; overflow-wrap: anywhere; }
.bb .bb-hd { margin: 10px 0 4px; font-size: 19px; } .bb .bb-c { text-align: center; } .bb a { color: var(--pink); }
.bb .bb-q, .bb .bb-box { margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.bb .bb-q { padding: 10px 14px; } .bb .bb-box summary { padding: 9px 14px; cursor: pointer; font-weight: 700; } .bb .bb-box > div { padding: 0 14px 10px; }
.bb .bb-list { margin: 6px 0; padding-left: 22px; }
.bb .bb-img { max-width: 100%; max-height: 480px; border-radius: 10px; vertical-align: middle; }
/* a Plus profile from its banner down: one dark, see-through box over its background, its pattern the player's */
.pf-box { border: 1px solid rgba(255, 255, 255, .07); background-color: rgba(14, 10, 12, .74); }
.pf-box.pat-stripes { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 10px, transparent 10px 22px); }
.pf-box.pat-tiles { background-image: repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%); background-size: 34px 34px; }
.pf-box.pat-dots { background-image: radial-gradient(rgba(255, 255, 255, .1) 1.4px, transparent 1.7px); background-size: 18px 18px; }
.pf-box.pat-grid { background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 26px 26px; }
.pf-box.pat-waves { background-image: radial-gradient(circle at 50% 100%, transparent 10px, rgba(255, 255, 255, .05) 11px 12.5px, transparent 13.5px); background-size: 28px 14px; }
.chn.pf-box { border-radius: 24px; }
.chn.pf-box .chn-head { margin: 0; border: 0; border-radius: 23px 23px 0 0; background: none; }
.chn.pf-box .chn-banner::after { background: linear-gradient(transparent 50%, rgba(14, 10, 12, .74)); }
.chn.pf-box .chn-avatar { box-shadow: 0 0 0 5px rgba(14, 10, 12, .9); }
.chn.pf-box .chn-foot { border-bottom: 1px solid var(--line); }
.chn.pf-box > .pe, .chn.pf-box > .pf-admin { margin: 18px 20px 0; }
.chn.pf-box > .chn-box { padding: 18px 20px 4px; }
/* editing a profile: a wide panel, each part a card (Plus's marked); the Overview dragged by handles, an eye on each */
.pe { margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(22, 17, 15, .86); }
.pe-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.pe-top h3 { margin: 0; font-size: 20px; } .pe-top small { color: var(--muted); font-size: 13.5px; } .pe-acts { display: flex; gap: 8px; }
.pe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "links names" "pics lays" "pats pats" "about about"; gap: 14px; }
.pe-grid.free { grid-template-areas: "links locked"; }
.pe-links { grid-area: links; } .pe-names { grid-area: names; } .pe-pics { grid-area: pics; } .pe-lays { grid-area: lays; } .pe-pats { grid-area: pats; } .pe-about { grid-area: about; } .pe-locked { grid-area: locked; }
.pe-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.pe-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } .pe-h b { font-size: 15.5px; } .pe-h .pf-prem { margin-left: 0; } .pe-h small { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.pe textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.pe input[type=checkbox] { width: auto; }
.pe input[type=color] { flex: none; width: 46px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: none; cursor: pointer; }
.pe-names .pf-uname { align-self: flex-start; max-width: 100%; font-family: var(--font-head); font-size: 28px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.pe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pe-link { display: grid; grid-template-columns: 20px 66px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.pe-link .ic { width: 20px; height: 20px; }
.pe-switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.pe-pic { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px; border: 1px dashed transparent; border-radius: 14px; transition: border-color .15s, background-color .15s; }
.pe-pic.over { border-color: var(--pink); background: rgba(255, 111, 169, .08); }
.pe-pic-v { display: grid; place-items: center; height: 76px; border: 1px solid var(--line); border-radius: 12px; background: var(--img) center / cover no-repeat, var(--surface-2); }
.pe-pic.none .pe-pic-v { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 6px, var(--surface-2) 6px, var(--surface-2) 12px); }
.pe-pic-v small { padding: 4px; color: var(--muted); font-size: 11.5px; text-align: center; }
.pe-pic-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .pe-pic-t small { color: var(--muted); font-size: 12.5px; } .pe-pic-b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pe-lay { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pe-lay li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: box-shadow .15s, border-color .15s; }
.pe-lay li.dragging { position: relative; z-index: 1; border-color: rgba(255, 111, 169, .6); box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.pe-lay-n { font-weight: 600; } .pe-lay li.off .pe-lay-n { color: var(--muted); text-decoration: line-through; }
.pe-drag, .pe-eye { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--muted); }
.pe-drag { cursor: grab; touch-action: none; } .pe-lay li.dragging .pe-drag { cursor: grabbing; } .pe-eye { cursor: pointer; }
.pe-drag:hover, .pe-eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.pe-drag:focus-visible, .pe-eye:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.pe-drag .i, .pe-eye .i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .pe-drag .i circle { fill: currentColor; stroke: none; }
.pe-lay li:not(.off) .pe-eye { color: var(--pink); }
.pe-pat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pe-pat { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s, color .15s; }
.pe-pat .pf-box { height: 52px; border-radius: 10px; } .pe-pat:hover { color: var(--text); }
.pe-pat[aria-checked="true"] { border-color: var(--pink); color: var(--text); } .pe-pat:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.pe-about-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bb-t { padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.bb-t:hover { border-color: rgba(255, 111, 169, .55); } .bb-t:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
#pf-me { min-height: 240px; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.pf-me-prev { min-height: 240px; max-height: 520px; overflow-y: auto; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.pe-locked p { margin: 0; color: var(--muted); line-height: 1.5; } .pe-locked .btn { align-self: flex-start; }
@media (max-width: 860px) {
  .pe-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "links" "names" "pics" "lays" "pats" "about"; } .pe-grid.free { grid-template-areas: "links" "locked"; }
  .pe-about-2 { grid-template-columns: minmax(0, 1fr); } .chn.pf-box > .chn-box { padding: 14px 14px 2px; } .chn.pf-box > .pe, .chn.pf-box > .pf-admin { margin: 14px 14px 0; }
}
@media (prefers-reduced-motion: reduce) { .pe-lay li, .pe-pic, .pe-pat { transition: none; } }
.chn-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 18px; }
.chn-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 26px 14px; border-top: 1px solid var(--line); }
.chn-foot .pf-rank { margin: 0; }
.chn-foot .pf-stats { align-items: center; }
.chn-tabs { margin: 0 0 18px; }
.chn-sec { margin: 0 0 28px; }
.chn-sh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chn-sh .sub { margin: 0; }
.chn-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
@media (max-width: 720px) {
  .chn-main { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 0 16px 14px; }
  .chn-acts { justify-content: center; padding-top: 12px; }
  .chn-foot { justify-content: center; padding: 12px 16px; }
  .chn-foot .pf-rank, .chn-foot .pf-stats { justify-content: center; }
  .chn-who .pf-links { justify-content: center; }
}
/* a player's channel (channel.js), as YouTube's: the banner across, their picture round beside their name (ringed red while they play), the
   tabs; Home: them live, one video featured beside its words, then shelves of four (a row to swipe, on a phone); About beside their stats */
.cn { max-width: 1400px; margin: 0 auto; }
.cn-banner { height: clamp(96px, 16vw, 220px); border-radius: 18px; background: var(--cover, none) center 30% / cover, linear-gradient(120deg, #3a1a2a, var(--panel)); }
.cn-banner.own { background: var(--cover) center / cover no-repeat, var(--panel); }
.cn-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 22px 4px 6px; }
.cn-av { position: relative; display: block; width: 136px; height: 136px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: default; }
.cn-av img { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.cn-av.live { cursor: pointer; } .cn-av.live img { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px #e5194b; } .cn-av:focus-visible { outline: 2px solid var(--pink); outline-offset: 6px; }
.cn-av i { position: absolute; left: 50%; bottom: -6px; padding: 0 8px; border-radius: 5px; background: #e5194b; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: .04em; line-height: 18px; text-transform: uppercase; transform: translateX(-50%); }
.cn-who { min-width: 0; }
.cn-who h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; overflow-wrap: anywhere; }
.cn-meta { display: flex; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; } .cn-meta span + span::before { content: "·"; margin: 0 7px; }
.cn-line { display: flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.cn-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cn-line:hover { color: var(--text); } .cn-line:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
.cn-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cn-tabs { margin: 10px 0 22px; }
.cn-feat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; align-content: start; margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.cn-feat .rpl-card { display: contents; } .cn-feat .rpl-shot { grid-row: 1 / span 2; } .cn-feat .rpl-meta, .cn-feat-d { grid-column: 2; }
.cn-feat .rpl-title { font-size: 20px; -webkit-line-clamp: 3; }
.cn-feat-d { margin: 10px 0 0; color: #d8cbc3; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-shelf { margin-bottom: 30px; } .cn-sh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .cn-sh h3 { margin: 0; font-family: var(--font-head); font-size: 19px; }
.cn-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cn-live { margin-bottom: 22px; }
.cn-live-in { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid rgba(229, 25, 75, .45); border-radius: 14px; background: linear-gradient(90deg, rgba(229, 25, 75, .14), transparent 60%), var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cn-live-in:hover { border-color: #e5194b; } .cn-live-in:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; } .cn-live-in .lv-badge { position: static; }
.cn-live-t { display: flex; flex: 1; flex-direction: column; min-width: 0; } .cn-live-t span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cn-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.cn-about { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 28px; } .cn-about h3 { margin: 0 0 10px; font-family: var(--font-head); font-size: 17px; }
.cn-about-main h3 + .pf-links, .cn-about-main .bb + h3 { margin-top: 18px; }
.cn-stats { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.cn-stats ul { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0 0 6px; padding: 0; color: #d8cbc3; font-size: 14px; list-style: none; } .cn-stats li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 1100px) { .cn-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cn-row > :nth-child(4) { display: none; } }
@media (max-width: 760px) {
  .cn-id { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding-top: 14px; } .cn-av { width: 76px; height: 76px; } .cn-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .cn-feat { grid-template-columns: minmax(0, 1fr); } .cn-feat .rpl-shot { grid-row: auto; } .cn-feat .rpl-meta, .cn-feat-d { grid-column: 1; }
  .cn-row { grid-auto-columns: min(78%, 300px); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; } /* (a row to swipe) */
  .cn-row > * { scroll-snap-align: start; } .cn-row > :nth-child(4) { display: flex; }
  .cn-about { grid-template-columns: minmax(0, 1fr); }
}
/* a replay's page (watch-about.js): the preview over the picture before it plays, and About beside it (where View and the chat go) */
.th.about-on { --chatw: 340px; }
.th-about { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 340px; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; background: #151012; border-left: 1px solid rgba(255, 255, 255, .07); color: var(--text);
  transform: translateX(100%); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.th.about-on .th-about { transform: none; opacity: 1; pointer-events: auto; }
.ab-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; margin: 0 -6px; padding: 0 6px 4px; }
.ab-title { font-family: var(--font-head); font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.ab-map { color: var(--text); } a.ab-map:hover { color: var(--pink); } .ab-stars { color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ab-stars .i { width: 1em; height: 1em; margin-right: 1px; vertical-align: -.12em; stroke-width: 2.6; } .ab-stars.up .i { color: #ff7a7a; } .ab-stars.down .i { color: #8fd8ff; } /* (the play's mods: harder, easier) */
.ab-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } .ab-people .btn { margin-left: auto; }
.ab-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); font-size: 13.5px; }
.ab-who img { flex: none; width: 26px; height: 26px; border-radius: 8px; object-fit: cover; background: var(--surface-2); } .ab-who.big img { width: 34px; height: 34px; border-radius: 10px; }
.ab-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ab-who:hover b { color: var(--pink); }
.ab-by { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; } .ab-by .ab-who { font-size: 12.5px; } .ab-by .ab-who img { width: 20px; height: 20px; border-radius: 6px; } /* (someone else's play: who put it up) */
.ab-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-act { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.ab-act .i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab-act b { font-variant-numeric: tabular-nums; } .ab-act:hover { border-color: rgba(255, 111, 169, .55); } .ab-act.ro { cursor: default; } .ab-act.ro:hover { border-color: var(--line); }
.ab-act.on { border-color: var(--pink); background: rgba(255, 111, 169, .14); color: var(--pink); } .ab-act.on .i { fill: currentColor; }
.ab-act:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ab-desc { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 13.5px; line-height: 1.5; } .ab-desc p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; } .ab-desc .vx-link { margin-top: 6px; }
.ab-desc-edit textarea, .ab-say textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; }
.ab-row { display: flex; gap: 8px; margin-top: 8px; }
.ab-sec h4 { margin: 0 0 10px; font-family: var(--font-head); font-size: 14.5px; }
.ab-score { display: flex; align-items: center; gap: 12px; } .ab-score .wt-grade { font-size: 26px; }
.ab-big { display: flex; flex-direction: column; } .ab-big b { font-family: var(--font-head); font-size: 22px; font-variant-numeric: tabular-nums; } .ab-big span { color: var(--muted); font-size: 13px; }
.ab-hits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.ab-hits span { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 10px; background: rgba(255, 255, 255, .04); } .ab-hits b { font-size: 15px; font-variant-numeric: tabular-nums; } .ab-hits small { font-size: 11px; font-weight: 700; opacity: .8; }
.ab-hits .h3 { color: #66ccff; } .ab-hits .h1 { color: #8be04b; } .ab-hits .h5 { color: #ffc857; } .ab-hits .hx { color: #ff5d6c; }
.ab-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; } .ab-dl dt { color: var(--muted); } .ab-dl dd { margin: 0; overflow-wrap: anywhere; }
.ab-dl .up { color: #9be08b; font-weight: 700; } .ab-dl .down { color: #ff9aa8; font-weight: 700; } /* (the rank and pp then: what the play gained, as the app's stats colour a change) */
/* the comments, as YouTube's (watch-about.js): each with its replies, likes, the creator's heart and name marked, one pinned on top; times in them link to that moment */
.ab-say { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; } .ab-say.reply { margin: 10px 0 0; }
.ab-say-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; } .ab-say-row .ab-at { margin-right: auto; font-variant-numeric: tabular-nums; }
.ab-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .ab-sec-h h4 { margin: 0; }
.ab-sort { display: inline-flex; gap: 2px; padding: 2px; border-radius: 99px; background: var(--surface); }
.ab-sort button { height: 26px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; } .ab-sort button.on { background: var(--surface-2); color: var(--text); }
.ab-sort button:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.ab-comments, .ab-replies { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; } .ab-replies { gap: 10px; margin-top: 8px; }
.ab-c { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; } .ab-c.reply { grid-template-columns: 26px minmax(0, 1fr); }
.ab-pin { display: flex; grid-column: 1 / -1; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--muted); font-size: 12px; } .ab-pin .i { width: 14px; height: 14px; }
.ab-c-av img { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); object-fit: cover; } .ab-c.reply .ab-c-av img { width: 26px; height: 26px; }
.ab-c-main { min-width: 0; }
.ab-c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.ab-c-name { color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none; } .ab-c-name:hover { color: var(--pink); }
.ab-c-name.creator { padding: 1px 8px; border-radius: 99px; background: var(--surface-2); } /* (the replay's own player: their name marked, as YouTube does) */
.ab-c-badge { padding: 0 6px; border-radius: 5px; background: rgba(255, 111, 169, .16); color: var(--pink); font-size: 10.5px; font-style: normal; font-weight: 800; line-height: 17px; }
.ab-c-body { margin: 3px 0 2px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ab-ts { padding: 0; border: 0; background: none; color: #6cb6ff; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; } .ab-ts:hover { text-decoration: underline; }
.ab-ts:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; border-radius: 3px; }
.ab-c-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: -8px; }
.ab-c-like, .ab-c-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s; }
.ab-c-like:hover, .ab-c-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); } .ab-c-like:focus-visible, .ab-c-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.ab-c-like .i, .ab-c-btn .i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab-c-like b { font-variant-numeric: tabular-nums; } .ab-c-like.on { color: var(--pink); } .ab-c-like.on .i { fill: currentColor; fill-opacity: .25; }
.ab-c-btn.on { color: #ff4d7a; }
.ab-c-heart { position: relative; display: inline-flex; flex: none; width: 22px; height: 22px; margin: 0 6px 0 4px; } .ab-c-heart img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ab-c-heart .i { position: absolute; right: -6px; bottom: -4px; width: 13px; height: 13px; color: #ff3d6e; stroke: none; filter: drop-shadow(0 0 1px #151012); }
.ab-more { display: inline-flex; align-items: center; height: 28px; margin: 2px 0 0 -8px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: #6cb6ff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; } .ab-more:hover { background: rgba(108, 182, 255, .12); }
@media (prefers-reduced-motion: reduce) { .ab-c-like, .ab-c-btn { transition: none; } }
.ab-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ab-del { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; } .ab-del:hover { color: #ff7a7a; background: rgba(255, 255, 255, .06); }
.ab-del .i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.th-preview { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; transition: opacity .25s var(--ease), visibility .25s; }
.th-preview.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.th-pv-bg { position: absolute; inset: 0; background: var(--cover, none) center / cover, #0d0a0f; filter: blur(2px) brightness(.42); transform: scale(1.03); }
.th-pv { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(620px, 100%); text-align: center; }
.th-pv-title { font-family: var(--font-head); font-size: clamp(20px, 2.6vw, 30px); line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; } .th-pv-title .ab-map { color: #fff; } .th-pv-title .ab-stars { font-size: .55em; }
.th-pv-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; } .th-pv-who .ab-who { color: #fff; }
.th-pv-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; color: rgba(255, 255, 255, .85); font-size: 14.5px; } .th-pv-line .wt-grade { font-size: 20px; }
.th-pv-soc { display: flex; gap: 16px; color: rgba(255, 255, 255, .72); font-size: 13.5px; font-variant-numeric: tabular-nums; } .th-pv-soc span { display: inline-flex; align-items: center; gap: 5px; }
.th-pv-soc .i, .th-pv-acts .i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.th-pv-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; } .th-pv-acts .btn { display: inline-flex; align-items: center; gap: 8px; }
.th-pv-go { padding: 12px 26px; font-size: 16px; } .th-pv-go .i { fill: currentColor; stroke: none; }
/* what to watch next, at the end of a replay (watch-next.js): the Replays page's cards over its picture, dimmed as the preview has it; the
   player's bars stay over it */
.th-next { position: absolute; inset: 0; z-index: 2; animation: thIn .3s var(--ease-dec); }
.th-next .th-pv-bg { filter: blur(10px) brightness(.24); transform: scale(1.08); } /* (darker than the preview's: cards to read over it) */
.th-nx { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 88px clamp(16px, 4vw, 56px) 150px; }
.th-nx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1400px; margin: 0 auto 18px; }
.th-nx-head h3 { margin: 0; font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 28px); }
.th-nx-acts { display: flex; align-items: center; gap: 8px; } .th-nx-acts .btn { display: inline-flex; align-items: center; gap: 7px; }
.th-nx-acts .i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.th-nx .rpl-grid { max-width: 1400px; margin: 0 auto; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 24px 16px; }
/* Autoplay (the player's settings): the first one counted down on its picture */
.th-nx-auto { color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; } .th-nx-auto b { color: var(--text); font-variant-numeric: tabular-nums; }
.nx-up .rpl-shot { box-shadow: 0 0 0 3px var(--pink); }
.nx-up .rpl-shot::before { content: ""; position: absolute; left: 0; bottom: 0; z-index: 3; width: 100%; height: 4px; background: var(--pink); transform-origin: left; animation: nxUp var(--nx-s, 8s) linear both; }
@keyframes nxUp { from { transform: scaleX(0); } }
/* a replay's settings (the gear, watch.js): Autoplay, Loop, its speed, the ways to View and the keys; and the keys themselves (?) */
.th-set { position: absolute; right: calc(var(--chatw, 0px) + 16px); bottom: 78px; z-index: 5; display: flex; flex-direction: column; gap: 2px; width: min(330px, calc(100% - 32px)); padding: 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px;
  background: rgba(21, 15, 19, .97); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: var(--text); animation: setIn .16s var(--ease-dec, ease) both; }
@keyframes setIn { from { opacity: 0; transform: translateY(6px); } }
.th-set-h { display: flex; align-items: center; justify-content: space-between; padding: 0 0 4px 10px; } .th-set-h b { font-family: var(--font-head); font-size: 15px; }
.th-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.th-set-row:hover { background: rgba(255, 255, 255, .06); } .th-set-row:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.th-set-row > span { display: flex; flex-direction: column; min-width: 0; } .th-set-row small { color: var(--muted); font-size: 12px; }
.th-set-row.col { flex-direction: column; align-items: stretch; gap: 8px; cursor: default; } .th-set-row.col:hover { background: none; }
.th-set-row.link { justify-content: flex-start; } .th-set-row.link > span { flex: 1; } .th-set-row.link .i { width: 18px; height: 18px; color: var(--muted); }
.th-set-speeds { display: flex; flex-wrap: wrap; gap: 4px; }
.th-set-speeds button { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.th-set-speeds button.on { border-color: var(--pink); background: rgba(255, 111, 169, .16); color: var(--pink); } .th-set-speeds button:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.th-set kbd, .th-keys kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid rgba(255, 255, 255, .16); border-bottom-width: 2px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: #fff; font: 700 12px var(--font-body, inherit); }
.th-keys { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(5, 4, 5, .62); animation: fade .15s ease; }
.th-keys-in { width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(21, 15, 19, .97); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: var(--text); }
.th-keys dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 8px 6px 0; } .th-keys dt { display: flex; align-items: center; gap: 4px; } .th-keys dt span { color: var(--muted); }
.th-keys dd { align-self: center; margin: 0; color: #d8cbc3; font-size: 13.5px; }
@media (max-width: 640px) { .th-speed { display: none; } .th-set { left: 0; right: 0; bottom: 0; width: auto; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; } } /* (a phone: the speed in the gear's sheet) */
@media (prefers-reduced-motion: reduce) { .nx-up .rpl-shot::before, .th-set, .th-keys { animation: none; } }
@media (prefers-reduced-motion: reduce) { .th-next { animation: none; } }
@media (max-width: 900px) { .th.about-on { --chatw: 0px; } .th-about { width: min(340px, calc(88vw / var(--zall, 1))); box-shadow: -20px 0 40px rgba(0, 0, 0, .5); } }
@media (max-width: 640px) { .th-about, .th-view { top: auto; left: 0; right: 0; width: auto; max-height: 70vh; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 18px 18px 0 0; box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); transform: translateY(100%); } } /* (a phone held upright: About and View come up from the bottom, the picture above them) */
@media (prefers-reduced-motion: reduce) { .th-about, .th-preview, .ab-act { transition: none; } }
.ab-mapcard { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .04); font-size: 13px; color: var(--muted); isolation: isolate; }
.ab-mapcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(21, 16, 18, .94), rgba(21, 16, 18, .7)), var(--cover, none) center / cover; }
.ab-mapcard > b { color: var(--text); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; } .ab-mapcard span b { color: var(--text); }
.ab-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
