﻿* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
input, textarea, select, button {
  border-radius: 14px;
  border: 1px solid rgba(168, 255, 190, 0.12);
  background: rgba(23, 38, 30, 0.78);
  color: var(--text);
  padding: 11px 13px;
}
button { cursor: pointer; transition: .18s ease; }
button:hover, input:hover, textarea:hover, select:hover { border-color: rgba(168, 255, 190, 0.22); }
button:hover { box-shadow: 0 0 0 1px rgba(132, 220, 99, 0.12) inset, 0 6px 20px rgba(0,0,0,.18); }
button.is-active {
  border-color: rgba(132, 220, 99, 0.35);
  background: linear-gradient(180deg, rgba(115, 196, 88, 0.16), rgba(31, 61, 36, 0.72));
}
.auth-page, .panel-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.panel-page {
  height: 100vh;
  overflow: hidden;
}
.auth-card, .settings-wrap {
  width: min(560px, calc(100vw - 32px));
  padding: 26px;
  border-radius: 24px;
  background: rgba(8, 16, 13, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(22px);
}
.stack-form, .settings-grid { display: grid; gap: 12px; }
.stack-form label, .settings-grid label { display: grid; gap: 6px; }
.checkbox-row { display: flex !important; align-items: center; gap: 10px; }
.error, .success { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.error { background: rgba(255,107,107,.12); color: #ffd7d7; }
.success { background: rgba(71,122,192,.12); color: #d4e4ff; }
.warning { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; background: rgba(255, 196, 87, .14); color: #ffe6a4; border: 1px solid rgba(255, 196, 87, .2); }
.warning-with-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.warning-action-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 196, 87, .3);
  background: rgba(255, 196, 87, .16);
  color: #fff3cc;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .warning-with-action { flex-direction: column; align-items: stretch; }
}
.auth-page-register {
  background:
    radial-gradient(circle at top left, rgba(108, 191, 83, 0.2), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(30, 110, 55, 0.18), transparent 22%),
    linear-gradient(180deg, #060914 0%, #090d1d 100%);
}
.register-auth-card {
  width: min(720px, calc(100vw - 32px));
  padding: 32px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.96), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
}
.register-auth-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.register-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eef2ff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: -0.03em;
}
.register-auth-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(108, 191, 83, 0.28));
}
.register-auth-kicker {
  margin: 0;
  color: #9aa6d9;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.register-auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.register-auth-copy {
  margin: 0;
  max-width: 56ch;
  color: #a9b4de;
  line-height: 1.55;
}
.register-auth-form {
  gap: 14px;
}
.register-field-stack {
  display: grid;
  gap: 0;
}
.register-identity-stack {
  display: grid;
  gap: 1px;
}
.register-password-strength {
  display: grid;
  gap: 8px;
  margin-top: -2px;
}
.register-password-strength-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 27, 53, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.14);
}
.register-password-strength-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .18s ease, background .18s ease;
}
.register-password-strength-bar > span.is-bad {
  background: linear-gradient(90deg, #ff6f91, #ff8a65);
}
.register-password-strength-bar > span.is-ok {
  background: linear-gradient(90deg, #f0b44d, #ffd86b);
}
.register-password-strength-bar > span.is-good {
  background: linear-gradient(90deg, #4478c8, #8ac8f0);
}
.register-password-strength-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #aab4df;
  font-size: .9rem;
}
.register-password-strength-meta strong {
  color: #eef2ff;
  font-size: .92rem;
}
.register-password-match {
  min-height: 20px;
  margin-top: -4px;
  font-size: .9rem;
  color: #aab4df;
}
.register-password-match.is-match {
  color: #8ac8f0;
}
.register-password-match.is-mismatch {
  color: #ff9fb3;
}
.register-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.register-availability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: -6px;
}
.register-availability-status {
  min-height: 18px;
  font-size: .85rem;
  color: #8e99c8;
}
.register-availability-status.is-valid {
  color: #8ac8f0;
}
.register-availability-status.is-invalid {
  color: #ff9fb3;
}
.register-auth-form label {
  color: #d8e8ff;
  font-weight: 600;
}
.register-auth-form input {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(100, 175, 100, 0.16);
  background: rgba(20, 28, 56, 0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.register-auth-form input:focus {
  outline: none;
  border-color: rgba(150, 220, 100, 0.44);
  box-shadow: 0 0 0 4px rgba(108, 191, 83, 0.12);
}
.register-auth-form input.is-valid {
  border-color: rgba(96, 223, 146, 0.58);
  box-shadow: 0 0 0 3px rgba(68, 200, 122, 0.12);
}
.register-auth-form input.is-invalid {
  border-color: rgba(255, 111, 145, 0.58);
  box-shadow: 0 0 0 3px rgba(255, 111, 145, 0.12);
}
.register-date-field {
  position: relative;
}
.register-date-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(100, 175, 100, 0.16);
  background: rgba(20, 28, 56, 0.88);
  color: #eef2ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.register-date-trigger:hover {
  border-color: rgba(150, 220, 100, 0.28);
}
.register-date-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(320px, 100%);
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.18);
  background: rgba(14, 20, 42, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}
.register-time-popover {
  width: min(260px, 100%);
}
.register-date-head,
.register-date-weekdays,
.register-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.register-date-head {
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  margin-bottom: 12px;
}
.register-date-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}
.register-date-select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(100, 175, 100, 0.16);
  background: rgba(20, 28, 56, 0.88);
  color: #eef2ff;
}
.register-date-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.register-date-weekdays {
  margin-bottom: 8px;
}
.register-date-weekdays span {
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: #97a5da;
}
.register-date-cell {
  min-height: 36px;
  padding: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #d8e8ff;
  background: rgba(20, 28, 56, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.1);
  box-shadow: none;
}
.register-date-cell.is-empty {
  background: transparent;
  border-color: transparent;
}
.register-date-cell.is-today {
  border-color: rgba(168, 255, 190, 0.36);
}
.register-date-cell.is-selected {
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  border-color: rgba(168, 255, 190, 0.36);
  color: #fff;
}
.register-time-head {
  margin-bottom: 12px;
  color: #eef2ff;
}
.register-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.register-time-column {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 217, 101, 0.55) rgba(9, 18, 14, 0.82);
}
.register-time-column::-webkit-scrollbar {
  width: 10px;
}
.register-time-column::-webkit-scrollbar-track {
  background: rgba(9, 18, 14, 0.82);
  border-radius: 999px;
}
.register-time-column::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(132,220,99,.82), rgba(57,132,62,.82));
  border-radius: 999px;
  border: 2px solid rgba(9, 18, 14, 0.82);
}
.register-time-column::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(157, 235, 122, 0.96), rgba(76, 169, 82, 0.94));
}
.register-time-cell {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #d8e8ff;
  background: rgba(20, 28, 56, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.1);
}
.register-time-cell.is-selected {
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  border-color: rgba(168, 255, 190, 0.36);
  color: #fff;
}
.event-form-grid .register-date-trigger {
  justify-content: flex-start;
  font: inherit;
}
.register-auth-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(19, 27, 53, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.14);
  color: #aab4df;
  font-size: .92rem;
}
.register-auth-note-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  box-shadow: 0 0 16px rgba(108, 191, 83, 0.4);
}
.register-auth-check {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(19, 27, 53, 0.78);
  border: 1px solid rgba(100, 175, 100, 0.12);
  color: #d6ddff;
}
.register-terms-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d8e8ff;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  box-shadow: none;
}
.register-terms-link:hover {
  color: #fff;
  box-shadow: none;
}
.register-auth-check input {
  min-height: 0;
  accent-color: #4f9eff;
}
.register-terms-modal {
  padding: 18px;
}
.register-terms-card {
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  padding: 24px;
  overflow: hidden;
  display: grid;
  gap: 14px;
}
.register-terms-textarea {
  width: 100%;
  min-height: 420px;
  resize: none;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.14);
  background: rgba(18, 26, 52, 0.82);
  color: #d8e8ff;
  line-height: 1.55;
  white-space: pre-wrap;
}
.register-terms-status {
  color: #aab4df;
  font-size: .92rem;
}
.register-auth-submit {
  min-height: 52px;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  border-color: rgba(168, 255, 190, 0.36);
  box-shadow:
    0 18px 36px rgba(29, 40, 109, 0.38),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.register-auth-submit:hover {
  background: linear-gradient(180deg, rgba(122, 210, 80, 1), rgba(50, 150, 65, 1));
}
.register-auth-switch {
  margin: 16px 0 0;
  color: #9aa6d9;
  text-align: center;
}
.register-auth-switch a {
  color: #d8e8ff;
  font-weight: 700;
}
.auth-page-login {
  background:
    radial-gradient(circle at top left, rgba(108, 191, 83, 0.18), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(30, 110, 55, 0.16), transparent 24%),
    linear-gradient(180deg, #060914 0%, #090d1d 100%);
}
.login-auth-card {
  width: min(620px, calc(100vw - 32px));
  padding: 32px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.96), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
}
.login-auth-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.login-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eef2ff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: -0.03em;
}
.login-auth-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(108, 191, 83, 0.28));
}
.login-auth-kicker {
  margin: 0;
  color: #9aa6d9;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.login-auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.login-auth-copy {
  margin: 0;
  max-width: 50ch;
  color: #a9b4de;
  line-height: 1.55;
}
.login-auth-form {
  gap: 14px;
}
.login-auth-form label {
  color: #d8e8ff;
  font-weight: 600;
}
.login-auth-form input {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(100, 175, 100, 0.16);
  background: rgba(20, 28, 56, 0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.login-auth-form input:focus {
  outline: none;
  border-color: rgba(150, 220, 100, 0.44);
  box-shadow: 0 0 0 4px rgba(108, 191, 83, 0.12);
}
.login-auth-inline-link {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}
.login-auth-text-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #9fb0ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-auth-text-link:hover {
  color: #d8e8ff;
}
.login-auth-check {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(19, 27, 53, 0.78);
  border: 1px solid rgba(100, 175, 100, 0.12);
  color: #d6ddff;
}
.login-auth-check input {
  min-height: 0;
  accent-color: #4f9eff;
}
.login-auth-submit {
  min-height: 52px;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  border-color: rgba(168, 255, 190, 0.36);
  box-shadow:
    0 18px 36px rgba(29, 40, 109, 0.38),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.login-auth-submit:hover {
  background: linear-gradient(180deg, rgba(122, 210, 80, 1), rgba(50, 150, 65, 1));
}
.login-auth-switch {
  margin: 16px 0 0;
  color: #9aa6d9;
  text-align: center;
}
.login-auth-switch a {
  color: #d8e8ff;
  font-weight: 700;
}
.login-auth-modal-card {
  width: min(520px, calc(100vw - 32px));
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.96), rgba(11, 16, 34, 0.98));
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
}
.login-auth-modal-card h2 {
  margin: 6px 0 0;
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.login-auth-modal-form {
  margin-top: 18px;
}
.login-auth-modal-cancel {
  min-height: 48px;
  border-radius: 16px;
  background: rgba(20, 28, 56, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.16);
  color: #d8e8ff;
}
@media (max-width: 700px) {
  .register-auth-card {
    padding: 24px 18px;
    border-radius: 24px;
  }
  .login-auth-card {
    padding: 24px 18px;
    border-radius: 24px;
  }
  .register-auth-grid {
    grid-template-columns: 1fr;
  }
  .register-availability-grid {
    grid-template-columns: 1fr;
  }
  .register-date-controls {
    grid-template-columns: 1fr 88px;
  }
  .register-terms-card {
    padding: 18px;
  }
  .register-terms-textarea {
    min-height: 360px;
  }
}
.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 1200;
  pointer-events: none;
}
.toast {
  min-width: 240px;
  max-width: min(420px, 88vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 22, 18, 0.96);
  border: 1px solid rgba(168,255,190,.14);
  color: #eef0ff;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast.toast-warning {
  background: rgba(56, 44, 10, 0.96);
  border-color: rgba(255, 190, 55, 0.32);
  color: #ffd76a;
}
.toast.toast-error {
  background: rgba(48, 16, 16, 0.96);
  border-color: rgba(255, 107, 107, 0.28);
  color: #ffd7d7;
}
.toast.toast-success {
  background: rgba(13, 35, 21, 0.96);
  border-color: rgba(71, 192, 122, 0.28);
  color: #d5e5ff;
}
.toast.toast-syncora {
  background:
    linear-gradient(135deg, rgba(20, 70, 35, 0.96), rgba(10, 25, 15, 0.98));
  border-color: rgba(168, 255, 190, 0.38);
  color: #f4f7ff;
  box-shadow:
    0 18px 42px rgba(7, 14, 40, 0.42),
    0 0 0 1px rgba(168, 255, 190, 0.14) inset;
 }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: grid;
  grid-template-columns: 320px 1fr 220px;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(168, 255, 190, 0.14);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
}
.topbar-left,
.topbar-brand,
.topbar-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}
.topbar-left { gap: 12px; }
.brand-mark,
.brand-mark-small {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(133, 220, 99, 0.2));
}
.browser-pill {
  min-width: 0;
  max-width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(20, 33, 27, 0.82);
  border: 1px solid rgba(168,255,190,.1);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6889eb, #2d50a0);
}
.browser-url {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.topbar-brand {
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -.03em;
}
.topbar-actions {
  justify-content: flex-end;
  gap: 10px;
}
.top-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(20, 33, 27, 0.82);
  border: 1px solid rgba(168,255,190,.1);
  color: rgba(239, 245, 239, 0.92);
  font-size: 1.1rem;
}
#app {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 94px 420px minmax(0, 1fr) 330px;
  gap: 0;
}
.servers-bar,
.left-panel,
.right-panel,
.main-panel {
  min-height: calc(100vh - 68px);
}
.servers-bar,
.left-panel,
.right-panel {
  background: linear-gradient(180deg, rgba(7, 13, 11, 0.84), rgba(6, 12, 10, 0.7));
  backdrop-filter: blur(20px);
}
.servers-bar {
  border-right: 1px solid rgba(168,255,190,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
}
.logo-box, .server-pill, .server-action {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(42, 70, 55, 0.94), rgba(10, 19, 15, 0.94));
  border: 1px solid rgba(168,255,190,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 12px 24px rgba(0,0,0,.18);
  color: var(--accent);
  font-weight: 800;
}
.logo-box { overflow: hidden; }
.logo-box img { width: 72%; height: 72%; object-fit: contain; }
.server-pill {
  font-size: 1.55rem;
  color: rgba(255,255,255,.86);
  touch-action: none;
  cursor: grab;
  -webkit-user-drag: none;
  user-select: none;
}
.server-pill.active {
  background: radial-gradient(circle at 30% 25%, rgba(101, 192, 78, 0.4), rgba(15, 31, 21, 0.94));
  border-color: rgba(132, 220, 99, 0.28);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.04);
}
.server-pill.is-dragging {
  opacity: .58;
  box-shadow: var(--shadow), 0 0 0 1px rgba(168,255,190,.18);
}
.server-drop-slot {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(132, 220, 99, 0.22), rgba(132, 220, 99, 0.06)),
    rgba(132, 220, 99, 0.08);
  border: 1px dashed rgba(168,255,190,.42);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.1), 0 0 24px rgba(132,220,99,.18);
  animation: channelDropSlotPulse 1s ease-in-out infinite;
}
.is-server-dragging .server-pill:not(.is-dragging),
.is-server-dragging .server-action {
  transition: transform .12s ease, background .18s ease;
}
.server-pill:active,
.server-pill.is-dragging {
  cursor: grabbing;
}
.server-action { margin-top: auto; font-size: 2rem; }
.left-panel, .right-panel { padding: 16px 14px; }
.left-panel { border-right: 1px solid rgba(168,255,190,.08); display: flex; flex-direction: column; gap: 14px; }
.right-panel { border-left: 1px solid rgba(168,255,190,.08); display: flex; flex-direction: column; gap: 14px; }
.server-header,
.panel-section,
.profile-box,
.channel-title,
.voice-toolbar,
.device-selects,
.transfer-log,
.messages,
.message-form,
.member-list-shell,
.user-controls,
.chat-window {
  background: linear-gradient(180deg, rgba(13, 23, 18, 0.86), rgba(9, 17, 13, 0.74));
  border: 1px solid rgba(168,255,190,.09);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 18px 40px rgba(0,0,0,.16);
}
.server-header, .panel-section, .profile-box, .channel-title, .voice-toolbar, .device-selects, .transfer-log, .member-list-shell, .user-controls { padding: 14px; }
.main-panel { padding: 14px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.server-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.server-header strong { font-size: 1.15rem; letter-spacing: .02em; }
.server-header .muted { margin-top: 4px; }
.header-arrow { color: var(--muted); font-size: 1.1rem; }
.panel-section { display: grid; gap: 12px; }
.section-title {
  color: var(--muted-2);
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.social-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.social-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(168,255,190,.1);
  background: rgba(255,255,255,.03);
  color: inherit;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.social-link-card:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(168,255,190,.18);
  transform: translateY(-1px);
}
.social-link-favicon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255,255,255,.05);
}
.social-link-meta {
  min-width: 0;
  display: grid;
}
.social-link-meta strong {
  color: #eef0ff;
  font-size: .92rem;
}
.social-link-url {
  color: var(--muted-2);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-cover-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.game-cover-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.game-cover-art {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(61, 101, 78, 0.9), rgba(19, 33, 26, 0.96));
  border: 1px solid rgba(168,255,190,.08);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #eef0ff;
}
.game-cover-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-cover-title {
  font-size: .76rem;
  line-height: 1.3;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-cover-card:hover .game-cover-art {
  border-color: rgba(168,255,190,.18);
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .game-cover-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.muted { color: var(--muted); font-size: .95rem; }
.muted.small { font-size: .85rem; }
.mini-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.compact-form { margin-top: 4px; }
#channel-list { display: grid; gap: 6px; }
.channel-drop-slot {
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(132, 220, 99, 0.28), rgba(132, 220, 99, 0.08)),
    rgba(132, 220, 99, 0.08);
  border: 1px dashed rgba(168,255,190,.42);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.1), 0 0 24px rgba(132,220,99,.18);
  animation: channelDropSlotPulse 1s ease-in-out infinite;
}
.is-channel-dragging .channel-row:not(.is-dragging) {
  transition: transform .12s ease, background .18s ease;
}
.channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 0;
  transition: .18s ease;
  cursor: grab;
  -webkit-user-drag: none;
  user-select: none;
}
.channel-row.is-dragging {
  opacity: .58;
  box-shadow: var(--shadow), 0 0 0 1px rgba(168,255,190,.18);
  cursor: grabbing;
}
.channel-row.is-locked a {
  color: rgba(241, 247, 242, 0.72);
}
.channel-drag-handle {
  display: none;
}
.channel-row a {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: rgba(241, 247, 242, 0.95);
  font-size: 1.05rem;
  font-weight: 700;
  -webkit-user-drag: none;
  user-select: none;
}
.channel-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}
.channel-name-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.channel-row[data-channel-nsfw="1"] .channel-name-line::after {
  content: "NSFW";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 73, 73, 0.26), rgba(168, 18, 18, 0.4));
  border: 1px solid rgba(255, 108, 108, 0.35);
  color: #ffd6d6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  flex: 0 0 auto;
}
.channel-row .nsfw-badge {
  display: none;
}
.channel-row > a > .channel-name-line {
  flex: 0 1 auto;
}
.channel-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-lock {
  flex: 0 0 auto;
  font-size: .8rem;
  opacity: .82;
}
.channel-voice-presence {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #a9b4c4;
  font-size: .77rem;
  font-weight: 600;
}
.channel-voice-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.channel-voice-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7fe4ff, #2e8dc4);
  box-shadow: 0 0 10px rgba(73, 175, 255, 0.35);
  flex: 0 0 auto;
}
.channel-voice-cam {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  flex: 0 0 auto;
  color: #d6e7ff;
  background: rgba(89, 126, 255, 0.18);
  border: 1px solid rgba(123, 154, 255, 0.22);
}
.channel-voice-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #ff4c63, #d91f44);
  color: #fff;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 8px 18px rgba(217, 31, 68, 0.28);
}
.channel-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.channel-unread-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f9eff, #2d78d6);
  color: #080d18;
  font-size: .78rem;
  font-weight: 800;
}
.channel-edit-btn,
.channel-delete-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-right: 10px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  color: rgba(241, 247, 242, 0.85);
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.channel-row:hover .channel-edit-btn,
.channel-row:hover .channel-delete-btn {
  opacity: 1;
  pointer-events: auto;
}
.channel-edit-btn {
  background: rgba(255,255,255,.05);
  color: rgba(241, 247, 242, 0.85);
}
.channel-edit-btn:hover {
  background: rgba(100, 175, 100, 0.2);
  color: #dbe3ff;
}
.channel-delete-btn:hover {
  background: rgba(255, 107, 107, 0.18);
  color: #ff9b9b;
}
.channel-row.active,
.channel-row:hover {
  background: linear-gradient(90deg, rgba(108, 191, 83, 0.26), rgba(47, 92, 51, 0.1));
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.12);
}
.channel-symbol {
  width: 18px;
  display: inline-flex;
  justify-content: center;
  color: #d2d8f0;
}
@keyframes channelDropSlotPulse {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}
.channel-add {
  color: var(--muted);
  margin-left: auto;
  font-size: 1.6rem;
  line-height: 1;
}
.tag {
  margin-left: auto;
  font-size: .68rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,107,107,.15);
  color: #ffc3c3;
}
.nsfw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 73, 73, 0.26), rgba(168, 18, 18, 0.4));
  border: 1px solid rgba(255, 108, 108, 0.35);
  color: #ffd6d6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.profile-box { margin-top: auto; }
