:root {
  --ink: #03060d;
  --midnight: #071120;
  --navy: #081a33;
  --surface: rgba(8, 26, 51, 0.78);
  --surface-strong: rgba(10, 32, 61, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(23, 230, 242, 0.30);
  --cyan: #17e6f2;
  --sky: #05bfff;
  --electric: #008dff;
  --cobalt: #0b5dff;
  --ice: #e9fbff;
  --muted: #8ea4bf;
  --muted-2: #6d7f96;
  --danger: #ff5b7d;
  --success: #49f1c8;
  --warning: #ffd36e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.25);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ice);
  background:
    radial-gradient(circle at 15% 12%, rgba(23, 230, 242, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(11, 93, 255, 0.27), transparent 28rem),
    radial-gradient(circle at 80% 78%, rgba(5, 191, 255, 0.14), transparent 30rem),
    linear-gradient(140deg, var(--ink), var(--midnight) 50%, #041a42);
  overflow-x: hidden;
}

button, input, textarea, select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
a { color: inherit; }
img { max-width: 100%; }

.noscript-card,
.loading-card {
  max-width: 480px;
  margin: 12vh auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(8, 26, 51, 0.82);
  box-shadow: var(--shadow);
}
.loading-card {
  display: flex;
  align-items: center;
  gap: 18px;
}
.loading-card img { width: 74px; height: 74px; border-radius: 23px; }
.loading-card strong { display: block; font-size: 1.45rem; }
.loading-card span { display: block; color: var(--muted); margin-top: 3px; }


.app-loading-clean {
  min-height: 100vh;
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(120px);
  z-index: 100;
  max-width: min(92vw, 640px);
  padding: 13px 16px;
  border-radius: 999px;
  background: rgba(3, 6, 13, 0.94);
  border: 1px solid rgba(23, 230, 242, 0.34);
  color: var(--ice);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.landing {
  position: relative;
  min-height: 100vh;
  padding: 26px;
}
.landing::before,
.landing::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(14px);
  pointer-events: none;
  opacity: 0.8;
}
.landing::before {
  width: 360px;
  height: 360px;
  right: -100px;
  top: -120px;
  background: rgba(23, 230, 242, 0.24);
}
.landing::after {
  width: 430px;
  height: 430px;
  left: -150px;
  bottom: -140px;
  background: rgba(11, 93, 255, 0.30);
}
.landing-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto 36px;
}
.brand-lockup,
.app-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  box-shadow: 0 18px 40px rgba(23, 230, 242, 0.15);
}
.brand-title {
  display: block;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
}
.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 4px;
}
.landing-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}
.landing-links a { text-decoration: none; }
.landing-links a:hover { color: var(--cyan); }
.landing-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.72fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}
.hero-card,
.auth-card,
.glass-card,
.card,
.post-card,
.composer-card,
.profile-panel,
.right-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(8, 26, 51, 0.84), rgba(7, 17, 32, 0.76));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}
.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(34px, 4vw, 50px);
}
.hero-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  background:
    radial-gradient(circle at 82% 12%, rgba(23, 230, 242, 0.28), transparent 18rem),
    radial-gradient(circle at 18% 100%, rgba(11, 93, 255, 0.30), transparent 22rem);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 230, 242, 0.28);
  border-radius: 999px;
  background: rgba(23, 230, 242, 0.08);
  color: var(--cyan);
  font-weight: 950;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.hero-title {
  margin: 24px 0 18px;
  font-size: clamp(3.75rem, 5vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-weight: 1000;
}
.hero-title > span {
  display: block;
}
.gradient-text {
  width: fit-content;
  background: linear-gradient(135deg, var(--cyan), var(--sky), var(--cobalt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy {
  margin: 0;
  color: #d4eef8;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.58;
  max-width: 600px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.hero-highlight {
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.highlight-number {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}
.hero-highlight strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.2;
}
.hero-highlight p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.42;
}
.avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, var(--cyan), var(--sky), var(--cobalt));
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.auth-card {
  width: 100%;
  padding: 24px;
  align-self: start;
}
.auth-card h2 { margin: 4px 0 7px; font-size: 1.65rem; }
.auth-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.45; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.auth-tabs button,
.segmented button,
.filter-chip {
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 900;
}
.auth-tabs button.active,
.segmented button.active,
.filter-chip.active {
  background: linear-gradient(135deg, rgba(23, 230, 242, 0.95), rgba(5, 191, 255, 0.95), rgba(11, 93, 255, 0.95));
  color: white;
  box-shadow: 0 12px 28px rgba(5, 191, 255, 0.20);
}
.form-grid { display: grid; gap: 12px; }
.form-row { display: grid; gap: 7px; }
.form-row label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ice);
  outline: 0;
  padding: 13px 14px;
  transition: border 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.select option { color: #071120; background: white; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(23, 230, 242, 0.55);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 4px rgba(23, 230, 242, 0.08);
}
.form-hint { color: var(--muted-2); font-size: 0.79rem; line-height: 1.4; }
.error-text { color: var(--danger); font-size: 0.86rem; font-weight: 800; }
.success-text { color: var(--success); font-size: 0.86rem; font-weight: 800; }
.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 950;
  text-decoration: none;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.btn:active,
.icon-btn:active { transform: scale(0.98); }
.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--sky), var(--cobalt));
  box-shadow: 0 14px 34px rgba(5, 191, 255, 0.23);
}
.btn.secondary {
  color: var(--cyan);
  background: rgba(23, 230, 242, 0.10);
  border: 1px solid rgba(23, 230, 242, 0.20);
}
.btn.ghost {
  color: var(--ice);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.btn.danger {
  color: #fff;
  background: rgba(255, 91, 125, 0.14);
  border: 1px solid rgba(255, 91, 125, 0.28);
}
.btn.full { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.google-btn { margin-top: 10px; }
.divider-label {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 0.8rem;
  font-weight: 800;
  margin: 14px 0;
}
.divider-label::before,
.divider-label::after { content: ""; height: 1px; background: rgba(255, 255, 255, 0.10); }
.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 18px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 18px;
  min-height: 100vh;
}
.sidebar,
.right-rail {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
  scrollbar-width: thin;
}
.sidebar {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(3, 6, 13, 0.54);
  backdrop-filter: blur(22px);
}
.app-brand { margin-bottom: 20px; }
.app-brand .brand-logo { width: 48px; height: 48px; }
.nav-list { display: grid; gap: 8px; }
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 950;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--ice); }
.nav-btn.active {
  color: white;
  background: linear-gradient(135deg, rgba(23, 230, 242, 0.20), rgba(11, 93, 255, 0.23));
  border: 1px solid rgba(23, 230, 242, 0.22);
}
.nav-icon { font-size: 1.15rem; width: 26px; text-align: center; }
.sidebar-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: grid;
  gap: 10px;
}
.user-mini {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.user-mini div:nth-child(2) { min-width: 0; }
.user-mini strong,
.user-mini span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-mini span { color: var(--muted); font-size: 0.82rem; }
.content {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding-bottom: 40px;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(3, 6, 13, 0.48);
  backdrop-filter: blur(22px);
}
.page-kicker {
  color: var(--cyan);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
}
.page-title { margin: 5px 0 6px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.055em; line-height: 0.96; }
.page-copy { color: var(--muted); margin: 0; line-height: 1.45; max-width: 760px; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.composer-card { padding: 16px; }
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.composer-main { flex: 1; min-width: 0; }
.composer-actions,
.card-actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.composer-actions { justify-content: space-between; margin-top: 12px; }
.composer-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}
.file-pill input { display: none; }
.selected-files { color: var(--muted); font-size: 0.82rem; margin-top: 7px; }
.feed-filters,
.search-filters {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 3px;
}
.feed-stack { display: grid; gap: 14px; }
.post-card { padding: 17px; overflow: hidden; }
.post-header,
.person-row,
.thread-row,
.group-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.post-header { justify-content: space-between; }
.post-author { display: flex; gap: 11px; align-items: center; min-width: 0; }
.post-author-text { min-width: 0; }
.post-author-text strong,
.post-author-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-author-text span { color: var(--muted); font-size: 0.82rem; }
.post-card.is-repost {
  border-color: rgba(73, 241, 200, 0.18);
}
.repost-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  color: #d8edf7;
  background: rgba(73, 241, 200, 0.07);
  border: 1px solid rgba(73, 241, 200, 0.16);
  font-size: 0.86rem;
  line-height: 1.35;
}
.repost-banner strong { color: var(--ice); }
.repost-banner em {
  display: inline-flex;
  margin-left: 6px;
  color: var(--success);
  font-style: normal;
  font-weight: 900;
}
.repost-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(73, 241, 200, 0.12);
}
.verified {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--cobalt));
  color: white;
  font-size: 0.7rem;
  vertical-align: middle;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  color: var(--cyan);
  background: rgba(23, 230, 242, 0.10);
  border: 1px solid rgba(23, 230, 242, 0.18);
}
.chip.muted { color: var(--muted); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.10); }
.chip.success { color: var(--success); background: rgba(73, 241, 200, 0.10); border-color: rgba(73, 241, 200, 0.20); }
.chip.warning { color: var(--warning); background: rgba(255, 211, 110, 0.10); border-color: rgba(255, 211, 110, 0.20); }
.post-body { margin: 14px 0 0; }
.post-body h3 { margin: 0 0 7px; font-size: 1.26rem; letter-spacing: -0.02em; }
.post-body p { margin: 0; color: #d8edf7; line-height: 1.55; white-space: pre-wrap; }
.post-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.83rem; }
.media-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.media-grid.one { grid-template-columns: 1fr; }
.media-grid.two,
.media-grid.three,
.media-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-grid img {
  width: 100%;
  height: 260px;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}
