/* Reaktiv — same palette, font and particle style as the original site, refreshed.
   Font: the live site renders in Arial (its Termina @font-face pointed at files that
   don't exist), so Arial is used here to look identical. */

:root {
  --primary-color: #A2D916;
  --primary-dim: rgba(162, 217, 22, 0.55);
  --primary-faint: rgba(162, 217, 22, 0.12);
  --background-dark: #161b00;
  --background-medium: #1c2200;
  --background-raised: #232a02;
  --text-light: #ffffff;
  --text-muted: #c9d6a3;
  --danger: #ff6b5b;
  --radius: 10px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--background-dark);
  color: var(--primary-color);
  font-family: Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
/* headings use the browser-default bold, same as the original site */
h1, h2, h3 { font-weight: bold; line-height: 1.15; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); }
.small { font-size: 0.8rem; }
.hidden { display: none !important; }

.background-canvas { position: fixed; inset: 0; z-index: -1; }

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  padding: 0 1.25rem; display: flex; justify-content: space-between; align-items: center;
  background: var(--background-medium);
  border-bottom: 2px solid var(--primary-color); z-index: 1000;
  transition: background 0.3s ease;
}
.navbar.scrolled { background: rgba(22, 27, 0, 0.97); }
.navbar-logo { height: 50px; transition: transform 0.3s ease; }
.navbar-logo:hover { transform: scale(1.1); }
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
  color: var(--primary-color); background: none; border: none; text-decoration: none;
  font: 400 1.05rem Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px;
  padding: 0.55rem 0.9rem; cursor: pointer; border-radius: 6px; transition: all 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text-light); background: var(--primary-faint); }
.nav-link.pill { border: 2px solid var(--primary-color); }
.nav-link.pill:hover { background: var(--primary-color); color: var(--background-dark); }
.menu-toggle { display: none; background: none; border: none; color: var(--primary-color); cursor: pointer; padding: 0.5rem; }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1080px) {
  .menu-toggle { display: block; z-index: 1002; }
  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: min(75%, 320px);
    flex-direction: column; align-items: stretch; gap: 0.5rem;
    background: var(--background-medium); padding: 6rem 1.5rem 2rem;
    border-left: 2px solid var(--primary-color); transition: right 0.3s ease;
  }
  .nav-links.open { right: 0; }
  .nav-link { font-size: 1rem; padding: 0.9rem 1rem; }
}

main { padding-top: var(--nav-h); }
/* footer sits at the bottom of short pages instead of floating with a gap under it */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; }
.wrap { width: min(1200px, 100% - 2rem); margin: 0 auto; }
section { padding: 4.5rem 0; }

/* BUTTONS + FORMS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 6px; border: 2px solid var(--primary-color);
  background: var(--primary-color); color: var(--background-dark);
  font: 400 0.9rem Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer; text-decoration: none; transition: all 0.25s ease;
}
.btn:hover { background: var(--text-light); border-color: var(--text-light); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--primary-color); }
.btn.ghost:hover { background: var(--primary-faint); color: var(--text-light); border-color: var(--primary-color); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--background-dark); }
.btn.sm { padding: 0.45rem 0.8rem; font-size: 0.68rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.full { width: 100%; }
.price { font-size: 1.05rem; }
.price s { font-size: 0.85rem; margin-right: 0.3rem; }
.btn svg { width: 1.1em; height: 1.1em; }

input, textarea, select {
  width: 100%; padding: 0.85rem 1rem; border-radius: 6px;
  background: var(--background-dark); color: var(--text-light);
  border: 1px solid var(--primary-dim); font: 400 0.9rem Arial, sans-serif;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary-color); outline-offset: 1px; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 0.72rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 0.35rem; }
.field { margin-bottom: 1rem; }
.check { display: flex; gap: 0.5rem; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.85rem; }
.check input { width: auto; }
.form-error { color: var(--danger); font-family: Arial, sans-serif; font-size: 0.85rem; min-height: 1.2em; }

/* HERO */
.hero { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.hero-title {
  font-size: clamp(3.2rem, 13vw, 9.5rem); font-weight: bold; margin: 0;
  color: var(--primary-color);
}
.hero-tag { font-weight: 400; letter-spacing: 6px; text-transform: uppercase; color: var(--text-light); margin: 0.5rem 0 1.5rem; font-size: clamp(0.7rem, 2vw, 1rem); }
.hero-bio { max-width: 680px; margin: 0 auto 2rem; color: var(--text-muted); font-size: 0.92rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.genres { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0 0 2rem; }
.chip {
  border: 1px solid var(--primary-dim); color: var(--primary-color); border-radius: 999px;
  padding: 0.3rem 0.8rem; font-size: 0.7rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; background: rgba(22, 27, 0, 0.6);
}
.chip.solid { background: var(--primary-color); color: var(--background-dark); border-color: var(--primary-color); }
.scroll-indicator { margin-top: 2.5rem; background: none; border: none; color: var(--primary-color); cursor: pointer; animation: bob 2s ease-in-out infinite; }
.scroll-indicator svg { width: 28px; height: 28px; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* SECTION HEADINGS */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 0; }
.eyebrow { font-size: 0.75rem; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.4rem; }

/* LATEST RELEASE SPOTLIGHT */
.spotlight {
  display: grid; grid-template-columns: minmax(220px, 420px) 1fr; gap: 2.5rem; align-items: center;
  background: var(--background-medium);
  border: 2px solid var(--primary-color); border-radius: var(--radius); padding: 2rem;
}
.spotlight img { border-radius: 8px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.spotlight h3 { font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--text-light); margin-bottom: 0.3rem; }
.spotlight .artists { font-weight: 400; margin-bottom: 1.25rem; }
@media (max-width: 720px) { .spotlight { grid-template-columns: 1fr; padding: 1.25rem; gap: 1.25rem; } }

/* MARQUEE */
.labels-section { background: var(--background-medium); border-top: 2px solid var(--primary-color); border-bottom: 2px solid var(--primary-color); padding: 2rem 0; overflow: hidden; }
.labels-section h2 { text-align: center; color: var(--text-light); font-size: 1.5rem; text-transform: uppercase; }
.labels-marquee { overflow: hidden; }
.labels-track { display: flex; width: max-content; animation: scroll-marquee 30s linear infinite; }
.labels-track img { height: 60px; width: auto; margin: 0 2.2rem; opacity: 0.9; transition: opacity 0.2s; }
.labels-track img:hover { opacity: 1; }
@keyframes scroll-marquee { to { transform: translateX(-50%); } }

/* CATALOG CAROUSEL */
.carousel-controls { display: flex; gap: 0.5rem; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--primary-color);
  background: var(--background-medium); color: var(--primary-color); cursor: pointer; display: grid; place-items: center; transition: all 0.2s;
}
.icon-btn:hover:not(:disabled) { background: var(--primary-color); color: var(--background-dark); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filters .chip { cursor: pointer; }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 26vw, 290px); gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 1rem; padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin; scrollbar-color: var(--primary-color) var(--background-medium);
  cursor: grab;
}
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel.dragging a { pointer-events: none; }
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-track { background: var(--background-medium); border-radius: 4px; }
.carousel::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
.carousel-progress { height: 3px; background: var(--background-medium); border-radius: 2px; overflow: hidden; }
.carousel-progress span { display: block; height: 100%; width: 0; background: var(--primary-color); transition: width 0.1s linear; }

