body,
html {
  overflow-x: hidden;
}
:root {
  --danger: #9c3b4a;
  --bg: #090f1d;
  --panel: #1a2925;
  --panel-raised: #21332d;
  --row-hover: #1f312b;
  --line: #2a3d36;
  --text: #ece6d8;
  --text-dim: #8fa39a;
  --gold: #d4b94e;
  --teal: #3e7d5a;
  --orange: #d97757;
  --gender-male: #5b8fc7;
  --gender-female: #d67fa6;
  --gender-neutral: #a991d4;
  --nav-bg: rgba(4, 9, 7, 0.8);
  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}
:root.light-mode,
body.light,
body.light-mode,
html.light-mode {
  --danger: #d32f2f;
  --bg: #f0f4f8;
  --panel: #ffffff;
  --panel-raised: #eceff1;
  --nav-bg: rgba(17, 28, 36, 0.98);
  --row-hover: #eceff1;
  --line: #e2e8f0;
  --text: #1e293b;
  --text-dim: #64748b;
  --gold: #c5a85c;
  --teal: #0d9488;
  --orange: #ea580c;
  --gender-male: #3b82f6;
  --gender-female: #ec4899;
  --gender-neutral: #8b5cf6;
}
:root.light-mode #navbar {
  background: #111c24 !important;
  --text: #ffffff;
  --text-dim: #94a3b8;
  --gold: #d4b94e;
  --line: rgba(255, 255, 255, 0.08);
}
:root.light-mode #side-rail {
  background: #111c24 !important;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --gold: #d4b94e;
  --line: rgba(255, 255, 255, 0.08);
}
:root.light-mode .room-head,
:root.light-mode .thread-head {
  background: #111c24 !important;
  --text: #ffffff;
  --text-dim: #94a3b8;
  --gold: #d4b94e;
  --line: rgba(255, 255, 255, 0.08);
}
:root.light-mode #filter-rail {
  background: #eceff1 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
:root.light-mode #mobile-filters-trigger,
:root.light-mode .mobile-nav-btn {
  background: linear-gradient(180deg, #525254 0, #303032 100%) !important;
  border: 1px solid #1a1a1c !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.15) !important;
  color: #fff !important;
}
:root.light-mode #mobile-filters-trigger .filters-badge {
  background: #1a1a1c !important;
  border: 1px solid #1a1a1c !important;
  color: #fff !important;
}
:root.light-mode #search-input {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
}
:root.light-mode #search-input::placeholder {
  color: #94a3b8 !important;
}
:root.light-mode #search-wrap .search-icon {
  stroke: #64748b !important;
}
:root.light-mode #mobile-search-close {
  color: #64748b !important;
}
:root.light-mode .random-panel {
  background: #f4f6f8 !important;
}
:root.light-mode .settings-opt-row {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
}
:root.light-mode .random-btn.ghost {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
:root.light-mode #mobile-profile-menu {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}
:root.light-mode .mobile-profile-opt {
  color: #1e293b !important;
}
:root.light-mode .mobile-profile-opt:hover {
  background: #f4f6f8 !important;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body,
html {
  margin: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
body {
  min-height: 100dvh;
}
#app {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: 100dvh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  border: none;
  border-radius: 0;
  overflow: hidden;
}
#side-rail {
  width: 68px;
  flex-shrink: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 0;
  gap: 2px;
  overflow-y: auto;
  z-index: 50;
}
.rail-btn {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-height: 44px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.rail-btn svg {
  width: 19px;
  height: 19px;
}
@media (hover: hover) {
  .rail-btn:hover {
    color: var(--text);
    background: var(--row-hover);
  }
}
.rail-btn.active {
  color: var(--gold);
}
.rail-btn.active svg {
  stroke: var(--gold);
}
#main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
#navbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "brand search live user";
  align-items: center;
  gap: 12px 14px;
  padding: 11px 18px;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 100;
}
.brand {
  grid-area: brand;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.brand span {
  color: var(--gold);
}
.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 768px) {
  .brand-logo {
    height: 30px;
  }
}
#nav-tabs {
  grid-area: tabs;
  display: flex;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
  justify-self: start;
}
.nav-tab {
  border: none;
  background: 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab.active {
  background: var(--panel-raised);
  color: var(--text);
}
.rail-btn.nav-tab {
  font-size: 9px !important;
  font-weight: 400 !important;
  padding: 10px 4px !important;
  white-space: normal !important;
  min-height: 44px !important;
}
.rail-btn.nav-tab.active {
  background: var(--btn-hover) !important;
  color: var(--gold) !important;
}
#search-wrap {
  grid-area: search;
  width: 100%;
  margin-left: 10px;
  max-width: 260px;
  position: relative;
}
#search-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  padding: 8px 10px 8px 30px;
  border-radius: 7px;
  outline: 0;
}
#search-input:focus {
  border-color: var(--teal);
}
#search-input::placeholder {
  color: var(--text-dim);
}
.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  stroke: var(--text-dim);
  pointer-events: none;
}
.live-count {
  grid-area: live;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  justify-self: end;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(212, 185, 78, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 185, 78, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(212, 185, 78, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 185, 78, 0);
  }
}
.user-session {
  grid-area: user;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  justify-self: end;
}
#logout-btn {
  background: 0 0;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}