.media-grid.two img,
.media-grid.three img,
.media-grid.four img { height: 210px; }
.post-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.icon-btn {
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.icon-btn:hover,
.icon-btn.active { color: var(--cyan); background: rgba(23, 230, 242, 0.09); }
.comments-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}
.comment-row { display: flex; gap: 9px; align-items: flex-start; }
.comment-bubble { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); flex: 1; }
.comment-bubble strong { display: block; font-size: 0.88rem; }
.comment-bubble p { margin: 3px 0 0; color: #d8edf7; line-height: 1.4; }
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}
.empty-state strong { display: block; color: var(--ice); font-size: 1.2rem; margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { padding: 17px; border-radius: var(--radius-lg); }
.card h3,
.right-card h3 { margin: 0 0 8px; letter-spacing: -0.025em; }
.card p,
.right-card p { color: var(--muted); line-height: 1.45; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.stat-box { padding: 13px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.stat-box strong { display:block; font-size:1.35rem; }
.stat-box span { display:block; color:var(--muted); font-size:.78rem; margin-top:3px; font-weight:800; }
.people-list,
.group-list,
.thread-list { display: grid; gap: 12px; }
.person-row,
.group-row,
.thread-row {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.085);
}
.person-row-main,
.group-row-main,
.thread-row-main { flex: 1; min-width: 0; }
.person-row h3,
.group-row h3,
.thread-row h3 { margin: 0 0 4px; font-size: 1rem; }
.person-row p,
.group-row p,
.thread-row p { margin: 0; color: var(--muted); line-height: 1.4; }
.person-row small,
.group-row small,
.thread-row small { display: block; color: var(--muted-2); margin-top: 6px; }
.right-rail { display: grid; gap: 14px; }
.right-card { padding: 17px; border-radius: var(--radius-lg); }
.moment-strip { display: grid; gap: 10px; }
.moment-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.055); }
.moment-thumb { width: 54px; height: 54px; border-radius: 16px; object-fit: cover; background: linear-gradient(135deg, rgba(23, 230, 242, 0.22), rgba(11, 93, 255, 0.30)); }
.moment-card strong,
.moment-card span { display:block; }
.moment-card span { color: var(--muted); font-size: .8rem; }
.mobile-bar { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(16px);
}
.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 30px;
  background: rgba(7, 17, 32, 0.96);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal-header { display:flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.modal-header h2 { margin:0; letter-spacing:-.035em; }
.close-btn { width: 38px; height: 38px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ice); font-weight: 950; }
.dm-layout { display: grid; grid-template-columns: 320px 1fr; gap: 14px; }
.dm-thread-pane,
.dm-message-pane { min-height: 580px; }
.message-list { display:grid; gap:10px; align-content:end; max-height: 440px; overflow:auto; padding: 10px; border-radius:22px; background:rgba(255,255,255,.04); }
.dm-request-banner {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 13px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(23, 230, 242, 0.11), rgba(11, 93, 255, 0.10));
  border: 1px solid rgba(23, 230, 242, 0.22);
}
.dm-request-banner strong { display:block; color: var(--ice); }
.dm-request-banner span { display:block; color: #d8edf7; line-height: 1.35; }
.dm-request-banner.pending { background: rgba(255, 211, 110, 0.08); border-color: rgba(255, 211, 110, 0.22); }
.dm-request-banner.declined { background: rgba(255, 91, 125, 0.08); border-color: rgba(255, 91, 125, 0.22); }
.thread-row.unread { border-color: rgba(23, 230, 242, 0.24); background: linear-gradient(135deg, rgba(23, 230, 242, 0.08), rgba(11, 93, 255, 0.08)); }
.message-bubble { max-width: 78%; padding: 11px 13px; border-radius: 18px; background: rgba(255,255,255,.08); }
.message-bubble.mine { justify-self:end; background: linear-gradient(135deg, rgba(23,230,242,.22), rgba(11,93,255,.25)); border:1px solid rgba(23,230,242,.18); }
.message-bubble small { display:block; color: var(--muted); margin-top: 5px; }
.message-form { display:flex; gap:8px; margin-top: 10px; }
.message-form .input { flex:1; }
.legal-page { display:grid; min-height:100vh; place-items:center; padding:24px; }
.legal-card { width:min(820px, 100%); padding:32px; border:1px solid var(--border); border-radius:32px; background:rgba(8,26,51,.78); box-shadow:var(--shadow); }
.legal-logo { width:76px; height:76px; border-radius:22px; }
.legal-back { display:inline-block; color:var(--cyan); text-decoration:none; font-weight:900; margin-bottom:20px; }
.legal-card h1 { font-size:clamp(2rem, 4vw, 3.5rem); letter-spacing:-.055em; }
.legal-card p { color:#d8edf7; line-height:1.6; }
.hidden { display: none !important; }

@media (min-width: 561px) {
  .hero-title > span { white-space: nowrap; }
}

/* v17 DM photos and message receipts */
.dm-composer { align-items: center; }
.dm-photo-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(23, 230, 242, 0.12);
  border: 1px solid rgba(23, 230, 242, 0.22);
  color: var(--cyan);
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}
.dm-photo-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.message-bubble {
  display: grid;
  gap: 7px;
}
.message-bubble.image-only { padding: 8px; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-photo-wrap {
  display: block;
  width: min(330px, 100%);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.message-photo {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.message-meta { line-height: 1.25; }
.message-bubble.mine .message-meta { color: rgba(233, 251, 255, 0.76); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .right-rail { display: none; }
}
@media (max-width: 1040px) {
  .landing-grid { grid-template-columns: 1fr; }
  .hero-content { max-width: 760px; }
  .auth-card { max-width: 640px; }
}
@media (max-width: 860px) {
  .landing { padding: 18px; }
  .landing-nav { margin-bottom: 18px; }
  .landing-links { display: none; }
  .hero-card { padding: 28px; }
  .hero-highlights, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-shell { display: block; padding: 10px 10px 92px; }
  .sidebar { display: none; }
  .page-header { flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .post-actions { grid-template-columns: repeat(2, 1fr); }
  .media-grid.two,
  .media-grid.three,
  .media-grid.four { grid-template-columns: 1fr; }
  .media-grid img,
  .media-grid.two img,
  .media-grid.three img,
  .media-grid.four img { height: 260px; }
  .mobile-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 7px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(3, 6, 13, 0.88);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
  }
  .mobile-bar button {
    border-radius: 18px;
    padding: 9px 5px;
    background: transparent;
    color: var(--muted);
    font-weight: 950;
    font-size: .72rem;
  }
  .mobile-bar button.active { color:white; background:rgba(23,230,242,.12); }
  .mobile-bar span { display:block; font-size:1.15rem; margin-bottom:2px; }
  .dm-layout { grid-template-columns: 1fr; }
  .dm-thread-pane, .dm-message-pane { min-height: auto; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(2.75rem, 14vw, 3.2rem); letter-spacing: -0.06em; }
  .hero-highlight { padding: 15px; }
  .auth-card, .hero-card, .card, .post-card, .composer-card, .page-header { border-radius: 24px; }
  .composer-top { display: block; }
  .composer-top > .avatar { margin-bottom: 10px; }
  .post-header { align-items: flex-start; }
  .post-header .chip { display: none; }
  .person-row, .group-row, .thread-row { display: grid; }
  .row-actions { width: 100%; }
  .row-actions .btn { flex: 1; }
}

/* v8 discovery, alerts, and production polish */
.search-card { padding: 18px; }
.search-input { font-size: 1.02rem; }
.search-discovery-grid { align-items: start; }
.discovery-panel { display: grid; gap: 10px; }
.section-label {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin: 4px 0 2px;
}
.topic-cloud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.topic-cloud.compact { gap: 7px; }
.topic-chip,
.post-topics button,
.mini-link {
  border: 1px solid rgba(23, 230, 242, 0.18);
  border-radius: 999px;
  background: rgba(23, 230, 242, 0.08);
  color: var(--cyan);
  font-weight: 950;
}
.topic-chip {
  padding: 9px 11px;
  font-size: 0.86rem;
}
.topic-chip span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 5px;
}
.post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.post-topics button {
  padding: 7px 10px;
  font-size: 0.78rem;
}
.alerts-list {
  display: grid;
  gap: 12px;
}
.alert-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.085);
}
.alert-row.unread {
  border-color: rgba(23, 230, 242, 0.24);
  background: linear-gradient(135deg, rgba(23, 230, 242, 0.09), rgba(11, 93, 255, 0.08));
}
.alert-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}
.alert-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(23, 230, 242, 0.10);
  border: 1px solid rgba(23, 230, 242, 0.14);
}
.alert-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.alert-copy strong,
.alert-copy span,
.alert-copy small { display: block; }
.alert-copy strong { color: var(--ice); }
.alert-copy span { color: #d8edf7; line-height: 1.38; }
.alert-copy small { color: var(--muted-2); font-weight: 750; }
.unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(23, 230, 242, 0.10);
  margin-top: 8px;
}
.right-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.right-card-header h3 { margin: 0; }
.mini-link {
  padding: 7px 9px;
  font-size: 0.74rem;
}
.mini-alert-list { display: grid; gap: 8px; }
.mini-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border-radius: 16px;
  color: var(--ice);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}