.track-card {
  scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none;
  background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: var(--radius);
  padding: 0.9rem; color: var(--primary-color); transition: transform 0.3s ease, border-color 0.3s;
  user-select: none;
}
.track-card:hover { transform: translateY(-6px); border-color: var(--primary-color); }
.track-art { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--background-dark); margin-bottom: 0.9rem; }
.track-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; -webkit-user-drag: none; }
.track-card:hover .track-art img { transform: scale(1.06); }
.track-art .play {
  position: absolute; right: 0.7rem; bottom: 0.7rem; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-color); color: var(--background-dark); display: grid; place-items: center;
  opacity: 0; transform: translateY(8px); transition: all 0.3s ease;
}
.track-card:hover .play { opacity: 1; transform: none; }
.track-art .play svg { width: 18px; height: 18px; }
.track-art .badge { position: absolute; left: 0.6rem; top: 0.6rem; }
.track-card h3 { font-size: 0.88rem; color: var(--text-light); margin: 0 0 0.3rem; }
.track-meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; font-weight: 400; }
.track-meta .year { color: var(--text-muted); }

/* FEATURE CARDS (downloads / community teasers) */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-2 .panel { display: flex; flex-direction: column; align-items: flex-start; }
.grid-2 .panel .btn { margin-top: auto; }
.panel {
  background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: var(--radius); padding: 2rem;
}
.panel.feature { border: 2px solid var(--primary-color); }
.panel h3 { color: var(--text-light); font-size: 1.15rem; }
.panel p { color: var(--text-muted); font-size: 0.88rem; }

/* SUBSCRIBE */
.subscription-section { text-align: center; }
.subscription-form { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; max-width: 560px; margin: 1.25rem auto 0; }
.subscription-form input { flex: 1 1 260px; text-align: center; }

/* FOOTER */
/* compact centred footer: social icons, with the copyright line underneath */
.footer { background: var(--background-medium); border-top: 2px solid var(--primary-color); padding: 1rem 1rem 0.9rem; text-align: center; }
.social-links { display: flex; gap: 1.4rem; justify-content: center; align-items: center; margin-bottom: 0.45rem; }
.social-links a { display: flex; color: var(--primary-color); transition: color 0.2s ease, transform 0.2s ease; }
.social-links a:hover { color: var(--text-light); transform: scale(1.12); }
.social-links svg { width: 22px; height: 22px; }
.footer .small { color: var(--text-muted); margin: 0; font-size: 0.8rem; }

/* REVEAL ON SCROLL */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .scroll-indicator { animation: none; }
  .labels-track { animation-duration: 90s; } /* slow scroll rather than frozen */
}

/* DOWNLOAD CARDS */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.dl-card { background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s; }
.dl-card:hover { border-color: var(--primary-color); transform: translateY(-4px); }
.dl-card .art { aspect-ratio: 1; background: var(--background-dark); }
.dl-card .art img { width: 100%; height: 100%; object-fit: cover; }
.dl-card .body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.dl-card h3 { font-size: 0.95rem; color: var(--text-light); margin: 0; }
.dl-card .btn { margin-top: auto; }

