:root {
  --bg: #050505;
  --panel: #101010;
  --panel-2: #161616;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --accent: #ff1f1f;
  --accent-2: #ffcc00;
  --good: #17fc33;
  --danger: #ffcc00;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 31, 31, 0.12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(255, 204, 0, 0.08), transparent 30rem),
    linear-gradient(180deg, #070707, #020202);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

textarea,
input,
select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(255, 31, 31, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 31, 31, 0.12);
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

button,
.button,
.primary-button {
  border: 1px solid rgba(255, 31, 31, 0.75);
  background: linear-gradient(180deg, rgba(255, 31, 31, 0.95), rgba(150, 0, 0, 0.95));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

button:hover,
.button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(255, 31, 31, 0.24);
}

button:active,
.button:active,
.primary-button:active {
  transform: translateY(0);
}

.link-button {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.link-button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.logo::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(255, 31, 31, 0.75);
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link:hover {
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.badge,
.small-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(255, 31, 31, 0.55);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 31, 31, 0.12);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.small-badge {
  padding: 2px 7px;
  font-size: 10px;
}

.muted {
  color: var(--muted);
}

.error {
  border: 1px solid rgba(255, 204, 0, 0.45);
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-weight: 800;
}

.success {
  border: 1px solid rgba(0, 255, 136, 0.35);
  color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-weight: 850;
}

.auth-shell,
.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px;
}

.auth-card,
.panel,
.card,
.admin-panel,
.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.88);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-card {
  max-width: 480px;
  margin: 8vh auto 0;
}

.auth-card h1,
.panel h1,
.panel h2,
.card h1,
.card h2 {
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}

.auth-card form,
.panel form,
.card form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.identity-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.identity-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 900;
}

.compact-strip {
  margin: 0;
}

.chat-shell {
  min-height: 100vh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px;
}

.chat-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.72);
  padding: 14px 16px;
  margin-bottom: 18px;
  position: sticky;
  top: 12px;
  z-index: 2000;
  backdrop-filter: blur(12px);
}

.waterfall-intro {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.12), transparent 42%),
    rgba(16, 16, 16, 0.88);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.waterfall-intro h2 {
  margin: 0;
  font-size: clamp(26px, 5vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.waterfall-layout {
  display: block;
}

.waterfall-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 170px;
  scroll-behavior: smooth;
}

.chat-message {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  border: 1px solid var(--user-color, var(--line));
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.86);
  padding: 14px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--user-color, var(--accent)) 12%, transparent);
  animation: messageFadeIn 0.18s ease-out;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--user-color, var(--accent)) 18%, transparent);
  border: 1px solid var(--user-color, var(--accent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--user-color, var(--accent)) 22%, transparent);
  font-weight: 1000;
  text-transform: uppercase;
}

.chat-body p,
.thread-message p {
  margin: 8px 0 0;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  flex-wrap: wrap;
}

.chat-meta a {
  color: var(--user-color, var(--accent));
  text-decoration: none;
}

.chat-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.mini-button,
.mini-link {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.mini-button:hover,
.mini-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.16);
}

.danger-mini-button {
  border-color: rgba(255, 204, 0, 0.5);
  color: #ffcc00;
}

.report-box,
.edit-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.report-box summary,
.edit-box summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-box form,
.edit-box form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.chat-composer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, 0.96);
  padding: 14px;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.65);
  z-index: 2500;
  backdrop-filter: blur(12px);
}

.chat-composer form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-composer textarea {
  min-height: 52px;
  max-height: 130px;
}

.typing-indicator {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 2600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.94);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}

.typing-indicator[hidden] {
  display: none;
}

.floating-thread-windows {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 9000;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}

.thread-window {
  width: 380px;
  min-width: 300px;
  min-height: 300px;
  max-height: min(680px, calc(100vh - 150px));
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  border: 1px solid rgba(255, 31, 31, 0.45);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.98);
  box-shadow:
    0 0 0 1px rgba(255, 31, 31, 0.08),
    0 18px 70px rgba(0, 0, 0, 0.65),
    0 0 45px rgba(255, 31, 31, 0.10);
  pointer-events: auto;
  animation: threadWindowPop 0.22s ease-out;
}

.thread-window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 31, 31, 0.22), rgba(255, 31, 31, 0.04)),
    #080808;
  padding: 10px 12px;
  cursor: move;
  user-select: none;
}

.thread-window-titlebar strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.thread-window-titlebar span {
  color: var(--muted);
  font-size: 12px;
}

.window-close,
.window-minimize,
.window-reset {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 5px 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.window-close:hover,
.window-minimize:hover,
.window-reset:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.drawer-original-message {
  border: 1px solid var(--user-color, rgba(255, 31, 31, 0.4));
  border-radius: var(--radius-sm);
  background: rgba(255, 31, 31, 0.08);
  padding: 12px;
  margin: 12px;
  flex: 0 0 auto;
}

.thread-messages {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  margin: 0 12px;
  padding-right: 4px;
  flex: 1 1 auto;
}

.thread-message {
  border-left: 2px solid var(--user-color, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.thread-composer {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}

.thread-composer textarea {
  min-height: 64px;
  max-height: 130px;
}

.thread-window.is-focused {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(255, 31, 31, 0.35),
    0 24px 90px rgba(0, 0, 0, 0.85),
    0 0 70px rgba(255, 31, 31, 0.22);
}

.thread-window.is-minimized {
  height: auto !important;
  min-height: 0;
  resize: none;
}

.thread-window.is-minimized .drawer-original-message,
.thread-window.is-minimized .thread-messages,
.thread-window.is-minimized .thread-composer {
  display: none;
}

.color-form,
.color-preview-card,
.account-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.color-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
}

.color-row input[type="color"] {
  min-height: 46px;
  padding: 4px;
}

.edited-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.75;
}

.live-new-message,
.live-new-reply {
  transform-origin: top center;
  animation: liveMessageArrive 0.38s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.live-edit-flash {
  animation: liveEditFlash 0.45s ease-out;
}

.deleted-fade-out {
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes messageFadeIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes liveMessageArrive {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.975);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--user-color, var(--accent)) 55%, transparent), 0 0 42px color-mix(in srgb, var(--user-color, var(--accent)) 26%, transparent);
  }
  58% {
    opacity: 1;
    transform: translateY(2px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes liveEditFlash {
  0% { box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.6), 0 0 28px rgba(255, 204, 0, 0.25); }
  100% { box-shadow: none; }
}

@keyframes threadWindowPop {
  0% { opacity: 0; transform: translateY(28px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .chat-topbar,
  .waterfall-intro {
    display: grid;
  }

  .chat-composer {
    position: static;
    transform: none;
    width: calc(100% - 32px);
    margin: 18px auto;
  }

  .chat-composer form {
    grid-template-columns: 1fr;
  }

  .typing-indicator {
    bottom: 18px;
  }

  .waterfall-stream {
    padding-bottom: 20px;
  }

  .floating-thread-windows {
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    max-width: none;
  }

  .thread-window {
    width: 100%;
    max-height: 72vh;
    resize: vertical;
  }

  .color-row {
    grid-template-columns: 1fr;
  }
}

@supports not (color: color-mix(in srgb, red, blue)) {
  .chat-message,
  .chat-avatar,
  .thread-message {
    border-color: var(--user-color, var(--accent));
  }
}

.modern-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.16), transparent 48%),
    rgba(16, 16, 16, 0.86);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 18px;
}

.modern-hero h1 {
  margin: 0;
  font-size: clamp(38px, 8vw, 82px);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.profile-hero {
  justify-content: flex-start;
}

.profile-page .modern-hero,
.profile-page .modern-panel,
.profile-page .metric-card,
.account-page .profile-card,
.account-page .color-form,
.account-page .account-details {
  border-color: color-mix(in srgb, var(--user-color, var(--accent)) 34%, var(--line));
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.42),
    0 0 34px color-mix(in srgb, var(--user-color, var(--accent)) 10%, transparent);
}

.profile-page .modern-hero,
.account-page .profile-card {
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--user-color, var(--accent)) 18%, transparent), transparent 38%),
    rgba(16, 16, 16, 0.88);
}

.profile-hero h1,
.user-color-name {
  color: var(--user-color, var(--accent));
  text-shadow: 0 0 28px color-mix(in srgb, var(--user-color, var(--accent)) 24%, transparent);
}

.profile-page .eyebrow,
.account-page .eyebrow {
  color: var(--user-color, var(--accent));
}

.profile-avatar-xl {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 1px solid var(--user-color, var(--accent));
  border-radius: 30px;
  background: color-mix(in srgb, var(--user-color, var(--accent)) 18%, transparent);
  box-shadow: 0 0 46px color-mix(in srgb, var(--user-color, var(--accent)) 28%, transparent);
  font-size: 48px;
  font-weight: 1000;
}

.admin-status-card {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.admin-status-card span,
.admin-status-card small,
.metric-card span,
.list-row span,
.report-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-status-card strong {
  display: block;
  margin: 5px 0;
  font-size: 22px;
}

.modern-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(16, 16, 16, 0.84);
  box-shadow: var(--shadow);
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.modern-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 16, 16, 0.86);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.modern-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.modern-list {
  display: grid;
  gap: 10px;
}

.compact-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.list-row strong {
  display: block;
  margin-bottom: 4px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 31, 31, 0.45);
  border-radius: 999px;
  background: rgba(255, 31, 31, 0.1);
  color: var(--text) !important;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.report-topline,
.report-meta,
.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.report-topline {
  justify-content: space-between;
}

.report-card h3 {
  margin: 10px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.report-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.admin-table td {
  color: var(--text);
  font-size: 14px;
}

.admin-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.warning-badge {
  border-color: rgba(255, 204, 0, 0.55);
  background: rgba(255, 204, 0, 0.1);
  color: #ffcc00;
}

.profile-post-list {
  display: grid;
  gap: 12px;
}

.profile-post-card {
  border: 1px solid var(--user-color, var(--line));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.profile-post-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .modern-hero,
  .admin-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .modern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-status-card {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .modern-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    text-align: left;
  }

  .profile-avatar-xl {
    width: 82px;
    height: 82px;
    font-size: 36px;
  }
}

.signup-card {
  overflow: hidden;
  position: relative;
}

.signup-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: rgba(255, 31, 31, 0.12);
  pointer-events: none;
}

.auth-copy {
  margin: 24px 0 18px;
}

.auth-copy h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 0 0 12px;
}

.auth-footnote {
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-footnote a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.auth-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.recovery-debug-link {
  overflow-wrap: anywhere;
  border: 1px solid rgba(98, 210, 255, 0.24);
  border-radius: 12px;
  padding: 12px;
  color: #a8e7ff;
  background: rgba(98, 210, 255, 0.08);
}

.recovery-debug-link a {
  color: #fff;
  font-weight: 900;
}

.success-banner {
  border: 1px solid rgba(23, 252, 51, 0.45);
  border-radius: 18px;
  background: rgba(23, 252, 51, 0.08);
  color: var(--text);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(23, 252, 51, 0.08);
}

.success-banner code {
  color: var(--good);
  font-weight: 1000;
}

.success-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(23, 252, 51, 0.55);
  border-radius: 18px;
  background: rgba(23, 252, 51, 0.09);
  color: var(--text);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 0 28px rgba(23, 252, 51, 0.1);
}