.avatar-line, .member-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
}
.avatar-line-wrap {
  position: relative;
  padding-right: 78px;
}
.avatar-line {
  position: relative;
}
.avatar-line-actions {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-42%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.conn-status-tooltip {
  position: fixed;
  z-index: 9100;
  width: 300px;
  background: rgba(6, 9, 22, 0.97);
  border: 1px solid rgba(100, 175, 100, 0.22);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.72);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
}
.conn-status-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cst-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(210, 220, 255, 0.9);
  margin-bottom: 12px;
}
.cst-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}
.cst-row:last-child { margin-bottom: 0; }
.cst-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(160, 185, 255, 0.55);
  line-height: 1;
}
.cst-label {
  flex: 1;
  font-size: 0.71rem;
  color: rgba(190, 205, 255, 0.72);
  white-space: nowrap;
}
.cst-bar-track {
  flex-shrink: 0;
  width: 72px;
  height: 4px;
  border-radius: 2px;
  position: relative;
  background: repeating-linear-gradient(
    to right,
    rgba(255,255,255,.09) 0px, rgba(255,255,255,.09) 5px,
    transparent 5px, transparent 8px
  );
  overflow: hidden;
}
.cst-bar-fill {
  position: absolute;
  left: 0; top: 0;
  width: calc(var(--cst-fill, 1) * 100%);
  height: 100%;
  border-radius: 2px;
  background: repeating-linear-gradient(
    to right,
    #4aaede 0px, #4aaede 5px,
    transparent 5px, transparent 8px
  );
  transition: width .4s ease, background .4s ease;
}
.cst-bar-fill.is-warn {
  background: repeating-linear-gradient(
    to right, #facc15 0px, #facc15 5px, transparent 5px, transparent 8px
  );
}
.cst-bar-fill.is-bad {
  background: repeating-linear-gradient(
    to right, #f87171 0px, #f87171 5px, transparent 5px, transparent 8px
  );
}
.cst-value {
  flex-shrink: 0;
  width: 72px;
  font-size: 0.71rem;
  font-weight: 700;
  color: #dde6ff;
  text-align: right;
}
.status-menu-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(20, 28, 56, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.status-menu-btn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6b93f0, #2d5db0);
  box-shadow: 0 0 12px rgba(131, 230, 110, 0.42);
}
.status-menu-btn.is-afk .status-menu-btn-dot {
  background: radial-gradient(circle at 30% 30%, #8fc1ff, #2d6fd6);
  box-shadow: 0 0 12px rgba(96, 161, 255, 0.5);
}
.status-menu-btn.is-invisible .status-menu-btn-dot {
  background: radial-gradient(circle at 30% 30%, #ff8b8b, #9e3030);
  box-shadow: 0 0 12px rgba(255,107,107,.35);
}
.voice-disconnect-btn {
  position: static;
  transform: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ff5a5a;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  padding: 0;
  transition: transform 0.16s ease, color 0.16s ease;
}
.voice-disconnect-btn:hover,
.voice-disconnect-btn:focus-visible {
  transform: scale(1.14);
  color: #ff7d7d;
  outline: none;
}
.profile-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.profile-actions a, .ghost-link {
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(168,255,190,.08);
  color: var(--muted);
  font-weight: 700;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, rgba(28, 37, 72, 0.98), rgba(18, 25, 52, 0.96));
  border: 1px solid rgba(126, 140, 228, 0.22);
  box-shadow: 0 0 0 1px rgba(126, 140, 228, 0.1) inset;
}
.avatar.placeholder {
  background:
    radial-gradient(circle at 30% 20%, rgba(148, 160, 255, 0.42), transparent 34%),
    linear-gradient(180deg, rgba(36, 48, 92, 0.96), rgba(22, 31, 61, 0.94));
}
.user-hero {
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(109, 186, 82, 0.24), rgba(28, 56, 34, 0.82));
  border: 1px solid rgba(132,220,99,.12);
}
.user-controls {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.control-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: #f4f4f7;
}
.channel-title {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.channel-head-left,
.channel-head-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.channel-pin-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.channel-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
}
.channel-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6b93f0, #2d5db0);
  box-shadow: 0 0 12px rgba(131, 230, 110, 0.45);
}
.channel-pins-toggle {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(207, 216, 208, 0.72);
  cursor: pointer;
}
.channel-pins-toggle svg {
  width: 32px;
  height: 32px;
}
.channel-pins-toggle:hover {
  color: #f1f5ff;
}
.channel-pins-toggle[aria-expanded="true"] {
  color: #dbe7ff;
}
.channel-pins-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 40px));
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(157, 184, 255, 0.24);
  background: linear-gradient(180deg, rgba(19, 31, 78, 0.98), rgba(11, 19, 49, 0.99));
  box-shadow:
    0 24px 60px rgba(5, 10, 32, 0.42),
    0 0 0 1px rgba(157, 184, 255, 0.08) inset;
  z-index: 45;
}
.channel-pins-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.channel-pins-list {
  display: grid;
  gap: 10px;
}
.channel-pins-empty {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(157, 184, 255, 0.22);
  color: #c7d5ff;
  background: rgba(102, 132, 255, 0.08);
}
.channel-pin-item {
  border: 1px solid rgba(157, 184, 255, 0.16);
  background: rgba(110, 136, 255, 0.08);
  color: inherit;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.channel-pin-item:hover {
  border-color: rgba(157, 184, 255, 0.3);
  background: rgba(88, 116, 237, 0.16);
}
.channel-pin-item-layout {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
}
.channel-pin-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.channel-pin-item-content {
  min-width: 0;
}
.channel-pin-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.channel-pin-item-head strong {
  color: #f4f6ff;
  font-size: .92rem;
}
.channel-pin-item-head span {
  color: rgba(211, 223, 255, 0.68);
  font-size: .75rem;
  white-space: nowrap;
}
.channel-pin-item-body {
  margin-top: 7px;
  color: #d7e2ff;
  font-size: .84rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.channel-pin-item-body-rich {
  margin-top: 7px;
  color: #d7e2ff;
  font-size: .84rem;
  line-height: 1.45;
}
.channel-pin-item-body-rich .message-body-rich {
  display: block;
}
.channel-pin-poll {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(84, 148, 255, 0.18);
  background: linear-gradient(180deg, rgba(11, 20, 45, 0.72), rgba(8, 16, 35, 0.82));
}
.channel-pin-poll-badge {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #4da2ff;
}
.channel-pin-poll-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.channel-pin-poll-option {
  display: grid;
  gap: 4px;
}
.channel-pin-poll-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.channel-pin-poll-option-label {
  min-width: 0;
  color: #dce7ff;
  font-size: .72rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-pin-poll-option-percent,
.channel-pin-poll-meta {
  color: rgba(189, 210, 255, 0.82);
  font-size: .64rem;
  white-space: nowrap;
}
.channel-pin-poll-option-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(36, 64, 124, 0.92);
}
.channel-pin-poll-option-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2aa4ff, #1d79ff);
}
.channel-pin-poll-meta {
  margin-top: 8px;
}
.channel-pin-item-attachments {
  margin-top: 8px;
}
.channel-pin-item-attachments .message-attachment,
.channel-pin-item-attachments .message-audio-player,
.channel-pin-item-attachments .message-video-player,
.channel-pin-item-attachments .image-preview {
  max-width: min(280px, 100%);
}
.channel-pin-item-attachments .message-attachment {
  margin-top: 0;
}
.channel-pin-item-attachments .message-audio-attachment,
.channel-pin-item-attachments .message-video-player {
  margin-top: 0;
}
@media (max-width: 920px) {
  .channel-pins-panel {
    top: calc(100% + 8px);
    right: -10px;
    width: min(380px, calc(100vw - 24px));
    max-height: min(70vh, 420px);
    padding: 12px;
    border-radius: 16px;
  }

  .channel-pins-head {
    margin-bottom: 8px;
  }

  .channel-pins-list {
    gap: 8px;
  }

  .channel-pins-empty,
  .channel-pin-item {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .channel-pin-item-layout {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .channel-pin-item-avatar {
    width: 36px;
    height: 36px;
  }

  .channel-pin-item-head {
    gap: 8px;
  }

  .channel-pin-item-head strong,
  .channel-pin-item-body,
  .channel-pin-item-body-rich {
    font-size: .82rem;
  }

  .channel-pin-item-head span {
    font-size: .72rem;
  }

  .channel-pin-item-attachments .message-attachment,
  .channel-pin-item-attachments .message-audio-player,
  .channel-pin-item-attachments .message-video-player,
  .channel-pin-item-attachments .image-preview {
    max-width: min(240px, 100%);
  }
}
.chat-window {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.chat-window.chat-window-drop-active {
  border-color: rgba(168,255,190,.45);
  box-shadow: inset 0 0 0 1px rgba(168,255,190,.18), 0 18px 40px rgba(0,0,0,.16);
  background: linear-gradient(180deg, rgba(18, 34, 24, 0.92), rgba(11, 22, 16, 0.82));
}
.messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  align-content: start;
  gap: 18px;
}
.message {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  transition: background .18s ease, box-shadow .18s ease;
}
.message.is-highlight {
  background: rgba(132, 220, 99, 0.08);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.12);
  border-radius: 16px;
}
.message .avatar { width: 56px; height: 56px; }
.message .bubble {
  background: transparent;
  border: 0;
  padding: 2px 0 0;
  overflow: visible;
}
.message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  overflow: visible;
}
.message-head-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.message-head-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  overflow: visible;
  z-index: 5;
}
.message-time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(168,255,190,.08);
  color: #c6cbd6;
  font-size: .72rem;
  line-height: 1;
}
.message-edited-label {
  color: rgba(207, 216, 208, 0.58);
  font-size: .82rem;
  font-weight: 500;
}
.message-action-btn {
  border: 0;
  background: transparent;
  color: rgba(207, 216, 208, 0.7);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.message-action-btn:hover {
  color: #ff8b8b;
}
.message-action-btn.message-pin-trigger:hover,
.message-action-btn.message-pin-trigger.is-active {
  color: #e7dc8b;
}
.message-action-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 24px;
}
.message-pin-flash {
  animation: messagePinFlash 1.35s ease;
}
@keyframes messagePinFlash {
  0% { background: rgba(242, 223, 121, 0); }
  25% { background: rgba(242, 223, 121, 0.14); }
  100% { background: rgba(242, 223, 121, 0); }
}
.message-reaction-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  top: auto;
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  z-index: 30;
  background: rgba(14, 20, 42, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.42), 0 0 0 1px rgba(117, 133, 255, 0.08), 0 0 30px rgba(89, 115, 255, 0.1);
}
.message-reaction-floating {
  position: fixed;
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  z-index: 1200;
  background: rgba(14, 20, 42, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.42), 0 0 0 1px rgba(117, 133, 255, 0.08), 0 0 30px rgba(89, 115, 255, 0.1);
}
.message-reaction-floating.is-dm-picker {
  position: absolute;
  z-index: 220;
}
.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.message-reaction-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  border: 1px solid rgba(100, 175, 100, 0.16);
  background: linear-gradient(180deg, rgba(20, 28, 56, 0.88), rgba(16, 23, 48, 0.86));
  color: #eef2ff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.message-reaction-chip:hover,
