/* =========================================================
   VibeSync — "Ember & Dusk" design system
   One central stylesheet for the entire application.

   A consent-first platform for sharing intimate control across distance —
   the visual language should feel like closeness, not infrastructure:
   candlelit warmth and quiet confidence rather than a cold ops dashboard.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,500;0,600;1,500&family=Manrope:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color — warm dusk plum background, ember-rose as the "consent is live"
     signal, brass-gold for secondary attention, muted warm neutrals for text. */
  --void: #1B1420;
  --surface: #241A2B;
  --elevated: #2F2336;
  --elevated-hover: #3A2B42;
  --ember: #E28FA8;
  --ember-dim: rgba(226, 143, 168, 0.16);
  --gold: #D4A15F;
  --gold-dim: rgba(212, 161, 95, 0.16);
  --coral: #E2695F;
  --coral-dim: rgba(226, 105, 95, 0.16);
  --ink: #F4E9EE;
  --ink-dim: #B39AAC;
  --ink-faint: #7B6577;
  --line: #3D2C42;

  /* Type — a warm literary serif for headings, used sparingly; a rounded
     humanist sans for everything you actually read and click; a mono
     face with a little more character than the usual dev-tool default. */
  --font-display: 'Cormorant', serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --sidebar-width: 248px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}

/* A faint film-grain texture over everything — the one deliberate textural
   risk in this system, keeping the dark palette from reading as flat vector
   "app chrome." Fixed and non-interactive, so it never affects layout. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.001em;
}

h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--font-mono); }

button {
  font-family: var(--font-body);
  cursor: pointer;
}

::selection { background: var(--ember-dim); }

/* Focus visibility — never suppressed */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* =========================================================
   Signature element: the glow
   ========================================================= */

.consent-pulse {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px 1px rgba(226, 143, 168, 0.55);
  flex-shrink: 0;
}

.consent-pulse::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 143, 168, 0.45) 0%, transparent 70%);
  animation: consent-breathe 3.2s ease-in-out infinite;
}

.consent-pulse.paused { background: var(--ink-faint); box-shadow: none; }
.consent-pulse.paused::before { background: radial-gradient(circle, rgba(123, 101, 119, 0.3) 0%, transparent 70%); animation: none; opacity: 0.4; }

.consent-pulse.attention { background: var(--gold); box-shadow: 0 0 8px 1px rgba(212, 161, 95, 0.55); }
.consent-pulse.attention::before { background: radial-gradient(circle, rgba(212, 161, 95, 0.45) 0%, transparent 70%); }

@keyframes consent-breathe {
  0%   { transform: scale(0.7); opacity: 0.9; }
  50%  { transform: scale(1.6); opacity: 0.15; }
  100% { transform: scale(0.7); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-pulse::before { animation: none; opacity: 0.4; }
}

/* =========================================================
   Auth pages (login / register)
   ========================================================= */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 800px 500px at 15% 10%, rgba(226,143,168,0.10), transparent 55%),
    radial-gradient(ellipse 700px 600px at 85% 90%, rgba(212,161,95,0.07), transparent 55%),
    var(--void);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, var(--surface), var(--void));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(226,143,168,0.03);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.auth-brand h1 {
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(135deg, var(--ink), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-tagline {
  color: var(--ink-dim);
  font-size: 13.5px;
  margin-top: 4px;
  line-height: 1.6;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-body);
}

.field input:focus {
  border-color: var(--ember);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ember), #CC6E8E);
  color: #2A1420;
  width: 100%;
  box-shadow: 0 4px 18px -4px rgba(226, 143, 168, 0.45);
}
.btn-primary:hover { box-shadow: 0 6px 22px -4px rgba(226, 143, 168, 0.65); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }

.ageverif-feature {
  border: 1px solid rgba(212, 161, 95, 0.35);
  background: linear-gradient(180deg, rgba(212, 161, 95, 0.08), rgba(212, 161, 95, 0.02));
  border-radius: var(--radius-md, 10px);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.ageverif-feature .ageverif-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.ageverif-feature p {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0 0 12px;
}

.ageverif-feature .btn-primary.verified {
  background: linear-gradient(135deg, #4CAF7D, #2F8C5B);
  box-shadow: 0 4px 18px -4px rgba(76, 175, 125, 0.45);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--ink-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* ── Onboarding wizard (register.html) ───────────────────────────────── */

.onboard-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
}
.onboard-progress .dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.25s ease;
}
.onboard-progress .dot.done { background: var(--ember); }
.onboard-progress .dot.active { background: var(--gold); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.step-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.step-body p {
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.65;
  margin-bottom: 12px;
}

.reassure-list {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reassure-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.reassure-list .ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(226,143,168,0.12);
  border: 1px solid rgba(226,143,168,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ember);
  margin-top: 1px;
}

.policy-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 16px 0;
}
.policy-link-row span { font-size: 13px; color: var(--ink-dim); }
.policy-link-row a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ember);
  text-decoration: none;
  white-space: nowrap;
}
.policy-link-row a:hover { text-decoration: underline; }

.step-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.step-nav .btn-ghost { width: auto; flex: 0 0 auto; padding: 11px 18px; }
.step-nav .btn-primary { flex: 1; }