.success-banner span,
.latest-invite-card span,
.latest-invite-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.success-banner strong,
.latest-invite-card strong {
  display: block;
  color: var(--good);
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.latest-invite-card {
  border: 1px solid rgba(23, 252, 51, 0.38);
  border-radius: 16px;
  background: rgba(23, 252, 51, 0.06);
  padding: 14px;
  margin-bottom: 14px;
}

.copy-code {
  display: inline-block;
  margin-top: 6px;
  color: var(--good);
  font-weight: 900;
  font-size: 12px;
}

.moderation-panel {
  min-height: 360px;
}

.moderation-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.moderation-list {
  display: grid;
  gap: 12px;
}

.moderation-card {
  border: 1px solid rgba(255, 31, 31, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.moderation-card.is-closed {
  opacity: 0.72;
  border-color: var(--line);
}

.moderation-card-head,
.moderation-reason-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.moderation-card-head time,
.moderation-id,
.moderation-reason-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.moderation-reason-row h3 {
  margin: 14px 0 8px;
  text-transform: capitalize;
  letter-spacing: -0.03em;
  font-size: 24px;
}

.moderation-body {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
  margin: 10px 0;
}

.moderation-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.moderation-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.moderation-meta-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 10px;
}

.moderation-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.moderation-meta-grid strong {
  font-size: 13px;
}

.moderation-actions-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.moderation-closed-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 12px;
}

.empty-state-card {
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  padding: 22px;
  text-align: center;
}

.empty-state-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.empty-state-card span {
  color: var(--muted);
}

@media (max-width: 720px) {
  .moderation-meta-grid {
    grid-template-columns: 1fr;
  }

  .moderation-actions-grid {
    display: grid;
  }
}

.inline-form-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
}

.invite-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 12px 0 8px;
}

.invite-code-grid {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.invite-code-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(23, 252, 51, 0.24);
  border-radius: 16px;
  background: rgba(23, 252, 51, 0.045);
  padding: 12px;
}

.invite-code-card.is-revoked {
  opacity: 0.62;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.invite-code-card strong,
.invite-code-card code,
.invite-code-card span {
  display: block;
}

.invite-code-card code {
  color: var(--good);
  font-weight: 1000;
  margin: 5px 0;
}

.invite-code-card span {
  color: var(--muted);
  font-size: 12px;
}

.invite-card-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.revoked-invites {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.revoked-invites summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.offending-preview {
  border: 1px solid rgba(255, 204, 0, 0.35);
  border-radius: 16px;
  background: rgba(255, 204, 0, 0.055);
  padding: 12px;
  margin-top: 12px;
}

.offending-preview > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.offending-preview blockquote {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.case-preview-media {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  background: #050505;
  margin: 10px 0;
}

.offending-preview-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.suspend-inline-form {
  display: grid;
  grid-template-columns: 72px auto;
  gap: 6px;
  align-items: center;
}

.suspend-inline-form input {
  padding: 8px;
  min-width: 0;
}

.table-subtext {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.suspend-inline-form input[type="text"] {
  width: 86px;
  text-transform: lowercase;
}

.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-nav-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.12), transparent 45%),
    rgba(16, 16, 16, 0.86);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.admin-nav-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 31, 31, 0.65);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.5), 0 0 34px rgba(255, 31, 31, 0.13);
}

.admin-nav-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 1000;
}

.admin-nav-card strong {
  display: block;
  margin: 10px 0;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.admin-nav-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.swipe-moderation-list {
  scroll-snap-type: y proximity;
}

.swipe-card {
  scroll-snap-align: start;
}

.media-review-grid {
  display: grid;
  gap: 18px;
}

.media-review-card {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(16, 16, 16, 0.86);
  box-shadow: var(--shadow);
  padding: 16px;
}

.media-review-preview {
  min-height: 240px;
  border-radius: 18px;
  background: #050505;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.media-review-preview img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}

.media-review-hidden {
  display: grid;
  gap: 6px;
  text-align: center;
  color: var(--muted);
}

.media-review-hidden strong {
  color: var(--text);
}

.media-review-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.media-review-body h2 {
  margin: 4px 0 10px;
}

.media-review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.media-review-meta div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.media-review-meta dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
}

.media-review-meta dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.media-review-note {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
}

.media-review-actions {
  display: grid;
  gap: 10px;
}

.media-review-actions form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.media-review-actions input {
  min-width: 0;
  padding: 10px 12px;
}

@media (max-width: 760px) {
  .admin-nav-grid {
    grid-template-columns: 1fr;
  }

  .media-review-card,
  .media-review-actions form,
  .media-review-meta {
    grid-template-columns: 1fr;
  }
}

.moderation-control-bar {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(16, 16, 16, 0.84);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 18px;
}

.moderation-control-bar > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.moderation-control-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  margin-right: 4px;
}

.active-filter {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.16);
}

.moderation-case-stack {
  display: grid;
  gap: 16px;
}

.case-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  border: 1px solid rgba(255, 31, 31, 0.32);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.10), transparent 42%),
    rgba(16, 16, 16, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.case-priority-rail {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(255, 31, 31, 0.10);
  border-right: 1px solid rgba(255, 31, 31, 0.22);
  padding: 18px;
}

.case-priority-rail span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.case-priority-rail strong {
  font-size: 34px;
  letter-spacing: -0.06em;
  color: var(--accent-2);
}

.case-card-main {
  padding: 18px;
}

.case-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}

.case-card-head h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.06em;
}

.case-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.case-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.case-preview {
  margin: 16px 0;
}

.report-breakdown {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.report-breakdown summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.report-breakdown-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.report-mini-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.report-mini-card strong {
  text-transform: capitalize;
}

.report-mini-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.report-mini-card span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.case-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

@media (max-width: 760px) {
  .case-card {
    grid-template-columns: 1fr;
  }

  .case-priority-rail {
    display: flex;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 31, 31, 0.22);
  }

  .case-priority-rail span {
    writing-mode: initial;
    transform: none;
  }
}

.case-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, auto));
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.case-actions form {
  margin: 0;
}

.case-actions button {
  width: 100%;
}

.case-filed-out {
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.floating-admin-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: min(360px, calc(100vw - 36px));
}

@media (max-width: 900px) {
  .case-actions {
    grid-template-columns: 1fr;
  }
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
}

.read-only-banner {
  border: 1px solid rgba(255, 204, 0, 0.55);
  border-radius: 18px;
  background: rgba(255, 204, 0, 0.08);
  color: var(--text);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 0 28px rgba(255, 204, 0, 0.08);
}

.read-only-banner strong,
.read-only-banner span {
  display: block;
}

.read-only-banner strong {
  color: var(--accent-2);
  font-size: 18px;
  margin-bottom: 4px;
}

.read-only-banner span {
  color: var(--muted);
  line-height: 1.45;
}

.read-only-banner .suspension-note {
  margin-top: 8px;
  color: #ffe18a;
  font-weight: 800;
}

.inbox-list {
  display: grid;
  gap: 12px;
}

.inbox-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.inbox-card.is-unread {
  border-color: rgba(255, 204, 0, 0.45);
  background: rgba(255, 204, 0, 0.06);
}

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

.inbox-card-head time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inbox-card h3 {
  margin: 12px 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.inbox-card p {
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.5;
}

/* Waterfall polish shell */
.chaos-app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0 24px 42px;
}

.chaos-global-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  margin: 0 -24px 22px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(18px);
}

.chaos-brand,
.chaos-primary-nav,
.chaos-topbar-actions,
.chaos-profile-chip,
.chaos-rail-section a,
.chaos-contributor,
.chaos-stat-row {
  display: flex;
  align-items: center;
}

.chaos-brand {
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: -0.05em;
}

.chaos-brand-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ff1f2d;
  box-shadow: 0 0 28px rgba(255, 31, 45, 0.5);
}

.chaos-primary-nav {
  gap: 30px;
}

.chaos-primary-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 15px;
  font-weight: 850;
}

.chaos-primary-nav a.is-active,
.chaos-primary-nav a:hover {
  color: #ff2734;
}

.chaos-primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -27px;
  height: 2px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-topbar-actions {
  justify-content: end;
  gap: 12px;
}

.chaos-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  width: 245px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.55);
}

.chaos-search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  min-width: 0;
}

.chaos-search kbd {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 2px 5px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.chaos-icon-btn,
.chaos-nav-logout {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.chaos-icon-btn:hover,
.chaos-nav-logout:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.chaos-nav-logout {
  padding: 0 12px;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.chaos-profile-chip {
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.chaos-profile-chip strong,
.chaos-profile-chip small {
  display: block;
  line-height: 1.1;
}

.chaos-profile-chip small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 900;
}

.chaos-shell-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 315px;
  gap: 20px;
  max-width: 1720px;
  margin: 0 auto;
}

.chaos-left-rail,
.chaos-right-rail {
  position: sticky;
  top: 96px;
  align-self: start;
}

.chaos-left-rail {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(12, 12, 12, 0.82);
  overflow: hidden;
}

.chaos-rail-section {
  padding: 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chaos-rail-label {
  display: block;
  margin: 0 10px 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chaos-rail-section a {
  position: relative;
  min-height: 42px;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.chaos-rail-section a:hover,
.chaos-rail-section a.is-active {
  background: rgba(255, 31, 45, 0.16);
  color: #fff;
}

.chaos-rail-section a strong {
  margin-left: auto;
  min-width: 27px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 31, 45, 0.36);
  color: #ff4c55;
  text-align: center;
  font-size: 11px;
}

.chaos-rail-section a i {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-rail-footer {
  display: grid;
  gap: 4px;
  padding: 18px 24px 24px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.chaos-main-column {
  min-width: 0;
}

.chaos-waterfall-hero,
.chaos-inline-composer,
.chaos-post-card,
.chaos-side-card {
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(14, 14, 14, 0.86);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.42);
}

.chaos-waterfall-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  min-height: 190px;
  padding: 28px 34px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 74% 52%, rgba(255, 31, 45, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 31, 45, 0.13), transparent 34%),
    rgba(14, 14, 14, 0.86);
}

.chaos-waterfall-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.chaos-waterfall-hero h1 span {
  color: #ff2734;
}

.chaos-waterfall-hero p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

.chaos-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chaos-hero-pills span,
.chaos-hero-identity span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.chaos-hero-identity {
  align-self: center;
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #25d366;
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.55);
}

.chaos-inline-composer {
  margin: 14px 0 16px;
  padding: 14px;
  border-radius: 16px;
}

.chaos-inline-composer form {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
}

.chaos-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--user-color, rgba(255, 31, 45, 0.7));
  border-radius: 999px;
  background: rgba(255, 31, 45, 0.08);
  color: #fff;
  font-weight: 1000;
}