#logout-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  letter-spacing: 0.01em;
}
.nav-pill-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(111, 169, 138, 0.08);
}
#views {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.view {
  display: none;
  height: 100%;
  min-height: 0;
}
.view.active {
  display: flex;
}
#view-users {
  flex-direction: row;
  min-height: 0;
}
#list-col {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  min-height: 0;
}
#filter-rail {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(88px, 1fr) minmax(
      100px,
      1fr
    ) 32px;
  gap: 4px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  align-items: stretch;
}
.age-range {
  min-width: 0;
}
#gender-filter,
#sexuality-filter {
  min-width: 0;
  width: 100%;
}
#more-filters-btn {
  width: 32px;
  justify-self: end;
}
.age-range {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
}
.age-range:focus-within {
  border-color: var(--teal);
}
.age-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  flex-shrink: 0;
}
.age-sep {
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
}
.age-input {
  width: 30px;
  background: 0 0;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 0;
  outline: 0;
  text-align: center;
  -moz-appearance: textfield;
}
.age-input::-webkit-inner-spin-button,
.age-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#more-filters-btn {
  flex-shrink: 0;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 6px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#more-filters-btn svg {
  width: 15px;
  height: 15px;
}
#more-filters-btn.open,
#more-filters-btn:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.filters-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--gold);
  color: #17251f;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#filter-extra {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--panel-raised);
}
#filter-extra.open {
  display: flex;
}
.filter-extra-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-extra-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  width: 46px;
  flex-shrink: 0;
}
#clear-filters-btn {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
  padding: 2px 0 0;
}
#clear-filters-btn:hover {
  color: var(--text);
}
.rail-select {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  outline: 0;
}
.rail-select:focus,
.rail-select:hover {
  color: var(--text);
  border-color: var(--teal);
}
.rail-select option {
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  color: var(--text);
  text-transform: none;
}
#user-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 10px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 12px 14px 6px;
}
.group-label.primary {
  color: var(--gold);
}
.group-label .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 10px;
  cursor: pointer;
  border-left: 3px solid transparent;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.user-row.gender-male {
  background: rgba(91, 143, 199, 0.07);
  border-left-color: rgba(91, 143, 199, 0.55);
}
.user-row.gender-female {
  background: rgba(214, 127, 166, 0.07);
  border-left-color: rgba(214, 127, 166, 0.55);
}
.user-row.gender-non-binary {
  background: rgba(169, 145, 212, 0.08);
  border-left-color: rgba(169, 145, 212, 0.55);
}
.user-row:hover {
  background: var(--row-hover);
}
.user-row.selected {
  background: var(--panel-raised);
  border-left-color: var(--gold);
}
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  color: #142019;
}
.status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--panel);
}
.user-row.selected .status-dot {
  border-color: var(--panel-raised);
}
.status-dot.online {
  background: var(--teal-glow);
  color: #fff;
}
.status-dot.idle {
  background: var(--gold);
}
.status-dot.away {
  background: #5c6d65;
}
.u-meta {
  min-width: 0;
  flex: 1;
}
.u-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.u-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}
.u-sexuality {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--teal);
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.you-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: #17251f;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
}
.user-row.is-you {
  border-left-color: var(--gold);
}
.u-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.unread-badge {
  background: #9c3b4a;
  color: #f5e6e6;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.flag {
  font-size: 15px;
  line-height: 1;
}
#empty-state {
  padding: 30px 18px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: none;
}
.dm-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
  min-width: 0;
}
.active-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.active-chat.hidden {
  display: none;
}
.thread-head {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 10;
  gap: 10px;
}
.chat-back-btn {
  display: none;
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  margin: -4px 0 -4px -4px;
  flex-shrink: 0;
}
.chat-back-btn svg {
  width: 20px;
  height: 20px;
}
.chat-back-btn:hover {
  color: var(--text);
}
.thread-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.thread-title .at {
  color: var(--text-dim);
  font-weight: 600;
}
.head-spacer {
  flex: 1;
}
.head-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 14px;
}
.head-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}
.head-icons button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.head-icons button:hover {
  color: var(--text);
}
.head-icons svg {
  width: 17px;
  height: 17px;
}
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.system-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding-bottom: 2px;
}
.system-line b {
  color: var(--gold);
  font-weight: 700;
}
.msg-group {
  display: flex;
  gap: 10px;
}
.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: #142019;
  margin-top: 1px;
}
.msg-lines {
  min-width: 0;
  flex: 1;
}
.msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-name {
  font-size: 13px;
  font-weight: 700;
}
.msg-name.mine {
  color: var(--gold);
}
.msg-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.msg-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
#no-chat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--text-dim);
}
#no-chat .big {
  font-size: 26px;
}
#no-chat p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin: 0;
}
.inbox-msg-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}
.inbox-msg-group:hover .inbox-msg-actions {
  opacity: 1;
  pointer-events: auto;
}
.inbox-msg-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 2px;
}
.inbox-msg-act-btn {
  background: 0 0;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  transition:
    background 0.1s,
    color 0.1s;
}
.inbox-msg-act-btn:hover {
  background: var(--row-hover);
  color: var(--text);
}
.inbox-msg-act-btn.danger:hover {
  color: var(--danger);
}
.inbox-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel-raised);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.inbox-reply-bar svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--teal);
}
.inbox-reply-bar[hidden] {
  display: none;
}
#inbox-reply-bar-close {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  margin-left: auto;
  padding: 2px 4px;
  font-size: 13px;
}
#inbox-reply-bar-close:hover {
  color: var(--text);
}
.inbox-msg-replied-to {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--panel-raised);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  border-left: 2px solid var(--teal);
}
.inbox-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.inbox-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.inbox-reaction-chip.mine {
  border-color: var(--teal);
  background: rgba(111, 169, 138, 0.12);
}
.inbox-reaction-chip-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.inbox-filter-btn {
  font-family: var(--font-body);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.inbox-filter-btn:hover {
  border-color: var(--teal);
  color: var(--text);
}
.inbox-filter-btn.active {
  background: rgba(111, 169, 138, 0.15);
  color: var(--teal);
  border-color: var(--teal);
}
.inbox-typing {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  min-height: 18px;
}
#compose {
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--panel-raised);
  flex-shrink: 0;
}
.head-icons button.active-icon {
  color: var(--gold);
}
.head-icons button.active-icon svg {
  fill: var(--gold);
}
#block-btn:hover,
#report-btn:hover {
  color: var(--orange);
}
.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
}
.input-wrap:focus-within {
  border-color: var(--teal);
}
#inbox-msg-input {
  flex: 1;
  min-width: 0;
  background: 0 0;
  border: none;
  outline: 0;
  padding: 12px 0;
  color: var(--text);
  font-size: 13px;
}
#inbox-msg-input::placeholder {
  color: var(--text-dim);
}
.input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.input-actions button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 6px;
}
.input-actions button:hover {
  color: var(--text);
  background: var(--row-hover);
}
.input-actions svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
#inbox-send-btn {
  color: var(--teal) !important;
}
#inbox-send-btn:hover {
  color: var(--text) !important;
}
.input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.input-actions button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.input-actions button:hover {
  color: var(--text);
}
.input-actions svg {
  width: 17px;
  height: 17px;
}
#chat-view-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
  text-align: center;
  padding: 30px;
}
#chat-view-body .big-icon {
  font-size: 28px;
  margin-bottom: 2px;
}
#chat-view-body h3 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 17px;
  margin: 0;
}
#chat-view-body p {
  font-family: var(--font-mono);
  font-size: 11px;
  max-width: 320px;
  line-height: 1.6;
  margin: 0;
}
.random-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.random-modal[hidden] {
  display: none;
}
.random-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 12, 0.72);
  backdrop-filter: blur(4px);
}
.random-panel {
  position: relative;
  width: min(440px, 100%);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.65);
  max-height: min(92dvh, 640px);
  overflow-y: auto;
}
.random-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
  border-radius: 6px;
}
.random-close:hover {
  color: var(--text);
  background: var(--row-hover);
}
.random-close svg {
  width: 18px;
  height: 18px;
}
.random-header {
  text-align: center;
  margin-bottom: 22px;
}
.random-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.random-icon svg {
  width: 22px;
  height: 22px;
}
.random-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}
.random-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}
.random-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  margin-bottom: 20px;
}
.random-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.random-field > span {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.random-field .rail-select {
  width: 100%;
}
.random-age {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}
.random-age:focus-within {
  border-color: var(--teal);
}
.random-age .age-input {
  flex: 1;
}
.random-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.random-btn {
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}
.random-btn.primary {
  background: var(--gold);
  color: #17251f;
}
.random-btn.primary:hover {
  filter: brightness(1.05);
}
.random-btn.ghost {
  background: 0 0;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.random-btn.ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.random-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0 4px;
}
.random-status[hidden] {
  display: none;
}
.random-status-title {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
  color: var(--text);
}
.random-status-detail {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 280px;
}
.random-pulse {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  border-top-color: transparent;
  animation: random-spin 0.85s linear infinite;
  margin-bottom: 6px;
}
@keyframes random-spin {
  to {
    transform: rotate(360deg);
  }
}
.random-match-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
}
.random-match-card .avatar {
  width: 48px;
  height: 48px;
  font-size: 15px;
  flex-shrink: 0;
}
.random-match-meta {
  min-width: 0;
  flex: 1;
}
.random-match-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin: 0 0 4px;
}
.random-match-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 2px;
}
.random-match-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.random-match-flag {
  font-size: 22px;
  flex-shrink: 0;
}
#view-inbox {
  flex-direction: row;
  min-height: 0;
}
#inbox-list-col {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  min-height: 0;
}
#inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.inbox-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.inbox-unread-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(212, 185, 78, 0.12);
  padding: 3px 7px;
  border-radius: 10px;
}
#inbox-thread-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
#inbox-empty-state {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 30px 20px;
  color: var(--text-dim);
}
#inbox-empty-state p {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  margin: 0;
}
#inbox-empty-state.visible {
  display: flex;
}
.inbox-thread-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  min-height: 64px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.inbox-thread-row:hover {
  background: var(--row-hover);
}
.inbox-thread-row.selected {
  background: var(--panel-raised);
  border-left-color: var(--gold);
}
.inbox-thread-row.has-unread {
  border-left-color: #9c3b4a;
}
.inbox-thread-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.inbox-thread-row .avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.inbox-thread-meta {
  flex: 1;
  min-width: 0;
}
.inbox-thread-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.inbox-thread-preview {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}
.inbox-thread-row.has-unread .inbox-thread-preview {
  color: var(--text);
  font-weight: 500;
}
.inbox-thread-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.inbox-thread-time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.inbox-thread-badge {
  background: #9c3b4a;
  color: #f5e6e6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.inbox-rail-badge {
  position: absolute;
  top: 6px;
  right: 10px;
  background: #9c3b4a;
  color: #f5e6e6;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  line-height: 1;
  pointer-events: none;
}
#inbox-rail-btn {
  position: relative;
}
#shared-dm-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
  min-width: 0;
}
#inbox-no-chat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--text-dim);
}
#inbox-no-chat .big {
  font-size: 28px;
}
#inbox-no-chat p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin: 0;
}
#inbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
#inbox-compose {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--panel-raised, #161b22);
  flex-shrink: 0;
  width: 100%;
}
.msg-input-wrap,
.input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  padding: 4px 10px;
  transition: border-color 0.2s, background 0.2s;
}
.msg-input-wrap:focus-within,
.input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}
#inbox-msg-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: var(--text, #f0f6fc) !important;
  font-size: 14px !important;
  outline: none !important;
  padding: 8px 6px !important;
  box-shadow: none !important;
}
#inbox-msg-input::placeholder {
  color: var(--text-dim, #8b949e);
}
.img-btn,
.mic-btn,
.gift-btn,
.send-btn,
.compose-icon-btn,
.compose-send-btn {
  background: transparent !important;
  border: none !important;
  color: var(--text-dim, #8b949e);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s, transform 0.15s;
  line-height: 1;
}
.img-btn:hover,
.mic-btn:hover,
.gift-btn:hover,
.compose-icon-btn:hover {
  color: var(--text, #f0f6fc);
  background: rgba(255, 255, 255, 0.1) !important;
}
.send-btn,
.compose-send-btn {
  color: var(--gold, #ffd700) !important;
}
.send-btn:hover,
.compose-send-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 215, 0, 0.2) !important;
  transform: scale(1.08);
}
.send-btn svg,
.img-btn svg,
.mic-btn svg,
.compose-icon-btn svg,
.compose-send-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
@media (max-width: 1100px) {
  #list-col {
    width: 300px;
  }
  #search-wrap {
    max-width: 200px;
  }
}
@media (max-width: 1024px) {
  #list-col {
    width: 270px;
  }
  #search-wrap {
    max-width: 160px;
  }
  .nav-tab {
    font-size: 11.5px;
    padding: 7px 10px;
  }
}
@media (max-width: 768px) {
  #messages {
    padding: 12px;
    gap: 12px;
  }
  .msg-text {
    font-size: 14px;
  }
  #no-chat .big {
    font-size: 22px;
  }
  #no-chat p {
    font-size: 11px;
    padding: 0 20px;
    text-align: center;
  }
  #chat-view-body {
    padding: 20px;
  }
  #chat-view-body h3 {
    font-size: 16px;
  }
  #view-inbox.active {
    flex-direction: column;
  }
  #inbox-list-col {
    width: 100%;
    flex-shrink: 0;
  }
  #shared-dm-panel {
    display: none;
  }
  #view-inbox.show-chat #inbox-list-col {
    display: none;
  }
  #view-inbox.show-chat .dm-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
  }
  .random-modal {
    padding: 12px;
    align-items: flex-end;
  }
  .random-panel {
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 24px 18px calc(18px + env(safe-area-inset-bottom, 0));
    max-height: 90dvh;
  }
  .random-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .random-actions {
    flex-direction: column-reverse;
  }
  .random-btn {
    width: 100%;
  }
}
@media (max-width: 480px) {
  #navbar {
    padding: 8px 10px;
    gap: 6px;
  }
  .brand {
    font-size: 15px;
  }
}
.inbox-msg-replied-to svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.inbox-msg-replied-to b {
  color: var(--teal);
  margin-right: 4px;
}
.inbox-msg-replied-to:hover {
  background: var(--line);
}
.inbox-msg-deleted {
  color: var(--text-dim);
  font-style: italic;
  font-size: 12.5px;
}
.inbox-msg-edited {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 5px;
}
.inbox-inline-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.inbox-inline-edit-wrap textarea {
  background: var(--bg);
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 8px;
  resize: none;
  outline: 0;
  width: 100%;
}
.inbox-inline-edit-actions {
  display: flex;
  gap: 6px;
}
.inbox-edit-cancel-btn,
.inbox-edit-save-btn {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  font-family: var(--font-body);
}
.inbox-edit-save-btn {
  background: var(--teal-glow);
  color: #fff;
  color: #0f1e18;
}
.inbox-edit-cancel-btn {
  background: 0 0;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.inbox-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.inbox-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.inbox-reaction-chip:hover {
  border-color: var(--teal);
}
.inbox-reaction-chip.mine {
  border-color: var(--gold);
  background: rgba(212, 185, 78, 0.1);
}
.inbox-reaction-chip-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.inbox-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.inbox-reply-bar[hidden] {
  display: none;
}
.inbox-reply-bar svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--teal);
}
#inbox-reply-bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#inbox-reply-bar-text b {
  color: var(--teal);
}
#inbox-reply-bar-close {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
}
#inbox-reply-bar-close:hover {
  color: var(--text);
}
.ctx-menu {
  position: fixed;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 2000;
  min-width: 160px;
}
.ctx-menu[hidden] {
  display: none;
}
.ctx-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: 0 0;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}
.ctx-menu button:hover {
  background: var(--row-hover);
}
.ctx-menu button.ctx-danger {
  color: var(--orange);
}
.ctx-menu button.ctx-danger:hover {
  background: rgba(217, 119, 87, 0.12);
}
.react-picker {
  position: fixed;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 2000;
}
.react-picker[hidden] {
  display: none;
}
.react-quick {
  display: flex;
  gap: 4px;
}
.react-quick button {
  background: 0 0;
  border: none;
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 6px;
  transition: background 0.1s;
}
.react-quick button:hover {
  background: var(--row-hover);
}
#inbox-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#inbox-confirm-modal[hidden] {
  display: none;
}
#inbox-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 12, 0.72);
  backdrop-filter: blur(4px);
}
.confirm-panel {
  position: relative;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px 22px;
  width: min(360px, 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.confirm-icon {
  font-size: 28px;
  margin-bottom: 10px;
}
.confirm-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin: 0 0 6px;
}
.confirm-body {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 20px;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-btn {
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  min-height: 40px;
}
.modal-btn.ghost {
  background: 0 0;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.modal-btn.ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.modal-btn.danger {
  background: #9c3b4a;
  color: #f5e6e6;
}
.modal-btn.danger:hover {
  filter: brightness(1.1);
}
.modal-btn.primary {
  background: var(--gold);
  color: #17251f;
}
.modal-btn.primary:hover {
  filter: brightness(1.05);
}
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 4000;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.inbox-typing {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.inbox-typing.show {
  opacity: 1;
}
.typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.typing-dots span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-glow);
  color: #fff;
  animation: tdot 1.2s infinite;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes tdot {
  0%,
  100%,
  80% {
    transform: scale(1);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}
.inbox-emoji-panel {
  background: var(--panel-raised);
  border-top: 1px solid var(--line);
  padding: 8px;
  flex-shrink: 0;
  max-height: 220px;
  overflow-y: auto;
}
.inbox-emoji-panel[hidden] {
  display: none;
}
.inbox-emoji-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.inbox-etab {
  background: 0 0;
  border: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: 7px;
  padding: 4px 7px;
}
.inbox-etab.active,
.inbox-etab:hover {
  background: var(--line);
}
.inbox-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 2px;
}
.inbox-emoji-grid button {
  background: 0 0;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-emoji-grid button:hover {
  background: var(--row-hover);
}
.inbox-filters {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.inbox-filter-btn {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.inbox-filter-btn:hover {
  border-color: var(--teal);
  color: var(--text);
}
.inbox-filter-btn.active {
  background: rgba(144, 194, 138, 0.15);
  color: var(--teal);
  border-color: var(--teal);
}
#view-chat {
  flex-direction: row;
  min-height: 0;
}
#rooms-col {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  min-height: 0;
}
#cat-dropdown-wrap {
  position: relative;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
#cat-dropdown-btn {
  width: 100%;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
#cat-dropdown-btn:hover {
  color: var(--text);
  background: var(--row-hover);
}
#cat-dropdown-btn.open {
  color: var(--gold);
}
#cat-dropdown-btn svg:first-child {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
#cat-dropdown-btn .chevron {
  width: 13px;
  height: 13px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s;
}
#cat-dropdown-btn.open .chevron {
  transform: rotate(180deg);
}
#cat-dropdown-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#cat-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  padding: 4px 0;
  max-height: 300px;
  overflow-y: auto;
}
#cat-dropdown-menu[hidden] {
  display: none;
}
.cat-opt {
  width: 100%;
  background: 0 0;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.cat-opt:hover {
  background: var(--row-hover);
  color: var(--text);
}
.cat-opt.active {
  color: var(--gold);
  background: rgba(212, 185, 78, 0.08);
}
.cat-opt.active::before {
  content: "●";
  margin-right: 2px;
  font-size: 7px;
}
.cat-btn {
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cat-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.cat-btn.active {
  background: var(--panel-raised);
  color: var(--gold);
  border-color: var(--gold);
}
#rooms-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 8px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
#rooms-empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: none;
}
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 0 16px 24px 16px;
}
.room-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #1c1e2a;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.room-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 0 2px var(--gold);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}
.room-card.active::after {
  opacity: 1;
}
.room-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.room-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}
.room-title-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.room-name-text {
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-sub-text {
  font-size: 12px;
  color: var(--text-dim);
}
.room-desc-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #9a9eab;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.5;
}
.room-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.room-online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.room-online-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}
.room-join-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
}
.room-card:hover .room-join-btn {
  background: var(--gold);
  color: #142019;
  border-color: var(--gold);
}
.scroll-bottom-btn {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: #142019;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 100;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
}
.scroll-bottom-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.room-cat-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  padding: 12px 14px 6px;
}
.group-label .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.group-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gold);
  color: #17251f;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}
