/* ============================================================================
   concall — neon glass
   ----------------------------------------------------------------------------
   Animated conic borders are deliberately rationed: only the signup card, the
   active channel row, the live caption and the talk button carry one, so at most
   four run at once. A rotating conic gradient per list row would melt a
   mid-range Android, which is the device this app is actually for.
   ========================================================================== */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* Neon palette */
  --n1: #22d3ee;   /* cyan   */
  --n2: #a78bfa;   /* violet */
  --n3: #f472b6;   /* pink   */
  --n4: #4ade80;   /* lime   */
  --n5: #fbbf24;   /* amber  */
  --live: #fb3b6c;

  /* Surfaces */
  --bg: #06070d;
  --panel: rgba(20, 23, 38, 0.72);
  --panel-solid: #141726;
  --raise: rgba(38, 43, 66, 0.6);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  --text: #edf1f8;
  --dim: #909db6;

  --ring: conic-gradient(from var(--angle),
    var(--n1), var(--n2), var(--n3), var(--n5), var(--n4), var(--n1));

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tap: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }

button, input, select { font: inherit; color: inherit; }
h1, h2 { margin: 0; line-height: 1.15; }
#remote-audio { display: none; }

/* ------------------------------------------------------------------ aurora -- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  border-radius: 50%;
  filter: blur(100px);
  /* Low on purpose. Anything stronger washes over the timeline and the burst
     transcripts stop being comfortably readable — the aurora is atmosphere,
     not a feature. */
  opacity: 0.15;
  will-change: transform;
}
.blob.b1 { background: var(--n1); top: -24vmax; left: -16vmax; animation: drift1 34s ease-in-out infinite; }
.blob.b2 { background: var(--n3); bottom: -28vmax; right: -16vmax; animation: drift2 42s ease-in-out infinite; }
.blob.b3 { background: var(--n2); top: 34%; left: -8vmax; animation: drift3 38s ease-in-out infinite; }

@keyframes drift1 {
  50% { transform: translate3d(14vmax, 10vmax, 0) scale(1.15); }
}
@keyframes drift2 {
  50% { transform: translate3d(-12vmax, -12vmax, 0) scale(1.2); }
}
@keyframes drift3 {
  33%  { transform: translate3d(-16vmax, 8vmax, 0) scale(0.85); }
  66%  { transform: translate3d(10vmax, -10vmax, 0) scale(1.1); }
}

/* ------------------------------------------------------- neon edge + glow -- */

/* A crisp 1.5px animated ring that works over a translucent panel. */
.neon-edge { position: relative; }
.neon-edge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: spin-ring 6s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes spin-ring { to { --angle: 360deg; } }

/* Soft coloured bloom behind an element. */
.glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--ring);
  filter: blur(22px);
  opacity: 0.32;
  z-index: -1;
  animation: spin-ring 6s linear infinite;
  pointer-events: none;
}

.gradient-text {
  background: linear-gradient(100deg, var(--n1), var(--n2), var(--n3), var(--n5), var(--n1));
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: slide-hue 9s linear infinite;
}

/* Seamless only because every animated gradient below starts and ends on the
   same colour, and 100% travels exactly one image width. Overshooting this (300%)
   wraps the gradient and shows a hard edge. */
@keyframes slide-hue {
  to { background-position: 100% 50%; }
}

/* -------------------------------------------------------------- structure -- */

.app { position: relative; height: 100%; z-index: 1; }
.app.shell {
  display: grid;
  grid-template:
    "top    top" auto
    "left   mid" 1fr
    "bottom bottom" auto
    / 312px 1fr;
  height: 100%;
}
.topnav { grid-area: top; }
.sidebar { grid-area: left; }
/* Both occupy "mid"; only one is displayed at a time. */
.main, .empty-main { grid-area: mid; }
.bottomnav { grid-area: bottom; }

.app.shell.has-active #region-empty,
.app.shell:not(.has-active) #region-main { display: none; }

.centered { display: grid; place-items: center; height: 100%; padding: 24px; position: relative; z-index: 1; }

.fine { color: var(--dim); font-size: 12px; }
.center { text-align: center; }
.empty {
  color: var(--dim);
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}
.empty-main { display: grid; place-items: center; }

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 15px;
  min-height: var(--tap);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s var(--spring), border-color 0.2s, box-shadow 0.24s, background 0.2s;
}
.btn > span { position: relative; z-index: 2; }