.message-reaction-chip.is-active {
  border-color: rgba(94, 166, 255, 0.78);
  background: linear-gradient(180deg, rgba(14, 34, 84, 0.92), rgba(8, 22, 58, 0.94));
  box-shadow: 0 0 0 1px rgba(81, 157, 255, 0.16) inset, 0 14px 30px rgba(5, 18, 52, 0.26);
}
.message-reaction-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 140px;
  max-width: 240px;
  padding: 8px 10px;
  display: none;
  background: rgba(20, 27, 54, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.18);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(4, 8, 24, 0.38);
  color: #dbe1ff;
  font-size: .8rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  z-index: 80;
  pointer-events: none;
  backdrop-filter: blur(10px);
}
.message-reaction-chip:hover .message-reaction-tooltip,
.message-reaction-chip:focus-visible .message-reaction-tooltip {
  display: block;
}
.message-reaction-image,
.message-reaction-native {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}
.message-reaction-image {
  object-fit: contain;
}
.message-reaction-native {
  font-size: 24px;
  line-height: 1;
}
.message-reaction-count {
  font-size: .82rem;
  font-weight: 700;
  color: inherit;
}
.message-reaction-chip.is-active .message-reaction-count {
  color: #cfe0ff;
}
.message-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.message strong {
  font-size: 1rem;
  color: var(--accent);
}
.message-time {
  color: rgba(207, 216, 208, 0.7);
  font-size: .9rem;
}
.message-text { font-size: 1rem; color: rgba(239,244,239,.96); }
.message .image-preview {
  max-width: min(460px, 100%);
  border-radius: 18px;
  display: block;
  margin-top: 12px;
  border: 1px solid rgba(168,255,190,.1);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  cursor: zoom-in;
}
.message-attachment-grid {
  --attachment-grid-columns: 2;
  width: min(460px, 100%);
  display: grid;
  grid-template-columns: repeat(var(--attachment-grid-columns), minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.message-attachment-grid-item {
  min-width: 0;
}
.message-attachment-grid .image-preview {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-top: 0;
}
.message-body-rich {
  display: block;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
}
.message-poll {
  width: min(460px, 100%);
  margin-top: 10px;
  padding: 12px 10px 8px;
}
.message-poll-title {
  text-align: center;
  font-size: clamp(1rem, 2.8vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 0.95;
  color: #46a0ff;
  text-shadow: 0 0 26px rgba(36, 126, 255, 0.16);
}
.message-poll-divider {
  margin: 6px auto 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.message-poll-divider span {
  height: 1px;
  background: linear-gradient(90deg, rgba(39, 121, 255, 0), rgba(39, 121, 255, 0.82), rgba(39, 121, 255, 0));
}
.message-poll-divider i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #4ca7ff 0%, #1f77ff 72%, rgba(31, 119, 255, 0.18) 100%);
  box-shadow: 0 0 18px rgba(41, 132, 255, 0.42);
}
.message-poll-question {
  margin: 0 auto;
  max-width: 400px;
  font-size: clamp(.8rem, 1.2vw, .98rem);
  font-weight: 800;
  color: #f5f8ff;
  line-height: 1.25;
  text-align: center;
}
.message-poll-meta {
  margin-top: 15px;
  color: #9cb8ea;
  font-size: .7rem;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.message-poll-options {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}
.message-poll-option {
  position: relative;
  width: 100%;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(44, 128, 255, 0.72);
  background: linear-gradient(180deg, rgba(9, 24, 62, 0.86), rgba(6, 18, 48, 0.88));
  color: #eef2ff;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}
.message-poll-option[disabled] {
  cursor: default;
}
.message-poll-option:hover:not([disabled]) {
  border-color: rgba(94, 166, 255, 0.9);
  background: linear-gradient(180deg, rgba(14, 34, 84, 0.92), rgba(8, 22, 58, 0.94));
  box-shadow: 0 0 0 1px rgba(81, 157, 255, 0.18) inset, 0 16px 34px rgba(5, 18, 52, 0.3);
}
.message-poll-option.is-selected {
  border-color: rgba(94, 166, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(81, 157, 255, 0.22) inset, 0 18px 38px rgba(5, 18, 52, 0.34);
}
.message-poll-option.is-winner {
  border-color: rgba(120, 210, 255, 1);
  background: linear-gradient(180deg, rgba(18, 52, 110, 0.97), rgba(10, 34, 82, 0.97));
  box-shadow: 0 0 0 1px rgba(100, 190, 255, 0.28) inset, 0 0 22px rgba(60, 160, 255, 0.22), 0 18px 38px rgba(5, 18, 52, 0.4);
}
.message-poll-option.is-winner .message-poll-option-label {
  color: #d0eeff;
}
.message-poll-option.is-winner .message-poll-option-percent {
  color: #70d0ff;
}
.message-poll-option.is-winner .message-poll-option-ring {
  border-color: #50c0ff;
  box-shadow: 0 0 6px rgba(60, 180, 255, 0.5);
}
.message-poll-option.is-winner .message-poll-option-fill {
  background: linear-gradient(90deg, #40c8ff, #2898ff);
  box-shadow: 0 0 22px rgba(60, 180, 255, 0.45);
}
.message-poll-option.is-winner .message-poll-option-votes {
  color: #80c8ef;
}
.message-poll-winner-badge {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, rgba(14, 44, 100, 0.95), rgba(8, 28, 72, 0.97));
  border: 1px solid rgba(100, 190, 255, 0.55);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #90dfff;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(60, 170, 255, 0.35);
  width: fit-content;
  margin: 0 auto;
}
.message-poll-option-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 10px 9px 8px;
}
.message-poll-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.message-poll-option-label {
  font-size: clamp(.74rem, 1vw, .9rem);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.message-poll-option-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.message-poll-option-percent {
  font-size: clamp(.78rem, 1vw, .92rem);
  font-weight: 900;
  color: #2d89ff;
}
.message-poll-option-ring {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #1e73ff;
  box-shadow: 0 0 0 1px rgba(56, 136, 255, 0.2) inset;
}
.message-poll-option.is-selected .message-poll-option-ring {
  background: radial-gradient(circle at 50% 50%, rgba(48, 138, 255, 0.18) 0%, rgba(48, 138, 255, 0.18) 44%, transparent 46%);
}
.message-poll-option-bar {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.message-poll-option-bar-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(26, 57, 116, 0.96);
}
.message-poll-option-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2aa4ff, #1d79ff);
  box-shadow: 0 0 18px rgba(35, 134, 255, 0.24);
}
.message-poll-option-votes {
  font-size: .56rem;
  font-weight: 700;
  color: #8eaedf;
  white-space: nowrap;
}
.message-poll-voted-badge {
  margin-top: 8px;
  color: #d7e4ff;
  font-size: .7rem;
  text-align: center;
}
@media (max-width: 720px) {
  .message-poll {
    width: 100%;
    padding: 10px 8px 8px;
    border-radius: 14px;
  }
  .message-poll-divider {
    gap: 6px;
    margin: 8px auto 10px;
  }
  .message-poll-options {
    gap: 10px;
    margin-top: 15px;
  }
  .message-poll-option {
    border-radius: 14px;
  }
  .message-poll-option-content {
    gap: 8px;
    padding: 10px;
  }
  .message-poll-option-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .message-poll-option-right {
    width: 100%;
    justify-content: space-between;
  }
}
.message-edit-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  margin-top: 4px;
}
.message-link {
  color: #8c9be8;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.message-embed {
  margin-top: 4px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(168,255,190,.1);
  background: rgba(6, 12, 10, 0.92);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  max-width: min(560px, 100%);
}
.message-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 315px;
  border: 0;
  display: block;
}
.message-embed-tiktok {
  max-width: min(360px, 100%);
}
.message-embed-tiktok iframe {
  aspect-ratio: 9 / 16;
  max-height: 640px;
}
.message-embed-launch {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 640px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 20px;
  cursor: pointer;
  color: #eef0ff;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.08), transparent 45%),
    linear-gradient(160deg, rgba(28, 14, 19, .96), rgba(11, 10, 14, .98));
}
.message-embed-launch-badge {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.message-embed-launch-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 1.6rem;
}
.message-embed-launch-text {
  font-size: .95rem;
  font-weight: 700;
}
.message-embed-hanime {
  max-width: min(560px, 100%);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.06), transparent 42%),
    linear-gradient(160deg, rgba(40, 10, 18, .96), rgba(14, 10, 12, .98));
  text-decoration: none;
}
.link-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  width: 100%;
  max-width: min(420px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.14);
  background: linear-gradient(180deg, rgba(18, 24, 49, 0.96), rgba(13, 19, 39, 0.92));
  box-shadow: 0 16px 32px rgba(0,0,0,.2);
}
.link-preview-card.is-loading {
  min-height: 76px;
}
.discord-link-preview {
  gap: 0;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(18, 24, 49, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  max-width: min(420px, 100%);
}
.discord-link-preview::before {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #4f9eff, #4f5df1);
}
.discord-link-preview:hover {
  border-color: rgba(118, 140, 255, 0.28);
  box-shadow: 0 16px 28px rgba(0,0,0,.22);
}
.link-preview-thumb {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(100, 175, 100, 0.12);
  aspect-ratio: 1.91 / 1;
}
.discord-link-preview-thumb {
  border: 0;
  border-top: 1px solid rgba(100, 175, 100, 0.1);
  border-radius: 0;
  aspect-ratio: auto;
  max-height: 180px;
}
.link-preview-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.link-preview-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px;
}
.link-preview-meta strong {
  font-size: .92rem;
  line-height: 1.2;
}
.link-preview-meta .muted {
  line-height: 1.35;
  font-size: .84rem;
}
.link-preview-title {
  color: #eef2ff;
}
.link-preview-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-preview-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aab4df;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.link-preview-url {
  color: #8ea0d8;
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-preview-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  background: rgba(255,255,255,.04);
}
.discord-link-preview-thumb img {
  max-height: 180px;
}
.image-lightbox {
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(98, 114, 255, 0.18), transparent 38%),
    rgba(0, 0, 0, 0.82);
  z-index: 180;
}
.image-lightbox-card {
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 92vh;
  padding: 18px;
  border-radius: 24px;
  background: rgba(14, 20, 42, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 28px 90px rgba(0,0,0,.52), 0 0 0 1px rgba(117, 133, 255, 0.1), 0 0 40px rgba(89, 115, 255, 0.12);
}
.image-lightbox-card img {
  max-width: min(88vw, 1360px);
  max-height: calc(92vh - 36px);
  display: block;
  border-radius: 16px;
}
.image-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.avatar-cropper-modal {
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(132, 220, 99, 0.14), transparent 38%), rgba(0, 0, 0, 0.78);
  z-index: 185;
}
.avatar-cropper-card {
  width: min(460px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 24px;
  background: rgba(8, 16, 13, 0.96);
  border: 1px solid rgba(168,255,190,.12);
  box-shadow: var(--shadow), var(--glow);
}
.avatar-cropper-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 14px auto;
  overflow: hidden;
  border-radius: 50%;
  background: #050611;
  border: 1px solid rgba(168,255,190,.18);
  box-shadow: inset 0 0 0 999px rgba(0,0,0,.06), 0 16px 36px rgba(0,0,0,.32);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.avatar-cropper-stage:active {
  cursor: grabbing;
}
.avatar-cropper-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  pointer-events: none;
}
.avatar-cropper-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), inset 0 0 36px rgba(0,0,0,.28);
  pointer-events: none;
}
.avatar-cropper-zoom {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}
.avatar-cropper-zoom input {
  width: 100%;
}
.peer-cinema-lightbox {
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(98, 114, 255, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.88);
  z-index: 190;
}
.peer-cinema-card {
  width: min(96vw, 1500px);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(14, 20, 42, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.18);
  box-shadow: 0 28px 90px rgba(0,0,0,.58), 0 0 0 1px rgba(117, 133, 255, 0.1), 0 0 40px rgba(89, 115, 255, 0.12);
}
.peer-cinema-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
}
.peer-cinema-kicker {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.peer-cinema-title {
  color: #f4f6ff;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
}
.peer-cinema-media {
  position: relative;
  min-height: min(72vh, 820px);
  width: min(100%, calc((94vh - 92px) * 16 / 9));
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}
.peer-cinema-media video {
  width: 100%;
  height: 100%;
  max-height: calc(94vh - 92px);
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s ease;
}
.peer-cinema-media.has-camera-video video {
  object-fit: contain;
}
.peer-cinema-media.has-camera-video {
  aspect-ratio: 16 / 9;
}
.peer-cinema-media.has-screen-video video {
  object-fit: contain;
}
.peer-cinema-media video.has-stream {
  opacity: 1;
}
.peer-cinema-media .peer-stream-view {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  width: 100%;
  height: 100%;
  background: #000;
}
.peer-cinema-media .peer-stream-video {
  max-height: none;
  opacity: 1;
  object-fit: contain;
}
.peer-cinema-avatar {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: radial-gradient(circle at center, rgba(21, 30, 42, 0.92), #000 72%);
}
.peer-cinema-avatar.is-visible {
  display: grid;
}
.peer-cinema-avatar .peer-avatar {
  position: static;
  width: clamp(108px, 18vw, 220px);
  height: clamp(108px, 18vw, 220px);
  transform: none;
}
.peer-cinema-avatar .peer-avatar-fallback {
  font-size: clamp(3rem, 9vw, 7rem);
}
.peer-cinema-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: clamp(44px, 5vw, 64px);
  height: clamp(58px, 8vw, 88px);
  padding: 0;
  transform: translateY(-50%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(9, 17, 13, 0.62);
  color: #f4f6ff;
  display: grid;
  place-items: center;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0,0,0,.34);
  transition: background .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease;
}
.peer-cinema-nav:hover {
  background: rgba(20, 34, 27, 0.92);
  border-color: rgba(168,255,190,.28);
  transform: translateY(-50%) scale(1.04);
}
.peer-cinema-nav[hidden] {
  display: none;
}
.peer-cinema-prev {
  left: 18px;
}
.peer-cinema-next {
  right: 18px;
}
.peer-cinema-close {
  position: static;
  flex: 0 0 auto;
}
.message-form {
  margin: 0 14px 14px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}
.composer-input {
  min-width: 0;
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  padding: 0 4px;
  font-size: 1rem;
  color: rgba(239,244,239,.96);
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}
.composer-input:focus { outline: none; }
.composer-input:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.composer-hidden-input { display: none; }
.composer-emoji-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 4px;
  vertical-align: -0.7em;
}
.composer-emoji-chip img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.composer-emoji-chip-native {
  font-size: 48px;
  line-height: 48px;
  text-align: center;
}
.message-form input[type="file"] { max-width: 150px; }
.attach-btn,
.message-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.chat-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(260px, calc(100vw - 32px));
  padding: 8px;
  display: grid;
  gap: 6px;
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  box-shadow: 0 22px 44px rgba(4, 8, 24, 0.42), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
  z-index: 60;
}
.chat-attach-option {
  width: 100%;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.04);
  background: transparent;
  text-align: left;
  color: #eef2ff;
}
.chat-attach-option:hover {
  border-color: rgba(100, 175, 100, 0.22);
  background: linear-gradient(180deg, rgba(98, 114, 255, 0.18), rgba(26, 34, 72, 0.92));
  box-shadow: 0 0 0 1px rgba(108, 191, 83, 0.12) inset, 0 10px 24px rgba(9, 16, 42, 0.24);
}
.chat-attach-option-title {
  font-size: .95rem;
  font-weight: 800;
}
.chat-attach-option-copy {
  font-size: .78rem;
  color: #b8c2f2;
}
.slash-autocomplete {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(320px, calc(100vw - 32px));
  padding: 8px;
  display: grid;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  box-shadow: 0 22px 44px rgba(4, 8, 24, 0.42), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
  z-index: 60;
  max-height: 200px;
  overflow-y: auto;
}
.slash-autocomplete-item {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  background: transparent;
  text-align: left;
  color: #eef2ff;
  cursor: pointer;
  font-size: .9rem;
}
.slash-autocomplete-item.is-active,
.slash-autocomplete-item:hover {
  border-color: rgba(100, 175, 100, 0.22);
  background: linear-gradient(180deg, rgba(98, 114, 255, 0.18), rgba(26, 34, 72, 0.92));
  box-shadow: 0 0 0 1px rgba(108, 191, 83, 0.12) inset, 0 10px 24px rgba(9, 16, 42, 0.24);
}
.slash-autocomplete-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.slash-autocomplete-label {
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.slash-autocomplete-desc {
  font-size: .78rem;
  color: #b8c2f2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poll-modal-overlay {
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 24, 0.48);
  backdrop-filter: blur(8px);
}
.poll-modal-card {
  width: min(560px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid rgba(100, 175, 100, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
}
.poll-form {
  display: grid;
  gap: 16px;
}
.poll-field {
  display: grid;
  gap: 8px;
}
.poll-field > span,
.poll-options-head > span {
  font-size: .82rem;
  font-weight: 700;
  color: #b8c2f2;
  letter-spacing: .02em;
}
.poll-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.poll-options-list {
  display: grid;
  gap: 10px;
}
.poll-option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.poll-option-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 80px;
  flex: 0 0 80px;
}
.poll-option-remove-btn,
.poll-option-add-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}
.poll-option-add-placeholder {
  width: 36px;
  height: 36px;
  display: inline-block;
  visibility: hidden;
  flex: 0 0 36px;
}
.poll-option-row.is-minimum .poll-option-remove-btn {
  visibility: hidden;
}

.gif-picker-toggle {
  min-width: 44px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gif-picker-modal-card {
  width: min(760px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid rgba(100, 175, 100, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(11, 16, 34, 0.98)),
    linear-gradient(135deg, rgba(108, 191, 83, 0.08), transparent 30%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(108, 191, 83, 0.08) inset;
}

.gif-picker-shell {
  display: grid;
  gap: 14px;
}

.gif-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.gif-picker-search {
  min-width: 0;
}

.gif-picker-search-btn,
.gif-picker-load-more {
  min-width: 110px;
}

.gif-picker-status {
  min-height: 22px;
  font-size: 0.84rem;
  color: #b8c2f2;
}

.gif-picker-grid {
  min-height: 320px;
  max-height: min(62dvh, 620px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 217, 101, 0.55) rgba(9, 18, 14, 0.82);
}

.gif-picker-grid::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.gif-picker-grid::-webkit-scrollbar-track {
  background: rgba(9, 18, 14, 0.82);
  border-radius: 999px;
}

.gif-picker-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(132,220,99,.82), rgba(57,132,62,.82));
  border-radius: 999px;
  border: 2px solid rgba(9, 18, 14, 0.82);
}

.gif-picker-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(157, 235, 122, 0.96), rgba(76, 169, 82, 0.94));
}

.gif-picker-grid.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9dabdf;
  border: 1px dashed rgba(100, 175, 100, 0.22);
  border-radius: 18px;
  background: rgba(12, 18, 38, 0.56);
}

.gif-picker-card {
  position: relative;
  width: 100%;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(100, 175, 100, 0.16);
  background: linear-gradient(180deg, rgba(24, 32, 63, 0.96), rgba(14, 19, 39, 0.94));
}

.gif-picker-card:hover,
.gif-picker-card:focus-visible {
  border-color: rgba(136, 150, 255, 0.36);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(136, 150, 255, 0.22);
}

.gif-picker-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: 220px;
  object-fit: cover;
  background: rgba(9, 12, 24, 0.8);
}

.gif-picker-card-title {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(7, 10, 19, 0.1), rgba(7, 10, 19, 0.82));
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gif-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gif-picker-attribution {
  color: #93a0d6;
  font-size: 0.78rem;
}

