:root {
  --bg: #09090a;
  --panel: #0d0d0f;
  --raised: #131316;
  --soft: #18181c;
  --text: #f2f1ed;
  --text-soft: #cac9c3;
  --muted: #858581;
  --line: #26262a;
  --line-soft: #1d1d20;
  --accent: #7f93f0;
  --accent-dark: #202640;
  --terracotta: #a66c60;
  --danger: #d66f78;
  color-scheme: dark;
  font-family: Inter, Manrope, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); margin: 0; min-height: 100vh; }
button, input, textarea { color: inherit; font: inherit; }
button { border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.is-hidden { display: none !important; }
::selection { background: #344477; color: #fff; }
:focus-visible { outline: 2px solid #96a7f3; outline-offset: 3px; }

.brand {
  align-items: center;
  background: transparent;
  display: inline-flex;
  gap: 12px;
}

.brand strong {
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: 19px;
  letter-spacing: .16em;
}

.brand-mark {
  background: #151519;
  border: 1px solid #303036;
  border-radius: 11px;
  display: inline-block;
  height: 39px;
  overflow: hidden;
  position: relative;
  transform: rotate(-3deg);
  width: 39px;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i,
.brand-mark b {
  background: linear-gradient(135deg, #82d7ee, #6484ee 55%, #8b72db);
  border-radius: 99px;
  content: "";
  display: block;
  position: absolute;
}

.brand-mark::before { height: 7px; left: 8px; top: 8px; transform: rotate(38deg); width: 25px; }
.brand-mark::after { height: 7px; left: 7px; top: 22px; transform: rotate(-38deg); width: 25px; }
.brand-mark i { height: 8px; left: 15px; top: 15px; width: 8px; }
.brand-mark b { height: 4px; right: 5px; top: 5px; width: 4px; }
.brand-mark-large { height: 55px; width: 55px; }

.boot-view {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

.boot-view .brand-mark { animation: boot 1.1s ease-in-out infinite alternate; }
.boot-view strong { font-family: "Arial Black", sans-serif; letter-spacing: .2em; margin-top: 19px; }
.boot-view p { color: var(--muted); font-size: 12px; margin: 9px 0 0; }

.auth-shell {
  background:
    linear-gradient(90deg, transparent 0 64%, rgba(255,255,255,.018) 64% 64.08%, transparent 64.08%),
    #09090a;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.auth-shell::before,
.auth-shell::after { content: ""; height: 5px; position: absolute; top: 0; }
.auth-shell::before { background: #758bf2; left: 0; width: 34%; }
.auth-shell::after { background: #a66c60; right: 0; width: 11%; }

.auth-topbar,
.auth-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding-left: clamp(24px, 5vw, 76px);
  padding-right: clamp(24px, 5vw, 76px);
  width: 100%;
}

.auth-topbar { padding-top: 35px; }
.auth-secure { align-items: center; color: #858581; display: flex; font-size: 11px; gap: 8px; }
.auth-secure svg { height: 15px; width: 15px; }

.auth-layout {
  align-items: center;
  display: grid;
  gap: clamp(55px, 9vw, 140px);
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .65fr);
  margin: 0 auto;
  max-width: 1440px;
  padding: 62px clamp(24px, 5vw, 76px) 70px;
  width: 100%;
}

.auth-copy { animation: rise .55s ease both; }
.eyebrow { align-items: center; color: #999995; display: flex; font-size: 10px; font-weight: 800; gap: 10px; letter-spacing: .17em; }
.eyebrow i { background: var(--accent); height: 7px; transform: rotate(45deg); width: 7px; }
.auth-copy h1 {
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(56px, 6.8vw, 104px);
  letter-spacing: -.075em;
  line-height: .88;
  margin: 28px 0 30px;
}
.auth-copy h1 em { color: #91a2f0; font-style: normal; }
.auth-copy > p { color: #a6a5a0; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.7; margin: 0; max-width: 600px; }

.rhythm-card {
  align-items: center;
  border-top: 1px solid #2b2b2e;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 46px;
  max-width: 620px;
  padding-top: 16px;
}
.rhythm-card > span { color: #777773; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.rhythm-card > div { align-items: center; display: flex; gap: 6px; height: 42px; }
.rhythm-card i { animation: rhythm 1.8s ease-in-out infinite alternate; background: #5263ad; flex: 1; height: 24%; opacity: .7; }
.rhythm-card i:nth-child(2) { animation-delay: -.4s; height: 56%; }
.rhythm-card i:nth-child(3) { animation-delay: -.8s; height: 82%; }
.rhythm-card i:nth-child(4) { animation-delay: -1.2s; height: 39%; }
.rhythm-card i:nth-child(5) { animation-delay: -.2s; background: #8c5f5b; height: 68%; }
.rhythm-card i:nth-child(6) { animation-delay: -.7s; height: 34%; }
.rhythm-card i:nth-child(7) { animation-delay: -1.4s; height: 91%; }
.rhythm-card i:nth-child(8) { animation-delay: -1s; height: 49%; }

.auth-panel {
  animation: panelIn .65s .08s ease both;
  background: #111114;
  border: 1px solid #2d2d32;
  border-radius: 20px;
  box-shadow: 18px 18px 0 #0d0d0f;
  min-height: 545px;
  overflow: hidden;
}

.auth-tabs { border-bottom: 1px solid #29292d; display: grid; grid-template-columns: 1fr 1fr; }
.auth-tabs button { background: transparent; color: #777773; cursor: pointer; font-size: 13px; font-weight: 700; padding: 17px; position: relative; }
.auth-tabs button.active { color: #f1f0ec; }
.auth-tabs button.active::after { background: var(--accent); bottom: -1px; content: ""; height: 2px; left: 24%; position: absolute; width: 52%; }

.auth-form { padding: 34px 32px 30px; }
.form-kicker { color: #91a0e8; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.auth-form h2 { font-family: "Arial Black", sans-serif; font-size: 34px; letter-spacing: -.05em; margin: 10px 0 8px; }
.auth-form > p { color: #848480; font-size: 12px; line-height: 1.55; margin: 0 0 24px; }
.auth-form label {
  background: #151518;
  border: 1px solid #303035;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  margin-top: 11px;
  padding: 9px 11px;
  transition: border-color .15s ease, transform .15s ease;
}
.auth-form label:focus-within { border-color: #6475c2; transform: translateY(-1px); }
.auth-form label > span { color: #777773; font-size: 9px; }
.auth-form input { background: transparent; border: 0; font-size: 14px; outline: 0; padding: 6px 0 2px; width: 100%; }
.field-row { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.handle-field { align-items: center; display: flex; gap: 2px; }
.handle-field b { color: #777773; font-size: 15px; font-weight: 500; }
.form-error { color: #e19aa3; font-size: 11px; line-height: 1.45; min-height: 17px; padding: 9px 2px 0; }
.form-submit {
  align-items: center;
  background: #f0efe9;
  border-radius: 10px;
  color: #111113;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  margin-top: 10px;
  min-height: 48px;
  padding: 0 14px;
  transition: background .15s ease, transform .15s ease;
  width: 100%;
}
.form-submit:hover { background: #fff; transform: translateY(-1px); }
.form-submit:disabled { cursor: wait; opacity: .55; }
.form-submit svg { height: 18px; width: 18px; }
.form-switch { background: transparent; color: #757571; cursor: pointer; font-size: 11px; margin-top: 18px; width: 100%; }
.form-switch strong { color: #aeb8ec; }

.auth-footer { border-top: 1px solid #202023; color: #5f5f5c; font-size: 9px; font-weight: 700; letter-spacing: .12em; padding-bottom: 21px; padding-top: 21px; }

.app-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: 232px minmax(0, 720px) 322px;
  margin: 0 auto;
  max-width: 1340px;
  padding: 0 20px;
}

.left-sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 8px 18px;
  position: sticky;
  top: 0;
}
.sidebar-brand { cursor: pointer; margin: 0 0 30px 10px; padding: 2px; }
.main-nav { display: flex; flex-direction: column; gap: 3px; }
.main-nav button {
  align-items: center;
  background: transparent;
  border-radius: 10px;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  gap: 14px;
  padding: 12px 13px;
  text-align: left;
  transition: background .14s ease, color .14s ease, transform .14s ease;
  width: 100%;
}
.main-nav button:hover { background: #131315; color: var(--text); transform: translateX(2px); }
.main-nav button.active { background: #19191d; color: #fff; }
.main-nav svg { height: 22px; width: 22px; }
.write-button {
  align-items: center;
  background: #f0efe9;
  border-radius: 11px;
  color: #111113;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 9px;
  justify-content: center;
  margin-top: 20px;
  min-height: 46px;
  transition: transform .14s ease;
}
.write-button:hover { transform: translateY(-2px); }
.sidebar-spacer { flex: 1; }
.account-card {
  align-items: center;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 9px;
  text-align: left;
  width: 100%;
}
.account-card:hover { background: #141416; }
.account-card > span { min-width: 0; }
.account-card strong, .account-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card strong { font-size: 13px; }
.account-card small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.account-card > svg { color: var(--muted); height: 18px; width: 18px; }
.logout-button {
  align-items: center;
  background: transparent;
  color: #777773;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 7px;
  margin: 2px 10px 0;
  padding: 7px 0;
}
.logout-button:hover { color: #c9c8c2; }
.logout-button svg { height: 15px; width: 15px; }

.avatar {
  align-items: center;
  background: #28282d;
  border: 1px solid #3a3a40;
  border-radius: 50%;
  color: #e8e7e2;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Arial Black", sans-serif;
  font-size: 12px;
  justify-content: center;
  height: 42px;
  width: 42px;
}
.avatar-lg { border: 5px solid var(--bg); font-size: 31px; height: 126px; width: 126px; }
.verified { color: #7892ff; display: inline-flex; margin-left: 4px; vertical-align: -2px; }
.verified svg { fill: #7892ff; height: 17px; stroke: #0c0c0e; stroke-width: 3; width: 17px; }

.main-column {
  background: #0b0b0c;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
  min-width: 0;
  position: relative;
}
.main-column::before { background: var(--accent); content: ""; height: 3px; left: -1px; position: absolute; right: -1px; top: 0; z-index: 30; }
.page-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(11,11,12,.93);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 15;
}
.page-header h1 { font-family: "Arial Black", sans-serif; font-size: 23px; letter-spacing: -.04em; margin: 2px 0 0; }
.page-header span { color: var(--muted); display: block; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.page-header svg { color: var(--muted); height: 21px; width: 21px; }
.feed-tabs { align-self: stretch; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 66px; width: 100%; }
.feed-tabs button { align-items: center; background: transparent; color: var(--muted); cursor: pointer; display: flex; font-size: 13px; font-weight: 700; justify-content: center; min-height: 66px; min-width: 0; padding: 0 12px; position: relative; white-space: nowrap; }
.feed-tabs button.active { color: var(--text); }
.feed-tabs button.active::after { background: var(--accent); bottom: 0; content: ""; height: 2px; left: 34%; position: absolute; width: 32%; }

.composer {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 13px;
  grid-template-columns: auto minmax(0,1fr);
  padding: 20px;
  transition: background .18s ease;
}
.composer:focus-within { background: #0e0e11; }
.composer-body { min-width: 0; }
.composer textarea { background: transparent; border: 0; font-size: 17px; line-height: 1.55; min-height: 86px; outline: 0; padding: 7px 0; resize: none; width: 100%; }
.composer textarea::placeholder { color: #696967; }
.composer-image { background: #141417; border: 1px solid #303034; border-radius: 9px; display: flex; gap: 8px; margin-bottom: 11px; padding: 9px 10px; }
.composer-image input { background: transparent; border: 0; font-size: 12px; outline: 0; width: 100%; }
.composer-actions { align-items: center; display: flex; justify-content: space-between; }
.composer-actions > button:first-child { align-items: center; background: transparent; color: var(--accent); cursor: pointer; display: flex; padding: 7px; }
.publish-button { background: #f0efe9; border-radius: 9px; color: #111113; cursor: pointer; font-size: 12px; font-weight: 800; padding: 9px 14px; }
.publish-button:disabled { cursor: default; opacity: .36; }

.post-card {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 13px;
  grid-template-columns: auto minmax(0,1fr);
  padding: 20px;
  transition: background .14s ease, transform .14s ease;
}
.post-card:hover { background: #0f0f11; transform: translateX(2px); }
.post-body { min-width: 0; }
.post-head { align-items: center; display: flex; gap: 5px; min-width: 0; }
.post-head strong { font-size: 14px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head > span, .post-head time { color: var(--muted); font-size: 11px; }
.post-content { color: #dfddd7; font-size: 14.5px; line-height: 1.65; margin: 8px 0 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.post-media { border: 1px solid #2b2b30; border-radius: 13px; margin-bottom: 13px; max-height: 520px; object-fit: cover; overflow: hidden; width: 100%; }
.post-media img { height: 100%; max-height: 520px; object-fit: cover; width: 100%; }
.post-actions { align-items: center; display: flex; justify-content: space-between; max-width: 530px; }
.post-actions button, .post-actions span {
  align-items: center;
  background: transparent;
  color: #777773;
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  padding: 4px;
}
.post-actions button { cursor: pointer; }
.post-actions svg { height: 17px; width: 17px; }
.post-actions .active-like { color: #da7783; }
.post-actions .active-repost { color: #75ad8c; }
.post-actions .active-save { color: #8299ff; }

.empty-state { align-items: center; display: flex; flex-direction: column; padding: 92px 28px; text-align: center; }
.empty-state > i { align-items: center; background: #17171a; border: 1px solid #2b2b30; border-radius: 50%; color: #aaa9a4; display: inline-flex; height: 54px; justify-content: center; width: 54px; }
.empty-state svg { height: 24px; width: 24px; }
.empty-state h2 { font-family: "Arial Black", sans-serif; font-size: 23px; letter-spacing: -.04em; margin: 18px 0 8px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; max-width: 440px; }
.empty-state button { background: #f0efe9; border-radius: 9px; color: #111113; cursor: pointer; font-size: 12px; font-weight: 800; margin-top: 18px; padding: 10px 14px; }

.right-sidebar { display: flex; flex-direction: column; gap: 14px; height: fit-content; padding: 14px 0 28px; position: sticky; top: 0; }
.global-search { align-items: center; background: #141416; border: 1px solid #29292d; border-radius: 12px; color: var(--muted); display: grid; gap: 8px; grid-template-columns: auto 1fr auto; padding: 11px 13px; }
.global-search:focus-within { border-color: #484850; }
.global-search svg { height: 18px; width: 18px; }
.global-search input { background: transparent; border: 0; font-size: 13px; outline: 0; min-width: 0; }
.global-search button { background: transparent; color: var(--muted); cursor: pointer; display: flex; padding: 0; }
.side-card { background: #111113; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .16s ease, transform .16s ease; }
.side-card:hover { border-color: #36363c; transform: translateY(-2px); }
.side-card header { align-items: center; display: flex; justify-content: space-between; padding: 17px 17px 11px; }
.side-card header span { color: var(--muted); display: block; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.side-card h2 { font-family: "Arial Black", sans-serif; font-size: 17px; letter-spacing: -.03em; margin: 4px 0 0; }
.side-card header svg { color: var(--muted); height: 19px; width: 19px; }
.side-list { display: flex; flex-direction: column; }
.side-list button { background: transparent; cursor: pointer; padding: 11px 17px; text-align: left; width: 100%; }
.side-list button:hover { background: #171719; }
.side-list strong, .side-list small { display: block; }
.side-list strong { font-size: 12px; }
.side-list small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.side-empty { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; padding: 12px 17px 16px; }
.side-link { align-items: center; background: transparent; border-top: 1px solid var(--line-soft); color: #a2afe9; cursor: pointer; display: flex; font-size: 10px; font-weight: 700; justify-content: space-between; padding: 12px 17px 14px; width: 100%; }
.side-link svg { height: 15px; width: 15px; }
.site-footer { color: #646460; display: flex; flex-wrap: wrap; font-size: 9px; gap: 7px 12px; padding: 2px 8px; }

.discover-intro { background: #111113; border-bottom: 1px solid var(--line); padding: 34px 28px 29px; position: relative; }
.discover-intro::before { background: var(--terracotta); content: ""; height: 6px; position: absolute; right: 0; top: 0; width: 12%; }
.discover-intro > span, .block-head span { color: #98a7e8; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.discover-intro h2 { font-family: "Arial Black", sans-serif; font-size: clamp(30px, 5vw, 43px); letter-spacing: -.06em; line-height: 1; margin: 13px 0 15px; }
.discover-intro p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; max-width: 570px; }
.signal-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.signal-list span { align-items: center; background: #19191d; border: 1px solid #2d2d31; border-radius: 8px; color: var(--text-soft); display: flex; font-size: 10px; gap: 7px; padding: 8px 10px; }
.signal-list svg { height: 15px; width: 15px; }
.content-block { border-bottom: 1px solid var(--line); padding: 24px 20px; }
.block-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 17px; }
.block-head h2 { font-family: "Arial Black", sans-serif; font-size: 20px; letter-spacing: -.04em; margin: 3px 0 0; }
.interest-grid, .trend-grid { display: grid; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.interest-grid button, .trend-grid button { background: #121214; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; padding: 15px; text-align: left; }
.interest-grid button:hover, .trend-grid button:hover { background: #18181b; }
.interest-grid strong, .trend-grid strong { display: block; font-size: 13px; }
.interest-grid span, .trend-grid span { color: var(--muted); display: block; font-size: 10px; margin-top: 4px; }

.profile-cover { background: linear-gradient(110deg,#171719,#202024 58%,#111113); border-bottom: 1px solid #2a2a2e; height: 220px; overflow: hidden; position: relative; }
.profile-cover::before { background: var(--accent); content: ""; height: 7px; left: 0; position: absolute; top: 0; width: 24%; }
.profile-cover::after { background: var(--terracotta); bottom: 0; content: ""; height: 7px; position: absolute; right: 0; width: 9%; }
.profile-cover b { color: rgba(255,255,255,.045); font-family: "Arial Black",sans-serif; font-size: 260px; line-height: .8; position: absolute; right: 25px; top: 22px; }
.profile-info { padding: 0 22px 24px; }
.profile-avatar-row { align-items: flex-start; display: flex; height: 73px; justify-content: space-between; }
.profile-avatar-row .avatar { position: relative; top: -55px; }
.profile-buttons { display: flex; gap: 8px; padding-top: 13px; }
.secondary-button { align-items: center; background: transparent; border: 1px solid #37373c; border-radius: 9px; cursor: pointer; display: inline-flex; font-size: 11px; font-weight: 700; gap: 7px; height: 38px; justify-content: center; padding: 0 12px; }
.secondary-button:hover { background: #19191d; }
.profile-info h1 { align-items: center; display: flex; font-family: "Arial Black",sans-serif; font-size: 27px; gap: 5px; letter-spacing: -.05em; margin: 4px 0 2px; }
.profile-handle { color: var(--muted); font-size: 12px; }
.profile-bio { color: #d7d5d0; font-size: 14px; line-height: 1.6; margin: 17px 0 11px; }
.profile-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 11px; gap: 9px 16px; }
.profile-meta span { align-items: center; display: flex; gap: 6px; }
.profile-meta svg { height: 15px; width: 15px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 17px; }
.profile-stats span { color: var(--muted); font-size: 11px; }
.profile-stats strong { color: var(--text); font-size: 12px; }
.profile-tabs { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); }
.profile-tabs button { background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 15px 10px; }
.profile-tabs button.active { color: var(--text); box-shadow: inset 0 -2px var(--accent); }

.edit-card { background: #111113; border: 1px solid var(--line); border-radius: 12px; margin: 20px; padding: 18px; }
.edit-card h2 { font-family: "Arial Black",sans-serif; font-size: 18px; margin: 0 0 14px; }
.edit-card label { border: 1px solid #333338; border-radius: 9px; display: block; margin-top: 9px; padding: 8px 10px; }
.edit-card label span { color: var(--muted); display: block; font-size: 9px; }
.edit-card input, .edit-card textarea { background: transparent; border: 0; font-size: 13px; outline: 0; padding: 6px 0 2px; resize: vertical; width: 100%; }
.edit-card button { background: #f0efe9; border-radius: 8px; color: #111113; cursor: pointer; font-size: 11px; font-weight: 800; margin-top: 12px; padding: 9px 12px; }

.metric-grid { display: grid; gap: 8px; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 20px; }
.metric-grid article { background: #111113; border: 1px solid var(--line); border-radius: 10px; padding: 13px; }
.metric-grid svg { color: var(--muted); height: 18px; width: 18px; }
.metric-grid strong { display: block; font-family: "Arial Black",sans-serif; font-size: 24px; margin: 16px 0 3px; }
.metric-grid span { color: var(--muted); display: block; font-size: 9px; line-height: 1.3; }
.admin-section { border-top: 1px solid var(--line); padding: 24px 20px; }
.admin-table { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.admin-row { align-items: center; background: #101012; border-bottom: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: auto minmax(0,1fr) auto; padding: 12px; }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong, .admin-row small { display: block; }
.admin-row strong { font-size: 12px; }
.admin-row small { color: var(--muted); font-size: 9px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row button { background: #efeee9; border-radius: 8px; color: #111113; cursor: pointer; font-size: 9px; font-weight: 800; padding: 8px 10px; }
.admin-row button.active { background: transparent; border: 1px solid #3a3a3f; color: var(--text-soft); }
.admin-post { background: #111113; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; padding: 14px 45px 14px 14px; position: relative; }
.admin-post strong { font-size: 11px; }
.admin-post p { font-size: 12px; line-height: 1.55; margin: 8px 0 0; }
.admin-post button { background: transparent; color: var(--danger); cursor: pointer; position: absolute; right: 12px; top: 13px; }

.mobile-nav { display: none; }
.toast {
  align-items: center;
  animation: toast .18s ease both;
  background: #f0efe9;
  border-radius: 9px;
  bottom: 24px;
  box-shadow: 0 16px 50px rgba(0,0,0,.38);
  color: #111113;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  left: 50%;
  padding: 11px 14px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 120;
}
.toast svg { height: 17px; width: 17px; }

@keyframes boot { to { opacity: .5; transform: rotate(7deg) scale(.95); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes panelIn { from { opacity: 0; transform: translate(24px,16px); } }
@keyframes rhythm { to { opacity: .38; transform: scaleY(.52); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%,8px); } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 218px minmax(0,720px); max-width: 990px; }
  .right-sidebar { display: none; }
  .auth-layout { gap: 48px; grid-template-columns: minmax(0,1fr) minmax(365px,.7fr); }
}

@media (max-width: 850px) {
  body { padding-bottom: 66px; }
  .auth-shell { background: #09090a; }
  .auth-layout { align-items: start; grid-template-columns: 1fr; padding-top: 70px; }
  .auth-copy h1 { max-width: 700px; }
  .auth-panel { box-shadow: 10px 10px 0 #0d0d0f; min-height: 0; }
  .auth-footer span:nth-child(2) { display: none; }
  .app-shell { display: block; max-width: 720px; padding: 0; }
  .left-sidebar { display: none; }
  .main-column { border: 0; }
  .mobile-nav {
    align-items: center;
    backdrop-filter: blur(16px);
    background: rgba(14,14,16,.94);
    border-top: 1px solid var(--line);
    bottom: 0;
    display: flex;
    justify-content: space-around;
    left: 0;
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 50;
  }
  .mobile-nav button { background: transparent; color: var(--muted); padding: 7px 12px; }
  .mobile-nav button.active { color: var(--text); }
  .mobile-nav svg { height: 22px; width: 22px; }
}

@media (max-width: 560px) {
  .auth-topbar { padding-top: 24px; }
  .auth-secure { font-size: 0; }
  .auth-layout { gap: 38px; padding-top: 52px; }
  .auth-copy h1 { font-size: clamp(47px,16vw,72px); }
  .auth-copy > p { font-size: 14px; }
  .rhythm-card { margin-top: 35px; }
  .auth-panel { border-radius: 16px; }
  .auth-form { padding: 29px 20px 25px; }
  .auth-form h2 { font-size: 29px; }
  .field-row { grid-template-columns: 1fr; }
  .auth-footer span:last-child { display: none; }
  .composer, .post-card { padding-left: 13px; padding-right: 13px; }
  .post-content { font-size: 14px; }
  .post-actions .views { display: none; }
  .discover-intro { padding: 29px 20px 24px; }
  .interest-grid, .trend-grid { grid-template-columns: 1fr; }
  .profile-cover { height: 180px; }
  .avatar-lg { height: 106px; width: 106px; }
  .profile-avatar-row { height: 57px; }
  .profile-avatar-row .avatar { top: -47px; }
  .profile-info h1 { font-size: 23px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid article:last-child { grid-column: 1 / -1; }
  .feed-tabs { min-height: 58px; }
  .feed-tabs button { font-size: 14px; min-height: 58px; padding: 0 8px; }
  .session-list article { align-items: flex-start; flex-wrap: wrap; }
  .session-list article > span { flex-basis: calc(100% - 34px); }
  .session-list button { margin-left: 32px; }
  .panel-logout-button { min-height: 32px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Functional product surfaces */
.auth-tabs button { font-size: 15px; padding: 19px; }
.form-kicker { font-size: 11px; }
.auth-form > p { font-size: 14px; }
.auth-form label { padding: 11px 13px; }
.auth-form label > span { font-size: 11px; }
.auth-form input { font-size: 16px; }
.form-error, .form-switch { font-size: 13px; }
.form-submit { font-size: 14px; min-height: 52px; }

.avatar { overflow: hidden; }
.avatar img { height: 100%; object-fit: cover; width: 100%; }
.avatar-button,
.post-head button,
.page-header button { align-items: center; background: transparent; cursor: pointer; display: inline-flex; padding: 0; }
.post-head button { gap: 4px; min-width: 0; }
.post-head button strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card > .avatar-button { align-self: start; }
.compact-header { min-height: 55px; padding-bottom: 0; padding-top: 0; }
.mobile-searchbar { display: none; }
.post-media { border: 0; cursor: pointer; padding: 0; text-align: left; width: 100%; }
.post-media img { max-height: 620px; object-fit: cover; width: 100%; }
.composer-actions { gap: 10px; }
.composer-actions small { color: var(--muted); font-size: 10px; margin-right: auto; }
.icon-upload {
  align-items: center;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.icon-upload input { display: none; }
.icon-upload svg { height: 20px; width: 20px; }
.publish-button { margin-left: auto; }
.upload-preview {
  background: #111114;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 5px 0 12px;
  overflow: hidden;
  position: relative;
}
.upload-preview img { max-height: 360px; object-fit: cover; width: 100%; }
.upload-preview button {
  align-items: center;
  background: rgba(9,9,10,.82);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
}
.upload-preview button svg { height: 17px; width: 17px; }
.primary-button {
  align-items: center;
  background: #f1f0eb;
  border-radius: 9px;
  color: #111113;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  height: 38px;
  justify-content: center;
  padding: 0 14px;
}
.primary-button svg { height: 15px; width: 15px; }
.profile-buttons { flex-wrap: wrap; justify-content: flex-end; }
.form-title-row { align-items: center; display: flex; justify-content: space-between; }
.form-title-row button { align-items: center; background: transparent; color: var(--muted); display: flex; margin: 0; padding: 5px; }
.avatar-upload-row { align-items: center; cursor: pointer; display: flex !important; flex-direction: row; gap: 12px; }
.avatar-upload-row input { display: none; }
.avatar-upload-row span strong, .avatar-upload-row span small { display: block; }
.avatar-upload-row span strong { color: var(--text); font-size: 13px; }
.avatar-upload-row span small { color: var(--muted); font-size: 10px; margin-top: 3px; }

.search-section { border-bottom: 1px solid var(--line); padding: 20px; }
.search-section .post-card { margin-left: -20px; margin-right: -20px; }
.user-results { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.user-result {
  align-items: center;
  background: #0f0f11;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0,1fr) auto;
  padding: 14px;
  text-align: left;
  width: 100%;
}
.user-result:last-child { border-bottom: 0; }
.user-result:hover { background: #141417; }
.user-result > span strong, .user-result > span small { display: block; }
.user-result > span strong { align-items: center; display: flex; font-size: 13px; gap: 4px; }
.user-result > span small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.user-result p { color: var(--text-soft); font-size: 12px; line-height: 1.45; margin: 6px 0 0; }
.user-result > svg { color: var(--muted); height: 17px; width: 17px; }
.section-empty { color: var(--muted); font-size: 12px; padding: 10px 0; }

.notification-list { padding: 12px; }
.notification-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0,1fr) auto;
  padding: 14px;
  text-align: left;
  width: 100%;
}
.notification-item:hover { background: #111114; }
.notification-item.unread { background: #12151d; border-color: #29324d; }
.notification-item > span > strong { display: block; font-size: 13px; line-height: 1.4; }
.notification-item p { color: var(--text-soft); font-size: 12px; line-height: 1.5; margin: 5px 0; }
.notification-item time { color: var(--muted); font-size: 10px; }
.notification-item > svg { color: var(--muted); height: 17px; width: 17px; }
.notification-icon {
  align-items: center;
  background: #20263a;
  border-radius: 50%;
  color: #aab8ee;
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.notification-icon svg { height: 19px; width: 19px; }

.settings-stack { display: grid; gap: 10px; padding: 20px; }
.settings-card {
  align-items: center;
  background: #111113;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0,1fr) auto;
  padding: 17px;
}
.settings-card header { align-items: center; display: flex; gap: 12px; }
.settings-card header > svg { color: #a6b3ed; height: 20px; width: 20px; }
.settings-card h2 { font-size: 14px; margin: 0; }
.settings-card p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.settings-card select {
  background: #19191c;
  border: 1px solid #333338;
  border-radius: 9px;
  min-width: 170px;
  outline: 0;
  padding: 10px 34px 10px 11px;
}
.segmented { background: #19191c; border: 1px solid #303035; border-radius: 10px; display: flex; padding: 3px; }
.segmented label { cursor: pointer; }
.segmented input { display: none; }
.segmented span { border-radius: 7px; color: var(--muted); display: block; font-size: 11px; font-weight: 700; padding: 8px 11px; }
.segmented input:checked + span { background: #ecebe6; color: #111113; }
.switch { cursor: pointer; display: inline-flex; }
.switch input { display: none; }
.switch span { background: #2a2a2e; border-radius: 99px; height: 27px; position: relative; transition: .18s ease; width: 48px; }
.switch span::after { background: #fff; border-radius: 50%; content: ""; height: 21px; left: 3px; position: absolute; top: 3px; transition: .18s ease; width: 21px; }
.switch input:checked + span { background: #6576c2; }
.switch input:checked + span::after { transform: translateX(21px); }
.settings-save {
  background: #efeee9;
  border-radius: 10px;
  color: #111113;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  justify-self: end;
  padding: 11px 20px;
}
.security-panel { border-top: 1px solid var(--line); padding: 22px 20px; }
.password-form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr auto; }
.password-form label { background: #111113; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.password-form label span { color: var(--muted); display: block; font-size: 9px; }
.password-form input { background: transparent; border: 0; font-size: 13px; outline: 0; padding: 6px 0 2px; width: 100%; }
.password-form button { background: #efeee9; border-radius: 9px; color: #111113; cursor: pointer; font-size: 11px; font-weight: 800; padding: 0 14px; }
.session-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.session-list article { align-items: center; background: #111113; border-bottom: 1px solid var(--line); display: flex; gap: 12px; padding: 13px; }
.session-list article.is-current { background: #141418; }
.session-list article:last-child { border-bottom: 0; }
.session-list article > svg { color: #9aa8e7; height: 20px; width: 20px; }
.session-list article > span { flex: 1; min-width: 0; }
.session-list strong, .session-list small { display: block; }
.session-list strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-list small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.session-list button,
.panel-logout-button {
  align-items: center;
  background: #222226;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
}
.session-list button:hover,
.panel-logout-button:hover { border-color: #55565c; }
.session-list button:disabled { cursor: default; opacity: .45; }
.session-list button svg,
.panel-logout-button svg { height: 14px; width: 14px; }

#modal-root { inset: 0; position: fixed; z-index: 200; }
.modal-backdrop { background: rgba(0,0,0,.72); inset: 0; position: absolute; }
.comment-modal {
  background: #0d0d0f;
  border: 1px solid #2c2c31;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  left: 50%;
  max-height: min(900px, calc(100vh - 44px));
  max-width: 720px;
  overflow: hidden;
  position: absolute;
  top: 22px;
  transform: translateX(-50%);
  width: calc(100% - 30px);
}
.comment-modal > header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 18px;
}
.comment-modal > header span { color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.comment-modal > header h2 { font-size: 18px; margin: 2px 0 0; }
.comment-modal > header button { align-items: center; background: transparent; color: var(--muted); cursor: pointer; display: flex; padding: 7px; }
.modal-post { border-bottom: 1px solid var(--line); max-height: 280px; overflow: auto; }
.modal-post .post-card { border-bottom: 0; }
.modal-post .post-actions button[data-comments] { pointer-events: none; }
.comment-list { flex: 1; min-height: 100px; overflow-y: auto; padding: 6px 18px; }
.comment-card { display: grid; gap: 10px; grid-template-columns: auto minmax(0,1fr); padding: 13px 0; position: relative; }
.comment-card + .comment-card { border-top: 1px solid var(--line-soft); }
.comment-card.comment-child { margin-left: 42px; }
.comment-card.comment-child::before { border-left: 1px solid #34343a; content: ""; height: 100%; left: -22px; position: absolute; top: -14px; }
.comment-card p { font-size: 13px; line-height: 1.55; margin: 7px 0; white-space: pre-wrap; }
.comment-media { border: 1px solid var(--line); border-radius: 12px; margin-top: 9px; max-height: 360px; object-fit: cover; }
.inline-reply, .reply-context { align-items: center; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; font-size: 10px; gap: 5px; padding: 4px 0; }
.inline-reply svg { height: 13px; width: 13px; }
.comment-composer { border-top: 1px solid var(--line); padding: 12px 18px 16px; }
.comment-composer textarea { background: #141417; border: 1px solid #303035; border-radius: 11px; font-size: 14px; min-height: 68px; outline: 0; padding: 11px; resize: none; width: 100%; }
.comment-composer footer { align-items: center; display: flex; gap: 8px; margin-top: 7px; }
.comment-composer footer small { color: var(--muted); font-size: 10px; margin-right: auto; }
.comment-composer footer > button { background: #efeee9; border-radius: 8px; color: #111113; cursor: pointer; font-size: 11px; font-weight: 800; padding: 9px 14px; }
#reply-indicator { color: #aab6ec; cursor: pointer; font-size: 10px; padding: 0 2px 8px; }

.admin-overview { padding: 20px; }
.admin-overview .metric-grid { gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0; }
.admin-overview .metric-grid article { min-height: 132px; padding: 15px; }
.admin-overview .metric-grid article > span { align-items: center; background: #1b1e28; border-radius: 9px; color: #9ba9e7; display: flex; height: 34px; justify-content: center; width: 34px; }
.admin-overview .metric-grid strong { font-size: 28px; margin-top: 17px; }
.admin-overview .metric-grid small { color: var(--muted); font-size: 10px; }
.admin-panel { background: #101012; border: 1px solid var(--line); border-radius: 15px; margin: 0 20px 20px; overflow: hidden; }
.admin-panel > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 16px; }
.admin-panel > header span { color: #8998da; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.admin-panel > header h2 { font-size: 15px; margin: 4px 0 0; }
.admin-panel > header > strong { color: var(--muted); font-size: 12px; }
.admin-user { align-items: center; border-bottom: 1px solid var(--line-soft); display: grid; gap: 11px; grid-template-columns: auto minmax(0,1fr) auto; padding: 12px 14px; }
.admin-user:last-child { border-bottom: 0; }
.admin-user > span > strong, .admin-user > span > small { display: block; }
.admin-user > span > strong { align-items: center; display: flex; font-size: 12px; gap: 4px; }
.admin-user > span > small { color: var(--muted); font-size: 9px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user em { color: #8e9cda; display: inline-block; font-size: 8px; font-style: normal; margin-top: 5px; text-transform: uppercase; }
.admin-user > button { align-items: center; background: #efeee9; border-radius: 8px; color: #111113; cursor: pointer; display: flex; font-size: 9px; font-weight: 800; gap: 5px; padding: 8px 9px; }
.admin-user > button.active { background: #19191d; border: 1px solid #35353a; color: var(--text-soft); }
.admin-user > button svg { height: 14px; width: 14px; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; }
.admin-columns .admin-panel:first-child { margin-right: 5px; }
.admin-columns .admin-panel:last-child { margin-left: 5px; }
.moderation-list { max-height: 470px; overflow-y: auto; }
.moderation-list article { align-items: start; border-bottom: 1px solid var(--line-soft); display: grid; gap: 9px; grid-template-columns: minmax(0,1fr) auto; padding: 13px; }
.moderation-list article:last-child { border-bottom: 0; }
.moderation-list strong { font-size: 10px; }
.moderation-list p { font-size: 11px; line-height: 1.45; margin: 5px 0 0; }
.moderation-list button { background: transparent; color: var(--danger); cursor: pointer; padding: 3px; }
.moderation-list button svg { height: 15px; width: 15px; }

:root[data-theme="light"] {
  --bg: #f3f3f0;
  --panel: #fbfbf8;
  --raised: #fff;
  --soft: #e9e9e5;
  --text: #18181a;
  --text-soft: #46464a;
  --muted: #77777c;
  --line: #d9d9d5;
  --line-soft: #e7e7e3;
  color-scheme: light;
}
:root[data-theme="light"] .left-sidebar,
:root[data-theme="light"] .right-sidebar,
:root[data-theme="light"] .page-header,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .post-card,
:root[data-theme="light"] .profile-info,
:root[data-theme="light"] .settings-card,
:root[data-theme="light"] .security-panel,
:root[data-theme="light"] .session-list article,
:root[data-theme="light"] .admin-panel,
:root[data-theme="light"] .user-result,
:root[data-theme="light"] .comment-modal { background: var(--panel); }
:root[data-theme="light"] .main-nav button:hover,
:root[data-theme="light"] .main-nav button.active,
:root[data-theme="light"] .post-card:hover,
:root[data-theme="light"] .user-result:hover,
:root[data-theme="light"] .notification-item:hover { background: #e9e9e5; color: var(--text); }
:root[data-theme="light"] .global-search,
:root[data-theme="light"] .side-card,
:root[data-theme="light"] .edit-card,
:root[data-theme="light"] .password-form label,
:root[data-theme="light"] .comment-composer textarea { background: #fff; }
:root[data-theme="light"] .profile-cover { background: #d8dbe7; }

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #f3f3f0;
    --panel: #fbfbf8;
    --raised: #fff;
    --soft: #e9e9e5;
    --text: #18181a;
    --text-soft: #46464a;
    --muted: #77777c;
    --line: #d9d9d5;
    --line-soft: #e7e7e3;
    color-scheme: light;
  }
  :root[data-theme="system"] .left-sidebar,
  :root[data-theme="system"] .right-sidebar,
  :root[data-theme="system"] .page-header,
  :root[data-theme="system"] .composer,
  :root[data-theme="system"] .post-card,
  :root[data-theme="system"] .profile-info,
  :root[data-theme="system"] .settings-card,
  :root[data-theme="system"] .security-panel,
  :root[data-theme="system"] .session-list article,
  :root[data-theme="system"] .admin-panel,
  :root[data-theme="system"] .user-result,
  :root[data-theme="system"] .comment-modal { background: var(--panel); }
}

@media (max-width: 700px) {
  .mobile-searchbar {
    align-items: center;
    background: #121215;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 9px;
    grid-template-columns: auto 1fr auto;
    padding: 10px 13px;
  }
  .mobile-searchbar > svg { color: var(--muted); height: 18px; width: 18px; }
  .mobile-searchbar input { background: transparent; border: 0; font-size: 14px; outline: 0; }
  .mobile-searchbar button { align-items: center; background: #272932; border-radius: 8px; color: var(--text-soft); display: flex; height: 32px; justify-content: center; width: 32px; }
  .mobile-searchbar button svg { height: 16px; width: 16px; }
  .settings-card { align-items: stretch; grid-template-columns: 1fr; }
  .settings-card select { width: 100%; }
  .segmented { display: grid; grid-template-columns: repeat(3,1fr); }
  .segmented span { text-align: center; }
  .password-form { grid-template-columns: 1fr; }
  .password-form button { min-height: 42px; }
  .admin-columns { grid-template-columns: 1fr; }
  .admin-columns .admin-panel { margin-left: 14px !important; margin-right: 14px !important; }
  .admin-overview { padding: 14px; }
  .admin-overview .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-panel { margin-left: 14px; margin-right: 14px; }
  .comment-modal { border-radius: 0; inset: 0; max-height: none; top: 0; transform: none; width: 100%; }
  .modal-post { max-height: 230px; }
  .comment-card.comment-child { margin-left: 25px; }
}

.forgot-password {
  background: transparent;
  color: #aeb8ec;
  cursor: pointer;
  display: block;
  font-size: 13px;
  margin: 13px auto 0;
}
.auth-footer button,
.site-footer button {
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
}
.auth-footer button:hover,
.site-footer button:hover { color: var(--text-soft); }
.auth-secure b, .eyebrow b { font: inherit; }

.security-modal,
.document-modal {
  background: #111114;
  border: 1px solid #303036;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,.58);
  left: 50%;
  max-width: 480px;
  padding: 28px;
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
  width: calc(100% - 30px);
}
.security-modal { text-align: center; }
.security-modal-icon {
  align-items: center;
  background: #20263a;
  border-radius: 50%;
  color: #aab8ee;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}
.security-modal-icon svg { height: 23px; width: 23px; }
.security-modal h2 { font-family: "Arial Black",sans-serif; font-size: 24px; letter-spacing: -.04em; margin: 17px 0 8px; }
.security-modal > p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 auto 20px; max-width: 370px; }
.security-modal > p strong { color: var(--text-soft); }
.security-modal form label {
  background: #17171a;
  border: 1px solid #343439;
  border-radius: 10px;
  display: block;
  margin-top: 9px;
  padding: 9px 11px;
  text-align: left;
}
.security-modal form label span { color: var(--muted); display: block; font-size: 10px; }
.security-modal form input { background: transparent; border: 0; font-size: 18px; letter-spacing: .12em; outline: 0; padding: 8px 0 3px; width: 100%; }
.security-modal form input[type=email],
.security-modal form input[type=password] { font-size: 15px; letter-spacing: normal; }
.security-modal form > button {
  background: #efeee9;
  border-radius: 10px;
  color: #111113;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
  min-height: 46px;
  width: 100%;
}
.modal-close { background: transparent; color: var(--muted); cursor: pointer; padding: 5px; position: absolute; right: 13px; top: 13px; }
.modal-close svg { height: 19px; width: 19px; }

.document-modal { max-height: min(760px,calc(100vh - 40px)); max-width: 760px; overflow: hidden; padding: 0; top: 20px; transform: translateX(-50%); }
.document-modal header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 18px 20px; }
.document-modal header span { color: #95a4e5; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.document-modal h2 { font-family: "Arial Black",sans-serif; font-size: 22px; margin: 4px 0 0; }
.document-modal header button { background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }
.document-content { color: var(--text-soft); font-size: 14px; line-height: 1.8; max-height: calc(100vh - 145px); overflow-y: auto; padding: 22px 24px 30px; }

.account-restriction,
.username-alert {
  align-items: start;
  background: #22171a;
  border: 1px solid #573139;
  border-radius: 12px;
  display: flex;
  gap: 11px;
  margin: 18px 20px 0;
  padding: 13px;
}
.account-restriction > svg,
.username-alert > svg { color: #df8892; flex: 0 0 auto; height: 20px; width: 20px; }
.account-restriction strong,
.username-alert strong { font-size: 12px; }
.account-restriction p,
.username-alert p { color: #c8a8ab; font-size: 11px; line-height: 1.5; margin: 4px 0 0; }
.username-alert { margin: 14px 0; }

.admin-user-card { border-bottom: 1px solid var(--line-soft); }
.admin-user-card:last-child { border-bottom: 0; }
.admin-user-summary {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: auto minmax(0,1fr) auto;
  padding: 13px 14px;
}
.admin-user-summary > span > strong,
.admin-user-summary > span > small { display: block; }
.admin-user-summary > span > strong { align-items: center; display: flex; font-size: 13px; gap: 4px; }
.admin-user-summary > span > small { color: var(--muted); font-size: 10px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-summary em { color: #8e9cda; display: inline-block; font-size: 8px; font-style: normal; margin-top: 5px; text-transform: uppercase; }
.admin-user-summary > button {
  align-items: center;
  background: #efeee9;
  border-radius: 8px;
  color: #111113;
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 800;
  gap: 5px;
  padding: 9px 10px;
}
.admin-user-summary > button.active { background: #19191d; border: 1px solid #35353a; color: var(--text-soft); }
.admin-user-summary > button svg { height: 14px; width: 14px; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 13px 67px; }
.admin-user-actions button {
  align-items: center;
  background: #18181b;
  border: 1px solid #303035;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 9px;
  gap: 5px;
  padding: 7px 8px;
}
.admin-user-actions button svg { height: 13px; width: 13px; }
.admin-user-actions button.active-danger { background: #2b171b; border-color: #62313a; color: #eb929b; }
.admin-user-actions button.active-warning { background: #2b2618; border-color: #62552e; color: #e7c36f; }

.region-admin-list { overflow-x: auto; }
.region-admin-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px,1fr) auto auto auto 36px;
  min-width: 690px;
  padding: 12px 14px;
}
.region-admin-row:last-child { border-bottom: 0; }
.region-admin-row > div strong, .region-admin-row > div small { display: block; }
.region-admin-row > div strong { font-size: 12px; }
.region-admin-row > div small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.region-admin-row label { align-items: center; color: var(--text-soft); cursor: pointer; display: flex; font-size: 9px; gap: 6px; }
.region-admin-row input { accent-color: var(--accent); height: 15px; width: 15px; }
.region-admin-row button { align-items: center; background: #22242d; border-radius: 8px; color: #9fabe0; cursor: pointer; display: flex; height: 34px; justify-content: center; width: 34px; }
.region-admin-row button svg { height: 15px; width: 15px; }

.document-admin { overflow: visible; }
.admin-page-form { border-top: 1px solid var(--line); padding: 16px; }
.admin-page-form:first-of-type { border-top: 0; }
.document-editor-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.admin-page-form label { background: #151518; border: 1px solid #303035; border-radius: 9px; display: block; margin-bottom: 10px; padding: 9px 10px; }
.admin-page-form label span { color: var(--muted); display: block; font-size: 9px; }
.admin-page-form input,
.admin-page-form textarea { background: transparent; border: 0; font-size: 12px; line-height: 1.55; outline: 0; padding: 7px 0 2px; resize: vertical; width: 100%; }
.admin-page-form > button { align-items: center; background: #efeee9; border-radius: 8px; color: #111113; cursor: pointer; display: flex; font-size: 10px; font-weight: 800; gap: 6px; margin-left: auto; padding: 9px 12px; }
.admin-page-form > button svg { height: 14px; width: 14px; }

/* Complete light palette: no dark islands */
:root[data-theme="light"] .main-column { background: #f8f8f6; }
:root[data-theme="light"] .page-header { background: rgba(248,248,246,.94); }
:root[data-theme="light"] .main-nav button.active { background: #e2e3e8; color: #171719; }
:root[data-theme="light"] .main-nav button:hover,
:root[data-theme="light"] .account-card:hover,
:root[data-theme="light"] .composer:focus-within,
:root[data-theme="light"] .post-card:hover,
:root[data-theme="light"] .side-list button:hover,
:root[data-theme="light"] .secondary-button:hover,
:root[data-theme="light"] .interest-grid button:hover,
:root[data-theme="light"] .trend-grid button:hover { background: #ecece8; }
:root[data-theme="light"] .avatar { background: #e1e2e4; border-color: #c8c9cd; color: #303035; }
:root[data-theme="light"] .verified svg { stroke: #fff; }
:root[data-theme="light"] .post-content,
:root[data-theme="light"] .profile-bio { color: #353539; }
:root[data-theme="light"] .post-actions button,
:root[data-theme="light"] .post-actions span { color: #6f7075; }
:root[data-theme="light"] .empty-state > i,
:root[data-theme="light"] .global-search,
:root[data-theme="light"] .side-card,
:root[data-theme="light"] .discover-intro,
:root[data-theme="light"] .signal-list span,
:root[data-theme="light"] .interest-grid button,
:root[data-theme="light"] .trend-grid button,
:root[data-theme="light"] .edit-card,
:root[data-theme="light"] .metric-grid article,
:root[data-theme="light"] .admin-user-actions button,
:root[data-theme="light"] .upload-preview,
:root[data-theme="light"] .notification-item:hover,
:root[data-theme="light"] .settings-card,
:root[data-theme="light"] .security-panel,
:root[data-theme="light"] .session-list article,
:root[data-theme="light"] .password-form label,
:root[data-theme="light"] .security-modal,
:root[data-theme="light"] .document-modal,
:root[data-theme="light"] .comment-modal,
:root[data-theme="light"] .admin-panel,
:root[data-theme="light"] .admin-page-form label { background: #fff; }
:root[data-theme="light"] .notification-item.unread { background: #eef1fb; border-color: #cad1ed; }
:root[data-theme="light"] .composer-image,
:root[data-theme="light"] .comment-composer textarea,
:root[data-theme="light"] .security-modal form label,
:root[data-theme="light"] .settings-card select,
:root[data-theme="light"] .segmented { background: #f4f4f1; border-color: #d2d2ce; color: #202024; }
:root[data-theme="light"] .segmented input:checked + span { background: #24252a; color: #fff; }
:root[data-theme="light"] .profile-cover { background: linear-gradient(110deg,#dfe1e8,#eef0f5 58%,#d7dae3); border-color: #cfd1d7; }
:root[data-theme="light"] .profile-cover b { color: rgba(30,30,35,.055); }
:root[data-theme="light"] .secondary-button,
:root[data-theme="light"] .admin-user-summary > button.active { border-color: #c8c9cd; color: #343438; }
:root[data-theme="light"] .admin-user-summary > button.active { background: #f0f0ed; }
:root[data-theme="light"] .admin-user-actions button { border-color: #d3d3cf; }
:root[data-theme="light"] .admin-user-actions button.active-danger { background: #fff0f1; border-color: #e5b3b9; color: #a33e49; }
:root[data-theme="light"] .admin-user-actions button.active-warning { background: #fff8e5; border-color: #e6d39a; color: #8e6b18; }
:root[data-theme="light"] .account-restriction,
:root[data-theme="light"] .username-alert { background: #fff1f2; border-color: #e6bdc2; }
:root[data-theme="light"] .account-restriction p,
:root[data-theme="light"] .username-alert p { color: #76565a; }
:root[data-theme="light"] .mobile-searchbar { background: #f8f8f6; }
:root[data-theme="light"] .mobile-nav { background: rgba(250,250,247,.95); }
:root[data-theme="light"] .auth-shell { background: #f3f3f0; }
:root[data-theme="light"] .auth-panel { background: #fff; border-color: #d3d3cf; box-shadow: 18px 18px 0 #e5e5e1; }
:root[data-theme="light"] .auth-form label { background: #f6f6f3; border-color: #d6d6d2; }
:root[data-theme="light"] .auth-tabs,
:root[data-theme="light"] .auth-footer,
:root[data-theme="light"] .rhythm-card { border-color: #d8d8d4; }
:root[data-theme="light"] .auth-tabs button.active { color: #18181a; }
:root[data-theme="light"] .auth-form h2,
:root[data-theme="light"] .auth-copy h1 { color: #18181a; }
:root[data-theme="light"] .auth-copy > p,
:root[data-theme="light"] .auth-form > p { color: #646468; }

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .main-column { background: #f8f8f6; }
  :root[data-theme="system"] .page-header { background: rgba(248,248,246,.94); }
  :root[data-theme="system"] .main-nav button.active { background: #e2e3e8; color: #171719; }
  :root[data-theme="system"] .avatar { background: #e1e2e4; border-color: #c8c9cd; color: #303035; }
  :root[data-theme="system"] .post-content,
  :root[data-theme="system"] .profile-bio { color: #353539; }
  :root[data-theme="system"] .global-search,
  :root[data-theme="system"] .side-card,
  :root[data-theme="system"] .discover-intro,
  :root[data-theme="system"] .interest-grid button,
  :root[data-theme="system"] .trend-grid button,
  :root[data-theme="system"] .edit-card,
  :root[data-theme="system"] .metric-grid article,
  :root[data-theme="system"] .admin-panel,
  :root[data-theme="system"] .security-modal,
  :root[data-theme="system"] .document-modal { background: #fff; }
  :root[data-theme="system"] .profile-cover { background: linear-gradient(110deg,#dfe1e8,#eef0f5 58%,#d7dae3); }
}

@media (max-width: 700px) {
  .security-modal { padding: 24px 18px; }
  .document-editor-grid { grid-template-columns: 1fr; }
  .admin-user-summary { grid-template-columns: auto minmax(0,1fr); }
  .admin-user-summary > button { grid-column: 1 / -1; justify-content: center; }
  .admin-user-actions { padding-left: 14px; }
}

/* Full-screen profile editor and image cropper */
.profile-cover.has-image::before,
.profile-cover.has-image::after { z-index: 2; }
.profile-cover > img { height: 100%; object-fit: cover; width: 100%; }
.profile-editor-backdrop,
.profile-cropper-backdrop {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(3,3,5,.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
}
.profile-editor-backdrop { z-index: 120; }
.profile-cropper-backdrop { z-index: 140; }
.profile-editor-modal {
  background: #101012;
  border: 1px solid #303036;
  border-radius: 22px;
  box-shadow: 0 32px 100px rgba(0,0,0,.5);
  max-height: calc(100dvh - 48px);
  max-width: 760px;
  overflow: auto;
  width: 100%;
}
.profile-editor-header,
.profile-cropper > header {
  align-items: center;
  background: rgba(16,16,18,.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 19px 22px;
  position: sticky;
  top: 0;
  z-index: 4;
}
.profile-editor-header span,
.profile-cropper header span { color: #8498ef; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.profile-editor-header h2,
.profile-cropper header h3 { font-family: "Arial Black",sans-serif; font-size: 22px; letter-spacing: -.04em; margin: 3px 0 0; }
.profile-editor-header > button,
.profile-cropper header > button {
  align-items: center;
  background: #1e1e22;
  border: 1px solid #34343a;
  border-radius: 50%;
  color: var(--text);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.profile-editor-header svg,
.profile-cropper header svg { height: 18px; width: 18px; }
.profile-editor-form { padding-bottom: 22px; }
.profile-media-editor { border-bottom: 1px solid var(--line); position: relative; }
.cover-editor-preview {
  align-items: center;
  background: linear-gradient(120deg,#171719,#24252d 60%,#171719);
  display: flex;
  height: 230px;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.cover-editor-preview > img { height: 100%; object-fit: cover; width: 100%; }
.cover-editor-preview > b { color: rgba(255,255,255,.05); font-family: "Arial Black",sans-serif; font-size: 230px; line-height: 1; }
.cover-editor-preview > button {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(11,11,14,.72);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px;
  color: #fff;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  left: 50%;
  padding: 11px 14px;
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
}
.cover-editor-preview > button svg { height: 17px; width: 17px; }
.avatar-editor-block {
  align-items: center;
  display: flex;
  gap: 14px;
  min-height: 65px;
  padding: 0 24px 0 160px;
  position: relative;
}
.avatar-editor-block > div strong,
.avatar-editor-block > div small { display: block; }
.avatar-editor-block > div strong { font-size: 13px; }
.avatar-editor-block > div small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.editor-avatar-preview {
  align-items: center;
  background: #202126;
  border: 5px solid #101012;
  border-radius: 50%;
  bottom: 13px;
  color: #fff;
  display: flex;
  font-family: "Arial Black",sans-serif;
  font-size: 28px;
  height: 118px;
  justify-content: center;
  left: 24px;
  overflow: hidden;
  position: absolute;
  width: 118px;
}
.editor-avatar-preview > img { height: 100%; object-fit: cover; width: 100%; }
.editor-avatar-preview > svg {
  backdrop-filter: blur(8px);
  background: rgba(7,7,9,.7);
  border-radius: 50%;
  bottom: 4px;
  box-sizing: content-box;
  height: 16px;
  padding: 8px;
  position: absolute;
  right: 4px;
  width: 16px;
}
.profile-fields-grid { display: grid; gap: 11px; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 22px; }
.profile-fields-grid > label {
  background: #17171a;
  border: 1px solid #333338;
  border-radius: 12px;
  display: block;
  padding: 10px 12px;
}
.profile-fields-grid > label > span { color: var(--muted); display: block; font-size: 10px; }
.profile-fields-grid input,
.profile-fields-grid textarea {
  background: transparent;
  border: 0;
  font-size: 14px;
  outline: 0;
  padding: 8px 0 2px;
  resize: vertical;
  width: 100%;
}
.profile-field-wide { grid-column: 1 / -1; }
.profile-editor-form > footer,
.profile-cropper > footer { display: flex; gap: 9px; justify-content: flex-end; padding: 0 22px; }
.profile-editor-form > footer button,
.profile-cropper > footer button { margin: 0; min-width: 110px; }
.profile-cropper {
  background: #101012;
  border: 1px solid #303036;
  border-radius: 22px;
  box-shadow: 0 32px 100px rgba(0,0,0,.6);
  max-height: calc(100dvh - 40px);
  max-width: 720px;
  overflow: auto;
  width: 100%;
}
.crop-canvas-shell {
  background-color: #08080a;
  background-image: linear-gradient(45deg,#151519 25%,transparent 25%),linear-gradient(-45deg,#151519 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#151519 75%),linear-gradient(-45deg,transparent 75%,#151519 75%);
  background-position: 0 0,0 8px,8px -8px,-8px 0;
  background-size: 16px 16px;
  margin: 22px auto;
  max-width: calc(100% - 44px);
  overflow: hidden;
}
.crop-canvas-shell.avatar-crop { aspect-ratio: 1; border: 2px solid #8799e7; border-radius: 50%; max-width: 420px; }
.crop-canvas-shell.cover-crop { aspect-ratio: 8 / 3; border: 2px solid #8799e7; border-radius: 14px; }
.crop-canvas-shell canvas { display: block; height: 100%; object-fit: contain; width: 100%; }
.crop-controls { display: grid; gap: 11px; padding: 0 22px 20px; }
.crop-controls label { align-items: center; display: grid; gap: 12px; grid-template-columns: 110px 1fr; }
.crop-controls span { color: var(--muted); font-size: 11px; font-weight: 700; }
.crop-controls input { accent-color: #8799e7; width: 100%; }
.profile-cropper > footer { padding-bottom: 22px; }
.region-add-form {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0,1fr) auto;
  padding: 16px;
}
.region-add-form label { display: block; }
.region-add-form label > span { color: var(--muted); display: block; font-size: 10px; margin-bottom: 6px; }
.region-add-form select {
  background: #19191c;
  border: 1px solid #34343a;
  border-radius: 9px;
  min-height: 40px;
  padding: 0 10px;
  width: 100%;
}
.region-add-form button {
  align-items: center;
  background: #efeee9;
  border-radius: 9px;
  color: #111113;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
}
.region-add-form button svg { height: 16px; width: 16px; }
.region-add-form button:disabled { cursor: not-allowed; opacity: .45; }
.install-banner {
  align-items: center;
  animation: installBannerIn .28s ease both;
  background: rgba(18,18,21,.96);
  border: 1px solid #35363e;
  border-radius: 18px;
  bottom: 22px;
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  display: grid;
  gap: 13px;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  left: 50%;
  max-width: 680px;
  padding: 12px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  z-index: 170;
}
@keyframes installBannerIn {
  from { opacity: 0; transform: translate(-50%,16px); }
}
.install-banner-icon { border-radius: 13px; height: 48px; overflow: hidden; width: 48px; }
.install-banner-icon img { height: 100%; width: 100%; }
.install-banner strong { display: block; font-size: 13px; }
.install-banner p { color: var(--muted); font-size: 11px; line-height: 1.45; margin: 4px 0 0; }
.install-banner-action {
  background: #f0efe9;
  border-radius: 10px;
  color: #111113;
  font-size: 11px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
}
.install-banner-close {
  align-items: center;
  background: transparent;
  color: var(--muted);
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.install-banner-close svg { height: 17px; width: 17px; }
.push-actions { display: flex; gap: 7px; }
.push-actions button {
  background: #efeee9;
  border: 1px solid #efeee9;
  border-radius: 9px;
  color: #111113;
  font-size: 10px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 12px;
}
.push-actions button.is-enabled { background: transparent; border-color: #4a4a51; color: var(--text-soft); }
.notification-settings-card { align-items: start; }
.notification-preferences { display: grid; gap: 10px; min-width: 280px; }
.notification-preferences > label { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.notification-preferences > label > span:first-child { color: var(--text-soft); font-size: 11px; font-weight: 700; }

:root[data-theme="light"] .profile-editor-modal,
:root[data-theme="light"] .profile-cropper { background: #fff; border-color: #d4d4d0; }
:root[data-theme="light"] .profile-editor-header,
:root[data-theme="light"] .profile-cropper > header { background: rgba(255,255,255,.94); }
:root[data-theme="light"] .profile-editor-header > button,
:root[data-theme="light"] .profile-cropper header > button,
:root[data-theme="light"] .profile-fields-grid > label { background: #f5f5f2; border-color: #d5d5d1; }
:root[data-theme="light"] .editor-avatar-preview { border-color: #fff; }
:root[data-theme="light"] .region-add-form select { background: #fff; border-color: #d5d5d1; }
:root[data-theme="light"] .install-banner { background: rgba(255,255,255,.97); border-color: #d3d3d0; }
:root[data-theme="light"] .push-actions button.is-enabled { border-color: #cacac6; color: #343438; }

@media (max-width: 700px) {
  body { min-width: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  button, a, label, input, select, textarea { touch-action: manipulation; }
  input, select, textarea,
  .mobile-searchbar input,
  .profile-fields-grid input,
  .profile-fields-grid textarea { font-size: 16px; }
  .mobile-nav {
    bottom: 0;
    grid-template-columns: repeat(5,1fr);
    min-height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav button { min-height: 52px; padding: 7px 8px; }
  .mobile-nav button { flex: 1; }
  .profile-editor-backdrop,
  .profile-cropper-backdrop { padding: 0; }
  .profile-editor-modal,
  .profile-cropper { border: 0; border-radius: 0; height: 100dvh; max-height: none; max-width: none; width: 100%; }
  .profile-editor-header,
  .profile-cropper > header { padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
  .cover-editor-preview { height: 200px; }
  .avatar-editor-block { min-height: 78px; padding: 0 14px 0 126px; }
  .editor-avatar-preview { bottom: 17px; height: 96px; left: 14px; width: 96px; }
  .profile-fields-grid { grid-template-columns: 1fr; padding: 15px; }
  .profile-field-wide { grid-column: auto; }
  .profile-editor-form > footer { padding: 0 15px calc(18px + env(safe-area-inset-bottom)); }
  .profile-editor-form > footer button { flex: 1; min-height: 46px; }
  .crop-canvas-shell { margin: 18px auto; max-width: calc(100% - 28px); }
  .crop-canvas-shell.avatar-crop { max-width: min(84vw,420px); }
  .crop-controls { padding: 0 16px 18px; }
  .crop-controls label { grid-template-columns: 92px 1fr; }
  .profile-cropper > footer { padding: 0 16px calc(18px + env(safe-area-inset-bottom)); }
  .profile-cropper > footer button { flex: 1; min-height: 46px; }
  .region-add-form { align-items: stretch; grid-template-columns: 1fr; }
  .region-add-form select { font-size: 16px; }
  .region-add-form button { justify-content: center; }
  .push-actions { width: 100%; }
  .push-actions button { flex: 1; min-height: 44px; }
  .notification-preferences { min-width: 0; width: 100%; }
  .notification-preferences > label { min-height: 42px; }
  .install-banner {
    bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
    grid-template-columns: auto minmax(0,1fr) auto;
    padding: 11px;
  }
  .install-banner-action { grid-column: 2 / 3; justify-self: start; }
  .install-banner-close { grid-column: 3; grid-row: 1; }
}

/* HTTPS-era profile, notification prompt and configurable anti-bot controls */
.turnstile-slot {
  margin-top: 2px;
  min-height: 66px;
  overflow: hidden;
  width: 100%;
}
.turnstile-slot iframe { max-width: 100%; }

.profile-handle {
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  padding: 2px 0;
}
.profile-handle:hover { color: var(--text-soft); }
.profile-stats button {
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
}
.profile-stats button:hover { color: var(--text-soft); text-decoration: underline; }
.profile-stats button strong { color: var(--text); font-size: 12px; }
.profile-replies-list { padding: 0 20px; }
.profile-reply-card {
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
  min-width: 0;
  padding: 18px 0;
}
.profile-reply-card > div { min-width: 0; overflow: hidden; }
.profile-reply-card .post-head { align-items: baseline; flex-wrap: wrap; row-gap: 2px; }
.profile-reply-card p { overflow-wrap: anywhere; }
.profile-reply-card .comment-media { display: block; max-width: 100%; width: auto; }

.connections-modal {
  background: #101012;
  border: 1px solid #303036;
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0,0,0,.58);
  left: 50%;
  max-height: min(720px,calc(100vh - 40px));
  max-width: 540px;
  overflow: hidden;
  position: fixed;
  top: 20px;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  z-index: 201;
}
.connections-modal > header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 17px 18px;
}
.connections-modal > header span { color: #95a4e5; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.connections-modal > header h2 { font-size: 20px; margin: 3px 0 0; }
.connections-modal > header button { background: transparent; color: var(--muted); padding: 7px; }
.connections-modal > header svg { height: 19px; width: 19px; }
.connections-list { max-height: calc(100vh - 120px); overflow-y: auto; padding: 6px 12px 14px; }
.connection-user {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0,1fr) auto;
  padding: 13px 8px;
  text-align: left;
  width: 100%;
}
.connection-user:hover { background: var(--hover); }
.connection-user > span { min-width: 0; }
.connection-user strong, .connection-user small { display: block; }
.connection-user strong { align-items: center; display: flex; font-size: 13px; gap: 4px; }
.connection-user small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.connection-user p { color: var(--text-soft); font-size: 11px; margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-user > svg { color: var(--muted); height: 17px; width: 17px; }

.region-settings-controls { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.region-settings-controls > label { align-items: center; color: var(--text-soft); display: flex; font-size: 10px; font-weight: 700; gap: 10px; }

.push-prompt-backdrop {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(3,3,5,.76);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 260;
}
.push-prompt {
  background: #101012;
  border: 1px solid #34343a;
  border-radius: 22px;
  box-shadow: 0 35px 110px rgba(0,0,0,.65);
  max-width: 460px;
  padding: 30px;
  text-align: center;
  width: 100%;
}
.push-prompt-icon {
  align-items: center;
  background: #202437;
  border: 1px solid #343b5a;
  border-radius: 18px;
  color: #b9c5f5;
  display: inline-flex;
  height: 64px;
  justify-content: center;
  margin-bottom: 18px;
  width: 64px;
}
.push-prompt-icon svg { height: 27px; width: 27px; }
.push-prompt-kicker { color: #9eace8; display: block; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.push-prompt h2 { font-family: "Arial Black",sans-serif; font-size: 27px; letter-spacing: -.045em; margin: 8px 0 10px; }
.push-prompt p { color: var(--text-soft); font-size: 14px; line-height: 1.6; margin: 0 auto; max-width: 370px; }
.push-prompt-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1.35fr; margin-top: 23px; }
.push-prompt-actions button { justify-content: center; min-height: 46px; }
.push-prompt > small { color: var(--muted); display: block; font-size: 9px; margin-top: 13px; }

.turnstile-admin > header p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.turnstile-admin > header > strong.status-enabled { color: #94d5b1; }
.mail-admin > header p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.mail-admin > header > strong.status-enabled { color: #94d5b1; }
.mail-settings-form { padding: 16px; }
.mail-enable-row {
  align-items: center;
  background: #151518;
  border: 1px solid #303035;
  border-radius: 11px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}
.mail-enable-row strong, .mail-enable-row small { display: block; }
.mail-enable-row strong { font-size: 11px; }
.mail-enable-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.mail-settings-grid { display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 10px; }
.mail-settings-grid > label {
  background: #151518;
  border: 1px solid #303035;
  border-radius: 9px;
  padding: 9px 10px;
}
.mail-settings-grid label > span { color: var(--muted); display: block; font-size: 9px; }
.mail-settings-grid input, .mail-settings-grid select {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 12px;
  outline: 0;
  padding: 7px 0 2px;
  width: 100%;
}
.mail-settings-grid option { background: #151518; color: var(--text); }
.mail-settings-form > p { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 6px; margin: 12px 0; }
.mail-settings-form > p svg { height: 14px; width: 14px; }
.mail-form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.mail-form-actions button {
  align-items: center;
  background: #efeee9;
  border-radius: 8px;
  color: #111113;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 6px;
  padding: 10px 13px;
}
.mail-form-actions button:first-child { background: #22242d; color: #aeb9ec; }
.mail-form-actions button svg { height: 14px; width: 14px; }
.turnstile-settings-form { padding: 16px; }
.turnstile-enable-row {
  align-items: center;
  background: #151518;
  border: 1px solid #303035;
  border-radius: 11px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}
.turnstile-enable-row strong, .turnstile-enable-row small { display: block; }
.turnstile-enable-row strong { font-size: 11px; }
.turnstile-enable-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.turnstile-key-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.turnstile-key-grid > label {
  background: #151518;
  border: 1px solid #303035;
  border-radius: 9px;
  padding: 9px 10px;
}
.turnstile-key-grid label > span { color: var(--muted); display: block; font-size: 9px; }
.turnstile-key-grid input { background: transparent; border: 0; font-size: 12px; outline: 0; padding: 7px 0 2px; width: 100%; }
.turnstile-settings-form > p { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 6px; margin: 12px 0; }
.turnstile-settings-form > p svg { height: 14px; width: 14px; }
.turnstile-settings-form > button {
  align-items: center;
  background: #efeee9;
  border-radius: 8px;
  color: #111113;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 6px;
  margin-left: auto;
  padding: 10px 13px;
}
.turnstile-settings-form > button svg { height: 14px; width: 14px; }

:root[data-density="compact"] .post-card { padding-bottom: 12px; padding-top: 12px; }
:root[data-density="compact"] .post-content { line-height: 1.45; margin: 6px 0 9px; }
:root[data-density="compact"] .post-media { max-height: 380px; }
:root[data-reduce-motion="true"] *,
:root[data-reduce-motion="true"] *::before,
:root[data-reduce-motion="true"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .001ms !important;
}

:root[data-theme="light"] .connections-modal,
:root[data-theme="light"] .push-prompt { background: #fff; border-color: #d3d3cf; }
:root[data-theme="light"] .push-prompt-backdrop { background: rgba(230,231,236,.8); }
:root[data-theme="light"] .push-prompt-icon { background: #edf0fb; border-color: #d4d9ed; color: #53669e; }
:root[data-theme="light"] .turnstile-enable-row,
:root[data-theme="light"] .turnstile-key-grid > label,
:root[data-theme="light"] .mail-enable-row,
:root[data-theme="light"] .mail-settings-grid > label { background: #fff; border-color: #d5d5d1; }
:root[data-theme="light"] .mail-settings-grid option { background: #fff; color: #17171a; }

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .connections-modal,
  :root[data-theme="system"] .push-prompt { background: #fff; border-color: #d3d3cf; }
  :root[data-theme="system"] .push-prompt-backdrop { background: rgba(230,231,236,.8); }
  :root[data-theme="system"] .turnstile-enable-row,
  :root[data-theme="system"] .turnstile-key-grid > label,
  :root[data-theme="system"] .mail-enable-row,
  :root[data-theme="system"] .mail-settings-grid > label { background: #fff; border-color: #d5d5d1; }
  :root[data-theme="system"] .mail-settings-grid option { background: #fff; color: #17171a; }
}

@media (max-width: 700px) {
  .profile-replies-list { padding: 0 14px; }
  .profile-reply-card { grid-template-columns: 38px minmax(0,1fr); padding: 15px 0; }
  .profile-reply-card .avatar { height: 38px; width: 38px; }
  .connections-modal { border: 0; border-radius: 0; inset: 0; max-height: none; transform: none; width: 100%; }
  .connections-modal > header { padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
  .connections-list { max-height: calc(100dvh - 76px - env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .push-prompt-backdrop { align-items: flex-end; padding: 10px; }
  .push-prompt { border-radius: 22px; padding: 25px 18px calc(22px + env(safe-area-inset-bottom)); }
  .push-prompt-actions { grid-template-columns: 1fr; }
  .region-settings-controls { align-items: stretch; display: grid; width: 100%; }
  .region-settings-controls > label { justify-content: space-between; min-height: 42px; }
  .turnstile-key-grid { grid-template-columns: 1fr; }
  .turnstile-enable-row { gap: 14px; }
  .mail-settings-grid { grid-template-columns: 1fr; }
  .mail-enable-row { gap: 14px; }
  .mail-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mail-form-actions button { justify-content: center; }
}