/* Colour wash that wipes in on hover. */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--n1), var(--n2), var(--n3));
  opacity: 0;
  transform: translateY(38%);
  transition: opacity 0.26s var(--ease), transform 0.32s var(--ease);
  z-index: 1;
}
.btn:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, 0.5);
}
.btn:hover::after { opacity: 0.18; transform: translateY(0); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--n1); outline-offset: 2px; }

.btn.primary {
  border-color: transparent;
  background: linear-gradient(100deg, #17a2b8, #7c5cf0, #d94f9a, #7c5cf0, #17a2b8);
  background-size: 200% 100%;
  color: #fff;
  font-weight: 650;
  letter-spacing: 0.01em;
  animation: slide-hue 8s linear infinite;
}
.btn.primary::after { background: #fff; }
.btn.primary:hover::after { opacity: 0.14; }
.btn.primary:hover { box-shadow: 0 12px 30px -12px rgba(167, 139, 250, 0.75); }

.btn.ghost { background: rgba(255, 255, 255, 0.03); }
.btn.warn { border-color: rgba(251, 191, 36, 0.4); color: var(--n5); }
.btn.warn::after { background: var(--n5); }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: 13px; border-radius: 10px; }
.btn.big { width: 100%; padding: 19px; font-size: 17px; border-radius: 18px; }
.btn.full { width: 100%; }
.btn.icon { padding: 2px 11px; min-height: 34px; font-size: 24px; line-height: 1; border-radius: 10px; }

/* -------------------------------------------------------------------- forms -- */

.input {
  background: rgba(4, 6, 12, 0.66);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  width: 100%;
  min-height: var(--tap);
  transition: border-color 0.2s, box-shadow 0.24s, background 0.2s;
}
.input::placeholder { color: rgba(144, 157, 182, 0.65); }
.input:focus {
  outline: none;
  border-color: transparent;
  background: rgba(4, 6, 12, 0.85);
  box-shadow: 0 0 0 1.5px var(--n1), 0 0 22px -4px rgba(34, 211, 238, 0.55);
}
.input.sm { min-height: 36px; padding: 7px 11px; font-size: 13px; border-radius: 10px; }

select {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px;
  min-height: 36px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
select:hover { border-color: var(--line-2); }
select:focus { outline: none; box-shadow: 0 0 0 1.5px var(--n2); }

.stack { display: grid; gap: 11px; }

/* OTP signup */
/* Beats the generic `.row > .input { flex: 1 }` stretch. */
.row > .input.cc-wrap,
.cc-wrap {
  flex: 0 0 62px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 11px 8px 11px 10px;
  cursor: text;
}
.cc-wrap i { font-style: normal; color: var(--dim); }
.cc-wrap input {
  width: 100%;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  padding: 0;
}
/* The wrapper is the visual input, so it carries the focus ring. */
.cc-wrap:focus-within {
  border-color: transparent;
  background: rgba(4, 6, 12, 0.85);
  box-shadow: 0 0 0 1.5px var(--n1), 0 0 22px -4px rgba(34, 211, 238, 0.55);
}
.input.otp-code { letter-spacing: 0.4em; text-align: center; font-size: 18px; }
.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--n1);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}
.row { display: flex; gap: 8px; align-items: center; }
.row > .input { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ landing -- */

.app.signup { overflow-y: auto; }

.landing {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 22px;
}

/* --- hero --- */
.land-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: 92vh;
  padding: 48px 0 40px;
}
.land-brand { font-size: 19px; margin-bottom: 26px; }
.land-h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 850;
  margin: 0 0 20px;
}
.land-lede {
  color: var(--dim);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 22px;
}
.land-points { display: flex; flex-wrap: wrap; gap: 9px; }
.land-points span {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text);
}

.land-hero-side { display: grid; gap: 22px; justify-items: center; }
.land-hero-side .card { max-width: 420px; width: 100%; animation: none; }
/* The glow bloom bleeds through a translucent card and muddies the inputs;
   on the landing the card sits over the aurora, so go nearly opaque. */