.room-pin {
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.7;
  vertical-align: middle;
}
#room-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
  min-width: 0;
}
#no-room {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
}
#no-room.hidden,
#view-chat:has(#active-room:not(.hidden)) #no-room {
  display: none !important;
}
#no-room .placeholder-icon {
  font-size: 28px;
}
#no-room p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin: 0;
}
#active-room {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  width: 100%;
}
#active-room:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100% !important;
  width: 100% !important;
}
#active-room.hidden {
  display: none !important;
}
.room-head {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 10;
  gap: 10px;
}
.room-back-btn {
  display: none;
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  margin: -4px 0 -4px -4px;
  flex-shrink: 0;
}
.room-back-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.room-back-btn:hover {
  color: var(--text);
}
.room-head-info {
  min-width: 0;
}
.room-head-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-head-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}
.head-spacer {
  flex: 1;
}
.room-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.room-head-actions button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.room-head-actions button:hover {
  color: var(--text);
}
.room-head-actions button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
#room-leave-btn:hover {
  color: var(--orange) !important;
}
#room-leave-btn:hover svg {
  stroke: var(--orange);
}
#room-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.system-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 0 4px;
  text-align: center;
}
.system-line b {
  color: var(--gold);
  font-weight: 700;
}
@keyframes slideInUpMsg {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.msg-group {
  display: flex;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 8px;
  position: relative;
  cursor: default;
  transition:
    background 0.15s,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: slideInUpMsg 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.floating-heart-anim {
  position: fixed;
  font-size: 60px;
  pointer-events: none;
  z-index: 9999;
  animation: floatHeart 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.6));
}
@keyframes floatHeart {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  15% {
    transform: scale(1.2);
    opacity: 1;
  }
  30% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-70px) scale(1);
    opacity: 0;
  }
}
.msg-group:hover {
  background: var(--row-hover);
}
.msg-group:hover .msg-actions {
  opacity: 1;
  pointer-events: auto;
}
.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: #142019;
  margin-top: 2px;
}
.msg-lines {
  min-width: 0;
  flex: 1;
}
.msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-name {
  font-size: 13px;
  font-weight: 700;
}
.msg-name.mine {
  color: var(--gold);
}
.msg-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.msg-edited {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}
.msg-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}
.msg-text.deleted {
  color: var(--text-dim);
  font-style: italic;
}
.msg-actions {
  position: absolute;
  right: 8px;
  top: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 5px;
  z-index: 10;
}
.msg-act-btn {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 26px;
  min-height: 26px;
}
.msg-act-btn:hover {
  color: var(--text);
  background: var(--row-hover);
}
.msg-act-btn.danger:hover {
  color: var(--danger);
}
.reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.reaction-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.reaction-chip:hover {
  border-color: var(--teal);
}
.reaction-chip.mine {
  border-color: var(--gold);
  background: rgba(212, 185, 78, 0.12);
}
.reaction-chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.inline-edit-wrap {
  margin-top: 4px;
}
.inline-edit-wrap textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--teal);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 8px;
  outline: 0;
  resize: none;
  min-height: 36px;
  max-height: 120px;
}
.inline-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}
.edit-save-btn {
  background: var(--gold);
  border: none;
  color: #17251f;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.edit-cancel-btn {
  background: 0 0;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.typing-indicator {
  flex-shrink: 0;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  transition:
    max-height 0.2s ease,
    padding 0.2s ease;
  max-height: 0;
}
.typing-indicator.show {
  max-height: 30px;
  padding: 6px 20px;
}
.typing-dots {
  display: flex;
  gap: 3px;
}
.typing-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typingBounce {
  0%,
  100%,
  60% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}
#room-compose {
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
  background: var(--panel-raised);
  flex-shrink: 0;
  position: relative;
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
}
.input-wrap:focus-within {
  border-color: var(--teal);
}
#room-msg-input {
  flex: 1;
  background: 0 0;
  border: none;
  color: var(--text);
  font-size: 13.5px;
  padding: 11px 0;
  outline: 0;
}
#room-msg-input::placeholder {
  color: var(--text-dim);
}
.input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.input-actions button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  border-radius: 6px;
}
.input-actions button:hover {
  color: var(--text);
  background: var(--row-hover);
}
.input-actions svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
#send-btn {
  color: var(--teal) !important;
}
#send-btn:hover {
  color: var(--text) !important;
}
.emoji-panel {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  left: 0;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.emoji-panel[hidden] {
  display: none;
}
.emoji-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.emoji-tabs::-webkit-scrollbar {
  display: none;
}
.etab {
  flex-shrink: 0;
  background: 0 0;
  border: none;
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 7px 7px 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  line-height: 1;
}
.etab:hover {
  background: var(--row-hover);
}
.etab.active {
  border-bottom-color: var(--gold);
  background: var(--panel-raised);
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  padding: 6px;
  max-height: 172px;
  overflow-y: auto;
}
.emoji-grid button {
  background: 0 0;
  border: none;
  font-size: 20px;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  text-align: center;
  transition: transform 0.1s;
}
.emoji-grid button:hover {
  background: var(--row-hover);
  transform: scale(1.18);
}
#ctx-menu {
  position: fixed;
  z-index: 2000;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 164px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  padding: 4px;
}
#ctx-menu[hidden] {
  display: none;
}
#ctx-menu button {
  width: 100%;
  background: 0 0;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