.mini-alert.unread {
  background: rgba(23, 230, 242, 0.075);
  border-color: rgba(23, 230, 242, 0.16);
}
.mini-alert strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}
.mini-alert small { color: var(--muted-2); font-weight: 800; }
.user-mini-button {
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.user-mini-button span { display: block; min-width: 0; }
.user-mini-button strong,
.user-mini-button em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.user-mini-button em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}
.highlight-post {
  animation: riseHighlight 1.65s ease;
}
@keyframes riseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(23, 230, 242, 0.0); border-color: rgba(23, 230, 242, 0.12); }
  30% { box-shadow: 0 0 0 7px rgba(23, 230, 242, 0.16); border-color: rgba(23, 230, 242, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(23, 230, 242, 0.0); border-color: rgba(255, 255, 255, 0.12); }
}
.mobile-bar button em {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--cyan);
  color: #03111b;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 950;
}

@media (max-width: 860px) {
  .mobile-bar {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mobile-bar::-webkit-scrollbar { display: none; }
  .mobile-bar button {
    min-width: 74px;
    flex: 1 0 74px;
  }
  .alert-row { display: grid; }
  .alert-row .btn { width: 100%; }
  .search-discovery-grid { grid-template-columns: 1fr; }
}

.dm-sync-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 211, 110, 0.28);
  background: linear-gradient(135deg, rgba(255, 211, 110, 0.10), rgba(23, 230, 242, 0.06));
  box-shadow: var(--shadow-soft);
}
.dm-sync-warning strong,
.dm-sync-warning span,
.dm-sync-warning small { display: block; }
.dm-sync-warning strong { margin-bottom: 4px; color: var(--ice); }
.dm-sync-warning span { color: #d8edf7; line-height: 1.45; }
.dm-sync-warning small { color: var(--warning); margin-top: 8px; font-weight: 800; line-height: 1.35; }
.subtle-card { margin: 12px 0; background: rgba(255,255,255,.055); }
.subtle-card code { color: var(--cyan); }
@media (max-width: 860px) {
  .dm-sync-warning { display: grid; }
  .dm-sync-warning .btn { width: 100%; }
}

.diagnostic-identities p {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 10px 0 0;
}
.diagnostic-identities p span {
  color: var(--muted);
  font-weight: 850;
}
.diagnostic-identities code {
  overflow-wrap: anywhere;
  user-select: all;
}
.sync-check-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.sync-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.045);
}
.sync-check > span { min-width: 0; overflow-wrap: anywhere; }
.sync-check > strong { text-transform: capitalize; }
.sync-check > small {
  grid-column: 1 / -1;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.sync-check.success > strong { color: var(--success); }
.sync-check.error > strong,
.sync-check.error > small { color: var(--danger); }
.sync-check.pending > strong { color: var(--warning); }
@media (max-width: 560px) {
  .diagnostic-identities p,
  .sync-check { grid-template-columns: 1fr; }
  .sync-check > small { grid-column: auto; }
}

/* v17 finished-product polish: profile, groups, safety, and mobile web */
.post-management-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.mini-link.danger-link,
.btn.danger,
.danger-link {
  color: var(--danger);
}
.btn.danger {
  background: rgba(255, 91, 125, 0.12);
  border: 1px solid rgba(255, 91, 125, 0.28);
}
.profile-modal,
.group-modal {
  width: min(920px, 100%);
}
.public-profile-hero,
.group-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(23,230,242,.12), rgba(11,93,255,.14));
  margin-bottom: 14px;
}
.public-profile-cover {
  height: 118px;
  background:
    radial-gradient(circle at 24% 28%, rgba(23,230,242,.32), transparent 18rem),
    radial-gradient(circle at 80% 12%, rgba(11,93,255,.33), transparent 18rem);
}
.public-profile-main {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0 18px 18px;
  margin-top: -42px;
}
.public-profile-main .avatar {
  border: 4px solid rgba(7,17,32,.95);
  box-shadow: var(--shadow-soft);
}
.profile-bio {
  color: #d8edf7;
  line-height: 1.55;
  margin: 12px 0;
}
.profile-actions {
  margin: 16px 0;
}
.group-hero-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
}
.group-hero-avatar {
  width: 76px !important;
  height: 76px !important;
  font-size: 1.1rem;
}
.group-hero-card h3 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -.035em; }
.moment-card-button {
  width: 100%;
  text-align: left;
  color: inherit;
  border: 1px solid transparent;
}
.moment-card-button:hover {
  border-color: rgba(23,230,242,.20);
  background: rgba(23,230,242,.08);
}
.dm-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dm-safety-actions { justify-content: flex-end; }
.subtle-card { margin-top: 12px; }
.user-mini-button {
  width: 100%;
  color: inherit;
  text-align: left;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 10px;
}
.user-mini-button:hover { background: rgba(23,230,242,.08); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  body { background-attachment: fixed; }
  .app-shell { padding: 8px 8px 98px; }
  .content { gap: 12px; }
  .page-header { padding: 16px; }
  .page-title { font-size: clamp(2rem, 11vw, 2.8rem); }
  .composer-card, .post-card, .card { padding: 14px; }
  .dm-layout { gap: 10px; }
  .dm-message-pane { min-height: 420px; }
  .message-list { max-height: 52vh; }
  .mobile-bar {
    left: 8px;
    right: 8px;
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(68px, 1fr));
    scrollbar-width: none;
  }
  .mobile-bar::-webkit-scrollbar { display: none; }
  .mobile-bar button { font-size: .66rem; }
  .mobile-bar span { font-size: 1.05rem; }
  .modal { max-height: 92vh; padding: 16px; }
  .dm-conversation-header { align-items: flex-start; }
}
@media (max-width: 560px) {
  .post-management-actions { justify-content: flex-start; }
  .public-profile-main,
  .group-hero-card,
  .dm-conversation-header { display: grid; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-box { padding: 10px; }
  .stat-box strong { font-size: 1rem; }
  .message-form.dm-composer { display: grid; grid-template-columns: auto 1fr auto; }
  .dm-photo-button { width: 42px; height: 42px; }
}

/* v18 DM compatibility polish */
.message-bubble .muted-message {
  color: var(--muted);
  font-style: italic;
}
.message-meta {
  white-space: normal;
}

/* v19 mobile web polish: iOS-like nav, landing header, profile cover, modal close fix */
.brand-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(23,230,242,.22), rgba(11,93,255,.36)), #071120;
  color: var(--ice);
  font-weight: 1000;
  letter-spacing: .04em;
  text-decoration: none;
  position: relative;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-logo::before {
  content: attr(data-fallback);
  display: none;
  font-size: .85rem;
}
.brand-logo.is-fallback::before { display: block; }
.brand-logo.is-fallback img { display: none !important; }
.loading-logo { width: 74px; height: 74px; border-radius: 23px; }
.landing-brand-link { text-decoration: none; }
.landing-brand-card {
  padding: 8px 12px 8px 8px;
  border-radius: 22px;
  background: rgba(3, 6, 13, .28);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(18px);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-brand strong,
.auth-brand small { display: block; }
.auth-brand strong { font-size: 1.05rem; letter-spacing: -.01em; }
.auth-brand small { color: var(--muted); font-weight: 800; margin-top: 2px; }
.header-actions .chip { margin-left: 5px; }
.public-profile-cover {
  background-size: cover;
  background-position: center;
}
.cover-gradient-0 { background: radial-gradient(circle at 24% 28%, rgba(23,230,242,.32), transparent 18rem), radial-gradient(circle at 80% 12%, rgba(11,93,255,.33), transparent 18rem); }
.cover-gradient-1 { background: linear-gradient(135deg, rgba(23,230,242,.30), rgba(11,93,255,.32)); }
.cover-gradient-2 { background: linear-gradient(135deg, rgba(11,93,255,.30), rgba(73,241,200,.18)); }
.cover-gradient-3 { background: radial-gradient(circle at 20% 20%, rgba(73,241,200,.24), transparent 16rem), linear-gradient(135deg, rgba(8,26,51,.95), rgba(11,93,255,.26)); }
.cover-gradient-4 { background: linear-gradient(135deg, rgba(5,191,255,.24), rgba(3,6,13,.70)), radial-gradient(circle at 80% 10%, rgba(23,230,242,.28), transparent 16rem); }
.cover-gradient-5 { background: radial-gradient(circle at 14% 20%, rgba(11,93,255,.32), transparent 17rem), radial-gradient(circle at 86% 30%, rgba(23,230,242,.22), transparent 18rem); }

@media (max-width: 860px) {
  .landing {
    padding: max(18px, env(safe-area-inset-top)) 18px 34px;
  }
  .landing-nav {
    margin-bottom: 20px;
  }
  .landing-brand-card {
    width: 100%;
    padding: 10px;
    border-radius: 24px;
  }
  .landing-brand-card .brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }
  .landing-brand-card .brand-title {
    font-size: 1.08rem;
  }
  .landing-brand-card .brand-subtitle {
    font-size: .92rem;
  }
  .auth-brand .brand-logo {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }
  .mobile-bar {
    z-index: 120;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow: visible !important;
    gap: 6px;
  }
  .mobile-bar button {
    min-width: 0 !important;
    flex: initial !important;
    font-size: .72rem;
    padding: 10px 4px;
  }
  .mobile-bar span {
    font-size: 1.26rem;
  }
  .modal-backdrop {
    align-items: start;
    padding: 12px 10px calc(104px + env(safe-area-inset-bottom));
    z-index: 80;
  }
  .profile-modal {
    width: 100%;
    max-height: calc(100vh - 126px - env(safe-area-inset-bottom));
  }
  .profile-modal .modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 2px 0 12px;
    background: linear-gradient(180deg, rgba(7,17,32,.98), rgba(7,17,32,.86));
    backdrop-filter: blur(14px);
  }
  .close-btn {
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
  }
  .public-profile-cover { height: 150px; }
}

