/* ── TOKENS ────────────────────────────────────────────── */
:root {
  --bg:          #FFFFFF;
  --surface:     #F7F7F7;
  --surface-2:   #EFEFEF;
  --border:      #E8E8E8;
  --text-1:      #1A1A1A;
  --text-2:      #5A5A5A;
  --text-3:      #9A9A9A;
  --accent:      #1A1A2E;
  --accent-h:    #2D2D4A;
  --accent-soft: #EFEFEF;
  --success:     #22C55E;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.06);
  --sidebar-w: 260px;
  --rsidebar-w: 350px;
  --transition: 0.2s ease;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] {
  --bg:          #0D0D12;
  --surface:     #14141E;
  --surface-2:   #1C1C28;
  --border:      #28283A;
  --text-1:      #F0F0F8;
  --text-2:      #8A8AA8;
  --text-3:      #52526A;
  --accent:      #818CF8;
  --accent-h:    #A5B4FC;
  --accent-soft: #1A1A38;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.55);
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }
svg { display: block; flex-shrink: 0; }
i[class*="iconoir-"] { display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-style: normal; }

/* ── LAYOUT ────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--rsidebar-w);
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── LEFT SIDEBAR ──────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #E4EAEC;
  background: transparent;
  transition: border-color var(--transition);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 24px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-1);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-1); }
.nav-item.active { background: var(--surface-2); color: var(--text-1); }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}
.sidebar-spacer { flex: 1; }
.new-post-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  transition: background var(--transition);
  margin-bottom: 16px;
}
.new-post-btn:hover { background: var(--accent-h); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  width: 100%;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text-2); }
.toggle-track {
  margin-left: auto;
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: var(--r-full);
  position: relative;
  transition: background var(--transition);
}
[data-theme="dark"] .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
[data-theme="dark"] .toggle-thumb { transform: translateX(18px); }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  margin-top: 4px;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--surface-2); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.sidebar-user-handle { font-size: 12px; color: var(--text-3); }

/* ── MAIN ──────────────────────────────────────────────── */
.main {
  border-right: 1px solid var(--border);
  transition: border-color var(--transition);
  min-height: 100vh;
}
.main-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247,247,245,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .main-header { background: rgba(13,13,13,0.85); }
.main-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.main-content { padding: 0; }

/* ── SCREENS ───────────────────────────────────────────── */
.screen { display: none; }
.screen.active { display: block; }

/* ── COMPOSER ──────────────────────────────────────────── */
.composer {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  transition: border-color var(--transition);
}
.composer-body { flex: 1; }
.composer textarea {
  width: 100%;
  resize: none;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-1);
  outline: none;
  min-height: 56px;
  line-height: 1.6;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.composer-actions { display: flex; gap: 4px; }
