* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0b;
  --bg-raised: #18181b;
  --border: #27272a;
  --border-light: #1e1e21;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-faint: #52525b;
  --text-ghost: #3f3f46;
  --accent: #6366f1;
  --accent-dark: #4338ca;
  --accent-glow: #6366f140;
  --green: #22c55e;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

/* Shared */
.logo, .logo-sm {
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.logo { font-size: 4rem; }
.logo-sm { font-size: 1.25rem; }
.logo-dim {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-lit {
  background: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 12px #00000040;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px #6366f160, 0 6px 16px #00000060;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-primary svg { width: 20px; height: 20px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px #22c55e80;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Landing page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}
.landing .tagline {
  font-size: 1.125rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}
.landing .btn-primary { margin-bottom: 1.5rem; }
.landing-link {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-decoration: none;
}
.landing-link:hover { color: var(--text-dim); }

/* Setup page */
.setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.setup-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.setup-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.setup-card p {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.avatar-upload {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  cursor: pointer;
}
.avatar-upload input { display: none; }
.avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s;
}
.avatar-circle:hover { border-color: var(--accent); }
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-circle svg { color: var(--text-faint); }
.avatar-hint {
  font-size: 0.6875rem;
  color: var(--text-faint);
  margin-top: 0.375rem;
}
.name-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}
select.name-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}
select.name-input option {
  background: var(--bg-raised);
  color: var(--text);
}
.name-input:focus { border-color: var(--accent); }
.name-input::placeholder { color: var(--text-faint); }
.bio-input {
  resize: vertical;
  text-align: left;
  font-family: var(--font);
  line-height: 1.4;
  min-height: 4rem;
}
/* Interest picker */
.interest-picker {
  margin-bottom: 1rem;
}
.interest-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.interest-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: center;
}
.interest-tag {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.interest-tag:hover { border-color: var(--accent); }
.interest-tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.profile-interests {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0 1rem 0.75rem;
}
.interest-label-inline {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-right: 0.125rem;
}
.profile-interests .interest-tag {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  cursor: default;
}
.setup-card .btn-primary { width: 100%; }

/* Chat layout */
.chat-page {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100dvh;
  height: var(--chat-h, 100dvh);
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.header-user { font-size: 0.8125rem; color: var(--text-dim); }
.share-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.share-btn:hover { background: #4f46e5; }
.logout-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.logout-btn:hover { border-color: #ef4444; color: #ef4444; }
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 280px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-section {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.user-item, .conv-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.875rem;
}
.user-item:hover, .conv-item:hover { background: var(--bg-raised); }
.conv-item.active { background: #1e1b4b; }
.conv-delete-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.conv-delete-btn:hover { color: #ef4444; background: rgba(239,68,68,0.15); }
.conv-item:hover .conv-delete-btn { display: block; }
.user-offline { opacity: 0.6; }
.last-seen {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Group chat */
.new-group-btn {
  float: right;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.new-group-btn:hover { text-decoration: underline; }
.group-creator {
  padding: 0.375rem 1rem 0.25rem;
}
.group-name-input {
  width: 100%;
  padding: 0.4rem 0.625rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8125rem;
  outline: none;
  margin-bottom: 0.375rem;
}
.group-name-input:focus { border-color: var(--accent); }
.group-name-input::placeholder { color: var(--text-faint); }
.group-pick-hint { font-size: 0.6875rem; color: var(--text-faint); }
.user-selected { background: #1e1b4b !important; }
.check-mark { color: var(--accent); font-weight: 700; flex-shrink: 0; }
.group-create-btn {
  margin: 0.5rem 1rem;
  padding: 0.5rem;
  font-size: 0.8125rem;
  width: calc(100% - 2rem);
  border-radius: 8px;
}
.group-avatar {
  font-size: 0.875rem;
  background: #1e1b4b;
}
.group-count {
  font-size: 0.625rem;
  color: var(--text-faint);
  font-weight: 400;
}
.public-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  cursor: pointer;
}
.public-toggle input { accent-color: var(--accent); cursor: pointer; }
.join-btn {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.join-btn:hover { background: #4f46e5; }
.conv-unread .conv-name { font-weight: 700; }
.conv-unread .conv-preview { color: var(--text-muted); }
.unread-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.375rem;
  flex-shrink: 0;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.conv-info { min-width: 0; flex: 1; }
.conv-name { font-weight: 500; }
.conv-preview { font-size: 0.75rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sex worker heart */
.sw-heart { color: #f43f5e; font-size: 0.75em; }

/* Sex worker checkbox */
.sw-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
}
.sw-checkbox input {
  accent-color: #f43f5e;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Gender colors */
.gender-man { color: #60a5fa; }
.gender-woman { color: #f472b6; }
.gender-other { color: #fbbf24; }

.dot-online-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px #22c55e80;
  flex-shrink: 0;
}
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 2rem;
}
.chat-full-icon { color: var(--text-faint); }
.chat-full h2 { font-size: 1.25rem; color: var(--text); font-weight: 700; }
.chat-full p { font-size: 0.875rem; }
.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-ghost);
  font-size: 0.9375rem;
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.msg {
  max-width: 65%;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}
.msg.them { align-self: flex-start; background: var(--bg-raised); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--accent-dark); border-bottom-right-radius: 4px; }
.msg-sender { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.125rem; }
.msg-img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  display: block;
  margin: 0.25rem 0;
  cursor: pointer;
  object-fit: contain;
}
.msg-body { cursor: pointer; }
.msg-meta { font-size: 0.6875rem; color: var(--text-faint); margin-top: 0.125rem; }
.msg.me .msg-meta { text-align: right; color: #c7c7f0; }
.msg-link { color: #93c5fd; text-decoration: underline; word-break: break-all; }
.msg.me .msg-link { color: #c4b5fd; }
.msg-check { color: #c7c7f0; margin-left: 0.25rem; font-size: 0.75rem; letter-spacing: -0.5em; }
.read-check { color: #53bdeb; margin-left: 0.25rem; font-size: 0.75rem; letter-spacing: -0.5em; }

/* Reply quote inside message */
.msg-reply-quote {
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
}
.msg.me .msg-reply-quote { background: rgba(0, 0, 0, 0.2); }
.msg-reply-author { font-weight: 600; color: var(--accent); margin-bottom: 0.0625rem; }
.msg-reply-text { color: var(--text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Reply preview bar above input */
.reply-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  border-left: 3px solid var(--accent);
  margin: 0 0.75rem;
  border-radius: 4px;
}
.reply-preview-content { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.reply-preview-author { font-size: 0.75rem; font-weight: 600; color: var(--accent); }
.reply-preview-text { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reply-preview-close { background: none; border: none; color: var(--text-faint); font-size: 1.25rem; cursor: pointer; padding: 0 0.25rem; }
.reply-preview-close:hover { color: var(--text); }
.reply-pick-btn { color: var(--text-muted); }
.reaction-picker .reply-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0.25rem 0.125rem;
}

/* Reactions */
.reaction-picker {
  display: flex;
  gap: 0.125rem;
  margin-top: 0.25rem;
}
.reaction-pick-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  padding: 0.25rem 0.375rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}
.reaction-pick-btn:hover { background: var(--bg-raised); }

/* Chat info bar (DM + group header) */
.chat-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-raised);
  flex-shrink: 0;
  cursor: pointer;
}
.chat-info-bar:hover { background: #1f1f23; }
.chat-info-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.chat-info-name {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}
.chat-info-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ephemeral-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ephemeral-toggle:hover { border-color: var(--text-faint); color: var(--text-muted); }
.ephemeral-toggle.active { border-color: var(--accent); color: var(--accent); }
.reaction-pills {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.reaction-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  cursor: pointer;
  line-height: 1.4;
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s;
}
.reaction-pill:hover { background: var(--bg-raised); }
.reaction-pill.mine { border-color: var(--accent); background: #6366f120; }
.typing-indicator {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0 1.25rem 0.25rem;
  min-height: 1.25rem;
}
.input-bar-wrap {
  position: relative;
}
.input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
}
.emoji-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.emoji-toggle:hover { background: var(--bg-raised); }
.emoji-grid {
  position: absolute;
  bottom: 100%;
  left: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.125rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 -4px 20px #00000040;
  z-index: 10;
}
.emoji-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  padding: 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.emoji-btn:hover { background: var(--bg-raised); }
.input-bar input {
  flex: 1;
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0 0.875rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.input-bar input:focus { border-color: var(--accent); }
.input-bar button {
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}
.input-bar button:hover { background: #4f46e5; }
.input-bar button:disabled { opacity: 0.4; cursor: default; }

/* Me tag */
.me-tag, .profile-me-tag {
  font-size: 0.6875rem;
  color: var(--text-faint);
  font-weight: 400;
}

/* Profile side panel */
.profile-side {
  width: 0;
  overflow: hidden;
  border-left: 1px solid var(--border-light);
  background: var(--bg);
  flex-shrink: 0;
  transition: width 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.profile-side.open {
  width: 300px;
}
.profile-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #00000080;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-close:hover { color: var(--text); background: #00000099; }
/* Group panel */
.group-panel-header {
  padding: 2.5rem 1rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.group-panel-icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}
.group-panel-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.group-member-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem 0;
}
.group-member-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  margin: 0 0.25rem;
  transition: background 0.1s;
}
.group-member-item:hover { background: var(--bg-raised); }


.profile-avatar {
  padding: 1rem 1rem 0;
  position: relative;
}
.profile-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.profile-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-raised);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-faint);
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.75rem 1rem 0.25rem;
}
.profile-details {
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: 0 1rem 0.5rem;
}
.profile-bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 1rem 1rem;
  white-space: pre-wrap;
}
.profile-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}
.profile-dm-btn {
  flex: 1;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
}

/* Ignore button */
.profile-ignore-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-ignore-btn:hover { border-color: #e05050; color: #e05050; }
.profile-ignore-btn.active { border-color: var(--accent); color: var(--accent); }
.profile-ignore-btn.active:hover { border-color: var(--border); color: var(--text-muted); }

/* Editable avatar */
.profile-avatar-editable {
  cursor: pointer;
}
.avatar-edit-hint {
  text-align: center;
  padding: 0.375rem;
  background: #000000b0;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-radius: 0 0 12px 12px;
  margin-top: -12px;
  position: relative;
  z-index: 1;
}

/* Edit profile */
.profile-edit-btn {
  margin: 0 1rem 1rem;
  padding: 0.5rem 1rem;
  width: calc(100% - 2rem);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-edit-btn:hover { border-color: var(--accent); color: var(--accent); }
.profile-edit-form { padding: 0.5rem 1rem 1rem; }
.profile-edit-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8125rem;
  outline: none;
  margin-bottom: 0.5rem;
  font-family: var(--font);
  transition: border-color 0.15s;
}
.profile-edit-input:focus { border-color: var(--accent); }
.profile-edit-input::placeholder { color: var(--text-faint); }
.profile-edit-textarea { resize: vertical; min-height: 4rem; line-height: 1.4; }
.profile-edit-actions { display: flex; gap: 0.5rem; }
.profile-edit-cancel {
  flex: 1;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
}
.profile-edit-cancel:hover { border-color: var(--text-faint); }
.profile-edit-save {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

/* About page */
.about-page {
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.about-header { margin-bottom: 2rem; }
.about-content h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.about-content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.about-content p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.about-content ul {
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.about-content li { margin-bottom: 0.375rem; }
.about-content strong { color: var(--text); }
.about-cta {
  margin-top: 2.5rem;
  text-align: center;
}

/* Back button */
.back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: 6px;
  line-height: 1;
}
.back-btn:hover { background: var(--bg-raised); }

/* Desktop: mobile-panel wrappers are transparent */
.mobile-panel { display: contents; }

/* Mobile responsive */
@media (max-width: 768px) {
  .emoji-open-btn { display: none; }
  .input-bar input { font-size: 1rem; }

  .layout {
    position: relative;
    overflow: hidden;
  }
  .mobile-panel {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  .mobile-panel.mobile-active {
    display: flex;
  }
  .mobile-panel .sidebar {
    width: 100%;
    border-right: none;
  }
  .mobile-panel .chat-area {
    width: 100%;
  }
  .mobile-panel .profile-side {
    width: 100%;
    border-left: none;
    overflow-y: auto;
  }
  .mobile-panel .profile-side.open {
    width: 100%;
  }
}