/* MODAL */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 12, 0, 0.82); display: grid; place-items: center; z-index: 2000; padding: 1rem; }
.modal {
  width: min(480px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--background-medium); border: 2px solid var(--primary-color); border-radius: var(--radius); padding: 1.75rem; position: relative;
}
.modal.wide { width: min(720px, 100%); }
.modal-close { position: absolute; right: 0.75rem; top: 0.75rem; background: none; border: none; color: var(--primary-color); cursor: pointer; font-size: 1.6rem; line-height: 1; }
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--primary-faint); flex-wrap: wrap; }
.tab { background: none; border: none; color: var(--text-muted); padding: 0.7rem 1rem; font: 400 0.85rem Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; border-bottom: 3px solid transparent; }
.tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

/* GATE STEPS */
.steps { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: 0.75rem; }
.step { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem; border: 1px solid var(--primary-faint); border-radius: 8px; background: var(--background-dark); }
.step .num { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid var(--primary-color); display: grid; place-items: center; font-weight: 900; font-size: 0.8rem; }
.step.done { border-color: var(--primary-color); }
.step.done .num { background: var(--primary-color); color: var(--background-dark); }
.step .txt { flex: 1; font-size: 0.82rem; color: var(--text-light); }
.step .btn { flex: none; }

/* COMMUNITY */
.community-layout { display: grid; grid-template-columns: 230px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .community-layout { grid-template-columns: 1fr; } }
.channels { position: sticky; top: calc(var(--nav-h) + 1rem); display: grid; gap: 0.25rem; }
@media (max-width: 860px) { .channels { position: static; display: flex; flex-wrap: wrap; } }
.channel { text-align: left; background: none; border: none; color: var(--text-muted); padding: 0.6rem 0.8rem; border-radius: 6px; cursor: pointer; font: 400 0.9rem Arial, sans-serif; letter-spacing: 0.5px; }
.channel:hover { background: var(--primary-faint); color: var(--text-light); }
.channel.active { background: var(--primary-faint); color: var(--primary-color); }
.post { background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.post.pinned { border-color: var(--primary-color); }
.post-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-color); color: var(--background-dark); display: grid; place-items: center; font-weight: 900; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-head .who { font-weight: 700; color: var(--text-light); font-size: 0.82rem; }
.post-head .when { font-size: 0.68rem; color: var(--text-muted); }
.post h3 { font-size: 1rem; color: var(--text-light); margin: 0 0 0.5rem; text-transform: none; letter-spacing: 0; }
.post .text { font-family: Arial, sans-serif; color: var(--text-muted); white-space: pre-wrap; word-wrap: break-word; font-size: 0.92rem; }
.post audio { width: 100%; margin: 0.5rem 0; }
.post-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.comment { border-left: 2px solid var(--primary-dim); padding: 0.4rem 0 0.4rem 0.9rem; margin: 0.6rem 0; font-family: Arial, sans-serif; font-size: 0.88rem; color: var(--text-muted); }
.comment strong { color: var(--text-light); font-family: Arial, sans-serif; font-size: 0.72rem; }
.admin-tag { font-size: 0.6rem; background: var(--primary-color); color: var(--background-dark); padding: 0.1rem 0.4rem; border-radius: 4px; margin-left: 0.3rem; vertical-align: middle; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); border: 1px dashed var(--primary-dim); border-radius: var(--radius); }