.composer-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background var(--transition), color var(--transition);
}
.composer-action:hover { background: var(--accent-soft); color: var(--accent); }
.post-btn {
  background: var(--accent);
  color: #fff;
  padding: 8px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.post-btn:hover { background: var(--accent-h); transform: scale(1.02); }
.post-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── POST CARD ─────────────────────────────────────────── */
.post-card {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
  animation: fadeSlide 0.3s ease;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card:hover { background: var(--surface); }

/* Author row */
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.post-author-meta { flex: 1; min-width: 0; }
.post-name { font-size: 14px; font-weight: 600; color: var(--text-1); display: block; }
.post-handle { font-size: 12px; color: var(--text-3); }
.post-dot { color: var(--text-3); font-size: 12px; }
.post-time { font-size: 12px; color: var(--text-3); }

/* Card follow btn */
.post-card-follow {
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-1);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.post-card-follow:hover { border-color: var(--accent); color: var(--accent); }
.post-card-follow.following { color: var(--text-3); }
.post-card-follow.following:hover { border-color: #E03535; color: #E03535; }

/* Body */
.post-body { cursor: pointer; }
.post-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 7px;
}
.post-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-thumb {
  display: block;
  width: 100%;
  height: 260px;
  border-radius: var(--r-md);
  object-fit: cover;
  margin-bottom: 16px;
  background: var(--border);
}
.post-actions { display: flex; align-items: center; gap: 20px; padding-top: 4px; }
.post-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition);
  background: none;
}
.post-action:hover { color: var(--text-2); background: none; }
.post-action.liked { color: #E03535; }
.post-action.liked:hover { color: #E03535; background: none; }
.post-action.bookmarked { color: var(--accent); }
.post-action.bookmarked:hover { color: var(--accent); background: none; }
.post-action:last-child { margin-left: auto; }
.post-card { position: relative; }
.post-action-label { font-size: 13px; font-weight: 500; }
.post-action.like-btn:hover { color: #E03535; }
.post-action.comment-btn:hover { color: var(--text-2); }
.post-action.repost-btn:hover { color: #16A34A; }
.post-action.bookmark-btn:hover { color: var(--accent); }

/* Comments inline */
.comments-section {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.comments-section.open { display: block; }
.comment-item { display: flex; gap: 10px; margin-bottom: 12px; }
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.comment-name { font-size: 13px; font-weight: 600; }
.comment-time { font-size: 12px; color: var(--text-3); }
.comment-text { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.comment-input-row { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.comment-input {
  flex: 1;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.comment-input:focus { border-color: var(--accent); }
.comment-input::placeholder { color: var(--text-3); }
.comment-submit {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
}
.comment-submit:hover { background: var(--accent-h); }

/* ── AVATAR ────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.avatar-40 { width: 40px; height: 40px; }
.avatar-48 { width: 48px; height: 48px; font-size: 16px; }
.avatar-96 { width: 96px; height: 96px; font-size: 28px; }
.avatar-32 { width: 32px; height: 32px; font-size: 11px; }

/* ── RIGHT SIDEBAR ─────────────────────────────────────── */
.rsidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 20px;
  scrollbar-width: none;
}
.rsidebar::-webkit-scrollbar { display: none; }
.rsidebar-section {
  background: transparent;
  border-radius: var(--r-lg);
  padding: 16px 16px 8px;
  margin-bottom: 14px;
  border: 1px solid #E4EAEC;
  transition: border-color var(--transition);
}
.rsidebar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-1);
  margin-bottom: 12px;
}
.suggest-user { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.suggest-info { flex: 1; min-width: 0; }
.suggest-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}
.suggest-handle { font-size: 12px; color: var(--text-3); }
.follow-btn {
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  color: #fff;
  background: var(--text-1);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.follow-btn:hover { opacity: 0.8; }
.follow-btn.following { background: transparent; color: var(--text-1); border-color: var(--border); }
.follow-btn.following:hover { border-color: #E03535; color: #E03535; }
[data-theme="dark"] .rsidebar-section { border-color: var(--border); }
[data-theme="dark"] .sidebar { border-right-color: var(--border); }
[data-theme="dark"] .follow-btn { background: var(--text-1); color: #14141E; }
[data-theme="dark"] .follow-btn.following { background: transparent; color: var(--text-1); border-color: var(--border); }

.trending-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  padding: 11px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.trending-item:last-of-type { border-bottom: none; }
.trending-item:hover { background: var(--surface-2); }
.trending-item-body { flex: 1; min-width: 0; }
.trending-item:hover .trending-tag-pill { color: var(--accent); }
.trending-cat { font-size: 12px; color: var(--text-3); font-weight: 400; margin-bottom: 2px; }
.trending-count { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.trending-more-btn {
  color: var(--text-3);
  font-size: 16px;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.trending-more-btn:hover { background: var(--surface-2); color: var(--text-1); }

/* ── PROFILE SCREEN ────────────────────────────────────── */
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, #1A1A2E 0%, #2D2D6E 50%, #4F46E5 100%);
  position: relative;
}
[data-theme="dark"] .profile-cover {
  background: linear-gradient(135deg, #0D0D1E 0%, #1A1A3E 50%, #2D2D8A 100%);
}
.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='white' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E") center/60px;
  pointer-events: none;
}
.profile-info { padding: 0 24px 24px; }
.profile-avatar-wrap {
  margin-top: -48px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.profile-avatar-border {
  padding: 4px;
  background: var(--surface);
  border-radius: 50%;
  transition: background var(--transition);
  box-shadow: var(--shadow-md);
}
.edit-profile-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  background: transparent;
  transition: all var(--transition);
  margin-bottom: 8px;
}
.edit-profile-btn:hover { border-color: var(--accent); color: var(--accent); }
.profile-name { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.profile-handle { font-size: 15px; color: var(--text-3); margin-bottom: 10px; }
.profile-bio { font-size: 15px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.profile-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.profile-meta-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); }
.profile-stats { display: flex; gap: 24px; }
.stat-item { cursor: pointer; }
.stat-item:hover .stat-label { color: var(--accent); }
.stat-num { font-size: 16px; font-weight: 700; color: var(--text-1); }
.stat-label { font-size: 14px; color: var(--text-3); transition: color var(--transition); }
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: border-color var(--transition);
}
.profile-tab {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.profile-tab.active { color: var(--text-1); border-bottom-color: var(--accent); font-weight: 600; }
.profile-posts { padding: 8px 0; }

/* ── DISCOVER SCREEN ───────────────────────────────────── */
.discover-search {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 15px;
  color: var(--text-1);
  outline: none;
  transition: all var(--transition);
}
.search-input:focus { border-color: var(--accent); background: var(--surface); }
.search-input::placeholder { color: var(--text-3); }
.discover-grid { display: block; }

/* ── DISCOVER FEED CARD ─────────────────────────────── */
.discover-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.discover-card:hover { background: var(--surface); }
.discover-card-body { flex: 1; min-width: 0; }
.discover-card-author {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 13px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.discover-card-author-name { font-weight: 600; color: var(--text-2); }
.discover-card-cat {
  padding: 1px 8px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}
.discover-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1.4;
  letter-spacing: -0.2px;
}
.discover-card-excerpt {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.discover-card-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.discover-card-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-3);
}
.discover-card-stat { display: flex; align-items: center; gap: 4px; }
.discover-card-thumb {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: var(--r-md);
  flex-shrink: 0;
  background: var(--border);
  align-self: flex-start;
  margin-top: 2px;
}

/* ── SINGLE POST SCREEN ────────────────────────────────── */
.single-post-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}
.single-post-back:hover { color: var(--accent); }
.single-post-body { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.single-post-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.single-post-user-info .name { font-size: 16px; font-weight: 700; }
.single-post-user-info .handle { font-size: 14px; color: var(--text-3); }
.single-post-title { font-size: 22px; font-weight: 700; color: var(--text-1); line-height: 1.3; letter-spacing: -0.4px; margin-bottom: 10px; }
.single-post-content { font-size: 17px; line-height: 1.65; color: var(--text-2); margin-bottom: 16px; }
.single-post-time { font-size: 14px; color: var(--text-3); margin-bottom: 16px; }
.single-post-stats {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.single-stat { font-size: 15px; color: var(--text-2); }
.single-stat strong { color: var(--text-1); }
.single-post-actions { display: flex; gap: 4px; padding: 4px 0; }
.single-post-actions .post-action { padding: 8px 14px; border-radius: var(--r-full); transition: background var(--transition), color var(--transition); }
.single-post-actions .post-action:hover { background: var(--surface-2); }
.comments-list { padding: 0 24px; }
.comment-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  transition: border-color var(--transition);
}
.reply-composer {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}
.reply-composer textarea {
  flex: 1;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  resize: none;
  height: 40px;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color var(--transition), background var(--transition), height 0.15s ease;
  overflow: hidden;
}
.reply-composer textarea:focus {
  border-color: var(--accent);
  background: var(--bg);
}
.reply-composer textarea::placeholder { color: var(--text-3); }
.reply-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  height: 40px;
  display: flex;
  align-items: center;
  transition: background var(--transition);
  white-space: nowrap;
}
.reply-btn:hover { background: var(--accent-h); }

/* ── NOTIFICATIONS ─────────────────────────────────────── */
.notif-screen { padding: 20px; }
.notif-item {
  display: flex;
  gap: 10px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon.like { background: #FFF0F0; color: #E03535; }
.notif-icon.follow { background: var(--accent-soft); color: var(--accent); }
.notif-icon.comment { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .notif-icon.like { background: #2A1212; }
[data-theme="dark"] .notif-icon.follow { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .notif-icon.comment { background: var(--accent-soft); color: var(--accent); }
.notif-text { flex: 1; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.notif-text strong { color: var(--text-1); font-weight: 600; }
.notif-time { font-size: 12px; color: var(--text-3); }
.unread-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-item.unread { background: transparent; }

/* ── FEED TABS ─────────────────────────────────────── */
.feed-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}
.feed-tab {
  flex: 1;
  padding: 13px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.feed-tab:hover { color: var(--text-1); background: var(--surface-2); }
.feed-tab.active { color: var(--text-1); border-bottom-color: var(--accent); font-weight: 600; }

/* ── FILTER PILLS ──────────────────────────────────── */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  transition: border-color var(--transition);
}
.filter-pills::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 5px 13px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.pill:hover { border-color: var(--text-3); color: var(--text-1); }
.pill.active { background: #1A1A1A; color: #fff; border-color: #1A1A1A; font-weight: 500; }
[data-theme="dark"] .pill.active { background: #F0F0F0; color: #1A1A1A; border-color: #F0F0F0; }

/* ── CIRCULAR PROGRESS ─────────────────────────────── */
.progress-ring-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.progress-ring { transform: rotate(-90deg); overflow: visible; }
.progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 2.5; }
.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.15s ease, stroke 0.15s ease;
}
.progress-ring-label {
  position: absolute;
  font-size: 8px;
  font-weight: 700;
  color: var(--text-3);
  line-height: 1;
  pointer-events: none;
}

/* ── POST MORE MENU ────────────────────────────────── */
.post-more-wrap { position: relative; margin-left: auto; }
.post-more-btn { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-3); font-size: 16px; letter-spacing: 1px; transition: background var(--transition),color var(--transition); }
.post-more-btn:hover { background: var(--surface-2); color: var(--text-1); }
.post-more-dropdown { position: absolute; right: 0; top: 30px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); z-index: 50; min-width: 130px; overflow: hidden; display: none; }
.post-more-dropdown.open { display: block; }
.post-more-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text-1); cursor: pointer; transition: background var(--transition); background: none; width: 100%; text-align: left; }
.post-more-item:hover { background: var(--surface-2); }
.post-more-item.danger { color: #E03535; }

/* ── COMMENT DELETE ────────────────────────────────── */
.comment-delete-btn { background: none; color: var(--text-3); font-size: 14px; line-height: 1; padding: 1px 5px; border-radius: 4px; transition: color var(--transition),background var(--transition); flex-shrink: 0; margin-left: auto; }
.comment-delete-btn:hover { color: #E03535; background: rgba(224,53,53,0.08); }

/* ── NAV ACTIVE ────────────────────────────────────── */
.nav-item.active { position: relative; }

/* ── TRENDING TAG PILL ─────────────────────────────── */
.trending-tag-pill { display: inline-block; font-size: 14px; font-weight: 700; color: var(--text-1); margin: 3px 0; transition: color var(--transition); }

/* ── MODAL ─────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.15s ease; }
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal-box { background: var(--bg); border-radius: var(--r-lg); padding: 28px 24px 24px; width: 100%; max-width: 320px; animation: modalUp 0.2s ease; box-shadow: var(--shadow-lg); }
.modal-box.hidden { display: none; }
@keyframes modalUp { from{opacity:0;transform:scale(0.93)} to{opacity:1;transform:scale(1)} }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.modal-body { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-danger { width: 100%; padding: 12px; background: #E03535; color: #fff; border-radius: var(--r-full); font-size: 15px; font-weight: 700; transition: background var(--transition); }
.btn-danger:hover { background: #c22b2b; }
.btn-cancel { width: 100%; padding: 12px; background: transparent; color: var(--text-1); border-radius: var(--r-full); font-size: 15px; font-weight: 600; border: 1px solid var(--border); transition: background var(--transition); }
.btn-cancel:hover { background: var(--surface-2); }
.btn-primary { width: 100%; padding: 12px; background: var(--accent); color: #fff; border-radius: var(--r-full); font-size: 15px; font-weight: 700; transition: background var(--transition); }
.btn-primary:hover { background: var(--accent-h); }
.modal-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 5px; }
.modal-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: 14px; color: var(--text-1); background: var(--surface); font-family: inherit; outline: none; margin-bottom: 14px; transition: border-color var(--transition); }
.modal-input:focus { border-color: var(--accent); }
.modal-tarea { width: 100%; resize: none; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; color: var(--text-1); background: var(--surface); font-family: inherit; outline: none; line-height: 1.6; margin-bottom: 14px; transition: border-color var(--transition); }
.modal-tarea:focus { border-color: var(--accent); }
[data-theme="dark"] .modal-input,[data-theme="dark"] .modal-tarea { background: var(--surface-2); }

/* ── MOBILE ────────────────────────────────────────────── */
.mobile-header { display: none; }
.mobile-header .logo-mark { background: transparent; }
.mobile-header .logo-mark path { fill: var(--text-1); }
.mobile-tab-bar { display: none; }

@media (max-width: 1100px) {
  .app { grid-template-columns: var(--sidebar-w) 1fr; }
  .rsidebar { display: none; }
}

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 180px 1fr; }
  .settings-content { padding: 20px 20px; }
  .settings-avatar-row { flex-wrap: wrap; gap: 12px; }
  .settings-avatar-actions { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { overflow-x: hidden; }
  .discover-card { padding: 16px; }
  .discover-card-thumb { width: 80px; height: 64px; }
  .discover-search { padding: 16px; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    z-index: 30;
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-3);
    font-size: 11px;
    cursor: pointer;
    transition: color var(--transition);
  }
  .mobile-tab.active { color: var(--accent); }
  .main { padding-bottom: 60px; }
  .discover-grid { grid-template-columns: 1fr; }
}

/* ── UTILS ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; transition: background var(--transition); }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-3); font-size: 15px; }
.see-more { display: block; padding: 14px; text-align: center; font-size: 14px; color: var(--accent); font-weight: 500; cursor: pointer; }
.see-more:hover { background: var(--accent-soft); }

/* ────────────────────────────────────────────────────────
   SETTINGS SCREEN
   ──────────────────────────────────────────────────────── */
.settings-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 58px);
}
.settings-nav {
  border-right: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  scrollbar-width: none;
  transition: border-color var(--transition);
}
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 1px 8px 1px 0;
}
.settings-nav-item:hover { background: var(--surface); color: var(--text-1); }
.settings-nav-item.active { background: var(--surface-2); color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
.settings-nav-divider { height: 1px; background: var(--border); margin: 8px 0; transition: background var(--transition); }
.settings-content {
  padding: 28px 32px;
  max-width: 600px;
  overflow-y: auto;
}
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-section-title { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; letter-spacing: -0.3px; }
.settings-section-desc { font-size: 14px; color: var(--text-3); margin-bottom: 28px; line-height: 1.5; }

/* Groups */
.settings-group { margin-bottom: 32px; }
.settings-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  transition: border-color var(--transition);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 2px; }
.settings-row-sublabel { font-size: 12px; color: var(--text-3); line-height: 1.4; }

/* Toggle switch */
.s-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.s-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.s-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--transition);
}
.s-toggle input:checked + .s-toggle-track { background: var(--accent); }
.s-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.s-toggle input:checked + .s-toggle-track::after { transform: translateX(20px); }

/* Fields */
.settings-field { margin-bottom: 16px; }
.settings-field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.settings-field input,
.settings-field textarea,
.settings-field select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-1);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  appearance: none;
}
.settings-field input:focus,
.settings-field textarea:focus,
.settings-field select:focus { border-color: var(--accent); background: var(--bg); }
.settings-field textarea { resize: none; line-height: 1.6; }
[data-theme="dark"] .settings-field input,
[data-theme="dark"] .settings-field textarea,
[data-theme="dark"] .settings-field select { background: var(--surface-2); }

/* Password field */
.settings-pw-wrap { position: relative; }
.settings-pw-wrap input { padding-right: 44px; }
.settings-pw-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  cursor: pointer;
  font-size: 17px;
  display: flex;
}