@media (max-width: 560px) {
  .landing-grid {
    gap: 16px;
  }
  .hero-card,
  .auth-card {
    padding: 28px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .auth-tabs {
    gap: 10px;
  }
  .mobile-bar {
    left: 10px;
    right: 10px;
    border-radius: 30px;
    padding: 8px;
  }
  .mobile-bar button {
    border-radius: 22px;
  }
}

/* v21 Settings parity + stable mobile navigation */
.settings-page-header .page-title span { font-size: .72em; vertical-align: .08em; }
.settings-profile-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
}
.settings-profile-summary > div { min-width: 0; }
.settings-profile-summary strong,
.settings-profile-summary span,
.settings-profile-summary small { display: block; }
.settings-profile-summary strong { font-size: 1.1rem; }
.settings-profile-summary span { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.settings-profile-summary small { color: var(--cyan); font-weight: 850; margin-top: 5px; }
.settings-groups,
.settings-detail-stack { display: grid; gap: 16px; }
.settings-group,
.settings-card { padding: 18px; }
.settings-group h2,
.settings-card h2 { margin: 0 0 12px; letter-spacing: -.03em; }
.settings-card > p { color: var(--muted); line-height: 1.55; }
.settings-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.settings-card-heading h2 { margin: 0; }
.settings-card-heading p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.settings-count {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(23,230,242,.09);
  border: 1px solid rgba(23,230,242,.18);
  font-weight: 900;
}
.settings-row-list,
.settings-action-list,
.settings-people-list,
.settings-report-list { display: grid; gap: 9px; }
.settings-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  color: var(--ice);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
  text-align: left;
}
.settings-row:hover { background: rgba(23,230,242,.075); border-color: rgba(23,230,242,.18); }
.settings-row-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(23,230,242,.1);
  font-size: 1.18rem;
}
.settings-row-copy { min-width: 0; }
.settings-row-copy strong,
.settings-row-copy small { display: block; }
.settings-row-copy strong { font-size: .96rem; }
.settings-row-copy small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.settings-row-chevron { color: var(--cyan); font-size: 1.55rem; font-weight: 900; }
.settings-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.settings-info {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.075);
}
.settings-info span,
.settings-info strong { display: block; }
.settings-info span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.settings-info strong { margin-top: 5px; overflow-wrap: anywhere; }
.settings-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.verification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}
.verification-item {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,211,110,.07);
  border: 1px solid rgba(255,211,110,.16);
}
.verification-item.verified { background: rgba(73,241,200,.07); border-color: rgba(73,241,200,.18); }
.verification-item strong,
.verification-item span { display: block; }
.verification-item span { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.settings-form { display: grid; gap: 12px; }
.settings-form h2 { margin: 12px 0 0; }
.settings-form h2:first-child { margin-top: 0; }
.settings-form-note { margin: -3px 0 4px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.settings-toggle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
  cursor: pointer;
}
.settings-toggle span strong,
.settings-toggle span small { display: block; }
.settings-toggle span small { color: var(--muted); margin-top: 4px; line-height: 1.35; }
.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-toggle i {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.13);
  transition: .2s ease;
}
.settings-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d9e7ef;
  transition: .2s ease;
}
.settings-toggle input:checked + i {
  background: linear-gradient(135deg, var(--cyan), var(--cobalt));
  border-color: rgba(23,230,242,.48);
}
.settings-toggle input:checked + i::after { transform: translateX(20px); background: white; }
.settings-select { padding: 2px 0; }
.settings-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
}
.settings-person > div { min-width: 0; }
.settings-person strong,
.settings-person span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.settings-person span { color: var(--muted); margin-top: 3px; font-size: .84rem; }
.settings-callout {
  display: grid;
  gap: 5px;
  padding: 14px;
  margin: 12px 0;
  border-radius: 18px;
  background: rgba(23,230,242,.065);
  border: 1px solid rgba(23,230,242,.17);
}
.settings-callout span { color: var(--muted); line-height: 1.45; }
.danger-callout { background: rgba(255,91,125,.07); border-color: rgba(255,91,125,.2); }
.danger-zone { border-color: rgba(255,91,125,.2); }
.guidelines-list { display: grid; gap: 12px; }
.guidelines-list article {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
}
.guidelines-list article p { color: var(--muted); line-height: 1.48; margin: 5px 0 0; }
.settings-report-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
}
.settings-report-row strong,
.settings-report-row small { display: block; }
.settings-report-row small { margin-top: 3px; color: var(--muted); }
.settings-report-row p { margin: 7px 0 0; color: #d8edf7; line-height: 1.4; }
.settings-report-row em { color: var(--success); font-style: normal; font-size: .78rem; font-weight: 900; }
.settings-about-brand { display: flex; align-items: center; gap: 14px; }
.settings-about-brand h2,
.settings-about-brand p { margin: 0; }
.settings-about-brand p { color: var(--muted); margin-top: 3px; }
.settings-saved-posts { margin-top: 0; }
.settings-launch { order: 2; }
.mobile-bar button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

@media (max-width: 860px) {
  .app-shell { padding-bottom: calc(144px + env(safe-area-inset-bottom)); }
  
.app-loading-clean {
  min-height: 100vh;
  background: transparent;
}

.toast {
    z-index: 260;
    bottom: calc(116px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 28px);
    border-radius: 18px;
    text-align: center;
  }
  .mobile-bar { z-index: 220 !important; }
  .settings-page-header .header-actions { width: 100%; }
  .settings-page-header .header-actions .btn { flex: 1; }
  .settings-profile-summary { grid-template-columns: auto minmax(0, 1fr); }
  .settings-profile-summary > .chip { grid-column: 1 / -1; justify-self: start; }
  .settings-info-grid,
  .verification-grid { grid-template-columns: 1fr; }
  .settings-actions-grid { display: grid; grid-template-columns: 1fr; }
  .settings-actions-grid .btn { width: 100%; }
  .content { padding-bottom: 24px; }
}

@media (max-width: 560px) {
  .settings-group,
  .settings-card { padding: 14px; }
  .settings-row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 11px; }
  .settings-row-icon { width: 40px; height: 40px; border-radius: 13px; }
  .settings-row-copy strong { font-size: .92rem; }
  .settings-row-copy small { font-size: .76rem; }
  .settings-toggle { padding: 13px; }
  .settings-person { grid-template-columns: auto minmax(0, 1fr); }
  .settings-person .btn { grid-column: 1 / -1; width: 100%; }
  .settings-report-row { grid-template-columns: auto minmax(0, 1fr); }
  .settings-report-row em { grid-column: 2; }
}