.gif-picker-attribution a {
  color: #cfd8ff;
}
.poll-form input[type="text"] {
  border: 1px solid rgba(100, 175, 100, 0.18);
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.92), rgba(9, 14, 31, 0.94));
  color: #eef2ff;
}
.poll-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid rgba(100, 175, 100, 0.18);
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.92), rgba(9, 14, 31, 0.94));
  color: #eef2ff;
  background-image:
    linear-gradient(180deg, rgba(11, 18, 38, 0.92), rgba(9, 14, 31, 0.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b8c2f2' d='M6 8 .8 1.6 2.2 0 6 4.6 9.8 0 11.2 1.6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 14px center;
  background-size: auto, 12px 8px;
  padding-right: 42px;
  color-scheme: dark;
}
.poll-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(122, 210, 80, 0.58);
  box-shadow: 0 0 0 3px rgba(98, 114, 255, 0.16);
}
.poll-form select:focus {
  outline: none;
  border-color: rgba(122, 210, 80, 0.58);
  box-shadow: 0 0 0 3px rgba(98, 114, 255, 0.16);
}
.poll-form select option {
  background: #0c1633;
  color: #eef2ff;
}
.poll-option-remove-btn,
.poll-option-add-btn,
.poll-form .modal-footer-right button {
  border-color: rgba(100, 175, 100, 0.22);
  background: linear-gradient(180deg, rgba(16, 24, 50, 0.96), rgba(10, 16, 35, 0.98));
  color: #eef2ff;
}
.poll-option-remove-btn:hover,
.poll-option-add-btn:hover,
.poll-form .modal-footer-right button:hover {
  border-color: rgba(122, 210, 80, 0.42);
  background: linear-gradient(180deg, rgba(98, 114, 255, 0.2), rgba(26, 34, 72, 0.92));
  box-shadow: 0 0 0 1px rgba(108, 191, 83, 0.14) inset, 0 10px 24px rgba(9, 16, 42, 0.24);
}
.poll-form .modal-footer-right button[type="submit"] {
  border-color: rgba(108, 191, 83, 0.36);
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  color: #f7f9ff;
  box-shadow: 0 16px 34px rgba(43, 61, 167, 0.34);
}
.poll-form .modal-footer-right button[type="submit"]:hover {
  border-color: rgba(122, 210, 80, 0.58);
  background: linear-gradient(180deg, rgba(122, 210, 80, 1), rgba(50, 150, 65, 1));
  box-shadow: 0 18px 38px rgba(43, 61, 167, 0.38);
}
.gif-badge {
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  color: #eef0ff;
}
.voice-toolbar,
.device-selects,
.transfer-log { margin-bottom: 12px; }
.voice-toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.voice-toolbar-popover-wrap { position: relative; display: flex; }
.voice-toolbar button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}
.voice-toolbar button i {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free" !important;
  font-size: 1.2rem;
  font-weight: 900;
}
#voice-whiteboard-toggle img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.voice-toolbar button.is-stream-active {
  border-color: rgba(255, 88, 88, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 88, 88, 0.2), 0 12px 28px rgba(139, 20, 20, 0.24);
}
.device-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.device-field { display: grid; gap: 6px; }
.device-field label { font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.device-help { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.voice-status { margin: 0 0 12px; color: var(--muted); padding: 0 4px; }
.peer-actions,
.vol-wrap,
.kino-btn,
.fs-btn {
  display: none !important;
}
.peer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.peer-card {
  background: linear-gradient(180deg, rgba(23,35,29,.98), rgba(17,26,22,.98));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  min-height: 250px;
  transition: .18s ease;
}
.peer-card.cinema { grid-column: 1 / -1; }
.peer-card.speaking { border-color: rgba(132, 220, 99, 0.32); box-shadow: var(--glow); }
.peer-card video {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 14px;
  background: #000;
  object-fit: cover;
  position: relative;
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity .18s ease;
}
.peer-media-wrap.has-video video {
  opacity: 1;
}
.peer-media-wrap.has-camera-video video {
  object-fit: contain;
}
.peer-media-wrap {
  position: relative;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  max-height: min(42vh, 320px);
  border-radius: 14px;
  background: #000;
}
.peer-stream-view {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #000;
}
.peer-stream-view.hidden {
  display: none;
}
.peer-stream-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  pointer-events: auto;
  border-radius: 0;
  opacity: 1;
  position: relative;
  z-index: 7;
}
.peer-media-wrap.has-stream-view .peer-stream-view {
  display: grid;
}
.peer-media-wrap.has-stream-view .peer-stream-video {
  display: block !important;
  opacity: 1 !important;
}
.peer-stream-status {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: #eef0ff;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(6, 10, 9, 0.12), rgba(6, 10, 9, 0.5));
  pointer-events: none;
}
.peer-stream-status.hidden {
  display: none;
}
.peer-stream-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 8;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(176, 30, 30, 0.94);
  border: 1px solid rgba(255, 170, 170, 0.42);
  color: #fff5f5;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}
.peer-stream-live-badge.hidden {
  display: none;
}
.peer-avatar-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  transform: translateZ(0);
  opacity: 0.75;
  transition: opacity .18s ease;
}
.peer-card.speaking .peer-avatar-overlay {
  opacity: 1;
}
.peer-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
  background: rgba(7, 12, 9, 0.92);
}
.peer-avatar-status {
  position: absolute;
  left: 50%;
  bottom: calc(50% - 58px);
  transform: translateX(-50%);
  min-width: 58px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(9, 17, 13, 0.84);
  color: #eef0ff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.peer-avatar-status.is-live {
  background: rgba(25, 89, 54, 0.92);
  border-color: rgba(104, 225, 141, 0.34);
  color: #d5eeff;
}
.peer-avatar-status.is-muted {
  background: rgba(82, 61, 18, 0.92);
  border-color: rgba(255, 191, 86, 0.3);
  color: #ffe3a5;
}
.peer-avatar-status.is-deaf {
  background: rgba(63, 22, 34, 0.94);
  border-color: rgba(255, 111, 145, 0.32);
  color: #ffd4df;
}
.peer-avatar-status.is-connecting {
  background: rgba(24, 32, 64, 0.9);
  border-color: rgba(157, 184, 255, 0.28);
  color: #eef1ff;
}
.peer-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #f4f6ff;
}
.peer-media-wrap.has-video .peer-avatar-overlay {
  opacity: 0;
}
.peer-media-wrap.has-stream-view .peer-avatar-overlay {
  opacity: 0;
}
.peer-media-wrap.has-stream-view .peer-gear-btn,
.peer-media-wrap.has-stream-view .peer-media-mute-btn,
.peer-media-wrap.has-stream-view .peer-soundboard-preview {
  display: none !important;
}
.peer-card.has-stream-view .peer-cinema-btn,
.peer-media-wrap.has-stream-view .peer-fullscreen-btn {
  z-index: 9;
}
.peer-soundboard-preview {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(9, 17, 13, 0.88);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  z-index: 4;
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.peer-soundboard-preview.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.peer-soundboard-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.peer-soundboard-preview-fallback {
  font-size: .82rem;
  font-weight: 800;
  color: #eef0ff;
}
.peer-fullscreen-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(9, 17, 13, 0.72);
  color: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}
.peer-cinema-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(9, 17, 13, 0.72);
  color: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}
.peer-media-mute-btn {
  position: absolute;
  right: 54px;
  bottom: 10px;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(9, 17, 13, 0.72);
  color: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease, border-color .16s ease;
}
.peer-media-mute-btn.is-active {
  background: rgba(96, 31, 31, 0.88);
  border-color: rgba(255, 132, 132, 0.45);
}
.peer-vol-wrap {
  position: absolute;
  left: 10px;
  right: 54px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 17, 13, 0.72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 0 10px;
  height: 36px;
  overflow: hidden;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}
.peer-vol-icon {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(238,243,239,.75);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 28px;
  text-align: right;
}
.peer-vol-slider {
  flex: 1;
  align-self: center;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  padding: 1px 1px;
}
.peer-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -4.5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #eef0ff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.peer-vol-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #eef0ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.peer-media-wrap:hover .peer-vol-wrap,
.peer-media-wrap:focus-within .peer-vol-wrap {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.peer-gear-btn {
  position: absolute;
  right: 54px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(9, 17, 13, 0.72);
  color: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}
.peer-media-wrap.has-screen-audio .peer-gear-btn {
  right: 104px;
}
.peer-media-wrap.has-video:hover .peer-media-mute-btn,
.peer-card.has-stream-view:hover .peer-cinema-btn,
.peer-media-wrap:hover .peer-fullscreen-btn,
.peer-media-wrap:hover .peer-gear-btn,
.peer-media-wrap.has-video:focus-within .peer-media-mute-btn,
.peer-card.has-stream-view:focus-within .peer-cinema-btn,
.peer-media-wrap:focus-within .peer-fullscreen-btn,
.peer-media-wrap:focus-within .peer-gear-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.peer-media-mute-btn:hover,
.peer-cinema-btn:hover,
.peer-gear-btn:hover,
.peer-fullscreen-btn:hover {
  background: rgba(20, 34, 27, 0.92);
}
.peer-empty { color: var(--muted); padding-top: 8px; }
.peer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.peer-main { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; }
.peer-badges { display: flex; align-items: center; gap: 8px; }
.peer-badge { font-size: .72rem; line-height: 1; border-radius: 999px; padding: 6px 8px; background: rgba(39,64,52,.7); color: var(--muted); }
.talk-dot { width: 10px; height: 10px; padding: 0; background: #282532; }
.vol-slider { width: 100px; padding: 0; background: transparent; border: 0; }
.transfer-log { min-height: 80px; }
.transfer-modal-card { width: min(520px, 92vw); }
.voice-whiteboard-card {
  width: min(1280px, 96vw);
  height: min(860px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.voice-whiteboard-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #b8c2f2;
  font-size: .82rem;
}
.voice-whiteboard-host {
  min-height: 0;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(10, 14, 28, 0.94);
  border: 1px solid rgba(100, 175, 100, 0.12);
}
.voice-whiteboard-host:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: 0;
  background: #0b1020;
}
.voice-whiteboard-host:fullscreen .voice-whiteboard-frame {
  width: 100%;
  height: 100%;
}
.voice-whiteboard-shadow-host {
  display: block;
  width: 100%;
  height: 100%;
}
.voice-whiteboard-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
.voice-whiteboard-loading {
  height: 100%;
  display: grid;
  place-items: center;
  color: #d8e4ff;
  font-size: .95rem;
}
.transfer-log-modal { min-height: 0; max-height: 52vh; overflow: auto; }
.transfer-request-card { width: min(460px, 92vw); }
.transfer-request-body { display: grid; gap: 18px; }
.stream-config-card {
  width: min(560px, 92vw);
}
.stream-config-body {
  display: grid;
  gap: 14px;
}
.stream-config-row {
  display: grid;
  gap: 8px;
}
.stream-config-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.stream-config-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.stream-config-input {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.stream-config-copy-btn {
  min-width: 74px;
}
.stream-config-live-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(20, 32, 26, 0.72);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.stream-config-live-status.is-live {
  background: rgba(148, 26, 26, 0.92);
  border-color: rgba(255, 140, 140, 0.35);
  color: #fff1f1;
}
.stream-config-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stream-config-settings-card {
  max-width: 760px;
}
.stream-config-settings-card .stream-config-input {
  background: rgba(8, 14, 28, 0.92);
}
.stream-config-settings-card .stream-config-actions {
  justify-content: flex-start;
}
.stream-config-divider {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 4px 0 2px;
  background: rgba(255,255,255,.1);
}
.transfer-request-text {
  color: #eef1ff;
  font-size: 1rem;
  line-height: 1.5;
}
.transfer-request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.transfer-request-btn {
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}
.transfer-request-btn.is-decline {
  background: rgba(21, 28, 24, 0.92);
  border-color: rgba(168,255,190,.12);
  color: #d7e7db;
}
.transfer-request-btn.is-accept {
  background: linear-gradient(180deg, #2f71bf, #2160a0);
  border-color: #1b4d90;
  color: #040a18;
}
#device-modal .transfer-modal-card { width: min(680px, 94vw); }
#voice-whiteboard-modal .voice-whiteboard-card {
  width: min(1920px, 85vw);
  height: min(1080px, 85vw);
}
#device-modal #device-selects {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
}
.device-inline-slider {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.device-inline-slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.device-inline-slider-row label {
  color: #eef1ff;
  font-size: .92rem;
  font-weight: 700;
}
.device-inline-slider output {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
.device-inline-slider input[type="range"] {
  width: 100%;
}
.device-inline-meter {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #0d1018;
  border: 1px solid #22253a;
}
.device-inline-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2f71bf, #738dd9);
  transition: width .08s linear, background .12s ease;
}
.device-inline-meter-fill.is-speaking {
  background: linear-gradient(90deg, #4f9eff, #7ad4ff);
}
.device-inline-meter-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 8px rgba(255,255,255,.28);
  left: 12%;
  transform: translateX(-50%);
}
.device-inline-meter-status {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.member-list-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.member-list-shell .section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#member-list { display: grid; gap: 8px; overflow: auto; }
.member-group { display: grid; gap: 8px; }
.member-group + .member-group { margin-top: 10px; }
.member-group-title {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.member-group-list { display: grid; gap: 8px; }
.member-card {
  padding: 12px;
  border-radius: 18px;
  transition: .18s ease;
}
.member-card:hover {
  background: rgba(132, 220, 99, 0.08);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.08);
}
.member-card.is-highlight {
  background: linear-gradient(135deg, rgba(109, 186, 82, 0.22), rgba(28, 56, 34, 0.82));
  border: 1px solid rgba(132,220,99,.12);
  box-shadow: var(--glow);
}
.member-meta strong { display: block; font-size: 1rem; }
.member-status { color: var(--muted); margin-top: 2px; }
.member-status.is-afk { color: #7fb7ff; }
.member-unread-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f9eff, #2d78d6);
  color: #080d18;
  font-size: .78rem;
  font-weight: 800;
  margin-left: auto;
  margin-right: 10px;
  flex: 0 0 auto;
}
.online-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6be87a, #27a63a);
  box-shadow: 0 0 12px rgba(131, 230, 110, 0.42);
  margin-left: auto;
  flex: 0 0 auto;
}
.online-dot.is-afk {
  background: radial-gradient(circle at 30% 30%, #8fc1ff, #2d6fd6);
  box-shadow: 0 0 12px rgba(96, 161, 255, 0.5);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: center;
  z-index: 100;
}
.modal .card, .menu {
  background: rgba(8, 16, 13, 0.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  width: min(460px, calc(100vw - 32px));
  box-shadow: var(--shadow), var(--glow);
}
.modal.hidden { display: none; }
.hidden { display: none !important; }
.menu { position: fixed; top: 0; left: 0; width: 180px; display: grid; gap: 8px; }
.empty-state { margin: auto; color: var(--muted); }
.empty-state-server-entry {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.empty-state-plus {
  margin-top: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-indent: 0;
}
.empty-state-plus > span {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -56%);
  line-height: 1;
  display: block;
}
.channel-unlock-view {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
.channel-unlock-card {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(108, 191, 83, 0.16), transparent 46%),
    rgba(14, 20, 42, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}
.channel-unlock-card h2,
.channel-unlock-card p {
  margin: 0;
}
.channel-unlock-card label {
  display: grid;
  gap: 8px;
  color: #e8edff;
  font-weight: 700;
}
.channel-unlock-card input[type="password"] {
  margin-top: 2px;
}
.channel-unlock-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(22, 30, 59, 0.84);
  border: 1px solid rgba(150, 220, 100, 0.2);
  font-size: 1.8rem;
}
.channel-unlock-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.22);
  color: #ffc4c4;
  font-weight: 700;
}
.simple-list { margin: 0; padding-left: 18px; color: var(--muted); }
.events-modal-overlay {
  padding: 20px;
}
.events-modal-card,
.event-create-card,
.event-detail-card {
  width: min(960px, calc(100vw - 32px));
  max-height: min(88vh, 980px);
  overflow: auto;
}
.events-modal-actions,
.event-create-footer,
.event-create-footer-right,
.event-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.event-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
}
.event-card.is-preview {
  cursor: default;
}
.event-card-cover,
.event-detail-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
}
.event-card-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.event-card-body,
.event-detail-copy,
.event-create-form,
.event-detail-body,
.event-detail-panel,
.event-attendee-list {
  display: grid;
  gap: 12px;
}
.event-card-meta,
.event-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .88rem;
}
.event-card h3,
.event-detail-copy h3,
.event-card p {
  margin: 0;
}
.event-card-time {
  font-weight: 700;
}
.event-step-indicator {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.event-step-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
}
.event-step-chip.is-active {
  color: #080d18;
  background: #9bb0f0;
  border-color: transparent;
}
.event-step {
  display: none;
}
.event-step.is-active,
.event-form-grid,
.event-detail-grid {
  display: grid;
}
.event-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.event-preview-card {
  display: grid;
}
.event-create-footer {
  justify-content: space-between;
}
.event-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
}
.event-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.event-detail-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.event-attendee-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 1400px) {
  #app { grid-template-columns: 94px 380px minmax(0, 1fr) 290px; }
  .topbar { grid-template-columns: 280px 1fr 180px; }
}
@media (max-width: 1200px) {
  #app { grid-template-columns: 94px 380px minmax(0, 1fr); }
  .right-panel { display: none; }
}
@media (max-width: 920px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-brand { justify-content: flex-start; font-size: 1.6rem; }
  .topbar-left { display: none; }
  #app { grid-template-columns: 94px 1fr; }
  .left-panel { display: none; }
  .message-form { grid-template-columns: auto 1fr auto; }
  .message-form input[type="file"], .gif-badge, #message-send { display: none; }
  .event-form-grid,
  .event-detail-hero,
  .event-detail-grid {
    grid-template-columns: 1fr;
  }
}