.btn-danger {
  background: var(--coral-dim);
  color: var(--coral);
  border-color: transparent;
}
.btn-danger:hover { background: var(--coral); color: #2A1210; }

.form-error {
  background: var(--coral-dim);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.form-error.visible { display: block; }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-dim);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.remember-row input { width: auto; flex-shrink: 0; }

/* =========================================================
   Landing hero (index.html only)
   ========================================================= */

.landing-shell {
  background:
    radial-gradient(ellipse 900px 560px at 12% 8%, rgba(226,143,168,0.10), transparent 55%),
    radial-gradient(ellipse 800px 640px at 92% 96%, rgba(212,161,95,0.08), transparent 55%),
    var(--void);
}

.landing-topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}

.landing-topbar .btn {
  width: auto;
  padding: 9px 18px;
  font-size: 13px;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  min-height: 78vh;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ember);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 66px);
  line-height: 1.06;
  letter-spacing: 0.001em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 11.5ch;
}

.hero-headline em {
  font-style: italic;
  background: linear-gradient(135deg, var(--ink), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-cta-row .btn { width: auto; }
.hero-cta { padding: 14px 28px; font-size: 15px; }
.hero-cta-secondary { padding: 14px 24px; font-size: 15px; }

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thread-svg {
  width: 100%;
  max-width: 460px;
  height: auto;
}

.thread-path-base {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}

.thread-path-glow {
  fill: none;
  stroke: url(#threadGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 46 400;
  animation: thread-travel 4.5s linear infinite;
  filter: drop-shadow(0 0 6px rgba(226, 143, 168, 0.55));
}

@keyframes thread-travel {
  0%   { stroke-dashoffset: 446; }
  100% { stroke-dashoffset: -446; }
}

.thread-node {
  animation: consent-breathe-node 3.6s ease-in-out infinite;
}

.thread-node.b { animation-delay: 1.7s; }

@keyframes consent-breathe-node {
  0%, 100% { opacity: 0.55; r: 5.5; }
  50%      { opacity: 1;    r: 8;   }
}

.thread-node-core { fill: var(--ember); }
.thread-node-ring { fill: none; stroke: var(--ember); stroke-width: 1; opacity: 0.35; }

@media (prefers-reduced-motion: reduce) {
  .thread-path-glow { animation: none; stroke-dasharray: none; opacity: 0.7; }
  .thread-node { animation: none; }
}

.landing-auth-section {
  display: flex;
  justify-content: center;
  padding: 8px 32px 96px;
}

.landing-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 12.5px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

.landing-footer a { color: var(--ink-faint); }
.landing-footer a:hover { color: var(--ember); text-decoration: none; }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
    padding-top: 40px;
    text-align: left;
  }
  .hero-visual { order: -1; margin-bottom: 8px; }
  .thread-svg { max-width: 300px; }
  .hero-headline { max-width: none; }
  .landing-topbar { padding: 22px 20px 0; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .landing-auth-section { padding: 8px 20px 72px; }
  .landing-footer { flex-wrap: wrap; gap: 10px 18px; padding: 20px 20px 32px; }
}

/* =========================================================
   App shell — left sidebar + main canvas
   ========================================================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface), var(--void) 85%);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
}

.sidebar-brand h1 {
  font-size: 21px;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
}

/* Top User Profile & Logout Box */
.sidebar-user-top {
  padding: 12px;
  margin-bottom: 16px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-user-top .sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-user-top .sidebar-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-top .username {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-top .role-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* Text + Arrow Logout Button */
.logout-btn-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.logout-btn-text:hover {
  background: var(--coral-dim);
  border-color: rgba(226, 105, 95, 0.4);
  color: var(--coral);
}

.logout-btn-text .logout-arrow {
  font-size: 13px;
  transition: transform 0.15s ease;
}

.logout-btn-text:hover .logout-arrow {
  transform: translateX(3px);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-item:hover { background: var(--elevated); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--ember-dim); color: var(--ember); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: var(--ember);
}
.nav-item .icon { width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding: 20px 10px 8px;
}

.sidebar-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.live-session-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-dim);
  cursor: pointer;
}
.live-session-chip:hover { background: var(--elevated); color: var(--ink); }
.live-session-chip > span:first-of-type + span { min-width: 0; }

/* Main canvas */

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px 100px;
  min-height: 100vh;
  position: relative;
}

.main-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.main-header h2 { font-size: 24px; }
.main-header .subtitle { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.session-card {
  background: linear-gradient(160deg, var(--surface), var(--elevated) 140%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.session-card:hover { border-color: rgba(226, 143, 168, 0.3); transform: translateY(-2px); }

.session-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-card-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
}

.session-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  background: var(--elevated);
  padding: 2px 8px;
  border-radius: 4px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-dim);
}

/* =========================================================
   Dashboard Integration — VibeSync Banner & Site News Auto-Scaling
   ========================================================= */

.welcome-banner {
  background: linear-gradient(135deg, rgba(74, 28, 64, 0.6) 0%, rgba(36, 26, 43, 0.9) 50%, rgba(20, 14, 25, 0.95) 100%);
  border: 1px solid rgba(226, 143, 168, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  gap: 24px;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(226, 143, 168, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.welcome-header h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink-dim);
}

.welcome-username {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}

.welcome-subtitle {
  color: var(--ink-dim);
  font-size: 13.5px;
  margin: 6px 0 20px;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(36, 26, 43, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.status-badge.active {
  background: rgba(46, 196, 182, 0.12);
  border-color: rgba(46, 196, 182, 0.3);
  color: #38d39f;
}

.alerts-badge-wrap { position: relative; display: inline-flex; }
.alerts-badge {
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.alerts-badge:hover { border-color: var(--gold); color: var(--ink); }
.alerts-badge.has-unseen {
  background: rgba(226, 143, 168, 0.12);
  border-color: rgba(226, 143, 168, 0.35);
  color: var(--ember);
}

.alerts-panel {
  display: none;
  position: fixed;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--surface), var(--void));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 2000;
}
.alerts-panel.visible { display: block; }
.alerts-panel-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}
.alerts-panel-list { display: flex; flex-direction: column; }
.alert-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.alert-row:last-child { border-bottom: none; }
.alert-row .alert-reason { color: var(--ink); margin-bottom: 4px; }
.alert-row .alert-time { font-size: 11.5px; color: var(--ink-faint); }
.alert-row.unseen { background: rgba(226, 143, 168, 0.06); }
.alert-row-dm { cursor: pointer; transition: background 0.12s ease; }
.alert-row-dm:hover { background: rgba(226, 143, 168, 0.14); }
.alerts-panel-empty { display: none; padding: 20px 16px; text-align: center; font-size: 12.5px; color: var(--ink-faint); }
.alerts-panel-empty.visible { display: block; }


/* Auto-Scaling Top-Right Site News Container (No Scrolling Required) */
.welcome-news-card {
  position: relative;
  width: 480px;
  max-width: 45%;
  height: 160px;
  background: rgba(27, 20, 32, 0.85);
  border: 1px solid rgba(226, 143, 168, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  overflow: hidden; /* Prevents scrollbars */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-news-card:empty {
  display: none;
}

.welcome-news-card .site-news-content {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

/* Scaled images within news content */
.welcome-news-card .site-news-content img {
  max-width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.welcome-news-card .site-news-content p {
  margin: 0 0 4px;
  font-size: 12px;
}

.welcome-news-card .site-news-content p:last-child {
  margin-bottom: 0;
}

/* Dashboard Layout Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.sessions-container {
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.empty-state {
  border: 1px dashed rgba(226, 143, 168, 0.2);
  border-radius: var(--radius-md);
  padding: 48px 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(27, 20, 32, 0.4);
  text-align: center;
  color: var(--ink-dim);
}

.empty-state h4 { color: var(--ink); margin-bottom: 8px; font-size: 17px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

.empty-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(226, 143, 168, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.empty-icon {
  font-size: 22px;
}

/* Side Devices Panel */
.panel-subtext {
  font-size: 12.5px;
  color: var(--ink-dim);
  margin-bottom: 16px;
  line-height: 1.4;
}

.device-btn-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.device-btn-group .btn {
  flex: 1;
  font-size: 12.5px;
  padding: 9px 12px;
  background: rgba(226, 143, 168, 0.08);
  border-color: rgba(226, 143, 168, 0.2);
}

.device-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.device-input-row .btn {
  padding: 8px 16px;
  font-size: 12.5px;
}

.panel-footnote {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 10px;
  line-height: 1.4;
}

.device-empty-text {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 8px;
}

/* How It Works Panel */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.how-card {
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
}

.how-icon {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--ember);
}

.how-card h5 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.how-card p {
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.35;
}

/* Quick Help Menu */
.help-menu-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-menu-list a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ink-dim);
  transition: all 0.15s ease;
}

.help-menu-list a:hover {
  border-color: var(--ember);
  color: var(--ink);
  transform: translateX(2px);
}

.help-icon {
  margin-right: 10px;
}

.help-menu-list .arrow {
  margin-left: auto;
  font-size: 16px;
  color: var(--ink-faint);
}

/* Safety Panel */
.safety-card {
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  gap: 12px;
  margin: 10px 0 14px;
}

.safety-shield {
  font-size: 24px;
}

.safety-content p {
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.4;
  margin-bottom: 2px;
}

.btn-block {
  width: 100%;
}

/* App Footer */
.app-footer {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.footer-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-faint);
}

.footer-content a {
  color: var(--ink-faint);
  transition: color 0.15s ease;
}

.footer-content a:hover {
  color: var(--ember);
  text-decoration: none;
}

/* Responsive Overrides */
@media (max-width: 1180px) {
  .dashboard-grid, .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .welcome-news-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 220px;
  }
}

/* =========================================================
   Per-toy control windows (My Session tab)
   ========================================================= */

.session-toys-canvas {
  position: relative;
  min-height: 360px;
  max-height: 640px;
  overflow: auto;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--void);
}