.chaos-avatar.small {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.chaos-inline-composer textarea {
  height: 46px;
  min-height: 46px;
  resize: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.chaos-composer-tools {
  display: flex;
  gap: 7px;
}

.chaos-composer-tools button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.chaos-composer-tools button:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chaos-send-btn {
  height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(255, 90, 98, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #ff2734, #bd1018);
  color: #fff;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.chaos-feed-stack {
  gap: 8px;
  padding-bottom: 32px;
}

.chaos-post-card {
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 18px 26px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(13, 13, 13, 0.9);
  box-shadow: none;
}

.chaos-post-card:hover {
  border-color: rgba(255, 31, 45, 0.28);
  background: rgba(16, 16, 16, 0.94);
}

.chaos-post-meta {
  gap: 10px;
  align-items: center;
}

.chaos-post-meta a {
  color: #ff2734;
  font-weight: 1000;
  text-decoration: none;
}

.chaos-post-meta span {
  color: rgba(255, 255, 255, 0.58);
}

.chaos-post-body p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.45;
}

.chaos-more-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.chaos-edit-box {
  margin-top: 12px;
}

.chaos-edit-box summary {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.chaos-post-actions {
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
}

.chaos-action-btn,
.chaos-report-box > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.chaos-action-btn:hover,
.chaos-report-box > summary:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.chaos-danger-btn {
  color: #ff3340;
}

.chaos-report-box {
  position: relative;
}

.chaos-report-box form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 280px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #101010;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.chaos-right-rail {
  display: grid;
  gap: 12px;
}

.chaos-side-card {
  border-radius: 16px;
  padding: 20px;
}

.chaos-side-card h2 {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chaos-side-card p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.chaos-stat-row {
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.chaos-stat-row strong {
  display: block;
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.chaos-stat-row span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chaos-contributor {
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.chaos-contributor:last-child {
  border-bottom: 0;
}

.chaos-contributor div {
  min-width: 0;
}

.chaos-contributor strong,
.chaos-contributor span {
  display: block;
}

.chaos-contributor strong {
  color: var(--user-color, #ff2734);
  font-size: 13px;
  text-shadow: 0 0 18px color-mix(in srgb, var(--user-color, var(--accent)) 24%, transparent);
}

.chaos-contributor span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.chaos-contributor em {
  margin-left: auto;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 1000;
}

.chaos-activity-list {
  display: grid;
  gap: 15px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chaos-activity-list li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 7px;
  align-items: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.chaos-activity-list li > span {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-activity-list strong {
  color: rgba(255, 255, 255, 0.86);
}

.chaos-activity-list em {
  color: rgba(255, 255, 255, 0.38);
  font-style: normal;
}

.chaos-app-shell .chat-composer {
  display: none;
}

@media (max-width: 1280px) {
  .chaos-shell-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .chaos-right-rail {
    display: none;
  }

  .chaos-global-topbar {
    grid-template-columns: 210px 1fr auto;
  }
}

@media (max-width: 940px) {
  .chaos-global-topbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .chaos-primary-nav,
  .chaos-topbar-actions {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .chaos-shell-grid {
    grid-template-columns: 1fr;
  }

  .chaos-left-rail {
    position: static;
    display: none;
  }

  .chaos-waterfall-hero,
  .chaos-inline-composer form,
  .chaos-post-card {
    display: grid;
  }

  .chaos-inline-composer form {
    grid-template-columns: auto 1fr;
  }

  .chaos-composer-tools,
  .chaos-send-btn {
    grid-column: 2;
  }

  .chaos-post-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .chaos-app-shell {
    padding: 0 12px 28px;
  }

  .chaos-global-topbar {
    margin: 0 -12px 16px;
  }

  .chaos-search {
    width: 100%;
  }

  .chaos-waterfall-hero {
    padding: 24px;
  }

  .chaos-waterfall-hero h1 {
    font-size: 40px;
  }

  .chaos-post-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .chaos-post-actions {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* Waterfall polish shell */
.chaos-app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0 24px 42px;
}

.chaos-global-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  margin: 0 -24px 22px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(18px);
}

.chaos-brand,
.chaos-primary-nav,
.chaos-topbar-actions,
.chaos-profile-chip,
.chaos-rail-section a,
.chaos-contributor,
.chaos-stat-row {
  display: flex;
  align-items: center;
}

.chaos-brand {
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: -0.05em;
}

.chaos-brand-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ff1f2d;
  box-shadow: 0 0 28px rgba(255, 31, 45, 0.5);
}

.chaos-primary-nav {
  gap: 30px;
}

.chaos-primary-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 15px;
  font-weight: 850;
}

.chaos-primary-nav a.is-active,
.chaos-primary-nav a:hover {
  color: #ff2734;
}

.chaos-primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -27px;
  height: 2px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-topbar-actions {
  justify-content: end;
  gap: 12px;
}

.chaos-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  width: 245px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.55);
}

.chaos-search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  min-width: 0;
}

.chaos-search kbd {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 2px 5px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.chaos-icon-btn,
.chaos-nav-logout {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.chaos-icon-btn:hover,
.chaos-nav-logout:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.chaos-nav-logout {
  padding: 0 12px;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.chaos-profile-chip {
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.chaos-profile-chip strong,
.chaos-profile-chip small {
  display: block;
  line-height: 1.1;
}

.chaos-profile-chip small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 900;
}

.chaos-shell-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 315px;
  gap: 20px;
  max-width: 1720px;
  margin: 0 auto;
}

.chaos-left-rail,
.chaos-right-rail {
  position: sticky;
  top: 96px;
  align-self: start;
}

.chaos-left-rail {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(12, 12, 12, 0.82);
  overflow: hidden;
}

.chaos-rail-section {
  padding: 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chaos-rail-label {
  display: block;
  margin: 0 10px 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chaos-rail-section a {
  position: relative;
  min-height: 42px;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.chaos-rail-section a:hover,
.chaos-rail-section a.is-active {
  background: rgba(255, 31, 45, 0.16);
  color: #fff;
}

.chaos-rail-section a strong {
  margin-left: auto;
  min-width: 27px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 31, 45, 0.36);
  color: #ff4c55;
  text-align: center;
  font-size: 11px;
}

.chaos-rail-section a i {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-rail-footer {
  display: grid;
  gap: 4px;
  padding: 18px 24px 24px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.chaos-main-column {
  min-width: 0;
}

.chaos-waterfall-hero,
.chaos-inline-composer,
.chaos-post-card,
.chaos-side-card {
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(14, 14, 14, 0.86);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.42);
}

.chaos-waterfall-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  min-height: 190px;
  padding: 28px 34px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 74% 52%, rgba(255, 31, 45, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 31, 45, 0.13), transparent 34%),
    rgba(14, 14, 14, 0.86);
}

.chaos-waterfall-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.chaos-waterfall-hero h1 span {
  color: #ff2734;
}

.chaos-waterfall-hero p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

.chaos-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chaos-hero-pills span,
.chaos-hero-identity span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.chaos-hero-identity {
  align-self: center;
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #25d366;
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.55);
}

.chaos-inline-composer {
  margin: 14px 0 16px;
  padding: 14px;
  border-radius: 16px;
}

.chaos-inline-composer form {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
}

.chaos-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--user-color, rgba(255, 31, 45, 0.7));
  border-radius: 999px;
  background: rgba(255, 31, 45, 0.08);
  color: #fff;
  font-weight: 1000;
}

.chaos-avatar.small {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.chaos-inline-composer textarea {
  height: 46px;
  min-height: 46px;
  resize: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.chaos-composer-tools {
  display: flex;
  gap: 7px;
}

.chaos-composer-tools button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.chaos-composer-tools button:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chaos-send-btn {
  height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(255, 90, 98, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #ff2734, #bd1018);
  color: #fff;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.chaos-feed-stack {
  gap: 8px;
  padding-bottom: 32px;
}

.chaos-post-card {
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 18px 26px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(13, 13, 13, 0.9);
  box-shadow: none;
}

.chaos-post-card:hover {
  border-color: rgba(255, 31, 45, 0.28);
  background: rgba(16, 16, 16, 0.94);
}

.chaos-post-meta {
  gap: 10px;
  align-items: center;
}

.chaos-post-meta a {
  color: #ff2734;
  font-weight: 1000;
  text-decoration: none;
}

.chaos-post-meta span {
  color: rgba(255, 255, 255, 0.58);
}

.chaos-post-body p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.45;
}

.chaos-more-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.chaos-edit-box {
  margin-top: 12px;
}

.chaos-edit-box summary {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.chaos-post-actions {
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
}

.chaos-action-btn,
.chaos-report-box > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.chaos-action-btn:hover,
.chaos-report-box > summary:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.chaos-danger-btn {
  color: #ff3340;
}

.chaos-report-box {
  position: relative;
}

.chaos-report-box form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 280px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #101010;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.chaos-right-rail {
  display: grid;
  gap: 12px;
}

.chaos-side-card {
  border-radius: 16px;
  padding: 20px;
}

.chaos-side-card h2 {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chaos-side-card p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.chaos-stat-row {
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.chaos-stat-row strong {
  display: block;
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.chaos-stat-row span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chaos-contributor {
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.chaos-contributor:last-child {
  border-bottom: 0;
}

.chaos-contributor div {
  min-width: 0;
}

.chaos-contributor strong,
.chaos-contributor span {
  display: block;
}

.chaos-contributor strong {
  color: #ff2734;
  font-size: 13px;
}

.chaos-contributor span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.chaos-contributor em {
  margin-left: auto;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 1000;
}

.chaos-activity-list {
  display: grid;
  gap: 15px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chaos-activity-list li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 7px;
  align-items: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.chaos-activity-list li > span {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #ff2734;
}

.chaos-activity-list strong {
  color: rgba(255, 255, 255, 0.86);
}

.chaos-activity-list em {
  color: rgba(255, 255, 255, 0.38);
  font-style: normal;
}

.chaos-app-shell .chat-composer {
  display: none;
}

@media (max-width: 1280px) {
  .chaos-shell-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .chaos-right-rail {
    display: none;
  }

  .chaos-global-topbar {
    grid-template-columns: 210px 1fr auto;
  }
}

@media (max-width: 940px) {
  .chaos-global-topbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .chaos-primary-nav,
  .chaos-topbar-actions {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .chaos-shell-grid {
    grid-template-columns: 1fr;
  }

  .chaos-left-rail {
    position: static;
    display: none;
  }

  .chaos-waterfall-hero,
  .chaos-inline-composer form,
  .chaos-post-card {
    display: grid;
  }

  .chaos-inline-composer form {
    grid-template-columns: auto 1fr;
  }

  .chaos-composer-tools,
  .chaos-send-btn {
    grid-column: 2;
  }

  .chaos-post-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .chaos-app-shell {
    padding: 0 12px 28px;
  }

  .chaos-global-topbar {
    margin: 0 -12px 16px;
  }

  .chaos-search {
    width: 100%;
  }

  .chaos-waterfall-hero {
    padding: 24px;
  }

  .chaos-waterfall-hero h1 {
    font-size: 40px;
  }

  .chaos-post-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .chaos-post-actions {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* Waterfall post action alignment fix */
.chaos-post-card .chat-body,
.chaos-post-card .chaos-post-body {
  min-width: 0;
}

.chaos-post-card .chat-actions,
.chaos-post-card .chaos-post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 16px;
}

.chaos-post-card .chat-actions form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.chaos-post-card .chaos-action-btn,
.chaos-post-card .mini-button,
.chaos-post-card .mini-link,
.chaos-post-card .chaos-report-box > summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.chaos-post-card .chaos-report-box {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.chaos-post-card .chaos-report-box > summary {
  list-style: none;
  cursor: pointer;
}

.chaos-post-card .chaos-report-box > summary::-webkit-details-marker {
  display: none;
}

.chaos-post-card .danger-mini-button {
  color: #ff3340;
}

@media (max-width: 760px) {
  .chaos-post-card .chat-actions,
  .chaos-post-card .chaos-post-actions {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

/* Waterfall compact 3-dot post menu */
.chaos-menu-actions {
  position: absolute;
  top: 18px;
  right: 22px;
  margin: 0;
  width: auto;
  justify-content: flex-end;
}

.chaos-post-card {
  position: relative;
  padding-right: 68px;
}

.chaos-post-menu {
  position: relative;
  display: inline-flex;
}

.chaos-post-menu > summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  letter-spacing: 0.08em;
  user-select: none;
}

.chaos-post-menu > summary::-webkit-details-marker,
.chaos-report-menu > summary::-webkit-details-marker {
  display: none;
}

.chaos-post-menu > summary:hover,
.chaos-post-menu[open] > summary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

.chaos-post-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 220px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 14px;
  background: rgba(13, 13, 13, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.72);
}

.chaos-post-menu-panel form {
  display: block;
  margin: 0;
}

.chaos-menu-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.chaos-menu-item:hover {
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
}

.chaos-menu-item span:last-child {
  margin-left: auto;
}

.chaos-menu-danger {
  color: #ff3a45;
}

.chaos-menu-danger:hover {
  background: rgba(255, 31, 45, 0.12);
  color: #ff5c65;
}

.chaos-report-menu {
  position: relative;
}

.chaos-report-menu-form {
  display: grid !important;
  gap: 8px;
  padding: 8px 4px 4px;
}

.chaos-report-menu-form select,
.chaos-report-menu-form input {
  min-height: 34px;
  font-size: 12px;
}

.chaos-report-menu-form .mini-button {
  width: 100%;
  justify-content: center;
}

/* Remove the old inline action button row styling when using menus */
.chaos-post-card .chaos-menu-actions .chaos-action-btn,
.chaos-post-card .chaos-menu-actions .mini-button,
.chaos-post-card .chaos-menu-actions .mini-link {
  height: auto;
  min-height: 0;
  padding: 0;
}

/* Waterfall inline media previews and menu edit */
.chaos-inline-media {
  display: block;
  margin-top: 14px;
  max-width: 420px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.chaos-inline-media img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.chaos-menu-edit {
  position: relative;
}

.chaos-menu-edit > summary {
  list-style: none;
}

.chaos-menu-edit > summary::-webkit-details-marker {
  display: none;
}

.chaos-menu-edit-form {
  display: grid !important;
  gap: 8px;
  padding: 8px 4px 4px;
}

.chaos-menu-edit-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font-size: 12px;
}

.chaos-menu-edit-form .mini-button {
  width: 100%;
  justify-content: center;
}


/* Profile pictures */
.chaos-avatar-img,
.profile-avatar-img,
.account-avatar-img {
  object-fit: cover;
  overflow: hidden;
}

.chaos-avatar-img {
  display: block;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chaos-avatar.chaos-avatar-img,
.chat-avatar.chaos-avatar-img {
  width: 48px;
  height: 48px;
}

.chaos-avatar.small.chaos-avatar-img {
  width: 38px;
  height: 38px;
}

.profile-avatar-img {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.account-avatar-img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.avatar-form input[type="file"] {
  min-height: 42px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.78);
}


.form-success {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.10);
  color: #7dffad;
  font-size: 14px;
  font-weight: 800;
}

.avatar-form.is-uploading {
  opacity: 0.72;
  pointer-events: none;
}

.avatar-form.is-uploading button {
  cursor: wait;
}


/* Newest-first waterfall motion */
@keyframes chaosMessageSlideDown {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.waterfall-list > .chat-message,
.chaos-feed-list > .chat-message,
.chaos-post-card {
  animation: chaosMessageSlideDown 220ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .waterfall-list > .chat-message,
  .chaos-feed-list > .chat-message,
  .chaos-post-card {
    animation: none;
  }
}


.waterfall-live-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 31, 31, 0.22);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.74);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.waterfall-live-diagnostics strong {
  color: #fff;
}

.waterfall-live-diagnostics[data-status="ok"] #waterfallLiveStatus {
  color: #7dffad;
}

.waterfall-live-diagnostics[data-status="error"] #waterfallLiveStatus,
.waterfall-live-diagnostics #waterfallLiveError:not([hidden]) {
  color: #ff8a8a;
}


.waterfall-debug-panel {
  border-color: rgba(255, 31, 31, 0.28);
}

.waterfall-debug-panel .waterfall-live-diagnostics {
  margin-top: 0;
  border-radius: 14px;
}

.debug-copy-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 31, 31, 0.35);
  border-radius: 12px;
  background: rgba(255, 31, 31, 0.14);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.debug-copy-button:hover {
  background: rgba(255, 31, 31, 0.22);
}

.debug-copy-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.debug-copy-status {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
}


.chaos-image-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted, #a7a7a7);
  cursor: pointer;
}

.chaos-image-upload-button:hover {
  border-color: rgba(255, 31, 31, 0.45);
  color: #fff;
}

.chaos-image-upload-button input {
  display: none;
}

.chaos-image-file-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted, #a7a7a7);
  font-size: 0.82rem;
}

.chaos-form-note.error {
  margin-bottom: 10px;
  border: 1px solid rgba(255, 31, 31, 0.35);
  background: rgba(255, 31, 31, 0.08);
  color: #ffd7d7;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.chaos-uploaded-media {
  margin-top: 12px;
}

.chaos-uploaded-media img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 16px;
}


.chaos-media-bar {
  gap: 10px;
  align-items: center;
}

.chaos-image-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 31, 31, 0.35);
  background: rgba(255, 31, 31, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chaos-image-upload-button:hover {
  border-color: rgba(255, 31, 31, 0.65);
  background: rgba(255, 31, 31, 0.14);
}

.chaos-image-upload-button input {
  display: none;
}

.chaos-image-file-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
}

.chaos-image-file-name.has-file {
  color: rgba(255, 255, 255, 0.82);
}

.chaos-send-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.chaos-uploaded-media {
  margin-top: 12px;
}

.chaos-uploaded-media img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 16px;
}

/* Ensure uploaded Waterfall post images are always visible */
.chat-body .chaos-uploaded-media,
.chaos-post-body .chaos-uploaded-media {
  display: block;
  width: 100%;
  margin-top: 12px;
  overflow: visible;
}

.chat-body .chaos-uploaded-media img,
.chaos-post-body .chaos-uploaded-media img {
  display: block;
  width: 100%;
  max-width: 680px;
  min-height: 80px;
  max-height: 520px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-message:has(.chaos-uploaded-media),
.chaos-post-card:has(.chaos-uploaded-media) {
  min-height: 180px;
}


/* Horizontal swipe feed */
.chaos-swipe-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 31, 31, 0.18), transparent 34rem),
    #050505;
  color: #f5f5f5;
}

.chaos-swipe-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chaos-swipe-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chaos-swipe-nav a {
  color: #cfcfcf;
  text-decoration: none;
}

.chaos-swipe-nav a:hover {
  color: #fff;
}

.chaos-swipe-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 34px 12px;
}

.chaos-swipe-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  letter-spacing: -0.06em;
}

.chaos-swipe-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin: 6px 34px 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 15, 15, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
}

.chaos-swipe-upload-panel h2 {
  margin: 4px 0 8px;
}

.chaos-swipe-upload-panel form {
  display: grid;
  gap: 10px;
}

.chaos-swipe-upload-panel textarea {
  min-height: 82px;
  resize: vertical;
}

.chaos-swipe-upload-panel .primary-button {
  justify-self: start;
}

.chaos-swipe-count {
  align-self: end;
  min-width: 140px;
  padding: 16px;
  border: 1px solid rgba(255, 31, 31, 0.24);
  border-radius: 22px;
  background: rgba(20, 20, 20, 0.78);
  text-align: right;
}

.chaos-swipe-count strong {
  display: block;
  font-size: 2rem;
}

.chaos-swipe-count span {
  color: #aaa;
}

.chaos-swipe-shell {
  position: relative;
  height: calc(100vh - 180px);
  min-height: 560px;
  padding: 12px 72px 32px;
}

.chaos-swipe-track {
  height: 100%;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  outline: none;
}

.chaos-swipe-track::-webkit-scrollbar {
  display: none;
}

.chaos-swipe-card {
  flex: 0 0 min(1120px, 88vw);
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  height: 100%;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(24, 24, 24, 0.98), rgba(8, 8, 8, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.chaos-swipe-media {
  min-width: 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #000;
  overflow: hidden;
}

.chaos-swipe-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chaos-swipe-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px;
}

.chaos-swipe-author {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chaos-swipe-author a {
  color: var(--user-color, #fff);
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 0 18px color-mix(in srgb, var(--user-color, var(--accent)) 24%, transparent);
}

.chaos-swipe-author span {
  display: block;
  margin-top: 3px;
  color: #888;
  font-size: 0.9rem;
}

.chaos-swipe-caption {
  font-size: 1.05rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chaos-swipe-actions {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.chaos-swipe-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 46px;
  height: 74px;
  border: 1px solid rgba(255, 31, 31, 0.28);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.82);
  color: #fff;
  font-size: 2.6rem;
  cursor: pointer;
}

.chaos-swipe-arrow:hover {
  background: rgba(255, 31, 31, 0.18);
}

.chaos-swipe-arrow-left {
  left: 18px;
}

.chaos-swipe-arrow-right {
  right: 18px;
}

@media (max-width: 840px) {
  .chaos-swipe-topbar,
  .chaos-swipe-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .chaos-swipe-nav {
    gap: 9px;
    font-size: 0.9rem;
  }

  .chaos-swipe-shell {
    height: calc(100vh - 190px);
    min-height: 520px;
    padding: 10px 14px 24px;
  }

  .chaos-swipe-card {
    flex-basis: 92vw;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .chaos-swipe-info {
    padding: 2px;
  }

  .chaos-swipe-arrow {
    display: none;
  }
}

/* Feed polish: centered app-like horizontal viewer */
.chaos-swipe-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.chaos-swipe-topbar {
  height: 68px;
  padding: 0 28px;
}

.chaos-swipe-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px 10px;
  align-items: end;
}

.chaos-swipe-hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.chaos-swipe-hero .muted {
  margin-top: 12px;
}

.chaos-swipe-count {
  transform: translateY(-8px);
}

.chaos-swipe-shell {
  max-width: 1320px;
  margin: 0 auto;
  height: calc(100vh - 210px);
  min-height: 590px;
  padding: 14px 76px 30px;
}

.chaos-swipe-track {
  align-items: center;
}

.chaos-swipe-card {
  flex: 0 0 min(1080px, 100%);
  height: min(100%, 650px);
  grid-template-columns: minmax(0, 1fr) 290px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 28px;
}

.chaos-swipe-media {
  border-radius: 22px;
}

.chaos-swipe-media img {
  max-height: 100%;
}

.chaos-swipe-info {
  padding: 12px 10px;
  min-width: 0;
}

.chaos-swipe-author {
  align-items: flex-start;
}

.chaos-swipe-caption {
  margin: 8px 0 0;
  color: #d8d8d8;
}

.chaos-swipe-actions {
  gap: 9px;
}

.chaos-swipe-actions .mini-button,
.chaos-swipe-actions .mini-link,
.chaos-swipe-actions summary {
  width: 100%;
  justify-content: center;
}

.chaos-swipe-arrow {
  top: calc(50% + 44px);
  width: 50px;
  height: 68px;
  background: rgba(15, 15, 15, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.chaos-swipe-arrow-left {
  left: 22px;
}

.chaos-swipe-arrow-right {
  right: 22px;
}

@media (min-width: 1500px) {
  .chaos-swipe-shell {
    max-width: 1420px;
  }

  .chaos-swipe-card {
    flex-basis: 1180px;
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 980px) {
  .chaos-swipe-hero {
    display: block;
  }

  .chaos-swipe-count {
    margin-top: 14px;
    transform: none;
    text-align: left;
  }

  .chaos-swipe-shell {
    height: calc(100vh - 230px);
    padding: 10px 16px 24px;
  }

  .chaos-swipe-card {
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
}

/* Feed one-card navigation polish */
.chaos-swipe-shell {
  height: calc(100vh - 230px);
  min-height: 520px;
  max-width: 1180px;
  padding-left: 72px;
  padding-right: 72px;
}

.chaos-swipe-track {
  gap: 0;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc((100% - min(920px, 82vw)) / 2);
}

.chaos-swipe-card {
  flex: 0 0 min(920px, 82vw);
  height: min(100%, 560px);
  grid-template-columns: minmax(0, 1fr) 260px;
  transform: scale(0.94);
  opacity: 0.42;
  filter: saturate(0.7);
  transition:
    transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 420ms ease,
    filter 420ms ease,
    box-shadow 420ms ease;
}

.chaos-swipe-card.is-active {
  transform: scale(1);
  opacity: 1;
  filter: saturate(1);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.chaos-swipe-card.is-before,
.chaos-swipe-card.is-after {
  pointer-events: none;
}

.chaos-swipe-media img {
  transform: scale(0.985);
  transition: transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.chaos-swipe-card.is-active .chaos-swipe-media img {
  transform: scale(1);
}

.chaos-swipe-arrow {
  top: calc(50% + 28px);
}

.chaos-swipe-arrow-left {
  left: max(16px, calc((100vw - 1180px) / 2 + 8px));
}

.chaos-swipe-arrow-right {
  right: max(16px, calc((100vw - 1180px) / 2 + 8px));
}

@media (min-width: 1500px) {
  .chaos-swipe-shell {
    max-width: 1240px;
  }

  .chaos-swipe-card {
    flex-basis: 980px;
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 980px) {
  .chaos-swipe-shell {
    height: calc(100vh - 235px);
    min-height: 500px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .chaos-swipe-track {
    scroll-padding-inline: 4vw;
  }

  .chaos-swipe-card {
    flex-basis: 92vw;
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    transform: scale(0.98);
    opacity: 0.58;
  }

  .chaos-swipe-card.is-active {
    transform: scale(1);
    opacity: 1;
  }
}

/* Feed polish: arrows outside card, remove count spacing */
.chaos-swipe-hero {
  justify-content: center;
  text-align: center;
}

.chaos-swipe-hero > div:first-child {
  max-width: 760px;
}

.chaos-swipe-shell {
  max-width: 1280px;
  padding-left: 108px;
  padding-right: 108px;
}

.chaos-swipe-card {
  flex-basis: min(860px, 76vw);
  height: min(100%, 520px);
  grid-template-columns: minmax(0, 1fr) 245px;
}

.chaos-swipe-arrow-left {
  left: max(18px, calc((100vw - 1280px) / 2 + 24px));
}

.chaos-swipe-arrow-right {
  right: max(18px, calc((100vw - 1280px) / 2 + 24px));
}

@media (min-width: 1500px) {
  .chaos-swipe-shell {
    max-width: 1360px;
  }

  .chaos-swipe-card {
    flex-basis: 900px;
  }

  .chaos-swipe-arrow-left {
    left: calc((100vw - 1360px) / 2 + 26px);
  }

  .chaos-swipe-arrow-right {
    right: calc((100vw - 1360px) / 2 + 26px);
  }
}

@media (max-width: 980px) {
  .chaos-swipe-hero {
    text-align: left;
  }

  .chaos-swipe-upload-panel {
    grid-template-columns: 1fr;
    margin-left: 16px;
    margin-right: 16px;
  }

  .chaos-swipe-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chaos-swipe-card {
    flex-basis: 92vw;
    height: 100%;
  }
}

/* Feed arrows: pin to viewport sides, outside active card */
.chaos-swipe-arrow {
  position: fixed;
  top: 56%;
  z-index: 80;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
}

.chaos-swipe-arrow-left {
  left: 28px !important;
}

.chaos-swipe-arrow-right {
  right: 28px !important;
}

@media (max-width: 980px) {
  .chaos-swipe-arrow {
    display: none;
  }
}

/* Live Activity spinning globe */
.live-globe-card {
  position: relative;
  overflow: hidden;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(255, 31, 31, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 31, 31, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(20, 20, 20, 0.96), rgba(6, 6, 6, 0.96));
  box-shadow: inset 0 0 32px rgba(255, 31, 31, 0.05), 0 18px 50px rgba(0, 0, 0, 0.35);
}

.live-globe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.live-globe-header strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.live-globe-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 31, 31, 0.35);
  border-radius: 999px;
  color: #ff5a5a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 31, 31, 0.08);
}

.live-globe-pulse::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 16px rgba(255, 31, 31, 0.9);
  animation: livePulse 1.5s ease-in-out infinite;
}

.live-globe {
  display: grid;
  place-items: center;
  min-height: 170px;
}

.live-globe-sphere {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 999px;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.16), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(255, 31, 31, 0.08), transparent 55%),
    linear-gradient(90deg, #101010, #202020 45%, #080808);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    inset -22px -10px 34px rgba(0, 0, 0, 0.78),
    inset 18px 6px 32px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(255, 31, 31, 0.22);
}

.live-globe-sphere::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(90deg,
      transparent 0 8%,
      rgba(255,255,255,0.08) 9% 10%,
      transparent 11% 21%,
      rgba(255,255,255,0.07) 22% 23%,
      transparent 24% 35%,
      rgba(255,255,255,0.08) 36% 37%,
      transparent 38% 50%,
      rgba(255,255,255,0.07) 51% 52%,
      transparent 53% 65%,
      rgba(255,31,31,0.18) 66% 68%,
      transparent 69% 100%);
  opacity: 0.72;
  animation: globeSpin 7s linear infinite;
}

.live-globe-sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 45%, rgba(255, 31, 31, 0.36), transparent 10%),
    radial-gradient(circle at 58% 34%, rgba(255, 31, 31, 0.28), transparent 8%),
    radial-gradient(circle at 70% 61%, rgba(255, 31, 31, 0.2), transparent 9%);
  filter: blur(1px);
  animation: globeGlow 2.4s ease-in-out infinite alternate;
}

.globe-band {
  position: absolute;
  left: -10%;
  right: -10%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
  pointer-events: none;
}

.band-a {
  top: 32%;
  height: 22px;
}

.band-b {
  top: 50%;
  height: 1px;
}

.band-c {
  top: 64%;
  height: 18px;
}

.globe-dot {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 16px rgba(255, 31, 31, 0.95), 0 0 32px rgba(255, 31, 31, 0.45);
  animation: livePulse 1.8s ease-in-out infinite;
}

.dot-us {
  left: 34%;
  top: 44%;
}

.dot-eu {
  left: 52%;
  top: 36%;
  animation-delay: 0.3s;
}

.dot-asia {
  left: 68%;
  top: 48%;
  animation-delay: 0.6s;
}

.live-globe-meta {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  color: #b8b8b8;
  font-size: 0.86rem;
}

.live-globe-meta b {
  color: #fff;
}

@keyframes globeSpin {
  from { transform: translateX(-18%); }
  to { transform: translateX(18%); }
}

@keyframes globeGlow {
  from { opacity: 0.58; }
  to { opacity: 1; }
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.35); opacity: 1; }
}

/* Live globe placement cleanup */
.sidebar-nav .live-globe-card,
.app-sidebar .live-globe-card,
.left-sidebar .live-globe-card,
.navigation-sidebar .live-globe-card {
  display: none !important;
}

.live-globe-card {
  width: 100%;
  margin: 12px 0 16px;
}

.live-globe {
  min-height: 150px;
}

.live-globe-sphere {
  width: 128px;
  height: 128px;
}

.live-globe-meta {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .live-globe-card {
    display: none;
  }
}

/* Live globe focused panel */
.chaos-side-card .live-globe-card {
  margin: 12px 0 0;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 31, 31, 0.2), transparent 52%),
    linear-gradient(145deg, rgba(18, 18, 18, 0.98), rgba(5, 5, 5, 0.98));
}

.chaos-side-card .live-globe-header {
  margin-bottom: 8px;
}

.chaos-side-card .live-globe-header strong {
  font-size: 1.05rem;
}

.chaos-side-card .live-globe {
  min-height: 180px;
}

.chaos-side-card .live-globe-sphere {
  width: 146px;
  height: 146px;
}

.chaos-side-card .live-globe-meta {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chaos-side-card .live-globe-meta span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chaos-side-card .live-globe-meta span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 31, 31, 0.85);
  box-shadow: 0 0 14px rgba(255, 31, 31, 0.7);
}

