/* Fonts: Geist and Geist Mono (variable), Copyright 2024 The Geist Project Authors
   (https://github.com/vercel/geist-font). Licensed under the SIL Open Font License 1.1
   (https://openfontlicense.org). Served from this host, never from a CDN. */

/* DISFLUX community hub. A members' product: one community at a time, branded at runtime.
   --accent is the community colour (set from JS after validation); everything else is a warm graphite room
   so the logos, the streams and that one colour carry the page. Red is reserved for "ao vivo". */

@font-face { font-family: "Geist"; src: url("geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("geist-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("geist-mono-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* --- tokens ---------------------------------------------------------------- */

:root {
  --room: #16181c;
  --room-2: #1c1f24;
  --panel: #22252b;
  --panel-2: #2a2e35;
  --plate: #30343c;
  --line: #343841;
  --line-2: #464b55;
  --text: #eef0f3;
  --muted: #a7adb7;
  --faint: #7f8692;
  --stage: #08090b;

  /* Community colour, replaced at runtime. --on-accent and --accent-ink are computed together with it. */
  --accent: #d6dae1;
  --on-accent: #16181c;
  --accent-ink: #d6dae1;
  --accent-wash: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 30%, transparent);

  --live: #ff4b5c;
  --live-wash: rgba(255, 75, 92, .14);
  --ok: #4ade80;
  --bad: #ff7a85;
  --bad-wash: rgba(255, 75, 92, .1);
  --discord: #5865f2;
  --fluxer: #3ddc97;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-stage: 18px;
  --r-card: 14px;
  --r-ctl: 10px;
  --r-pill: 999px;
  --gut: 16px;
  --wrap: 1360px;
  --tap: 44px;

  color-scheme: dark;
}

/* --- base ------------------------------------------------------------------ */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--room); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--room); color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.fill { fill: currentColor; stroke: none; }
.num, time { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--text); color: var(--room); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }

.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--plate); border-color: var(--line-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--live) 45%, transparent); color: var(--bad); }
.btn.danger:hover { background: var(--bad-wash); }
.btn.danger.armed { background: var(--live); border-color: var(--live); color: #fff; }
.btn.big { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn.icon { width: var(--tap); padding: 0; }

.btn.discord { background: var(--discord); border-color: var(--discord); color: #fff; }
.btn.discord:hover { filter: brightness(1.1); }
.btn.fluxer { background: var(--fluxer); border-color: var(--fluxer); color: #0d2a1d; }
.btn.fluxer:hover { filter: brightness(1.06); }
.plat-ico { width: 22px; height: 22px; flex: none; }

/* --- top bar --------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--room) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.top-in { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; height: 60px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: var(--tap); color: var(--text); text-decoration: none; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; flex: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-weight: 750; font-size: 18px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { color: var(--faint); font-weight: 500; font-size: 14px; white-space: nowrap; }
.account { margin-left: auto; position: relative; }
.me-btn {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 10px 4px 4px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--room-2); color: var(--text);
}
.me-btn:hover { border-color: var(--line-2); }
.me-btn[aria-expanded="true"] { border-color: var(--accent-line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--plate); flex: none; }
.avatar.lg { width: 64px; height: 64px; }
.monogram { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.me-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.menu[hidden] { display: none; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { color: var(--faint); font-size: 13px; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 12px;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text); text-align: left; text-decoration: none; font-size: 15px;
}
.menu a:hover, .menu button:hover { background: var(--panel-2); }

/* --- hub home: the stage ---------------------------------------------------- */

.app { display: block; padding-bottom: 64px; }
.app:focus { outline: none; }

.stage-wrap {
  width: min(var(--wrap), 100% - 2 * var(--gut)); margin: 20px auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
}
.stage {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  border-radius: var(--r-stage); background: var(--stage);
  border: 1px solid var(--line);
  isolation: isolate;
}
/* The light spill: the community colour falling onto the stage from above. The only decoration on the page. */
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 90% at 50% -10%, var(--accent-glow), transparent 62%),
    radial-gradient(40% 60% at 50% 120%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  transition: opacity .4s ease;
}
.stage.is-playing::before { opacity: 0; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; display: none; }
.stage.is-playing video { display: block; background: #000; }
.stage audio { display: none; }

.stage-art {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 8%;
}
.stage.is-playing .stage-art { display: none; }
.art-plate {
  width: min(46%, 360px); aspect-ratio: 1; display: grid; place-items: center; padding: 14%;
  border-radius: 28px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--plate) 92%, var(--accent)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--line-2) 70%, var(--accent));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset;
}
.art-plate { position: relative; }
.art-plate img { position: absolute; left: 16%; top: 16%; width: 68%; height: 68%; object-fit: contain; }
.art-plate.round { border-radius: 50%; padding: 0; overflow: hidden; }
.art-plate.round img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.art-plate.bare { background: none; border: 0; box-shadow: none; padding: 0; width: min(52%, 420px); }
.art-plate.bare img { left: 0; top: 0; width: 100%; height: 100%; filter: drop-shadow(0 24px 50px rgba(0, 0, 0, .6)); }
.art-letters { font-size: clamp(36px, 9vw, 96px); font-weight: 800; letter-spacing: -.04em; color: var(--muted); }
.art-play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; color: inherit;
}
.art-play span {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translate(0, 0); transition: transform .15s ease;
  margin-top: auto; margin-bottom: 9%; margin-left: auto; margin-right: 7%;
}
.art-play:hover span { transform: scale(1.06); }
.art-play .ico { width: 30px; height: 30px; margin-left: 4px; }