.toy-window {
  position: absolute;
  width: 260px;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  overflow: hidden;
  --window-accent: var(--ember);
  display: flex;
  flex-direction: column;
}
.toy-window.dragging, .toy-window.resizing { box-shadow: 0 18px 44px rgba(0,0,0,0.6); z-index: 5; }

.toy-window-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  cursor: grab;
  border-top: 2px solid var(--window-accent);
  flex-shrink: 0;
}
.toy-window-header:active { cursor: grabbing; }

.toy-window-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toy-window-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}
.toy-window.minimized .toy-window-body { display: none; }
.toy-window.minimized { height: auto !important; }

.toy-window-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--line) 50%, var(--line) 60%, transparent 60%, transparent 70%, var(--line) 70%, var(--line) 80%, transparent 80%);
}
.toy-window.minimized .toy-window-resize-handle { display: none; }

.window-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  font-size: 12px;
}
.window-btn:hover { background: var(--elevated-hover); color: var(--ink); }

.intensity-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intensity-control label {
  font-size: 12px;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ember);
  cursor: pointer;
  border: 2px solid var(--void);
}

.window-actions {
  display: flex;
  gap: 8px;
}

.window-actions .btn { flex: 1; font-size: 13px; padding: 8px; }

.session-capability-section[data-cap="rotate"] { --window-accent: #06b6d4; }
.session-capability-section[data-cap="linear"] { --window-accent: #3b82f6; }
.session-capability-section[data-cap="pattern"] { --window-accent: #8b5cf6; }

.preset-row { display: flex; gap: 5px; }
.preset-btn {
  flex: 1;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--void);
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.preset-btn:hover { border-color: var(--window-accent); color: var(--ink); }
.preset-btn.preset-stop { color: var(--coral); border-color: rgba(226, 105, 95, 0.3); }
.preset-btn.preset-stop:hover { border-color: var(--coral); background: var(--coral-dim); }

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--void);
  color: var(--ink-dim);
  font-size: 10px;
  cursor: pointer;
}
.pat-icon { font-size: 15px; }
.pat-btn:hover { border-color: var(--window-accent); color: var(--ink); }
.pat-btn.active { border-color: var(--window-accent); color: var(--ink); background: var(--elevated-hover); }

/* =========================================================
   Reusable panel & list styles
   ========================================================= */

.panel-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.panel-box h4 { font-size: 14px; margin-bottom: 12px; }

.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simple-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--void);
}