#signup-card { background: rgba(12, 15, 25, 0.97); }
.card-title { font-size: 24px; margin: 14px 0 8px; }

/* --- the app mock --- */
.land-mock {
  width: 100%;
  max-width: 420px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: rgba(15, 18, 30, 0.85);
  backdrop-filter: blur(18px);
  padding: 14px;
  display: grid;
  gap: 9px;
  box-shadow: 0 30px 70px -30px rgba(34, 211, 238, 0.35);
  transform: rotate(-1.2deg);
}
.land-mock-bar {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid var(--line);
}
.land-mock-bar .dot { width: 8px; height: 8px; border-radius: 50%; }
.land-mock-listen {
  margin-left: auto; font-size: 12px; font-weight: 650;
  color: var(--n4); border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 3px 10px; border-radius: 999px;
}
.land-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
}
.land-row.live { border-color: rgba(251, 59, 108, 0.5); background: rgba(251, 59, 108, 0.08); }
.land-row.dim { opacity: 0.6; }
.land-ava {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(150deg, hsl(var(--hue) 85% 58%), hsl(calc(var(--hue) + 55) 80% 48%));
}
.land-meta { flex: 1; display: grid; }
.land-meta strong { color: var(--text); font-size: 14px; }
.land-meta em { font-style: normal; font-size: 12px; }
.land-row.live .land-meta em { color: var(--live); }

.land-wave { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.land-wave i {
  width: 3.5px; border-radius: 2px;
  background: var(--live);
  animation: land-eq 0.9s ease-in-out infinite;
}
.land-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.land-wave i:nth-child(2) { height: 90%; animation-delay: 0.12s; }
.land-wave i:nth-child(3) { height: 60%; animation-delay: 0.24s; }
.land-wave i:nth-child(4) { height: 100%; animation-delay: 0.36s; }
.land-wave i:nth-child(5) { height: 50%; animation-delay: 0.48s; }
@keyframes land-eq { 50% { transform: scaleY(0.35); } }

.land-caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  border-left: 3px solid var(--n1);
  background: rgba(34, 211, 238, 0.07);
  border-radius: 0 10px 10px 0;
  padding: 8px 11px;
}
.land-talk {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px;
  border-radius: 14px;
  font-weight: 850; letter-spacing: 0.12em; font-size: 14px;
  color: var(--text);
  background: linear-gradient(150deg, rgba(30, 34, 54, 0.9), rgba(16, 19, 32, 0.9));
  border: 1.5px solid var(--n2);
  animation: land-breathe 3s ease-in-out infinite;
}
@keyframes land-breathe {
  50% { box-shadow: 0 0 26px -6px rgba(167, 139, 250, 0.7); }
}

/* --- features --- */
.land-h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
  margin: 0 0 40px;
}
.land-features { padding: 70px 0; }
.land-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.land-feature {
  padding: 24px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  transition: transform 0.25s var(--spring), border-color 0.25s, background 0.25s;
}
.land-feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.05);
}
.land-ficon { font-size: 26px; }
.land-feature h3 { margin: 10px 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.land-feature p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.6; }

/* --- steps --- */
.land-steps { padding: 30px 0 80px; text-align: center; }
.land-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: left;
  margin-bottom: 40px;
}
.land-step {
  padding: 24px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
}
.land-step-n {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-weight: 800;
  background: linear-gradient(140deg, var(--n1), var(--n2));
  color: #fff;
}
.land-step h3 { margin: 12px 0 8px; font-size: 17px; }
.land-step p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.6; }
.land-cta { max-width: 380px; margin: 0 auto; }

.land-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .land-hero { grid-template-columns: 1fr; min-height: 0; gap: 30px; padding-top: 34px; }
  .land-hero-copy { text-align: center; }
  .land-brand { justify-content: center; }
  .land-lede { margin-inline: auto; }
  .land-points { justify-content: center; }
  .land-grid, .land-steps-row { grid-template-columns: 1fr; }
  .land-mock { transform: none; }
}

/* ------------------------------------------------------------------- signup -- */