/* CHAT (community page) - Discord-style three-column layout, flat */
body.chat-page { overflow: hidden; }
body.chat-page main { padding-top: var(--nav-h); }
.chat { display: grid; grid-template-columns: 250px 1fr 230px; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); }
.chat.no-members { grid-template-columns: 250px 1fr; }
.chat.no-members .members { display: none; }
.chat-side { background: var(--background-medium); border-right: 1px solid var(--primary-faint); display: flex; flex-direction: column; min-height: 0; }
.chat-side .server-name { padding: 1rem; border-bottom: 1px solid var(--primary-faint); color: var(--text-light); font-weight: bold; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 3.4rem; }
.chat-side .server-name .ctl { width: 30px; height: 30px; }
.chan-list { flex: 1; overflow-y: auto; padding: 0.5rem 0.5rem 1rem; }
.chan-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 1rem 0.5rem 0.3rem; display: flex; align-items: center; justify-content: space-between; }
.cat-add { background: none; border: none; color: var(--text-muted); font: 400 1.1rem Arial, sans-serif; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.cat-add:hover { color: var(--primary-color); }
.chan-row { position: relative; }
.chan-edit { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 4px; background: var(--background-medium); border: none; border-radius: 4px; color: var(--text-muted); cursor: pointer; opacity: 0; }
.chan-row:hover .chan-edit, .chan-edit:focus-visible { opacity: 1; }
.chan-edit:hover { color: var(--primary-color); }
.chan-edit svg { width: 16px; height: 16px; display: block; }
@media (hover: none) { .chan-edit { opacity: 1; } }
.perm-row { align-items: flex-start; margin-bottom: 0.45rem; }
.perm-row input { margin-top: 0.15rem; }
.perm-table th:not(:first-child), .perm-table td:not(:first-child) { text-align: center; width: 110px; }
.perm-table input { width: auto; }
.chan { display: flex; align-items: center; gap: 0.45rem; width: 100%; text-align: left; background: none; border: none; color: var(--text-muted); padding: 0.4rem 0.55rem; border-radius: 5px; cursor: pointer; font: 400 0.92rem Arial, sans-serif; }
.chan:hover { background: var(--primary-faint); color: var(--text-light); }
.chan.active { background: var(--primary-faint); color: var(--primary-color); }
.chan svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.chan .lock { margin-left: auto; font-size: 0.7rem; opacity: 0.6; }
.chan .ping { margin-left: auto; background: var(--primary-color); color: var(--background-dark); border-radius: 999px; font-size: 0.7rem; font-weight: bold; line-height: 1; padding: 0.2rem 0.4rem; }
.chan .ping + .lock { margin-left: 0.4rem; }
.mention { background: var(--primary-faint); color: var(--primary-color); border-radius: 3px; padding: 0 0.2rem; }
.msg.mentioned { background: var(--primary-faint); border-left: 2px solid var(--primary-color); padding-left: calc(1rem - 2px); }
.voice-people { padding: 0 0 0.3rem 1.9rem; }
.voice-person { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-muted); padding: 0.15rem 0; }
.voice-person .avatar { width: 22px; height: 22px; font-size: 0.65rem; }
.voice-person.speaking .avatar { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.me-panel { border-top: 1px solid var(--primary-faint); padding: 0.6rem; background: var(--background-dark); }
.me-row { display: flex; align-items: center; gap: 0.55rem; }
.me-row .who { flex: 1; min-width: 0; font-size: 0.85rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-status { font-size: 0.75rem; color: var(--primary-color); margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
/* call box (bottom-left while in voice) */
.call-box { border-bottom: 1px solid var(--primary-faint); padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.call-top { display: flex; align-items: center; gap: 0.5rem; }
.call-top .ctl { width: 32px; height: 32px; flex: none; }
.signal { width: 20px; flex: none; display: grid; place-items: center; cursor: help; }
.signal svg { width: 18px; height: 16px; }
.signal rect { fill: var(--primary-dim); }
.signal.q-excellent rect.lit, .signal.q-good rect.lit { fill: var(--primary-color); }
.signal.q-poor rect.lit { fill: #f5c542; }
.signal.q-lost rect { fill: var(--danger); }
.call-info { flex: 1; min-width: 0; background: none; border: none; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; font-family: Arial, sans-serif; }
.call-state { font-size: 0.82rem; font-weight: bold; color: var(--primary-color); }
.call-state.warn { color: #f5c542; }
.call-ch { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-info:hover .call-ch { color: var(--text-light); text-decoration: underline; }
.call-actions { display: flex; gap: 0.4rem; margin-top: 0.55rem; }
.call-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.4rem; height: 32px; border-radius: 6px; border: 1px solid var(--primary-dim); background: var(--background-medium); color: var(--text-light); cursor: pointer; font: 400 0.8rem Arial, sans-serif; }
.call-btn:hover { background: var(--primary-faint); }
.call-btn.on { background: var(--primary-color); border-color: var(--primary-color); color: var(--background-dark); }
.call-btn svg { width: 16px; height: 16px; }
.me-row .ctl.flat { width: 30px; height: 30px; border-color: transparent; background: none; color: var(--text-muted); flex: none; }
.me-row .ctl.flat:hover { background: var(--primary-faint); color: var(--text-light); }
.me-row .ctl.flat.off { color: var(--danger); }
.me-row .ctl.flat svg { width: 17px; height: 17px; }
.ctl-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.ctl { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--primary-dim); background: var(--background-medium); color: var(--primary-color); cursor: pointer; display: grid; place-items: center; }
.ctl:hover { background: var(--primary-faint); color: var(--text-light); }
.ctl.on { background: var(--primary-color); color: var(--background-dark); border-color: var(--primary-color); }
.ctl.off { color: var(--danger); border-color: var(--danger); }
.ctl.leave { color: var(--danger); border-color: var(--danger); }
.ctl.leave:hover { background: var(--danger); color: var(--background-dark); }
.ctl svg { width: 18px; height: 18px; }

.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--background-dark); padding: 0; } /* not the 4.5rem every <section> gets */
.chat-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--primary-faint); background: var(--background-medium); min-height: 52px; }
.chat-head .title { color: var(--text-light); font-weight: bold; white-space: nowrap; }
.chat-head .topic { color: var(--text-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chat-head .ctl { width: 34px; height: 34px; }
.drawer-btn { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 1rem 0 0.5rem; }
.msg { display: grid; grid-template-columns: 40px 1fr; gap: 0 0.8rem; padding: 0.15rem 1rem; position: relative; }
.msg.first { margin-top: 0.9rem; }
.msg:hover { background: var(--background-medium); }
.msg .avatar { grid-row: span 2; width: 40px; height: 40px; cursor: pointer; }
.msg:not(.first) .avatar { visibility: hidden; height: 0; }
.msg-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.msg-head .name { color: var(--text-light); font-weight: bold; cursor: pointer; font-size: 0.95rem; }
.msg-head .time, .msg .edited { color: var(--text-muted); font-size: 0.7rem; }
.msg-body { color: #e8eed6; font-size: var(--chat-fs, 0.95rem); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
/* compact message display (User Settings > Appearance) */
.chat.compact .msg { grid-template-columns: 1fr; padding-top: 0.05rem; padding-bottom: 0.05rem; }
.chat.compact .msg .avatar { display: none; }
.chat.compact .msg.first { margin-top: 0.35rem; }
.chat.compact .msg-head { display: inline-flex; margin-right: 0.4rem; }
.chat.compact .msg-head + .msg-body { display: inline; }
.msg-body a { color: var(--primary-color); }
.msg.pinned { border-left: 3px solid var(--primary-color); }
.reply-ref { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.15rem; grid-column: 2; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-ref::before { content: "\21B3  "; }
.attach { margin-top: 0.4rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.attach img { max-width: min(400px, 100%); max-height: 320px; border-radius: 6px; cursor: zoom-in; }
.attach audio { width: min(420px, 100%); }
.attach video { max-width: min(480px, 100%); max-height: 360px; border-radius: 6px; background: #000; }
.file-chip { display: inline-flex; gap: 0.5rem; align-items: center; padding: 0.55rem 0.8rem; border: 1px solid var(--primary-dim); border-radius: 6px; background: var(--background-medium); color: var(--text-light); text-decoration: none; font-size: 0.85rem; }
.reacts { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.3rem; }
.react { border: 1px solid var(--primary-faint); background: var(--background-medium); color: var(--text-light); border-radius: 6px; padding: 0.1rem 0.45rem; cursor: pointer; font-size: 0.85rem; }
.react.mine { border-color: var(--primary-color); background: var(--primary-faint); }
.msg-tools { position: absolute; right: 1rem; top: -14px; display: none; gap: 2px; background: var(--background-medium); border: 1px solid var(--primary-dim); border-radius: 6px; padding: 2px; z-index: 5; }
.msg:hover .msg-tools, .msg-tools.open { display: flex; }
.msg-tools button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }
.msg-tools button:hover { background: var(--primary-faint); color: var(--text-light); }
.emoji-pick { position: absolute; right: 1rem; top: 18px; z-index: 6; background: var(--background-medium); border: 1px solid var(--primary-color); border-radius: 6px; padding: 0.3rem; display: flex; gap: 2px; }
.emoji-pick button { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 0.2rem 0.3rem; border-radius: 4px; }
.emoji-pick button:hover { background: var(--primary-faint); }
.day-sep { display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.72rem; margin: 1.2rem 1rem 0.2rem; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; border-top: 1px solid var(--primary-faint); }
.composer { padding: 0 1rem 1rem; }
.composer-box { background: var(--background-medium); border: 1px solid var(--primary-dim); border-radius: 8px; }
.composer-bar { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.4rem; }
.composer textarea { min-height: 42px; max-height: 200px; resize: none; border: none; background: transparent; padding: 0.6rem 0.4rem; outline: none; }
.composer textarea:focus { outline: none; }
.composer .ctl { flex: none; }
.composer-note { padding: 0.5rem 0.8rem; font-size: 0.8rem; color: var(--text-muted); border-bottom: 1px solid var(--primary-faint); display: flex; justify-content: space-between; gap: 0.5rem; }
.composer-files { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0.5rem 0.6rem 0; }
.composer-files .chip { cursor: pointer; }
.composer-locked { padding: 0.9rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: 8px; }

.members { background: var(--background-medium); border-left: 1px solid var(--primary-faint); overflow-y: auto; padding: 0.5rem 0.5rem 1rem; }
.mem-group { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 1rem 0.5rem 0.3rem; }
.mem { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border-radius: 5px; cursor: pointer; }
.mem:hover { background: var(--primary-faint); }
.mem .avatar { width: 32px; height: 32px; position: relative; overflow: visible; }
.mem .avatar img { border-radius: 50%; }
.mem.offline { opacity: 0.45; }
.dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--primary-color); border: 2px solid var(--background-medium); }
.mem .name { font-size: 0.88rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* voice stage */
.stage { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-content: start; }
.stage.has-screen { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile { position: relative; aspect-ratio: 16 / 9; background: var(--background-medium); border: 2px solid var(--primary-faint); border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.tile.speaking { border-color: var(--primary-color); }
.tile.screen { grid-column: 1 / -1; aspect-ratio: auto; min-height: 300px; background: #000; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.screen video { object-fit: contain; max-height: 70vh; }
.tile .avatar { width: 72px; height: 72px; font-size: 1.6rem; }
.tile .label { position: absolute; left: 0.5rem; bottom: 0.5rem; background: rgba(22, 27, 0, 0.85); color: var(--text-light); font-size: 0.78rem; padding: 0.2rem 0.5rem; border-radius: 4px; display: flex; gap: 0.35rem; align-items: center; }
.tile .label svg { width: 13px; height: 13px; color: var(--danger); }
.stage-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.stage-bar { display: flex; justify-content: center; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--primary-faint); background: var(--background-medium); }
.stage-bar .ctl { width: 46px; height: 46px; border-radius: 50%; }

.popover { position: fixed; z-index: 2500; width: 280px; background: var(--background-medium); border: 2px solid var(--primary-color); border-radius: 8px; padding: 1rem; }
.popover .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.mem-text { display: flex; flex-direction: column; min-width: 0; }
.mem-status { font-size: 0.72rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* profile card: banner + avatar (profile popover and the settings preview) */
.pf-pop { padding: 0; overflow: hidden; max-height: calc(100vh - 20px); overflow-y: auto; }
.pf-card { background: var(--background-dark); border: 1px solid var(--primary-dim); border-radius: 8px; overflow: hidden; }
.pf-banner { height: 100px; background-size: cover; background-position: center; }
.pf-avatar.avatar { width: 76px; height: 76px; font-size: 1.8rem; margin: -40px 0 0 14px; border: 5px solid var(--background-medium); position: relative; }
.pf-card .pf-avatar { border-color: var(--background-dark); }
.pf-body { padding: 0.5rem 1rem 1rem; }
.pf-name { font-size: 1.15rem; font-weight: bold; color: var(--text-light); }
.pf-status { font-size: 0.85rem; color: var(--text-light); margin-top: 0.35rem; }
.pf-section { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 0.8rem 0 0.25rem; font-weight: bold; }

/* User Settings window */
.modal.settings { width: min(980px, 100%); height: min(720px, 92vh); max-height: none; padding: 0; overflow: hidden; }
.us { display: grid; grid-template-columns: 210px 1fr; height: 100%; }
.us-nav { background: var(--background-dark); border-right: 1px solid var(--primary-faint); padding: 1.5rem 0.6rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.us-group { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 0.9rem 0.6rem 0.3rem; font-weight: bold; }
.us-group:first-child { padding-top: 0; }
.us-tab { text-align: left; background: none; border: none; color: var(--text-muted); padding: 0.5rem 0.6rem; border-radius: 5px; cursor: pointer; font: 400 0.9rem Arial, sans-serif; }
.us-tab:hover { background: var(--primary-faint); color: var(--text-light); }
.us-tab.active { background: var(--primary-faint); color: var(--primary-color); }
.us-logout { margin-top: 1rem; border-top: 1px solid var(--primary-faint); border-radius: 0; padding-top: 0.9rem; color: var(--danger); }
.us-logout:hover { color: var(--danger); }
.us-body { padding: 1.75rem 2rem 2rem; overflow-y: auto; }
.us-body h2 { font-size: 1.3rem; margin: 0 0 1.1rem; }
.us-body h3 { font-size: 1rem; margin: 1.6rem 0 0.6rem; }
.us-card { background: var(--background-dark); border: 1px solid var(--primary-faint); border-radius: 8px; padding: 1rem; margin-bottom: 0.9rem; }
.us-body > .pf-card { margin-bottom: 0.9rem; }
.us-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.4rem 0; color: var(--text-light); font-size: 0.9rem; }
.us-line + .us-line { border-top: 1px solid var(--primary-faint); margin-top: 0.4rem; padding-top: 0.8rem; }
.us-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: bold; margin-bottom: 0.2rem; }
.us-profile { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.us-profile #pf-preview { position: sticky; top: 0; }
.storage-meter { height: 14px; border-radius: 7px; background: var(--background-dark); border: 1px solid var(--primary-dim); overflow: hidden; }
.storage-meter i { display: block; height: 100%; background: var(--primary-color); }
.storage-meter.warn i { background: #f5c542; }
.storage-meter.full i { background: var(--danger); }
.meter { flex: 1; min-width: 140px; height: 10px; border-radius: 5px; background: var(--background-medium); border: 1px solid var(--primary-faint); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--primary-color); transition: width 60ms linear; }
.cam-test video { width: 100%; max-width: 420px; border-radius: 6px; display: block; margin-bottom: 0.7rem; background: #000; transform: scaleX(-1); }
@media (max-width: 760px) {
  .modal.settings { height: 92vh; }
  .us { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .us-nav { flex-direction: row; flex-wrap: wrap; padding: 0.8rem; border-right: none; border-bottom: 1px solid var(--primary-faint); }
  .us-group { display: none; }
  .us-logout { margin-top: 0; border-top: none; padding-top: 0.5rem; }
  .us-body { padding: 1.25rem 1rem; }
  .us-profile { grid-template-columns: 1fr; }
}
.popover .roles { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.5rem 0; }
.role-chip { font-size: 0.72rem; border: 1px solid var(--primary-dim); border-radius: 999px; padding: 0.1rem 0.55rem; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-light); }
.role-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--text-muted); }

@media (max-width: 1080px) {
  .chat, .chat.no-members { grid-template-columns: 1fr; }
  .chat-side, .members { position: fixed; top: var(--nav-h); bottom: 0; width: min(85%, 300px); z-index: 900; transition: transform 0.25s ease; }
  .chat-side { left: 0; transform: translateX(-105%); }
  .members { right: 0; transform: translateX(105%); display: block !important; }
  .chat.show-side .chat-side, .chat.show-members .members { transform: none; }
  .drawer-btn { display: grid; }
  .msg-tools { right: 0.5rem; }
}

/* ADMIN */
.table-wrap { overflow-x: auto; border: 1px solid var(--primary-faint); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 0.85rem; color: var(--text-light); }
th { text-align: left; font: 700 0.68rem Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-color); background: var(--background-medium); }
th, td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--primary-faint); vertical-align: middle; }
td .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
td .row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat .n { font-size: 1.8rem; font-weight: 900; color: var(--text-light); }
.stat .l { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* TOAST */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--primary-color); color: var(--background-dark); padding: 0.8rem 1.25rem; border-radius: 6px; font-weight: 700; font-size: 0.8rem; z-index: 3000; max-width: calc(100% - 2rem); }
.toast.error { background: var(--danger); }

.page-hero { padding: 4rem 0 2rem; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 7vw, 4rem); color: var(--primary-color); }
.page-hero p { max-width: 620px; margin: 0 auto; color: var(--text-muted); }

/* DIRECT MESSAGES + FRIENDS */
.side-tabs:empty { display: none; }
.side-tabs { display: flex; gap: 0.3rem; padding: 0.5rem 0.5rem 0; }
.side-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.35rem; background: none; border: 1px solid var(--primary-faint); color: var(--text-muted); border-radius: 5px; padding: 0.45rem 0.3rem; cursor: pointer; font: 400 0.75rem Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.side-tab svg { width: 14px; height: 14px; flex: none; }
.side-tab:hover { color: var(--text-light); background: var(--primary-faint); }
.side-tab.active { color: var(--primary-color); background: var(--primary-faint); border-color: var(--primary-dim); }
.badge { background: var(--primary-color); color: var(--background-dark); border-radius: 999px; font-size: 0.68rem; font-weight: bold; line-height: 1; padding: 0.18rem 0.38rem; letter-spacing: 0; }
.dm-row { padding: 0.3rem 0.55rem; }
.dm-row .avatar { width: 30px; height: 30px; font-size: 0.8rem; position: relative; overflow: visible; }
.dm-row .avatar img { border-radius: 50%; }
.dm-row .dm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chan-row .chan-edit[data-close-dm] { font-size: 1.1rem; line-height: 1; padding: 0; }
.avatar.dm-hero { width: 72px; height: 72px; font-size: 1.8rem; }
.fr-page { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.fr-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.4rem; border-top: 1px solid var(--primary-faint); }
.fr-row .avatar { width: 38px; height: 38px; position: relative; overflow: visible; cursor: pointer; }
.fr-row .avatar img { border-radius: 50%; }
.fr-name { flex: 1; min-width: 0; }
.fr-name .name { color: var(--text-light); font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.fr-pick { cursor: pointer; }
.fr-pick:hover { background: var(--primary-faint); }
.pf-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.blocked-msg { opacity: 0.75; }
.blocked-msg a { color: var(--primary-color); }
@media (max-width: 600px) { .fr-row { flex-wrap: wrap; } .fr-actions { width: 100%; justify-content: flex-start; padding-left: 3.2rem; } }

/* STAY IN THE CALL WHILE BROWSING: page frame + floating call panel */
#browse-shell { position: fixed; inset: 0; z-index: 1500; background: var(--background-dark); }
#browse-shell iframe { display: block; width: 100%; height: 100%; border: 0; }
.float-call { position: fixed; right: 1rem; bottom: 1rem; z-index: 2600; width: 260px; background: var(--background-medium); border: 2px solid var(--primary-color); border-radius: 10px; padding: 0.55rem 0.7rem 0.7rem; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); animation: fc-in 0.18s ease-out; }
.float-call.dragging { opacity: 0.9; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7); }
@keyframes fc-in { from { transform: translateY(12px); opacity: 0; } }
.float-call { cursor: grab; touch-action: none; user-select: none; }
.float-call.dragging { cursor: grabbing; }
.float-call button { cursor: pointer; }
.fc-head { display: flex; align-items: center; gap: 0.45rem; }
.fc-grip { color: var(--text-muted); font-size: 1rem; line-height: 1; }
.fc-people { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.55rem 0 0.6rem; min-height: 28px; align-items: center; }
.fc-person .avatar { width: 28px; height: 28px; font-size: 0.72rem; }
.fc-person.speaking .avatar { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.fc-more { font-size: 0.75rem; color: var(--text-muted); }
.fc-ctls { display: flex; gap: 0.4rem; }
.fc-ctls .ctl { width: 38px; height: 38px; }
.fc-ctls .leave { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .float-call { animation: none; } }
@media (max-width: 600px) { .float-call { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; width: auto; } }
.chan.connected { color: var(--primary-color); }
.chan.connected svg { opacity: 1; }

/* MESSAGE FORMATTING */
.msg-body code, .page-body code { background: var(--background-dark); border: 1px solid var(--primary-faint); border-radius: 4px; padding: 0.05rem 0.3rem; font: 0.88em ui-monospace, Menlo, Consolas, monospace; }
.msg-body pre, .page-body pre { background: var(--background-dark); border: 1px solid var(--primary-faint); border-radius: 6px; padding: 0.6rem 0.75rem; margin: 0.3rem 0; overflow-x: auto; white-space: pre; }
.msg-body pre code, .page-body pre code { border: none; padding: 0; background: none; }
.msg-body blockquote, .page-body blockquote { border-left: 3px solid var(--primary-dim); margin: 0.2rem 0; padding: 0 0 0 0.7rem; color: var(--text-light); }
.spoiler { background: var(--text-muted); color: transparent; border-radius: 3px; padding: 0 0.2rem; cursor: pointer; transition: background 0.15s; }
.spoiler.revealed { background: var(--primary-faint); color: inherit; cursor: auto; }
.mention { background: var(--primary-faint); color: var(--primary-color); border-radius: 3px; padding: 0 0.2rem; font-weight: bold; }
.mention[data-user] { cursor: pointer; }
.mention[data-user]:hover { background: var(--primary-dim); color: var(--text-light); }
.msg.flash, .page-post.flash { animation: msg-flash 2.2s ease-out; }
@keyframes msg-flash { 0%, 40% { background: var(--primary-faint); } 100% { background: transparent; } }

/* @mention suggestions */
.mention-pick { position: fixed; z-index: 2700; background: var(--background-medium); border: 1px solid var(--primary-color); border-radius: 8px; padding: 0.3rem; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); max-height: 300px; overflow-y: auto; }
.mention-pick button { display: flex; align-items: center; gap: 0.55rem; width: 100%; background: none; border: none; border-radius: 5px; padding: 0.35rem 0.5rem; color: var(--text-light); cursor: pointer; font: 400 0.9rem Arial, sans-serif; text-align: left; }
.mention-pick button .small { margin-left: auto; }
.mention-pick button.on, .mention-pick button:hover { background: var(--primary-faint); }
.mention-pick .avatar { width: 24px; height: 24px; font-size: 0.65rem; }

/* typing indicator */
.typing-line { min-height: 1.35rem; padding: 0 1rem 0.2rem; font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.typing-line strong { color: var(--text-light); }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: typing-dot 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none; } }