.hidden-form { display: none; }
.hidden-form.is-open { display: grid; }
.server-dropdown-anchor { position: relative; }
.server-events-toolbar {
  padding: 0 14px 14px;
}
.server-events-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(168,255,190,.14);
  background: linear-gradient(135deg, rgba(43,91,72,.92), rgba(15,28,24,.96));
  color: #f3f8ff;
  font-weight: 700;
}
.server-events-btn.is-primary {
  width: auto;
  min-width: 148px;
  background: linear-gradient(135deg, #6c8bdf, #2d5890);
  color: #060f21;
  border-color: rgba(255,255,255,.18);
}
.server-title-wrap { min-width: 0; flex: 1 1 auto; }
.header-icon-btn,
.header-arrow-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.header-icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.server-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(8,16,13,.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.server-menu.hidden { display: none; }
.server-menu button { text-align: left; }
.channels-header-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.mini-circle-btn, .plus-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 700;
}
.plus-circle {
  margin-top: auto;
  font-size: 2rem;
  color: var(--accent);
}
.message-form-pretty { display: flex; }
.message-form-pretty {
  position: relative;
}
.emoji-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.dm-lock-wrap {
  position: relative;
  display: flex;
  align-items: center;
  order: 2;
}
.chat-lock-wrap {
  order: 2;
}
.message-form #message-send {
  order: 3;
}
.dm-form #dm-send { order: 3; }
.dm-lock-wrap .message-icon-btn.is-active {
  background: rgba(104, 224, 141, 0.18);
  border-color: rgba(168,255,190,.28);
  color: #f4f6ff;
}
.dm-lock-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(280px, calc(100vw - 40px));
  padding: 14px;
  border-radius: 18px;
  background: rgba(8, 16, 13, 0.98);
  border: 1px solid rgba(168,255,190,.14);
  box-shadow: var(--shadow), 0 18px 44px rgba(0,0,0,.32);
  z-index: 45;
}
.dm-lock-label {
  display: block;
  margin-bottom: 8px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dm-lock-input {
  width: 100%;
  margin-bottom: 10px;
}
.dm-lock-actions {
  display: flex;
  gap: 10px;
}
.dm-lock-primary,
.dm-lock-secondary {
  flex: 1 1 0;
  border-radius: 12px;
}
.dm-lock-status {
  margin-top: 10px;
  font-size: .86rem;
  color: var(--muted);
}
.locked-message {
  display: grid;
  gap: 10px;
  padding: 6px 0;
}
.locked-message-title {
  font-weight: 800;
  color: #f4f6ff;
}
.locked-message-hint {
  color: var(--muted);
}
.locked-message-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.locked-message-form input {
  flex: 1 1 auto;
  min-width: 0;
}
.locked-message-form button {
  flex: 0 0 auto;
}
.locked-message-error {
  color: #ff9a9a;
  font-size: .86rem;
}
.emoji-picker-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(744px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  overflow: hidden;
  background: rgba(8, 16, 13, 0.98);
  border: 1px solid rgba(168,255,190,.14);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 18px 44px rgba(0,0,0,.32);
  z-index: 40;
}
.emoji-picker-section-title {
  grid-column: 1 / -1;
  margin: 4px 0 2px;
  padding: 0 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.emoji-picker-item {
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(22,35,29,.82);
  border: 1px solid rgba(168,255,190,.08);
}
.emoji-picker-item:hover,
.emoji-picker-item:focus-visible {
  border-color: rgba(168,255,190,.24);
  background: rgba(31, 51, 41, 0.95);
  transform: translateY(-1px);
}
.emoji-picker-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.emoji-picker-item-native span {
  display: block;
  font-size: 2rem;
  line-height: 1;
}
.emoji-picker-empty {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(22,35,29,.82);
  color: var(--muted);
  text-align: center;
  font-size: .92rem;
}
.voice-soundboard-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(744px, calc(100vw - 40px));
  max-height: min(420px, 60vh);
  box-sizing: border-box;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  overflow-y: auto;
  background: rgba(8, 16, 13, 0.98);
  border: 1px solid rgba(168,255,190,.14);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 18px 44px rgba(0,0,0,.32);
  z-index: 40;
}
.voice-gaming-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(520px, calc(100vw - 40px));
  max-height: min(420px, 60vh);
  box-sizing: border-box;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  overflow-y: auto;
  background: rgba(8, 16, 13, 0.98);
  border: 1px solid rgba(168,255,190,.14);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 18px 44px rgba(0,0,0,.32);
  z-index: 40;
}
.voice-soundboard-title {
  grid-column: 1 / -1;
  margin: 2px 2px 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.voice-soundboard-entry {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
}
.voice-soundboard-item {
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(22,35,29,.82);
  border: 1px solid rgba(168,255,190,.08);
}
.voice-soundboard-item:hover,
.voice-soundboard-item:focus-visible {
  border-color: rgba(168,255,190,.24);
  background: rgba(31, 51, 41, 0.95);
  transform: translateY(-1px);
}
.voice-soundboard-art {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(9, 17, 13, 0.9);
  border: 1px solid rgba(255,255,255,.08);
}
.voice-soundboard-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.voice-soundboard-art-fallback {
  font-size: 1rem;
  font-weight: 800;
  color: rgba(239,244,239,.96);
}
.voice-soundboard-tag {
  width: 64px;
  box-sizing: border-box;
  padding: 0 2px;
  color: rgba(239,244,239,.96);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.voice-gaming-entry {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
}
.voice-toolbar .voice-gaming-item {
  width: 100px;
  height: 56px;
  padding: 0;
  display: grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(22,35,29,.82);
  border: 1px solid rgba(168,255,190,.08);
}
.voice-toolbar .voice-gaming-item:hover,
.voice-toolbar .voice-gaming-item:focus-visible {
  border-color: rgba(168,255,190,.24);
  background: rgba(31, 51, 41, 0.95);
  transform: translateY(-1px);
}
.voice-gaming-art {
  width: 100px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  background: rgba(9, 17, 13, 0.9);
  border: 1px solid rgba(255,255,255,.08);
}
.voice-gaming-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.voice-gaming-art-fallback {
  font-size: 1.9rem;
}
.voice-gaming-tag {
  width: 100px;
  color: rgba(239,244,239,.96);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.gaming-overlay-modal {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 8, 6, 0.72);
}
.gaming-overlay-shell {
  width: min(1200px, calc(100vw - 48px));
  height: min(1000px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10,22,17,.98), rgba(7,15,12,.98));
  border: 1px solid rgba(168,255,190,.14);
  box-shadow: var(--shadow), 0 28px 68px rgba(0,0,0,.42);
}
.gaming-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gaming-overlay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gaming-overlay-kicker {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.gaming-overlay-title-wrap h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}
.gaming-overlay-close {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 800;
}
.gaming-overlay-fullscreen {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
}
.gaming-overlay-frame-wrap {
  display: grid;
  place-items: center;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(5, 11, 9, 0.92);
  border: 1px solid rgba(255,255,255,.06);
}
.gaming-overlay-frame {
  position: relative;
  width: min(1160px, calc(100% - 24px));
  height: min(905px, calc(100% - 24px));
  margin: 0 auto;
  flex: none;
  border: 0;
  display: block;
  overflow: hidden;
  background: #070d18;
  outline: none;
}
.gaming-overlay-frame:fullscreen,
.gaming-overlay-frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}
.gaming-overlay-frame:focus,
.gaming-overlay-frame:focus-visible {
  outline: none;
  box-shadow: none;
}
.overlay-error {
  position: absolute;
  inset: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(113, 23, 28, 0.92);
  border: 1px solid rgba(255, 143, 143, 0.4);
  color: #fff2f2;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
}
.file-picker-btn {
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.file-name-pill {
  min-width: 150px;
  max-width: 220px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168,255,190,.1);
  background: rgba(22,35,29,.82);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-attachment {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(168,255,190,.1);
  background: rgba(16, 28, 22, 0.9);
  color: #dfe3f3;
  font-weight: 600;
  max-width: min(460px, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
.download-card {
    gap: 12px;
    width: min(360px, 100%);
    white-space: normal;
    text-decoration: none;
  }
.download-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 42px;
    background: linear-gradient(180deg, rgba(168,255,190,.22), rgba(78,190,117,.14));
    border: 1px solid rgba(168,255,190,.16);
    color: #f2f4ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
  }
.download-card-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
  }
.download-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
.download-card-action {
    color: #9aabd9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .upload-progress {
    margin: 0 14px 14px;
    padding: 10px 12px;
    border-radius: 16px;
  background: rgba(12, 22, 18, 0.82);
  border: 1px solid rgba(168,255,190,.08);
}
.upload-progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}
.upload-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f9eff, #2d78d6);
  transition: width .12s linear;
}
.upload-progress-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: .85rem;
}
.message-audio-attachment {
  margin-top: 12px;
}
.message-audio-filename {
  margin-bottom: 6px;
  color: #d7defc;
  font-size: .85rem;
  font-weight: 700;
  word-break: break-word;
}
.message-audio-player,
.message-video-player {
  width: min(460px, 100%);
  display: block;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(168,255,190,.1);
  background: rgba(10, 18, 14, 0.96);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.message-audio-player {
  padding: 6px;
}
.message-video-player {
  overflow: hidden;
}
.member-action-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  pointer-events: none;
}
.member-action-menu-box {
  width: 240px;
  display: grid;
  gap: 8px;
  position: fixed;
  inset: auto;
  pointer-events: auto;
  z-index: 141;
  visibility: hidden;
  opacity: 0;
}
.server-join-card { width: min(760px, calc(100vw - 32px)); }
.server-modal-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.modal-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 8px; }
.modal-title-row h2 { margin: 0; }
.modal-footer-right { margin-top: 14px; display:flex; justify-content:flex-end; }
.server-settings-card { width: min(1180px, calc(100vw - 48px)); padding: 18px; }
.server-settings-shell { display:grid; grid-template-columns: 250px minmax(0,1fr); gap: 18px; min-height: 620px; }
.settings-side-nav {
  border-right: 1px solid rgba(168,255,190,.08);
  padding-right: 16px;
  display:grid;
  align-content:start;
  gap: 8px;
}
.settings-tab { text-align:left; }
.settings-tab.is-active { background: linear-gradient(90deg, rgba(108,191,83,.26), rgba(47,92,51,.1)); }
.account-settings-side-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.settings-version-status {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(23,38,30,.78);
  border: 1px solid rgba(168,255,190,.12);
}
.settings-version-status-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8f9aa5;
}
.settings-version-status-value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #f3f6ff;
}
.settings-version-status-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #a9b1c7;
}
.danger-tab, .danger-btn { border-color: rgba(255,107,107,.25); color: #ffd0d0; }
.settings-pages { min-width:0; }
.settings-page { display:none; }
.settings-page.is-active { display:block; }
.settings-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,190,55,.08);
  border: 1px solid rgba(255,190,55,.12);
  color: #f2ddb4;
}
.invite-copy-row { display:flex; gap: 10px; align-items:center; }
.invite-code-box {
  flex:1;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(23,38,30,.78);
  border: 1px solid rgba(168,255,190,.12);
  font-weight: 700;
  letter-spacing: .08em;
}
.server-invite-card {
  width: min(680px, calc(100vw - 32px));
}
.invite-modal-note {
  margin-top: 0;
}
.invite-expiry-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: .92rem;
}
.settings-list-card, .table-shell, .danger-box {
  background: rgba(12,21,17,.78);
  border: 1px solid rgba(168,255,190,.08);
  border-radius: 18px;
  padding: 14px;
}
.empty-row { color: var(--muted); }
.settings-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 0;
}
.settings-row + .settings-row { border-top: 1px solid rgba(168,255,190,.08); }
.row-actions { display:flex; gap: 8px; }
.access-pills { display:flex; gap:8px; flex-wrap:wrap; }
.access-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(168,255,190,.08);
  color: var(--muted);
  font-size: .86rem;
}
.access-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(108, 191, 83, 0.18), rgba(72, 199, 82, 0.14));
  border: 1px solid rgba(150, 220, 100, 0.28);
  color: #d8e4ff;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.settings-table { width:100%; border-collapse: collapse; }
.settings-table th, .settings-table td {
  text-align:left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(168,255,190,.08);
}
.table-user-cell { display:flex; align-items:center; gap: 10px; }
.avatar-xs { width: 32px; height:32px; }
.online-dot.is-offline {
  background: radial-gradient(circle at 30% 30%, #ff8b8b, #9e3030);
  box-shadow: 0 0 12px rgba(255,107,107,.35);
}
.compact-stack { max-width: 420px; }
.role-editor-grid { grid-template-columns: 1fr auto; align-items:end; }
@media (max-width: 1100px) {
  .server-settings-shell { grid-template-columns: 1fr; }
  .settings-side-nav { border-right: 0; padding-right: 0; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); }
  .settings-slider-row { grid-template-columns: 1fr; }
  .settings-slider-row output { text-align: left; }
}
@media (max-width: 920px) {
  .server-modal-grid { grid-template-columns: 1fr; gap: 16px; }
  .message-form-pretty { display: flex; }
  .file-picker-btn, .file-name-pill { display:none; }
  .emoji-picker-panel {
    right: auto;
    left: 0;
  }
}