.card {
  /* Nearly opaque, and deliberately NO backdrop-filter: backdrop-filter forces a
     stacking context, which traps the .glow bloom (z-index -1) INSIDE the card —
     painting above the background and washing the content with colour. Without
     it the bloom escapes behind the card, where it belongs. */
  background: rgba(13, 16, 27, 0.96);
  border-radius: 24px;
  padding: 34px;
  max-width: 440px;
  width: 100%;
  animation: pop-in 0.7s var(--ease) both;
}
.card h1 { font-size: 30px; margin: 18px 0 12px; letter-spacing: -0.025em; }
.card .sub { color: var(--dim); margin: 0 0 24px; }
.card .fine { margin-top: 18px; }
.card > * { position: relative; z-index: 2; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* On the landing, the brand dot is the "we're live" signal: pulsing green. */
.landing .brand .dot {
  background: var(--n4);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55), 0 0 12px var(--n4);
  animation: brand-pulse 1.9s ease-out infinite;
}
@keyframes brand-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55), 0 0 12px var(--n4); }
  70%  { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0), 0 0 12px var(--n4); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0), 0 0 12px var(--n4); }
}
.brand .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--dim);
  transition: background 0.3s, box-shadow 0.3s;
}
.brand .dot.online {
  background: var(--n4);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16), 0 0 12px var(--n4);
  animation: breathe 2.6s ease-in-out infinite;
}
.brand .dot.connecting { background: var(--n5); box-shadow: 0 0 10px var(--n5); }
.brand .dot.offline { background: var(--live); box-shadow: 0 0 10px var(--live); }

@keyframes breathe {
  50% { opacity: 0.55; }
}

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ring);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  animation: spin-ring 1.4s linear infinite, rotate 1.1s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ sidebar -- */

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  min-height: 0;
  position: relative;
}

.status.available { color: var(--n4); }
.status.busy { color: var(--n5); }
.status.off { color: var(--dim); }

/* ---------------------------------------------------------------- top nav -- */

/* Three zones: profile hard left, brand truly centred, Listen hard right.
   Equal 1fr outer columns keep the brand centred regardless of how wide the
   profile or the toggle happen to be. */
.topnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
.topnav .me { justify-self: start; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topnav .me select { max-width: 130px; }
.topnav .brand { justify-self: center; }
.topnav .switch { justify-self: end; }

/* -------------------------------------------------------------- bottom nav -- */

.bottomnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.bottomnav .my-code { flex: 0 1 220px; min-width: 180px; }
.bottomnav form.row { flex: 1 1 200px; min-width: 170px; }

/* ------------------------------------------------------------------ switch -- */

.switch {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s;
}
.switch:hover { background: rgba(255, 255, 255, 0.04); }
.switch:focus-visible { outline: 2px solid var(--n1); outline-offset: 1px; }

.switch-track {
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: background 0.24s, border-color 0.24s, box-shadow 0.24s;
}
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dim);
  transition: transform 0.26s var(--spring), background 0.24s;
}
.switch.on .switch-track {
  background: linear-gradient(100deg, var(--n4), var(--n1));
  border-color: transparent;
  box-shadow: 0 0 16px -4px var(--n4);
}
.switch.on .switch-knob { transform: translateX(18px); background: #fff; }

.switch-text { display: grid; gap: 1px; min-width: 0; }
.switch-text strong { font-size: 13px; font-weight: 650; }
.switch-text .fine { font-size: 11px; line-height: 1.35; }

/* The top-nav Listen toggle: label + track, nothing else. */
.switch.compact {
  flex: none;
  width: auto;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.24s, background 0.24s, box-shadow 0.24s;
}
.switch.compact.on {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.08);
  box-shadow: 0 0 18px -8px var(--n4);
}
.switch.compact .switch-text strong { font-size: 14px; letter-spacing: 0.01em; }
.switch.compact.on .switch-text strong { color: var(--n4); }

.overflow-note { padding: 10px 12px; line-height: 1.5; }

/* -------------------------------------------------------------- action row -- */

.action-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.action-btn {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 11px 4px 9px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 11px;
  color: var(--dim);
  transition: transform 0.18s var(--spring), border-color 0.2s, background 0.2s, color 0.2s;
}
.action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.action-btn:active { transform: scale(0.96); }
.action-btn:focus-visible { outline: 2px solid var(--n1); outline-offset: 1px; }
.action-ic {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(140deg, var(--n1), var(--n2));
}
#act-add-group .action-ic { background: linear-gradient(140deg, var(--n4), var(--n1)); }
#act-add-contact .action-ic { background: linear-gradient(140deg, var(--n2), var(--n3)); }
#act-invite .action-ic { background: linear-gradient(140deg, var(--n3), var(--n5)); }

