:root {
  --bg: #0a0612;
  --panel: rgba(22, 12, 38, 0.72);
  --line: rgba(180, 76, 255, 0.45);
  --soft: rgba(180, 76, 255, 0.22);
  --purple: #b44cff;
  --orange: #ff8a1f;
  --yellow: #ffd23f;
  --text: #f4ecff;
  --dim: #a99bc4;
  --side: rgba(12, 7, 22, 0.88);
  --ctl: rgba(10, 6, 18, 0.5);
  --th: #1a0e2c;
  --fill: #130a21;
  --dot: rgba(255, 255, 255, 0.24);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4ecff;
  --side: rgba(255, 255, 255, 0.9);
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(130, 40, 200, 0.45);
  --soft: rgba(130, 40, 200, 0.2);
  --text: #1e1030;
  --dim: #66557f;
  --ctl: rgba(255, 255, 255, 0.7);
  --th: #efe4ff;
  --fill: #ffffff;
  --dot: rgba(130, 40, 200, 0.22);
  --orange: #d96a00;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; height: 100%; color: var(--text); }
body {
  font: 15px/1.5 ui-rounded, "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, select, input { font: inherit; }

/* A halftone-dotted horizon glow behind everything. */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 60% 100%, rgba(255, 138, 31, 0.28), transparent 70%),
    radial-gradient(ellipse 70% 55% at 60% 0%, rgba(180, 76, 255, 0.3), transparent 70%),
    var(--bg);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: 7px 7px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 45%, transparent 60%, #000);
  mask-image: linear-gradient(to bottom, #000, transparent 45%, transparent 60%, #000);
  opacity: 0.45;
}

/* The buttons' gradients turn between purple and yellow: --spin is the angle. */
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --spin: 360deg; } }

/* Layout: a sidebar and the page beside it. */
.shell { position: fixed; inset: 0; display: grid; grid-template-columns: 196px 1fr; }
.side {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 14px;
  background: var(--side); border-right: 1px solid var(--soft); backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 8px; padding: 0 6px 10px; text-decoration: none; }
.brand b {
  font-size: 18px; white-space: nowrap; letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--purple), #ff5fa0 55%, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; align-self: flex-end; margin-bottom: 3px; }
.mark {
  width: 18px; height: 18px; flex: none; border-radius: 3px;
  background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple));
  animation: spin 5s linear infinite;
  box-shadow: 0 0 12px rgba(180, 76, 255, 0.6);
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--dim); border: 1px solid transparent; transition: color .15s, background .15s;
}
.nav svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.nav a:hover, .nav a:focus-visible { color: var(--text); background: rgba(180, 76, 255, 0.12); outline: none; }
.nav a.on {
  color: var(--text); background: rgba(180, 76, 255, 0.22); border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--orange), 0 0 16px rgba(180, 76, 255, 0.2);
}
.nav a.on svg { fill: var(--yellow); }
.side .online { margin-top: auto; padding: 0 6px; }