/* =========================================================
   Toast notifications
   ========================================================= */

#toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.toast.error { border-left-color: var(--coral); }
.toast.warn { border-left-color: var(--gold); }

/* =========================================================
   Community chat
   ========================================================= */

.chat-window {
  display: flex;
  flex-direction: column;
  height: 65vh;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 640px;
}

.chat-message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
}

.chat-message-author {
  font-weight: 600;
  color: var(--ember);
}

.chat-message-author.role-mod,
.chat-message-author.role-admin {
  color: var(--gold);
}

.chat-message-pronouns {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 500;
}

.chat-message-time {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chat-message-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message-body.deleted {
  color: var(--ink-faint);
  font-style: italic;
}

.chat-delete-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}
.chat-delete-btn:hover { color: var(--coral); }

.chat-pin-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}
.chat-pin-btn:hover { color: var(--gold); }
.chat-pin-btn.pinned { color: var(--gold); }

.chat-message.is-pinned {
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: -8px -10px;
}

.chat-pinned-banner {
  border-bottom: 1px solid var(--line);
  background: var(--gold-dim);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-pinned-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}

.chat-pinned-item .chat-pinned-icon { color: var(--gold); flex-shrink: 0; }
.chat-pinned-item .chat-pinned-author { font-weight: 600; color: var(--gold); flex-shrink: 0; }
.chat-pinned-item .chat-pinned-body {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.chat-pinned-item .chat-unpin-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-pinned-item .chat-unpin-btn:hover { color: var(--coral); }

.chat-message.mentioned-me {
  background: var(--ember-dim);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: -8px -10px;
}

.chat-mention {
  color: var(--ember);
  font-weight: 600;
  background: rgba(226, 143, 168, 0.14);
  padding: 0 3px;
  border-radius: 3px;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-body);
}
.chat-input:focus { border-color: var(--ember); }

.view-panel { display: none; }
.view-panel.active { display: block; }

/* =========================================================
   Moderation panel
   ========================================================= */

.mod-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.mod-tab {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.mod-tab:hover { color: var(--ink); }
.mod-tab.active { color: var(--ember); border-bottom-color: var(--ember); }

.mod-tab-panel { display: none; }
.mod-tab-panel.active { display: block; }

.mod-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.mod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mod-table th {
  text-align: left;
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.mod-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.mod-table tr:last-child td { border-bottom: none; }

.mod-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.mod-badge.role-user { background: var(--elevated); color: var(--ink-dim); }
.mod-badge.role-donor { background: rgba(212, 161, 95, 0.16); color: var(--gold); }
.mod-badge.role-mod { background: var(--ember-dim); color: var(--ember); }
.mod-badge.role-admin { background: var(--coral-dim); color: var(--coral); }

.mod-badge.status-open { background: var(--coral-dim); color: var(--coral); }
.mod-badge.status-reviewing { background: var(--gold-dim); color: var(--gold); }
.mod-badge.status-closed { background: var(--elevated); color: var(--ink-dim); }

.mod-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.mod-btn {
  font-size: 11.5px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--elevated);
  color: var(--ink);
  cursor: pointer;
}
.mod-btn:hover { border-color: var(--ember); color: var(--ember); }
.mod-btn.danger:hover { border-color: var(--coral); color: var(--coral); }

.mod-role-select {
  font-size: 11.5px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--void);
  color: var(--ink);
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.report-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.report-meta { font-size: 12px; color: var(--ink-dim); margin-bottom: 8px; }
.report-details { font-size: 13px; color: var(--ink); margin-bottom: 10px; }

.chat-report-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}
.chat-report-btn:hover { color: var(--gold); }