/* Avatar row */
.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.settings-avatar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-avatar-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.settings-avatar-handle { font-size: 13px; color: var(--text-3); }
.settings-avatar-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.btn-upload {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  white-space: nowrap;
}
.btn-upload:hover { background: var(--accent-h); }
.btn-remove-photo {
  padding: 8px 18px;
  background: transparent;
  color: var(--text-3);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-remove-photo:hover { border-color: #E03535; color: #E03535; }

/* Save button */
.settings-save-btn {
  padding: 11px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
}
.settings-save-btn:hover { background: var(--accent-h); transform: scale(1.02); }

/* Radio items */
.settings-radio-group { display: flex; flex-direction: column; gap: 10px; }
.settings-radio-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.settings-radio-item:hover { border-color: var(--text-3); }
.settings-radio-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.settings-radio-item input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.settings-radio-label { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 1px; }
.settings-radio-desc { font-size: 12px; color: var(--text-3); }

/* Interest chips */
.interest-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.interest-chip:hover { border-color: var(--accent); color: var(--accent); }
.interest-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .interest-chip.selected { color: #0D0D12; }

/* Theme cards */
.theme-cards { display: flex; gap: 12px; margin-bottom: 0; }
.theme-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 12px;
  cursor: pointer;
  transition: border-color var(--transition);
  text-align: center;
}
.theme-card:hover { border-color: var(--text-3); }
.theme-card.selected { border-color: var(--accent); }
.theme-card-preview {
  height: 56px;
  border-radius: var(--r-md);
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
}
.theme-card-preview-light { background: #F7F7F7; border: 1px solid #E8E8E8; }
.theme-card-preview-dark { background: #0D0D12; border: 1px solid #28283A; }
.theme-card-preview-system {
  background: linear-gradient(to right, #F7F7F7 50%, #0D0D12 50%);
  border: 1px solid var(--border);
}
.theme-card-label { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* Font size */
.font-size-row { display: flex; gap: 8px; }
.font-size-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.font-size-btn:hover { border-color: var(--accent); color: var(--accent); }
.font-size-btn.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* Notification matrix */
.notif-matrix { width: 100%; border-collapse: collapse; }
.notif-matrix th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  padding: 0 0 14px;
  text-align: center;
}
.notif-matrix th:first-child { text-align: left; }
.notif-matrix td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 14px;
}
.notif-matrix tr:last-child td { border-bottom: none; }
.notif-matrix td:first-child { font-weight: 500; color: var(--text-1); padding-right: 12px; }
.notif-matrix td:not(:first-child) { text-align: center; }

/* Sessions */
.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: border-color var(--transition);
}
.session-item:last-child { border-bottom: none; }
.session-icon {
  width: 38px;
  height: 38px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-2);
}
.session-device { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.session-meta { font-size: 12px; color: var(--text-3); }
.session-current { display: inline-block; font-size: 11px; font-weight: 600; color: var(--success); background: rgba(34,197,94,.12); padding: 2px 8px; border-radius: var(--r-full); margin-left: 6px; }
.btn-revoke {
  padding: 6px 14px;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-revoke:hover { border-color: #E03535; color: #E03535; }

/* Danger zone */
.danger-zone {
  border: 1.5px solid rgba(224,53,53,0.35);
  border-radius: var(--r-lg);
  padding: 20px 20px 20px;
  margin-top: 32px;
  background: rgba(224,53,53,0.03);
}
.danger-zone-title { font-size: 14px; font-weight: 700; color: #E03535; margin-bottom: 8px; }
.danger-zone-desc { font-size: 13px; color: var(--text-3); margin-bottom: 16px; line-height: 1.55; }
.btn-deactivate {
  padding: 10px 20px;
  background: transparent;
  color: #E03535;
  border: 1.5px solid #E03535;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-deactivate:hover { background: #E03535; color: #fff; }

/* Toast */
#settings-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text-1);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 200;
  white-space: nowrap;
}

/* Settings mobile */
@media (max-width: 720px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    gap: 4px;
    scrollbar-width: none;
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav-item {
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: var(--r-full);
    font-size: 13px;
    flex-shrink: 0;
    width: auto;
  }
  .settings-nav-divider { display: none; }
  .settings-content { padding: 20px 16px; max-width: 100%; }
  .theme-cards { flex-direction: column; }
}

/* ── LANDING SPLASH ────────────────────────────────────── */
#landing-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#landing-screen.hide {
  opacity: 0;
  pointer-events: none;
}
.landing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px 24px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  margin: auto;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing-avatars {
  position: relative;
  width: 220px;
  height: 220px;
}
.landing-avatar {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-md);
}
.la-1 { width: 64px; height: 64px; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 5; }
.la-2 { width: 48px; height: 48px; top: 8px;  left: 50%; transform: translateX(-50%); }
.la-3 { width: 44px; height: 44px; top: 30px; right: 18px; }
.la-4 { width: 44px; height: 44px; top: 50%; right: 4px; transform: translateY(-50%); }
.la-5 { width: 44px; height: 44px; bottom: 30px; right: 18px; }
.la-6 { width: 44px; height: 44px; bottom: 30px; left: 18px; }
.la-7 { width: 44px; height: 44px; top: 30px; left: 18px; }
.landing-text { display: flex; flex-direction: column; gap: 10px; }
.landing-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-1);
  line-height: 1.2;
}
.landing-sub {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}
.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--text-1);
  color: var(--bg);
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}
.landing-cta:hover  { opacity: 0.85; transform: scale(1.03); }
.landing-cta:active { transform: scale(0.97); }