.stage { position: relative; min-width: 0; min-height: 0; }
.page { position: absolute; inset: 0; overflow-y: auto; }
.page-in { max-width: 860px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.page-in.wide { max-width: 1240px; }
.title { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; text-transform: capitalize; }
.sub { margin: -10px 0 0; color: var(--dim); }
.note { color: var(--dim); font-size: 13px; }

.online { margin: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: 14px; white-space: nowrap; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: #5dff9a; box-shadow: 0 0 8px #5dff9a; }
.online b { color: var(--text); font-weight: 600; }

.ghost {
  font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 12px; cursor: pointer; text-decoration: none; font-size: 14px;
}
.ghost:hover { border-color: var(--orange); color: var(--orange); }

/* Play: the banner */
.hero {
  position: relative; min-height: 250px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line);
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 31% 9%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 46% 26%, #fff8, transparent), radial-gradient(1.2px 1.2px at 63% 12%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 22%, #fff8, transparent), radial-gradient(1.2px 1.2px at 91% 8%, #fff, transparent),
    linear-gradient(to bottom, #2a0c52 0%, #6a1f9a 38%, #c4408a 62%, #ff8a1f 92%);
  box-shadow: 0 0 30px rgba(180, 76, 255, 0.3);
}
.hero-sun {
  position: absolute; right: 16%; bottom: 52px; width: 120px; height: 120px; border-radius: 50%;
  background: repeating-linear-gradient(to bottom, #ffd23f 0 9px, transparent 9px 14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  box-shadow: 0 0 60px rgba(255, 210, 63, 0.55);
}
.hero-hills {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: #14081f;
  clip-path: polygon(0 62%, 8% 55%, 15% 60%, 24% 40%, 31% 48%, 40% 30%, 48% 44%, 58% 36%, 66% 52%, 75% 42%, 84% 54%, 92% 46%, 100% 58%, 100% 100%, 0 100%);
}
.hero-text { position: relative; padding: 26px 28px; }
.logo { margin: 0; font-size: clamp(40px, 8vw, 68px); line-height: 1; letter-spacing: -0.02em; font-weight: 700; }
.logo span {
  display: inline-block;
  background: linear-gradient(100deg, #fff 5%, #ffe9a8 45%, var(--yellow) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(180, 76, 255, 0.9)) drop-shadow(0 2px 0 rgba(30, 6, 60, 0.7));
}
.hero-text p { margin: 8px 0 12px; font-weight: 600; text-shadow: 0 1px 6px rgba(20, 4, 40, .8); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span {
  font-size: 12px; padding: 1px 9px; border-radius: 4px; background: rgba(10, 6, 18, .55); border: 1px solid rgba(255, 255, 255, .35);
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--soft); }
.panel-head h2 { margin: 0; font-size: 17px; flex: 1; }
.table-wrap { max-height: 260px; overflow: auto; }
.rooms { width: 100%; border-collapse: collapse; }
.rooms th, .rooms td { text-align: left; padding: 9px 16px; }
.rooms th { position: sticky; top: 0; background: var(--th); color: var(--dim); font-weight: 500; font-size: 13px; text-transform: lowercase; }
.rooms tbody tr + tr td { border-top: 1px solid rgba(180, 76, 255, 0.2); }
.rooms .code { font: 600 15px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--orange); letter-spacing: .04em; }
.rooms .count { white-space: nowrap; }
.rooms td:last-child { text-align: right; }
.copy { font-size: 13px; padding: 2px 10px; }
.empty { margin: 0; padding: 26px 16px; text-align: center; color: var(--dim); }
.empty button { margin-left: 8px; }

.playbar {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
}
.who { flex: 1; min-width: 0; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; }
.who small { color: var(--dim); }
/* The gradient is the outline; hovering fills the button with it. */
.launch, .server .join {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; cursor: pointer;
  color: var(--text); border: 2px solid transparent; border-radius: 8px;
  background:
    linear-gradient(var(--fill), var(--fill)) padding-box,
    linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)) border-box;
  animation: spin 4s linear infinite; transition: color .15s, box-shadow .15s;
}
.launch { font-size: 22px; padding: 12px 52px; box-shadow: 0 0 16px rgba(180, 76, 255, 0.35); }
.launch:hover, .launch:focus-visible, .server .join:hover, .server .join:focus-visible {
  outline: none; color: #12081f; animation-duration: 1.6s;
  background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)) border-box;
  box-shadow: 0 0 24px rgba(180, 76, 255, 0.7), 0 0 40px rgba(255, 210, 63, 0.4);
}

/* Chat and the game player */
.frame-page { display: flex; flex-direction: column; background: rgba(10, 6, 18, 0.6); }
.frame-page iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.bar {
  display: flex; align-items: center; gap: 16px; padding: 10px 18px;
  background: var(--panel); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
}
.bar h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.back { text-decoration: none; color: var(--orange); }
.back:hover { text-decoration: underline; }

/* Games and apps */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar input, .toolbar select, .field select {
  color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px;
}
.toolbar input { flex: 1; min-width: 160px; max-width: 360px; }
.toolbar input:focus, .toolbar select:focus, .field select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 12px rgba(255, 138, 31, 0.35); }
.toolbar .note { margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 4px; }
.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; overflow: hidden; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #160c26; display: block; }
.card b { padding: 8px 10px; font-weight: 600; font-size: 14px; line-height: 1.3; }
.card small { padding: 0 10px 10px; color: var(--dim); font-size: 12px; line-height: 1.35; }
.card:hover, .card:focus-visible {
  transform: translateY(-3px); border-color: var(--orange); outline: none;
  box-shadow: 0 0 18px rgba(255, 138, 31, 0.45), 0 0 32px rgba(180, 76, 255, 0.3);
}
.grid.apps { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Settings */
.tabs { display: flex; gap: 4px; margin-bottom: -17px; position: relative; z-index: 1; padding-left: 10px; }
.tab {
  color: var(--dim); background: var(--ctl); border: 1px solid var(--soft); border-bottom: 0;
  border-radius: 8px 8px 0 0; padding: 8px 16px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--panel); border-color: var(--line); box-shadow: inset 0 2px 0 var(--orange); }