.call-panel {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.call-status {
  font-size: 12px;
  color: var(--ink-dim);
}

.remote-video {
  width: 100%;
  height: 0;
  border-radius: var(--radius-sm);
  background: var(--void);
  object-fit: cover;
  transition: height 0.2s ease;
}

.remote-video.has-video {
  height: 140px;
}

.call-video-option,
.call-audio-option {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.call-toggle-btn.active {
  background: var(--ember-dim);
  border-color: var(--ember);
  color: var(--ember);
}

.call-mute-btn.active, .call-camera-mute-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* =========================================================
   Feedback board
   ========================================================= */

.feedback-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
}

.feedback-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
}

.vote-btn {
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
}
.vote-btn:hover { border-color: var(--ember); color: var(--ember); }
.vote-btn.voted-up { background: var(--ember-dim); border-color: var(--ember); color: var(--ember); }
.vote-btn.voted-down { background: var(--coral-dim); border-color: var(--coral); color: var(--coral); }

.vote-score { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }

.feedback-body { flex: 1; min-width: 0; }

.feedback-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.feedback-title { font-weight: 600; font-size: 14px; }

.mod-badge.type-bug { background: var(--coral-dim); color: var(--coral); }
.mod-badge.type-feature { background: var(--ember-dim); color: var(--ember); }
.mod-badge.status-in_progress { background: var(--gold-dim); color: var(--gold); }
.mod-badge.status-done { background: var(--ember-dim); color: var(--ember); }
.mod-badge.consent-accepted { background: var(--ember-dim); color: var(--ember); }
.mod-badge.consent-declined { background: var(--coral-dim); color: var(--coral); }
.mod-badge.consent-flagged { background: var(--gold-dim); color: var(--gold); }

.feedback-meta { font-size: 12px; color: var(--ink-dim); margin-bottom: 6px; }
.feedback-desc { font-size: 13px; color: var(--ink); line-height: 1.5; }
.feedback-staff-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-dim);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.dm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 13px;
}
.dm-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.dm-card-body { color: var(--ink); line-height: 1.5; }

/* =========================================================
   Profile
   ========================================================= */

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #2A1420;
  background: linear-gradient(135deg, var(--ember), var(--gold));
  background-size: cover;
  background-position: center;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--void), 0 0 0 3px var(--line);
  transition: box-shadow 0.15s ease;
}
.sidebar-avatar:hover { box-shadow: 0 0 0 2px var(--void), 0 0 0 3px var(--ember); }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  max-width: 900px;
}
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

.avatar-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }

.avatar-preview {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: #2A1420;
  background: linear-gradient(135deg, var(--ember), var(--gold));
  background-size: cover;
  background-position: center;
  outline: 3px solid var(--ember);
  outline-offset: 4px;
  overflow: hidden;
  user-select: none;
}

.avatar-upload-btn {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ember);
  color: #2A1420;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  border: 2px solid var(--void);
}

.colour-swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.colour-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.colour-swatch:hover { transform: scale(1.08); }
.colour-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--void), 0 0 0 4px var(--ink); }