.chaos-side-card:has(.live-globe-card) {
  overflow: hidden;
}

/* Phase 2 Live Globe panel */
.chaos-side-card .live-globe-card {
  border-color: rgba(255, 31, 31, 0.3);
}

.live-globe-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.live-globe-stats div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.live-globe-stats strong {
  display: block;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.live-globe-stats span {
  display: block;
  margin-top: 5px;
  color: #a8a8a8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-globe-region {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 31, 31, 0.18);
  border-radius: 16px;
  background: rgba(255, 31, 31, 0.055);
}

.region-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.85);
  flex: 0 0 auto;
}

.live-globe-region strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}

.live-globe-region small {
  display: block;
  margin-top: 2px;
  color: #9d9d9d;
  font-size: 0.76rem;
}

.live-globe-privacy {
  margin: 10px 0 0;
  color: #777;
  font-size: 0.74rem;
  line-height: 1.35;
}

/* Phase 3 country-level live activity */
.live-globe-regions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.live-globe-regions .live-globe-region {
  margin-top: 0;
}

.region-dot.country-us,
.region-dot.country-ca,
.region-dot.country-gb,
.region-dot.country-au {
  background: #ff1f1f;
}

.region-dot.country-unknown {
  background: #777;
  box-shadow: 0 0 14px rgba(180, 180, 180, 0.35);
}

