@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(fonts/unbounded-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/space-grotesk-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url(fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #06030d;
  --panel: rgba(10, 6, 22, .62);
  --panel-solid: #120b24;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f4effe;
  --muted: rgba(244, 239, 254, .56);
  --faint: rgba(244, 239, 254, .32);
  --hot: #ff4fd8;
  --gold: #ffd24f;
  --cyan: #4fc3ff;
  --mint: #5fffb0;
  --rainbow: linear-gradient(90deg, #ff4fd8, #ff9a4f, #ffd24f, #5fffb0, #4fc3ff, #a46bff, #ff4fd8);
  --r: 18px;
  --gap: 16px;
  --pad: 16px;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Unbounded", "Space Grotesk", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--cyan); text-decoration-color: rgba(79, 195, 255, .4); text-underline-offset: 2px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: #8fd8ff; text-decoration-color: currentColor; }

#viz { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; transition: opacity .5s; }
#viz.fade, #viz.off { opacity: 0; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- logo ---------- */
/* background-clip: text only paints inside the box, so the box gets room on every side for the
   glyph overhang, cancelled by an equal negative margin so the layout doesn't move. */
.logo {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
  padding: .12em; margin: -.12em;
  background: var(--rainbow); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 14s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255, 79, 216, .35));
  user-select: none;
}
@keyframes flow { to { background-position: 300% 0; } }

/* ---------- splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 10;
  display: flex; padding: 16px; overflow-y: auto;
}
.splash-card {
  width: min(440px, 100%); margin: auto;
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  padding: 32px; border-radius: 28px;
  background: rgba(8, 4, 18, .5); border: 1px solid var(--line);
  backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  animation: card-in .35s ease-out;
}
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.splash-card .logo { font-size: clamp(24px, 7.4vw, 34px); text-align: center; white-space: nowrap; margin: calc(4px - .12em) -.12em calc(-4px - .12em); }
.tagline { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field-err {
  display: block; font-size: 13px; color: #ff8fa3; line-height: 18px;
  max-height: 0; opacity: 0; margin-top: -6px; overflow: hidden;
  transition: max-height .2s ease, opacity .2s ease, margin-top .2s ease;
}
.field-err.on { max-height: 18px; opacity: 1; margin-top: 0; }
.input {
  height: 46px; padding: 0 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: rgba(255, 79, 216, .6); box-shadow: 0 0 0 3px rgba(255, 79, 216, .18); }
.input.bad, .input.bad:focus { border-color: rgba(255, 110, 140, .7); box-shadow: 0 0 0 3px rgba(255, 110, 140, .16); }
.input::placeholder { color: var(--faint); }
.row { display: flex; gap: 8px; align-items: center; }
.row > .input { flex: 1; min-width: 0; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 18px; color: var(--muted); cursor: pointer; user-select: none; margin-top: 4px; }
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent i {
  width: 18px; height: 18px; flex: none; border-radius: 5px; position: relative;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .06);
  transition: background .2s, border-color .2s;
}
.consent i::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #10051f; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.4); opacity: 0;
  transition: transform .2s, opacity .2s;
}
.consent input:checked + i { background: linear-gradient(135deg, #ff4fd8, #a46bff); border-color: transparent; }
.consent input:checked + i::after { transform: rotate(45deg) scale(1); opacity: 1; }
.consent input:focus-visible + i { box-shadow: 0 0 0 3px rgba(255, 79, 216, .3); }
.go {
  height: 52px; margin-top: 4px; border: 0; border-radius: 14px;
  font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .01em; color: #10051f;
  background: var(--rainbow); background-size: 300% 100%; animation: flow 8s linear infinite;
  box-shadow: 0 10px 40px -10px rgba(255, 79, 216, .7);
  transition: transform .15s, box-shadow .15s, opacity .2s, filter .2s;
}
.go:hover { transform: translateY(-1px); box-shadow: 0 14px 48px -10px rgba(255, 79, 216, .9); }
.go:active { transform: translateY(0); }
.go:disabled { opacity: .35; filter: saturate(.4); cursor: default; transform: none; box-shadow: none; }
.go.wide { padding: 0 32px; }
.go > span { display: inline-block; transition: opacity .15s; }
.go.tuning { cursor: progress; transform: none; animation: flow 8s linear infinite, breathe 1.1s ease-in-out infinite alternate; }
@keyframes breathe { to { box-shadow: 0 10px 56px -6px rgba(255, 79, 216, 1), 0 0 0 4px rgba(255, 79, 216, .18); } }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 18px; color: var(--muted); counter-increment: step; }
.steps li::before {
  content: counter(step); width: 22px; height: 22px; margin-top: -2px; border-radius: 50%;
  display: grid; place-items: center; font: 600 11px/1 var(--mono); color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent);
}
.steps li:nth-child(1) { --c: var(--hot); }
.steps li:nth-child(2) { --c: var(--gold); }
.steps li:nth-child(3) { --c: var(--cyan); }
.fine { align-self: center; font-size: 12px; color: var(--faint); text-decoration-color: transparent; }
.fine:hover { color: var(--muted); }

/* the letter for one particular name */
.letter { gap: 16px; }
.letter p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(244, 239, 254, .82); }
.letter .salute { font: 800 20px/1.3 var(--display); color: var(--gold); }
.letter .sign { color: var(--muted); }
.letter .go { margin-top: 8px; }