#ctx-menu button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}
#ctx-menu button:hover {
  background: var(--row-hover);
  color: var(--text);
}
#ctx-block:hover,
#ctx-delete:hover,
#ctx-report:hover {
  color: var(--danger) !important;
}
.ctx-divider {
  height: 1px;
  background: var(--line);
  margin: 3px 8px;
}
#react-picker {
  position: fixed;
  z-index: 2100;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 26px;
  display: flex;
  gap: 2px;
  padding: 5px 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}
#react-picker[hidden] {
  display: none;
}
#react-picker button {
  background: 0 0;
  border: none;
  font-size: 22px;
  padding: 4px 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s;
  line-height: 1;
}
#react-picker button:hover {
  transform: scale(1.3);
  background: var(--row-hover);
}
#members-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
}
#members-panel[hidden] {
  display: none;
}
#members-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 12, 0.65);
  backdrop-filter: blur(3px);
}
#members-sheet {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.22s ease;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sheet-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
#members-sheet-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sheet-head button {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 6px;
}
.sheet-head button:hover {
  color: var(--text);
  background: var(--row-hover);
}
.sheet-head button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
#members-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
}
.member-row:hover {
  background: var(--row-hover);
}
.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: #142019;
  flex-shrink: 0;
}
.member-info {
  flex: 1;
  min-width: 0;
}
.member-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-dim);
  margin-top: 1px;
}
.msg-time {
  color: var(--text-dim);
  font-size: 11px;
  margin-left: 8px;
  font-family: var(--font-mono);
}
.msg-status {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 12px;
  letter-spacing: -2px;
  color: var(--text-dim);
}
.msg-status.read {
  color: #34b7f1;
}
.you-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: #17251f;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
}
#confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#confirm-modal[hidden] {
  display: none;
}
#confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 12, 0.72);
  backdrop-filter: blur(4px);
}
#confirm-panel {
  position: relative;
  width: min(360px, 100%);
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 var(--line-glow),
    0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7);
  text-align: center;
}
#confirm-icon {
  font-size: 30px;
  margin-bottom: 10px;
  line-height: 1;
}
#confirm-panel h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}
#confirm-panel p {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 22px;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-btn {
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn.ghost {
  background: 0 0;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.modal-btn.ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.modal-btn.danger {
  background: var(--danger);
  color: #fff;
}
.modal-btn.danger:hover {
  filter: brightness(1.08);
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s,
    transform 0.22s;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
@media (max-width: 1100px) {
  #rooms-col {
    width: 280px;
  }
}
@media (max-width: 1024px) {
  #rooms-col {
    width: 255px;
  }
}
@media (max-width: 900px) {
  #rooms-col {
    width: 240px;
  }
  .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}
#reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--panel-raised, #1c1e2a);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-dim);
  width: 100%;
}
#reply-bar[hidden] {
  display: none !important;
}
#reply-bar-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#reply-bar-text b {
  color: var(--gold, #ffd700);
  font-weight: 600;
  margin-right: 4px;
  font-style: normal;
}
#reply-bar-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
#reply-bar-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}
#reply-bar-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.msg-replied-to {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
  border-left: 2px solid var(--teal, #2dd4bf);
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 4px 4px 0;
}
.msg-replied-to:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}
.msg-replied-to b {
  color: var(--gold, #ffd700);
}
.msg-replied-to svg {
  width: 12px !important;
  height: 12px !important;
  max-width: 12px !important;
  max-height: 12px !important;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
.mention-tag {
  color: var(--teal);
  background: rgba(111, 169, 138, 0.15);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}
.mention-tag.me {
  color: var(--orange);
  background: rgba(217, 119, 87, 0.15);
}
.mention-tag:hover {
  filter: brightness(1.2);
}
.mention-suggestions {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 12px;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  padding: 4px;
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 100;
}
.mention-suggestions[hidden] {
  display: none !important;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.mention-item.selected,
.mention-item:hover {
  background: var(--row-hover);
}
.mention-item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  stroke: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: #142019;
}
#rail-profile-btn {
  color: var(--gold);
}
.profile-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  outline: 0;
  font-family: inherit;
  resize: none;
}
.profile-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
}
.user-row.gender-male .avatar {
  background: var(--gender-male);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-row.gender-female .avatar {
  background: var(--gender-female);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-row.gender-non-binary .avatar {
  background: var(--gender-neutral);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-row {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  border-left: 3px solid transparent;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.user-row.gender-male {
  background: rgba(91, 143, 199, 0.03) !important;
}
.user-row.gender-female {
  background: rgba(214, 127, 166, 0.03) !important;
}
.user-row.gender-non-binary {
  background: rgba(169, 145, 212, 0.03) !important;
}
.user-row:hover {
  background: var(--row-hover) !important;
}
.user-row.selected {
  border-left: 3px solid var(--gold);
  background: var(--row-hover) !important;
}
.user-row .u-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-row .unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
}
.inbox-thread-row.gender-male .avatar {
  background: var(--gender-male);
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-thread-row.gender-female .avatar {
  background: var(--gender-female);
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-thread-row.gender-non-binary .avatar {
  background: var(--gender-neutral);
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-thread-row {
  border-left: 3px solid transparent;
  user-select: none;
  -webkit-user-select: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.inbox-thread-row.gender-male {
  background: rgba(91, 143, 199, 0.03) !important;
}
.inbox-thread-row.gender-female {
  background: rgba(214, 127, 166, 0.03) !important;
}
.inbox-thread-row.gender-non-binary {
  background: rgba(169, 145, 212, 0.03) !important;
}
.inbox-thread-row:hover {
  background: var(--row-hover) !important;
}
.inbox-thread-row.selected {
  border-left: 3px solid transparent;
  background: var(--row-hover) !important;
}
@media (max-width: 768px) {
  #app {
    flex-direction: column !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
  }
  body.keyboard-open #side-rail {
    display: none !important;
  }
  body.keyboard-open .room-head,
  body.keyboard-open .thread-head {
    padding: 6px 15px !important;
  }
  #side-rail {
    width: 100% !important;
    height: 60px !important;
    flex-direction: row !important;
    border-right: none !important;
    border-top: 1px solid var(--line) !important;
    justify-content: space-around !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    order: 2 !important;
    overflow-y: visible !important;
  }
  #side-rail #rail-profile-btn,
  #side-rail [data-action="profile"] {
    display: none !important;
  }
  .rail-bot,
  .rail-mid,
  .rail-top {
    flex-direction: row !important;
    margin: 0 !important;
    gap: 0 !important;
    flex: 1 !important;
    justify-content: space-around !important;
  }
  .rail-btn {
    width: auto !important;
    height: 60px !important;
    flex: 1 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
  }
  .rail-btn svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 2px !important;
  }
  #main-col {
    order: 1 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    width: 100% !important;
    min-height: 0 !important;
    height: 0 !important;
  }
  #navbar {
    height: auto !important;
    flex-shrink: 0 !important;
  }
  #app.show-chat #navbar {
    display: none !important;
  }
  #views {
    flex: 1 !important;
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  .view {
    width: 100% !important;
    height: 100% !important;
    display: none !important;
    flex-direction: row !important;
  }
  .view.active {
    display: flex !important;
  }
  #list-col {
    width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #users-dm-wrapper {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
  }
  #app.show-chat #list-col {
    display: none !important;
  }
  #app.show-chat #shared-dm-panel,
  #app.show-chat #users-dm-wrapper {
    display: flex !important;
  }
  #inbox-list-col {
    width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #inbox-dm-wrapper {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
  }
  #app.show-chat #inbox-list-col {
    display: none !important;
  }
  #app.show-chat #inbox-dm-wrapper,
  #app.show-chat #shared-dm-panel {
    display: flex !important;
  }
  #rooms-col {
    width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #room-panel {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
  }
  #app.show-chat #rooms-col {
    display: none !important;
  }
  #app.show-chat #room-panel {
    display: flex !important;
  }
  #app.show-chat #active-room {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }
  .ctx-menu,
  .modal-content,
  .picker-content {
    max-width: 90vw !important;
  }
  #inbox-back-btn,
  #room-back-btn,
  .chat-back-btn {
    display: flex !important;
  }
}
@media (max-width: 768px) {
  #app {
    flex-direction: column-reverse;
  }
  #side-rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    border-right: none;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    z-index: 9999;
  }
  .rail-btn {
    min-height: 44px;
    padding: 10px;
    flex: 1;
  }
  #navbar {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "brand search user" "tabs tabs tabs" "live live live";
    gap: 10px;
  }
  .brand {
    justify-self: start;
  }
  #nav-tabs {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  #search-wrap {
    max-width: 100%;
    margin-left: 0;
  }
  #view-chat,
  #view-inbox,
  #view-users {
    flex-direction: column;
  }
  #inbox-list-col,
  #list-col,
  #rooms-col {
    width: 100%;
    flex: 1;
    border-right: none;
  }
  #inbox-dm-wrapper,
  #room-panel,
  .dm-wrapper {
    width: 100%;
    flex: 1;
  }
}
@media (max-width: 480px) {
  #navbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand tabs user" "search search search" "live live live";
    gap: 5px 8px;
  }
  .live-count {
    justify-self: start;
  }
  .rail-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
  }
  .nav-tab {
    min-height: 36px;
    font-size: 11px;
    padding: 4px 6px;
  }
  #search-input {
    min-height: 44px;
  }
  #filter-rail {
    grid-template-columns: 1fr 1fr;
  }
  button,
  input,
  select {
    min-height: 44px;
  }
  .age-range {
    min-height: 44px;
  }
  .age-input {
    min-height: auto;
  }
  #emoji-toggle-btn,
  #inbox-emoji-btn,
  #room-back-btn,
  #send-btn,
  .chat-back-btn,
  .compose-send-btn,
  .room-head-actions button {
    min-height: 44px;
    min-width: 44px;
  }
  .head-icons {
    gap: 4px;
  }
  .head-icons button {
    min-height: 36px;
    min-width: 36px;
  }
}
@media (min-width: 769px) {
  #view-users.active,
  #view-inbox.active {
    display: flex !important;
    flex-direction: row !important;
  }
  #view-chat.active {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  #view-chat.active:has(#active-room:not(.hidden)) {
    flex-direction: row !important;
  }
  .view:not(.active) {
    display: none !important;
  }
  #list-col,
  #inbox-list-col {
    width: 22% !important;
    min-width: 260px !important;
    max-width: 340px !important;
    flex-shrink: 0 !important;
    border-right: 1px solid var(--line) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #rooms-col {
    width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #users-dm-wrapper,
  #inbox-dm-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }
  #view-chat:has(#active-room.hidden) #room-panel {
    display: none !important;
  }
  #view-chat:has(#active-room:not(.hidden)) #rooms-col {
    width: 22% !important;
    min-width: 260px !important;
    max-width: 340px !important;
    flex-shrink: 0 !important;
    border-right: 1px solid var(--line) !important;
    height: 100% !important;
  }
  #view-chat:has(#active-room:not(.hidden)) #room-panel {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }
}
@media (max-width: 768px) {
  .inbox-msg-actions,
  .msg-actions {
    display: flex !important;
    opacity: 1 !important;
  }
}
@media (min-width: 769px) {
  .desktop-filters-group {
    display: contents;
  }
}
.mobile-only {
  display: none !important;
}
@media (max-width: 768px) {
  .mobile-only:not([hidden]) {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }
  #navbar {
    grid-template-columns: auto 1fr auto auto !important;
    grid-template-areas: "brand . search user" !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    height: auto !important;
  }
  #navbar.mobile-search-active {
    display: flex !important;
    padding: 10px 14px !important;
  }
  #navbar.mobile-search-active .brand,
  #navbar.mobile-search-active .user-session {
    display: none !important;
  }
  #search-wrap {
    width: 36px !important;
    height: 36px !important;
    border-radius: 18px !important;
    transition: all 0.25s ease-out !important;
    background: 0 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-self: end !important;
    overflow: hidden !important;
    margin-left: auto !important;
    max-width: 100% !important;
    position: relative !important;
  }
  #navbar.mobile-search-active #search-wrap {
    width: 100% !important;
    border-radius: 8px !important;
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
  }
  #search-input {
    opacity: 0 !important;
    visibility: hidden;
    width: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: opacity 0.25s ease-out !important;
  }
  #navbar.mobile-search-active #search-input {
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    padding: 8px 10px 8px 34px !important;
  }
  #search-wrap .search-icon {
    left: 10px !important;
    width: 16px !important;
    height: 16px !important;
    pointer-events: none !important;
  }
  #navbar:not(.mobile-search-active) #search-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
  }
  #mobile-search-close {
    position: absolute !important;
    right: 10px !important;
    background: 0 0 !important;
    border: none !important;
    color: var(--text-dim) !important;
    font-size: 14px !important;
    padding: 8px !important;
    display: none !important;
    z-index: 5;
    cursor: pointer !important;
  }
  #navbar.mobile-search-active #mobile-search-close {
    display: block !important;
  }
  #mobile-profile-wrap {
    position: relative !important;
    display: block !important;
  }
  #mobile-profile-menu {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 5px) !important;
    background: var(--panel-raised) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 200px !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
  }
  #mobile-profile-menu[hidden] {
    display: none !important;
  }
  .mobile-profile-opt {
    background: 0 0 !important;
    border: none !important;
    color: var(--text) !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    text-align: left !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .mobile-profile-opt:hover,
  .mobile-profile-opt:active {
    background: var(--row-hover) !important;
    color: var(--gold) !important;
  }
  #filter-rail {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    gap: 12px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  #mobile-filters-trigger,
  .mobile-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, rgba(44, 62, 56, 0.8), rgba(26, 38, 33, 0.95)) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(89, 131, 116, 0.4) !important;
    border-top: 1px solid rgba(131, 178, 159, 0.6) !important;
    color: var(--text) !important;
    font-family: var(--font-main, 'Inter', sans-serif) !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 10px 14px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    flex: 1 !important;
    position: relative !important;
    overflow: hidden !important;
  }
  #mobile-filters-trigger::after,
  .mobile-nav-btn::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%) !important;
    transform: skewX(-25deg) !important;
    transition: none !important;
  }
  #mobile-filters-trigger:active::after,
  .mobile-nav-btn:active::after {
    left: 200% !important;
    transition: left 0.6s ease-out !important;
  }
  #mobile-filters-trigger:active,
  .mobile-nav-btn:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, rgba(30, 46, 40, 0.95), rgba(20, 30, 25, 0.95)) !important;
  }
  #mobile-filters-trigger svg,
  .mobile-nav-btn svg {
    width: 15px !important;
    height: 15px !important;
    color: var(--gold, #FFD700) !important;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4)) !important;
    transition: transform 0.2s ease !important;
  }
  #mobile-filters-trigger:active svg,
  .mobile-nav-btn:active svg {
    transform: scale(0.9) !important;
  }
  #mobile-filters-trigger .filters-badge {
    background: #1e2e28 !important;
    color: var(--text-dim) !important;
    border: 1px solid #3d5a51 !important;
    border-radius: 5px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    min-width: 18px !important;
    height: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-left: 2px !important;
  }
  #mobile-live-count {
    display: flex !important;
    font-family: var(--font-mono) !important;
    font-size: 10.5px !important;
    color: var(--text-dim) !important;
    align-items: center !important;
    gap: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  #mobile-filters-modal .desktop-only {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  #mobile-filters-modal .desktop-only > * {
    width: 100% !important;
    min-width: 0 !important;
  }
  #mobile-filters-modal #more-filters-btn {
    display: none !important;
  }
}
#inbox-mic-btn.recording,
#room-mic-btn.recording {
  color: var(--red) !important;
  animation: pulse 1s infinite;
}
.msg-audio {
  margin-top: 8px;
  max-width: 100%;
  height: 36px;
  border-radius: 20px;
}
.users-tabs-nav {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.utab {
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.utab:hover {
  background: var(--row-hover);
  color: var(--text);
}
.utab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
@media (max-width: 768px) {
  .mobile-live.mobile-only {
    display: flex !important;
  }
  #view-chat:has(#active-room:not(.hidden)) #rooms-col,
  #view-inbox:has(#inbox-active-chat:not(.hidden)) #inbox-list-col,
  #view-users:has(#inbox-active-chat:not(.hidden)) #list-col {
    display: none !important;
  }
  #view-chat:has(#active-room:not(.hidden)) #room-panel,
  #view-inbox:has(#inbox-active-chat:not(.hidden)) #inbox-dm-wrapper,
  #view-users:has(#inbox-active-chat:not(.hidden)) #users-dm-wrapper {
    display: flex !important;
    width: 100% !important;
    flex: 1 !important;
    border-left: none !important;
  }
  #view-chat:has(#active-room.hidden) #rooms-col,
  #view-inbox:has(#inbox-active-chat.hidden) #inbox-list-col,
  #view-users:has(#inbox-active-chat.hidden) #list-col {
    display: flex !important;
    width: 100% !important;
    flex: 1 !important;
    border-right: none !important;
  }
  #view-chat:has(#active-room.hidden) #room-panel,
  #view-inbox:has(#inbox-active-chat.hidden) #inbox-dm-wrapper,
  #view-users:has(#inbox-active-chat.hidden) #users-dm-wrapper {
    display: none !important;
  }
}
.active-call-bar .call-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.call-pulse {
  width: 10px;
  height: 10px;
  background-color: #000;
  border-radius: 50%;
  animation: call-pulse 1.5s infinite;
}
@keyframes call-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 transparent;
  }
}
.call-actions {
  display: flex;
  gap: 12px;
}
.call-btn {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  cursor: pointer;
  transition: all 0.2s;
}
.call-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}
.call-btn.end {
  background: var(--red);
  color: #fff;
}
.call-btn.end:hover {
  background: #ff5252;
}
.call-btn svg {
  width: 16px;
  height: 16px;
}
.call-chat-btn {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}
.call-chat-btn:hover {
  color: var(--gold);
}
.call-chat-btn svg {
  width: 18px;
  height: 18px;
}
.mute-chat-btn {
  background: 0 0;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  margin-right: 8px;
}
.mute-chat-btn:hover {
  color: var(--text);
}
.mute-chat-btn.muted {
  color: var(--gold);
}
.mute-chat-btn.muted svg {
  fill: var(--gold);
  stroke: var(--gold);
}
.mute-chat-btn svg {
  width: 18px;
  height: 18px;
}
.incoming-call-bubble {
  background: var(--panel-hover);
  border: 1px solid var(--border-accent);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.incoming-call-bubble button {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  margin: 0 4px;
}
.call-accept-btn {
  background: var(--teal);
  color: #000;
}
.call-decline-btn {
  background: var(--red);
  color: #fff;
}
.premium-announcement-bubble {
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 10px 0;
  text-align: center;
  font-size: 13px;
  animation: premium-glow-pulse 2s infinite alternate;
}
@keyframes premium-glow-pulse {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.2);
  }
}
.premium-glowing-name {
  letter-spacing: 0.5px;
}
.msg-group.is-premium-msg .msg-text {
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 185, 0, 0.6);
}
.global-footer {
  background-color: var(--panel);
  border-top: 1px solid var(--line);
  padding: 60px 24px 30px;
  color: var(--text-dim);
  font-family: var(--font-ui);
  margin-top: 60px;
  width: 100%;
  box-sizing: border-box;
  clear: both;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 100;
}
.footer-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1.3fr;
  gap: 40px;
  box-sizing: border-box;
}
.footer-brand .footer-logo {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  display: inline-block;
  margin-bottom: 12px;
}
.footer-brand .footer-logo span {
  color: var(--gold);
}
.footer-brand p {
  font-size: 14px;
  max-width: 300px;
  line-height: 1.6;
}
.footer-col h4 {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col ul li a:hover {
  color: var(--gold);
}
.footer-bottom {
  max-width: 1160px;
  width: 100%;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.social-links {
  display: flex;
  gap: 16px;
}
.social-links a {
  color: var(--text-dim);
  transition: color 0.2s;
}
.social-links a:hover {
  color: var(--gold);
}
@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}
@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Disable chat media uploads as the /api/upload endpoint is disabled for free tier */
#inbox-media-btn,
#room-attach-btn,
#inbox-attach-btn,
#room-mic-btn,
#inbox-mic-btn,
.mic-btn,
.img-btn {
  display: none !important;
}
