:root {
  --bg: #08080d;
  --panel: #12121b;
  --panel-2: #1a1a26;
  --line: #2a2a3a;
  --text: #ecebf5;
  --muted: #8b8aa3;
  --accent: #ff5fa2;
  --accent-2: #5fd4ff;
  --good: #5be37d;
  --bad: #ff4f6d;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 6px 10px;
  transition: border-color .15s, background .15s, opacity .15s;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { cursor: not-allowed; opacity: .45; }
button.danger:hover { border-color: var(--bad); color: var(--bad); }

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 18px 0 8px;
}
h2:first-child { margin-top: 0; }

/* numbers keep their width (digits line up in columns) without the mono font, which reads poorly in text */
.num { font-family: 'JetBrains Mono', monospace; }
b, strong { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #11111a, var(--bg));
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand span {
  margin-left: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; line-height: 1.15; }
.stat label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stat b { font-size: 20px; }
.stat small { font-size: 12px; color: var(--muted); }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  align-self: start;
}
.panelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panelHead h2 { margin: 0; }
.buyAmt { display: flex; gap: 4px; }
.buyAmt button { padding: 3px 8px; font-size: 12px; }
.buyAmt button.on { border-color: var(--accent); color: var(--accent); }

/* ---------- maps ---------- */
.tierHead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  margin: 12px 0 6px;
  font-size: 14px;
}
.tierHead small { color: var(--muted); font-weight: 400; }
.mapBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  margin-bottom: 5px;
  padding: 7px 10px;
  border-left: 3px solid var(--tier, var(--line));
}
.mapBtn.sel { background: #24243a; border-color: var(--accent); border-left-color: var(--tier); }
.mapBtn .mName { font-weight: 600; font-size: 14px; }
.mapBtn .mBest { font-size: 11px; color: var(--muted); }
.mapBtn .sr { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--tier); }

.modRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.modRow:first-child { border-top: 0; }
.modRow .mDesc { font-size: 12px; color: var(--muted); }
.modRow button.on { border-color: var(--good); color: var(--good); }

/* ---------- play area ---------- */
.play { min-width: 0; }
.mapHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mapName { font-size: 22px; font-weight: 800; }
.mapMeta { color: var(--muted); font-size: 13px; }
.tag {
  font-family: inherit; font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.manual { border-color: var(--accent); color: var(--accent); }

.bars { display: grid; gap: 4px; margin-bottom: 10px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.health > div { background: var(--good); transition: width .1s; }
.bar.health.low > div { background: var(--bad); }

.canvasWrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
canvas { display: block; width: 100%; height: 100%; }

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 600px;
  margin: 10px auto 0;
}
.hud div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}
.hud label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hud b { font-size: 17px; }
.hint { text-align: center; color: var(--muted); font-size: 13px; }
.play h2 { max-width: 600px; margin-left: auto; margin-right: auto; }
.log { max-width: 600px; margin: 0 auto; font-size: 13px; }
.logRow {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}
.logRow .grade { font-weight: 800; }
.logRow .r { font-family: inherit; font-variant-numeric: tabular-nums; color: var(--muted); }
.logRow.fail { opacity: .6; }