/* v23 polish: no visible loading card, profile media uploads, smaller alert read buttons */
#app.app-loading,
#app.app-loading-clean {
  min-height: 100vh;
  background: transparent;
}
#app.app-loading .loading-card,
#app.app-loading-clean .loading-card {
  display: none !important;
}
.profile-own-cover {
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}
.profile-own-cover .public-profile-cover {
  min-height: 145px;
  background-size: cover;
  background-position: center;
}
.profile-own-author {
  margin-top: 4px;
}
.profile-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.profile-upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}
.profile-upload-preview span,
.profile-upload-preview strong,
.profile-upload-preview small {
  display: block;
  min-width: 0;
}
.profile-upload-preview small {
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-cover-preview {
  width: 82px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
  background:
    radial-gradient(circle at 25% 20%, rgba(23,230,242,.34), transparent 5rem),
    linear-gradient(135deg, rgba(23,230,242,.18), rgba(11,93,255,.30));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(23, 230, 242, 0.16);
}
.profile-file-actions .file-pill {
  justify-content: center;
}
.alert-read-btn {
  align-self: center;
  flex: 0 0 auto;
  min-width: 86px;
  padding: 8px 11px !important;
  font-size: 0.76rem !important;
  line-height: 1.1;
}
@media (max-width: 860px) {
  .profile-upload-grid,
  .profile-file-actions {
    grid-template-columns: 1fr;
  }
  .profile-own-cover .public-profile-cover {
    min-height: 118px;
  }
  .alert-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .alert-row .alert-read-btn {
    width: auto !important;
    min-width: 72px;
    padding: 8px 9px !important;
    border-radius: 999px;
    font-size: 0.7rem !important;
  }
}

/* v23 profile media cropper + iOS-matched cover ratio */
.cropped-media,
.profile-cover-image,
.profile-avatar-image,
.crop-preview-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: translate(calc(-50% + var(--crop-x, 0%)), calc(-50% + var(--crop-y, 0%))) scale(var(--crop-scale, 1));
  transform-origin: center;
  will-change: transform;
}
.avatar,
.mini-cover-preview,
.public-profile-cover {
  position: relative;
  overflow: hidden;
}
.avatar .profile-avatar-image {
  border-radius: inherit;
}
.public-profile-cover {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 5 / 2;
  background-size: cover;
  background-position: center;
}
.profile-cover-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 6, 13, 0.03), rgba(3, 6, 13, 0.34));
}
.profile-own-cover .public-profile-cover {
  min-height: 0 !important;
  aspect-ratio: 5 / 2;
}
.mini-cover-preview {
  width: 96px;
  height: auto;
  aspect-ratio: 5 / 2;
}
.crop-preview-avatar {
  position: relative;
  overflow: hidden;
}
.crop-modal {
  width: min(760px, 100%);
}
.crop-stage {
  position: relative;
  width: 100%;
  margin: 8px auto 18px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  background: #02060d;
  border: 1px solid rgba(23, 230, 242, 0.30);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 22px 52px rgba(0,0,0,.28);
}
.crop-stage:active { cursor: grabbing; }
.profile-crop-stage {
  width: min(430px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
}
.cover-crop-stage {
  aspect-ratio: 5 / 2;
  border-radius: 24px;
}
.crop-guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 2px solid rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.crop-guide.circle-guide { border-radius: 50%; }
.crop-guide.cover-guide { border-radius: 22px; }
.crop-controls {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
}
.crop-controls label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 850;
}
.crop-controls input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}
.crop-actions {
  justify-content: flex-end;
  margin-top: 14px;
}
@media (max-width: 860px) {
  .public-profile-cover,
  .profile-own-cover .public-profile-cover {
    aspect-ratio: 5 / 2;
    min-height: 0 !important;
  }
  .crop-modal { padding: 14px; }
  .cover-crop-stage { border-radius: 18px; }
  .crop-guide.cover-guide { border-radius: 16px; }
}