.sparkle-bg { background: linear-gradient(90deg,#ff80bf,#c084fc,#67e8f9,#a78bfa,#ff80bf) !important; background-size: 300% 100% !important; animation: swatch-shift 3s ease infinite; }
.admin-gold-bg { background: linear-gradient(90deg,#fbbf24,#fde68a,#f59e0b,#fbbf24) !important; background-size: 300% 100% !important; animation: swatch-shift 2.5s ease infinite; }
.admin-hotpink-bg { background: linear-gradient(90deg,#ff0090,#ff69b4,#ff1493,#ff85c2,#ff0090) !important; background-size: 300% 100% !important; animation: swatch-shift 2s ease infinite; }
.donor-flames-bg { background: linear-gradient(90deg,#dc2626,#f97316,#fbbf24,#f97316,#dc2626) !important; background-size: 300% 100% !important; animation: swatch-shift 2s ease infinite; }
.donor-chrome-bg { background: linear-gradient(90deg,#a1a1aa,#f4f4f5,#71717a,#e4e4e7,#a1a1aa) !important; background-size: 300% 100% !important; animation: swatch-shift 3s ease infinite; }

@keyframes swatch-shift { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

.field-status { font-size: 12px; height: 16px; margin-top: 4px; color: var(--ink-faint); }
.field-status.ok { color: var(--ember); }
.field-status.error { color: var(--coral); }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }

.pill-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--void);
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.pill-btn:hover { border-color: var(--ember); color: var(--ink); }
.pill-btn.active { border-color: var(--ember); color: var(--ember); background: var(--ember-dim); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.toggle-row-label { font-size: 13.5px; color: var(--ink); }
.toggle-row-sub { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.18s ease;
}
.toggle-switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.toggle-switch.on { background: var(--ember); }
.toggle-switch.on .knob { transform: translateX(18px); }

.danger-zone {
  border: 1px solid rgba(226, 105, 95, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--coral-dim);
}
.danger-zone h4 { color: var(--coral); }
.danger-zone p { font-size: 12.5px; color: var(--ink-dim); margin: 6px 0 12px; line-height: 1.5; }

/* Profile popup */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 8, 13, 0.72);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.visible { display: flex; }

.critical-notice-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, var(--surface), var(--void));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px 24px;
  text-align: center;
}
.critical-notice-icon { font-size: 34px; margin-bottom: 14px; line-height: 1; }
.critical-notice-message { font-size: 14px; color: var(--ink); line-height: 1.65; margin: 0 0 22px; white-space: pre-line; }
.critical-notice-card .btn { width: 100%; }

.profile-modal {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(180deg, var(--surface), var(--void));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.65);
}

.profile-modal-banner {
  height: 84px;
  background: linear-gradient(135deg, var(--ember), var(--gold), var(--coral));
  position: relative;
}
.profile-modal-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(10px) brightness(0.55); transform: scale(1.15); }

.profile-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.profile-modal-avatar {
  position: absolute;
  bottom: -30px;
  left: 20px;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  border: 4px solid var(--void);
  background: linear-gradient(135deg, var(--ember), var(--gold));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.profile-modal-body { padding: 40px 20px 20px; }
.profile-modal-username { font-size: 17px; font-weight: 700; }
.profile-modal-status { font-size: 12px; color: var(--ink-faint); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.profile-modal-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0; }
.profile-modal-status.online { color: #34d399; }
.profile-modal-status.online::before { background: #34d399; }
.profile-modal-meta { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; }
.profile-modal-pronouns { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.profile-modal-bio {
  margin-top: 12px;
  background: var(--elevated);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.profile-modal-prefs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.profile-modal-prefs span { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; background: var(--ember-dim); color: var(--ember); }

.profile-modal-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.profile-modal-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 13.5px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
}
.profile-modal-actions button:hover { background: var(--elevated); }
.profile-modal-actions button.danger { color: var(--coral); }
.profile-modal-actions button.warning { color: var(--gold); }

.profile-modal-staff-actions { margin-top: 6px; border-top: 1px dashed var(--line); }
.profile-modal-staff-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 10px 4px 2px;
}

.clickable-username { cursor: pointer; }
.clickable-username:hover { text-decoration: underline; }

/* =========================================================
   Session browsing & participants
   ========================================================= */

.session-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}
.session-type-badge.be-controlled { background: rgba(236, 72, 153, 0.12); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.25); }
.session-type-badge.want-controller { background: rgba(96, 165, 250, 0.12); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.25); }

.session-card-desc { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; }
.session-card-meta { font-size: 11.5px; color: var(--ink-faint); display: flex; gap: 10px; flex-wrap: wrap; }

.participant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.participant-row:last-child { border-bottom: none; }
.participant-row .presence-avatar { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display:flex; align-items:center; justify-content:center; font-size:15px; background: var(--void); }
.participant-row .participant-name { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; cursor: pointer; }
.participant-row .participant-perms { display: flex; gap: 14px; align-items: center; }
.participant-perm-toggle { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-dim); }
.participant-perm-toggle .toggle-switch { width: 30px; height: 17px; }
.participant-perm-toggle .toggle-switch .knob { width: 13px; height: 13px; }
.participant-perm-toggle .toggle-switch.on .knob { transform: translateX(13px); }
.participant-revoke-btn {
  background: none; border: 1px solid var(--line); color: var(--coral); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 11.5px; cursor: pointer; flex-shrink: 0;
}
.participant-revoke-btn:hover { border-color: var(--coral); background: var(--coral-dim); }

/* =========================================================
   My Session dedicated control tab
   ========================================================= */

.session-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.session-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.session-chat-col {
  width: 340px;
  flex-shrink: 0;
}
.session-chat-window { height: 640px; }
.session-chat-header {
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}

.session-capability-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.session-capability-section:first-of-type { border-top: none; padding-top: 0; }

@media (max-width: 1000px) {
  .session-layout { flex-direction: column; }
  .session-chat-col { width: 100%; }
  .session-chat-window { height: 420px; }
}

/* =========================================================
   Online sidebar & Friends
   ========================================================= */

.nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.4;
}

.community-layout { display: flex; gap: 16px; align-items: stretch; }
.community-layout .chat-window { flex: 1; min-width: 0; }

.online-sidebar {
  width: 220px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  height: 65vh;
  overflow: hidden;
}
.online-sidebar-header {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
}
.online-sidebar-header span { color: var(--ember); font-family: var(--font-mono); text-transform: none; letter-spacing: 0; }
.online-users-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }

.online-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.online-user-row:hover { background: var(--elevated); }
.online-user-row .presence-avatar {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: var(--void); position: relative;
}
.online-user-row .presence-dot {
  position: absolute; bottom: -1px; right: -1px; width: 8px; height: 8px;
  border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px var(--surface);
}
.online-user-row .username { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .community-layout { flex-direction: column; }
  .online-sidebar { width: 100%; height: 220px; }
}

/* Direct messages */

.dm-layout { display: flex; gap: 16px; align-items: stretch; }

.dm-conversations {
  width: 260px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  height: 65vh;
  overflow: hidden;
}
.dm-conversations-header {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
.dm-conversations-list { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.dm-conversations-empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--ink-faint); }

.dm-conversation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.dm-conversation-row:hover { background: var(--elevated); }
.dm-conversation-row.active { background: var(--ember-dim); }
.dm-conversation-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: var(--void); overflow: hidden;
}
.dm-conversation-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-conversation-info { flex: 1; min-width: 0; }
.dm-conversation-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conversation-preview { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conversation-time { font-size: 11px; color: var(--ink-faint); font-family: var(--font-mono); flex-shrink: 0; }
.dm-blocked-tag {
  font-size: 10px; font-weight: 600; color: var(--coral);
  background: var(--coral-dim); padding: 1px 6px; border-radius: 999px; text-transform: uppercase;
}

.dm-thread {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  height: 65vh;
  overflow: hidden;
  display: flex;
}
.dm-thread-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.dm-thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.dm-thread-username { font-size: 14px; font-weight: 600; cursor: pointer; }
.dm-thread-username:hover { color: var(--ember); }
.dm-blocked-notice {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--coral);
  font-size: 12.5px;
  text-align: center;
}

@media (max-width: 900px) {
  .dm-layout { flex-direction: column; }
  .dm-conversations { width: 100%; height: 220px; }
  .dm-thread { height: 55vh; }
}

.friends-filter-tabs, .session-filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.friends-filter-tab, .session-filter-tab {
  background: none; border: none; padding: 10px 4px 12px;
  margin-right: 18px;
  color: var(--ink-faint);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px;
}
.friends-filter-tab:hover, .session-filter-tab:hover { color: var(--ink); }
.friends-filter-tab.active, .session-filter-tab.active { color: var(--ember); border-bottom-color: var(--ember); }
.friends-filter-badge {
  background: var(--elevated); color: var(--ink-dim); font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
}
.friends-filter-tab.active .friends-filter-badge { background: var(--ember-dim); color: var(--ember); }

.friends-list { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }

.friend-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.friend-card .presence-avatar {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--void); position: relative;
}
.friend-card .presence-dot {
  position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px;
  border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px var(--surface);
}
.friend-card .friend-info { flex: 1; min-width: 0; cursor: pointer; }
.friend-card .username { font-size: 14px; font-weight: 600; }
.friend-card .friend-status-line { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.friend-card .friend-status-line.online { color: #34d399; }
.friend-card .friend-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-card .friend-actions button {
  padding: 7px 13px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line); background: var(--void); color: var(--ink-dim);
}
.friend-card .friend-actions button:hover { border-color: var(--ember); color: var(--ink); }
.friend-card .friend-actions button.accept { background: var(--ember); border-color: var(--ember); color: #2A1420; }
.friend-card .friend-actions button.danger:hover { border-color: var(--coral); color: var(--coral); }

.friends-empty { padding: 40px 20px; text-align: center; color: var(--ink-faint); font-size: 13.5px; }

/* Responsive adjustments */
@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-live-list, .sidebar-section-label, .sidebar-user-top { display: none; }
  .app-shell { flex-direction: column; }
  .main { margin-left: 0; padding: 20px; }
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(226, 143, 168, 0.4); }

/* Buttons & Inputs micro-interactions */
.btn { transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.12s cubic-bezier(.34,1.56,.64,1); }
.btn:active { transform: scale(0.96); }

.field input, .chat-input, select.chat-input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .chat-input:focus {
  box-shadow: 0 0 0 3px var(--ember-dim);
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--ember); }