/* ---------- buttons ---------- */
.icon-btn {
  width: 40px; height: 40px; flex: none; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  transition: background .15s, border-color .15s, color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-strong); }
.icon-btn.on { color: var(--hot); border-color: rgba(255, 79, 216, .55); background: rgba(255, 79, 216, .1); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.icon-btn.lg { width: 46px; height: 46px; }
.pill-btn {
  height: 40px; padding: 0 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.pill-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-strong); }
.pill-btn svg { width: 16px; height: 16px; display: block; }

/* ---------- app layout ---------- */
#app {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--gap); padding: var(--pad);
  transition: opacity .5s;
}
body.dive #app { opacity: 0; pointer-events: none; }
.surface {
  position: fixed; top: 16px; right: 16px; z-index: 5; opacity: 0; pointer-events: none; transition: opacity .4s;
  background: rgba(8, 4, 18, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.dive .surface { opacity: .55; pointer-events: auto; }
body.dive .surface:hover { opacity: 1; }
body.dive { cursor: none; }
body.dive.mouse-live { cursor: default; }

header.bar { display: flex; align-items: center; gap: 12px; min-width: 0; }
header.bar .logo { font-size: 22px; margin-right: calc(4px - .12em); white-space: nowrap; }
.room-chip {
  height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; border: 1px dashed var(--line-strong); background: transparent;
  font: 500 13px var(--mono); color: var(--muted); max-width: 300px;
}
.room-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-chip:hover { color: var(--text); border-color: rgba(255, 79, 216, .6); }
.room-chip svg { width: 14px; height: 14px; flex: none; }
.peers { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.peer {
  height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; background: rgba(255, 255, 255, .06); font-size: 13px; white-space: nowrap;
}
.peer i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 95% 65%); box-shadow: 0 0 10px hsl(var(--h) 95% 65%); }
.peer em { font-style: normal; color: var(--faint); }
.alone { font-size: 13px; color: var(--faint); white-space: nowrap; }
.spacer { flex: 1; }

main.grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--gap); min-height: 0;
}
.col { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--pad);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  min-height: 0;
}
.card-head { display: flex; align-items: center; gap: 12px; height: 28px; margin-bottom: 12px; }
.card-head h2 {
  margin: 0; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* ---------- player ---------- */
.now { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; min-width: 0; }
.now-title {
  flex: 1; min-width: 0; font: 800 20px/1.3 var(--display); letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.now-title.empty { color: var(--faint); }
.now-time { font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wave-wrap { position: relative; }
#wave { display: block; width: 100%; height: 150px; cursor: crosshair; touch-action: none; }
.wave-note {
  position: absolute; left: 0; right: 0; top: 22px; bottom: 0;
  display: grid; place-items: center; pointer-events: none;
  font-size: 14px; color: var(--muted);
}
.tip {
  position: fixed; z-index: 30; pointer-events: none; max-width: 280px;
  padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4;
  background: rgba(14, 8, 30, .94); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.tip b { color: hsl(var(--h, 300) 95% 72%); font-weight: 600; }
.tip code { font: 12px var(--mono); color: var(--muted); }
.transport { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.play {
  width: 52px; height: 52px; flex: none; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; position: relative; color: #10051f;
  background: conic-gradient(from var(--spin, 0deg), #ff4fd8, #ffd24f, #5fffb0, #4fc3ff, #a46bff, #ff4fd8);
  box-shadow: 0 6px 30px -6px rgba(255, 79, 216, .7);
  animation: spin 6s linear infinite;
}
.play svg { width: 20px; height: 20px; display: block; }
.play:disabled { opacity: .35; cursor: default; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.vol { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.vol svg { width: 18px; height: 18px; display: block; flex: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 2px; background: var(--line-strong); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }

/* ---------- playlist ---------- */
.playlist-card { flex: 1; display: flex; flex-direction: column; }
.toggles { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  width: 30px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--text); transition: transform .2s;
}
.switch input:checked + i { background: linear-gradient(90deg, #ff4fd8, #a46bff); }
.switch input:checked + i::after { transform: translateX(12px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 2px rgba(255, 79, 216, .5); }
.tracks { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.track {
  display: grid; grid-template-columns: 20px 24px minmax(0, 1fr) auto 28px; align-items: center; gap: 10px;
  height: 44px; padding: 0 8px; border-radius: 10px; user-select: none;
  background: linear-gradient(90deg, rgba(79, 195, 255, .16) var(--p, 0%), transparent var(--p, 0%));
  transition: background-color .15s;
}
.track:hover { background-color: rgba(255, 255, 255, .05); }
.track.current { background-color: rgba(255, 79, 216, .12); box-shadow: inset 2px 0 0 var(--hot); }
.track.drop-above { box-shadow: inset 0 2px 0 var(--cyan); }
.track.drop-below { box-shadow: inset 0 -2px 0 var(--cyan); }
.track .grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.track .grip svg { width: 14px; height: 14px; display: block; }
.track .idx { font: 12px var(--mono); color: var(--faint); text-align: center; }
.track.current .idx { color: var(--hot); }
.track .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .meta { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.track .meta.wait { color: var(--cyan); }
.track .del { opacity: 0; }
.track:hover .del, .track:focus-within .del { opacity: 1; }
.empty-state {
  flex: 1; display: grid; place-items: center; text-align: center; padding: 24px;
  border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 14px;
}

/* ---------- chat ---------- */
.chat-card { display: flex; flex-direction: column; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.msg { border-radius: 10px; transition: background-color .6s; }
.msg.flash { background-color: rgba(255, 210, 79, .14); transition: none; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-head b { color: hsl(var(--h) 95% 72%); font-weight: 600; font-size: 14px; }
.msg-head time { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.msg-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.chip {
  display: inline; padding: 0 5px; margin: 0; border: 0; border-radius: 6px;
  font: 600 .88em var(--mono); line-height: inherit; vertical-align: baseline;
  color: hsl(var(--h) 95% 78%); background: hsla(var(--h), 95%, 60%, .18);
  box-shadow: 0 0 0 1px hsla(var(--h), 95%, 60%, .18);
  cursor: pointer; transition: background .15s;
}
.chip:hover { background: hsla(var(--h), 95%, 60%, .32); }
.chip.dead { color: var(--faint); background: rgba(255, 255, 255, .06); box-shadow: none; cursor: default; }
.chip small { font: inherit; font-family: var(--sans); font-weight: 500; opacity: .75; margin-right: .4em; }
.compose { display: flex; gap: 8px; margin-top: 12px; }
.compose .input { flex: 1; min-width: 0; }
.input.stamped { animation: stamped 1.2s ease-out; }
@keyframes stamped {
  0% { border-color: var(--gold); box-shadow: 0 0 0 6px rgba(255, 210, 79, .35), 0 0 30px rgba(255, 210, 79, .5); }
  100% { border-color: rgba(255, 79, 216, .6); box-shadow: 0 0 0 3px rgba(255, 79, 216, .18); }
}
.chat-empty { margin: auto; text-align: center; color: var(--faint); font-size: 14px; max-width: 260px; }

/* ---------- chat overlay (Dive and pop-out) ---------- */
.chat-ov {
  position: fixed; right: 28px; bottom: 24px; z-index: 6; max-width: min(380px, calc(100vw - 56px));
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
  font-size: 13px; line-height: 1.45; color: rgba(244, 239, 254, .88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 14px rgba(0, 0, 0, .65);
  opacity: 0; transition: opacity 2.5s ease;
}
.chat-ov.on { opacity: 1; transition: opacity .6s ease; }
.ov-line { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ov-line b { color: hsl(var(--h) 95% 74%); font-weight: 600; }

/* ---------- overlays ---------- */
.dropzone {
  position: fixed; inset: 16px; z-index: 40; border-radius: 28px; pointer-events: none;
  display: grid; place-items: center;
  border: 2px dashed rgba(255, 255, 255, .5); background: rgba(6, 3, 13, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dropzone .logo { font-size: clamp(26px, 5.5vw, 52px); margin: 0; }
.modal-back {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 1, 8, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: 22px; background: var(--panel-solid); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal h3 { margin: 0; font: 800 18px/1.3 var(--display); }
.modal p { margin: 0; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .primary { background: linear-gradient(90deg, #ff4fd8, #a46bff); border-color: transparent; color: #fff; font-weight: 600; }
.meter { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--rainbow); background-size: 300% 100%; animation: flow 8s linear infinite; }
.meter-label { display: flex; justify-content: space-between; margin-top: 8px; font: 12px var(--mono); color: var(--muted); }
.store-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.store-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 12px;
  height: 40px; padding: 0 4px 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .04);
}
.store-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-list .meta { font: 12px var(--mono); color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px);
  background: rgba(14, 8, 30, .95); border: 1px solid var(--line-strong); box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.gesture {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(3, 1, 8, .5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- pop-out window ---------- */
body.pop { background: #000; }
body.pop.still { cursor: none; }

/* ---------- privacy page ---------- */
body.doc { overflow: auto; height: auto; }
.doc-wrap { max-width: 640px; margin: 0 auto; padding: 56px 16px 72px; }
.doc-wrap .logo { display: inline-block; font-size: 22px; text-decoration: none; margin: -.12em; }
.doc-wrap h1 { margin: 36px 0 4px; font: 800 28px/1.25 var(--display); }
.doc-wrap .date { margin: 0 0 32px; font: 12px var(--mono); color: var(--faint); }
.doc-wrap h2 { margin: 36px 0 10px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--muted)); }
.doc-wrap p, .doc-wrap li { color: rgba(244, 239, 254, .8); line-height: 1.65; }
.doc-wrap p { margin: 0 0 12px; }
.doc-wrap ul { margin: 0 0 12px; padding-left: 20px; }
.doc-wrap li { margin-bottom: 8px; }
.doc-wrap li::marker { color: var(--c, var(--faint)); }
.doc-wrap b { color: var(--text); font-weight: 600; }
.doc-wrap section:nth-of-type(1) { --c: var(--mint); }
.doc-wrap section:nth-of-type(2) { --c: var(--gold); }
.doc-wrap section:nth-of-type(3) { --c: var(--cyan); }
.doc-wrap section:nth-of-type(4) { --c: var(--hot); }
.doc-wrap section:nth-of-type(5) { --c: #a46bff; }
.doc-wrap section:target h2 { animation: target 1.6s ease-out; }
@keyframes target { 0% { text-shadow: 0 0 16px currentColor; } }

/* ---------- narrow ---------- */
@media (max-width: 860px) {
  body:not(.doc) { overflow: auto; }
  #app { height: auto; min-height: 100%; grid-template-rows: auto auto; }
  main.grid { grid-template-columns: minmax(0, 1fr); }
  header.bar { flex-wrap: wrap; }
  header.bar .logo { font-size: 19px; }
  .peers { order: 5; width: 100%; }
  .playlist-card { min-height: 240px; }
  .chat-card { height: 70vh; }
  .room-chip { max-width: 200px; }
  #vizName { display: none; }
  .toggles { gap: 12px; }
  input[type=range] { width: 80px; }
}
@media (max-width: 420px) {
  .splash-card { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-ov, .chat-ov.on, .field-err { transition: none; }
  .splash-card { animation: none; }
}