.stage-msg {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px;
  padding: 24px; text-align: center; color: var(--text); font-weight: 500;
  background: rgba(8, 9, 11, .55);
}
.stage-msg[hidden] { display: none; }
.stage-msg .spinner { width: 34px; height: 34px; }

.controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px;
  padding: 28px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  opacity: 1; transition: opacity .25s ease;
}
.controls[hidden] { display: none; }
.stage.idle-ui .controls { opacity: 0; }
.ctl {
  width: var(--tap); height: var(--tap); display: grid; place-items: center; flex: none;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: #fff;
}
.ctl:hover { background: rgba(255, 255, 255, .14); }
.ctl.on { color: var(--accent-ink); }
.vol { display: flex; align-items: center; min-width: 0; }
.vol input { width: 110px; accent-color: var(--accent); }
.ctl-tag { color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 500; padding: 0 6px; white-space: nowrap; }
.ctl-tag.live { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.spacer { flex: 1; }
.unmute {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r-pill); border: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 650;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.unmute[hidden] { display: none; }
.stage:fullscreen { border-radius: 0; border: 0; }

/* Info beside (desktop) or under (phone) the stage. */
.stage-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 4px 2px; }
.info-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.info-title { font-size: clamp(28px, 4.2vw, 46px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; overflow-wrap: anywhere; }
.info-sub { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.info-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.info-who > div { min-width: 0; }
.info-logo { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 12px; background: var(--plate); padding: 7px; }
.guide { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.guide-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
.guide-row dt { color: var(--faint); font-size: 13px; padding-top: 2px; }
.guide-row dd { margin: 0; overflow-wrap: anywhere; }
.guide-row.now dd { font-weight: 600; }
.info-note { color: var(--faint); font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill.live { background: var(--live-wash); color: #ff98a2; }
.pill.accent { background: var(--accent-wash); color: var(--accent-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.pill.live .dot, .ctl-tag.live .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* --- browse rows ------------------------------------------------------------- */

.browse { width: min(var(--wrap), 100% - 2 * var(--gut)); margin: 40px auto 0; display: grid; gap: 40px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.row-head h2 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.row-head p { color: var(--faint); font-size: 13px; }
.cat { margin-top: 22px; }
.cat:first-of-type { margin-top: 0; }
.cat h3 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.live-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.tile {
  position: relative; display: flex; flex-direction: column; gap: 0; min-width: 0; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--room-2); color: var(--text);
  text-align: left; overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease;
}
.tile:hover { border-color: var(--line-2); background: var(--panel); }
.tile.is-playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tile-art {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(170deg, var(--plate), var(--panel));
  border-bottom: 1px solid var(--line);
}
.tile-art img { position: absolute; left: 22%; top: 18%; width: 56%; height: 64%; object-fit: contain; }
.tile-art .art-letters { font-size: 30px; }
.tile-body { display: grid; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.tile-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-now { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.off .tile-art img { opacity: .45; filter: grayscale(1); }
.tile-badge { position: absolute; top: 8px; left: 8px; }
.tile-badge .pill { height: 22px; font-size: 12px; padding: 0 8px; background: rgba(8, 9, 11, .72); }
.tile-badge .pill.live { color: #fff; }
.tile-q { position: absolute; top: 8px; right: 8px; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(8, 9, 11, .72); color: var(--muted); font: 600 11px/22px var(--mono); }

.live-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 84px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: linear-gradient(120deg, var(--live-wash), transparent 55%), var(--room-2); color: var(--text); text-align: left; width: 100%;
}
.live-card:hover { border-color: color-mix(in srgb, var(--live) 50%, var(--line)); }
.live-card.is-playing { border-color: var(--accent); }
.live-card .avatar { width: 56px; height: 56px; box-shadow: 0 0 0 2px var(--room-2), 0 0 0 4px var(--live); }
.live-card strong { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card span.where { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; min-width: 0; }
.live-card span.where b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-go { display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--panel-2); color: var(--text); }
.live-card:hover .live-go { background: var(--accent); color: var(--on-accent); }

.empty {
  padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--r-card); color: var(--muted); max-width: 70ch;
}

/* --- centred pages: sign in, setup, not a member, communities ------------- */

.center { width: min(460px, 100% - 2 * var(--gut)); margin: 7vh auto 0; }
.card {
  background: var(--room-2); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px;
  display: grid; gap: 18px;
}
.card.lit { position: relative; overflow: hidden; isolation: isolate; }
.card.lit::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90% 60% at 50% -10%, var(--accent-glow), transparent 65%);
}
.card-logo { width: 112px; height: 112px; object-fit: contain; margin: 4px auto 0; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .55)); }
.card-mark { width: 72px; height: 72px; margin: 4px auto 0; }
.card h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-align: center; }
.card .lead { color: var(--muted); text-align: center; }
.stack { display: grid; gap: 10px; }
.notice { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--panel-2); color: var(--muted); font-size: 14px; }
.notice.bad { background: var(--bad-wash); color: #ffc2c7; }
.notice.accent { background: var(--accent-wash); color: var(--text); }
.card-foot { text-align: center; font-size: 14px; color: var(--faint); }
.who-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel); }
.who-box > div { min-width: 0; }
.who-box strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-box span { color: var(--faint); font-size: 13px; }

.page { width: min(var(--wrap), 100% - 2 * var(--gut)); margin: 32px auto 0; }
.page-title { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.page-lead { color: var(--muted); margin-top: 8px; max-width: 60ch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.communities { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.community {
  --c: var(--accent);
  position: relative; display: grid; gap: 14px; padding: 22px; min-height: 200px; align-content: end;
  border: 1px solid var(--line); border-radius: 18px; color: var(--text); text-decoration: none; overflow: hidden; isolation: isolate;
  background: var(--room-2);
}
.community::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 80% at 85% 0%, color-mix(in srgb, var(--c) 32%, transparent), transparent 70%);
}
.community::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); }
.community:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.community img { width: 72px; height: 72px; object-fit: contain; position: absolute; top: 20px; right: 20px; }
.community strong { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.community span { color: var(--muted); font-size: 14px; }

/* --- manage (Gerir) --------------------------------------------------------- */

.stack-lg { display: grid; gap: 20px; min-width: 0; align-content: start; }
.manage { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); padding-bottom: 90px; }
.panel { background: var(--room-2); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.panel > h2 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.panel > .panel-lead { color: var(--faint); font-size: 14px; margin-top: 4px; }
.panel-body { margin-top: 18px; display: grid; gap: 16px; }
.fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--faint); font-size: 13px; }
.input {
  width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--room); color: var(--text); font-size: 16px;
}
.input:focus { border-color: var(--accent-line); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.input:disabled { color: var(--faint); background: var(--room-2); }
.input.mono { font-family: var(--mono); font-size: 14px; }
select.input { padding-right: 8px; }
.color-row { display: flex; gap: 10px; }
.color-row input[type="color"] { width: 56px; min-height: var(--tap); padding: 4px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--room); flex: none; }
.switch { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 10px 0; cursor: pointer; }
.switch input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.switch strong { display: block; font-weight: 600; }
.switch span span { color: var(--faint); font-size: 13px; }
.brand-preview { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--room); border: 1px solid var(--line); }
.brand-preview img { width: 48px; height: 48px; object-fit: contain; }
.brand-preview strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand-preview .art-letters { width: 48px; font-size: 22px; text-align: center; flex: none; }
.brand-preview p { font-size: 13px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; margin-left: auto; flex: none; background: var(--accent); }