/* ── INTERACTION DESIGN ────────────────────────────────── */

/* Screen entrance */
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen.active { animation: screenIn 0.28s var(--ease-out) both; }

/* Like pop */
@keyframes likePop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.like-animate { animation: likePop 0.38s var(--ease-spring) !important; }

/* Bookmark bounce */
@keyframes bookmarkBounce {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.35) rotate(-12deg); }
  70%  { transform: scale(0.9) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.bookmark-animate { animation: bookmarkBounce 0.38s var(--ease-spring) !important; }

/* Post card press */
.post-card { transition: background var(--transition), transform 0.12s var(--ease-out); }

/* Nav item press */
.nav-item:active       { transform: scale(0.96); }
.settings-nav-item:active { transform: scale(0.98); }

/* Landing staggered entrance */
@keyframes landingUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.landing-avatars { animation: landingUp 0.6s var(--ease-out) 0.05s both; }
.landing-text    { animation: landingUp 0.6s var(--ease-out) 0.2s  both; }
.landing-cta     { animation: landingUp 0.6s var(--ease-out) 0.35s both; }

/* Avatar staggered pop-in + independent float */
@keyframes avatarPop {
  0%   { opacity: 0; transform: scale(0.2); }
  60%  { transform: scale(1.18); }
  80%  { transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes centerPop {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.2); }
  60%  { transform: translate(-50%,-50%) scale(1.18); }
  80%  { transform: translate(-50%,-50%) scale(0.92); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes fUp    { 0%,100%{transform:translateY(0)}        50%{transform:translateY(-9px)} }
@keyframes fDown  { 0%,100%{transform:translateY(0)}        50%{transform:translateY(8px)} }
@keyframes fLeft  { 0%,100%{transform:translate(0,0)}       50%{transform:translate(-7px,-5px)} }
@keyframes fRight { 0%,100%{transform:translate(0,0)}       50%{transform:translate(6px,-4px)} }
@keyframes fDiag  { 0%,100%{transform:translate(0,0)}       50%{transform:translate(5px,6px)} }

.la-1 { animation: centerPop 0.55s var(--ease-spring) 0.10s both; }
.la-2 { animation: avatarPop 0.55s var(--ease-spring) 0.20s both, fUp    3.5s ease-in-out 0.75s infinite; }
.la-3 { animation: avatarPop 0.55s var(--ease-spring) 0.32s both, fRight 4.0s ease-in-out 0.87s infinite; }
.la-4 { animation: avatarPop 0.55s var(--ease-spring) 0.44s both, fDown  3.2s ease-in-out 0.99s infinite; }
.la-5 { animation: avatarPop 0.55s var(--ease-spring) 0.56s both, fLeft  3.8s ease-in-out 1.11s infinite; }
.la-6 { animation: avatarPop 0.55s var(--ease-spring) 0.68s both, fDiag  3.6s ease-in-out 1.23s infinite; }
.la-7 { animation: avatarPop 0.55s var(--ease-spring) 0.80s both, fUp    4.2s ease-in-out 1.35s infinite; }

/* Composer Post button press */
.post-btn:active:not(:disabled) { transform: scale(0.96); }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