.settings-modal-overlay {
  padding: 32px;
  background: radial-gradient(circle at 50% 0%, rgba(82, 156, 84, 0.16), transparent 32%), rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  align-items: center;
}
.server-join-card {
  width: min(820px, calc(100vw - 48px));
  max-height: min(520px, calc(100vh - 48px));
  padding: 24px;
  border-radius: 28px;
  overflow: auto;
}
.server-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
  align-items: start;
}
.server-settings-card {
  width: min(1360px, calc(100vw - 48px));
  height: min(900px, calc(100vh - 48px));
  max-height: min(900px, calc(100vh - 48px));
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(6, 14, 11, 0.98), rgba(4, 10, 8, 0.96));
  border: 1px solid rgba(168,255,190,.12);
  box-shadow: 0 28px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(132,220,99,.08), 0 0 40px rgba(89,181,86,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.server-settings-topbar {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(168,255,190,.08);
  margin-bottom: 18px;
  flex: 0 0 auto;
}
.settings-kicker, .page-kicker {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-2);
  font-weight: 800;
}
.settings-main-title {
  margin: 6px 0 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -.03em;
}
.modal-close-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display:grid;
  place-items:center;
  border-radius: 14px;
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(255,255,255,.03);
  flex: 0 0 auto;
}
.event-detail-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: #eef1ff;
  flex: 0 0 auto;
}
.modal-icon-btn svg {
  width: 20px;
  height: 20px;
}
.modal-icon-btn.is-danger {
  color: #ffd4d4;
  border-color: rgba(255, 107, 107, 0.22);
  background: rgba(120, 28, 34, 0.2);
}
.server-settings-shell {
  display:grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.settings-side-nav {
  border-right: 1px solid rgba(168,255,190,.08);
  padding-right: 18px;
  display:grid;
  align-content:start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}
.settings-tab {
  min-height: 50px;
  padding: 13px 14px;
  text-align:left;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(18,31,25,.92), rgba(12,22,18,.86));
  border: 1px solid rgba(168,255,190,.1);
}
.settings-tab.is-active {
  background: linear-gradient(90deg, rgba(110, 196, 84, 0.24), rgba(34, 67, 40, 0.96));
  border-color: rgba(132,220,99,.24);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.08), 0 10px 24px rgba(0,0,0,.18);
}
.danger-tab {
  margin-top: 6px;
  background: linear-gradient(180deg, rgba(41,17,17,.9), rgba(23,10,10,.88));
}
.settings-pages {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.settings-content-frame {
  min-height: 0;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10,19,15,.7), rgba(6,12,10,.5));
  border: 1px solid rgba(168,255,190,.08);
  padding: 24px;
  overflow: auto;
}
.settings-page { display:none; }
.settings-page.is-active { display:block; }
.modal-title-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 18px;
}
.modal-title-row h2 {
  margin: 6px 0 0;
  font-size: 1.9rem;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.settings-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,190,55,.1), rgba(94,64,16,.12));
  border: 1px solid rgba(255,190,55,.14);
  color: #f0ddb9;
  max-width: 720px;
}
.settings-page .stack-form,
.settings-page .table-shell,
.settings-page .settings-list-card,
.settings-page .danger-box {
  max-width: 100%;
}
.settings-page label {
  font-weight: 600;
  color: rgba(239,244,239,.92);
}
.settings-page input[type="file"] {
  padding: 12px;
}
.invite-copy-row {
  display:flex;
  gap: 12px;
  align-items:center;
  margin-top: 4px;
}
.invite-code-box {
  flex:1;
  min-height: 48px;
  display:flex;
  align-items:center;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16,28,22,.96), rgba(10,20,16,.86));
  border: 1px solid rgba(168,255,190,.12);
  font-weight: 800;
  letter-spacing: .08em;
}
.settings-list-card, .table-shell, .danger-box {
  background: linear-gradient(180deg, rgba(11,20,16,.88), rgba(8,15,12,.74));
  border: 1px solid rgba(168,255,190,.08);
  border-radius: 20px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.account-delete-card {
  width: min(520px, calc(100vw - 32px));
}
.account-delete-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.account-delete-cancel {
  min-height: 44px;
}
.settings-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
}
.row-actions button, .invite-copy-row button, .danger-btn {
  min-height: 44px;
}
.table-shell { overflow:auto; }
.settings-table {
  width: 100%;
  border-collapse: collapse;
}
.settings-table th {
  color: var(--muted-2);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.settings-table th, .settings-table td {
  text-align:left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(168,255,190,.08);
  vertical-align: middle;
}
.invite-list-url {
  max-width: 100%;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92rem;
  line-height: 1.45;
}
.invite-list-actions {
  width: 72px;
  text-align: right;
}
.invite-delete-btn {
  margin-left: auto;
}
.settings-table tbody tr:hover {
  background: rgba(255,255,255,.02);
}
.modal-footer-right {
  margin-top: 18px;
  display:flex;
  justify-content:flex-end;
  padding-top: 18px;
  border-top: 1px solid rgba(168,255,190,.08);
  flex: 0 0 auto;
}
.server-settings-card,
.server-join-card,
.settings-side-nav,
.settings-content-frame,
.table-shell {
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 217, 101, 0.55) rgba(9, 18, 14, 0.82);
}
.server-settings-card::-webkit-scrollbar,
.server-join-card::-webkit-scrollbar,
.settings-side-nav::-webkit-scrollbar,
.settings-content-frame::-webkit-scrollbar,
.table-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.server-settings-card::-webkit-scrollbar-track,
.server-join-card::-webkit-scrollbar-track,
.settings-side-nav::-webkit-scrollbar-track,
.settings-content-frame::-webkit-scrollbar-track,
.table-shell::-webkit-scrollbar-track {
  background: rgba(9, 18, 14, 0.82);
  border-radius: 999px;
}
.server-settings-card::-webkit-scrollbar-thumb,
.server-join-card::-webkit-scrollbar-thumb,
.settings-side-nav::-webkit-scrollbar-thumb,
.settings-content-frame::-webkit-scrollbar-thumb,
.table-shell::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(132,220,99,.82), rgba(57,132,62,.82));
  border-radius: 999px;
  border: 2px solid rgba(9, 18, 14, 0.82);
}
.server-settings-card::-webkit-scrollbar-thumb:hover,
.server-join-card::-webkit-scrollbar-thumb:hover,
.settings-side-nav::-webkit-scrollbar-thumb:hover,
.settings-content-frame::-webkit-scrollbar-thumb:hover,
.table-shell::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(151,233,120,.9), rgba(71,152,76,.9));
}
@media (max-width: 1100px) {
  .server-settings-card { width: min(100vw - 24px, 1080px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); padding: 16px; }
  .server-settings-shell { grid-template-columns: 1fr; gap: 16px; }
  .settings-side-nav { border-right: 0; padding-right: 0; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
  .settings-content-frame { padding: 18px; }
}
@media (max-width: 700px) {
  .settings-modal-overlay { padding: 12px; }
  .server-settings-card { width: calc(100vw - 24px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); border-radius: 22px; }
  .server-settings-topbar { padding-bottom: 14px; margin-bottom: 14px; }
  .settings-main-title { font-size: 1.45rem; }
  .settings-content-frame { padding: 14px; border-radius: 18px; }
  .modal-title-row h2 { font-size: 1.4rem; }
  .invite-copy-row { flex-direction: column; align-items: stretch; }
}



/* modal sizing + overflow fix */
.settings-modal-overlay {
  padding: 28px;
  overflow: hidden;
}

.server-join-card {
  width: min(980px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.server-modal-grid {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.server-modal-grid > form {
  min-width: 0;
}

.server-settings-card {
  width: min(1500px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
  height: min(920px, calc(100vh - 56px));
  max-height: calc(100vh - 56px);
}

.account-settings-card {
  width: min(960px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.account-settings-card.server-settings-card {
  width: min(1180px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: hidden;
}
.devtool-modal-card {
  width: min(1520px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  height: min(940px, calc(100vh - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
}
.devtool-modal-frame-wrap {
  min-height: 0;
  flex: 1 1 auto;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(168,255,190,.08);
  background: linear-gradient(180deg, rgba(10,19,15,.7), rgba(6,12,10,.5));
}
.devtool-modal-frame {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  display: block;
  background: transparent;
}
.account-settings-page { display:none; }
.account-settings-page.is-active { display:block; }
.settings-page-intro {
  margin-bottom: 14px;
}
.security-card {
  gap: 14px;
}
.account-settings-page[data-account-settings-page="security-privacy"] > .stack-form,
.account-settings-page[data-account-settings-page="security-privacy"] > .settings-list-card.security-card {
  width: min(100%, 920px);
}
.account-settings-page[data-account-settings-page="security-privacy"] > .stack-form + .stack-form,
.account-settings-page[data-account-settings-page="security-privacy"] > .stack-form + .settings-list-card.security-card,
.account-settings-page[data-account-settings-page="security-privacy"] > .settings-list-card.security-card + .stack-form,
.account-settings-page[data-account-settings-page="security-privacy"] > .settings-list-card.security-card + .settings-list-card.security-card {
  margin-top: 18px;
}
.security-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.security-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(100, 175, 100, 0.16);
  background: rgba(21, 29, 58, 0.88);
  color: #d8e8ff;
  font-size: .85rem;
  font-weight: 700;
}
.security-status-pill.is-active {
  border-color: rgba(120, 215, 154, 0.28);
  background: rgba(20, 52, 42, 0.86);
  color: #d0e8ff;
}
.security-note,
.security-note-label {
  color: #aab4df;
}
.security-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(100, 175, 100, 0.12);
  background: rgba(18, 26, 52, 0.78);
  line-height: 1.5;
}
.security-note-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.security-inline-form {
  margin: 0;
}
.two-factor-setup-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.two-factor-qr-panel,
.two-factor-secret-panel,
.security-download-box {
  border: 1px solid rgba(100, 175, 100, 0.12);
  border-radius: 18px;
  background: rgba(18, 26, 52, 0.78);
}
.two-factor-qr-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 14px;
}
.two-factor-qr-image {
  width: 100%;
  max-width: 220px;
  border-radius: 14px;
  background: #fff;
}
.two-factor-secret-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.two-factor-secret-key {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #eef2ff;
  word-break: break-word;
}
.security-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}
.security-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(168, 255, 190, 0.36);
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.security-download-link:hover {
  color: #fff;
  text-decoration: none;
}
.settings-slider-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.settings-slider-row + .settings-slider-row {
  border-top: 1px solid rgba(168,255,190,.08);
}
.settings-slider-row span {
  font-weight: 700;
}
.settings-slider-row output {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.settings-device-grid {
  display: grid;
  gap: 14px;
}
.settings-device-grid > label {
  display: grid;
  gap: 8px;
}
.settings-device-grid > .settings-slider-row {
  padding: 12px 0;
}

.server-settings-shell {
  grid-template-columns: 270px minmax(0, 1fr);
}

.settings-pages,
.settings-page,
.settings-content-frame,
.settings-page .stack-form,
.settings-page .compact-stack,
.settings-page .settings-list-card,
.settings-page .table-shell,
.settings-page .danger-box {
  min-width: 0;
  max-width: 100%;
}

.settings-content-frame {
  overflow-y: auto;
  overflow-x: hidden;
}

.settings-page {
  width: 100%;
}

.settings-page .stack-form {
  width: min(100%, 920px);
}

.settings-page input:not([type="checkbox"]):not([type="radio"]),
.settings-page select,
.settings-page textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.settings-page input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 780px) {
  .two-factor-setup-grid {
    grid-template-columns: 1fr;
  }
  .security-download-box {
    flex-direction: column;
    align-items: stretch;
  }
}

.invite-copy-row {
  flex-wrap: wrap;
}

.invite-copy-row > * {
  min-width: 0;
}

.invite-copy-row button {
  flex: 0 0 auto;
}

.table-shell {
  overflow-y: auto;
  overflow-x: auto;
}

@media (max-width: 1100px) {
  .settings-modal-overlay {
    padding: 16px;
  }

  .server-join-card {
    width: min(900px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }

  .server-settings-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 700px) {
  .server-join-card,
  .server-settings-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .server-modal-grid {
    grid-template-columns: 1fr;
  }

  .devtool-modal-card {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    height: calc(100vh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
  }

  .devtool-modal-frame {
    min-height: 0;
  }
}



/* final modal width tuning */
.server-join-card {
  width: min(1080px, calc(100vw - 64px)) !important;
  max-width: calc(100vw - 64px) !important;
}

.server-settings-card {
  width: min(1680px, calc(100vw - 64px)) !important;
  max-width: calc(100vw - 64px) !important;
}

.server-settings-shell {
  grid-template-columns: 300px minmax(760px, 1fr) !important;
}

.settings-content-frame {
  min-width: 0;
  width: 100%;
}

@media (max-width: 1400px) {
  .server-settings-card {
    width: min(1440px, calc(100vw - 40px)) !important;
    max-width: calc(100vw - 40px) !important;
  }

  .server-settings-shell {
    grid-template-columns: 280px minmax(680px, 1fr) !important;
  }
}

@media (max-width: 1100px) {
  .server-join-card {
    width: min(940px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
  }

  .server-settings-card {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }

  .server-settings-shell {
    grid-template-columns: 1fr !important;
  }
}
.server-pill-icon { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.hidden-submit-form { display: none; }
.inline-emoji { width: 112px; height: 112px; display: inline-block; vertical-align: -1.4em; object-fit: contain; margin: 0 6px; }
.emoji-preview { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.align-start { align-items: flex-start; }
.stack-actions { align-items: stretch; }
.stack-actions .inline-form { width: 100%; }
.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f9eff;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover {
  color: #9ab7f2;
}
.sound-item-cell audio { display: block; margin-top: 8px; max-width: 280px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin-top: 10px; }
.channel-perm-grid { margin-bottom: 12px; }
.profile-icon-row { align-items: center; }


.dm-modal-overlay {
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(82, 156, 84, 0.16), transparent 32%), rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
}
.dm-card {
  width: min(1040px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(6, 14, 11, 0.98), rgba(4, 10, 8, 0.96));
  border: 1px solid rgba(168,255,190,.12);
  box-shadow: 0 28px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(132,220,99,.08), 0 0 40px rgba(89,181,86,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dm-topbar {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(168,255,190,.08);
  margin-bottom: 18px;
  flex: 0 0 auto;
}
.dm-user-line {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.dm-avatar { width: 56px; height: 56px; flex: 0 0 auto; }
.dm-main-title {
  margin: 6px 0 0;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -.03em;
}
.dm-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dm-messages {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 0;
  background: transparent;
  border: 0;
  display: grid;
  align-content: start;
  gap: 18px;
}
.dm-form {
  margin: 0 14px 14px;
}
.messages,
.dm-messages,
.dm-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 217, 101, 0.55) rgba(9, 18, 14, 0.82);
}
.messages::-webkit-scrollbar,
.dm-messages::-webkit-scrollbar,
.dm-card::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.messages::-webkit-scrollbar-track,
.dm-messages::-webkit-scrollbar-track,
.dm-card::-webkit-scrollbar-track {
  background: rgba(9, 18, 14, 0.82);
  border-radius: 999px;
}
.messages::-webkit-scrollbar-thumb,
.dm-messages::-webkit-scrollbar-thumb,
.dm-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(132,220,99,.82), rgba(57,132,62,.82));
  border-radius: 999px;
  border: 2px solid rgba(9, 18, 14, 0.82);
}
.messages::-webkit-scrollbar-thumb:hover,
.dm-messages::-webkit-scrollbar-thumb:hover,
.dm-card::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(157, 235, 122, 0.96), rgba(76, 169, 82, 0.94));
}
@media (max-width: 920px) {
  .dm-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    padding: 14px;
  }
  .dm-main-title { font-size: 1.4rem; }
}


/* Discord-like DM modal */
.discord-dm-card {
  width: min(1480px, calc(100vw - 56px)) !important;
  max-width: calc(100vw - 56px) !important;
  height: min(900px, calc(100vh - 56px)) !important;
  max-height: calc(100vh - 56px) !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 340px minmax(0, 1fr);
  overflow: hidden;
}
.dm-sidebar {
  border-right: 1px solid rgba(168,255,190,.08);
  background: linear-gradient(180deg, rgba(9,18,14,.92), rgba(6,12,10,.86));
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dm-sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(168,255,190,.08);
}
.dm-sidebar-title {
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.dm-search-wrap {
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(168,255,190,.06);
}
.dm-search-wrap input {
  width: 100%;
}
.dm-conversations {
  flex: 1;
  overflow: auto;
  padding: 10px 12px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.dm-conversation-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,31,25,.72), rgba(12,22,18,.58));
}
.dm-conversation-item.is-active {
  background: linear-gradient(90deg, rgba(110,196,84,.24), rgba(34,67,40,.92));
  border-color: rgba(132,220,99,.24);
  box-shadow: inset 0 0 0 1px rgba(132,220,99,.08), 0 10px 24px rgba(0,0,0,.18);
}
.dm-conversation-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}
.dm-conversation-avatar-wrap .avatar-xs {
  width: 42px;
  height: 42px;
}
.dm-presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  box-shadow: none;
  margin: 0;
}
.dm-conversation-meta {
  min-width: 0;
}
.dm-conversation-meta strong,
.dm-conversation-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-conversation-preview {
  margin-top: 3px;
  font-size: .9rem;
}
.dm-unread-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f9eff, #2d78d6);
  color: #080d18;
  font-size: .78rem;
  font-weight: 800;
}
.dm-chat-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.dm-chat-pane.dm-chat-pane-drop-active {
  border-color: rgba(168,255,190,.45);
  box-shadow: inset 0 0 0 1px rgba(168,255,190,.18), 0 18px 40px rgba(0,0,0,.16);
  background: linear-gradient(180deg, rgba(18, 34, 24, 0.92), rgba(11, 22, 16, 0.82));
}
.dm-chat-pane .dm-topbar {
  margin: 0;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(168,255,190,.08);
}
.dm-mobile-back {
  display: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(207, 216, 208, 0.76);
  font-size: 1rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.dm-chat-pane .dm-body {
  min-height: 0;
  flex: 1;
  padding: 0;
  position: relative;
  overflow: visible;
}
.dm-empty-state {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 280px;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.dm-messages.hidden,
.dm-form.hidden,
.dm-empty-state.hidden {
  display: none !important;
}
.dm-messages {
  padding: 18px 18px 8px;
}
.dm-form {
  margin-top: 2px;
}
@media (max-width: 1180px) {
  .discord-dm-card {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: calc(100vh - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    grid-template-columns: 300px minmax(0,1fr);
  }
}
@media (max-width: 860px) {
  .discord-dm-card {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }
  .dm-sidebar {
    min-height: 0;
    max-height: none;
  }
  #dm-modal:not(.dm-mobile-chat-active) .dm-chat-pane {
    display: none;
  }
  #dm-modal.dm-mobile-chat-active .dm-sidebar {
    display: none;
  }
  #dm-modal.dm-mobile-chat-active .dm-chat-pane {
    display: flex;
    min-height: 0;
    height: 100%;
  }
  .dm-mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .dm-chat-pane .dm-topbar {
    padding: 10px 14px 10px;
  }
  .dm-user-line {
    gap: 10px;
    align-items: center;
  }
  .dm-chat-pane .dm-body {
    min-height: 0;
    overflow: hidden;
  }
  .dm-messages {
    padding: 14px 14px 6px;
  }
  .dm-form {
    margin: 0;
  }
}

/* Syncora-inspired shell refresh */
:root {
  --bg0: #070b1a;
  --bg1: #0a1022;
  --bg2: #101834;
  --panel: rgba(15, 22, 46, 0.92);
  --panel-strong: rgba(18, 26, 54, 0.96);
  --panel-soft: rgba(22, 31, 63, 0.82);
  --line: rgba(115, 131, 216, 0.16);
  --line-2: rgba(120, 146, 255, 0.26);
  --text: #f4f6ff;
  --muted: #9ca7cf;
  --muted-2: #7f8bb7;
  --accent: #4f9eff;
  --accent-2: #4f5df1;
  --accent-3: #2e3eb5;
  --danger: #ff6f91;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(108, 191, 83, 0.12), 0 0 30px rgba(87, 102, 240, 0.14);
  --radius: 24px;
}

body {
  font-family: "Segoe UI Variable", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(102, 113, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(51, 87, 201, 0.14), transparent 24%),
    linear-gradient(180deg, #060914 0%, #090d1d 100%);
}

input, textarea, select, button {
  border-radius: 16px;
  border: 1px solid rgba(100, 175, 100, 0.14);
  background: rgba(22, 30, 59, 0.84);
  color: var(--text);
}

button:hover, input:hover, textarea:hover, select:hover {
  border-color: rgba(118, 140, 255, 0.28);
}

.topbar {
  position: static;
  height: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-left {
  gap: 10px;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-mark-small {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 16px rgba(108, 191, 83, 0.28));
}

#app {
  width: calc(100vw - 24px);
  max-width: calc(100vw - 24px);
  height: calc(100vh - 72px);
  min-height: 0;
  margin: 0 12px 12px;
  grid-template-columns: 64px 370px minmax(0, 1fr) 300px;
  gap: 0;
  background:
    linear-gradient(180deg, rgba(9, 13, 28, 0.98), rgba(10, 15, 32, 0.98)),
    linear-gradient(135deg, rgba(88, 97, 182, 0.06), transparent 30%);
  border: 1px solid rgba(100, 175, 100, 0.14);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.servers-bar,
.left-panel,
.right-panel,
.main-panel {
  height: calc(100vh - 72px);
  min-height: 0;
  background: transparent;
}

.servers-bar {
  border-right: 1px solid rgba(115, 131, 216, 0.12);
  padding: 18px 10px;
  gap: 14px;
}

.server-pill,
.server-action {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(20, 28, 56, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: none;
  color: #eef1ff;
  font-size: 1rem;
}

.server-pill.active {
  background: linear-gradient(180deg, rgba(98, 114, 255, 0.92), rgba(68, 81, 221, 0.9));
  border-color: rgba(142, 154, 255, 0.42);
  color: #fff;
  box-shadow: 0 12px 28px rgba(73, 87, 226, 0.34);
}

.server-pill-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.server-action {
  margin-top: auto;
  font-size: 1.4rem;
}

.left-panel,
.right-panel {
  padding: 14px 12px;
  min-width: 0;
  overflow-x: hidden;
}

.left-panel {
  border-right: 1px solid rgba(115, 131, 216, 0.12);
  gap: 12px;
}

.right-panel {
  border-left: 1px solid rgba(115, 131, 216, 0.12);
}

.server-header,
.panel-section,
.profile-box,
.channel-title,
.voice-toolbar,
.device-selects,
.transfer-log,
.member-list-shell,
.user-controls,
.chat-window {
  background: rgba(13, 19, 39, 0.74);
  border: 1px solid rgba(100, 175, 100, 0.12);
  border-radius: 18px;
  box-shadow: none;
}

.server-header,
.panel-section,
.profile-box,
.channel-title,
.voice-toolbar,
.device-selects,
.transfer-log,
.member-list-shell,
.user-controls {
  padding: 12px;
}

.server-header {
  min-height: 56px;
}

.server-header strong {
  font-size: 1rem;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: -0.02em;
}

.section-title {
  color: #7e89b8;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.channels-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-circle-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.channel-row a {
  padding: 10px 12px;
  font-size: 0.98rem;
  border-radius: 12px;
  min-width: 0;
}

.channel-row.active,
.channel-row:hover {
  background: rgba(99, 115, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(117, 133, 255, 0.18);
}

.channel-row {
  gap: 4px;
}

.channel-drag-handle {
  width: 14px;
  margin-left: 4px;
  opacity: 0.45;
}

.channel-name-line {
  flex: 1 1 auto;
  min-width: 0;
}

.channel-label {
  display: inline-block;
  max-width: 100%;
}

.tag {
  margin-left: 0;
}

.channel-symbol,
.channel-lock {
  color: #c8d1ff;
}

.channel-delete-btn {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-box {
  padding: 10px;
  background: rgba(12, 18, 37, 0.86);
}

.user-hero {
  padding: 10px;
  border-radius: 16px;
  background: rgba(20, 28, 56, 0.86);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.avatar,
.message .avatar {
  border: 0;
}

.avatar-line strong,
.member-meta strong {
  font-size: 0.98rem;
}

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

.profile-actions a,
.profile-actions button,
.ghost-link {
  flex: 1;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(23, 31, 61, 0.9);
  color: #dbe1ff;
  border: 1px solid rgba(100, 175, 100, 0.12);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.main-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.mobile-channel-back {
  display: none;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(23, 31, 61, 0.9);
  border: 1px solid rgba(100, 175, 100, 0.16);
  color: #eef1ff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: none;
}

.mobile-member-toggle,
.mobile-member-back {
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(207, 216, 208, 0.72);
  box-shadow: none;
  flex: 0 0 auto;
  cursor: pointer;
}

.mobile-member-toggle svg,
.mobile-member-back svg {
  width: 32px;
  height: 32px;
}

.channel-title {
  min-height: 58px;
  margin-bottom: 0;
  background: rgba(13, 19, 39, 0.82);
}

.channel-name {
  gap: 10px;
  font-size: 1.05rem;
}

.channel-status-dot {
  width: 8px;
  height: 8px;
  background: #4f9eff;
  box-shadow: 0 0 0 4px rgba(108, 191, 83, 0.14);
}

.chat-window {
  flex: 1 1 auto;
  padding: 0;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 24px 14px;
  gap: 16px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.message {
  grid-template-columns: 44px 1fr;
  gap: 12px;
}

.message .avatar {
  width: 44px;
  height: 44px;
}

.message strong {
  color: #f4f6ff;
  font-size: 0.95rem;
}

.message-head {
  justify-content: flex-start;
  gap: 16px;
}

.message-action-btn {
  margin-left: 0;
  font-size: 0.78rem;
  color: #8f9ac6;
}

.message-body-rich,
.message-text {
  color: #d8e8ff;
}

.message .image-preview,
.message-attachment,
.message-audio-player,
.message-video-player,
.discord-link-preview {
  margin-top: 10px;
}

.message-attachment-grid .image-preview {
  margin-top: 0;
}

.message-form {
  margin: 0 12px 12px;
  padding: 10px 12px;
  gap: 8px;
  border-radius: 18px;
  background: rgba(20, 27, 54, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.14);
  align-items: center;
}

.composer-input {
  font-size: 0.98rem;
  color: #eef1ff;
  min-height: 22px;
}

.attach-btn,
.message-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(33, 43, 84, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: none;
}

#message-send,
#dm-send {
  background: linear-gradient(180deg, rgba(83, 140, 255, 1), rgba(47, 90, 200, 1));
  border-color: rgba(100, 160, 255, 0.36);
  color: #fff;
}

#message-form .attach-btn,
#dm-form .attach-btn {
  flex: 0 0 auto;
}

.emoji-picker-wrap,
.chat-lock-wrap,
.dm-lock-wrap,
.file-name-pill,
#message-send,
#dm-send {
  flex: 0 0 auto;
}

#message-form .emoji-picker-wrap,
#message-form .chat-lock-wrap,
#message-form #message-send,
#message-form .file-name-pill,
#dm-form .emoji-picker-wrap,
#dm-form .dm-lock-wrap,
#dm-form #dm-send,
#dm-form .file-name-pill {
  order: 3;
}

#message-form .file-name-pill,
#dm-form .file-name-pill {
  order: 2;
  margin-left: auto;
}

#message-form #chat-gif-toggle,
#dm-form #dm-gif-toggle {
  order: 3;
}

#message-form .emoji-picker-wrap,
#dm-form .emoji-picker-wrap {
  order: 4;
}

#message-form #message-send,
#message-form .chat-lock-wrap,
#dm-form #dm-send,
#dm-form .dm-lock-wrap {
  order: 5;
}

#message-form .composer-input,
#dm-form .composer-input {
  order: 1;
}

.file-name-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(30, 39, 78, 0.84);
  color: #b9c3eb;
  border: 1px solid rgba(100, 175, 100, 0.12);
  font-size: 0.8rem;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emoji-picker-panel,
.dm-lock-panel {
  background: rgba(16, 22, 47, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.emoji-picker-item {
  width: 56px;
  height: 56px;
  background: rgba(28, 37, 72, 0.9);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.member-list-shell .section-title {
  margin-bottom: 10px;
}

#member-list {
  gap: 10px;
}

.member-card {
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(19, 26, 52, 0.56);
  gap: 10px;
  align-items: center;
}

.member-card.is-highlight,
.member-card:hover {
  background: rgba(35, 44, 84, 0.88);
  box-shadow: inset 0 0 0 1px rgba(100, 175, 100, 0.14);
  border: 0;
}

.member-list-shell {
  padding: 10px;
  min-width: 0;
  overflow-x: hidden;
}

.member-list-shell .section-title {
  font-size: 0.72rem;
}

.member-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.member-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-status {
  font-size: 0.86rem;
  color: #a2add6;
}

.online-dot {
  width: 10px;
  height: 10px;
  background: #27a63a;
  box-shadow: 0 0 0 4px rgba(104, 225, 141, 0.12);
  margin-left: auto;
}

.voice-toolbar button,
.control-badge,
.top-icon {
  background: rgba(24, 32, 64, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.14);
}

.modal {
  background: rgba(4, 7, 18, 0.72);
  backdrop-filter: blur(14px);
}

.modal .card,
.menu {
  background: rgba(14, 20, 42, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

#profile-modal {
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(98, 114, 255, 0.2), transparent 34%), rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
}

#profile-modal .profile-modal-card {
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(11, 16, 34, 0.98));
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 28px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(117, 133, 255, 0.1), 0 0 40px rgba(89, 115, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-modal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-modal-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

.profile-modal-identity {
  min-width: 0;
}

.profile-modal-identity h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: #eef2ff;
}

.profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.profile-modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(13, 19, 39, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.profile-modal-about {
  margin: 0;
  line-height: 1.55;
  color: #dbe1ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profile-modal-action {
  min-width: 180px;
  background: rgba(23, 31, 61, 0.9);
  color: #dbe1ff;
  border: 1px solid rgba(100, 175, 100, 0.12);
}

#profile-modal .social-link-list a {
  color: #cfd8ff;
}

#profile-modal .social-link-list a:hover {
  color: #ffffff;
}

#profile-modal .game-cover-row {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

#profile-modal .game-cover-card {
  background: rgba(20, 28, 56, 0.86);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

#profile-modal .game-cover-card[data-lightbox-image] {
  cursor: zoom-in;
}

#profile-modal .game-cover-card:hover {
  box-shadow: inset 0 0 0 1px rgba(117, 133, 255, 0.18);
}