.tabpanel { padding: 18px 22px 22px; }
.tabpanel h3 { margin: 0 0 6px; font-size: 18px; }
.row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--soft); }
.row:first-of-type { border-top: 0; }
.row > label { color: var(--dim); font-size: 14px; padding-top: 7px; }
.field { min-width: 0; }
.field select { min-width: 220px; }
.hint { margin: 8px 0 0; color: var(--dim); font-size: 13px; max-width: 520px; }
.hint.wide-hint { max-width: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  color: var(--dim); background: var(--ctl); border: 0; padding: 7px 18px; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button.on { color: #12081f; font-weight: 700; background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)); animation: spin 4s linear infinite; }

.section { border-top: 1px solid var(--soft); margin-top: 8px; padding-top: 18px; }
.relay-list { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.relay-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--ctl); border: 1px solid var(--soft);
}
.relay-list .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.relay-list small { color: var(--dim); font-family: ui-monospace, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; }
.relay-list .tag { font-size: 12px; padding: 2px 10px; border-radius: 5px; color: #12081f; font-weight: 700; background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)); animation: spin 4s linear infinite; }
.relay-form { display: flex; gap: 10px; flex-wrap: wrap; }
.relay-form input { color: var(--text); background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; flex: 1; min-width: 140px; }
.relay-form input:focus { outline: none; border-color: var(--orange); }
.servers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.server {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
}
.server::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(100deg, transparent 30%, rgba(180, 76, 255, .22) 70%, rgba(255, 138, 31, .22));
}
.server > * { position: relative; }
.server .icon {
  width: 56px; height: 56px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 24px; font-weight: 700;
  color: #12081f; background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)); animation: spin 6s linear infinite;
}
.server .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.server .meta b { font-size: 16px; }
.server .motd { color: var(--orange); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server .motd2 { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server .stat { color: var(--dim); font: 13px ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server .stat i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; background: var(--dim); }
.server .stat i.up { background: #5dff9a; box-shadow: 0 0 6px #5dff9a; }
.server .stat i.down { background: #ff6b6b; }
.server .join { padding: 8px 26px; }
.server .x { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 6px; }
.server .x:hover { color: #ff7a59; }
.code-form { padding: 12px 16px; border-top: 1px solid var(--soft); }
.rooms .join-room { margin-right: 6px; font-size: 13px; padding: 2px 12px; }
.drop {
  display: flex; align-items: center; gap: 14px; padding: 22px; margin-top: 8px; border: 1px dashed var(--line); border-radius: 8px;
  background: var(--ctl); color: var(--dim);
}
.drop.over { border-color: var(--orange); background: rgba(255, 138, 31, .12); }
.relay-list .size { color: var(--dim); font-size: 13px; white-space: nowrap; }
.err { color: #ff6b6b; }
.danger { width: 100%; margin-top: 14px; padding: 9px; cursor: pointer; color: #ff7a59; background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; }
.danger:hover { border-color: #ff7a59; background: rgba(255, 90, 60, .12); }


/* Accounts, staff and the shout */
.pad { padding: 16px 18px; margin-bottom: 16px; }
.pad h3 { margin: 0 0 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.actions { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.stack input, .pad > input, .field > input[type=text], .pad textarea, .shout-form textarea {
  width: 100%; color: var(--text); background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; resize: vertical;
}
.stack input:focus, .pad > input:focus, .field > input:focus, .pad textarea:focus, .shout-form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 12px rgba(255, 138, 31, .35); }
.field > input[type=text] { max-width: 280px; }
#tag-color { margin: 10px 0 0 10px; width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; vertical-align: middle; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 5px; color: #12081f; background: linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple)); animation: spin 4s linear infinite; text-transform: lowercase; }
.chip.mute { color: var(--text); background: var(--ctl); border: 1px solid var(--line); animation: none; }
.chip.bad { color: #ff7a59; background: rgba(255, 90, 60, .12); border: 1px solid #ff7a59; animation: none; }
.who-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.who-name { font-size: 22px; }
.shout { margin-bottom: 14px; padding: 12px 16px; border-radius: 10px; background: var(--panel); border: 1px solid transparent;
  background-image: linear-gradient(var(--fill), var(--fill)), linear-gradient(var(--spin), var(--purple), var(--yellow), var(--purple));
  background-origin: border-box; background-clip: padding-box, border-box; animation: spin 8s linear infinite; }
.shout-head { display: flex; align-items: center; gap: 10px; }
.shout-head small { color: var(--dim); flex: 1; }
.shout p { margin: 6px 0 0; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.shout-form { margin-bottom: 14px; }
.shout-form textarea { display: block; }
#shout-new { margin-bottom: 14px; }
.poll-box { margin: 10px 0; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.poll-row { display: flex; gap: 8px; margin-top: 8px; }
.poll-row input { flex: 1; color: var(--text); background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.poll-row input:focus { outline: none; border-color: var(--orange); }
#poll-add { margin-top: 8px; }
.lockmsg { padding: 10px 14px; border: 1px solid var(--orange); border-radius: 8px; }
.shout .zh-poll { max-width: 560px; }
.person { flex-wrap: wrap; }
.person .meta { min-width: 180px; }
.person .meta small, .logrow .meta small { color: var(--dim); }
.person .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.person select, .logrow .undo { color: var(--text); background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.logrow .undone { color: var(--dim); text-decoration: line-through; }
.person .ghost:disabled, .logrow .ghost:disabled { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .chip, .shout { animation: none; } }

.noscript { position: fixed; inset: auto 0 20px; text-align: center; color: var(--dim); }

/* The sidebar scrolls when it is taller than the window, and folds to icons. */
.side { min-height: 0; }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.side-toggle {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  color: var(--dim); background: none; border: 1px solid transparent; font: inherit; flex: none;
}
.side-toggle:hover, .side-toggle:focus-visible { color: var(--text); background: rgba(180, 76, 255, 0.12); outline: none; }
.side-toggle svg { width: 20px; height: 20px; fill: currentColor; flex: none; transition: transform .2s; }
.shell { transition: grid-template-columns .2s; }
.shell.collapsed { grid-template-columns: 68px 1fr; }
.shell.collapsed .side { padding: 18px 8px; align-items: stretch; }
.shell.collapsed .brand { justify-content: center; padding: 0 0 10px; }
.shell.collapsed .brand b, .shell.collapsed .brand small, .shell.collapsed .nav a > span:not(.ico),
.shell.collapsed .side-toggle span { display: none; }
.shell.collapsed .nav a, .shell.collapsed .side-toggle { justify-content: center; padding: 10px 0; gap: 0; }
.shell.collapsed .nav a.on { box-shadow: inset 0 0 0 1px var(--orange), 0 0 16px rgba(180, 76, 255, 0.2); }
.shell.collapsed .side-toggle svg { transform: rotate(180deg); }
.shell.collapsed .side .online { padding: 0; font-size: 0; flex-direction: column; justify-content: center; gap: 4px; }
.shell.collapsed .side .online b { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .shell, .side-toggle svg { transition: none; } }
@media (max-width: 720px) { .side-toggle { display: none; } .nav { overflow-x: auto; overflow-y: hidden; } }

/* Narrow screens: the sidebar becomes a bar along the bottom. */
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { grid-row: 2; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--soft); gap: 6px; }
  .brand, .side .online { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 11px; }
  .nav a.on { box-shadow: inset 0 3px 0 var(--orange); }
  .page-in { padding: 16px 14px 28px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .row > label { padding-top: 0; }
  .rooms th, .rooms td { padding: 8px 10px; }
  .server { flex-wrap: wrap; }
  .server .meta { flex-basis: calc(100% - 80px); }
  .server .join { margin-left: auto; }
  .launch { padding: 10px 24px; font-size: 18px; }
  .hero { min-height: 220px; }
  .hero-sun { right: 8%; width: 84px; height: 84px; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .mark, .launch, .seg button.on, .relay-list .tag, .server .icon, .server .join { animation: none; }
}

#profile-name { min-width: 240px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--soft); background: transparent; color: inherit; }
#profile-face { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 8px; margin: 10px 0 0; display: block; }
#profile .actions { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
#profile .file { cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted, inherit); }
.relay-form .check input { flex: 0 0 auto; min-width: 0; padding: 0; }
.instance-name { font-weight: 600; }
#instance-list .server { display: flex; align-items: center; gap: 10px; }
#instance-list .meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
#mod-list .server { display: flex; align-items: center; gap: 12px; }
#mod-list .meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#mod-list input[type=checkbox] { flex: 0 0 auto; width: 18px; height: 18px; }
.link-btn { text-decoration: none; display: inline-flex; align-items: center; }

.profile-signed #profile-name-row { display: none; }
.refresh-when { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.refresh-when select, .refresh-when input { color: var(--text); background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.refresh-when input[type=number] { width: 90px; }
#owner-tools h3 + .hint + .row, #owner-tools textarea + .check { margin-top: 8px; }
#owner-tools .check { margin: 8px 0; }
#owner-tools h3:not(:first-child) { margin-top: 22px; }

/* The Chat tab's dot: red when you were pinged, white for other unread messages. */
.nav .ico { position: relative; display: flex; flex: none; }
.nav .dot { position: absolute; top: -4px; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--side); }
.nav .dot.red { background: #ff3b3b; }
.nav .dot[hidden] { display: none; }
.shell.collapsed .nav .ico { margin: 0; }

/* The Roblox and Discord tabs say why they can't load yet. */
.proxy-off { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: rgba(10, 6, 18, 0.92); color: var(--text); }
.proxy-off p { max-width: 460px; margin: 0; color: var(--dim); }

/* The Discord tab's mention count. */
.nav .mention-badge { position: absolute; top: -7px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #f01f23; color: #fff; font: 800 11px/18px Arial, Helvetica, sans-serif; text-align: center; font-style: normal; box-shadow: 0 0 0 2px var(--side); pointer-events: none; }
.nav .mention-badge[hidden] { display: none; }

/* ---- Music player (floating window + bottom-right controller) ---- */
.mw, .mc, .mc-dot { position: fixed; z-index: 900; color: #f4ecff; font: inherit; }
.mw .hint, .mc .hint { color: #cdbfe6; }
.mw { top: 64px; right: 24px; width: min(440px, 94vw); height: min(560px, calc(100vh - 280px)); display: flex; flex-direction: column; background: #120a20; border: 1px solid rgba(180, 76, 255, .45); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); overflow: hidden; }
.mw[hidden], .mc[hidden], .mc-dot[hidden] { display: none; }
.mw.min { height: auto; }
.mw.min .mw-body { display: none; }
.mw-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: rgba(180, 76, 255, .16); cursor: grab; user-select: none; touch-action: none; }
.mw-title { font-weight: 700; }
.mw-sp { flex: 1; }
.mw button, .mc button, .mc-dot { border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); color: inherit; border-radius: 9px; min-width: 30px; height: 30px; padding: 0 9px; cursor: pointer; font: inherit; }
.mw button:hover, .mc button:hover, .mc-dot:hover { background: rgba(180, 76, 255, .28); }
.mw button.on, .mc button.on { background: rgba(180, 76, 255, .45); }
.mw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mw-tabs { display: flex; gap: 4px; padding: 8px 10px 0; }
.mw-tabs button { border-radius: 9px 9px 0 0; }
.mw-tabs button[aria-selected="true"] { background: rgba(180, 76, 255, .4); }
.mw section { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; overflow-y: auto; }
.mw section[hidden] { display: none; }
.mw-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; opacity: .9; }
#mw-frame { flex: 1; min-height: 200px; width: 100%; border: 0; border-radius: 10px; background: #fff; }
.mu-now, .mc-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-times { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; }
.mw input[type=range], .mc input[type=range] { width: 100%; accent-color: #b44cff; }
.mu-ctl { display: flex; gap: 6px; justify-content: center; }
.mu-ctl .big { min-width: 46px; background: rgba(180, 76, 255, .38); }
.mu-vol { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.mw form { display: flex; gap: 6px; }
.mw input[type=text] { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .3); color: inherit; font: inherit; }
.mw .err { color: #ff9aa8; min-height: 1em; margin: 0; }
#mu-media { line-height: 0; border-radius: 8px; overflow: hidden; }
#mu-media iframe { width: 100%; height: 0; border: 0; }
.mu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mu-list li { display: flex; border-radius: 8px; }
.mu-list li.cur { background: rgba(180, 76, 255, .24); }
.mu-list li button { border: 0; background: none; border-radius: 8px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-list li button:first-child { flex: 1; min-width: 0; }
.mu-list .empty { opacity: .6; font-size: 13px; padding: 6px 8px; }
.mc { right: 16px; bottom: 16px; width: 290px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #120a20; border: 1px solid rgba(180, 76, 255, .45); border-radius: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .5); }
.mc-head { display: flex; gap: 6px; align-items: center; }
.mc-title { flex: 1; min-width: 0; }
.mc .mc-open { align-self: flex-start; height: 26px; font-size: 12px; opacity: .85; }
.mc-dot { right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: rgba(180, 76, 255, .5); font-size: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
@media (max-width: 700px) { .mw { right: 3vw; top: 56px; } }
.mw-addr { display: flex; gap: 6px; }
.mw-addr[hidden] { display: none; }