/* ------------------------------------------------------------------ modals -- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 6, 12, 0.65);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: modal-fade 0.18s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 26px 24px 24px;
  border-radius: 20px;
  background: rgba(13, 16, 27, 0.97);
  animation: modal-pop 0.24s var(--spring);
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.modal > * { position: relative; z-index: 2; }
.modal-title { font-size: 21px; margin: 0 0 6px; }
.modal .fine { margin: 0 0 16px; line-height: 1.55; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.16s var(--spring);
}
.modal-close:hover { color: var(--text); border-color: var(--line-2); transform: scale(1.08); }

.bottomnav:empty { display: none; }

/* ---------------------------------------------------------------- requests -- */

.requests {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  background: rgba(34, 211, 238, 0.05);
}
.request-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.request-row.outgoing { opacity: 0.65; background: transparent; }
.request-meta { flex: 1; min-width: 0; display: grid; gap: 1px; }
.request-meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------- conv list -- */

.conv-list { flex: 1; overflow-y: auto; padding: 10px; min-height: 0; }

.conv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 7px 5px 3px;
  margin-bottom: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: transform 0.2s var(--spring), background 0.2s, opacity 0.2s;
  animation: slide-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.conv-row > * { position: relative; z-index: 2; }
.conv-row:hover { background: rgba(255, 255, 255, 0.045); }
.conv-row.active { background: rgba(255, 255, 255, 0.06); }
.conv-row.is-talking { background: rgba(251, 59, 108, 0.08); }
/* While transmitting, everything that is not the target recedes. */
.conv-row.dimmed { opacity: 0.32; }
.conv-row.sending { background: rgba(251, 59, 108, 0.14); }

.conv-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border: none;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s;
}
.conv-open:hover { background: rgba(255, 255, 255, 0.04); }
.conv-open:focus-visible { outline: 2px solid var(--n1); outline-offset: 1px; }

/* Per-row speaker: which channels the user wants live on the main page. */
.speaker {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--dim);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.16s var(--spring);
}
.speaker:hover { background: rgba(255, 255, 255, 0.06); transform: scale(1.06); }
.speaker:active { transform: scale(0.94); }
.speaker:focus-visible { outline: 2px solid var(--n1); outline-offset: 1px; }

.speaker.on {
  color: var(--n4);
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.55));
}
.speaker.off { color: rgba(144, 157, 182, 0.55); }

/* Speaker on, but the channel's mode silences it — shown, not hidden. */
.speaker.overruled {
  color: var(--n5);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

/* The other party's speaker: a read-only indicator, not a control. Cyan rather
   than green so "their state" and "your choice" never read as the same thing. */
.speaker.them {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  cursor: default;
}
.speaker.them:hover { background: transparent; transform: none; }
.speaker.them.on {
  color: var(--n1);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
}
.speaker.them.off { color: rgba(144, 157, 182, 0.4); }

/* Per-row talk button: the gesture names its own target. */
.row-ptt {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s var(--spring), border-color 0.2s, background 0.2s, box-shadow 0.24s;
}
.row-ptt { color: var(--dim); }
.row-ptt svg { transition: transform 0.18s var(--spring); }
.row-ptt:hover {
  border-color: transparent;
  background: linear-gradient(140deg, var(--n1), var(--n2));
  box-shadow: 0 0 20px -6px var(--n1);
  color: #fff;
}
.row-ptt:hover svg { transform: rotate(-8deg) scale(1.08); }
.row-ptt:active { transform: scale(0.93); }
.row-ptt:focus-visible { outline: 2px solid var(--n1); outline-offset: 2px; }

.row-ptt.live {
  border-color: transparent;
  background: linear-gradient(140deg, var(--live), #ff8a5b);
  box-shadow: 0 0 0 calc(2px + var(--level, 0) * 8px) rgba(251, 59, 108, 0.28),
              0 0 22px -4px var(--live);
  color: #fff;
}
.row-ptt.live svg { transform: rotate(-8deg); }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
}

.conv-meta { display: grid; gap: 2px; min-width: 0; }
.conv-name {
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-sub {
  color: var(--dim);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Your own handout code. Hand it to someone and they can add you. */
.my-code {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 4px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, background 0.2s;
}
.my-code:hover { border-color: var(--n2); background: rgba(167, 139, 250, 0.08); }

.my-code-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  text-align: left;
  border: none;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s;
}
.my-code-main:hover { background: rgba(255, 255, 255, 0.04); }
.my-code-main:active { background: rgba(255, 255, 255, 0.07); }
.my-code-main:focus-visible { outline: 2px solid var(--n1); outline-offset: 1px; }

.my-code-label,
.my-code-hint {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dim);
}
/* Always visible: there is no hover on a touchscreen, and this is the only thing
   telling you the code is tappable. */
.my-code-hint { opacity: 0.55; }

.my-code-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-code-share {
  flex: none;
  width: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--dim);
  transition: transform 0.18s var(--spring), border-color 0.2s, background 0.2s, color 0.2s;
}
.my-code-share:hover {
  transform: translateY(-2px);
  border-color: transparent;
  background: linear-gradient(140deg, var(--n1), var(--n2));
  color: #fff;
}
.my-code-share:active { transform: translateY(0); }
.my-code-share:focus-visible { outline: 2px solid var(--n1); outline-offset: 2px; }