.live-globe-sphere.has-active-regions::after {
  opacity: 1;
}

/* Phase 4 Live Globe animation */
.live-globe-sphere-phase4 {
  isolation: isolate;
}

.live-globe-sphere-phase4::before {
  animation: globeSpin 5.8s linear infinite;
}

.live-globe-sphere-phase4::after {
  background:
    radial-gradient(circle at 20% 45%, rgba(255, 31, 31, 0.44), transparent 10%),
    radial-gradient(circle at 58% 34%, rgba(255, 31, 31, 0.36), transparent 8%),
    radial-gradient(circle at 70% 61%, rgba(255, 31, 31, 0.3), transparent 9%),
    radial-gradient(circle at 44% 54%, rgba(255, 31, 31, 0.18), transparent 16%);
  animation: globeGlow 1.8s ease-in-out infinite alternate;
}

.globe-scan {
  position: absolute;
  inset: -20%;
  z-index: 4;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 31, 31, 0.0) 45%,
    rgba(255, 31, 31, 0.45) 50%,
    rgba(255, 31, 31, 0.0) 55%,
    transparent 100%
  );
  filter: blur(1px);
  opacity: 0.85;
  animation: globeScan 3.2s ease-in-out infinite;
  pointer-events: none;
}

.globe-orbit {
  position: absolute;
  z-index: 2;
  inset: 12%;
  border: 1px solid rgba(255, 31, 31, 0.2);
  border-radius: 50%;
  transform: rotateX(64deg) rotateZ(0deg);
  pointer-events: none;
}

.orbit-a {
  animation: globeOrbitA 5.5s linear infinite;
}

.orbit-b {
  inset: 20%;
  border-color: rgba(255, 255, 255, 0.08);
  animation: globeOrbitB 7.2s linear infinite;
}

.globe-pulse-ring {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(255, 31, 31, 0.52);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  animation: countryPulseRing 2.4s ease-out infinite;
}

.ring-us {
  left: 34%;
  top: 44%;
}

.ring-eu {
  left: 52%;
  top: 36%;
  animation-delay: 0.5s;
}

.ring-asia {
  left: 68%;
  top: 48%;
  animation-delay: 1s;
}

.live-globe-region {
  position: relative;
  overflow: hidden;
}

.live-globe-region::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 31, 0.08), transparent);
  transform: translateX(-100%);
  animation: regionSweep 4.5s ease-in-out infinite;
}

.live-globe-region > * {
  position: relative;
  z-index: 1;
}

.live-globe-stats div {
  position: relative;
  overflow: hidden;
}

.live-globe-stats div::after {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-16deg);
  animation: statSheen 5.2s ease-in-out infinite;
}

@keyframes globeScan {
  0%, 100% { transform: translateX(-42%); opacity: 0; }
  15% { opacity: 0.85; }
  50% { transform: translateX(42%); opacity: 0.9; }
  85% { opacity: 0.2; }
}

@keyframes globeOrbitA {
  from { transform: rotateX(64deg) rotateZ(0deg); }
  to { transform: rotateX(64deg) rotateZ(360deg); }
}

@keyframes globeOrbitB {
  from { transform: rotateX(74deg) rotateZ(360deg); }
  to { transform: rotateX(74deg) rotateZ(0deg); }
}

@keyframes countryPulseRing {
  0% { transform: scale(0.2); opacity: 0; }
  18% { opacity: 0.85; }
  100% { transform: scale(1.75); opacity: 0; }
}

@keyframes regionSweep {
  0%, 70%, 100% { transform: translateX(-120%); }
  85% { transform: translateX(120%); }
}

@keyframes statSheen {
  0%, 65%, 100% { left: -35%; }
  82% { left: 115%; }
}

@media (prefers-reduced-motion: reduce) {
  .live-globe-sphere-phase4::before,
  .live-globe-sphere-phase4::after,
  .globe-scan,
  .globe-orbit,
  .globe-pulse-ring,
  .live-globe-region::before,
  .live-globe-stats div::after {
    animation: none !important;
  }
}

/* Phase 5 dynamic country markers */
.dynamic-globe-dot,
.dynamic-globe-ring {
  --dot-left: 50%;
  --dot-top: 50%;
}