/* Animation Overrides */
.presence-dot { animation: dot-breathe 2.6s ease-in-out infinite; }
@keyframes dot-breathe {
  0%, 100% { opacity: 0.85; box-shadow: 0 0 0 2px var(--surface); }
  50%      { opacity: 1;    box-shadow: 0 0 0 3px var(--surface), 0 0 8px rgba(52, 211, 153, 0.6); }
}

.modal-overlay { transition: opacity 0.18s ease; }
.modal-overlay:not(.visible) { opacity: 0; pointer-events: none; }
.modal-overlay.visible { opacity: 1; animation: overlay-fade-in 0.18s ease; }
.modal-overlay.visible .profile-modal { animation: modal-pop-in 0.22s cubic-bezier(.2,.9,.3,1.2); }

@keyframes overlay-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast { animation: toast-in 0.25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .presence-dot, .modal-overlay, .toast {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================================================
   Trust & Safety Center — public report transparency feed
   Reuses .report-card, .mod-badge and .session-filter-tab(s)
   for visual consistency with the existing moderation UI;
   these rules only add the pieces those don't already cover
   (redacted-identity chips and the "action taken" badges).
   ========================================================= */

.ts-report-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.ts-report-card { margin-bottom: 0; }

.ts-identity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.ts-id-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  background: var(--elevated);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.ts-action-row { margin-top: 8px; }

/* "Action taken" badges — share .mod-badge's base look, distinct colours
   per outcome so the resolution is scannable at a glance. Used both here
   and on the staff-side report cards in the Moderation tab. */
.mod-badge.action-pending { background: var(--elevated); color: var(--ink-faint); }
.mod-badge.action-warning { background: var(--gold-dim); color: var(--gold); }
.mod-badge.action-suspended { background: var(--coral-dim); color: var(--coral); }
.mod-badge.action-banned { background: rgba(226, 105, 95, 0.22); color: var(--coral); }
.mod-badge.action-content_removed { background: var(--ember-dim); color: var(--ember); }
.mod-badge.action-no_action { background: rgba(110, 231, 183, 0.12); color: #6ee7b7; }

/* =========================================================
   Mobile & tablet responsive enhancements

   Additive only — every rule here targets an existing class,
   and everything is scoped inside max-width media queries, so
   nothing here changes the desktop/laptop layout at all. This
   section closes gaps left by the responsive rules above:
   the mobile app-shell nav, header/tab-bar overflow on narrow
   phones, the landing page's hero CTA row, and a couple of
   tight grids/cards.
   ========================================================= */

/* --- Landing page: two hero CTA buttons side by side can
   outgrow a narrow phone screen; let them wrap and go full
   width instead of squeezing or overflowing --------------- */
@media (max-width: 480px) {
  .hero-cta-row { flex-wrap: wrap; }
  .hero-cta-row .btn { width: 100%; text-align: center; }
  .auth-card { padding: 28px 22px; }
}

/* --- App shell: fix the mobile top-nav bar ---------------
   The existing (>860px) rule turns .sidebar into a horizontal
   bar, but .sidebar-nav itself was left in its desktop
   flex-direction:column state, which made the "bar" stack all
   nav items vertically instead of scrolling sideways. This
   restores the intended horizontal, swipeable tab strip. */
@media (max-width: 860px) {
  .sidebar {
    padding: 10px 14px;
    gap: 10px;
  }
  .sidebar-brand {
    flex-shrink: 0;
    padding: 0;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    flex: 1;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 12px;
  }
  /* A left rail reads as a vertical tab strip; in the
     horizontal bar an underline communicates "active" instead. */
  .nav-item.active::before {
    left: 10%;
    right: 10%;
    top: auto;
    bottom: 2px;
    width: auto;
    height: 2px;
  }
}

/* --- Panel headers: let action buttons wrap instead of
   crowding/overflowing next to the title on narrow screens --- */
@media (max-width: 700px) {
  .main-header {
    flex-wrap: wrap;
    row-gap: 12px;
  }
}

/* --- Tab strips: scroll sideways rather than overflow the
   page when there are more tabs than a phone screen can fit
   (moderation has ten tabs) --------------------------------- */
@media (max-width: 700px) {
  .mod-tabs,
  .friends-filter-tabs,
  .session-filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .mod-tab,
  .friends-filter-tab,
  .session-filter-tab {
    flex-shrink: 0;
  }
}

/* --- Moderation search/filter rows: several selects/inputs
   sit side by side with inline max-width hints meant for a
   wide desktop panel — let them stack and go full width --- */
@media (max-width: 700px) {
  .mod-search-row {
    flex-wrap: wrap;
  }
  .mod-search-row input,
  .mod-search-row select {
    max-width: 100% !important;
    flex: 1 1 160px;
  }
}

/* --- Moderation tables: guard against a wide table forcing
   the whole page to scroll horizontally; the table scrolls
   within its own panel instead ------------------------------ */
@media (max-width: 700px) {
  .mod-tab-panel {
    overflow-x: auto;
  }
  .mod-table {
    min-width: 560px;
  }
}

/* --- Friend rows: let the action buttons drop to their own
   line instead of squeezing against a long username --------- */
@media (max-width: 560px) {
  .friend-card {
    flex-wrap: wrap;
  }
  .friend-card .friend-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- Small-phone tightening -------------------------------- */
@media (max-width: 480px) {
  .main {
    padding: 16px;
  }
  .welcome-banner {
    padding: 18px 16px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

/* --- General safety net: an element that's wider than the
   viewport (a stray fixed width, a long unbroken token, etc.)
   should never force the whole page to scroll sideways on a
   phone or tablet — everything above already prevents this
   for the known cases, this is just a backstop. ------------- */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  img, svg, video { max-width: 100%; height: auto; }
}

/* =========================================================
   Emoji picker (community/session/DM/staff chat)
   ========================================================= */
.btn-emoji-toggle {
  flex: 0 0 auto;
  width: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--void);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-emoji-toggle:hover { border-color: var(--ember); background: var(--elevated); }

.vs-emoji-panel {
  position: fixed;
  z-index: 1000;
  width: 320px;
  height: 360px;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  flex-direction: column;
  overflow: hidden;
}

.vs-emoji-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.vs-emoji-search {
  width: 100%;
  padding: 8px 10px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font-body);
}
.vs-emoji-search:focus { border-color: var(--ember); }

.vs-emoji-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.vs-emoji-tab {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.55;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.vs-emoji-tab:hover { background: var(--elevated-hover); opacity: 0.85; }
.vs-emoji-tab.active { background: var(--ember-dim); opacity: 1; }

.vs-emoji-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
}
.vs-emoji-item {
  aspect-ratio: 1;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.vs-emoji-item:hover { background: var(--elevated-hover); transform: scale(1.15); }

.vs-emoji-empty {
  grid-column: 1 / -1;
  padding: 24px 8px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}