/* ------------------------------------------------------------------ avatars -- */

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background:
    linear-gradient(150deg,
      hsl(var(--hue, 200) 85% 58%),
      hsl(calc(var(--hue, 200) + 55) 80% 48%));
  box-shadow: 0 4px 14px -6px hsl(var(--hue, 200) 85% 55% / 0.9);
}
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar.xs { width: 21px; height: 21px; font-size: 9px; }

.avatar.talking::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--live);
  animation: halo 1.3s ease-out infinite;
}
@keyframes halo {
  0%   { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.22; } }

/* -------------------------------------------------------- conversation pane -- */

.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.conv-title { display: flex; align-items: baseline; gap: 11px; min-width: 0; }
.conv-title h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-controls { display: flex; gap: 9px; align-items: center; }
.only-mobile { display: none; }

.members { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 20px 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
  transition: transform 0.2s var(--spring), border-color 0.2s, box-shadow 0.24s;
  animation: pop-chip 0.4s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes pop-chip {
  from { opacity: 0; transform: scale(0.8); }
}
.chip:hover { transform: translateY(-2px); }
.chip.online { color: var(--text); }
.chip.offline { opacity: 0.42; }
.chip.live {
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 16px -6px var(--n4), inset 0 0 12px -8px var(--n4);
}
.chip.busy { border-color: rgba(251, 191, 36, 0.4); }

.stats { display: flex; flex-wrap: wrap; gap: 7px; padding: 11px 20px; }
.stat {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.stat.hot {
  color: var(--n1);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 14px -8px var(--n1);
}

/* ------------------------------------------------------------- caption slot -- */

.caption-slot { display: grid; gap: 9px; padding: 0 20px; }
.caption-slot:empty { display: none; }

.floor-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(251, 59, 108, 0.1);
  border: 1px solid rgba(251, 59, 108, 0.34);
  font-size: 13px;
  animation: pop-in 0.35s var(--ease) both;
}

.caption {
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14.5px;
  line-height: 1.45;
  animation: pop-in 0.3s var(--ease) both;
}
.caption > strong { color: var(--n1); margin-right: 4px; }
.caption > * { position: relative; z-index: 2; }

/* ------------------------------------------------------------- the talk zone -- */

.ptt-zone { padding: 11px 20px 18px; display: grid; gap: 12px; }
.ptt-zone:empty { display: none; }

.level {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.level span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--n4), var(--n1), var(--n2), var(--n3), var(--n4));
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.75);
  transition: width 0.07s linear;
  animation: slide-hue 3s linear infinite;
}

.talk {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 120px;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  background: linear-gradient(150deg, rgba(30, 34, 54, 0.9), rgba(16, 19, 32, 0.9));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  transition: transform 0.2s var(--spring), box-shadow 0.3s;
  box-shadow: 0 14px 40px -22px rgba(167, 139, 250, 0.9);
}