.dynamic-globe-dot {
  left: var(--dot-left);
  top: var(--dot-top);
  width: calc(8px + min(var(--activity-count, 1), 8) * 1px);
  height: calc(8px + min(var(--activity-count, 1), 8) * 1px);
  transform: translate(-50%, -50%);
  opacity: 0.92;
}

.dynamic-globe-ring {
  left: var(--dot-left);
  top: var(--dot-top);
  width: calc(30px + min(var(--activity-count, 1), 8) * 4px);
  height: calc(30px + min(var(--activity-count, 1), 8) * 4px);
  margin: 0;
  transform: translate(-50%, -50%);
}

/* Approximate sidebar-globe positions, not exact geography. */
.dynamic-globe-dot.country-us,
.dynamic-globe-ring.country-us {
  --dot-left: 35%;
  --dot-top: 47%;
}

.dynamic-globe-dot.country-ca,
.dynamic-globe-ring.country-ca {
  --dot-left: 35%;
  --dot-top: 31%;
}

.dynamic-globe-dot.country-mx,
.dynamic-globe-ring.country-mx {
  --dot-left: 32%;
  --dot-top: 60%;
}

.dynamic-globe-dot.country-br,
.dynamic-globe-ring.country-br {
  --dot-left: 48%;
  --dot-top: 72%;
}

.dynamic-globe-dot.country-gb,
.dynamic-globe-ring.country-gb {
  --dot-left: 51%;
  --dot-top: 36%;
}

.dynamic-globe-dot.country-fr,
.dynamic-globe-ring.country-fr,
.dynamic-globe-dot.country-de,
.dynamic-globe-ring.country-de,
.dynamic-globe-dot.country-nl,
.dynamic-globe-ring.country-nl {
  --dot-left: 55%;
  --dot-top: 43%;
}

.dynamic-globe-dot.country-in,
.dynamic-globe-ring.country-in {
  --dot-left: 68%;
  --dot-top: 55%;
}

.dynamic-globe-dot.country-jp,
.dynamic-globe-ring.country-jp,
.dynamic-globe-dot.country-kr,
.dynamic-globe-ring.country-kr {
  --dot-left: 78%;
  --dot-top: 47%;
}

.dynamic-globe-dot.country-ph,
.dynamic-globe-ring.country-ph {
  --dot-left: 75%;
  --dot-top: 61%;
}

.dynamic-globe-dot.country-au,
.dynamic-globe-ring.country-au {
  --dot-left: 78%;
  --dot-top: 75%;
}

.dynamic-globe-dot.country-unknown,
.dynamic-globe-ring.country-unknown {
  --dot-left: 50%;
  --dot-top: 50%;
}

.dynamic-globe-dot.country-unknown {
  background: #888;
  box-shadow: 0 0 16px rgba(180, 180, 180, 0.45);
}

.dynamic-globe-ring.country-unknown {
  border-color: rgba(180, 180, 180, 0.3);
}

.live-globe-region .region-dot.country-us,
.live-globe-region .region-dot.country-ca,
.live-globe-region .region-dot.country-gb,
.live-globe-region .region-dot.country-au,
.live-globe-region .region-dot.country-fr,
.live-globe-region .region-dot.country-de,
.live-globe-region .region-dot.country-nl,
.live-globe-region .region-dot.country-br,
.live-globe-region .region-dot.country-mx,
.live-globe-region .region-dot.country-jp,
.live-globe-region .region-dot.country-kr,
.live-globe-region .region-dot.country-in,
.live-globe-region .region-dot.country-ph {
  background: #ff1f1f;
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.85);
}

/* Phase 5: real world-map globe texture */
.live-globe-world-map {
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.16), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(255, 31, 31, 0.08), transparent 55%),
    linear-gradient(90deg, #060606, #111 48%, #050505);
}

.globe-map-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  opacity: 0.92;
}

.globe-map-spin {
  transform-origin: 100px 100px;
  animation: globeMapDrift 14s linear infinite;
}

.globe-ocean {
  fill: rgba(4, 9, 12, 0.92);
}

.globe-land {
  fill: rgba(255, 31, 31, 0.24);
  stroke: rgba(255, 76, 76, 0.42);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 5px rgba(255, 31, 31, 0.35));
}

.land-na,
.land-eurasia {
  fill: rgba(255, 31, 31, 0.31);
}

.land-sa,
.land-af,
.land-au {
  fill: rgba(255, 31, 31, 0.19);
}

.live-globe-world-map::before {
  z-index: 2;
  opacity: 0.42;
}

.live-globe-world-map::after {
  z-index: 3;
  background:
    radial-gradient(circle at 34% 47%, rgba(255, 31, 31, 0.36), transparent 10%),
    radial-gradient(circle at 54% 40%, rgba(255, 31, 31, 0.3), transparent 8%),
    radial-gradient(circle at 73% 58%, rgba(255, 31, 31, 0.24), transparent 9%);
}

.live-globe-world-map .globe-scan,
.live-globe-world-map .globe-orbit,
.live-globe-world-map .globe-band,
.live-globe-world-map .globe-dot,
.live-globe-world-map .globe-pulse-ring {
  z-index: 5;
}

/* Dynamic country marker positions over the visible map. */
.dynamic-globe-dot,
.dynamic-globe-ring {
  --dot-left: 50%;
  --dot-top: 50%;
}

.dynamic-globe-dot {
  left: var(--dot-left);
  top: var(--dot-top);
  width: calc(8px + min(var(--activity-count, 1), 8) * 1px);
  height: calc(8px + min(var(--activity-count, 1), 8) * 1px);
  transform: translate(-50%, -50%);
  opacity: 0.96;
}

.dynamic-globe-ring {
  left: var(--dot-left);
  top: var(--dot-top);
  width: calc(30px + min(var(--activity-count, 1), 8) * 4px);
  height: calc(30px + min(var(--activity-count, 1), 8) * 4px);
  margin: 0;
  transform: translate(-50%, -50%);
}

.dynamic-globe-dot.country-us,
.dynamic-globe-ring.country-us {
  --dot-left: 35%;
  --dot-top: 47%;
}

.dynamic-globe-dot.country-ca,
.dynamic-globe-ring.country-ca {
  --dot-left: 34%;
  --dot-top: 33%;
}

.dynamic-globe-dot.country-mx,
.dynamic-globe-ring.country-mx {
  --dot-left: 33%;
  --dot-top: 60%;
}

.dynamic-globe-dot.country-br,
.dynamic-globe-ring.country-br {
  --dot-left: 49%;
  --dot-top: 72%;
}

.dynamic-globe-dot.country-gb,
.dynamic-globe-ring.country-gb {
  --dot-left: 53%;
  --dot-top: 37%;
}

.dynamic-globe-dot.country-fr,
.dynamic-globe-ring.country-fr,
.dynamic-globe-dot.country-de,
.dynamic-globe-ring.country-de,
.dynamic-globe-dot.country-nl,
.dynamic-globe-ring.country-nl {
  --dot-left: 57%;
  --dot-top: 44%;
}

.dynamic-globe-dot.country-in,
.dynamic-globe-ring.country-in {
  --dot-left: 70%;
  --dot-top: 56%;
}

.dynamic-globe-dot.country-jp,
.dynamic-globe-ring.country-jp,
.dynamic-globe-dot.country-kr,
.dynamic-globe-ring.country-kr {
  --dot-left: 81%;
  --dot-top: 47%;
}

.dynamic-globe-dot.country-ph,
.dynamic-globe-ring.country-ph {
  --dot-left: 77%;
  --dot-top: 62%;
}

.dynamic-globe-dot.country-au,
.dynamic-globe-ring.country-au {
  --dot-left: 80%;
  --dot-top: 76%;
}

.dynamic-globe-dot.country-unknown,
.dynamic-globe-ring.country-unknown {
  --dot-left: 50%;
  --dot-top: 50%;
}

.dynamic-globe-dot.country-unknown {
  background: #999;
  box-shadow: 0 0 16px rgba(210, 210, 210, 0.45);
}

.dynamic-globe-ring.country-unknown {
  border-color: rgba(210, 210, 210, 0.28);
}

@keyframes globeMapDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-180px); }
}

@media (prefers-reduced-motion: reduce) {
  .globe-map-spin {
    animation: none !important;
  }
}

/* Globe map visibility correction */
.live-globe-world-map {
  background:
    radial-gradient(circle at 36% 26%, rgba(255,255,255,0.18), transparent 17%),
    radial-gradient(circle at 50% 50%, rgba(255,31,31,0.04), transparent 58%),
    linear-gradient(90deg, #070b0e, #101316 48%, #050607);
}

.live-globe-world-map .globe-map-svg {
  z-index: 4;
  opacity: 1;
  mix-blend-mode: screen;
}

.live-globe-world-map .globe-map-spin {
  animation-duration: 22s;
}

.live-globe-world-map .globe-land {
  fill: rgba(255, 55, 55, 0.55);
  stroke: rgba(255, 145, 145, 0.72);
  stroke-width: 1.25;
  filter: drop-shadow(0 0 7px rgba(255, 31, 31, 0.75));
}

.live-globe-world-map .land-na,
.live-globe-world-map .land-eurasia {
  fill: rgba(255, 65, 65, 0.68);
}

.live-globe-world-map .land-sa,
.live-globe-world-map .land-af,
.live-globe-world-map .land-au {
  fill: rgba(255, 45, 45, 0.48);
}

.live-globe-world-map::before {
  opacity: 0.18;
}

.live-globe-world-map::after {
  z-index: 2;
  opacity: 0.3;
  background:
    radial-gradient(circle at 34% 47%, rgba(255,31,31,0.16), transparent 12%),
    radial-gradient(circle at 54% 40%, rgba(255,31,31,0.12), transparent 10%),
    radial-gradient(circle at 73% 58%, rgba(255,31,31,0.1), transparent 12%);
}

.live-globe-world-map .globe-scan {
  z-index: 6;
  opacity: 0.34;
  filter: blur(2px);
}

.live-globe-world-map .globe-orbit,
.live-globe-world-map .globe-band {
  z-index: 7;
  opacity: 0.55;
}

.live-globe-world-map .globe-dot,
.live-globe-world-map .globe-pulse-ring {
  z-index: 9;
}

/* Replace abstract globe with clear live world map */
.live-globe {
  min-height: auto !important;
  margin: 14px 0;
}

.live-world-map {
  position: relative;
  height: 150px;
  overflow: hidden;
  border: 1px solid rgba(255, 31, 31, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 31, 31, 0.13), transparent 62%),
    linear-gradient(145deg, rgba(8, 10, 12, 0.98), rgba(2, 2, 3, 0.98));
  box-shadow:
    inset 0 0 38px rgba(255, 31, 31, 0.06),
    0 18px 44px rgba(0, 0, 0, 0.32);
}

.live-world-map-svg {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  z-index: 2;
}

.world-land {
  fill: rgba(255, 45, 45, 0.34);
  stroke: rgba(255, 105, 105, 0.68);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 7px rgba(255, 31, 31, 0.42));
}

.land-north-america,
.land-europe-asia {
  fill: rgba(255, 55, 55, 0.48);
}

.live-map-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.38;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.live-world-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 31, 0.18), transparent);
  transform: translateX(-100%);
  animation: liveMapSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.live-map-marker {
  position: absolute;
  z-index: 5;
  width: calc(9px + min(var(--activity-count, 1), 8) * 1px);
  height: calc(9px + min(var(--activity-count, 1), 8) * 1px);
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow:
    0 0 0 6px rgba(255, 31, 31, 0.12),
    0 0 24px rgba(255, 31, 31, 0.95);
  transform: translate(-50%, -50%);
  animation: livePulse 1.7s ease-in-out infinite;
}