/* v25 alert deletion and conversation deletion */
.alert-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.alert-delete-btn {
  min-width: 66px;
  padding: 8px 10px !important;
  color: var(--danger) !important;
  border-color: rgba(255, 91, 125, 0.24) !important;
  background: rgba(255, 91, 125, 0.08) !important;
  font-size: 0.72rem !important;
  line-height: 1.1;
}
.alert-delete-btn:hover {
  background: rgba(255, 91, 125, 0.14) !important;
}
.dm-safety-actions .danger-link[data-action="delete-dm-thread"] {
  border-color: rgba(255, 91, 125, 0.22);
  background: rgba(255, 91, 125, 0.07);
}
@media (max-width: 860px) {
  .alert-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .alert-row .alert-read-btn,
  .alert-row .alert-delete-btn {
    width: auto !important;
    min-width: 62px;
    padding: 7px 8px !important;
    font-size: 0.68rem !important;
  }
}
@media (max-width: 560px) {
  .dm-safety-actions {
    justify-content: flex-start;
  }
}

/* v27: Search/Discovery suggested people layout fix */
.search-people-list .section-label {
  grid-column: 1 / -1;
}
.search-people-list .person-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 10px 12px;
  overflow: hidden;
}
.search-people-list .person-row > button:first-child {
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  justify-self: start;
}
.search-people-list .person-row-main {
  min-width: 0;
  width: 100%;
}
.search-people-list .person-row-main h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  line-height: 1.15;
  max-width: 100%;
}
.search-people-list .person-row-main h3 .chip {
  padding: 4px 7px;
  font-size: 0.64rem;
}
.search-people-list .person-row p,
.search-people-list .person-row small {
  overflow-wrap: anywhere;
  word-break: normal;
}
.search-people-list .person-row .row-actions {
  grid-column: 2 / 3;
  width: 100%;
  margin-top: 0;
  gap: 6px;
  justify-content: flex-start;
}
.search-people-list .person-row .row-actions .btn {
  flex: 0 1 auto;
  min-height: 32px;
  padding: 8px 11px;
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .search-people-list .person-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .search-people-list .person-row > button:first-child {
    width: 48px;
    height: 48px;
  }
}
@media (max-width: 560px) {
  .search-people-list .person-row .row-actions .btn {
    flex: 1 1 96px;
  }
}