/* Rotating neon rim. */
.talk::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: spin-ring 5s linear infinite;
  z-index: 2;
  pointer-events: none;
}

/* Breathing inner bloom. */
.talk::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent 68%);
  filter: blur(16px);
  animation: pulse-soft 3.4s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes pulse-soft {
  50% { opacity: 0.45; transform: scale(1.12); }
}

.talk-inner { position: relative; z-index: 3; display: grid; gap: 4px; text-align: center; }
.talk-label {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0.13em;
  background: linear-gradient(100deg, var(--n1), var(--n2), var(--n3), var(--n2), var(--n1));
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: slide-hue 5s linear infinite;
}
.talk-hint { font-size: 12px; color: var(--dim); }

.talk:hover { transform: translateY(-3px); box-shadow: 0 22px 48px -20px rgba(167, 139, 250, 1); }
.talk:active { transform: scale(0.985); }
.talk:focus-visible { outline: 2px solid var(--n1); outline-offset: 3px; }

/* --- ON AIR ---------------------------------------------------------------- */

.talk.live {
  background: linear-gradient(150deg, rgba(90, 18, 42, 0.92), rgba(38, 10, 24, 0.92));
  /* Tight negative spread: the glow should read as drama around the button, not
     wash pink over the transcripts sitting below it. */
  box-shadow: 0 0 0 1px rgba(251, 59, 108, 0.5), 0 14px 44px -26px rgba(251, 59, 108, 0.95);
  animation: live-throb 1.5s ease-in-out infinite;
}
@keyframes live-throb {
  50% { box-shadow: 0 0 0 1px rgba(251, 59, 108, 0.75), 0 18px 54px -22px rgba(251, 59, 108, 1); }
}

.talk.live::before {
  background: conic-gradient(from var(--angle), var(--live), var(--n5), var(--n3), var(--live));
  animation-duration: 1.4s;
}
.talk.live::after {
  background: radial-gradient(circle, rgba(251, 59, 108, 0.5), transparent 70%);
  animation-duration: 1.2s;
}
.talk.live .talk-label {
  /* background-image, NOT the `background` shorthand — the shorthand resets
     background-clip back to border-box and the label becomes an invisible
     rectangle of gradient with transparent text on top of it. */
  background-image: linear-gradient(100deg, #fff, #ffd0dc, var(--n5), #ffd0dc, #fff);
  background-size: 200% 100%;
  animation-duration: 2.4s;
  text-shadow: 0 0 26px rgba(251, 59, 108, 0.8);
}

/* Expanding rings, so "on air" reads from across a room. */
.talk-rings { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.talk.live .talk-rings::before,
.talk.live .talk-rings::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(251, 59, 108, 0.55);
  border-radius: 22px;
  animation: ripple 1.9s var(--ease) infinite;
}
.talk.live .talk-rings::after { animation-delay: 0.95s; }

@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.75; }
  100% { transform: scale(1.09); opacity: 0; }
}

/* --- someone else has the floor ------------------------------------------- */

.talk.blocked {
  cursor: not-allowed;
  filter: saturate(0.35);
  opacity: 0.62;
}
.talk.blocked::before { animation-duration: 14s; }
.talk.blocked .talk-label {
  background-image: linear-gradient(100deg, var(--n5), #fff, var(--n5));
  background-size: 200% 100%;
}

.ptt-row { display: flex; gap: 9px; }

/* --------------------------------------------------------------- timeline -- */

.timeline {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 6px 20px 28px;
  list-style: none;
  min-height: 0;
}

.burst {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 13px 13px 13px 15px;
  margin-bottom: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--spring), background 0.2s, border-color 0.2s;
}

/* Only the newest row animates in. The timeline region is rewritten whenever any
   burst changes, so a staggered cascade across every row would replay in full
   each time somebody talks. */
.burst:last-child {
  animation: rise 0.42s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* Speaker-coloured spine, brightened on hover. */
.burst::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    hsl(var(--hue, 200) 85% 62%),
    hsl(calc(var(--hue, 200) + 60) 85% 55%));
  opacity: 0.75;
  transition: opacity 0.22s, box-shadow 0.22s;
}
.burst:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-2);
  transform: translateX(3px);
}
.burst:hover::before {
  opacity: 1;
  box-shadow: 0 0 14px hsl(var(--hue, 200) 90% 60%);
}