.live-map-marker.country-us { left: 28%; top: 48%; }
.live-map-marker.country-ca { left: 27%; top: 32%; }
.live-map-marker.country-mx { left: 25%; top: 65%; }
.live-map-marker.country-br { left: 42%; top: 76%; }
.live-map-marker.country-gb { left: 51%; top: 37%; }
.live-map-marker.country-fr,
.live-map-marker.country-de,
.live-map-marker.country-nl { left: 55%; top: 45%; }
.live-map-marker.country-in { left: 68%; top: 58%; }
.live-map-marker.country-jp,
.live-map-marker.country-kr { left: 82%; top: 48%; }
.live-map-marker.country-ph { left: 78%; top: 64%; }
.live-map-marker.country-au { left: 80%; top: 77%; }

.live-map-marker.country-unknown {
  left: 50%;
  top: 50%;
  background: #aaa;
  box-shadow:
    0 0 0 6px rgba(200, 200, 200, 0.1),
    0 0 18px rgba(220, 220, 220, 0.5);
}

@keyframes liveMapSweep {
  0%, 70%, 100% { transform: translateX(-120%); opacity: 0; }
  82% { opacity: 1; }
  92% { transform: translateX(120%); opacity: 0; }
}

/* Moderation and feed safety polish */
.subtle-pill {
  border-color: rgba(98, 210, 255, 0.28);
  color: #a8e7ff;
  background: rgba(98, 210, 255, 0.08);
}

.media-review-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.media-review-note strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.media-review-note.warning-note {
  border-left-color: #ff6b6b;
  color: #ffc9c9;
}

.media-review-actions .severe-review-form {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) auto;
}

.chaos-pending-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.chaos-pending-panel > span {
  color: #a8e7ff;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chaos-pending-panel div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(98, 210, 255, 0.18);
  border-radius: 14px;
  background: rgba(98, 210, 255, 0.055);
}

.chaos-pending-panel strong {
  color: #fff;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chaos-pending-panel small {
  color: #9db3bd;
  font-size: 0.78rem;
}

/* Live activity world map */
.live-activity-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(98, 210, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(12, 16, 19, 0.98), rgba(5, 5, 6, 0.98));
}

.live-activity-head,
.live-globe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.live-activity-head h2 {
  margin: 3px 0 0;
  color: #fff;
}

.live-activity-card .live-world-map {
  height: 190px;
  border-color: rgba(98, 210, 255, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 42%, rgba(98, 210, 255, 0.18), transparent 24%),
    radial-gradient(circle at 66% 48%, rgba(255, 31, 31, 0.12), transparent 30%),
    linear-gradient(145deg, #071015, #030506 72%);
  box-shadow:
    inset 0 0 46px rgba(98, 210, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.32);
}

.live-activity-card .live-world-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, transparent 50%),
    radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.34) 100%);
  background-size: 100% 6px, 100% 100%;
  pointer-events: none;
}

.live-activity-card .live-world-map::after {
  z-index: 6;
  background: linear-gradient(90deg, transparent, rgba(98, 210, 255, 0.2), rgba(255, 31, 31, 0.16), transparent);
}

.live-activity-card .live-world-map-svg {
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}

.live-activity-card .world-land {
  fill: rgba(98, 210, 255, 0.14);
  stroke: rgba(170, 235, 255, 0.54);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 7px rgba(98, 210, 255, 0.2));
}

.live-activity-card .land-north-america,
.live-activity-card .land-europe-asia {
  fill: rgba(255, 31, 31, 0.18);
  stroke: rgba(255, 132, 132, 0.58);
}

.live-activity-card .live-map-grid {
  background-image:
    linear-gradient(rgba(98, 210, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 210, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.48;
}

.live-activity-card .live-map-marker {
  left: var(--marker-left, 50%);
  top: var(--marker-top, 50%);
  width: calc(16px + min(var(--activity-count, 1), 8) * 1px);
  height: calc(16px + min(var(--activity-count, 1), 8) * 1px);
  display: grid;
  place-items: center;
  background: #ff3333;
  border: 2px solid rgba(255, 255, 255, 0.72);
  color: #fff;
  font-size: 0.63rem;
  font-weight: 900;
  box-shadow:
    0 0 0 5px rgba(255, 31, 31, 0.13),
    0 0 24px rgba(255, 31, 31, 0.78),
    0 8px 22px rgba(0, 0, 0, 0.35);
  animation: liveMarkerBeat 2s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.live-activity-card .live-map-marker::before {
  content: "";
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(255, 31, 31, 0.4);
  border-radius: inherit;
  opacity: 0;
  animation: liveMarkerRing 2s ease-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.live-activity-card .live-map-marker > span {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.live-activity-card .live-map-marker.country-unknown {
  background: #9aa2aa;
  box-shadow:
    0 0 0 5px rgba(180, 190, 200, 0.12),
    0 0 18px rgba(200, 210, 220, 0.42);
}

.live-activity-card .live-map-marker.country-unknown::before {
  border-color: rgba(200, 210, 220, 0.32);
}

.live-activity-card .live-globe-stats div {
  border-color: rgba(98, 210, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.live-activity-card .live-globe-region {
  margin-top: 0;
  border-color: rgba(98, 210, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.live-activity-card .live-globe-region em {
  margin-left: auto;
  color: #a8e7ff;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

@keyframes liveMarkerBeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.86; }
  50% { transform: translate(-50%, -50%) scale(1.16); opacity: 1; }
}

@keyframes liveMarkerRing {
  0% { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 760px) {
  .media-review-actions .severe-review-form,
  .media-review-meta {
    grid-template-columns: 1fr;
  }

  .live-activity-card .live-world-map {
    height: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-activity-card .live-world-map::after,
  .live-activity-card .live-map-marker,
  .live-activity-card .live-map-marker::before {
    animation: none !important;
  }
}

/* Collapsed feed upload drawer */
.compact-upload-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.chaos-upload-summary {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  justify-content: space-between;
}

.chaos-upload-summary > div:first-child {
  min-width: 0;
}

.chaos-upload-drawer {
  position: relative;
  min-width: min(360px, 36vw);
  justify-self: end;
}

.chaos-upload-drawer summary {
  list-style: none;
  cursor: pointer;
  justify-content: center;
  text-align: center;
}

.chaos-upload-drawer summary::-webkit-details-marker {
  display: none;
}

.chaos-upload-form {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(430px, calc(100vw - 40px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(98, 210, 255, 0.18);
  border-radius: 16px;
  background: rgba(9, 11, 13, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.chaos-upload-drawer:not([open]) .chaos-upload-form {
  display: none;
}

.chaos-upload-drawer[open] summary {
  border-color: rgba(98, 210, 255, 0.42);
  background: rgba(98, 210, 255, 0.12);
}

/* Admin users polish */
.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  align-items: start;
  gap: 16px;
}

.admin-user-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 31, 31, 0.09), transparent 34%),
    rgba(16, 16, 16, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  padding: 18px;
}

.admin-user-card-head,
.admin-user-status,
.admin-user-action-row.compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-user-card-head {
  justify-content: space-between;
}

.admin-user-card-head a {
  display: inline-block;
  color: var(--user-color, var(--accent));
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 900;
  text-shadow: 0 0 18px color-mix(in srgb, var(--user-color, var(--accent)) 22%, transparent);
}

.admin-user-card-head > div:first-child > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-user-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-user-facts div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-user-facts dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-facts dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-user-facts small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-user-note {
  margin: 0;
  color: #ffcc00;
}

.admin-user-actions {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.admin-user-action-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-user-action-row.danger-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-user-action-row input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  font-size: 0.86rem;
}

.admin-user-action-row select,
.audit-filter-card select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(12, 12, 12, 0.95);
  padding: 8px 10px;
  font-weight: 800;
}

.admin-user-action-row button {
  white-space: nowrap;
}

.audit-metrics {
  margin-bottom: 16px;
}

.audit-filter-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 16, 16, 0.86);
  padding: 16px;
}

.audit-filter-card form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.audit-filter-card label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.audit-filter-card label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-timeline {
  display: grid;
  gap: 12px;
}

.audit-event-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(12, 12, 12, 0.9);
  padding: 16px;
}

.audit-event-mark {
  width: 10px;
  min-height: 100%;
  border-radius: 99px;
  background: linear-gradient(#ff1f1f, rgba(98, 210, 255, 0.65));
  box-shadow: 0 0 20px rgba(255, 31, 31, 0.28);
}

.audit-event-head,
.audit-event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-event-head strong {
  color: #fff;
  text-transform: capitalize;
}

.audit-event-head span,
.audit-event-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.audit-event-card p {
  margin: 8px 0 12px;
  color: rgba(255, 255, 255, 0.76);
}

.ip-history-list {
  display: grid;
  gap: 10px;
}

.ip-history-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.ip-history-row strong,
.ip-history-row span,
.ip-history-row small {
  display: block;
}

.ip-history-row strong {
  overflow-wrap: anywhere;
}

.ip-history-row span,
.ip-history-row small {
  color: var(--muted);
}

.live-activity-card .live-world-map-svg {
  inset: 8px 6px;
  width: calc(100% - 12px);
  height: calc(100% - 16px);
}

.live-activity-card .world-land {
  fill: rgba(98, 210, 255, 0.13);
  stroke: rgba(190, 240, 255, 0.48);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.live-activity-card .live-map-marker {
  width: 4px;
  height: 4px;
  border-width: 1px;
  box-shadow:
    0 0 0 2px rgba(255, 31, 31, 0.14),
    0 0 12px rgba(255, 31, 31, 0.78),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.live-activity-card .live-map-marker::before {
  inset: -5px;
}

.chat-meta a,
.chaos-post-meta a,
.chaos-swipe-author a,
.chaos-contributor strong,
.admin-user-card-head a {
  color: var(--user-color, var(--accent));
}

@media (max-width: 980px) {
  .compact-upload-panel {
    grid-template-columns: 1fr;
  }

  .chaos-upload-summary {
    display: grid;
  }

  .chaos-upload-drawer {
    min-width: 0;
    width: 100%;
    justify-self: stretch;
  }

  .chaos-upload-form {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .admin-user-grid,
  .admin-user-facts,
  .audit-filter-card form,
  .ip-history-row {
    grid-template-columns: 1fr;
  }

  .admin-user-action-row,
  .admin-user-action-row.danger-row {
    grid-template-columns: 1fr;
  }
}

/* Account settings refresh */
.account-settings-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(255, 31, 31, 0.16), transparent 360px),
    #050607;
}

.account-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 34px 20px;
  border-right: 1px solid rgba(255, 31, 31, 0.18);
  background:
    radial-gradient(circle at 30% 0, rgba(255, 31, 31, 0.2), transparent 34%),
    rgba(8, 8, 9, 0.94);
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: -0.05em;
}

.account-brand span {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #ff1f1f;
  box-shadow: 0 0 28px rgba(255, 31, 31, 0.65);
}

.account-side-nav {
  display: grid;
  align-content: start;
  gap: 14px;
  margin-top: 18px;
}

.account-side-nav a {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  text-decoration: none;
}

.account-side-nav a.is-active {
  border-color: color-mix(in srgb, var(--user-color, var(--good)) 68%, transparent);
  background: color-mix(in srgb, var(--user-color, var(--good)) 9%, transparent);
}

.account-side-nav b {
  font-size: 24px;
  text-transform: uppercase;
}

.account-side-nav small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.35;
}

.account-logout-form button {
  width: 100%;
  min-height: 64px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.account-settings-main {
  width: min(100%, 1200px);
  padding: 42px 28px 52px;
}

.account-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.account-settings-head h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.account-settings-head p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 21px;
}

.account-identity-card,
.account-settings-card,
.account-info-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 10, 12, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.account-identity-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-bottom: 20px;
}

.account-avatar-frame {
  width: 164px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--user-color, var(--good));
  border-radius: 50%;
  background: color-mix(in srgb, var(--user-color, var(--good)) 14%, #0b0d0e);
  box-shadow: 0 0 38px color-mix(in srgb, var(--user-color, var(--good)) 35%, transparent);
}

.account-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-frame span {
  color: var(--user-color, var(--good));
  font-size: 64px;
  font-weight: 1000;
}

.account-identity-main h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 46px);
}

.account-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.account-stat-strip div {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.account-stat-strip strong {
  color: var(--user-color, var(--good));
  font-size: 38px;
  line-height: 1;
}

.account-stat-strip span {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 850;
  text-transform: uppercase;
}

.account-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-settings-card {
  padding: 28px;
}

.account-card-title {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.account-card-title h2 {
  margin: 0;
  font-size: 26px;
}

.account-card-title p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
}

.account-card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--user-color, var(--good)) 18%, transparent);
  color: var(--user-color, var(--good));
  font-weight: 1000;
}

.account-upload-form {
  display: grid;
  gap: 16px;
}

.account-dropzone {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-align: center;
}

.account-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.account-dropzone strong {
  color: #fff;
}

.account-dropzone span {
  color: var(--user-color, var(--good));
  font-weight: 900;
}

.account-dropzone small {
  color: rgba(255, 255, 255, 0.58);
}

.account-dropzone.is-dragging,
.account-dropzone.has-file {
  border-color: var(--user-color, var(--good));
  background: color-mix(in srgb, var(--user-color, var(--good)) 8%, transparent);
}

.account-button-row,
.account-color-custom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.account-button-row {
  grid-template-columns: 1fr 1fr;
}

.account-color-swatches {
  display: grid;
  grid-template-columns: repeat(7, 48px);
  gap: 18px;
  align-items: center;
  margin: 18px 0 28px;
}

.account-color-swatch {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--swatch) 30%, transparent);
}