/* search results */
.sr-hit { display: flex; flex-direction: column; gap: 0.25rem; width: 100%; text-align: left; padding: 0.7rem 0.8rem; margin-bottom: 0.5rem; cursor: pointer; font: inherit; color: inherit; }
.sr-hit:hover { border-color: var(--primary-color); }

/* PAGE + FEED CHANNELS (rules, welcome, announcements) */
.page-view { max-width: 780px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-hero { padding: 1.5rem 0 1.25rem; border-bottom: 2px solid var(--primary-color); margin-bottom: 1.5rem; }
.page-kicker { font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--primary-color); margin: 0 0 0.4rem; text-transform: capitalize; }
.page-topic { color: var(--text-light); margin: 0 0 1rem; }
.page-post { position: relative; background: var(--background-medium); border: 1px solid var(--primary-faint); border-radius: 10px; padding: 1.25rem 1.4rem 0.9rem; margin-bottom: 1.25rem; }
.page-post:hover .msg-tools { display: flex; }
.page-body { color: #e8eed6; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.page-body > :first-child { margin-top: 0; }
.page-body h2 { font-size: 1.45rem; color: var(--text-light); margin: 1.2rem 0 0.5rem; }
.page-body h3 { font-size: 1.15rem; color: var(--text-light); margin: 1.1rem 0 0.4rem; }
.page-body h4 { font-size: 1rem; color: var(--primary-color); margin: 1rem 0 0.3rem; text-transform: uppercase; letter-spacing: 1px; }
.page-body p { margin: 0 0 0.8rem; }
.page-body ul, .page-body ol { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.page-body li { margin: 0.25rem 0; }
.page-body li::marker { color: var(--primary-color); font-weight: bold; }
.page-body hr { border: none; border-top: 1px solid var(--primary-dim); margin: 1.2rem 0; }
.page-body a { color: var(--primary-color); }
.page-attach { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.page-attach img { width: 100%; max-height: none; border-radius: 8px; cursor: zoom-in; }
.page-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--primary-faint); }
.page-foot .reacts { margin: 0; }
.page-meta { font-size: 0.75rem; color: var(--text-muted); }
.page-meta .name { font-weight: bold; cursor: pointer; }
.react.add-react { opacity: 0.75; }
.react.add-react:hover { opacity: 1; }
.page-post .emoji-pick { top: auto; bottom: 3.2rem; left: 1rem; right: auto; }
.page-preview { margin: 0.4rem 0 1rem; max-height: 45vh; overflow-y: auto; }
@media (max-width: 600px) { .page-view { padding: 1rem 0.75rem 2rem; } .page-post { padding: 1rem 1rem 0.8rem; } }

/* community join screen for guests */
.guest-gate { height: calc(100vh - var(--nav-h)); overflow-y: auto; display: grid; place-items: center; padding: 2rem 1rem; }
.guest-card { max-width: 560px; text-align: center; background: var(--background-medium); border: 2px solid var(--primary-color); border-radius: 12px; padding: 2.5rem 2rem; }
.guest-card h1 { color: var(--primary-color); font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 0.8rem; }
.guest-card p { color: var(--text-light); margin: 0 0 1.6rem; line-height: 1.6; }
.guest-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* TRACK PREVIEWS (audio uploads in the community) */
.track { display: flex; align-items: center; gap: 0.8rem; width: min(100%, 520px); background: var(--background-medium); border: 1px solid var(--primary-dim); border-radius: 10px; padding: 0.65rem 0.8rem; margin: 0.25rem 0; }
.track.playing { border-color: var(--primary-color); }
.track-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--primary-color); color: var(--background-dark); display: grid; place-items: center; cursor: pointer; transition: transform 0.12s; }
.track-play:hover { transform: scale(1.06); }
.track-play svg { width: 20px; height: 20px; }
.track-play:focus-visible, .track-wave:focus-visible, .track-dl:focus-visible { outline: 2px solid var(--text-light); outline-offset: 2px; }
.track.loading .track-play { animation: track-pulse 1s infinite ease-in-out; }
@keyframes track-pulse { 50% { opacity: 0.55; } }
.track-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.track-top { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.track-name { color: var(--text-light); font-weight: bold; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.track-time { flex: none; color: var(--text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.track-wave { display: flex; align-items: center; gap: 2px; height: 36px; cursor: pointer; touch-action: none; border-radius: 4px; }
.track-wave i { flex: 1; min-width: 1px; border-radius: 2px; background: var(--primary-dim); transition: background 0.1s; }
.track-wave i.on { background: var(--primary-color); }
.track-wave:hover i:not(.on) { background: color-mix(in srgb, var(--primary-dim) 70%, var(--text-light)); }
.track-dl { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-muted); border: 1px solid var(--primary-faint); }
.track-dl:hover { color: var(--primary-color); border-color: var(--primary-color); }
.track-dl svg { width: 17px; height: 17px; }
.page-attach .track { width: 100%; }
@media (prefers-reduced-motion: reduce) { .track.loading .track-play { animation: none; } .track-play { transition: none; } }
@media (max-width: 480px) { .track { gap: 0.6rem; padding: 0.55rem 0.6rem; } .track-play { width: 40px; height: 40px; } .track-dl { width: 30px; height: 30px; } }