.burst.mine .burst-head strong {
  background: linear-gradient(90deg, var(--n4), var(--n1));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.burst.urgent {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}

.play {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.2s var(--spring), border-color 0.2s, box-shadow 0.24s, background 0.2s;
}
.play-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 10px solid currentColor;
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
  transition: border-left-color 0.2s;
}
.play:hover {
  transform: scale(1.09);
  border-color: transparent;
  background: linear-gradient(140deg, var(--n1), var(--n2));
  box-shadow: 0 0 22px -6px var(--n1);
  color: #fff;
}
.play:active { transform: scale(0.95); }

/* Fetching the clip. */
.play.loading .play-icon { opacity: 0; }
.play.loading::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--ring);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
  animation: spin-ring 1.2s linear infinite, rotate 0.9s linear infinite;
}

/* Playing: pulse so it is obvious which clip you are hearing. */
.play.playing {
  border-color: transparent;
  background: linear-gradient(140deg, var(--n1), var(--n2));
  color: #fff;
  animation: play-pulse 1.3s ease-in-out infinite;
}
@keyframes play-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
}

.burst-body { min-width: 0; flex: 1; }
.burst-head { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.burst-head strong { font-weight: 650; }
.burst-text { margin: 3px 0 4px; word-wrap: break-word; line-height: 1.5; }
.heard { font-size: 11px; opacity: 0.8; }

.tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--n5);
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 24px) scale(0.97);
  max-width: min(540px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(10, 12, 22, 0.9);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(34, 211, 238, 0.6);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.32s var(--spring);
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ------------------------------------------------------------------ mobile -- */

@media (max-width: 760px) {
  .app.shell {
    grid-template:
      "top" auto
      "mid" 1fr
      "bottom" auto
      / 1fr;
  }
  /* One pane at a time: the sidebar and the room share the middle area. */
  .sidebar { grid-area: mid; border-right: none; }
  .only-mobile { display: block; }
  .app.shell.has-active .sidebar { display: none; }
  .app.shell:not(.has-active) .main { display: none; }
  /* In a room, the bottom of the screen belongs to the talk button, not to the
     create/add forms — those are lobby chores. */
  .app.shell.has-active .bottomnav { display: none; }

  .topnav { min-height: 52px; padding: 8px 12px; gap: 9px; }
  .topnav .me select { max-width: 108px; font-size: 13px; }
  .bottomnav { padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .bottomnav .my-code,
  .bottomnav form.row { flex: 1 1 100%; min-width: 0; }

  /* Keep the header on one row: vertical space on a phone belongs to the
     timeline and the talk button. The member count is redundant with the
     member chips directly below it. */
  .conv-head { padding: 11px 15px; flex-wrap: nowrap; }
  .conv-title { flex: 1; gap: 8px; }
  .conv-title h2 { font-size: 17px; }
  .conv-title .fine { display: none; }
  .conv-controls { flex: none; gap: 6px; }
  .conv-controls select { font-size: 12px; padding: 6px 4px; }
  .members, .stats, .caption-slot, .ptt-zone, .timeline {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* The talk button belongs under the thumb, with the timeline scrolling
     above it — not stranded at the top of the screen. */
  .timeline { order: 2; }
  .caption-slot { order: 3; padding-top: 10px; }
  .ptt-zone {
    order: 4;
    border-top: 1px solid var(--line);
    background: rgba(10, 12, 22, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .talk { min-height: 138px; }
  .talk-label { font-size: 23px; }
}

/* Big screens: keep the reading column sane. */
@media (min-width: 1500px) {
  .conv-head, .members, .stats, .caption-slot, .ptt-zone, .timeline {
    max-width: 1080px;
    width: 100%;
    margin-inline: auto;
  }
}

/* --------------------------------------------------------- reduced motion -- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .blob { display: none; }
  /* Keep the rim visible, just static. */
  .neon-edge::before, .talk::before { background: linear-gradient(100deg, var(--n1), var(--n2), var(--n3)); }
  .gradient-text, .talk-label { background-position: 0 0; }
}