.picked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: pick; }
.picked li {
  display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 6px 6px 6px 10px; border-radius: 12px; background: var(--room); border: 1px solid var(--line); counter-increment: pick;
}
.picked li::before { content: counter(pick); color: var(--faint); font: 500 13px/1 var(--mono); text-align: right; }
.picked li.none { grid-template-columns: minmax(0, 1fr); padding: 14px; border-style: dashed; }
.picked li.none::before { content: none; }
.picked img, .picked .mini { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--plate); padding: 4px; }
.picked .mini { display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.picked .nm { min-width: 0; }
.picked .nm strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picked .nm span { color: var(--faint); font-size: 13px; }
.picked .acts { display: flex; gap: 2px; }
.picked .acts .btn { width: 40px; min-height: 40px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.picked .acts .btn:hover { background: var(--panel-2); color: var(--text); }

.picker-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.picker-tools .input { flex: 1 1 220px; }
.pick-cat h3 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 6px 0 8px; }
.pick-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pick {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--room); color: var(--text); text-align: left;
}
.pick img, .pick .mini { width: 36px; height: 36px; object-fit: contain; border-radius: 7px; background: var(--plate); padding: 3px; }
.pick .mini { display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--muted); }
.pick span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.pick .tick { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.pick[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-wash); }
.pick[aria-pressed="true"] .tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pick .tick .ico { width: 14px; height: 14px; stroke-width: 3; }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list li:last-child { border-bottom: 0; }
.list li > div { min-width: 0; flex: 1; }
.list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list span { color: var(--faint); font-size: 13px; overflow-wrap: anywhere; }
.plat { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.plat.discord { background: color-mix(in srgb, var(--discord) 22%, transparent); color: #a5adff; }
.plat.fluxer { background: color-mix(in srgb, var(--fluxer) 18%, transparent); color: #6fe6b1; }
.plat .plat-ico { width: 18px; height: 18px; }
.add-admin { display: grid; gap: 10px; grid-template-columns: 130px minmax(0, 1fr); align-items: end; padding-top: 6px; border-top: 1px solid var(--line); }
.add-admin .full { grid-column: 1 / -1; }
.audit li { align-items: flex-start; }
.audit time { color: var(--faint); font-size: 13px; flex: none; min-width: 92px; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-2);
  padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
}
.savebar-in { width: min(var(--wrap), 100%); margin-inline: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.savebar-in p { color: var(--muted); font-size: 14px; flex: 1 1 180px; }
.savebar-in p.dirty { color: var(--text); }
.danger-zone { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* --- toast ------------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px);
  max-width: min(520px, 100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--text); color: var(--room); font-weight: 600; box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #ffd5d9; color: #3a0d12; }
.has-savebar .toast { bottom: 92px; }

/* --- larger screens ---------------------------------------------------------- */

@media (min-width: 700px) {
  :root { --gut: 28px; }
  .top-in { height: 68px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields .full { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .card { padding: 36px 32px; }
}
@media (min-width: 1080px) {
  :root { --gut: 40px; }
  .stage-wrap { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 28px; align-items: start; }
  .stage-info { padding-top: 12px; position: sticky; top: 96px; }
  .manage { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .manage .span { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 699px) {
  .stage-wrap { width: 100%; margin-top: 0; }
  .stage { border-radius: 0; border-width: 0 0 1px; }
  .stage-info { padding: 0 var(--gut); }
  .me-name { display: none; }
  .me-btn { padding: 4px; }
  .vol input { width: 80px; }
  .art-play span { width: 60px; height: 60px; }
  .brand-sub { display: none; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