#profile-modal .game-cover-art {
  aspect-ratio: 1 / 1.2;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(98, 114, 255, 0.2), rgba(26, 34, 72, 0.92));
}

#profile-modal .game-cover-title {
  font-size: .64rem;
}

#profile-modal .profile-modal-body::-webkit-scrollbar {
  width: 10px;
}

#profile-modal .profile-modal-body::-webkit-scrollbar-track {
  background: rgba(10, 14, 30, 0.72);
  border-radius: 999px;
}

#profile-modal .profile-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(108, 191, 83, 0.92), rgba(68, 81, 221, 0.9));
  border-radius: 999px;
}

#profile-modal .profile-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(122, 210, 80, 0.96), rgba(47, 140, 54, 0.94));
}

@media (max-width: 1400px) {
  #app {
    grid-template-columns: 64px 350px minmax(0, 1fr) 280px;
  }
}

@media (max-width: 1200px) {
  #app {
    grid-template-columns: 64px 340px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .modal {
    padding: 16px 10px;
    place-items: center;
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .modal .card,
  .menu,
  .transfer-modal-card,
  .events-modal-card,
  #device-modal .transfer-modal-card {
    width: min(88vw, 520px);
    max-width: 88vw;
    max-height: calc(100dvh - 72px);
    padding: 10px;
    border-radius: 16px;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #profile-modal {
    padding: 16px 10px;
    overflow: hidden;
  }
  #profile-modal .profile-modal-card {
    width: min(88vw, 520px);
    max-width: 88vw;
    max-height: calc(100dvh - 72px);
    padding: 14px;
    border-radius: 20px;
  }
  .profile-modal-header {
    gap: 12px;
  }
  .profile-modal-hero {
    align-items: flex-start;
    gap: 12px;
  }
  .profile-modal-avatar {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
  .profile-modal-identity h2 {
    font-size: 1.2rem;
  }
  .profile-modal-section {
    padding: 12px;
    border-radius: 16px;
  }
  .profile-modal-footer {
    justify-content: stretch;
  }
  .profile-modal-action {
    width: 100%;
    min-width: 0;
  }
  .modal-title-row {
    margin-bottom: 6px;
  }
  .modal-title-row h2 {
    font-size: 1.05rem;
  }
  .emoji-picker-panel {
    left: auto;
    right: -10px;
    bottom: calc(100% + 8px);
    width: min(320px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: min(280px, calc(100dvh - 140px));
    padding: 8px;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .emoji-picker-item {
    width: 48px;
    height: 48px;
  }
  .emoji-picker-item img {
    width: 34px;
    height: 34px;
  }
  .emoji-picker-item-native span {
    font-size: 1.5rem;
  }
  .gif-picker-modal-card {
    width: min(92vw, 760px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }
  .gif-picker-grid {
    min-height: 240px;
    max-height: min(48dvh, 460px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gif-picker-toolbar,
  .gif-picker-footer {
    grid-template-columns: 1fr;
    display: grid;
  }
  .gif-picker-search-btn,
  .gif-picker-load-more {
    width: 100%;
  }
  .peer-grid {
    grid-template-columns: 1fr;
  }
  .peer-card {
    min-height: 0;
  }
  .peer-media-wrap.has-camera-video video,
  .peer-cinema-media.has-camera-video video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }
  .peer-media-wrap {
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-height: min(38vh, 260px);
  }
  body {
    overflow: hidden;
    background-attachment: scroll;
  }
  .topbar {
    padding: 12px 12px 6px;
  }
  #app {
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 54px);
    min-height: calc(100dvh - 54px);
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    grid-template-columns: 64px 1fr;
  }
  .servers-bar,
  .left-panel,
  .right-panel,
  .main-panel {
    height: 100%;
  }
  #app:not(.mobile-channel-active):not(.mobile-member-active) .servers-bar {
    display: flex;
  }
  #app:not(.mobile-channel-active):not(.mobile-member-active) .left-panel {
    display: flex;
    min-width: 0;
  }
  #app:not(.mobile-channel-active):not(.mobile-member-active) .main-panel,
  #app:not(.mobile-channel-active):not(.mobile-member-active) .right-panel {
    display: none;
  }
  #app.mobile-channel-active {
    grid-template-columns: minmax(0, 1fr);
  }
  #app.mobile-channel-active .servers-bar,
  #app.mobile-channel-active .left-panel,
  #app.mobile-channel-active .right-panel {
    display: none;
  }
  #app.mobile-channel-active .main-panel {
    display: flex;
    padding-top: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  #app.mobile-channel-active .mobile-channel-back {
    display: inline-flex;
  }
  #app.mobile-channel-active .mobile-member-toggle {
    display: inline-flex;
  }
  #app.mobile-member-active {
    grid-template-columns: minmax(0, 1fr);
  }
  #app.mobile-member-active .servers-bar,
  #app.mobile-member-active .left-panel,
  #app.mobile-member-active .main-panel {
    display: none;
  }
  #app.mobile-member-active .right-panel {
    display: flex;
    min-width: 0;
    border-left: 0;
  }
  #app.mobile-member-active .mobile-member-back {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 8px;
  }
  .member-list-shell {
    padding: 10px 10px 14px;
  }
  .messages {
    padding: 18px 16px 12px;
  }
  .message-form {
    margin: 0 8px 8px;
    flex-wrap: wrap;
  }
}

/* Shell consistency pass */
.toast {
  background: rgba(18, 24, 49, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.18);
  color: #eef1ff;
  box-shadow: 0 20px 44px rgba(0,0,0,.34);
}

.toast.toast-warning {
  background: rgba(57, 44, 16, 0.96);
  border-color: rgba(255, 191, 86, 0.28);
  color: #ffe3a5;
}

.toast.toast-error {
  background: rgba(63, 22, 34, 0.96);
  border-color: rgba(255, 111, 145, 0.3);
  color: #ffd4df;
}

.toast.toast-success {
  background: rgba(20, 43, 38, 0.96);
  border-color: rgba(104, 225, 141, 0.24);
  color: #d5eeff;
}

.toast.toast-syncora {
  background:
    linear-gradient(135deg, rgba(74, 106, 228, 0.98), rgba(18, 31, 81, 0.98));
  border-color: rgba(157, 184, 255, 0.34);
  color: #f3f6ff;
  box-shadow:
    0 20px 48px rgba(5, 10, 32, 0.42),
    0 0 0 1px rgba(157, 184, 255, 0.12) inset;
}