/* ---------- upgrades ---------- */
.upg {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.upg:first-child { border-top: 0; }
.upg .uName { font-weight: 600; }
.upg .uLvl { color: var(--muted); font-size: 12px; font-family: 'JetBrains Mono', monospace; margin-left: 6px; }
.upg .uDesc { grid-column: 1; font-size: 12px; color: var(--muted); }
.upg button { grid-row: 1 / span 2; grid-column: 2; align-self: center; min-width: 92px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.upg button.can { border-color: var(--accent); color: var(--text); }

.season { font-size: 13px; color: var(--muted); }

.small { font-size: 12px; color: var(--muted); }

/* ---------- modal ---------- */
.modal {
  z-index: 20 !important;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}
.modal.hidden { display: none; }
.modalBox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 440px;
}
.modalBox h3 { margin: 0 0 10px; }
.modalBox textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.modalBtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.modalBtns .primary { border-color: var(--accent); color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr 1fr; }
  .play { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 16px; }
  .stats { gap: 18px; }
  .stat b { font-size: 16px; }
  .hud { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Rhythia additions ---------- */
:root { --accent: #8aa4ff; --accent-2: #ff8fc8; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-size: 20px; }
.rank { display: flex; align-items: center; gap: 8px; }
.rank img { width: 40px; height: 40px; }
.rank div { display: flex; flex-direction: column; line-height: 1.15; }
.rank b { font-family: 'Outfit', sans-serif; font-size: 16px; }
.rank small { font-size: 12px; color: var(--muted); }
.topbar .stats { margin-left: auto; }

.tierHead { color: var(--tier); }
.mapScroll { max-height: 280px; overflow-y: auto; padding-right: 4px; }
.mapBtn > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.mapBtn .mName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapBtn .sr { flex-shrink: 0; margin-left: 8px; }

.speedRow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
.speedBtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.speedBtn img { width: 24px; height: 24px; }
.speedBtn.on { border-color: var(--good); color: var(--good); }

@media (max-width: 700px) {
  .topbar .stats { margin-left: 0; }
  .brand img { height: 24px; }
}
html { color-scheme: dark; }
.panel, .play { min-width: 0; }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- v2: map browser ---------- */
.mapScroll { max-height: 520px; }
.tierTabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 6px 0; }
.tierTabs button { font-size: 11px; padding: 5px 2px; border-bottom: 2px solid var(--tier); }
.tierTabs button.on { background: #24243a; color: var(--tier); border-color: var(--tier); }
#mapSearch, .mapFilters select {
  width: 100%; font: inherit; font-size: 13px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}
.mapFilters { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 6px; }
.listCount { margin: 2px 0 6px; }
.mapBtn { gap: 8px; justify-content: flex-start; }
.mapBtn img, .mapBtn .noImg { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--panel); }
.mapBtn .mInfo { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mapBtn .mBest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapBtn .sr { margin-left: auto; }
.trains { display: flex; gap: 4px; margin-top: 2px; }
.trains i, .style {
  font-style: normal; font-size: 10px; padding: 0 6px; border-radius: 99px;
  color: var(--skill); border: 1px solid color-mix(in srgb, var(--skill) 45%, transparent);
}
.legacy { color: #ffb36b; }
.more { width: 100%; font-size: 12px; margin-top: 4px; }
.cover { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.mapHead { gap: 12px; }
.mapTitle { flex: 1; min-width: 0; }

/* ---------- v2: tabs ---------- */
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-bottom: 10px; }
.tabs button { font-size: 12px; padding: 6px 2px; }
.tabs button.on { border-color: var(--accent); color: var(--accent); background: #1d1d2e; }
.hidden { display: none !important; }
.intro { margin: 0 0 8px; }
h3.group { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 12px 0 6px; }
.tabPage { max-height: calc(100vh - 170px); overflow-y: auto; padding-right: 4px; }

/* skills: one line each, the level bar along the bottom */
.skill { display: grid; grid-template-columns: 96px 62px minmax(0, 1fr) auto; align-items: center; gap: 8px; position: relative;
  padding: 5px 10px 7px; margin-bottom: 3px; border-left: 3px solid var(--skill); border-radius: 6px; background: var(--panel-2); cursor: help; }
.skName { font-weight: 600; color: var(--skill, var(--text)); white-space: nowrap; }
.skill .skName { font-size: 13px; }
.skLvl { font-family: 'JetBrains Mono', monospace; font-size: 12px; white-space: nowrap; }
.skEffect { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skMult { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 10px; color: var(--muted); white-space: nowrap; }
.skBar { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.skBar div { height: 100%; width: 0; background: var(--skill); }

/* gear: one line each */
.gear { display: grid; grid-template-columns: 96px auto minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.gear .skName { font-size: 13px; }
.gear .gNext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 3px; border: 1px solid var(--skill); }
.pips i.on { background: var(--skill); }
.need { color: var(--bad); }
.gear button { padding: 3px 6px; min-height: 0; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.gear button.can { border-color: var(--accent); }


.weak { color: var(--bad); }

/* ---------- v2: toasts ---------- */
.toasts { z-index: 25 !important; position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 9; pointer-events: none; }
.toast { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(6px); }
@media (max-width: 1100px) { .tabPage { max-height: none; } }
.gNext b { font-family: inherit; }
.modPts { font-size: 10px; color: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; }

/* ---------- v3: mods ---------- */
.speedRow { grid-template-columns: repeat(4, 1fr); }
.speedBtn b { font-size: 15px; line-height: 24px; }
.modGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.modBtn {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0;
  color: var(--mod); background: color-mix(in srgb, var(--mod) 8%, var(--panel-2)); opacity: .55;
}
.modBtn svg { width: 26px; height: 26px; }
.modBtn > b { font-family: 'Outfit', sans-serif; font-size: 18px; }
.modBtn small { position: absolute; right: 5px; bottom: 3px; font-size: 10px; font-weight: 700; }
.modBtn.on { opacity: 1; border-color: var(--mod); background: color-mix(in srgb, var(--mod) 22%, var(--panel-2)); }
.modBtn:hover { opacity: 1; }
.modBtn .tip, .speedBtn[data-tip]:hover::after {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 6;
  background: #0d0d14; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  width: max-content; max-width: 220px; text-align: left; color: var(--muted); font-size: 12px; pointer-events: none;
}
.modBtn .tip { display: none; flex-direction: column; gap: 2px; }
.modBtn .tip b { color: var(--text); font-family: 'Outfit', sans-serif; font-size: 13px; }
.modBtn .tip em { font-style: normal; color: var(--mod); }
.modBtn:hover .tip, .modBtn:focus-visible .tip { display: flex; }
.modGrid .modBtn:nth-child(4n+1) .tip { left: 0; transform: none; }
.modGrid .modBtn:nth-child(4n) .tip { left: auto; right: 0; transform: none; }
.speedBtn { position: relative; }
.speedBtn[data-tip]:hover::after { content: attr(data-tip); }
/* mods in labelled groups; shard ones locked until bought */
.modGroups { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0; }
.modGroup { display: flex; flex-direction: column; gap: 3px; }
.modGroup > small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.modGroup > div { display: flex; gap: 6px; }
.modGroup .modBtn { width: 52px; }
.modGroup:first-child .modBtn:first-child .tip, .modGroup:first-child .selSpeed + .modBtn .tip { left: 0; transform: none; }
.modGroup:last-child .modBtn:last-child .tip { left: auto; right: 0; transform: none; }
.modBtn.locked, .speedBtn.locked { opacity: .35; filter: grayscale(.7); }
.modBtn.locked:hover, .speedBtn.locked:hover { opacity: .6; }
.modLock { position: absolute; right: 3px; top: 3px; width: 13px; height: 13px; color: #d6dae8; }
.modLock svg { width: 13px !important; height: 13px !important; display: block; }
.speedBtn.locked .modLock { position: static; width: 24px; height: 24px; display: grid; place-items: center; }
.modBtn .tip em.tipLock { color: #ffd54f; }
.speedMenu button.locked { display: flex; align-items: center; gap: 4px; opacity: .5; }
.speedMenu button.locked svg { width: 12px; height: 12px; }
.speedMenu button.locked small { margin-left: auto; color: #b9a6ff; font-size: 11px; }

/* ---------- v3: play column ---------- */
.timeRow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.warm { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.warm small { color: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; font-size: 11px; }
.warmBar { position: relative; width: 120px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #5fd4ff, #ffd54f, #ff8a3d, #ff4f6d); }
.warmBar i { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: #fff; transform: translateX(-50%); transition: left .4s; }
.under { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 600px; margin: 0 auto; }
.under h2 { margin-top: 14px; }
.pHead { position: relative; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .7; left: 0; z-index: 1; margin-left: -1px; pointer-events: none; }
.pRow { position: relative; height: 22px; border-bottom: 1px solid var(--line); }
.pRow svg { display: block; width: 100%; height: 20px; }
.pRow polygon { fill: color-mix(in srgb, var(--skill) 25%, transparent); }
.pRow polyline { fill: none; stroke: var(--skill); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pRow span { position: absolute; right: 4px; top: 3px; font-size: 11px; color: var(--skill); text-shadow: 0 0 4px #000, 0 0 4px #000; }
.board { font-size: 13px; }
.lbRow { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 6px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.lbRow.me { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; }
.lbRank { grid-row: span 2; font-weight: 800; color: var(--accent); align-self: center; }
.lbName { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbName small { color: var(--good); font-weight: 400; }
.lbStat { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--muted); }
.nameRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; margin-bottom: 10px; }
.nameRow label { grid-column: 1 / -1; }
.nameRow input, .chatForm input, #onlineSearch {
  font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0;
}
code { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text); }
.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabs button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logRow { grid-template-columns: 34px minmax(0, 1fr) auto; }
.logRow > span:nth-child(2) { overflow-wrap: anywhere; }

/* ---------- v3: online ---------- */
.onlineBtn { display: flex; align-items: center; gap: 6px; font-size: 13px; border-radius: 99px; }
.onlineBtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 6px var(--good); }
.online { position: fixed; inset: 0; z-index: 11; background: rgba(0, 0, 0, .7); display: flex; padding: 24px; }
.online.hidden { display: none; }
.onlineBox {
  margin: auto; width: 100%; max-width: 1760px; height: 100%; display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) 280px; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.onlineTop { display: flex; justify-content: space-between; align-items: start; }
.onlineTop h3 { margin: 0; }
.onlineTop small { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); font-weight: 600; }
.onlineFind { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.favBtn { width: 40px; padding: 0; font-size: 18px; }
.favBtn.on { color: #ff6b8b; border-color: #ff6b8b; }
/* Friend activity feed (Friends tab of the online panel) */
.onlineFind:has(#onlineFeed) { grid-template-columns: minmax(0, 1fr) auto auto; }
.feedBtn { padding: 0 14px; font-weight: 600; }
.feedBtn.on { color: #ff6b8b; border-color: #ff6b8b; }
.feedList { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.feedRow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .05); border-radius: 6px; background: #17171d; }
.feedAv.oAvatar { width: 34px; height: 34px; font-size: 15px; }
.feedText { font-size: 14px; color: #d6d6de; overflow-wrap: anywhere; }
.feedText b { font-family: inherit; color: #fff; }
.feedName[data-player]:hover { text-decoration: underline; }
.feedAgo { color: var(--muted); white-space: nowrap; }
.feedHeart { color: #ff6b8b; }
.onlineList { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-content: start; padding-right: 4px; }
.oPlayer { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 76px;
  padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 6px; overflow: hidden;
  background: linear-gradient(90deg, #17171d 35%, rgba(23, 23, 29, .75)), var(--bg, none) center / cover, #17171d; }
.oPlayer.me { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.oAvatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #fff;
  background: radial-gradient(circle at 30% 30%, hsl(var(--h) 55% 55%), hsl(var(--h) 45% 25%)); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.oText { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oName { font-size: 18px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; min-width: 0; }
.oName > * { flex: none; }
.oName > .oNm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.oStatus { font-size: 13px; font-weight: 600; color: #d6d6de; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oStatus > span { display: inline-block; }
.oStatus.marq { text-overflow: clip; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.oStatus.marq > span { animation: marq var(--dur, 8s) ease-in-out infinite; }
.oStatus.marq:hover > span { animation-play-state: paused; }
@keyframes marq { 0%, 15% { transform: none; } 50%, 65% { transform: translateX(var(--over)); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .oStatus.marq > span { animation: none; } }
[data-player] { cursor: pointer; }
.oPlayer[data-player]:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.sbRow[data-player]:hover { background: rgba(255, 255, 255, .06); }
.cName[data-player]:hover { text-decoration: underline; }
.ppAvatar.oAvatar { width: 140px; height: 140px; border-radius: 16px; font-size: 56px; font-weight: 800; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 55% 55%), hsl(var(--h) 45% 25%)); }
.ppFav.on { color: #ff6b9a; }
.ppBack { margin-left: auto; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.ppBack:hover { color: #fff; border-color: var(--accent); }
.oRank { font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, .28); letter-spacing: -.01em; }
.oPlayer.top .oRank { color: #fff; }
.oPlayer .oRank[style] { color: var(--rk); text-shadow: 0 0 18px color-mix(in srgb, var(--rk) 40%, transparent); }
.oPlayer:not(.top) .oRank[style] { opacity: .75; }
.oFav { position: absolute; top: 4px; right: 6px; padding: 0 4px; min-height: 0; border: 0; background: none; font-size: 14px; color: var(--muted); opacity: 0; }
.oPlayer:hover .oFav, .oFav.on { opacity: 1; }
.oFav.on { color: #ff6b8b; }
.chat { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; min-height: 0; }
.chanBox { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 0; }
.chanBox > small { color: var(--muted); font-size: 13px; font-weight: 600; }
.channels { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.channels button { text-align: left; font-size: 13px; border: 0; background: none; }
.channels button.on { background: rgba(255, 255, 255, .08); color: var(--text); }
.chanDiscord { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #fff; background: #5865f2; text-decoration: none; }
.chanDiscord:hover { background: #4752c4; }
.chanDiscord svg { width: 16px; height: 16px; flex: none; }
.shList { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.shRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.shRow div { display: grid; gap: 2px; min-width: 0; }
.shRow small { color: var(--muted, #8a8b96); }
.shRow button { flex: none; }
.chatMain { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 0; }
.chatTitle { font-size: 13px; font-weight: 600; }
.chatLog { overflow-y: auto; font-size: 13px; }
.chatMsg { padding: 1px 0; overflow-wrap: anywhere; }
.cTime { color: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; font-size: 11px; margin-right: 4px; }
.cRank { font-size: 10px; color: var(--rk, var(--accent-2)); border: 1px solid; border-radius: 4px; padding: 0 3px; margin-right: 4px; }
.cName { color: var(--accent); font-weight: 600; }
.chatForm { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; position: relative; }
.emojiBtn { width: 36px; padding: 0; font-size: 17px; line-height: 1; display: grid; place-items: center; }
.emojiPick { position: absolute; right: 0; bottom: calc(100% + 6px); width: min(300px, 100%); max-height: 260px; overflow-y: auto; z-index: 20;
  padding: 8px; border-radius: 12px; background: var(--panel, #15151d); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.emojiPick small { display: block; margin: 2px 2px 4px; opacity: .6; font-size: 11px; }
.emGrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 6px; }
.emGrid button { padding: 0; aspect-ratio: 1; font-size: 18px; line-height: 1; background: transparent; border: 0; border-radius: 8px; display: grid; place-items: center; }
.emGrid button:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 700px) {
  .under { grid-template-columns: minmax(0, 1fr); }
  .online { padding: 8px; }
  .onlineBox { grid-template-rows: auto auto minmax(0, 1fr) 300px; }
  .chat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .channels { flex-direction: row; overflow-x: auto; }
  .timeRow { flex-wrap: wrap; }
}

/* ---------- top bar buttons ---------- */
.iconBtn { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; aspect-ratio: 1; }
.iconBtn svg { width: 19px; height: 19px; }
.audioBtn.off { opacity: .45; }
.dock .audioBtn.off svg { opacity: .6; }
.dock .audioBtn.off span { text-decoration: line-through; }
button.brand { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- map browser ---------- */
.mapsHead { display: flex; justify-content: space-between; align-items: center; }
.browseBtn { font-size: 12px; padding: 5px 10px; border-color: var(--accent); color: var(--accent); }
.mapHeadBtn { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px; border-radius: 10px; }
.mapHeadBtn:hover { background: var(--panel-2); }
.mapHeadBtn .mapTitle { display: flex; flex-direction: column; }
.select { position: fixed; inset: 0; z-index: 11; display: flex; padding: 20px;
  background: radial-gradient(ellipse at 20% 30%, #3a1c4a 0%, #08060e 60%); }
.select.hidden { display: none; }
.selBox { margin: auto; width: 100%; max-width: 1500px; height: 100%; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 24px; }
.selLeft { display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; padding: 8px; min-height: 0; }
.selTopRow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; width: 100%; align-items: start; }
.selCoverWrap { padding: 14px; transform: rotate(-6deg); margin-top: 16px; }
.selCoverWrap img, .selCoverWrap .noImg { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--panel-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier) 45%, transparent), 0 18px 40px rgba(0, 0, 0, .6); }
.selBoard { min-width: 0; }
.selBoardHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.segTabs { display: flex; gap: 4px; }
.segTabs button { font-size: 12px; padding: 4px 10px; }
.segTabs button.on { border-color: var(--accent); color: var(--accent); }
.hideFailed { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.hideFailed input { position: absolute; opacity: 0; pointer-events: none; }
.hideFailed span { width: 34px; height: 18px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); position: relative; transition: background .2s; }
.hideFailed span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .2s; }
.hideFailed input:checked + span { background: var(--accent); }
.hideFailed input:checked + span::after { left: 18px; }
.hideFailed input:focus-visible + span { outline: 2px solid var(--accent); }
.selBoardList { max-height: 270px; overflow-y: auto; display: grid; gap: 4px; align-content: start; }
.sbRow { display: grid; grid-template-columns: 30px 26px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  background: rgba(20, 16, 30, .8); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.sbRow.me { border-color: var(--accent); }
.sbRank { font-weight: 800; color: #ffd54f; font-size: 13px; }
.sbAv { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #4b4f9a; }
.sbMain { display: flex; flex-direction: column; min-width: 0; }
.sbMain b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbMain small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbRight { display: flex; flex-direction: column; align-items: end; }
.sbRight b { font-size: 18px; font-weight: 800; line-height: 1; }
.sbRight small { font-size: 10px; color: var(--muted); }
.selLeft > * { flex-shrink: 0; max-width: 100%; }
.selTitle { overflow-wrap: anywhere; margin: 10px 0 0; font-size: 28px; font-weight: 800; text-align: center; }
.selMapper { color: var(--muted); }
.selStats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 40px; font-size: 18px; font-weight: 600; margin: 6px 0; }
.selTrains { justify-content: center; flex-wrap: wrap; }
.selPlay { min-width: 240px; padding: 10px 24px; font-size: 22px; font-weight: 800; display: flex; flex-direction: column; align-items: center;
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); border-color: var(--accent); }
.selPlay small { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.selMods { margin-top: 4px; }
.selMods .modBtn { aspect-ratio: 1; }
.selMods .modBtn img { width: 26px; height: 26px; }
.selMods .modBtn:first-child .tip, .selSpeed + .modBtn .tip { left: 0; transform: none; }
.selMods .modBtn:last-child .tip { left: auto; right: 0; transform: none; }
.selSpeed { position: relative; }
.selSpeed .modBtn { width: 52px; }
.speedMenu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 7; display: grid; gap: 4px; width: 110px;
  background: #0d0d14; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.speedMenu button { font-size: 13px; padding: 4px; }
.speedMenu button.on { border-color: var(--accent); color: var(--accent); }
.selRight { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; min-height: 0; }
.selTop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.selControls #selSearch { width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.selList { overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding-right: 6px; }
.selCard { position: relative; min-width: 0; display: flex; align-items: center; gap: 16px; text-align: left; padding: 10px; border-radius: 12px;
  background: rgba(30, 22, 44, .85); border: 1px solid var(--line); border-left: 4px solid var(--tier); }
.selCard:hover { background: rgba(48, 34, 68, .9); }
.selCard.sel { background: linear-gradient(90deg, rgba(120, 50, 160, .55), rgba(60, 30, 90, .5)); border-color: #c38bff; border-left-color: var(--tier); }
.selCard img, .selCard .noImg { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--panel-2); }
.scInfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.scTitle { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scMapper { color: var(--muted); font-size: 14px; }
.scStars { font-size: 14px; font-weight: 600; }
.scStars i { font-style: normal; color: var(--tier); letter-spacing: 2px; }
.scGrade { font-size: 28px; font-weight: 800; padding: 0 8px; }
.scNow { position: absolute; top: 8px; right: 10px; font-size: 10px; text-transform: uppercase; color: var(--good); }
@media (max-width: 900px) {
  .select { padding: 8px; }
  .selBox { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; overflow-x: hidden; }
  .selLeft { overflow: visible; min-height: auto; }
  .selTopRow { grid-template-columns: minmax(0, 1fr); }
  .selCoverWrap { width: 150px; margin: 0 auto; }
  .selMods { grid-template-columns: repeat(5, 48px); }
  .selTitle { font-size: 22px; }
  .selStats { font-size: 15px; gap: 4px 24px; }
  .selCard img, .selCard .noImg { width: 64px; height: 64px; }
  .scTitle { font-size: 16px; }
  .selList { overflow: visible; }
}

/* browser cover: drops in when a map is picked, then floats and sways */
.selCoverWrap { animation: coverFloat 6s ease-in-out infinite; }
.selCoverWrap.enter { animation: coverIn .45s cubic-bezier(.2, .9, .3, 1.3) both, coverFloat 6s ease-in-out .45s infinite; }
.selCoverWrap img, .selCoverWrap .noImg { animation: coverGlow 3s ease-in-out infinite; }
@keyframes coverIn {
  from { opacity: 0; transform: translateY(-14px) rotate(-14deg) scale(.88); }
  to { opacity: 1; transform: rotate(-6deg); }
}
@keyframes coverFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  25% { transform: translateY(-6px) rotate(-4deg); }
  50% { transform: translateY(-2px) rotate(-7.5deg); }
  75% { transform: translateY(-8px) rotate(-5deg); }
}
@keyframes coverGlow {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier) 45%, transparent), 0 18px 40px rgba(0, 0, 0, .6); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier) 75%, transparent), 0 0 28px color-mix(in srgb, var(--tier) 40%, transparent), 0 24px 44px rgba(0, 0, 0, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .selCoverWrap, .selCoverWrap.enter, .selCoverWrap img, .selCoverWrap .noImg { animation: none; }
}

/* ---------- settings ---------- */
.settings { position: fixed; inset: 0; z-index: 15; display: flex; padding: 16px; background: rgba(0, 0, 0, .55); }
.settings.hidden { display: none; }
.setBox { margin: auto; width: 100%; max-width: 700px; height: 100%; max-height: 980px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
.setHead, .setPanel { background: rgba(14, 14, 20, .97); border: 1px solid var(--line); border-radius: 14px; }
.setHead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.setHead h3 { margin: 0; font-size: 20px; }
.setHead small { color: var(--muted); font-size: 15px; font-weight: 600; }
.setHead button { width: 36px; height: 36px; padding: 0; font-size: 18px; }
.setPanel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; padding: 16px; min-height: 0; }
.setTools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.setTools button { font-size: 12px; padding: 6px 4px; background: #1b1b24; }
#setSearch { font: inherit; font-size: 15px; color: var(--text); background: #1b1b24; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.setBody { overflow-y: auto; padding-right: 6px; }
.sGroup { margin: 8px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 20px; }
.sCards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sCard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; background: #16161e; border-radius: 10px; }
.sCard:hover { background: #1f1f2b; }
.sCard b, .titleBrand b { font-family: 'Outfit', sans-serif; }
.sCard b { flex: 1; font-size: 17px; }
.sCard i { font-style: normal; color: var(--muted); font-size: 22px; }
.sIcon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; color: var(--accent);
  background: linear-gradient(135deg, #2b2b6a, #1a1a3a); border: 1px solid #34346e; }
.sIcon svg { width: 22px; height: 22px; }
.sBack { font-size: 13px; padding: 5px 12px; }
.sPageTitle { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 12px 0; }
.sFound { margin: 12px 0 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.sRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 14px; margin-bottom: 6px;
  background: #16161e; border: 1px solid var(--line); border-radius: 10px; }
.sLabel { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.sLabel small { color: var(--muted); font-weight: 400; font-size: 12px; }
/* sliders: a rounded track filled with the accent up to the thumb (--p, set from JS), and a round thumb */
.sRange input { grid-column: 1 / -1; width: 100%; height: 22px; margin: 2px 0 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; --p: 50%; }
.sRange input:focus { outline: none; }
.sRange input::-webkit-slider-runnable-track { height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .1) var(--p)); }
.sRange input::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.sRange input::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
.sRange input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); transition: transform .12s; }
.sRange input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45); transition: transform .12s; }
.sRange input:hover::-webkit-slider-thumb, .sRange input:active::-webkit-slider-thumb { transform: scale(1.18); }
.sRange input:hover::-moz-range-thumb, .sRange input:active::-moz-range-thumb { transform: scale(1.18); }
.sRange input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.sRange input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
body.reduceMotion .sRange input::-webkit-slider-thumb, body.reduceMotion .sRange input::-moz-range-thumb { transition: none; }
.sRange b { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.sRow select { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.sCol { grid-template-columns: minmax(0, 1fr); }
.sBtns { display: flex; flex-wrap: wrap; gap: 6px; }
.sName { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.sName input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.sToggle { cursor: pointer; }
.sToggle input { position: absolute; opacity: 0; pointer-events: none; }
.sw { width: 40px; height: 22px; border-radius: 99px; background: #2a2a36; position: relative; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.sToggle input:checked + .sw { background: var(--accent); }
.sToggle input:checked + .sw::after { left: 21px; }
.sToggle input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- title screen ---------- */
.title { position: fixed; inset: 0; z-index: 12; overflow: hidden; background: #0b0814; display: grid; place-items: center; }
.title.hidden { display: none; }
.titleBg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(14px) brightness(.45) saturate(1.2);
  transform: scale(1.1); transition: transform .25s ease-out; }
.title::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 35% 50%, rgba(120, 70, 200, .25), transparent 60%), linear-gradient(180deg, rgba(8, 6, 14, .2), rgba(8, 6, 14, .85)); }
.titleMain { position: relative; z-index: 2; display: flex; align-items: center; gap: 56px; transition: transform .25s ease-out; }
.titleLogo { position: relative; width: min(38vw, 340px); aspect-ratio: 1; padding: 0; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; }
.titleLogo canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.logoDisc { position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #2a2050, #120d24); border: 6px solid #fff; box-shadow: 0 0 40px rgba(160, 120, 255, .45);
  transform: scale(var(--pulse, 1)); transition: transform .05s linear; }
.logoDisc { overflow: hidden; }
.logoDisc img { width: 62%; height: 62%; object-fit: contain; }
.titleLogo:hover .logoDisc { box-shadow: 0 0 60px rgba(180, 140, 255, .7); }
.titleMenu { display: grid; gap: 12px; min-width: 260px; }
.titleMenu button { text-align: left; font-size: 28px; font-weight: 600; padding: 14px 28px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(90deg, rgba(110, 80, 230, .85), rgba(80, 60, 190, .75)); color: #fff; transition: transform .15s, background .15s; }
.titleMenu button:hover, .titleMenu button:focus-visible { transform: translateX(10px); background: linear-gradient(90deg, rgba(135, 105, 255, .95), rgba(100, 80, 220, .85)); }
.titleBrand { position: absolute; z-index: 2; top: 18px; left: 22px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.titleBrand b { color: var(--text); font-size: 20px; }
.titleBrand img { height: 22px; }
.titleNow { position: absolute; z-index: 2; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 18px; color: var(--muted); font-size: 13px;
  background: rgba(14, 14, 20, .7); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; max-width: calc(100% - 32px); }
.titleNow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titleNow .tapHint { display: none; color: var(--text, #fff); animation: tapPulse 1.6s ease-in-out infinite; }
body.needsTap .titleNow .tapHint { display: inline; }
@keyframes tapPulse { 50% { opacity: .45; } }
@media (max-width: 760px) {
  .titleMain { flex-direction: column; gap: 32px; }
  .titleLogo { width: min(56vw, 240px); }
  .titleMenu { min-width: 0; width: min(80vw, 300px); }
  .titleMenu button { font-size: 20px; padding: 10px 20px; }
  .sCards { grid-template-columns: minmax(0, 1fr); }
  .setTools { grid-template-columns: minmax(0, 1fr); }
}
body.reduceMotion .titleMenu button { transition: none; }

/* ---------- settings applied to the page ---------- */
body.noThumbs .mapBtn img, body.noThumbs .mapBtn .noImg, body.noThumbs .selCard img, body.noThumbs .selCard .noImg { display: none; }
body.reduceMotion .selCoverWrap, body.reduceMotion .selCoverWrap img { animation: none !important; }
body.hideChat .chat { display: none; }
body.hideChat .onlineBox { grid-template-rows: auto auto minmax(0, 1fr); }
.canvasWrap { position: relative; }
.canvasWrap.mapBg::before { content: ''; position: absolute; inset: -20px; background: var(--cover, none) center / cover; filter: blur(8px); }
.canvasWrap canvas { position: relative; }

/* ---------- map browser opening ---------- */
.select:not(.hidden) { animation: selFade .25s ease-out; }
.select:not(.hidden) .selLeft { animation: selFromLeft .45s cubic-bezier(.2, .8, .2, 1) both; }
.select:not(.hidden) .selRight { animation: selFromRight .45s cubic-bezier(.2, .8, .2, 1) .05s both; }
.select.opening .selCard { animation: selCardIn .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.12s + var(--i, 0) * 35ms); }
@keyframes selFade { from { opacity: 0; } }
@keyframes selFromLeft { from { opacity: 0; transform: translateX(-60px) scale(.97); } }
@keyframes selFromRight { from { opacity: 0; transform: translateX(60px); } }
@keyframes selCardIn { from { opacity: 0; transform: translateX(40px); } }
body.reduceMotion .select, body.reduceMotion .select .selLeft, body.reduceMotion .select .selRight, body.reduceMotion .select .selCard { animation: none !important; }

/* ---------- map mastery stars ---------- */
.msStars { display: inline-flex; gap: 1px; line-height: 1; white-space: nowrap; }
.msStars i { font-style: normal; color: rgba(255, 255, 255, .16); text-shadow: none; }
.msStars i.on { color: #ffd54f; text-shadow: 0 0 6px rgba(255, 213, 79, .45); }
.msCard { font-size: 16px; flex: none; }
.msDetail { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 6px; }
.msBig { font-size: 24px; gap: 3px; }
.msDetail > span { display: flex; gap: 6px; flex-wrap: wrap; }
.msDetail em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: var(--muted); border: 1px solid var(--line); }
.msDetail em.on { color: #ffd54f; border-color: rgba(255, 213, 79, .5); background: rgba(255, 213, 79, .08); }
.msResult { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 2px; }
.msRs { font-size: clamp(22px, 2.2vw, 34px); gap: 4px; }
.msResult small { color: #ffd54f; font-weight: 700; font-size: clamp(13px, 1.1vw, 17px); }
.msRs i.new { animation: msPop .7s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(.35s + var(--d, 0) * .15s); }
@keyframes msPop { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 70% { transform: scale(1.35) rotate(8deg); opacity: 1; } 100% { transform: none; } }
.msRs i { display: inline-block; }
body.reduceMotion .msRs i.new { animation: none; }
@media (max-width: 900px) { .msCard { font-size: 13px; } .msBig { font-size: 20px; } }

/* ---------- play view: the playfield fills the screen, Rhythia style ---------- */
.playView { --field: min(58vh, 44vw, 640px); position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #0b0b0f;
  display: grid; grid-template-rows: auto minmax(0, 1fr); }
.pvBg { position: absolute; inset: -60px; z-index: -1; display: none; background: center / cover no-repeat;
  filter: blur(28px) brightness(.32) saturate(1.25); transform: scale(1.1); transition: background-image .4s; }
body.pvMapBg .pvBg { display: block; }
/* the map's cover, blurred, under everything else in the view */
.pvField .canvasWrap.mapBg::before { display: none; }
.pvHead { display: grid; justify-items: center; gap: 6px; padding: 26px 16px 0; text-align: center; }
.pvTitle { font-size: 22px; font-weight: 600; max-width: min(900px, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvTitle b { font-family: 'Outfit', sans-serif; font-weight: 600; }
.pvTime { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pvBar { width: min(var(--field), 100%); height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pvBar > div { height: 100%; width: 0; background: #fff; }

.pvStage { display: grid; grid-template-columns: 1fr var(--field) 1fr; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 40px; padding: 10px 16px; min-height: 0; }
.pvField { grid-column: 2; grid-row: 1 / 3; display: grid; gap: 14px; align-self: center; }
.pvField .canvasWrap { width: var(--field); max-width: none; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .35); }
.pvHealth { height: 7px; background: rgba(255, 255, 255, .12); }
.pvStat { display: grid; justify-items: center; gap: 2px; }
.pvStat label, .pvCombo label { font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #d8d8e4; }
.pvStat b { font-size: 30px; font-weight: 700; }
.pvCombo { grid-column: 1; grid-row: 1; justify-self: end; display: grid; justify-items: center; gap: 10px; }
.tri { position: relative; width: 110px; height: 96px; display: grid; place-items: center; }
.tri svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tri polygon { fill: #17171c; stroke: #2c2c33; stroke-width: 4; stroke-linejoin: round; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.tri b { position: relative; margin-top: 26px; font-size: 30px; font-weight: 700; }
.tri b::after { content: 'x'; font-size: .8em; }
.pvPoints { grid-column: 3; grid-row: 1; justify-self: start; }
.pvAcc { grid-column: 1; grid-row: 2; justify-self: end; }
.pvMiss { grid-column: 3; grid-row: 2; justify-self: start; }
.diamond { width: 84px; height: 84px; display: grid; place-items: center; transform: rotate(45deg); border-radius: 6px;
  background: #15151b; border: 3px solid #2a2a33; box-shadow: 0 0 0 6px rgba(0, 0, 0, .35); }
.diamond b { transform: rotate(-45deg); font-size: 28px; font-weight: 700; }
.diamond b::after { content: 'x'; font-size: .8em; }

.pvCard { position: absolute; left: 24px; width: 230px; background: rgba(16, 16, 22, .88); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pvProfile { top: 22px; display: grid; gap: 10px; }
.pvProfile .stats { display: grid; grid-template-columns: repeat(3, auto); gap: 10px; justify-content: space-between; }
.pvProfile .stat b { font-size: 16px; }
.pvProfile .stat small, .pvProfile .stat label { font-size: 10px; }
.toolbox { bottom: 84px; display: grid; gap: 6px; }
.toolbox h4 { margin: 0 0 2px; font-size: 14px; }
.toolbox .sRow { padding: 4px 0; margin: 0; background: none; border: 0; font-size: 13px; }
.toolbox .warm { margin-top: 4px; flex-wrap: wrap; }
.toolbox .warmBar { width: 90px; }
.toolbox p { margin: 4px 0 0; font-size: 11px; }

.pvBtns { display: flex; align-items: center; gap: 8px; }

/* skills, gear, instincts, season and ranks as a panel over the play view */
.skillsBox { position: fixed; inset: 0; z-index: 13; display: flex; padding: 16px; background: rgba(0, 0, 0, .55); }
.skillsBox.hidden { display: none; }
.skillsBox .panel { position: relative; margin: auto; width: 100%; max-width: 1080px; max-height: 100%; overflow-y: auto; align-self: center; padding-top: 50px; }
.skillsBox .tabPage { max-height: none; }
.skillsClose { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; }

@media (max-width: 1100px) {
  .playView { --field: min(58vh, 70vw); overflow-y: auto; display: block; }
  .pvHead { padding-top: 16px; }
  .pvStage { column-gap: 14px; }
  .pvStat label, .pvCombo label { font-size: 12px; }
  .pvStat b { font-size: 20px; }
  .diamond { width: 56px; height: 56px; }
  .diamond b { font-size: 18px; }
  .pvCard { position: static; width: auto; margin: 12px 16px 0; }
  .pvBottom { margin: 12px 16px 16px; grid-template-columns: auto minmax(0, 1fr); }
  .pvBtns { grid-column: 1 / -1; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .playView { --field: calc(100vw - 32px); }
  .pvStage { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; row-gap: 12px; }
  .pvField { grid-column: 1 / -1; grid-row: 3; }
  .pvCombo, .pvAcc { justify-self: center; }
  .pvPoints, .pvMiss { justify-self: center; }
  .pvCombo { grid-row: 1; } .pvPoints { grid-row: 1; grid-column: 2; } .pvAcc { grid-row: 2; grid-column: 1; } .pvMiss { grid-row: 2; grid-column: 2; }
  .pvTitle { font-size: 16px; white-space: normal; }
}
.layout[hidden] { display: none; }

/* the map's skills beside the playfield: one line per skill, lit when this map trains it */
.pvSkills { left: auto; right: 20px; top: 50%; transform: translateY(-50%); width: 225px; display: grid; gap: 10px; background: none; border: 0; padding: 0; }
.pvSkills .profile { background: none; border: 0; padding: 0; }
.pvSkills .pRow { height: 18px; border: 0; display: grid; grid-template-columns: 76px 50px minmax(0, 1fr); align-items: center; gap: 6px; }
.pvSkills .pGraph { height: 15px; }
.pGraph { position: relative; height: 20px; }
.pvSkills .pRow svg { height: 15px; }
.pRow .ahead { fill: none; stroke: #8a8aa8; stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.pRow polygon { fill: color-mix(in srgb, var(--skill) 30%, transparent); }
.pDot { position: absolute; left: 0; top: 100%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px var(--skill); }
.pvSkills .pRow span { position: static; text-align: right; font-size: 11px; font-weight: 600; color: #7a7a8c; text-shadow: 0 1px 4px #000; }
.pvSkills .pRow:not(.lit) svg g { opacity: .45; }
.pvSkills .pRow:not(.lit) .pDot { background: #8a8aa8; box-shadow: none; }
.pvSkills .pRow.lit span { color: #fff; }
.pvSkills .pRow.pLocked { opacity: .4; }
.pvSkills .pRow.pLocked .pGraph { height: 1px; background: #2a2b33; }
.pvWarm { display: grid; gap: 6px; font-size: 11px; text-shadow: 0 1px 4px #000; }
.pvWarm > div:first-child { display: flex; justify-content: space-between; }
#warmLabel { font-weight: 600; color: #5fd4ff; }
#warmLabel[data-stage="warming"] { color: #ffd54f; }
#warmLabel[data-stage="warm"] { color: #ff8a3d; }
#warmLabel[data-stage="zone"] { color: #ff4f9a; }
.pvWarm .warmBar { width: 100%; height: 5px; }
.pvWarm .warmBar i { top: 9px; width: 0; height: 0; background: none; border-radius: 0; border: 6px solid transparent; border-bottom-color: #fff; border-top: 0; }
.pvWarm .warmBar i::after { position: absolute; top: 2px; left: 9px; font-size: 11px; letter-spacing: -2px; white-space: nowrap; }
.pvWarm .warmBar i[data-dir="up"]::after { content: '▸▸▸'; color: #ff8a3d; }
.pvWarm .warmBar i[data-dir="down"]::after { content: '◂◂◂'; color: #5fd4ff; left: auto; right: 9px; }
.pvWarm .warmBar i[data-dir="down"][data-edge="lo"]::after { right: auto; left: 9px; }
.pvWarm .warmBar i[data-dir="up"][data-edge="hi"]::after { left: auto; right: 9px; }
.pvWarm small { margin-top: 8px; color: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; font-size: 11px; }
@media (max-width: 1100px) { .pvSkills { transform: none; width: auto; } }
.pvWarm b { font-family: 'Outfit', sans-serif; }

/* first-hour goals (new players) and the "what next" hint, under warm-up */
.pvGoals { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 16, 22, .82); font-size: 13px; }
.pvGoals[hidden], .pvHint[hidden], .tabs button[hidden] { display: none; }
.pvGoals .gHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pvGoals .gHead b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.pvGoals .gSkip { width: 22px; height: 22px; padding: 0; font-size: 11px; line-height: 1; color: var(--muted); background: none; border-color: transparent; }
.pvGoals .gSkip:hover { color: var(--text); }
.pvGoals p { margin: 0; line-height: 1.35; }
.pvGoals small { color: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; font-size: 11px; }
.gBar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.gBar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.pvHint { justify-self: start; max-width: 100%; padding: 4px 10px; font-size: 12px; text-align: left; color: var(--muted); background: rgba(16, 16, 22, .7); border-color: var(--line); border-radius: 999px; }
.pvHint:hover { color: var(--text); }
/* a small dot on the button or tab a hint points to, and "new" on a tab that just opened */
.hintDot { position: relative; }
.hintDot::before { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.tabs button.isNew::after { content: 'new'; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; color: #101018; background: var(--accent-2); vertical-align: 1px; }

/* ---------- profile, laid out like a Rhythia profile ---------- */
.pp { position: fixed; inset: 0; z-index: 14; display: flex; background: rgba(0, 0, 0, .7); }
.pp.hidden { display: none; }
.ppBox { position: relative; margin: 0 auto; width: 100%; max-width: 1020px; height: 100%; overflow-y: auto; padding: 24px 16px 40px; }
/* a plain block, not a grid: grid rows squeezed the cards to fit the screen instead of scrolling */
.ppCard + .ppCard { margin-top: 16px; }
.ppClose { position: absolute; top: 34px; right: 26px; z-index: 2; width: 36px; height: 36px; padding: 0; background: rgba(0, 0, 0, .55); }
.ppCard { background: #141519; border: 1px solid #26272e; border-radius: 12px; overflow: hidden; }
.ppBanner { height: 200px; background: #1b1c22 center / cover; position: relative; }
.ppBanner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20, 21, 25, .9)); }
.ppId { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 0 16px 14px; margin-top: -60px; position: relative; }
.ppAvatar { position: relative; width: 140px; height: 140px; border-radius: 16px; background: radial-gradient(circle at 30% 30%, #2a2050, #120d24); border: 4px solid #141519; display: grid; place-items: center; }
.ppAvatar img { width: 62%; }
.ppAvatar i { position: absolute; right: 8px; bottom: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--good); border: 3px solid #141519; }
.ppName { display: grid; gap: 4px; padding-bottom: 6px; min-width: 0; }
.ppName b { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppName small { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text); }
.ppName small img { width: 26px; height: 26px; }
.ppBoxes { display: flex; gap: 8px; }
.ppBoxes div { display: grid; justify-items: center; gap: 4px; padding: 10px 16px; min-width: 104px; background: #1b1c22; border: 1px solid #2a2b33; border-radius: 10px; }
.ppBoxes small, .ppStats small, .psDetail small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ppBoxes b { font-size: 19px; }
.ppSince { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px 16px; border-top: 1px solid #26272e; font-size: 13px; color: var(--muted); }
.ppSince b { color: var(--text); font-family: 'Outfit', sans-serif; }
.ppSince em { font-style: normal; color: var(--good); }
.ppSince em b { color: var(--good); }
.ppH { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 18px; font-size: 16px; border-bottom: 1px solid #26272e; }
.ppH svg { width: 18px; height: 18px; }
.ppStats { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 16px 18px 6px; }
.ppStats div { display: grid; gap: 4px; }
.ppStats b { font-size: 18px; }
/* ---------- medals (profile section, hover card, unlock toast); drawn by mdSvg in js/game.js ---------- */
.mdHead { display: flex; align-items: center; gap: 14px; padding: 14px 18px 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mdHead b { color: var(--text); font-family: 'Outfit', sans-serif; font-size: 18px; }
.mdHead .mdBar { flex: 1; max-width: 260px; }
.mdBar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mdBar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7b4dff, #b98cff); }
.mdCat { padding: 10px 18px 6px; }
.mdCat h4 { display: flex; align-items: center; gap: 9px; margin: 8px 0 4px; font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; }
.mdCat h4 i { width: 4px; height: 18px; border-radius: 2px; background: #8b5cff; box-shadow: 0 0 8px rgba(139, 92, 255, .5); }
.mdCat h4 small { font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mdRow { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 12px 2px; border-top: 1px solid #23242b; }
.mdCat h4 + .mdRow { border-top: 0; }
.md { position: relative; display: block; width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; cursor: default; outline: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .55)) drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), filter .16s; }
.md:not(.on) { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.md:hover, .md:focus-visible { transform: translateY(-3px) scale(1.12); z-index: 1; }
.md.on:hover, .md.on:focus-visible { filter: drop-shadow(0 6px 7px rgba(0, 0, 0, .6)) drop-shadow(0 0 6px rgba(255, 255, 255, .12)); }
.md:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.reduceMotion .md { transition: none; }
body.reduceMotion .md:hover, body.reduceMotion .md:focus-visible { transform: none; }
.mdSvg { display: block; width: 100%; height: 100%; overflow: visible; }
.mdQ { font: 800 26px 'Outfit', sans-serif; fill: #6a6c78; }
@media (max-width: 640px) {
  .mdCat { padding: 8px 12px 4px; }
  .mdRow { gap: 6px 7px; }
  .md { width: 44px; height: 44px; }
}
.mdTip { position: fixed; left: 0; top: 0; z-index: 300; width: 272px; max-width: calc(100vw - 16px); padding: 10px; border-radius: 12px;
  background: #1a1b21; border: 1px solid #30313b; box-shadow: 0 14px 34px rgba(0, 0, 0, .6); pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s, transform .12s, visibility 0s .12s; }
.mdTip.on { opacity: 1; visibility: visible; transform: none; transition: opacity .12s, transform .12s; }
.mdTip.below { transform: translateY(-4px); }
.mdTip.on.below { transform: none; }
body.reduceMotion .mdTip { transition: none; transform: none; }
.mdTip::after { content: ''; position: absolute; left: var(--ax, 50%); top: 100%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: #1a1b21; border: solid #30313b; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.mdTip.below::after { top: 0; border-width: 1px 0 0 1px; }
.mdTipHead { padding: 0 4px 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.mdTipBody { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border-radius: 9px; background: #121318; border: 1px solid #262730; }
.mdTipIcon { width: 64px; height: 64px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.mdTipText { display: grid; gap: 4px; min-width: 0; }
.mdTipText b { font-family: 'Outfit', sans-serif; font-size: 19px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.mdTipText p { margin: 0; font-size: 12.5px; line-height: 1.35; color: #b7b9c6; }
.mdTipText em { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mdProg { display: grid; gap: 3px; margin-top: 2px; }
.mdTipFoot { padding: 8px 4px 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.achToast { display: flex; align-items: center; gap: 10px; }
.achToast div { display: grid; }
.achToast b { font-family: 'Outfit', sans-serif; font-size: 14px; }
.achToast small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #ffd54f; }
.achToast em { font-style: normal; font-size: 11px; color: var(--muted); }
.achTI { display: flex; flex-shrink: 0; width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)); animation: achPop .5s cubic-bezier(.3, 1.6, .5, 1); }
.achTI .mdSvg { flex-shrink: 0; width: 34px; height: 34px; }
.achTI.many { width: auto; }
.achTI.many .mdSvg + .mdSvg { margin-left: -14px; }
@keyframes achPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
body.reduceMotion .achTI { animation: none; }
.ppGraph { position: relative; height: 110px; margin: 6px 18px 16px; padding-left: 58px; }
.ppGraph span { position: absolute; left: 0; top: 0; font-size: 11px; color: var(--muted); }
.ppGraph svg { width: 100%; height: 100%; display: block; }
.ppGraph polyline { fill: none; stroke: #6f9bff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.psList { display: grid; gap: 8px; padding: 14px; }
.ppEmpty { margin: 4px; }
.psRow { background: #1b1c22; border: 1px solid #2a2b33; border-left: 4px solid var(--tier); border-radius: 10px; overflow: hidden; }
.psMain { width: 100%; display: grid; grid-template-columns: 116px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 0 12px 0 0; background: none; border: 0; border-radius: 0; text-align: left; }
.psMain:hover { background: #20212a; }
.psGrade { display: flex; align-items: baseline; gap: 8px; padding: 14px 12px; border-right: 1px solid #2a2b33; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; }
.psGrade b { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 800; }
.psTitle { display: grid; gap: 2px; min-width: 0; }
.psTitle b { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psTitle small { font-size: 12px; color: var(--muted); }
.psBadges { display: flex; gap: 6px; align-items: center; }
.psBadge { display: grid; justify-items: center; align-content: center; min-width: 44px; height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid #343540; background: #22232b; font-size: 13px; font-weight: 700; }
.psBadge.good { color: #3fd68f; border-color: #1f5a3f; background: #15281f; }
.psBadge.bad { color: #ff6b6b; border-color: #5a2a2e; background: #2a1719; }
.psBadge b { font-size: 12px; color: var(--text); }
.psBadge.rp { color: #7aa6ff; border-color: #2c3a5c; background: #182033; }
.psBadge.rp small { font-size: 10px; font-weight: 700; }
.psBadge.two { display: flex; gap: 10px; }
.psBadge.two > span { display: grid; justify-items: center; }
.psBadge.two > span:first-child small { color: var(--muted); }
.psMore { font-style: normal; color: var(--muted); font-size: 18px; transition: transform .2s; }
.psRow.open .psMore { transform: rotate(180deg); }
.psDetail { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding: 12px; border-top: 1px solid #2a2b33; }
.psDetail > div { display: grid; gap: 4px; padding: 10px 12px; background: #141519; border: 1px solid #2a2b33; border-radius: 8px; }
.psDetail p { grid-column: 1 / -1; margin: 0; }
.psPlay { grid-column: 1 / -1; justify-self: start; }
.ppMore { display: block; margin: 0 auto 16px; }
@media (max-width: 760px) {
  .ppBox { padding: 12px 12px 30px; }
  .ppClose { top: 22px; right: 22px; }
  .ppBanner { height: 130px; }
  .ppId { grid-template-columns: auto minmax(0, 1fr); margin-top: -44px; }
  .ppAvatar { width: 96px; height: 96px; }
  .ppBoxes { grid-column: 1 / -1; }
  .ppBoxes div { flex: 1; min-width: 0; padding: 8px; }
  .psMain { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .psBadges { grid-column: 1 / -1; padding: 0 0 10px 12px; flex-wrap: wrap; }
  .psMore { grid-row: 1; grid-column: 3; }
}
.pvProfile[hidden] { display: none; }

/* map browser background: the picked map's cover, blurred, instead of the flat purple */
.select { overflow: hidden; background: #08070c; }
.selBg { position: absolute; inset: -80px; background: center / cover no-repeat; filter: blur(36px) brightness(.38) saturate(1.3);
  transform: scale(1.1); opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.selBg.on { opacity: 1; }
.select::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(6, 6, 10, .55)); }
.selBox { position: relative; z-index: 1; }
body.reduceMotion .selBg { transition: none; }
.selStats small.up { color: #ff8a3d; font-size: 11px; }
.selStats small.down { color: #5fd4ff; font-size: 11px; }

/* ---------- pressing Play: the browser zooms out, the play view zooms in ---------- */
.select.launching { animation: launchOut .42s cubic-bezier(.6, 0, .8, .4) forwards; pointer-events: none; }
.select.launching .selLeft { animation: launchLeft .42s cubic-bezier(.6, 0, .8, .4) forwards; }
.select.launching .selRight { animation: launchRight .42s cubic-bezier(.6, 0, .8, .4) forwards; }
.select.launching .selCoverWrap { animation: launchCover .42s cubic-bezier(.3, 0, .6, 1) forwards; }
.select.launching .selPlay { animation: launchPress .2s ease-out; }
@keyframes launchOut { 70% { opacity: 1; } to { opacity: 0; } }
@keyframes launchLeft { to { transform: translateX(-40px) scale(.96); opacity: 0; } }
@keyframes launchRight { to { transform: translateX(80px); opacity: 0; } }
@keyframes launchCover { 40% { transform: scale(1.06); filter: brightness(1.3); } to { transform: scale(1.25); filter: brightness(2); opacity: 0; } }
@keyframes launchPress { 40% { transform: scale(.95); } }
.playView.entering .pvStage { animation: pvZoom .6s cubic-bezier(.2, .8, .2, 1) both; }
.playView.entering .pvHead { animation: pvDrop .5s cubic-bezier(.2, .8, .2, 1) .1s both; }
.playView.entering .pvBottom { animation: pvRise .5s cubic-bezier(.2, .8, .2, 1) .15s both; }
.playView.entering .pvCard { animation: pvFade .5s ease-out .2s both; }
.playView.entering .pvBg { animation: pvFade .7s ease-out both; }
.playView.entering .pvAbort, .playView.entering .pvScore { animation: pvDrop .5s cubic-bezier(.2, .8, .2, 1) .1s both; }
.playView.entering .mp { animation: pvRise .5s cubic-bezier(.2, .8, .2, 1) .15s both; }
.playView.entering .ticker { animation: pvFade .5s ease-out .2s both; }
@keyframes pvZoom { from { opacity: 0; transform: scale(.88); } }
@keyframes pvDrop { from { opacity: 0; transform: translateY(-24px); } }
@keyframes pvRise { from { opacity: 0; transform: translateY(24px); } }
@keyframes pvFade { from { opacity: 0; } }

/* ---------- volume rings, bottom right ---------- */
.vol { position: fixed; right: 28px; bottom: 90px; z-index: 30; width: 300px; height: 240px; pointer-events: none;
  opacity: 0; transform: translateX(30px); transition: opacity .25s, transform .25s; }
.vol.show { opacity: 1; transform: none; pointer-events: auto; }
.volRing { position: absolute; display: grid; place-content: center; text-align: center; border-radius: 50%;
  background: rgba(14, 14, 20, .92); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); transition: transform .15s; }
.volRing svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.volRing circle { fill: none; stroke-width: 6; }
.volTrack { stroke: rgba(255, 255, 255, .22); stroke-width: 1.2; }
.volRing[data-vol="master"] .volArc { stroke-width: 7; }
.volArc { stroke: var(--c); stroke-linecap: round; transition: stroke-dasharray .12s; }
.volRing span { font-size: 11px; color: var(--muted); }
.volRing b { font-family: inherit; font-size: 16px; font-weight: 600; }
.volRing.on { transform: scale(1.06); }
.volRing.on span { color: var(--text); }
.volRing[data-vol="music"] { width: 104px; height: 104px; left: 70px; top: 0; }
.volRing[data-vol="effects"] { width: 96px; height: 96px; left: 0; top: 98px; }
.volRing[data-vol="master"] { width: 140px; height: 140px; right: 0; bottom: 0; }
.volRing[data-vol="master"] b { font-size: 22px; }
body.reduceMotion .select.launching, body.reduceMotion .playView.entering * { animation: none !important; }
.selList { overflow-x: hidden; }

/* ---------- settings dock left; the game moves right to act as a live preview ---------- */
@media (min-width: 1200px) {
  .settings { background: linear-gradient(90deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .35) 720px, rgba(0, 0, 0, .1)); }
  .setBox { margin: 0 auto 0 16px; max-width: 660px; }
  .playView .pvStage, .playView .pvHead { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  body.setOpen .playView .pvStage { transform: translateX(min(340px, calc(50vw - 560px + 340px))) scale(.82); }
  body.setOpen .playView .pvHead { transform: translateX(340px) scale(.85); }
}
@keyframes setIn { from { opacity: 0; transform: translateX(-40px); } }
body.reduceMotion .setBox { animation: none; }
.onlineFind input { height: 42px; font-size: 15px; }
.favBtn { height: 42px; width: 42px; }

/* ---------- play view scoreboard, left side ---------- */
.pvBoard { position: absolute; left: 70px; top: 50%; transform: translateY(-55%); display: grid; gap: 14px; width: 300px; }
.pbRow { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; opacity: .92; }
.pbRow .pbAv, .pbRow .pbTx { display: contents; }   /* picture and text set apart (an animated avatar keeps playing) */
.pbRow .oAvatar { width: 42px; height: 42px; border-radius: 6px; font-size: 17px; }
.pbRow b { display: block; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbRow small { display: block; font-size: 14px; font-weight: 600; color: #b9b9c4; white-space: nowrap; }
.pbRow.me { opacity: 1; }
.pbRow.me b { color: #fff; }
.pbRow.me.up .oAvatar { animation: pbUp .7s ease-out; }
.pbRow.me.up b { animation: pbUpText .9s ease-out; }
@keyframes pbUp { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); transform: scale(1.18); } 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); transform: none; } }
@keyframes pbUpText { 0%, 30% { color: var(--good); text-shadow: 0 0 12px color-mix(in srgb, var(--good) 70%, transparent); } }
/* the stats lean in toward the field, like Rhythia's angled HUD */
.pvStage .pvCombo, .pvStage .pvAcc { transform: perspective(700px) rotateY(14deg); }
.pvStage .pvPoints, .pvStage .pvMiss { transform: perspective(700px) rotateY(-14deg); }
@media (max-width: 1500px) { .pvBoard { left: 24px; width: 240px; } .pbRow b { font-size: 15px; } .pbRow small { font-size: 12px; } }
@media (max-width: 1100px) { .pvBoard { display: none; } }
.pbRow b, .pvStat b, .tri b { font-family: inherit; }

/* skills panel: XP this play and the level next to each skill */
.pXp { font-style: normal; font-size: 12px; font-weight: 700; text-align: right; color: var(--skill); white-space: nowrap; text-shadow: 0 1px 4px #000; }
.pvSkills .pRow:not(.lit) .pXp { color: #7a7a8c; }
.pLvl { font-size: 11px; font-weight: 600; color: #8f8fa3; margin-left: 2px; }
.pvSkills .pRow.gain .pXp { animation: xpPop .45s ease-out; }
.pvSkills .pRow.gain span { animation: xpGlow .6s ease-out; }
@keyframes xpPop { 30% { transform: scale(1.25); filter: brightness(1.6); } }
@keyframes xpGlow { 30% { text-shadow: 0 0 10px var(--skill), 0 1px 4px #000; } }
body.reduceMotion .pvSkills .pRow.gain .pXp, body.reduceMotion .pvSkills .pRow.gain span { animation: none; }
.pvSkills .pRow .pXp { opacity: .8; font-size: 10px; }
.pvSkills .pRow.lost .pXp { color: #8a8a9a; text-decoration: line-through; opacity: .7; }
.pvSkills .pRow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- back to the menu: the browser slides away, the title comes in ---------- */
.select.closing { animation: launchOut .28s ease-in forwards; pointer-events: none; }
.select.closing .selLeft { animation: launchLeft .28s ease-in forwards; }
.select.closing .selRight { animation: launchRight .28s ease-in forwards; }
.title.entering .titleBg { animation: pvFade .7s ease-out both; }
.title.entering .titleLogo { animation: titleLogoIn .65s cubic-bezier(.2, .8, .2, 1) both; }
.title.entering .titleMenu button { animation: titleBtnIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.title.entering .titleMenu button:nth-child(1) { animation-delay: .12s; }
.title.entering .titleMenu button:nth-child(2) { animation-delay: .18s; }
.title.entering .titleMenu button:nth-child(3) { animation-delay: .24s; }
.title.entering .titleMenu button:nth-child(4) { animation-delay: .30s; }
.title.entering .titleBrand { animation: pvDrop .5s cubic-bezier(.2, .8, .2, 1) .2s both; }
.title.entering .titleNow { animation: pvFade .6s ease-out .3s both; }
@keyframes titleLogoIn { from { opacity: 0; transform: scale(.6) rotate(-25deg); } }
@keyframes titleBtnIn { from { opacity: 0; transform: translateX(60px); } }
body.reduceMotion .title.entering *, body.reduceMotion .select.closing, body.reduceMotion .select.closing * { animation: none !important; }
/* XP waits grey during the play and lights up in the skill's colour when the map is passed */
.pvSkills .pRow .pXp { color: #8f8fa3; }
.pvSkills .pRow.banked .pXp { color: var(--skill); opacity: 1; animation: xpPop .5s ease-out; }

/* ---------- Online (F9) and Settings (Ctrl+O): in and out ---------- */
.online.opening, .settings.opening { animation: selFade .25s ease-out; }
.online.opening .onlineBox { animation: panelRise .4s cubic-bezier(.2, .8, .2, 1) both; }
.online.opening .oPlayer { animation: selCardIn .4s cubic-bezier(.2, .8, .2, 1) both; }
.online.opening .oPlayer:nth-child(n+2) { animation-delay: .04s; } .online.opening .oPlayer:nth-child(n+3) { animation-delay: .08s; }
.online.opening .oPlayer:nth-child(n+4) { animation-delay: .12s; } .online.opening .oPlayer:nth-child(n+5) { animation-delay: .16s; }
.online.opening .oPlayer:nth-child(n+6) { animation-delay: .2s; }  .online.opening .oPlayer:nth-child(n+9) { animation-delay: .26s; }
.online.opening .chat { animation: pvRise .45s cubic-bezier(.2, .8, .2, 1) .1s both; }
.settings.opening .setBox { animation: setIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.settings.opening .sCard { animation: titleBtnIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.settings.opening .sCard:nth-child(2) { animation-delay: .03s; } .settings.opening .sCard:nth-child(3) { animation-delay: .06s; }
.settings.opening .sCard:nth-child(4) { animation-delay: .09s; } .settings.opening .sCard:nth-child(5) { animation-delay: .12s; }
.settings.opening .sCard:nth-child(n+6) { animation-delay: .15s; }
.online.closing, .settings.closing { animation: launchOut .2s ease-in forwards; pointer-events: none; }
.online.closing .onlineBox { animation: panelSink .2s ease-in forwards; }
.settings.closing .setBox { animation: setOut .2s ease-in forwards; }
@keyframes panelRise { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes panelSink { to { opacity: 0; transform: translateY(20px) scale(.98); } }
@keyframes setOut { to { opacity: 0; transform: translateX(-40px); } }
body.reduceMotion .online *, body.reduceMotion .settings * { animation: none !important; }

/* ---------- the play view's buttons, docked under the mods in the map browser ---------- */
.pvBtns.docked { margin-top: auto; width: 522px; justify-content: center; flex-wrap: wrap; padding: 10px;
  background: rgba(14, 14, 20, .72); border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; }
.pvBtns.docked > button:not(.iconBtn) { flex: 1; }
.select.opening .pvBtns.docked { animation: pvRise .5s cubic-bezier(.2, .8, .2, 1) .2s both; }

/* ---------- skills panel: misses marked where they happened, a fail greys the played part ---------- */
.pMiss line { stroke: #ff4d5e; stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .85; }
.pvSkills .pRow.hurt .pDot { animation: pHurt .5s ease-out; }
@keyframes pHurt { 30% { background: #ff4d5e; box-shadow: 0 0 10px #ff4d5e; transform: scale(1.6); } }
.pvSkills .pRow.failed polygon { fill: rgba(140, 140, 155, .18); }
.pvSkills .pRow.failed g:not(.pMiss) polyline { stroke: #8a8a9a; }
body.reduceMotion .pvSkills .pRow.hurt .pDot { animation: none; }

/* ---------- profile page: fades in, its cards rise one after another; sinks away on close ---------- */
.pp.opening { animation: selFade .25s ease-out; }
.pp.opening .ppCard { animation: panelRise .45s cubic-bezier(.2, .8, .2, 1) both; }
.pp.opening .ppCard:nth-of-type(2) { animation-delay: .05s; } .pp.opening .ppCard:nth-of-type(3) { animation-delay: .1s; }
.pp.opening .ppCard:nth-of-type(4) { animation-delay: .15s; } .pp.opening .ppCard:nth-of-type(n+5) { animation-delay: .2s; }
.pp.opening .ppBanner { animation: ppBanner .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ppBanner { from { transform: scale(1.08); filter: brightness(.4); } }
.pp.closing { animation: launchOut .2s ease-in forwards; pointer-events: none; }
.pp.closing .ppBox { animation: panelSink .2s ease-in forwards; }
body.reduceMotion .pp * { animation: none !important; }

/* ---------- profile header: Rhythia's mascot as the banner, Discord avatar ---------- */
.ppBanner { background: radial-gradient(ellipse at 78% 60%, rgba(111, 140, 255, .35), transparent 60%), linear-gradient(120deg, #101225, #1b1f3d 55%, #2a3270); overflow: hidden; }
.ppBanner img { position: absolute; z-index: 1; right: 8%; top: 8%; height: 84%; }
.ppAvatar.discord { overflow: hidden; }
.ppAvatar.discord img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.ppDiscord { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 9px; font-size: 12px; font-weight: 600;
  background: #5865f2; color: #fff; border: 0; border-radius: 8px; }
button.ppDiscord:hover { background: #4752c4; }
.ppDiscord svg { width: 16px; height: 16px; }
.ppDiscord.linked { background: rgba(88, 101, 242, .18); color: #c9cdfb; }
.ppDiscord.linked button { margin-left: 4px; padding: 2px 8px; font-size: 11px; background: rgba(0, 0, 0, .35); border-radius: 6px; }

/* ---------- results screen, Rhythia style ---------- */
.results { position: absolute; inset: 0; z-index: 8; display: flex; overflow: hidden; background: #0b0b0f; }
.rsBg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) brightness(.32) saturate(1.2); }
.rsBox { position: relative; margin: auto; width: 100%; max-width: 1760px; height: 100%; padding: 36px 56px 26px; overflow-y: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 48px; align-content: start; }
.rsHead { grid-column: 1 / -1; display: flex; align-items: stretch; gap: 26px; padding: 0 0 26px; }
.rsCover { width: min(300px, 22vw); aspect-ratio: 1; object-fit: cover; border-radius: 22px; border: 4px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); flex-shrink: 0; }
.rsMap { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rsMap h2 { margin: 6px 0 4px; font-size: clamp(22px, 2.4vw, 40px); line-height: 1.1; }
.rsMap b { font-size: clamp(16px, 1.6vw, 26px); }
.rsMap p { margin: auto 0 4px; font-size: clamp(16px, 1.6vw, 28px); font-weight: 700; }
.rsGrade { align-self: center; margin-right: 6%; font-size: clamp(70px, 8vw, 130px); font-weight: 800; line-height: 1; font-family: inherit;
  text-shadow: 0 6px 0 rgba(0, 0, 0, .55), 0 0 30px rgba(0, 0, 0, .4); }
.results h3 { margin: 0 0 12px; font-size: clamp(18px, 1.6vw, 26px); }
.rsCard { background: rgba(20, 20, 26, .55); border-radius: 22px; padding: 18px 22px; }
.rsStats { grid-row: 2 / 4; }
.rsRow { display: flex; align-items: center; gap: 14px; height: 52px; font-size: clamp(16px, 1.3vw, 22px); font-weight: 700; }
.rsRow i { flex: 1; height: 2px; background: rgba(255, 255, 255, .22); }
.rsRow b { font-family: inherit; }
.rsTimes { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.rsHealth { display: block; width: 100%; height: 130px; }
.rsHealth path { fill: none; stroke: url(#rsHp); stroke-width: 2; vector-effect: non-scaling-stroke; }
.rsMods { margin-top: 18px; }
.rsMods .rsCard { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; min-height: 64px; font-size: 26px; font-weight: 800; }
.rsMods small { font-size: 16px; color: var(--muted); font-weight: 600; }
.rsFoot { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.rsFoot button { background: none; border: 0; padding: 12px 18px; font-size: clamp(20px, 1.8vw, 30px); font-weight: 800; text-transform: uppercase; color: #eee; border-radius: 12px; }
.rsFoot button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.rsNext { flex: 1; display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.rsNext i { width: min(320px, 100%); height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .5); transform-origin: left; animation: rsWait var(--wait, 4s) linear both; }
@keyframes rsWait { to { transform: scaleX(0); } }
.results.opening { animation: selFade .3s ease-out; }
.results.opening .rsHead { animation: panelRise .45s cubic-bezier(.2, .8, .2, 1) both; }
.results.opening .rsStats { animation: panelRise .45s cubic-bezier(.2, .8, .2, 1) .06s both; }
.results.opening .rsGraph { animation: panelRise .45s cubic-bezier(.2, .8, .2, 1) .12s both; }
.results.opening .rsMods { animation: panelRise .45s cubic-bezier(.2, .8, .2, 1) .18s both; }
.results.opening .rsGrade { animation: rsGrade .6s cubic-bezier(.2, 1.4, .4, 1) .2s both; }
@keyframes rsGrade { from { opacity: 0; transform: scale(1.8); } }
.results.closing { animation: launchOut .2s ease-in forwards; pointer-events: none; }
body.reduceMotion .results * { animation: none !important; }
body.reduceMotion .rsNext i { display: none; }
@media (max-width: 900px) {
  .rsBox { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
  .rsStats { grid-row: auto; }
  .rsGraph { margin-top: 18px; }
  .rsCover { width: 110px; border-radius: 14px; }
}
.rsMap h2 { text-transform: none; letter-spacing: normal; color: #fff; font-family: inherit; }
.rsMap b { font-family: inherit; }

/* ---------- profile statistics: graph with the mascot, and title progression ---------- */
.ppPlot { position: relative; }
.ppPlot .ppGraph { margin-right: 150px; }
.ppMascot { position: absolute; right: 22px; bottom: 0; height: 120px; opacity: .28; pointer-events: none; }
.tp { border-top: 1px solid #26272e; padding: 16px 18px 6px; }
.tpHead { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.tpHead small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tpTabs { display: flex; gap: 4px; padding: 4px; border: 1px solid #2a2b33; border-radius: 10px; }
.tpTabs button { padding: 6px 14px; font-size: 13px; font-weight: 700; background: none; border: 0; color: var(--muted); border-radius: 7px; }
.tpTabs button.on { background: #24252c; color: #fff; }
.tpBars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.tpSeg { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.tpBar { position: relative; width: 100%; height: 8px; border-radius: 4px; background: #26272e; overflow: hidden; }
.tpBar i { position: absolute; inset: 0 auto 0 0; background: var(--t); border-radius: 4px; }
.tpSeg.gm .tpBar { width: calc(100% - 50px); justify-self: start; background: repeating-linear-gradient(90deg, #34353d 0 2px, transparent 2px 4px); }
.tpSeg em { position: absolute; right: 0; top: -4px; display: flex; gap: 2px; color: #55565f; }
.tpSeg em svg { width: 14px; height: 14px; }
.tpSeg.got em { color: var(--t); }
.tpSeg b { font-size: 12px; font-weight: 600; color: #6f707a; font-family: inherit; line-height: 1.25; }
.tpSeg.got b { color: #fff; }
.tpLabel { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.tpHist { display: grid; gap: 8px; margin-top: 14px; max-height: 220px; overflow-y: auto; }
.tpHist div { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; background: #18191e; border-radius: 10px; }
.tpHist img { width: 28px; }
.tpHist b { color: var(--t); font-family: inherit; }
.tpHist small { color: var(--muted); }
.tpHide { display: block; margin: 14px auto 6px; background: none; border: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.tpHide:hover { color: #fff; }
@media (max-width: 700px) { .tpBars { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; } .ppPlot .ppGraph { margin-right: 18px; } .ppMascot { display: none; } }

/* ---------- skills panel: rises in, its tab content follows; sinks away on close ---------- */
.skillsBox.opening { animation: selFade .25s ease-out; }
.skillsBox.opening .panel { animation: panelRise .4s cubic-bezier(.2, .8, .2, 1) both; }
.skillsBox.opening .tabs { animation: pvRise .4s cubic-bezier(.2, .8, .2, 1) .06s both; }
.skillsBox.opening .tabPage:not(.hidden) > * { animation: titleBtnIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.skillsBox.opening .tabPage:not(.hidden) > :nth-child(2) { animation-delay: .03s; } .skillsBox.opening .tabPage:not(.hidden) > :nth-child(3) { animation-delay: .06s; }
.skillsBox.opening .tabPage:not(.hidden) > :nth-child(4) { animation-delay: .09s; } .skillsBox.opening .tabPage:not(.hidden) > :nth-child(5) { animation-delay: .12s; }
.skillsBox.opening .tabPage:not(.hidden) > :nth-child(n+6) { animation-delay: .15s; }
.skillsBox.closing { animation: launchOut .2s ease-in forwards; pointer-events: none; }
.skillsBox.closing .panel { animation: panelSink .2s ease-in forwards; }
body.reduceMotion .skillsBox * { animation: none !important; }

/* ---------- Skills tab: a row per skill with its XP multiplier chain ---------- */
.ckHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.ckHead p { margin: 0; }
.ckLegend { display: flex; gap: 14px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.ckLegend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; background: var(--c); }
.ckRow { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 10px 14px;
  margin-bottom: 6px; background: rgba(255, 255, 255, .03); border-left: 3px solid var(--skill); border-radius: 8px; }
.ckTop { display: flex; justify-content: space-between; align-items: baseline; }
.ckTop b { font-size: 16px; font-family: inherit; color: var(--skill); }
.ckLvl { font-size: 13px; font-weight: 700; color: #cfcfdc; }
.ckInfo p { margin: 2px 0 4px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.ckUse { display: block; font-size: 12px; font-weight: 700; color: #e8e8f0; }
.ckUse span { margin-left: 6px; font-weight: 500; color: var(--muted); }
.ckLvBar { height: 3px; margin-top: 6px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; }
.ckLvBar i { display: block; height: 100%; background: var(--skill); }
.ckChain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ckChain em { font-style: normal; color: var(--muted); font-weight: 700; }
.ckCell { display: grid; justify-items: center; min-width: 78px; padding: 4px 10px; background: rgba(0, 0, 0, .3); border-radius: 6px; }
.ckCell small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.ckCell b { font-size: 15px; font-family: inherit; }
.ckCell.off b { color: #6f707a; }
.ckTotal { background: rgba(91, 227, 125, .12); }
.ckTotal b { color: #8ff0a8; }
.ckSplit { display: flex; gap: 3px; width: 100%; height: 4px; margin-top: 2px; }
.ckSplit i { height: 100%; border-radius: 2px; background: var(--c); }
.ckNote { margin-top: 10px; }

/* ---------- Gear tab: summary strip and a row per skill ---------- */
.gSum { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); margin-bottom: 12px; background: rgba(255, 255, 255, .03); border-radius: 10px; }
.gSum > div { padding: 10px 16px; border-left: 1px solid rgba(255, 255, 255, .06); }
.gSum > div:first-child { border-left: 0; }
.gSum small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gSum b { font-size: 20px; font-family: inherit; }
.gSum b span { font-size: 13px; color: var(--muted); font-weight: 600; }
.gSum b.good { color: #5be37d; }
.gSumBar { height: 3px; margin-top: 6px; background: rgba(255, 255, 255, .08); border-radius: 2px; }
.gSumBar i { display: block; height: 100%; background: #ff6b9a; border-radius: 2px; }
.gRow { display: grid; grid-template-columns: 190px minmax(0, 1fr) 170px; gap: 16px; align-items: center; padding: 9px 14px; margin-bottom: 5px;
  background: rgba(255, 255, 255, .03); border-left: 3px solid var(--skill); border-radius: 8px; }
.gName { display: grid; grid-template-columns: 1fr auto; row-gap: 1px; }
.gName b { font-size: 15px; font-family: inherit; color: var(--skill); }
.gName .gMult { grid-row: 2; font-size: 12px; font-weight: 700; color: #8ff0a8; }
.gName .gLvl { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.gNow { display: flex; align-items: baseline; gap: 8px; font-size: 14px; min-width: 0; }
.gNow b { font-family: inherit; white-space: nowrap; }
.gNow span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gNow em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.gTiers { display: flex; gap: 3px; margin-top: 6px; }
.gTiers i { position: relative; flex: 1; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.gTiers u { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--skill) 45%, transparent); }
.gTiers i.on u { background: var(--skill); }
.gBuy { position: relative; overflow: hidden; height: 34px; font-size: 13px; font-weight: 700; color: var(--muted); }
.gBuy span { position: relative; z-index: 1; }
.gBuy i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--skill); opacity: .8; }
.gBuy.can { color: #fff; border-color: var(--skill); background: color-mix(in srgb, var(--skill) 25%, #17171c); }
.gBuy.save { color: #cfcfdc; }
.gBuy.max { color: #5be37d; }
.skillsBox.opening .tabPage:not(.hidden) > .ckRow:nth-child(n+6), .skillsBox.opening .tabPage:not(.hidden) > .gRow:nth-child(n+6) { animation-delay: .18s; }
@media (max-width: 760px) {
  .ckRow, .gRow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ckHead { flex-direction: column; align-items: flex-start; }
  .gSum { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Instincts tab: constellation per skill ---------- */
.inHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.inHead h2 { margin: 0; font-size: 26px; text-transform: none; letter-spacing: 0; font-family: inherit; color: #fff; }
.inHead small { color: var(--muted); }
.inPts { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.inPts b { font-size: 22px; color: #ff6b9a; font-family: inherit; }
.inStage { display: grid; grid-template-columns: 1fr 2.6fr 1fr; align-items: center; margin-top: 4px; }
.inSide { display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 0; opacity: .45; transition: opacity .2s; color: #fff; font-size: 15px; }
.inSide:hover { opacity: .85; background: none; }
.inTree { width: 100%; display: block; overflow: visible; }
.inLines line { stroke: rgba(255, 255, 255, .16); stroke-width: 2; stroke-dasharray: 4 4; }
.inLines line.on { stroke: var(--skill); stroke-dasharray: none; stroke-width: 2.5; }
.inNode circle { fill: #0d0d12; stroke: rgba(255, 255, 255, .22); stroke-width: 2; }
.inNode text { fill: #6f707a; font-size: 12px; font-weight: 600; }
.inNode .inEff { font-size: 10px; font-weight: 500; fill: #55565f; }
.inNode.on circle { fill: var(--skill); stroke: var(--skill); }
.inNode.on text { fill: #fff; }
.inNode.on .inEff { fill: var(--skill); }
.inNode.next circle { stroke: var(--skill); stroke-width: 2.5; }
.inNode.next text { fill: #c9cad3; }
.inNode.can { cursor: pointer; }
.inNode.can circle { animation: inPulse 1.6s ease-in-out infinite; }
.inNode.can:hover circle { fill: color-mix(in srgb, var(--skill) 45%, #0d0d12); }
@keyframes inPulse { 50% { stroke-width: 5; stroke-opacity: .6; } }
.inHub circle { fill: var(--skill); filter: drop-shadow(0 0 14px var(--skill)); }
.inHub text { fill: #0b0b10; font-size: 14px; font-weight: 800; text-anchor: middle; }
.inMain.slideR { animation: inSlideR .35s cubic-bezier(.2, .8, .2, 1); }
.inMain.slideL { animation: inSlideL .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes inSlideR { from { opacity: 0; transform: translateX(40px) scale(.94); } }
@keyframes inSlideL { from { opacity: 0; transform: translateX(-40px) scale(.94); } }
.inBranches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.inBranch { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 9px 14px; background: rgba(255, 255, 255, .03); border-top: 2px solid var(--skill); border-radius: 8px; }
.inBranch b { font-family: inherit; color: #fff; }
.inBranch span { font-weight: 700; color: var(--skill); }
.inBranch small { grid-column: 1 / -1; font-size: 13px; color: #c9cad3; }
.inBranch em { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--muted); }
.inPick { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.inPick button { display: flex; gap: 6px; align-items: baseline; padding: 4px 10px; min-height: 0; font-size: 12px; font-weight: 600; color: var(--skill); background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.inPick button small { color: var(--muted); font-size: 10px; }
.inPick button.on { border-color: var(--skill); background: color-mix(in srgb, var(--skill) 14%, transparent); }
.inNote { margin-top: 10px; }
body.reduceMotion .inMain, body.reduceMotion .inNode circle { animation: none !important; }
@media (max-width: 760px) { .inStage { grid-template-columns: 1fr; } .inSide { display: none; } .inBranches { grid-template-columns: 1fr; } }

/* ---------- Season tab: prestige ---------- */
.snSum { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 12px; background: rgba(255, 255, 255, .03); border-radius: 10px; }
.snSum > div { padding: 10px 16px; border-left: 1px solid rgba(255, 255, 255, .06); }
.snSum > div:first-child { border-left: 0; }
.snSum small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.snSum b { font-size: 20px; font-family: inherit; color: #fff; }
.snSum b span { color: #ffd54f; }
.snSum b.good { color: #ffd54f; }
.snCard { padding: 16px 20px; background: rgba(255, 255, 255, .03); border-left: 3px solid #55565f; border-radius: 10px; }
.snCard.ready { border-left-color: #ffd54f; }
.snTop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.snTop h3 { margin: 0; font-size: 20px; color: #fff; text-transform: none; }
.snPips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.snPips i { width: 14px; height: 14px; transform: rotate(45deg); border: 2px solid #55565f; border-radius: 2px; }
.snPips i.on { background: #ffd54f; border-color: #ffd54f; box-shadow: 0 0 8px rgba(255, 213, 79, .5); }
.snPips i.part { border-color: #ffd54f; background: linear-gradient(225deg, #ffd54f66 var(--f), transparent var(--f)); }
.snGain { margin: 10px 0 12px; font-size: 14px; color: #8ff0a8; font-weight: 600; }
.snGain.later { color: var(--muted); }
.snProg { display: flex; justify-content: space-between; font-size: 13px; }
.snProg b { color: #fff; font-family: inherit; }
.snBar { height: 6px; margin: 6px 0 14px; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; }
.snBar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9f43, #ffd54f); border-radius: 3px; transition: width .4s; }
.snGo { width: 100%; padding: 10px; font-size: 15px; font-weight: 700; }
.snCard.ready .snGo { border-color: #ffd54f; color: #ffd54f; }
.snCard.ready .snGo:hover { background: rgba(255, 213, 79, .1); }
.snKeep { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.snKeep > div { padding: 10px 16px; background: rgba(255, 255, 255, .03); border-radius: 10px; }
.snKeep h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5be37d; }
.snKeep > div + div h4 { color: #ff6b6b; }
.snKeep ul { margin: 0; padding-left: 18px; color: #c9cad3; line-height: 1.6; }
.snNote { margin: 10px 0 16px; }
@media (max-width: 760px) { .snSum { grid-template-columns: repeat(2, 1fr); } .snKeep { grid-template-columns: 1fr; } }

/* ---------- lanes playfield: no box around the lanes, the cover shows through ---------- */
.pvField .canvasWrap.lanes { background: none; }

/* ---------- play view: top line, abort/quit, score corner, ticker, music player ---------- */
.pvAbort { position: absolute; top: 22px; left: 24px; display: flex; gap: 10px; z-index: 3; }
.pvAbort button { padding: 7px 18px; font-size: 15px; font-weight: 600; background: rgba(10, 10, 14, .6); border: 1.5px solid #ff6b9a; border-radius: 10px; color: #fff; }
.pvAbort button:hover { background: rgba(255, 107, 154, .18); }
.pvScore { position: absolute; top: 14px; right: 24px; display: grid; justify-items: end; gap: 2px; z-index: 3; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.pvScore > div:first-child { display: flex; align-items: center; gap: 10px; }
#scGrade { font-size: 34px; font-weight: 800; font-style: italic; font-family: inherit; line-height: 1; }
#scScore { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
#scAcc { font-size: 17px; font-weight: 700; color: #fff; }
.scMods { display: flex; gap: 6px; margin-top: 6px; }
.scMods img { height: 40px; }
.scMods span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: color-mix(in srgb, var(--c) 80%, #000); color: #fff; transform: rotate(-6deg); }
.scMods span svg { width: 24px; height: 24px; }
.scMods span b { font-size: 14px; }
.ticker { position: absolute; left: 24px; right: 470px; bottom: 16px; z-index: 3; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a line fades out after a while; the next message brings the ticker back */
.tkLine { color: #fff; text-shadow: 0 1px 6px #000; animation: tkIn .4s cubic-bezier(.2, .8, .2, 1), tkOut 1s ease-in 12s forwards; overflow: hidden; text-overflow: ellipsis; }
.tkLine .tkTime { color: #ffd54f; }
.tkLine b { color: #ffd54f; font-family: inherit; }
.tkLine.event { color: #8ff0a8; }
.tkLine.event b { color: inherit; }
@keyframes tkIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes tkOut { to { opacity: 0; } }
body.hideChat .ticker { display: none; }
.mp { position: absolute; right: 24px; bottom: 16px; width: 430px; z-index: 4; padding: 12px 14px; display: grid; gap: 8px;
  background: rgba(14, 12, 20, .9); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; }
.mpNow { display: flex; align-items: center; gap: 8px; min-width: 0; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mpMark { color: #ff6b9a; font-size: 12px; }
#mpTitle { flex: 1; min-width: 0; font-size: 15px; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpState { padding: 2px 8px; font-size: 12px; font-weight: 600; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.mpState.playing { color: #5be37d; }
.mpRow { display: flex; justify-content: space-between; align-items: center; }
.mpNext { padding: 0; background: none; border: 0; font-size: 14px; font-weight: 700; color: #ff6b9a; }
.mpNext:hover { background: none; color: #ff9cbc; }
.mpClock { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mpBar { display: flex; align-items: center; gap: 5px; min-width: 0; }
.mpBar > .iconBtn { width: 34px; height: 34px; min-width: 34px; flex-shrink: 0; aspect-ratio: 1; font-size: 15px; }
.mpBar .pvBtns { margin-left: auto; gap: 5px; min-width: 0; }
.mpBar .pvBtns .audioBtn { display: none; }
.mpBar .pvBtns button { padding: 8px 9px; font-size: 12.5px; min-width: 0; white-space: nowrap; }
.mpBar .onlineBtn .olWord { display: none; }   /* the bar only has room for the dot and the count */
.mpBar .pvBtns .iconBtn { padding: 0; width: 34px; height: 34px; min-width: 34px; flex-shrink: 0; }   /* round icon buttons keep their icon centred */
.iconBtn svg { display: block; flex-shrink: 0; }
.mpBar > .iconBtn svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .mp { left: 16px; right: 16px; width: auto; } .ticker { right: 16px; bottom: 170px; } .pvScore #scScore { font-size: 22px; } }

/* ---------- scrollbars: thin rounded thumbs that sit inside their panel, no arrows or track ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .28); }
::-webkit-scrollbar-thumb:active { background-color: var(--accent); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; } }

/* ---------- drop-downs: our own chevron and colours instead of the browser's box ---------- */
html select:not([multiple]) {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding: 8px 34px 8px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text);
  background-color: rgba(10, 10, 16, .85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239a9ab0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 11px 8px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px;
  transition: border-color .15s, background-color .15s;
}
html select:not([multiple]):hover { border-color: rgba(255, 255, 255, .22); background-color: rgba(18, 18, 26, .9); }
html select:not([multiple]):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
html select option { background: #14141c; color: var(--text); font-weight: 500; }
html select option:checked { background: #24243a; }
.dd { position: fixed; z-index: 200; display: grid; gap: 2px; padding: 5px; overflow-y: auto;
  background: #14141c; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  animation: ddIn .14s ease-out; transform-origin: top; }
.dd.up { transform-origin: bottom; }
.dd.out { animation: ddOut .12s ease-in forwards; pointer-events: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px) scaleY(.96); } }
@keyframes ddOut { to { opacity: 0; transform: translateY(-4px) scaleY(.96); } }
.dd button { display: block; width: 100%; padding: 8px 12px; text-align: left; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text); background: none; border: 0; border-radius: 8px; }
.dd button:hover { background: rgba(255, 255, 255, .07); }
.dd button.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: #fff; }
.dd button:disabled { opacity: .4; }
body.reduceMotion .dd { animation: none; }

/* Skill groups on the Skills and Gear tabs */
.grp { margin-bottom: 10px; }
.grpHead { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; padding: 7px 12px; margin-bottom: 6px; text-align: left;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); border-radius: 8px; color: #e8e8f0; font-size: 13px; }
.grpHead:hover { background: rgba(255, 255, 255, .07); }
.grpHead { cursor: pointer; user-select: none; }
.grpHead:focus-visible { outline: 2px solid rgba(255, 255, 255, .35); outline-offset: 1px; }
.grpSum { align-items: center; }
.grpSet { color: var(--muted); }
.grpSet.on, .grpSet.on b { color: #ffd54f; }
.grpSet small { margin-left: 3px; font-size: 11px; }
.grpBuy { height: 24px; padding: 0 10px; font-size: 12px; font-weight: 700; color: #5be37d; background: rgba(91, 227, 125, .12);
  border: 1px solid rgba(91, 227, 125, .4); border-radius: 6px; }
.grpBuy:hover { background: rgba(91, 227, 125, .22); }
.gTop { display: flex; gap: 10px; align-items: stretch; }
.gTop .gSum { flex: 1; min-width: 0; }
.gBuyAll { flex: 0 0 150px; height: auto; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: #5be37d; background: rgba(91, 227, 125, .12);
  border: 1px solid rgba(91, 227, 125, .4); border-radius: 10px; }
.gBuyAll:hover:not(:disabled) { background: rgba(91, 227, 125, .22); }
.gBuyAll:disabled { color: var(--muted); background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .06); cursor: default; }
.grpHead b { font-size: 14px; font-family: inherit; }
.grpHead > small { color: var(--muted); font-size: 12px; }
.grpDots { display: flex; gap: 3px; }
.grpDots i { width: 8px; height: 8px; border-radius: 50%; }
.grpSum { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.grpSum b { color: #e8e8f0; font-family: inherit; }
.grpSum .good, .grpSum .good b { color: #5be37d; }
.grpChev { width: 8px; height: 8px; margin: 0 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.grp.shut .grpChev { transform: rotate(-45deg); }
.grp.shut .grpBody { display: none; }
.grp.shut .grpHead { margin-bottom: 0; }

/* Up next queue, in the music player */
.mp { grid-template-columns: minmax(0, 1fr); }
.mpQueue { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mqHead { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.mqHead b { font-size: 13px; font-family: inherit; }
.mqHead small { flex: 1; font-size: 12px; color: var(--muted); }
.mqChev { width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.mqChev.shut { transform: rotate(-135deg); }
.mqList { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.mqList p { margin: 0 6px; font-size: 11px; }
.mqList p { margin: 2px 0; font-size: 12px; color: var(--muted); }
.mqRow { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 3px 6px; font-size: 13px; border-radius: 6px; cursor: pointer; }
.mqRow:hover { background: rgba(255, 255, 255, .06); }
.mqN { flex-shrink: 0; width: 12px; font-size: 11px; color: var(--muted); text-align: right; }
.mqStars { flex-shrink: 0; white-space: nowrap; width: 46px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mqTitle { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mqRow em { flex-shrink: 0; white-space: nowrap; font-style: normal; font-size: 11px; font-weight: 700; color: #ff6b9a; }
.mqRow button { flex-shrink: 0; width: 20px; height: 20px; padding: 0; font-size: 11px; line-height: 1; color: var(--muted); background: none; border: 0; opacity: 0; }
.mqRow:hover button { opacity: 1; }
.mqRow button:hover { color: #ff4f6d; background: none; }
.selQueue { min-width: 240px; margin-top: 6px; padding: 6px 16px; font-size: 13px; font-weight: 700; color: #cfcfdc; }
.selQueue small { margin-left: 4px; font-size: 11px; color: #ff6b9a; }
.pvBtns.docked .mpQueue { flex: 0 0 100%; max-width: 100%; margin-bottom: 4px; padding: 2px 4px 8px; }
.pvBtns.docked .mqRow button { opacity: .5; }
.mqMods { display: flex; flex-shrink: 0; gap: 2px; }
.mqMods i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.mqMods svg { width: 12px; height: 12px; }
.mqMods b { font-size: 9px; font-family: inherit; }

/* Rival line in the score corner */
.scRival { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.scRival b { color: #ffd54f; font-family: inherit; }
/* Ghost: live pace vs your rival, their row on the play board, and the line on the results */
.scRival[data-ghost="good"] .ghPace { color: #5be37d; }
.scRival[data-ghost="bad"] .ghPace { color: #ff6b81; }
.pbRow.ghRival .oAvatar { box-shadow: 0 0 0 2px #ffd54f; }
.pbGhost { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; vertical-align: 2px;
  font-size: 11px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #1a1a22; background: #ffd54f; }
.rsMap p.rsGhost { margin: 0 0 4px; font-size: clamp(14px, 1.2vw, 20px); }
.rsGhost.good { color: #5be37d; }
.rsGhost.bad { color: #ff9aa8; }
/* comeback boost: welcome back countdown pill under the score */
.comebackPill { margin-top: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #1a1206; background: #ffd54f; text-shadow: none; font-variant-numeric: tabular-nums; box-shadow: 0 0 10px rgba(255, 213, 79, .45); animation: comebackGlow 2s ease-in-out infinite; }
.comebackPill.calm { animation: none; }
@keyframes comebackGlow { 50% { box-shadow: 0 0 18px rgba(255, 213, 79, .8); } }
@media (prefers-reduced-motion: reduce) { .comebackPill { animation: none; } }
/* Daily maps in the map browser */
.dailyRow { margin: 6px 0; }
.dyHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.dyHead b { font-size: 13px; color: #ffd54f; font-family: inherit; }
.dyHead i { display: inline-grid; place-items: center; width: 16px; height: 16px; vertical-align: -3px; font-style: normal; font-size: 9px; color: var(--c); }
.dyHead svg { width: 13px; height: 13px; }
.dyCards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dyCard { display: grid; gap: 1px; height: auto; padding: 6px 8px; text-align: left; border-bottom: 2px solid var(--tier); }
.dyCard small { font-size: 10px; color: var(--tier); text-transform: uppercase; letter-spacing: .04em; }
.dyCard b { font-size: 12px; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dyCard span { font-size: 11px; color: var(--muted); }
.dyCard.done span { color: #5be37d; }
.dyCard.sel { background: #24243a; }

/* ---------- Weekly challenges (map browser row + profile card) ---------- */
.weeklyRow { margin: 6px 0; }
.wkHead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.wkHead b { font-size: 13px; color: #7c9dff; font-family: inherit; }
.wkHead em { font-style: normal; color: #ffd54f; }
.wkList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.wkItem { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 6px; padding: 5px 8px; background: rgba(255, 255, 255, .04); border-radius: 4px; font-size: 11px; }
.wkText { line-height: 1.25; }
.wkProg { color: var(--muted); font-variant-numeric: tabular-nums; }
.wkBar { grid-column: 1 / -1; display: block; height: 3px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; }
.wkBar i { display: block; height: 100%; background: #7c9dff; }
.wkItem.done .wkProg, .wkItem.done .wkText { color: #5be37d; }
.wkItem.done .wkBar i { background: #5be37d; }
.wkCard .wkList { gap: 6px; margin: 0 18px 16px; }
.wkCard .wkHead { margin: 10px 18px 6px; }
.wkCard .wkItem { font-size: 12px; padding: 8px 10px; }
.wkBadge { margin-left: auto; padding: 2px 8px; border-radius: 10px; font-size: 11px; color: #1a1a2a; background: #ffd54f; font-weight: 600; }
@media (max-width: 700px) { .wkList { grid-template-columns: 1fr; } }
.selDailyPlay { min-width: 240px; margin-top: 6px; padding: 7px 16px; display: flex; flex-direction: column; align-items: center; font-size: 15px; font-weight: 800;
  color: #ffd54f; background: rgba(255, 213, 79, .1); border-color: rgba(255, 213, 79, .5); }
.selDailyPlay small { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.mqRow em.mqDaily { color: #ffd54f; }
/* ---------- Weekly tournament (map browser card, play button, crowns) ---------- */
.tourneyRow { margin: 6px 0; }
.tnCard { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; height: auto; padding: 5px 8px 5px 5px;
  text-align: left; border: 1px solid rgba(255, 196, 92, .35); border-bottom: 2px solid #ffc45c; background: linear-gradient(90deg, rgba(255, 196, 92, .12), rgba(255, 255, 255, .02)); }
.tnCard img, .tnCard .noImg { width: 54px; height: 36px; object-fit: cover; border-radius: 3px; display: block; }
.tnText { display: grid; gap: 1px; min-width: 0; }
.tnText small { font-size: 10px; color: #ffc45c; text-transform: uppercase; letter-spacing: .04em; }
.tnText b { font-size: 12px; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnText > span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnCard.done .tnText > span { color: #5be37d; }
.tnCard.sel { background: #2a2636; }
.tnCount { font-size: 11px; color: var(--muted); white-space: nowrap; }
.selTourneyPlay { color: #ffc45c; background: rgba(255, 196, 92, .1); border-color: rgba(255, 196, 92, .5); }
.tnBoardHead { margin: 2px 4px 4px; color: var(--muted); }
.tnCrown { display: inline-block; margin-left: 4px; font-size: .95em; font-weight: 400; line-height: 1; font-style: normal; vertical-align: 0; }
.tnCrown.c1 { color: #ffd54f; }
.tnCrown.c2 { color: #cfd8e3; }
.tnCrown.c3 { color: #e0975a; }
/* Daily streak: chip on the daily row, badges on the profile */
.stkIcon { width: 13px; height: 13px; vertical-align: -2px; flex: none; }
.stkHead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dyHead .stkChip svg { width: 13px; height: 13px; }
.stkChip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 10px; font-size: 11px; white-space: nowrap;
  color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid #2c2d36; }
.stkChip > b { font-size: 12px; color: var(--text); }
.stkChip.on { color: #ffb74d; border-color: rgba(255, 140, 60, .45); background: rgba(255, 120, 40, .08); }
.stkChip.on > b { color: #ffb74d; }
.stkChip.due > .stkIcon { color: #ffb74d; opacity: .6; }
.stkChip.off > .stkIcon { opacity: .4; }
.stkChip > span { color: var(--muted); }
.stkChip.on > span { color: #e0b48a; }
.stkFreeze { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; font-style: normal; color: #7fd3ff; }
.stkFreeze.used { color: var(--muted); opacity: .6; }
.stkChip.on > .stkIcon { animation: stkFlicker 1.6s ease-in-out infinite; }
body.reduceMotion .stkChip.on > .stkIcon { animation: none; }
@keyframes stkFlicker { 50% { transform: scale(1.12) translateY(-1px); filter: brightness(1.25); } }
.stkBadges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; }
.stkBadge { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px 1px 5px; border-radius: 9px; font-size: 11px;
  color: var(--c); border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.stkBadge b { font-family: 'Outfit', sans-serif; font-size: 12px; }
.stkBadge.locked { color: #555866; border-color: #33343d; background: none; }
.stkBadges small { margin-left: 4px; font-size: 12px; color: var(--muted); }
.stkBadges small b { color: var(--text); font-size: 12px; }
/* Welcome-back report */
.modal.wide .modalBox { max-width: 600px; }
.awR h3 { margin: 0; font-size: 22px; }
.awSub { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
.awStats { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 6px; }
.awStats > div { padding: 8px 10px; background: rgba(255, 255, 255, .04); border-radius: 8px; }
.awStats small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.awStats b { font-size: 18px; font-family: inherit; }
.awStats b span { font-size: 11px; font-weight: 600; color: var(--muted); }
.awStats .up { color: #5be37d; font-size: 12px; }
.awStats .down { color: #ff4f6d; font-size: 12px; }
.awBest { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px; background: rgba(255, 255, 255, .04); border-radius: 8px; }
.awBest img, .awBest > span { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: rgba(255, 255, 255, .06); flex-shrink: 0; }
.awBest small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.awBest b { display: block; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.awBest span { font-size: 12px; color: #cfcfdc; }
.awBest em { font-style: normal; font-weight: 800; }
.awBest > div { min-width: 0; }

/* ---------- Season recap card, season badges, profile frame ---------- */
.srCard { position: relative; padding: 6px 2px 2px; text-align: center; }
.srCard::before { content: ''; position: absolute; inset: -18px -18px auto; height: 160px; pointer-events: none; border-radius: 12px 12px 0 0;
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--t) 30%, transparent), transparent 70%); }
.srKicker { position: relative; margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.srTitle { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.srTitle img { width: 72px; height: 72px; object-fit: contain; }
.srTitle div { text-align: left; }
.srTitle small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.srTitle b { font-family: 'Outfit', sans-serif; font-size: 30px; font-weight: 800; }
.srGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: left; }
.srStat { padding: 10px 12px; background: rgba(255, 255, 255, .04); border-radius: 8px; border-top: 2px solid color-mix(in srgb, var(--t) 55%, transparent); }
.srStat small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.srStat b { display: block; font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; }
.srStat > span { font-size: 12px; color: var(--muted); }
.srStat .up { font-style: normal; color: #5be37d; font-weight: 800; }
.srBest { display: flex; gap: 12px; align-items: center; margin-top: 8px; text-align: left; }
.srBest img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.srBest > div { min-width: 0; }
.srBest b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srBest span { font-size: 12px; color: #cfcfdc; }
.srBest em { font-style: normal; font-weight: 800; }
.srBadge { margin: 8px 0 0; font-size: 13px; color: #cfcfdc; text-align: center; border-top: 0; background: none; }
.srBadge b { display: inline; font-size: inherit; }
.srStrip { padding: 14px 18px 16px; }
.srAnim .srTitle { animation: srPop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.srAnim .srStat { transition: opacity .45s ease-out, transform .45s ease-out; }
.srAnim .srStat.srHide { opacity: 0; transform: translateY(12px); }
@keyframes srPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .srGrid { grid-template-columns: repeat(2, 1fr); } .srTitle b { font-size: 22px; } }
.srStrip { display: flex; flex-wrap: wrap; gap: 8px; }
.srChip { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 8px 10px 6px; border-radius: 10px; cursor: default;
  background: linear-gradient(180deg, color-mix(in srgb, var(--t) 18%, transparent), rgba(255, 255, 255, .03)); border: 1px solid color-mix(in srgb, var(--t) 60%, transparent); }
.srChip img { width: 30px; height: 30px; object-fit: contain; }
.srChip b { font-family: 'Outfit', sans-serif; font-size: 14px; color: var(--t); }
.srChip small { font-size: 11px; color: var(--muted); }
.ppAvatar.srFramed { border-color: var(--sr); box-shadow: 0 0 0 2px #141519, 0 0 18px color-mix(in srgb, var(--sr) 55%, transparent); }
.ppName b.srName { text-shadow: 0 0 14px color-mix(in srgb, currentColor 45%, transparent); }
.awLv { margin-top: 8px; }
.awLv small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.awLv div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.awLv i { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 5px; color: var(--skill); background: color-mix(in srgb, var(--skill) 14%, transparent); }
.awList { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.awRival { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.awRival b { color: #ffd54f; }
#awRank { font-size: inherit; color: inherit; }
/* Now playing, above the queue in the map browser */
.mqNow { display: none; }
.pvBtns.docked .mqNow { min-width: 0; grid-template-columns: minmax(0, 1fr); display: grid; gap: 4px; padding: 0 2px 8px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mqNowTop { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.mqNowTag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #ff6b9a; white-space: nowrap; }
.mqNowGrade { font-size: 15px; font-family: inherit; }
.mqNowAcc { font-size: 12px; font-weight: 700; color: #cfcfdc; font-variant-numeric: tabular-nums; }
.mqNowBar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mqNowBar i { display: block; height: 100%; background: #ff6b9a; }
.mqNowBar.fail i { background: #ff4f6d; }
.mqNowTime { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pvBtns.docked .mqNow { cursor: pointer; border-radius: 6px; }
.pvBtns.docked .mqNow:hover .mqWatch { background: rgba(255, 107, 154, .25); }
.mqWatch { height: 22px; padding: 0 9px; font-size: 11px; font-weight: 800; color: #ff6b9a; background: rgba(255, 107, 154, .12);
  border: 1px solid rgba(255, 107, 154, .45); border-radius: 6px; white-space: nowrap; }

/* Catching up on time away: a progress screen while a long absence is played out */
.catchUp { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(8, 8, 14, .82); backdrop-filter: blur(6px); transition: opacity .35s; }
.catchUp.done { opacity: 0; pointer-events: none; }
.catchUp > div { display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); padding: 20px 22px; border-radius: 12px; background: rgba(20, 20, 30, .92); border: 1px solid rgba(255, 255, 255, .08); }
.catchUp b { font-size: 18px; }
.catchUp small { font-size: 13px; color: var(--muted); }
.cuBar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cuBar i { display: block; width: 0; height: 100%; background: #ff6b9a; transition: width .1s; }

/* Season tab: switch the queue to chasing RP */
button.snChase { width: 100%; margin-top: 8px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: #ffd54f; background: rgba(255, 213, 79, .1); border: 1px solid rgba(255, 213, 79, .3); border-radius: 8px; }
button.snChase:hover { background: rgba(255, 213, 79, .18); }
p.snChase { margin: 8px 0 0; color: #ffd54f; }

/* Phones: the play view is one scrolling column; the music player and chat line sit below the skills
   instead of over the playfield, and the title clears the abort buttons and the score */
@media (max-width: 760px) {
  .pvAbort { top: 12px; left: 16px; }
  .pvAbort button { padding: 5px 12px; font-size: 13px; }
  .pvScore { top: 8px; right: 16px; }
  .pvScore .scRival { display: none; }
  .pvHead { padding-top: 64px; }
  .pvTitle { font-size: 17px; }
  .pvTime { font-size: 15px; }
  .ticker { position: static; margin: 12px 16px 0; font-size: 14px; }
  .mp { position: static; width: auto; margin: 12px 16px 16px; }
}
/* phones: the banner mascot moves aside so it doesn't sit on the player's name */
@media (max-width: 520px) { .ppBanner img { opacity: .35; right: -30px !important; left: auto !important; } }

/* Long song names in the music player and Up next scroll across and back (marquee() in game.js) */
#mpTitle > span, .mqTitle > span { display: inline-block; }
#mpTitle.marq, .mqTitle.marq { text-overflow: clip; mask-image: linear-gradient(90deg, #000 88%, transparent); }
#mpTitle.marq > span, .mqTitle.marq > span { animation: marq var(--dur, 8s) ease-in-out infinite; }
#mpTitle.marq:hover > span, .mqTitle.marq:hover > span { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { #mpTitle.marq > span, .mqTitle.marq > span { animation: none; } #mpTitle.marq, .mqTitle.marq { text-overflow: ellipsis; mask-image: none; } }

/* game stats window (Ctrl+Shift+G, owner only) */
.adminStats { position: fixed; right: 16px; bottom: 16px; z-index: 900; width: min(380px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column; background: rgba(16, 14, 28, .97); border: 1px solid #3a3360; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); font-size: 13px; }
.asHead { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 14px; border-bottom: 1px solid #2a2545; }
.asHead > span { display: flex; gap: 4px; }
.asHead .iconBtn { width: 28px; height: 28px; min-width: 0; padding: 0; font-size: 14px; }
.asBody { overflow-y: auto; overflow-x: hidden; padding: 10px 14px 12px; }
.asBody h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #a9a3c9; }
.asBody h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.asTiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.asTile { background: #1d1a33; border-radius: 8px; padding: 7px 8px; display: flex; flex-direction: column; min-width: 0; }
.asTile b { font-size: 18px; }
.asTile small { color: #a9a3c9; }
.asTile em { font-style: normal; font-size: 11px; color: #7fd9a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asBars { display: flex; align-items: flex-end; gap: 3px; height: 56px; }
.asBars span { flex: 1; height: 100%; position: relative; background: #1d1a33; border-radius: 3px; overflow: hidden; }
.asBars i, .asBars b { position: absolute; left: 0; right: 0; bottom: 0; }
.asBars i { background: #6f62c9; }
.asBars b { background: #7fd9a8; left: 30%; right: 30%; }
.asNew { color: #7fd9a8; }
.asList { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.asList li { display: flex; justify-content: space-between; gap: 10px; }
.asList li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asList li b { flex-shrink: 0; }
.asErr li { flex-direction: column; gap: 0; }
.asErr li span { color: #ff9a9a; white-space: normal; }
.asFlags li, .asLog li { align-items: flex-start; }
.asFlags li span, .asLog li span { white-space: normal; }
.asFlags small button { padding: 0 6px; font-size: 11px; line-height: 18px; margin-left: 4px; }
.asName { cursor: pointer; text-decoration: underline dotted; }
.asKind { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: #4a2234; color: #ffb3c7; margin: 0 4px; }
.asFlagged { display: grid; gap: 4px; }
.asFP { border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(255,255,255,.03); }
.asFP[open] { background: rgba(255,255,255,.05); }
.asFP > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 6px 10px; cursor: pointer; list-style: none; }
.asFP > summary::-webkit-details-marker { display: none; }
.asFP > summary::before { content: '\25B8'; color: #9aa0b8; font-size: 11px; transition: transform .15s; }
.asFP[open] > summary::before { transform: rotate(90deg); }
.asFP .asName { cursor: pointer; }
.asFPrp { color: #9aa0b8; }
.asFPkinds { display: flex; flex-wrap: wrap; gap: 3px; order: 5; flex-basis: 100%; padding-left: 14px; }
.asFP .asFlags li > small { white-space: nowrap; }
.asFPkinds .asKind { margin: 0; }
.asFPat { margin-left: auto; color: #9aa0b8; white-space: nowrap; }
.asFPat button { padding: 0 6px; font-size: 11px; line-height: 18px; margin-left: 4px; }
.asFP > ol, .asFP > p { padding: 0 10px 8px 22px; margin: 0; }
.asFlagAll { padding: 0 8px; font-size: 11px; line-height: 18px; margin-left: 6px; }
.asLog li span small { color: var(--muted); }
.asKey { display: flex; gap: 6px; margin-top: 6px; }
.asKey input { flex: 1; min-width: 0; }
.asServer { margin-top: 12px; line-height: 1.5; }

/* Discord login gate */
.dGate { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 30%, rgba(88, 101, 242, .25), transparent 60%), rgba(8, 7, 16, .94); backdrop-filter: blur(6px); }
.dGate.hidden { display: none; }
.dGateBox { width: min(420px, 100%); text-align: center; background: #15132a; border: 1px solid #2f2a52; border-radius: 16px; padding: 28px 24px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.dGateLogo { width: 72px; height: 72px; object-fit: contain; }
.dGateBox h2 { margin: 10px 0 8px; }
.dGateBox p { color: #b9b4d6; line-height: 1.45; margin: 0 0 16px; }
.dGateBtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-radius: 10px;
  background: #5865f2; color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.dGateBtn:hover { background: #4752c4; }
.dGateBtn svg { width: 22px; height: 22px; }
.dGateBox .dGateNote { margin: 12px 0 0; }
.dGateBox .dGateMsg { margin: 8px 0 0; color: #ffcf7a; min-height: 1em; }

/* Discord pictures inside the small round avatars */
.oAvatar, .sbAv { overflow: hidden; }
.oAvatar img.dcAv, .sbAv img.dcAv { width: 100%; height: 100%; object-fit: cover; display: block; }

.asErr .asStack { margin: 4px 0 0; font-size: 10.5px; line-height: 1.35; color: var(--muted); white-space: pre-wrap; word-break: break-all; }

/* "A new version is out" bar */
.updateBar { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 1500; display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 32px); padding: 8px 8px 8px 16px; border-radius: 10px; background: #1d1a36; border: 1px solid var(--accent, #7c6cff);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); font-weight: 600; font-size: 14px; }
.updateBar button { padding: 6px 14px; border: 0; border-radius: 8px; background: var(--accent, #7c6cff); color: #fff; font: inherit; cursor: pointer; }

/* ---------- spectating another player ---------- */
.specBar { position: relative; z-index: 6; display: flex; width: max-content; margin: 10px auto 0; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 6px 8px 6px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(10, 10, 16, .88); box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font-size: 14px; white-space: nowrap; }
.specBar.hidden { display: none; }
.specBar > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.specEye { color: #ff4f6d; animation: specPulse 1.6s ease-in-out infinite; }
@keyframes specPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .specEye { animation: none; } }
.specBar small { color: var(--muted); font-variant-numeric: tabular-nums; }
.specBar button { min-height: 0; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.specBar button:hover { border-color: var(--accent); }
body.spectating .pvAbort, body.spectating #mpQueue, body.spectating .mpRow,
body.spectating .pvBoard, body.spectating .pvWarm, body.spectating .pvGoals, body.spectating .pvHint, body.spectating #results, body.spectating #scRival, body.spectating #watchedBy { display: none !important; }
.watchedBy { margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: rgba(10, 10, 16, .7); border: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: var(--muted); }
.watchedBy b { color: #fff; }
.watchedBy.hidden { display: none; }
.oWatch { align-self: flex-start; margin-top: 2px; line-height: 16px; box-sizing: border-box; min-height: 0; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .3); color: #e8e8f0; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.oWatch:hover { border-color: var(--accent); color: #fff; }
.oWatch.ghost { visibility: hidden; }   /* keeps every card's lines at the same height */
@media (max-width: 600px) { .specBar { font-size: 12px; gap: 6px; } .specBar small { display: none; } }

.dd .ddGroup { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid rgba(255, 255, 255, .06); }
.sMods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sMods button { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.sMods button svg { width: 16px; height: 16px; }
.sMods button.locked { opacity: .45; }
.sMods button b { color: var(--c); }
.sMods button.on { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.sMods button.on svg, .sMods button.on b { color: var(--c); }

/* Patch notes window */
.modal.notes .modalBox { max-width: 640px; display: flex; flex-direction: column; max-height: min(86vh, 760px); }
.pnHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pnHead h3 { margin: 0; }
.pnHead span { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; }
.pnHead i { font-style: normal; color: var(--c); display: inline-flex; align-items: center; gap: 5px; }
.pnHead i::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.modal.notes #modalBody { min-height: 0; display: flex; flex-direction: column; }
.pnBody { overflow-y: auto; min-height: 0; padding-right: 6px; }
.pnUpdate + .pnUpdate { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pnUpdate h4 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: baseline; gap: 10px; }
.pnUpdate h4 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.pnKind { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 8px 0 8px 10px; border-left: 3px solid var(--c); margin-bottom: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 60%); border-radius: 0 8px 8px 0; }
.pnTag { color: var(--c); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.pnKind ul { margin: 0; padding-left: 16px; line-height: 1.45; font-size: 13.5px; }
.pnKind li + li { margin-top: 4px; }
@media (max-width: 520px) { .pnKind { grid-template-columns: 1fr; gap: 4px; } }
.titleNotes { position: absolute; left: 18px; bottom: 16px; z-index: 3; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(10, 8, 20, .55); color: #d9d4f2; font: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(4px); }
.titleNotes:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
@media (max-width: 700px) { .titleNotes { left: auto; right: 14px; bottom: auto; top: 14px; } }

/* Profile look: cover banner, cover picture, accent colour, bio */
.ppBanner.coverBanner { background: #12131a; }
.ppBanner.coverBanner::before { content: ''; position: absolute; inset: -30px; background: var(--cover) center / cover; filter: blur(18px) brightness(.6) saturate(1.25); }
.ppBanner.coverBanner .ppCover { position: absolute; z-index: 1; right: 6%; top: 10%; height: 80%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.ppHead.looked { box-shadow: inset 0 3px 0 var(--look); }
.ppHead.looked .ppName > b { color: var(--look); }
.ppHead.looked .ppAvatar:not(.srFramed) { border-color: color-mix(in srgb, var(--look) 70%, #141519); }
.ppAvatar.discord > img:first-child { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.ppBio { margin: 0; padding: 10px 16px 12px; border-top: 1px solid #26272e; font-size: 14px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.ppHead.looked .ppBio { border-left: 3px solid var(--look); }

/* Profile editor */
.modal.look .modalBox { max-width: 680px; max-height: min(92vh, 860px); display: flex; flex-direction: column; }
.modal.look #modalBody { overflow-y: auto; min-height: 0; padding-right: 4px; }
.leHead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.leHead h3 { margin: 0; }
.leHead small { color: var(--muted); }
.lePreview { position: relative; border-radius: 12px; overflow: hidden; background: #141519; border: 1px solid #26272e; padding-bottom: 12px; }
.lePreview .ppBanner { height: 110px; }
.lePreview .ppBanner img { right: 6%; }
.lePrevPic.ppAvatar { width: 72px; height: 72px; border-width: 3px; margin: -36px 0 0 14px; z-index: 2; border-radius: 12px; }
.lePrevPic.ppAvatar img { width: 62%; }
.lePrevPic.ppAvatar.discord > img:first-child { border-radius: 9px; }
.lePrevName { display: block; margin: 6px 14px 0; font-family: 'Outfit', sans-serif; font-size: 20px; }
.lePreview[style] { box-shadow: inset 0 3px 0 var(--look); }
.lePreview[style] .lePrevName { color: var(--look); }
.lePreview[style] .lePrevPic { border-color: color-mix(in srgb, var(--look) 70%, #141519); }
.lePrevBio { margin: 4px 14px 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.leTabs { display: flex; gap: 8px; margin: 12px 0 8px; }
.leTabs button { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); font: inherit; cursor: pointer; }
.leTabs button.on { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.leThumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: #1b1c22; display: grid; place-items: center; flex: none; font-style: normal; font-size: 9px; color: var(--muted); }
.leThumb.wide { width: 64px; }
.leThumb img { width: 100%; height: 100%; object-fit: cover; }
.lePickRow { display: flex; gap: 8px; margin-bottom: 8px; }
.lePickRow input { flex: 1; min-width: 0; }
.lePickRow button, .leColors button { border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.lePickRow button.on { color: var(--text); border-color: var(--accent); }
.leGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.leGrid button { padding: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #1b1c22; cursor: pointer; }
.leGrid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leGrid button:hover { border-color: rgba(255, 255, 255, .35); }
.leGrid button.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.leRow { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.leRow.col { flex-direction: column; align-items: stretch; gap: 6px; }
.leRow > span { font-size: 13px; color: var(--muted); min-width: 52px; display: flex; justify-content: space-between; }
.leColors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.leColors button { width: 28px; height: 28px; padding: 0; background: var(--c); border: 2px solid transparent; }
.leColors button.none { background: transparent; border-color: var(--line); font-size: 12px; }
.leColors button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.leCustom { position: relative; width: 28px; height: 28px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer;
  background: conic-gradient(#ff4f6d, #ffd54f, #5be37d, #5fd4ff, #c38bff, #ff4f6d); }
.leCustom.on { border-color: #fff; }
.leCustom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.leRow textarea { width: 100%; resize: vertical; min-height: 48px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; font-size: 14px; }

/* The tour */
.tour { position: fixed; inset: 0; z-index: 1900; }
.tourHole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(6, 5, 14, .72), 0 0 0 2px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; pointer-events: none; }
.tourTip { position: fixed; background: #15132a; border: 1px solid #2f2a52; border-radius: 12px; padding: 14px 16px 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transition: left .25s ease, top .25s ease; }
.tourTip small { color: var(--muted); font-size: 11px; }
.tourTip b { display: block; font-family: 'Outfit', sans-serif; font-size: 18px; margin: 2px 0 6px; }
.tourTip p { margin: 0 0 12px; line-height: 1.45; color: #d4d0ea; font-size: 14px; }
.tourBtns { display: flex; gap: 8px; align-items: center; }
.tourBtns .tourSkip { margin-right: auto; background: none; border: 0; color: var(--muted); padding: 6px 0; cursor: pointer; font: inherit; font-size: 13px; }
.tourBtns .tourSkip:empty { visibility: hidden; }
.tourBtns button:not(.tourSkip) { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; cursor: pointer; }
.tourBtns button.primary { border-color: var(--accent); color: #fff; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.lePickRow input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; }
.ppBanner.upBanner img, .lePreview .ppBanner.upBanner img { position: absolute; inset: 0; right: auto; top: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.ppHead .ppId { z-index: 2; }
.lePickRow .leUp { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.lePickRow .leUp.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.lePickRow .leUp:disabled { opacity: .6; cursor: wait; }
@media (max-width: 520px) { .lePickRow { flex-wrap: wrap; } .lePickRow input { flex-basis: 100%; } }

/* Leaderboards */
img.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; vertical-align: -1px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); flex: none; }
.ppName b img.flag { width: 24px; height: 17px; vertical-align: -2px; }
#leCountry { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; max-width: 240px; }
.leRow img.flag { margin-left: 8px; }
.lbpBox { max-width: 1060px; }
.rkHero { display: flex; align-items: center; gap: 22px; padding: 22px 26px; margin-right: 50px; }
.rkMascot { width: 92px; height: 92px; object-fit: contain; flex: none; }
.rkHeroText { flex: 1; min-width: 0; }
.rkHeroText small { font-weight: 700; font-size: 14px; color: var(--text); }
.rkHeroText h2 { margin: 4px 0; font-family: 'Outfit', sans-serif; font-size: 22px; letter-spacing: 0; text-transform: none; }
.rkHeroText p { margin: 0; color: var(--muted); font-size: 13px; }
.rkYouBox { flex: none; max-width: 230px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: 13px; line-height: 1.5; }
.rkYouBox b:first-child { text-decoration: underline; }
.rkYouRank { text-decoration: underline; }
.rkYouBox small { display: block; color: var(--muted); font-size: 12px; }
.rkBar { margin-top: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; overflow: visible; position: relative; z-index: 2; }
.rkCc { position: relative; }
.rkCcBtn { display: flex; align-items: center; gap: 8px; width: 200px; padding: 9px 12px; border-radius: 8px; background: #1b1c22; border: 1px solid #2a2b33; text-align: left; }
.rkCcBtn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkCcBtn i { font-style: normal; color: var(--muted); }
.rkCcBtn:disabled { opacity: .45; cursor: default; }
.rkCcBtn img.flag, .rkCcPop img.flag { margin: 0; }
.rkGlobe { width: 18px; height: 18px; color: #5fd4ff; flex: none; }
.rkCcPop { position: absolute; top: calc(100% + 6px); left: 0; width: 260px; background: #15161b; border: 1px solid #2a2b33; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); padding: 8px; z-index: 5; }
.rkCcPop input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; margin-bottom: 6px; }
.rkCcList { max-height: 300px; overflow-y: auto; display: grid; gap: 2px; }
.rkCcList button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 13px; }
.rkCcList button span { flex: 1; }
.rkCcList button small { color: var(--muted); }
.rkCcList button:hover, .rkCcList button.on { background: rgba(255, 255, 255, .07); }
.rkSeg { display: flex; gap: 2px; padding: 3px; border: 1px solid #2a2b33; border-radius: 9px; background: #1b1c22; }
.rkSeg button { border: 0; background: none; padding: 6px 14px; border-radius: 6px; color: var(--muted); }
.rkSeg button.on { background: #2c2d36; color: #fff; }
#lbFind { margin-left: auto; width: 230px; font: inherit; font-size: 13px; color: var(--text); background: #1b1c22; border: 1px solid #2a2b33; border-radius: 8px; padding: 9px 12px; min-width: 0; }
.rkMods { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.rkMods button { padding: 5px 12px; border-radius: 8px; color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.rkMods button.on { color: #fff; background: color-mix(in srgb, var(--c) 30%, transparent); border-color: var(--c); }
.rkTable { margin-top: 12px; padding: 8px 12px 12px; }
.rkCols, .rkRow { display: grid; grid-template-columns: 120px minmax(0, 1fr) 150px 110px; gap: 12px; align-items: center; }
.rkCols { padding: 10px 16px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rkCols span:nth-child(3), .rkCols span:nth-child(4) { text-align: center; }
.rkRow { padding: 9px 16px; margin-top: 6px; border: 1px solid #2a2b33; border-radius: 8px; background: #17181d; cursor: pointer; }
.rkRow:hover { background: #1d1e25; border-color: #34353f; }
.rkRow.me { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, #17181d); }
.rkRank { color: var(--muted); font-variant-numeric: tabular-nums; }
.rkRank[style] { color: var(--rk); font-weight: 700; }
.rkWho { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rkWho img.flag, .rkWho .flag.none { width: 30px; height: 20px; margin: 0; border-radius: 3px; }
.rkWho .flag.none { display: inline-block; flex: none; box-shadow: none; }
.rkAv.oAvatar { width: 44px; height: 26px; border-radius: 5px; font-size: 13px; flex: none; }
.rkWho b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkRp { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.rkPc { text-align: center; color: #c9c8d6; font-variant-numeric: tabular-nums; }
.rkNote { padding: 18px 16px; margin: 0; }
.rkYou { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.rkYou > small { display: block; padding: 6px 16px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.rkPager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 12px; color: var(--muted); }
.rkPager button:disabled { opacity: .4; cursor: default; }
@media (max-width: 720px) {
  .rkHero { flex-wrap: wrap; padding: 16px; gap: 12px; margin-right: 46px; }
  .rkMascot { width: 56px; height: 56px; }
  .rkYouBox { max-width: none; flex-basis: 100%; }
  .rkCcBtn { width: 170px; }
  #lbFind { margin-left: 0; flex-basis: 100%; width: auto; }
  .rkCols, .rkRow { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; }
  .rkCols span:nth-child(4), .rkPc { display: none; }
  .rkRow { padding: 8px 10px; }
  .rkCols { padding: 8px 10px; }
  .rkWho { gap: 7px; }
  .rkWho img.flag, .rkWho .flag.none { width: 24px; height: 16px; }
  .rkAv.oAvatar { width: 34px; height: 22px; }
  .rkTable { padding: 6px; }
}

/* Skill prestige */
.pgList { display: grid; gap: 6px; margin-top: 10px; }
.pgRow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 80px 130px; gap: 14px; align-items: center; padding: 10px 14px; background: #17181d; border: 1px solid #26272e; border-left: 3px solid var(--skill); border-radius: 8px; }
.pgRow.ready { border-color: color-mix(in srgb, var(--skill) 60%, #26272e); background: color-mix(in srgb, var(--skill) 8%, #17181d); }
.pgName b { display: block; color: var(--skill); }
.pgName small, .pgLv small { color: var(--muted); font-size: 12px; }
.pgPips { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pgPips i { width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid #555766; border-radius: 1px; flex: none; }
.pgPips i.on { background: var(--skill); border-color: var(--skill); }
.pgPips i.next { border-color: var(--skill); }
.pgPips span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgBar { height: 5px; margin-top: 7px; background: #24252c; border-radius: 3px; overflow: hidden; }
.pgBar i { display: block; height: 100%; background: var(--skill); border-radius: 3px; }
.pgLv { text-align: right; font-variant-numeric: tabular-nums; }
.pgLv em { display: block; font-style: normal; font-size: 11px; color: var(--muted); opacity: .8; }
.pgRow button { padding: 8px 10px; }
.pgRow.ready button { border-color: var(--skill); color: #fff; background: color-mix(in srgb, var(--skill) 28%, transparent); }
.pgRow button:disabled { opacity: .55; cursor: default; }
@media (max-width: 620px) {
  .pgRow { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; }
  .pgMid { grid-column: 1 / -1; grid-row: 2; }
  .pgRow button { grid-column: 1 / -1; }
}
/* Rebirth (season tab) */
.rbCard { margin-top: 14px; padding: 16px 18px; border: 1px solid #2c2a44; border-radius: 12px; background: linear-gradient(135deg, rgba(195, 139, 255, .08), rgba(95, 212, 255, .04)); }
.rbCard.ready { border-color: #c38bff; }
.rbSeasons { color: var(--muted); } .rbSeasons b { color: var(--text); font-size: 18px; }
.rbGot { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.rbGot span { padding: 3px 10px; border-radius: 999px; background: rgba(91, 227, 125, .12); color: #5be37d; font-size: 12px; }
/* Instinct perks */
.pkBox { margin-top: 16px; }
.pkBox h3 { margin: 0 0 8px; font-size: 16px; } .pkBox h3 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.pkGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pkCard { display: grid; gap: 4px; padding: 10px 12px; background: #17181d; border: 1px solid #26272e; border-radius: 10px; }
.pkCard.on { border-color: color-mix(in srgb, var(--accent) 55%, #26272e); }
.pkTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkPips { display: flex; gap: 3px; } .pkPips i { width: 7px; height: 7px; border-radius: 50%; background: #33343d; } .pkPips i.on { background: var(--accent); }
.pkCard p { margin: 0; font-size: 13px; } .pkNone { color: var(--muted); }
.pkCard small { color: var(--muted); font-size: 12px; }
.pkCard button { margin-top: 4px; padding: 6px 10px; }
.pkCard button:disabled { opacity: .5; cursor: default; }
.psName b, .pkTop b, .rbCard .snGain b { font-family: inherit; }
@media (max-width: 1100px) and (min-width: 761px) { .inBranches { grid-template-columns: repeat(2, 1fr); } }
/* in-play board: who you just passed, and who got back past you */
.pbPass { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #3fd68f; color: #0d1a13; animation: pbPassIn .3s ease-out; }
.pbPass.back { background: #ff6b6b; color: #1d0c0c; }
@keyframes pbPassIn { from { opacity: 0; transform: translateX(-6px); } }

/* Playlists */
.plBar { display: grid; gap: 8px; margin: 0 0 10px; }
.plChips { display: flex; flex-wrap: wrap; gap: 6px; }
.plChip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; }
.plChip small { color: var(--muted); }
.plChip.on { border-color: #7c9dff; color: #fff; background: rgba(124, 157, 255, .16); }
.plChip.plNew { border-style: dashed; color: var(--muted); }
.plLive { width: 7px; height: 7px; border-radius: 50%; background: #5be37d; box-shadow: 0 0 6px #5be37d; }
.plActs { display: flex; flex-wrap: wrap; gap: 6px; }
.plActs button { padding: 6px 10px; font-size: 12px; }
.plActs .plGo { border-color: #7c9dff; color: #fff; background: rgba(124, 157, 255, .2); }
.plActs .plGo.on { border-color: #ff6b6b; background: rgba(255, 107, 107, .16); }
.plActs button:disabled { opacity: .5; cursor: default; }
.selQRow { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.selQRow .selPl.on { border-color: #7c9dff; }
.plMenu { display: grid; gap: 2px; margin-top: 6px; padding: 6px; border: 1px solid #2c2d38; border-radius: 10px; background: #15161b; max-height: 220px; overflow: auto; }
.plMenu button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 7px 8px; border: 0; background: none; text-align: left; font-size: 13px; }
.plMenu button:hover { background: #20212a; }
.plMenu button i { font-style: normal; color: #5be37d; }
.plMenu button small { color: var(--muted); }
.plMenu .plNew { color: #7c9dff; } .plMenu .plNew i { color: #7c9dff; }
input.plName { width: 100%; padding: 10px 12px; margin-top: 6px; font-size: 15px; }
.mqPl { color: #7c9dff; }
.mqPlStop { margin-left: auto; padding: 0 7px; height: 20px; font-size: 10px; line-height: 1; border-color: #5a2a2e; color: #ff6b6b; }

/* hand-given titles (Bug hunter, ...) */
.pBadge { display: inline-flex; width: 1em; height: 1em; margin-left: 4px; color: var(--bd); vertical-align: -0.12em; font-weight: 400; }
.pBadge svg { width: 100%; height: 100%; }
.chatMsg .pBadge { margin: 0 3px 0 0; }
.pTitle { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: .85em; font-weight: 600;
  color: var(--bd); background: color-mix(in srgb, var(--bd) 14%, transparent); border: 1px solid color-mix(in srgb, var(--bd) 35%, transparent); }
.pTitle svg { width: 1em; height: 1em; }
.asBadge select { background: var(--panel-2, #1b1d27); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 4px 6px; }

/* customisation: colour rows, the live preview, custom play backgrounds, in-play text colour */
.sColorIn { display: inline-flex; align-items: center; gap: 8px; }
.sColorIn b { font: 600 12px ui-monospace, monospace; color: var(--muted); text-transform: uppercase; }
.sColorIn input[type=color] { width: 38px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.sColorIn input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.sColorIn input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.sPrev { grid-template-columns: 1fr; justify-items: center; }
.sPrev canvas { width: min(240px, 100%); aspect-ratio: 1; border-radius: 10px; background: var(--pvbg, #030306); }
body.pvCustomBg .pvBg { display: block; background: var(--pvbg) !important; filter: none; transform: none; inset: 0; }
.playView { color: var(--hud, #fff); }
.playView .pvStat label, .playView .pvCombo label { color: color-mix(in srgb, var(--hud, #fff) 85%, transparent); }

/* play widgets */
.pWidget { position: fixed; z-index: 6; min-width: 160px; max-width: 280px; background: rgba(10, 10, 16, .78); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; backdrop-filter: blur(6px); font-size: 13px; color: var(--hud, #fff); user-select: none; }
.pwHead { padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: grab; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pwHead:active { cursor: grabbing; }
.pwBody { padding: 8px 10px; display: grid; gap: 3px; }
.pwBody span { color: color-mix(in srgb, var(--hud, #fff) 70%, transparent); }
.pwBig { font-size: 28px; font-weight: 700; line-height: 1.05; color: var(--accent); }
.pwBig small { font-size: 14px; color: var(--muted); }
.pw_stats .pwBody { grid-template-columns: 1fr auto; column-gap: 14px; }
.pw_stats .pwBody b { text-align: right; font-variant-numeric: tabular-nums; }
.pw_medals { width: 270px; }
.pwMd { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; }
.pwMd .md { width: 34px; height: 34px; }
.pwMd span { display: grid; line-height: 1.2; font-family: inherit; }
.pWidget b { font-family: inherit; }
.pwMd small { font-size: 11px; color: var(--muted); }
.pwMd.lost { opacity: .4; }
.pwMd.lost b { text-decoration: line-through; }
.pwMd.done small { color: var(--good); }
.pwMore { color: var(--muted); }
.pw_heart { cursor: pointer; min-width: 130px; }
.pwHr { display: flex; align-items: baseline; gap: 6px; }
.pwHeart { display: inline-block; color: var(--hc); font-size: 26px; line-height: 1; text-shadow: 0 0 12px var(--hc); transform-origin: center 60%; }
.pwHr b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pwHr small { color: var(--muted); }
.pwHrStats { display: none; grid-template-columns: 1fr auto; column-gap: 12px; margin-top: 4px; font-size: 12px; }
.pw_heart.open .pwHrStats { display: grid; }
.selMedals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0; }
.selMedals > small { width: 100%; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.selMedals .md { width: 32px; height: 32px; }
@media (max-width: 1100px) { .pWidget { display: none; } }

/* replays: ▶ on map leaderboards and profile plays */
.sbRow.hasReplay { grid-template-columns: 30px 26px minmax(0, 1fr) auto auto; }
.sbReplay { flex-shrink: 0; width: 26px; height: 26px; min-width: 26px; padding: 0; border-radius: 50%; font-size: 11px; line-height: 1; aspect-ratio: 1; display: grid; place-items: center; }
.pgRow.locked { opacity: .45; }
.pgRow.maxed { border-color: color-mix(in srgb, var(--skill) 45%, #26272e); }
.pgRow.maxed button:disabled { opacity: .8; color: var(--skill); }
.psReplay { cursor: pointer; color: #7fd9a8; }
.psReplay:hover { filter: brightness(1.3); }

/* starter skills */
.ckStarter { margin-top: 8px; font-size: 13px; padding: 7px 12px; }
.stPick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.stSkill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border-left: 3px solid var(--skill); text-align: center; }
.stSkill b { color: var(--skill); font-size: 13px; }
.stSkill small { font-size: 11px; opacity: .8; min-height: 1em; }
.stSkill.main { background: color-mix(in srgb, var(--skill) 30%, transparent); box-shadow: 0 0 0 2px var(--skill) inset; }
.stSkill.sub { background: color-mix(in srgb, var(--skill) 15%, transparent); box-shadow: 0 0 0 1px var(--skill) inset; }
.stMsg { text-align: center; }

/* star shop, milestones, Devotion, name effects */
.shCard button { margin-top: 2px; }
.msLadder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.msStep { display: grid; gap: 2px; padding: 10px 12px; background: #17181d; border: 1px solid #26272e; border-radius: 10px; opacity: .55; }
.msStep b { color: #ffd54f; font-size: 14px; }
.msStep span { font-size: 12px; color: var(--muted); }
.msStep.on { opacity: 1; border-color: color-mix(in srgb, #ffd54f 50%, #26272e); background: color-mix(in srgb, #ffd54f 7%, #17181d); }
.inBranches { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.inDevote button { margin-top: 6px; padding: 6px 8px; font-size: 12px; }
.inDevote.locked { opacity: .55; }
.nameFx { background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFx 4s linear infinite; }
.fx-starlit { background-image: linear-gradient(90deg, #ffd54f, #fff6c8, #ffb300, #fff6c8, #ffd54f); }
.fx-ember { background-image: linear-gradient(90deg, #ff4f2d, #ffb36b, #ff7a3d, #ffe0a0, #ff4f2d); text-shadow: 0 0 12px rgba(255, 110, 50, .35); }
.fx-aurora { background-image: linear-gradient(90deg, #5be3a0, #5fd4ff, #c38bff, #ff8fc8, #5be3a0); }
.fx-starborn { background-image: linear-gradient(90deg, #fff, #ffd54f, #9ad1ff, #fff, #ffd54f); text-shadow: 0 0 14px rgba(255, 230, 150, .5); }
@keyframes nameFx { to { background-position: 200% center; } }
@media (prefers-reduced-motion: reduce) { .nameFx { animation: none; } }
.rbGot span.todo { opacity: .45; }
.fx-reborn { background-image: linear-gradient(90deg, #ff5fa2, #ffb36b, #fff, #b07bff, #ff5fa2); text-shadow: 0 0 14px rgba(255, 120, 190, .4); }
/* account level: the pill by names, the bar and reward track on your profile, and the level name effects */
.lvPill { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; border-radius: 999px; font: 700 11px/1.6 'Outfit', sans-serif;
  color: #9ad1ff; background: color-mix(in srgb, #5f9dff 14%, transparent); border: 1px solid color-mix(in srgb, #5f9dff 38%, transparent);
  vertical-align: .2em; white-space: nowrap; }
.ppName b .lvPill { font-size: 13px; vertical-align: .45em; }
.lvPill.big { margin-left: auto; font-size: 13px; padding: 1px 9px; }
.lvBody { padding: 14px 18px 4px; cursor: help; }
.lvBar { position: relative; height: 10px; border-radius: 5px; background: #26272e; overflow: hidden; }
.lvBar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: linear-gradient(90deg, #5f9dff, #9ad1ff); }
.lvLabel { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.lvHelp i { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 3px; border-radius: 50%; border: 1px solid currentColor; font: 700 10px/1 sans-serif; font-style: normal; }
.lvTrack { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px 18px 16px; }
.lvStep { display: grid; gap: 3px; align-content: start; padding: 10px 12px; background: #17181d; border: 1px solid #26272e; border-radius: 10px; opacity: .6; }
.lvStep b { color: #9ad1ff; font-size: 13px; }
.lvStep .nameFx { font: 800 16px 'Outfit', sans-serif; justify-self: start; }
.lvStep small { font-size: 12px; color: var(--muted); }
.lvStep em { font-size: 12px; font-style: normal; color: var(--muted); }
.lvStep button { margin-top: 4px; padding: 5px 8px; font-size: 12px; }
.lvStep.on { opacity: 1; border-color: color-mix(in srgb, #5f9dff 50%, #26272e); background: color-mix(in srgb, #5f9dff 7%, #17181d); }
.fx-spark { background-image: linear-gradient(90deg, #5fd4ff, #ffffff, #3f7dff, #c8f1ff, #5fd4ff); text-shadow: 0 0 12px rgba(95, 200, 255, .45); animation-duration: 2.2s; }
.fx-tide { background-image: linear-gradient(90deg, #1fb5c9, #7fe0c4, #2f6fd6, #b5f5ff, #1fb5c9); animation-duration: 6s; }
.fx-bloom { background-image: linear-gradient(90deg, #ff8fc8, #ffe0ef, #ff5f9e, #ffc6a8, #ff8fc8); text-shadow: 0 0 12px rgba(255, 140, 200, .35); }
.fx-eclipse { background-image: linear-gradient(90deg, #ffcf6b, #8e5bff, #4b2a8a, #8e5bff, #ffcf6b); text-shadow: 0 0 14px rgba(255, 190, 80, .45); animation-duration: 5s; }
.fx-prism { background-image: linear-gradient(90deg, #ff4f6d, #ffd54f, #5be37d, #5fd4ff, #c38bff, #ff4f6d); text-shadow: 0 0 16px rgba(255, 255, 255, .35); animation-duration: 2.6s; }

/* ---------- main menu: a rail down the left side, a bar along the bottom on small screens ---------- */
:root { --railW: 0px; --railH: 0px; }
.dock { position: fixed; z-index: 16; display: flex; gap: 4px; background: rgba(10, 9, 16, .94); }
.dock button { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 8px 2px 7px; min-width: 0;
  font-size: 11px; font-weight: 600; line-height: 1.1; color: #a9a7bd; background: none; border: 1px solid transparent; border-radius: 12px; }
.dock button svg { width: 22px; height: 22px; display: block; }
.dock button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.dock button.on { color: #fff; background: rgba(124, 157, 255, .16); border-color: rgba(124, 157, 255, .4); }
.dock button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dock .navCount { position: absolute; top: 3px; right: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10px; line-height: 16px; font-weight: 700; color: #fff; background: #2f8f55; }
.dock .hintDot::before { top: 6px; right: 12px; width: 8px; height: 8px; }
.dockGap { flex: 1; }
body.titleOn { --railW: 0px; --railH: 0px; }
body.titleOn .dock { display: none; }
@media (min-width: 1101px) {
  :root { --railW: 78px; }
  .dock { left: 0; top: 0; bottom: 0; width: var(--railW); flex-direction: column; align-items: stretch; padding: 14px 8px; border-right: 1px solid rgba(255, 255, 255, .07); }
  .dock button.on::after { content: ''; position: absolute; left: -9px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
}
@media (max-width: 1100px) {
  :root { --railH: calc(60px + env(safe-area-inset-bottom)); }
  .dock { left: 0; right: 0; bottom: 0; height: var(--railH); padding: 4px 4px env(safe-area-inset-bottom); border-top: 1px solid rgba(255, 255, 255, .08); }
  .dock button { flex: 1; padding: 6px 0 5px; font-size: 10px; }
  .dock button svg { width: 20px; height: 20px; }
  .dockGap { display: none; }
}
/* everything else sits beside the rail (or above the bar) */
.playView, .select, .online, .skillsBox, .pp, .settings { left: var(--railW); bottom: var(--railH); }
.toasts { bottom: calc(16px + var(--railH)); }

/* ---------- goals and hints: a strip under the playfield ---------- */
.pvGuide { display: grid; gap: 8px; justify-items: stretch; min-width: 0; }
.pvGuide .pvGoals { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 12px; row-gap: 6px; padding: 8px 8px 8px 12px; }
.pvGuide .gNum { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; }
.pvGuide .gText { display: grid; gap: 6px; min-width: 0; line-height: 1.3; }
.pvGuide .gPay { white-space: nowrap; }
.pvGuide .pvHint { justify-self: center; }
@media (max-width: 600px) { .pvGuide .pvGoals { grid-template-columns: minmax(0, 1fr) auto; } .pvGuide .gNum { grid-column: 1; } .pvGuide .gText { grid-column: 1 / -1; grid-row: 2; } .pvGuide .gPay { grid-row: 3; } }

/* ---------- guide ---------- */
.guide { background: rgba(6, 6, 10, .9); backdrop-filter: blur(6px); }
.gdBody b, .tabIntro b { font-family: inherit; }
.gdBtns [data-gdshow] { padding: 9px 18px; font-weight: 700; color: #fff; background: var(--accent); border-color: var(--accent); }
.guideBox { max-width: 1060px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; overflow: hidden; }
.gdHead { display: flex; justify-content: space-between; align-items: center; }
.gdHead h2 { margin: 0; font-size: 26px; }
.gdHead small { color: var(--muted); font-size: 14px; }
.gdHead button { width: 36px; height: 36px; padding: 0; font-size: 18px; }
.gdWrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; min-height: 0; }
.gdNav { display: grid; align-content: start; gap: 3px; overflow-y: auto; padding-right: 4px; }
.gdNav small { margin: 12px 0 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gdNav small:first-child { margin-top: 0; }
.gdNav button { text-align: left; padding: 8px 10px; font-size: 14px; background: none; border-color: transparent; border-radius: 8px; color: #cfcde0; }
.gdNav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.gdNav button.on { color: #fff; background: rgba(124, 157, 255, .16); border-color: rgba(124, 157, 255, .4); }
.gdNav button.later { opacity: .55; }
.gdBody { overflow-y: auto; padding: 22px 26px; background: rgba(16, 16, 22, .92); border: 1px solid var(--line); border-radius: 14px; font-size: 15px; line-height: 1.55; }
.gdBody h3 { margin: 0 0 12px; font-size: 22px; }
.gdBody p, .gdBody ul, .gdBody ol { margin: 0 0 12px; }
.gdBody li { margin-bottom: 4px; }
.gdBody a { color: var(--accent); }
.gdLater { padding: 8px 12px; border-radius: 8px; color: #ffd54f; background: rgba(255, 213, 79, .08); border: 1px solid rgba(255, 213, 79, .25); }
.gdBtns { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.gdBtns span { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.gdBtns button { font-size: 13px; }
@media (max-width: 760px) {
  .guideBox { overflow-y: auto; display: block; }
  .gdHead { margin-bottom: 12px; }
  .gdWrap { grid-template-columns: minmax(0, 1fr); }
  .gdNav { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
  .gdNav small { display: none; }
  .gdNav button { padding: 6px 10px; font-size: 13px; border-color: var(--line); }
  .gdBody { padding: 16px; overflow: visible; }
}

/* ---------- a tab's first-visit intro ---------- */
.tabIntro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(124, 157, 255, .1); border: 1px solid rgba(124, 157, 255, .3); font-size: 14px; }
.tabIntro[hidden] { display: none; }
.tabIntro p { flex: 1; min-width: 220px; margin: 0; }
.tabIntro button { font-size: 13px; padding: 6px 12px; }

/* ---------- Skills tabs in brackets: Train, Upgrade, Reset, Overview ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabGroup { flex: var(--n, 1) 1 0; min-width: calc(var(--n, 1) * 74px); display: grid; gap: 3px; }
.tabGroup[hidden] { display: none; }
.tabGroup > small { padding-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tabGroup > div { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.tabGroup > div button { flex: 1 1 0; min-width: 0; }
.snToRb { display: block; margin-top: 12px; }

/* rebirth tab */
.rbHead, .bxHead { margin: 18px 0 8px; }
.rbList { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.rbList > div { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #17181d; opacity: .6; }
.rbList > div.got { opacity: 1; border-color: rgba(91, 227, 125, .35); }
.rbList > div.next { opacity: 1; border-color: #c38bff; background: rgba(195, 139, 255, .08); }
.rbList i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .06); }
.rbList .got i { color: #5be37d; background: rgba(91, 227, 125, .14); }
.rbList span { display: grid; gap: 2px; min-width: 0; }
.rbList b, .bxRow b, .bxCols h4 { font-family: inherit; }
.rbList small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* boosts tab */
.bxCols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bxCols section { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #17181d; }
.bxCols h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.bxCols h4 small { color: #ffd54f; font-size: 13px; }
.bxCols p { margin: 10px 0 0; }
.bxRow { display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.bxRow:first-of-type { border-top: 0; }
.bxRow span { display: grid; min-width: 0; }
.bxRow small { color: var(--muted); font-size: 12px; }
.bxRow em { font-style: normal; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.bxRow.off em { color: var(--muted); font-weight: 400; }
.bxRow button { padding: 4px 0; font-size: 12px; }
.bxWrap { overflow-x: auto; }
.bxTable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bxTable th, .bxTable td { padding: 7px 10px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .05); white-space: nowrap; }
.bxTable thead th { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bxTable thead small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.bxTable th:first-child { text-align: left; }
.bxTable tbody th { color: var(--skill); font-weight: 700; }
.bxTable td.off { color: var(--muted); }
.bxTable td.bxTot { font-weight: 700; color: #fff; }
.bxTable tr.slow td.bxTot { color: #ffb74d; }
.bxTable tr.slow th::after { content: 'slowest'; margin-left: 8px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #101018; background: #ffb74d; }
@media (max-width: 760px) { .bxCols { grid-template-columns: minmax(0, 1fr); } .tabGroup { min-width: calc(var(--n, 1) * 64px); } }

/* ---------- welcome and goodbye ---------- */
.greet { position: fixed; inset: 0; z-index: 2100; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 42%, #1c1430 0%, #0b0814 55%, #050409 100%); animation: grIn .45s ease-out both; cursor: pointer; }
.greet.leaving { animation: grOut .5s ease-in forwards; pointer-events: none; }
.grDisc { position: relative; width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, #2a1f4a, #150f26); box-shadow: 0 0 60px rgba(150, 110, 255, .45); animation: grDisc 1.1s cubic-bezier(.2, .9, .2, 1.2) both; }
.grDisc img { width: 64%; height: 64%; object-fit: contain; }
.grDisc i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(170, 140, 255, .55); animation: grRing 1.8s ease-out .2s infinite; }
.grDisc i + i { animation-delay: 1.1s; }
.grHead { margin: 0; font-size: clamp(32px, 6vw, 58px); font-weight: 700; letter-spacing: .01em; color: #fff; }
.grHead span { display: inline-block; animation: grLetter .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.25s + var(--i) * .04s); }
.grSub { margin: 0; max-width: 520px; color: #b9b4d4; font-size: 16px; animation: grIn .6s ease-out .7s both; }
.grTap { margin: 6px 0 0; min-height: 1.4em; color: var(--muted); font-size: 14px; }
.greet.bye .grDisc { animation: grDisc 1.1s cubic-bezier(.2, .9, .2, 1.2) both, grSink 2.4s ease-in .9s forwards; }
.greet.bye.done .grDisc i { animation: none; opacity: 0; }
.greet.bye.done .grTap { animation: tapPulse 1.6s ease-in-out infinite; }
@keyframes grIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes grOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes grDisc { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes grSink { to { transform: scale(.82); opacity: .55; box-shadow: 0 0 20px rgba(150, 110, 255, .15); } }
@keyframes grRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes grLetter { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .greet, .greet *, .greet span { animation-duration: .01s !important; animation-delay: 0s !important; } }
.titleMenu .titleExit { font-size: 20px; padding: 10px 28px; background: rgba(255, 255, 255, .05); color: #c9c5dc; }
.titleMenu .titleExit:hover, .titleMenu .titleExit:focus-visible { background: rgba(255, 90, 120, .25); color: #fff; }

/* unlocks tab (shards) */
.unHow { margin-bottom: 14px; padding: 12px 14px; border: 1px solid rgba(110, 220, 255, .3); border-radius: 12px; background: rgba(110, 220, 255, .06); }
.unHow b { font-family: inherit; color: #8fe3ff; }
.unHow p { margin: 6px 0; }
.unHow small { color: var(--muted); }
.unSteps { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.unSteps b { color: var(--text); font-family: inherit; }
.unNeed { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: rgba(110, 220, 255, .1); }
.unNeed b { color: #8fe3ff; }
.unNeed small { display: block; margin-top: 3px; }
.unHead { margin: 16px 0 8px; }
.unList { display: grid; gap: 6px; }
.unRow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 130px; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #17181d; }
.unRow.ready { border-color: rgba(110, 220, 255, .55); background: rgba(110, 220, 255, .07); }
.unRow.got { border-color: rgba(91, 227, 125, .35); }
.unRow span { display: grid; gap: 2px; min-width: 0; }
.unRow b { font-family: inherit; }
.unRow small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.unIco { display: grid; place-items: center; height: 40px; border-radius: 10px; font-style: normal; font-weight: 800; font-size: 13px; color: #8fe3ff; background: rgba(110, 220, 255, .1); }
.unRow.got .unIco { color: #5be37d; background: rgba(91, 227, 125, .12); }
.unRow button { padding: 8px 10px; }
.unRow.ready button { border-color: #6edcff; color: #fff; background: rgba(110, 220, 255, .2); }
.unRow.got button:disabled { color: #5be37d; opacity: .9; }
@media (max-width: 600px) { .unRow { grid-template-columns: 44px minmax(0, 1fr); } .unRow button { grid-column: 1 / -1; } }
.selLimit { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 170, 60, .12); border: 1px solid rgba(255, 170, 60, .35); color: #ffcf8a; font-size: 13px; line-height: 1.35; }
.selLimit.ok { padding: 4px 10px; background: none; border-color: rgba(255, 255, 255, .08); color: #9aa0b8; font-size: 12px; }
.selLimit.ok b { color: #d6dae8; }
.selLimit.selShard { color: #8fe3ff; border-color: rgba(110, 220, 255, .3); }

/* ---------- Go to: a search for every screen and tab ---------- */
.goto { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(5, 4, 10, .55); }
.goto.on { display: flex; }
.gotoCard { width: min(560px, 100%); max-height: 70vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #12111b; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.gotoIn { font: inherit; font-size: 16px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; outline: none; }
.gotoList { overflow-y: auto; padding: 6px; display: grid; gap: 2px; align-content: start; }
.gotoItem { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: none; }
.gotoItem span { display: grid; min-width: 0; }
.gotoItem b { color: var(--text); font-size: 14px; }
.gotoItem small { color: var(--muted); font-size: 11px; }
.gotoItem em { font-style: normal; color: var(--muted); font-size: 12px; }
.gotoItem.sel, .gotoItem:hover { background: rgba(124, 157, 255, .14); border-color: rgba(124, 157, 255, .35); }
.gotoItem.locked { opacity: .45; }
.gotoFoot { margin: 0; padding: 8px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 600px) { .gotoItem { grid-template-columns: minmax(0, 1fr); gap: 2px; } .goto { padding-top: 8vh; } }
/* Skills window: where you are */
.tabWhere { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 10px; padding: 0 4px; font-size: 13px; color: var(--muted); }
.tabWhere:empty { display: none; }
.tabWhere > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tabWhere > span b { color: var(--text); font-size: 13px; letter-spacing: 0; text-transform: none; }
.tabWhere button { margin-left: auto; padding: 3px 10px; font-size: 12px; }
@media (max-width: 560px) { .dock .gotoBtn { display: none; } }

/* flagged players: how sure, and the per-player actions */
.asSure { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; background: rgba(154, 160, 184, .18); color: #b8bdd0; }
.asSure.sure { background: rgba(255, 90, 110, .2); color: #ff8a98; }
.asSure.likely { background: rgba(255, 190, 90, .18); color: #ffcf7a; }
.asFPact { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.asFPact button { font-size: 12px; padding: 4px 10px; }

/* ---------- Calm: one accent for controls; tiers, mods and tags in neutrals (update 177) ---------- */
.modBtn, .sMods button, .rkMods button { --mod: var(--accent) !important; --c: var(--accent) !important; }
.modBtn { color: #c9cbe0; }
.modBtn.on { color: #fff; }
.scMods span, .scMods .scFast { background: rgba(255, 255, 255, .1) !important; border: 1px solid rgba(255, 255, 255, .16); transform: none; color: #fff; }
.scMods .scFast { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; position: relative; }
.scMods .scFast small { position: absolute; bottom: 1px; font-size: 9px; font-weight: 700; }
.scMods .scFast svg { width: 20px; height: 20px; margin-top: -6px; }
.mqMods i, .dyHead i { --c: #c9cbe0 !important; }
.tierTabs button { border-bottom-color: transparent; }
.tierTabs button.on { color: var(--text); border-color: var(--accent); }
.dyCard { border-bottom-color: var(--line); }
.dyCard small { color: var(--muted); }
.selCard { border-left: 1px solid var(--line); background: rgba(24, 24, 34, .85); }
.selCard:hover { background: rgba(36, 36, 50, .9); }
.selCard.sel { background: rgba(138, 164, 255, .14); border-color: var(--accent); border-left-color: var(--accent); }
.selCoverWrap img, .selCoverWrap .noImg { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .6) !important; animation: none !important; }
.trains i, .style { color: var(--muted); border-color: var(--line); }
.msDetail em.on { color: var(--text); border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); }
.wkBar i, .wkItem.done .wkBar i { background: var(--accent); }
.wkItem.done .wkProg, .wkItem.done .wkText, .tnCard.done .tnText > span { color: var(--text); }
.pvAbort button { border-color: rgba(255, 255, 255, .2); }
.pvAbort button:hover { background: rgba(255, 255, 255, .08); }
.rkRow:not(.r1):not(.r2):not(.r3) .rkRank[style] { color: var(--text); }
.selLimit.selShard { color: var(--text); border-color: var(--line); cursor: help; }
.pWidget.pwEmpty { display: none !important; }
.dyHead b, .wkHead b { color: var(--text); }
.wkHead em { color: var(--muted); }

/* ---------- Medals: category tabs, one category at a time, smaller medals (update 177) ---------- */
.mdCard .ppH { display: flex; align-items: center; gap: 8px; }
.mdCard .ppH .mdHead { margin-left: auto; padding: 0; gap: 10px; font-size: 13px; font-weight: 600; }
.mdCard .ppH .mdHead b { font-size: 15px; }
.mdCard .ppH .mdBar { width: 120px; flex: none; }
.mdTabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 2px; }
.mdTabs button { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.mdTabs button small { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .8; }
.mdTabs button:hover { color: var(--text); }
.mdTabs button.on { color: var(--text); border-color: var(--accent); background: rgba(138, 164, 255, .1); }
.mdCat[hidden] { display: none; }
.mdCat { padding: 4px 18px 10px; }
.mdCat:not([hidden]) { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 12px 18px 16px; }
.mdCat .mdRow { gap: 4px; padding: 0; border: 0; }
.mdCat .mdRow:first-child { border-top: 0; }
.md { width: 44px; height: 44px; }
@media (max-width: 640px) { .md { width: 38px; height: 38px; } .mdTabs { padding: 8px 12px 2px; } .mdCard .ppH .mdBar { width: 70px; } }
.tpHide { display: flex; align-items: center; gap: 6px; }
.tpHide svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.tpHide svg.up { transform: rotate(180deg); }

/* ---------- Instinct twigs: small side branches (update 177) ---------- */
.inTwig circle { stroke-width: 1.6; }
.inTwigName text { fill: #6f707a; font-size: 10.5px; font-weight: 700; }
.inTwigName text tspan { font-weight: 500; fill: #55565f; }
.inTwigName .inEff { font-size: 9.5px; font-weight: 500; fill: #55565f; }
.inTwigName.on text { fill: #fff; }
.inTwigName.on .inEff, .inTwigName.on tspan { fill: var(--skill); }

/* ---------- Score rows: speed and mods as icons, a drawn dropdown chevron (update 177) ---------- */
.psIcons { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px; border-radius: 8px; border: 1px solid #343540; background: #22232b; }
.psIcons img { height: 28px; display: block; }
.psIcons i { display: grid; place-items: center; width: 26px; height: 26px; color: #fff; }
.psIcons i svg { width: 20px; height: 20px; }
.psIcons b { font-size: 12px; }
.psMore { display: grid; place-items: center; width: 22px; height: 22px; }
.psMore svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Instinct tree in motion: the glow breathes, light runs out along owned lines, owned stars twinkle (update 177) ---------- */
.inTree .inGlow { transform-box: fill-box; transform-origin: center; animation: inBreath 5s ease-in-out infinite; }
.inTree .inHub circle { transform-box: fill-box; transform-origin: center; animation: inHubPulse 3.2s ease-in-out infinite; }
.inLines line.flow { stroke: #fff; stroke-opacity: .55; stroke-width: 2; stroke-dasharray: 3 22; stroke-linecap: round; animation: inFlow 1.4s linear infinite; }
.inNode.on circle { transform-box: fill-box; transform-origin: center; animation: inTwinkle 3s ease-in-out infinite; animation-delay: var(--tw, 0s); }
.inTree:not(.big) .inLines line.flow { display: none; }
@keyframes inBreath { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes inHubPulse { 0%, 100% { filter: drop-shadow(0 0 10px var(--skill)); } 50% { filter: drop-shadow(0 0 22px var(--skill)); } }
@keyframes inFlow { from { stroke-dashoffset: 25; } to { stroke-dashoffset: 0; } }
@keyframes inTwinkle { 0%, 80%, 100% { transform: scale(1); filter: none; } 88% { transform: scale(1.18); filter: drop-shadow(0 0 6px var(--skill)) brightness(1.25); } }
body.reduceMotion .inTree .inGlow, body.reduceMotion .inTree .inHub circle, body.reduceMotion .inNode.on circle { animation: none; }
body.reduceMotion .inLines line.flow { display: none; }
@media (prefers-reduced-motion: reduce) { .inTree .inGlow, .inTree .inHub circle, .inNode.on circle { animation: none; } .inLines line.flow { display: none; } }

/* ---------- The skills beside the tree: a ring of dots (update 177) ---------- */
.inRing { width: 120px; height: 120px; display: block; overflow: visible; }
.inRing circle { fill: rgba(255, 255, 255, .16); }
.inRing circle.on { fill: color-mix(in srgb, var(--skill) 70%, #000); }
.inRing .inRingTop { fill: #15151c; stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.inRing .inRingTop.on { fill: var(--skill); stroke: #fff; }
.inRing .inRingGlow { fill: var(--skill); opacity: .07; }
.inBranches.slim { display: flex; justify-content: center; }
.inBranches.slim .inDevote { grid-template-columns: auto auto 1fr auto; align-items: center; gap: 4px 14px; min-width: min(560px, 100%); }
.inBranches.slim .inDevote small { grid-column: auto; }
.inBranches.slim .inDevote button { margin: 0; }

/* ---------- Heart rate zone (update 177) ---------- */
.pwZone { margin-left: 4px; font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pwZone.z-focused { color: #8aa4ff; }
.pwZone.z-intense { color: #ffb36b; }
.pwZone.z-max { color: #ff6b81; }


/* ---------- Map select: mod groups centred under Play; their tips stay inside the panel (update 177) ---------- */
.selDetail .modGroups, .modGroups { justify-content: center; }
.modGroup .modBtn .tip { left: 0; right: auto; transform: none; }
.modGroup:nth-child(2) .modBtn .tip { left: auto; right: 0; }
.pvBtns.docked { align-self: center; margin-left: auto; margin-right: auto; max-width: 100%; }

/* ---------- Rankings: the close button inside the top card (update 177) ---------- */
.lbpBox .rkHero { margin-right: 0; padding-right: 72px; }
.lbpBox > .ppClose { top: 40px; right: 34px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.pvSkills .pXp, .pRow .pXp { white-space: nowrap; overflow: hidden; text-overflow: clip; }

/* ---------- Friends: online favourites above the feed (update 177) ---------- */
.feedList .feedHead { margin: 10px 4px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feedList .feedHead:first-child { margin-top: 2px; }

/* ---------- Up next / now playing: speed icon beside the mods (update 177) ---------- */
.mqMods { align-items: center; }
.mqMods img { height: 18px; display: block; }

/* ---------- Calm, part 2: the last off-palette spots use the one accent (update 180) ---------- */
button.snChase { color: var(--text); background: rgba(255, 255, 255, .04); border-color: var(--line); }
button.snChase:hover { background: rgba(138, 164, 255, .12); border-color: var(--accent); }
.snBar i { background: linear-gradient(90deg, #6f86e0, var(--accent)); }
.snGain { color: #c9d4ff; }
.rbCard { border-color: var(--line); background: rgba(255, 255, 255, .02); }
.rbCard.ready { border-color: var(--accent); }
.rbList > div.got { border-color: rgba(138, 164, 255, .35); }
.rbList > div.next { border-color: var(--accent); background: rgba(138, 164, 255, .08); }
.rbList .got i { color: var(--accent); background: rgba(138, 164, 255, .14); }
.unHow { border-color: var(--line); background: rgba(255, 255, 255, .02); }
.unHow b { color: var(--text); }
.unNeed { background: rgba(138, 164, 255, .08); }
.unNeed b { color: var(--accent); }
.unIco { color: var(--text); background: rgba(255, 255, 255, .06); }
.unRow.ready { border-color: rgba(138, 164, 255, .55); background: rgba(138, 164, 255, .07); }
.unRow.ready button { border-color: var(--accent); background: rgba(138, 164, 255, .2); }
.unRow.got { border-color: var(--line); }
.unRow.got .unIco { color: var(--accent); background: rgba(138, 164, 255, .12); }
.unRow.got button:disabled { color: var(--muted); }
.inPts b { color: #ffd54f; }
.mqNowTag, .mpNext { color: var(--accent); }
.mpNext:hover { color: #b4c4ff; }
.mqWatch { color: var(--accent); background: rgba(138, 164, 255, .12); border-color: rgba(138, 164, 255, .35); }
.favBtn.on, .feedBtn.on { color: var(--accent); border-color: var(--accent); }

/* ---------- Ascension: Trials and Relics (update 184) ---------- */
.ascCard.ready .snGo { border-color: #8aa4ff; color: #8aa4ff; }
.ascCard.ready .snGo:hover { background: rgba(138, 164, 255, .1); }
.rbHead small { font-weight: 500; opacity: .6; margin-left: 6px; font-size: 12px; }
.ascDeal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.ascDeal > div { padding: 10px 12px; border: 1px solid rgba(138, 164, 255, .35); border-radius: 10px; background: rgba(138, 164, 255, .06); }
.ascDeal > div.lose { border-color: var(--line); background: rgba(255, 255, 255, .02); }
.ascDeal h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8aa4ff; }
.ascDeal .lose h5 { color: var(--muted); }
.ascDeal ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 13px; }
@media (max-width: 640px) { .ascDeal { grid-template-columns: 1fr; } }
.asList { display: grid; gap: 6px; margin-bottom: 14px; }
.asList.locked { opacity: .5; }
.asRow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.asRow.on { border-color: #8aa4ff; background: rgba(138, 164, 255, .07); }
.asRow.off { opacity: .45; }
.asRow > span { flex: 1; min-width: 0; display: grid; gap: 3px; }
.asRow small { opacity: .7; font-size: 12px; }
.asRow .snBar { margin: 4px 0 0; }
.asRow button { flex: none; min-width: 74px; }
.asRow > i { width: 74px; flex: none; }

/* Mods menu (map select) */
.selModRow { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; position: relative; }
.modMenuBtn { width: auto !important; aspect-ratio: auto !important; min-width: 120px; padding: 6px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.modMenuBtn b { font-size: 14px; }
.modMenuBtn small { position: static !important; font-size: 11px; color: var(--accent); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.modWin { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(6,7,10,.6); backdrop-filter: blur(3px); }
.modMenu { width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #121318; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.mmHead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mmHead h3 { margin: 0 auto 0 0; font-size: 18px; }
.mmHead button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #1a1b21; color: inherit; cursor: pointer; font: inherit; font-size: 12px; }
.mmHead .mmDone { border-color: #8aa4ff; color: #8aa4ff; }
.mmCols { columns: 300px; column-gap: 12px; }
.mmCols .mmRow { width: 100%; }
.mmGroup { display: flex; flex-direction: column; gap: 6px; break-inside: avoid; margin-bottom: 12px; }
.mmGroup h5 { margin: 0 0 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mmRow { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px 10px; border: 1px solid #26272e; border-radius: 10px; background: #17181d; color: inherit; cursor: pointer; }
.mmRow i { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.04); color: var(--mod); font-style: normal; }
.mmRow i svg { width: 20px; height: 20px; }
.mmRow span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mmRow b { font-size: 13px; }
.mmRow small { font-size: 11.5px; color: #b8bbd0; }
.mmRow em { font-style: normal; font-size: 11px; color: var(--muted); }
.mmRow.on { border-color: var(--mod); background: color-mix(in srgb, var(--mod) 12%, #17181d); }
.mmRow.locked { opacity: .55; }
.mmRow.locked em { color: var(--accent); }
.mmClear { display: block; margin-left: auto; }
/* Unlocks: tiles instead of a long list */
.unGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.unTile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #17181d; color: inherit; text-align: center; cursor: pointer; }
.unTile:disabled { cursor: default; opacity: 1; }
.unTile .unIco { width: 44px; height: 40px; color: var(--mod, var(--accent)); background: rgba(138, 164, 255, .1); }
.unTile .unIco svg { width: 22px; height: 22px; }
.unTile b { font-size: 13px; }
.unTile small { font-size: 12px; color: var(--muted); }
.unTile.ready { border-color: var(--accent); background: rgba(138, 164, 255, .1); }
.unTile.ready small { color: #fff; font-weight: 700; }
.unTile.ready:hover { background: rgba(138, 164, 255, .18); }
.unTile.got { opacity: .55; }
.unTile:not(.got):not(.ready) small { color: var(--accent); }

/* ---------- compact tabs (update 188): less scrolling ---------- */
/* Skills */
.ckRow { padding: 6px 12px; gap: 14px; }
.ckTop b { font-size: 15px; }
.ckInfo p { margin: 1px 0 2px; }
.ckLvBar { margin-top: 4px; }
.ckChain { gap: 4px; }
.ckCell { min-width: 64px; padding: 2px 8px; }
.ckCell small { font-size: 9px; }
.ckCell b { font-size: 13px; }
/* Gear */
.gRow { padding: 5px 12px; margin-bottom: 3px; gap: 12px; }
.gName b { font-size: 14px; }
.gTiers { margin-top: 4px; }
.gTiers i { height: 5px; }
.gBuy { height: 28px; font-size: 12px; }
.gSum > div { padding: 7px 14px; }
.gSum b { font-size: 17px; }
/* Instincts: the tree fits on the screen */
.inTree { max-height: 470px; }
.inStage { margin-top: 0; }
/* Prestige: two columns */
.pgList { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 5px; }
.pgRow { grid-template-columns: 110px minmax(0, 1fr) 64px 84px; gap: 10px; padding: 5px 10px; }
.pgName b { font-size: 14px; }
.pgName small, .pgLv small { font-size: 11px; }
.pgLv em { font-size: 10px; }
.pgBar { margin-top: 5px; height: 4px; }
.pgRow button { padding: 5px 8px; font-size: 12px; }
/* Star shop and milestones */
.pkBox { margin-top: 12px; }
.pkGrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.pkCard { gap: 2px; padding: 7px 10px; }
.pkCard p { font-size: 12px; line-height: 1.3; }
.pkCard small { font-size: 11px; line-height: 1.3; }
.pkCard small:empty, .shCard small:only-of-type:not(:has(*)) { }
.pkCard button { margin-top: 2px; padding: 4px 8px; font-size: 12px; }
.shCard { grid-template-rows: auto 1fr auto auto; }
.msLadder { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 5px; }
.msStep { padding: 5px 9px; gap: 1px; }
.msStep b { font-size: 13px; }
.msStep span { font-size: 11px; line-height: 1.3; }
/* Ascension: smaller card, Trials, Relics and the Echo tree in two columns */
.ascCard { padding: 12px 14px; }
.ascCard h3 { font-size: 18px; }
.ascDeal { gap: 8px; margin: 6px 0; }
.ascDeal > div { padding: 6px 10px; }
.ascDeal ul { margin: 2px 0 0; }
.ascCard .snGo { padding: 7px; }
.asList { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 5px; margin-bottom: 10px; }
.asRow { padding: 6px 10px; }
.asRow b { font-size: 13px; }
.asRow small { font-size: 11px; }
.asRow button { min-width: 64px; padding: 4px 8px; font-size: 12px; }
.rbHead { margin: 10px 0 6px; }
@media (max-width: 600px) { .pgList, .asList { grid-template-columns: minmax(0, 1fr); } .pgRow { grid-template-columns: 90px minmax(0, 1fr) 70px; } .pgRow button { grid-column: 1 / -1; } }
/* Boosts and the summary bars */
.snSum > div { padding: 7px 14px; }
.snSum b { font-size: 17px; }
.bxCols { gap: 10px; }
.bxCols section { padding: 8px 12px; }
.bxCols h4 { margin: 0 0 4px; }
.bxRow { padding: 3px 0; gap: 8px; }
.bxRow b { font-size: 14px; }
.bxRow small { font-size: 11px; }
.bxRow button { padding: 2px 0; font-size: 11px; }
.bxTable th, .bxTable td { padding: 4px 10px; }
.ckUse { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Ascension and Transcendence side by side */
#tabAscend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; align-items: start; }
#tabAscend > * { grid-column: 1 / -1; }
#tabAscend > .ascCard.half { grid-column: auto; align-self: stretch; }
#tabAscend > .ascCard.half .ascDeal { grid-template-columns: minmax(0, 1fr); gap: 6px; }
@media (max-width: 700px) { #tabAscend > .ascCard.half { grid-column: 1 / -1; } }
.pwHrFx { margin-top: 2px; font-size: 11px; color: var(--muted); }
.pwHrFx.z-focused { color: #8aa4ff; } .pwHrFx.z-intense { color: #ffb36b; } .pwHrFx.z-max { color: #ff6b81; }
/* room for "Unconventional" in the playfield skill list */
@media (min-width: 1101px) { .pvSkills { width: 242px; } }
.pvSkills .pRow { grid-template-columns: 70px 50px minmax(0, 1fr); }

/* ---------- no scrolling (update 189): Skills, Gear and Instincts in two columns on wide screens ---------- */
@media (min-width: 1100px) {
  #tabSkills, #tabGear { columns: 2; column-gap: 10px; }
  #tabSkills > :not(.grp), #tabGear > :not(.grp) { column-span: all; }
  #tabSkills .grp, #tabGear .grp { break-inside: avoid; }
  #tabSkills .grpHead, #tabGear .grpHead { padding: 5px 10px; margin-bottom: 4px; }
  #tabSkills .grp, #tabGear .grp { margin-bottom: 6px; }
  /* Skills: the name line above its XP chain */
  #tabSkills .ckRow { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 5px 10px; margin-bottom: 4px; }
  #tabSkills .ckInfo { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
  #tabSkills .ckTop { gap: 8px; justify-content: flex-start; }
  #tabSkills .ckTop b { font-size: 14px; }
  #tabSkills .ckLvBar { grid-column: 1 / -1; margin-top: 2px; }
  #tabSkills .ckChain { flex-wrap: wrap; gap: 2px 3px; }
  #tabSkills .ckChain em { font-size: 11px; }
  #tabSkills .ckCell { min-width: 0; flex: 1 1 0; display: flex; gap: 4px; align-items: baseline; justify-content: center; padding: 2px 4px; }
  #tabSkills .ckCell small { font-size: 9px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #tabSkills .ckCell b { font-size: 12px; }
  #tabSkills .ckSplit { flex: 0 0 100%; height: 3px; margin-top: 0; }
  #tabSkills .ckHead { margin-bottom: 6px; }
  /* Gear */
  #tabGear .gRow { grid-template-columns: 112px minmax(0, 1fr) 104px; gap: 10px; padding: 4px 10px; margin-bottom: 3px; }
  #tabGear .gName b { font-size: 13px; }
  #tabGear .gNow { font-size: 12px; gap: 6px; }
  #tabGear .gNow span { font-size: 11px; }
  #tabGear .gTiers { margin-top: 3px; }
  #tabGear .gBuy { height: 26px; font-size: 11px; }
  #tabGear .gSum { margin-bottom: 8px; }
  #tabGear .gSum > div { padding: 5px 12px; }
  #tabGear .gSum b { font-size: 16px; }
  #tabGear .ckNote { margin-top: 4px; }
  /* Instincts: the tree on the left, perks down the right */
  #tabInstincts { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 16px; align-items: start; }
  #tabInstincts > .inHead { grid-column: 1 / -1; }
  #tabInstincts > .inStage, #tabInstincts > .inBranches, #tabInstincts > .inPick { grid-column: 1; }
  #tabInstincts > .pkBox { grid-column: 2; grid-row: 2 / span 3; margin-top: 4px; }
  #tabInstincts .inTree.big { max-height: 400px; }
  #tabInstincts .inStage { grid-template-columns: 1fr 3fr 1fr; }
  #tabInstincts .inSide { font-size: 13px; }
  #tabInstincts .pkBox h3 { margin: 0 0 6px; }
  #tabInstincts .pkGrid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #tabInstincts .pkCard { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; padding: 5px 9px; }
  #tabInstincts .pkCard > :not(button) { grid-column: 1; }
  #tabInstincts .pkCard button { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 4px 8px; white-space: nowrap; }
  #tabInstincts .pkTop b { font-size: 13px; }
}