.account-color-swatch.is-selected {
  outline: 3px solid var(--user-color, var(--good));
  outline-offset: 5px;
}

.account-color-custom {
  grid-template-columns: 66px minmax(0, 1fr) 170px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.account-color-custom input[type="color"] {
  height: 58px;
  padding: 6px;
  border-color: rgba(255, 255, 255, 0.1);
}

.account-color-custom input[data-color-hex] {
  height: 58px;
  font-size: 18px;
}

.account-info-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
  padding: 24px 28px;
}

.account-info-card div + div,
.account-info-card div + form {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 24px;
}

.account-info-card span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 8px;
}

.account-info-card strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.account-security-card strong {
  color: var(--user-color, var(--good));
}

.account-security-copy,
.account-email-change-form {
  min-width: 0;
}

.account-security-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.account-email-change-form {
  display: grid;
  gap: 10px;
}

.account-email-change-form label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-email-change-form input {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.11);
}

.account-email-change-form button {
  min-height: 46px;
  color: #06110b;
  background: var(--user-color, var(--good));
}

.form-success a {
  color: #fff;
  font-weight: 1000;
}

.list-row small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-error,
.form-success {
  margin-bottom: 16px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 850;
}

.form-error {
  border: 1px solid rgba(255, 204, 0, 0.4);
  background: rgba(255, 204, 0, 0.08);
  color: #ffdd66;
}

.form-success {
  border: 1px solid color-mix(in srgb, var(--user-color, var(--good)) 42%, transparent);
  background: color-mix(in srgb, var(--user-color, var(--good)) 10%, transparent);
  color: var(--user-color, var(--good));
}

.chaos-inline-composer form {
  grid-template-columns: auto 1fr auto;
}

.live-activity-card .live-map-marker {
  pointer-events: none;
}

@media (max-width: 980px) {
  .account-settings-shell {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
    height: auto;
  }

  .account-side-nav,
  .account-identity-card,
  .account-card-grid,
  .account-info-card {
    grid-template-columns: 1fr;
  }

  .account-info-card div + div,
  .account-info-card div + form {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-left: 0;
    padding-top: 18px;
  }

  .account-color-swatches {
    grid-template-columns: repeat(4, 48px);
  }
}

@media (max-width: 620px) {
  .account-settings-main {
    padding: 28px 16px 42px;
  }

  .account-settings-head,
  .account-button-row,
  .account-color-custom {
    grid-template-columns: 1fr;
  }

  .account-settings-head {
    display: grid;
    align-items: start;
  }
}

/* Login refresh */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.login-card {
  width: min(460px, 100%);
  margin: 0;
  display: grid;
  gap: 20px;
  border-color: rgba(255, 31, 31, 0.28);
  background:
    radial-gradient(circle at 0 0, rgba(255, 31, 31, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(18, 18, 18, 0.96), rgba(5, 5, 6, 0.96));
}

.login-logo {
  width: fit-content;
}

.login-card .auth-copy h1 {
  margin-bottom: 8px;
}

.login-card .auth-copy p:not(.eyebrow) {
  margin: 0;
}

.login-card form {
  gap: 10px;
}

.login-card label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card input {
  min-height: 48px;
}

.login-card button[type="submit"] {
  min-height: 48px;
  margin-top: 4px;
}

.chaos-left-rail .live-activity-card {
  margin: 14px;
  padding: 16px;
  border-radius: 16px;
}

.chaos-left-rail .live-activity-card .live-activity-head {
  position: relative;
  display: block;
  min-height: 40px;
}

.chaos-left-rail .live-activity-card .live-activity-head h2 {
  font-size: 0.86rem;
}

.chaos-left-rail .live-activity-card .live-globe-pulse {
  position: absolute;
  top: 0;
  right: 0;
}

.chaos-left-rail .live-activity-card .live-world-map {
  height: 150px;
}

.chaos-left-rail .live-activity-card .live-globe-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chaos-left-rail .live-activity-card .live-globe-stats strong {
  font-size: 1.25rem;
}

.chaos-left-rail .live-activity-card .live-globe-stats div {
  padding: 12px 10px;
}

.chaos-left-rail .live-activity-card .live-globe-stats span {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .chaos-left-rail .live-activity-card {
    margin: 14px 0 0;
  }
}

/* Open beta landing page */
.chaos-landing-page {
  min-height: 100vh;
  color: #f7f7f7;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 31, 31, 0.2), transparent 34rem),
    radial-gradient(circle at 80% 18%, rgba(255, 31, 31, 0.12), transparent 30rem),
    #050505;
  overflow-x: hidden;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  padding: 24px;
  isolation: isolate;
}

.landing-bg-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.landing-red-orb {
  position: absolute;
  z-index: -2;
  border-radius: 999px;
  filter: blur(26px);
  background: rgba(255, 31, 31, 0.28);
}

.orb-one {
  width: 280px;
  height: 280px;
  top: 16%;
  right: 16%;
}

.orb-two {
  width: 180px;
  height: 180px;
  bottom: 16%;
  left: 12%;
  opacity: 0.65;
}

.landing-nav {
  max-width: 1240px;
  margin: 0 auto;
  height: 68px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(18px);
}

.landing-brand,
.landing-nav-links a {
  color: #fff;
  text-decoration: none;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.landing-nav-links a {
  color: #c8c8c8;
  font-size: 0.95rem;
}

.landing-nav-links a:hover {
  color: #fff;
}

.landing-hero-content {
  max-width: 1240px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 42px;
  align-items: center;
  padding: 40px 8px;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #ff4d4d;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.landing-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.9);
}

.landing-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(4rem, 8vw, 7.8rem);
  line-height: 0.84;
  letter-spacing: -0.08em;
}

.landing-copy h1::selection,
.landing-copy p::selection {
  background: rgba(255, 31, 31, 0.35);
}

.landing-tagline {
  max-width: 640px;
  margin: 26px 0 0;
  color: #d4d4d4;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.landing-primary,
.landing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.landing-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff1f1f, #8e0505);
  box-shadow: 0 14px 38px rgba(255, 31, 31, 0.28);
}

.landing-secondary {
  color: #f0f0f0;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.045);
}

.landing-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.landing-proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a8a8a8;
  font-size: 0.9rem;
}

.landing-proof-row i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 12px rgba(255,31,31,0.75);
}

.landing-product-showcase {
  position: relative;
  min-height: 620px;
}

.showcase-window {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(24,24,24,0.96), rgba(7,7,7,0.96));
  box-shadow: 0 26px 90px rgba(0,0,0,0.5);
  backdrop-filter: blur(14px);
}

.showcase-top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.showcase-top span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.showcase-top strong {
  margin-left: auto;
  color: #f7f7f7;
  font-size: 0.85rem;
}

.chat-preview {
  width: 450px;
  min-height: 340px;
  left: 0;
  top: 66px;
  transform: rotate(-2deg);
}

.feed-preview {
  width: 310px;
  min-height: 400px;
  right: 22px;
  top: 0;
  transform: rotate(3deg);
}

.live-preview {
  width: 320px;
  min-height: 255px;
  left: 120px;
  bottom: 18px;
  transform: rotate(1deg);
}

.preview-message {
  display: flex;
  gap: 12px;
  margin: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
}

.preview-message.featured {
  border-color: rgba(255,31,31,0.24);
}

.preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #242424;
  color: #fff;
  font-weight: 900;
}

.preview-avatar.red {
  background: #8e0505;
}

.preview-message strong {
  color: #fff;
}

.preview-message p {
  margin: 5px 0 0;
  color: #b9b9b9;
}

.preview-composer {
  margin: 18px 16px;
  padding: 12px;
  border-radius: 999px;
  display: flex;
  justify-content: space-between;
  color: #777;
  background: rgba(255,255,255,0.055);
}

.preview-composer b {
  color: #ff5757;
}

.feed-preview-card {
  padding: 16px;
}

.feed-preview-image {
  height: 250px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,31,31,0.35), transparent 35%),
    #050505;
  border: 1px solid rgba(255,31,31,0.22);
}

.feed-preview-image span {
  color: rgba(255,255,255,0.54);
  font-weight: 950;
  letter-spacing: 0.18em;
}

.feed-preview-actions,
.live-preview-stats {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.feed-preview-actions b,
.live-preview-stats span {
  flex: 1;
  padding: 10px;
  border-radius: 14px;
  text-align: center;
  color: #ddd;
  background: rgba(255,255,255,0.055);
}

.showcase-top.compact {
  justify-content: space-between;
}

.showcase-top.compact em {
  color: #ff5757;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 950;
}

.landing-mini-map {
  position: relative;
  height: 116px;
  margin: 14px 16px 0;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(255,31,31,0.16), transparent 60%), #050607;
  border: 1px solid rgba(255,31,31,0.18);
}

.landing-mini-map svg {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
}

.landing-mini-map path {
  fill: rgba(255, 45, 45, 0.34);
  stroke: rgba(255, 105, 105, 0.7);
}

.map-pulse {
  position: absolute;
  left: 30%;
  top: 48%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow: 0 0 22px rgba(255,31,31,0.95);
  animation: livePulse 1.8s ease-in-out infinite;
}

.landing-feature-strip,
.landing-beta-panel {
  max-width: 1240px;
  margin: 0 auto;
}

.landing-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0 24px 64px;
}

.landing-feature-strip article,
.landing-beta-panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  background: rgba(255,255,255,0.04);
}

.landing-feature-strip article {
  padding: 24px;
}

.landing-feature-strip span {
  color: #ff4d4d;
  font-weight: 950;
}

.landing-feature-strip h2,
.landing-beta-panel h2 {
  margin: 12px 0 8px;
  color: #fff;
}

.landing-feature-strip p,
.landing-beta-panel p {
  color: #a9a9a9;
  line-height: 1.5;
}

.landing-beta-panel {
  margin-bottom: 60px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-beta-panel h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.06em;
}

@media (max-width: 980px) {
  .landing-hero {
    padding: 14px;
  }

  .landing-nav {
    height: auto;
    padding: 16px;
    align-items: flex-start;
  }

  .landing-nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .landing-hero-content {
    display: block;
    padding-top: 46px;
  }

  .landing-copy h1 {
    font-size: clamp(3.4rem, 16vw, 5.6rem);
  }

  .landing-product-showcase {
    min-height: 760px;
    margin-top: 42px;
  }

  .chat-preview,
  .feed-preview,
  .live-preview {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin: 18px 0;
    transform: none;
  }

  .landing-feature-strip {
    grid-template-columns: 1fr;
  }

  .landing-beta-panel {
    display: block;
  }

  .landing-beta-panel .landing-primary {
    margin-top: 18px;
  }
}