.server-menu {
  background: rgba(14, 20, 42, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 20px 50px rgba(0,0,0,.38);
  border-radius: 16px;
  overflow: hidden;
}

.server-menu button {
  min-height: 42px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #e4e9ff;
}

.server-menu button:hover {
  background: rgba(99, 115, 255, 0.12);
  box-shadow: none;
}

.peer-card {
  background: rgba(13, 19, 39, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.14);
  border-radius: 20px;
  box-shadow: none;
}

.peer-card.speaking {
  border-color: rgba(108, 191, 83, 0.34);
  box-shadow: 0 0 0 1px rgba(109,124,255,.12), 0 16px 36px rgba(28,35,95,.22);
}

.peer-media-wrap {
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(94, 109, 255, 0.14), transparent 45%),
    rgba(10, 14, 28, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.peer-cinema-card {
  background: rgba(14, 20, 42, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.peer-cinema-avatar {
  background:
    radial-gradient(circle at top, rgba(108, 191, 83, 0.24), transparent 55%),
    rgba(18, 24, 49, 0.94);
}

.peer-cinema-avatar .peer-avatar {
  border: 2px solid rgba(154, 166, 255, 0.2);
  background: rgba(18, 24, 49, 0.94);
}

.voice-soundboard-panel,
.voice-gaming-panel {
  background: rgba(16, 22, 47, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

.voice-soundboard-item,
.voice-toolbar .voice-gaming-item {
  background: rgba(28, 37, 72, 0.9);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.voice-soundboard-item:hover,
.voice-soundboard-item:focus-visible,
.voice-toolbar .voice-gaming-item:hover,
.voice-toolbar .voice-gaming-item:focus-visible {
  background: rgba(42, 53, 97, 0.96);
  border-color: rgba(150, 220, 100, 0.24);
}

.voice-soundboard-art,
.voice-gaming-art {
  background: rgba(18, 24, 49, 0.94);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.voice-soundboard-tag,
.voice-gaming-tag {
  color: #d8e8ff;
}

.gaming-overlay-modal {
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(14px);
}

.gaming-overlay-shell {
  background: rgba(14, 20, 42, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.16);
  box-shadow: 0 30px 80px rgba(0,0,0,.48);
}

.gaming-overlay-frame-wrap {
  background:
    radial-gradient(circle at top, rgba(89, 104, 240, 0.14), transparent 48%),
    rgba(10, 14, 28, 0.98);
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.settings-side-nav {
  border-right: 1px solid rgba(100, 175, 100, 0.12) !important;
}

.settings-tab {
  background: rgba(22, 30, 59, 0.84);
  border: 1px solid rgba(100, 175, 100, 0.12);
  color: #d8e8ff;
}

.settings-version-status {
  background: rgba(22, 30, 59, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.settings-version-status-label {
  color: #95a2d8;
}

.settings-version-status-value {
  color: #eef1ff;
}

.settings-version-status-meta {
  color: #b5c0f2;
}

.settings-tab.is-active {
  background: rgba(99, 115, 255, 0.14);
  border-color: rgba(150, 220, 100, 0.26);
  box-shadow: inset 0 0 0 1px rgba(125,140,255,.08);
}

.settings-content-frame {
  background: rgba(13, 19, 39, 0.82);
  border: 1px solid rgba(100, 175, 100, 0.12);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.invite-code-box {
  background: rgba(22, 30, 59, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.14);
  color: #eef1ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.settings-list-card {
  background: rgba(18, 24, 49, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.table-shell {
  background: rgba(18, 24, 49, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.danger-box {
  background: rgba(46, 21, 35, 0.88);
  border: 1px solid rgba(255, 111, 145, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.transfer-log {
  background: rgba(18, 24, 49, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.settings-table {
  color: #d8e4ff;
}

.settings-table th {
  color: #8f9ac6;
}

.settings-table th,
.settings-table td {
  border-bottom: 1px solid rgba(100, 175, 100, 0.1);
}

.settings-table tbody tr:hover {
  background: rgba(99, 115, 255, 0.08);
}

.dm-sidebar {
  border-right: 1px solid rgba(100, 175, 100, 0.12);
  background: rgba(12, 18, 37, 0.94);
}

.dm-sidebar-top,
.dm-search-wrap {
  border-bottom: 1px solid rgba(100, 175, 100, 0.1);
}

.dm-conversation-item {
  background: rgba(19, 26, 52, 0.56);
  border: 1px solid rgba(100, 175, 100, 0.1);
}

.dm-conversation-item.is-active {
  background: rgba(99, 115, 255, 0.14);
  border-color: rgba(150, 220, 100, 0.24);
  box-shadow: inset 0 0 0 1px rgba(125,140,255,.08);
}

/* Syncora event layer */
.events-modal-card,
.event-detail-card {
  width: min(1320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}

.events-modal-card {
  width: min(650px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
}

#events-modal .events-modal-card {
  width: min(650px, calc(100vw - 56px)) !important;
  max-width: calc(100vw - 56px) !important;
}

.event-create-card {
  width: min(650px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
}

#event-create-modal .event-create-card {
  width: min(650px, calc(100vw - 56px)) !important;
  max-width: calc(100vw - 56px) !important;
}

#event-detail-modal .event-detail-card {
  width: min(650px, calc(100vw - 56px)) !important;
  max-width: calc(100vw - 56px) !important;
}

.server-events-toolbar {
  padding: 0;
}

.server-events-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(100, 175, 100, 0.14);
  background: rgba(20, 28, 56, 0.88);
  color: #eef1ff;
  box-shadow: none;
  justify-content: space-between;
}

.server-events-btn:hover {
  background: rgba(35, 44, 84, 0.92);
  border-color: rgba(150, 220, 100, 0.24);
  box-shadow: none;
}

.server-events-btn.is-primary {
  width: auto;
  min-width: 152px;
  background: linear-gradient(180deg, rgba(108, 191, 83, 1), rgba(47, 140, 54, 1));
  border-color: rgba(168, 255, 190, 0.36);
  color: #fff;
}

.events-count-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(99, 115, 255, 0.18);
  border: 1px solid rgba(150, 220, 100, 0.24);
  color: #eef1ff;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
}

.events-modal-overlay {
  background: rgba(4, 7, 18, 0.72);
  backdrop-filter: blur(14px);
}

.events-modal-card,
.event-create-card,
.event-detail-card {
  background: rgba(14, 20, 42, 0.96);
  border: 1px solid rgba(100, 175, 100, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.events-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.event-card {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(18, 24, 49, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.event-card:hover {
  background: rgba(28, 37, 72, 0.9);
  border-color: rgba(150, 220, 100, 0.24);
  transform: translateY(-1px);
}

.event-card-cover,
.event-detail-cover {
  border: 1px solid rgba(100, 175, 100, 0.12);
  background: rgba(12, 18, 37, 0.94);
}

.event-card-cover {
  width: 72px;
  height: 72px;
  aspect-ratio: auto;
  border-radius: 14px;
}

.event-card-cover-placeholder {
  background:
    radial-gradient(circle at top, rgba(108, 191, 83, 0.18), transparent 52%),
    rgba(18, 24, 49, 0.94);
  color: #cfd7ff;
  border: 1px solid rgba(100, 175, 100, 0.12);
}

.event-card-body {
  min-width: 0;
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-card-head h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-date-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99, 115, 255, 0.14);
  border: 1px solid rgba(150, 220, 100, 0.22);
  color: #eef1ff;
  font-size: .82rem;
  line-height: 1;
  white-space: nowrap;
}

.event-card-meta,
.event-card-footer {
  color: #9ca7cf;
}

.event-card-footer {
  font-size: .84rem;
  min-width: 0;
  flex-wrap: wrap;
}

.event-step-chip {
  border-color: rgba(100, 175, 100, 0.14);
  background: rgba(22, 30, 59, 0.84);
  color: #b4bee5;
}

.event-step-chip.is-active {
  color: #fff;
  background: rgba(99, 115, 255, 0.18);
  border-color: rgba(150, 220, 100, 0.28);
  box-shadow: inset 0 0 0 1px rgba(125,140,255,.08);
}

.event-detail-panel {
  background: rgba(18, 24, 49, 0.88);
  border: 1px solid rgba(100, 175, 100, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.event-detail-hero {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
}

.event-detail-cover {
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.event-detail-copy p {
  color: #d7defc;
}

.event-attendee-row {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(19, 26, 52, 0.56);
  border: 1px solid rgba(100, 175, 100, 0.1);
}

.event-preview-card .event-card {
  cursor: default;
}

.event-create-footer > button,
.event-detail-actions button,
#event-attendance-form input {
  border-radius: 14px;
}

@media (max-width: 920px) {
  .event-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .event-card-cover {
    width: 56px;
    height: 56px;
  }

  .event-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .event-date-badge {
    white-space: normal;
  }

  .event-detail-hero {
    grid-template-columns: 1fr;
  }

  .event-detail-cover {
    width: 140px;
  }
}

/* ── Update system ─────────────────────────────────────────────────── */
.settings-update-tab {
  margin-top: 6px;
}

.settings-update-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-update-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
}

.settings-update-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-update-current {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-update-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .65;
}

.settings-update-version {
  font-size: 15px;
  font-weight: 700;
}

.settings-update-result {
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.settings-update-result.hidden { display: none; }

.settings-update-result--available {
  background: rgba(99, 220, 131, .12);
  border-color: rgba(99, 220, 131, .25);
  color: #b6d0ff;
}
.settings-update-result--uptodate {
  background: rgba(100, 175, 100, .1);
  border-color: rgba(100, 175, 100, .2);
}
.settings-update-result--success {
  background: rgba(99, 220, 131, .15);
  border-color: rgba(99, 220, 131, .3);
  color: #b6d0ff;
}
.settings-update-result--error {
  background: rgba(255, 107, 107, .1);
  border-color: rgba(255, 107, 107, .25);
  color: #ffd0d0;
}

.settings-update-result ul {
  margin: 6px 0 0 16px;
  padding: 0;
  font-size: 12px;
  opacity: .8;
}

.settings-update-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 220, 131, .25);
  color: #9fd0ff;
  vertical-align: middle;
}

.settings-update-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-update-check,
.btn-update-apply,
.btn-update-reload {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}
.btn-update-check:disabled,
.btn-update-apply:disabled { opacity: .5; cursor: not-allowed; }

.btn-update-check {
  background: rgba(100, 175, 100, .2);
  color: #c5ceff;
  border: 1px solid rgba(100, 175, 100, .3);
}
.btn-update-check:hover:not(:disabled) { background: rgba(100, 175, 100, .35); }

.btn-update-apply {
  background: rgba(99, 220, 131, .2);
  color: #9fd0ff;
  border: 1px solid rgba(99, 220, 131, .3);
}
.btn-update-apply:hover:not(:disabled) { background: rgba(99, 220, 131, .35); }

.btn-update-reload {
  display: inline-block;
  margin-top: 8px;
  background: rgba(99, 220, 131, .25);
  color: #9fd0ff;
  border: 1px solid rgba(99, 220, 131, .3);
}
.btn-update-reload:hover { background: rgba(99, 220, 131, .4); }

.settings-update-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  opacity: .75;
}
.settings-update-progress.hidden { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
.settings-update-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: rgba(255,255,255,.65);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

.settings-update-hint {
  font-size: 12px;
  opacity: .5;
  margin: 0;
}
.settings-update-hint code {
  font-family: monospace;
  background: rgba(255,255,255,.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── Permissions Panel ─────────────────────────────────── */
.perm-page-header { margin-bottom: 16px; }
.perm-page-title { margin: 4px 0 0; font-size: 1.25rem; }
.perm-role-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.perm-role-tab-btn {
  display:inline-flex; align-items:center; gap:7px;
  padding:7px 15px; border-radius:999px;
  border:1px solid rgba(168,255,190,.14);
  background:rgba(168,255,190,.04);
  color:rgba(207,216,208,.65); font-size:.82rem; font-weight:600; cursor:pointer;
  transition:background .14s,color .14s,border-color .14s;
}
.perm-role-tab-btn:hover,.perm-role-tab-btn.is-active {
  background:rgba(83,108,191,.18); border-color:rgba(83,108,191,.38); color:#a4c5f0;
}
.perm-role-tab-icon { font-size:.95rem; }
.perm-role-panel { display:none; }
.perm-role-panel.is-active { display:block; }
.perm-role-card {
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(168,255,190,.04); border:1px solid rgba(168,255,190,.09);
  border-radius:14px; padding:14px 18px; margin-bottom:18px;
}
.perm-role-card-left { display:flex; align-items:center; gap:12px; }
.perm-role-avatar {
  width:42px; height:42px; border-radius:50%;
  background:rgba(108,191,83,.13); border:1px solid rgba(108,191,83,.28);
  display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0;
}
.perm-role-card-name { font-weight:700; font-size:.95rem; color:#d8e4ff; }
.perm-role-card-sub { font-size:.75rem; color:rgba(207,216,208,.45); margin-top:2px; }
.perm-two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
@media (max-width:860px) { .perm-two-col { grid-template-columns:1fr; } }
.perm-col {
  background:rgba(168,255,190,.025); border:1px solid rgba(168,255,190,.07);
  border-radius:12px; padding:14px; min-height:200px;
}
.perm-col-heading {
  font-size:.68rem; font-weight:700; letter-spacing:.08em;
  color:rgba(207,216,208,.4); text-transform:uppercase;
  margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid rgba(168,255,190,.06);
}
.perm-row {
  display:flex; align-items:center; gap:10px;
  padding:9px 0; border-bottom:1px solid rgba(168,255,190,.04);
}
.perm-row:last-of-type { border-bottom:none; }
.perm-row-info { flex:1; min-width:0; }
.perm-row-label { font-size:.82rem; font-weight:600; color:#d0d8f0; }
.perm-row-desc { font-size:.72rem; color:rgba(207,216,208,.45); margin-top:1px; }
.perm-row-btns { display:flex; gap:4px; flex-shrink:0; }
.perm-btn {
  width:26px; height:26px; border-radius:50%; padding:0;
  border:1px solid rgba(168,255,190,.16); background:rgba(168,255,190,.04);
  color:rgba(207,216,208,.35); font-size:.8rem; display:flex;
  align-items:center; justify-content:center; cursor:pointer; line-height:1;
  transition:background .12s,color .12s,border-color .12s;
}
.perm-btn:hover { border-color:rgba(168,255,190,.32); color:rgba(207,216,208,.75); }
.perm-allow.is-active  { background:rgba(72,100,199,.18); border-color:rgba(72,100,199,.5); color:#7a84e8; }
.perm-neutral.is-active{ background:rgba(168,255,190,.09); border-color:rgba(168,255,190,.22); color:rgba(207,216,208,.65); }
.perm-deny.is-active   { background:rgba(255,80,80,.14); border-color:rgba(255,80,80,.42); color:#ff8484; }
.perm-channel-group { display:none; }
.perm-channel-group.is-active { display:block; }
.perm-channel-selector {
  margin-top:14px; padding-top:12px; border-top:1px solid rgba(168,255,190,.06);
}
.perm-channel-select {
  width:100%; padding:7px 10px; border-radius:8px; font-size:.82rem;
  background:rgba(23,30,38,.8); color:#ccd5e8;
  border:1px solid rgba(168,255,190,.15); cursor:pointer;
}
.perm-empty { color:rgba(207,216,208,.4); font-size:.82rem; padding:12px 0; }
.perm-form-footer {
  display:flex; justify-content:flex-end; gap:10px;
  margin-top:18px; padding-top:14px; border-top:1px solid rgba(168,255,190,.07);
}
.perm-cancel-btn {
  padding:8px 18px; border-radius:9px;
  border:1px solid rgba(168,255,190,.14); background:rgba(168,255,190,.04);
  color:rgba(207,216,208,.65); font-size:.83rem; cursor:pointer;
}
.perm-cancel-btn:hover { background:rgba(168,255,190,.08); }
.perm-save-btn {
  padding:8px 22px; border-radius:9px; font-size:.83rem; font-weight:600;
  background:linear-gradient(135deg,rgba(72,199,82,.55),rgba(47,140,54,.55));
  border:1px solid rgba(72,100,199,.28); color:#d8e4ff; cursor:pointer;
}
.perm-save-btn:hover { background:linear-gradient(135deg,rgba(72,199,82,.7),rgba(47,140,54,.7)); }
.settings-page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.settings-panel-grid + .settings-panel-grid,
.settings-panel-grid + .perm-col,
.perm-col + .settings-panel-grid,
.perm-col + .perm-col {
  margin-top: 16px;
}
.settings-panel-grid--profile {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
}
.settings-panel-card {
  min-width: 0;
}
.settings-panel-head {
  margin-bottom: 14px;
}
.settings-panel-head--compact {
  margin-top: 18px;
}
.settings-panel-title {
  font-size: .9rem;
  font-weight: 700;
  color: #d8e4ff;
}
.settings-panel-sub {
  margin-top: 3px;
  font-size: .75rem;
  color: rgba(207,216,208,.45);
}
.settings-form-footer {
  justify-content: flex-start;
}
.settings-profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(168,255,190,.035);
  border: 1px solid rgba(168,255,190,.08);
}
.settings-profile-preview-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}
.settings-profile-preview-copy {
  min-width: 0;
}
.settings-profile-preview-copy strong {
  display: block;
  font-size: 1rem;
  color: #eef1ff;
}
.settings-data-list {
  display: grid;
  gap: 0;
}
.settings-data-item {
  padding: 14px 0;
}
.settings-data-item:first-of-type {
  padding-top: 4px;
}
.settings-data-item + .settings-data-item {
  border-top: 1px solid rgba(168,255,190,.06);
}
.settings-inline-editor {
  width: min(100%, 320px);
}
@media (max-width: 980px) {
  .settings-panel-grid,
  .settings-panel-grid--profile {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .settings-page-header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-profile-preview {
    align-items: flex-start;
  }
}
.hotkeys-warning {
  font-size: 0.85rem;
  color: #f0c674;
  background: rgba(240, 198, 116, 0.08);
  border: 1px solid rgba(240, 198, 116, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.hotkey-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hotkey-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(23, 38, 30, 0.88);
  border: 1px solid rgba(168, 255, 190, 0.15);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  user-select: none;
}
.hotkey-display.is-recording {
  border-color: rgba(132, 220, 99, 0.5);
  background: rgba(132, 220, 99, 0.1);
  animation: hotkeyPulse 1.2s ease-in-out infinite;
}
@keyframes hotkeyPulse {
  0%, 100% { border-color: rgba(132, 220, 99, 0.5); }
  50% { border-color: rgba(132, 220, 99, 0.15); }
}
.hotkey-record-btn {
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.hotkey-record-btn.is-recording {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffd7d7;
}
.ai-status-box {
  font-size: 0.72rem;
  color: #999;
  padding: 4px 0 0;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  text-overflow: ellipsis;
  animation: aiStatusPulse 1.5s ease-in-out infinite;
  line-height: 1.3;
}
@keyframes aiStatusPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
.ai-prompt-badge {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.78rem;
  color: #aaa;
  margin-bottom: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
