/* ═══════════════════════════════════════════════════════════════════════
   #REALITY — PRODUCTION DESIGN SYSTEM
   Clean, professional, production-grade civic network.
   Minimal, modern, no gimmicks. Inspired by Twitter/Threads/Linear.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-input: #EFF3F8;
  --bg-elevated: #FFFFFF;

  --border: #E2E8F0;
  --border-focus: #2563EB;

  --text: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;

  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;
  --accent-border: #BFDBFE;

  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --danger-border: #FECACA;

  --warning-light: #FFFBEB;
  --warning-border: #FDE68A;

  --blue-light: #EFF6FF;
  --blue-border: #BFDBFE;
  --blue-text: #2563EB;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.05);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.07);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-body: var(--font-sans);

  --text-base: 15px;
  --line-height: 1.6;

  --nav-height: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* DARK THEME (Refined OLED Slate Midnight + Electric Cyan, Zero Green) */
[data-theme="dark"] {
  --bg: #090D14;
  --bg-card: #121824;
  --bg-hover: #1A2332;
  --bg-input: #151E2D;
  --bg-elevated: #182234;

  --border: #1E293B;
  --border-focus: #38BDF8;

  --text: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;

  --accent: #38BDF8;
  --accent-hover: #7DD3FC;
  --accent-light: rgba(56, 189, 248, 0.12);
  --accent-border: rgba(56, 189, 248, 0.28);

  --danger: #F87171;
  --danger-light: rgba(248, 113, 113, 0.14);
  --danger-border: rgba(248, 113, 113, 0.3);

  --warning-light: rgba(251, 191, 36, 0.12);
  --warning-border: rgba(251, 191, 36, 0.3);

  --blue-light: rgba(56, 189, 248, 0.12);
  --blue-border: rgba(56, 189, 248, 0.3);
  --blue-text: #7DD3FC;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.65);
}

/* WARM PAPER / BEIGE THEME (Luxurious Warm Ivory Paper + Warm Indigo Ink, Zero Muddy Brown) */
[data-theme="sepia"] {
  --bg: #FAF7F2;
  --bg-card: #FFFDF9;
  --bg-hover: #F3ECE1;
  --bg-input: #F4EEE4;
  --bg-elevated: #FFFFFF;

  --border: #E8E0D2;
  --border-focus: #4F46E5;

  --text: #1E1B18;
  --text-secondary: #5C564E;
  --text-tertiary: #8F877C;

  --accent: #4F46E5;
  --accent-hover: #4338CA;
  --accent-light: #EEF2FF;
  --accent-border: #C7D2FE;

  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --danger-border: #FECACA;

  --warning-light: #FFFBEB;
  --warning-border: #FDE68A;

  --blue-light: #EEF2FF;
  --blue-border: #C7D2FE;
  --blue-text: #4F46E5;

  --shadow-sm: 0 1px 3px rgba(30,27,24,0.04);
  --shadow-md: 0 4px 12px rgba(30,27,24,0.06);
  --shadow-lg: 0 12px 40px rgba(30,27,24,0.1);
}

/* TYPOGRAPHY */
[data-font="serif"] { --font-body: var(--font-serif); }
[data-font-size="compact"] { --text-base: 14px; --line-height: 1.5; }
[data-font-size="large"] { --text-base: 17px; --line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
  line-height: var(--line-height);
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; user-select: none; }
a { color: var(--accent); text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════════════════════════════════
   FIXED TOP NAVIGATION
   ═══════════════════════════════════════════════════════════════════════ */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}

.nav-inner {
  max-width: 1100px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* Center Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.nav-tab:hover { color: var(--text); }

.nav-tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-tab.active svg { color: var(--accent); }

/* Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-box input {
  width: 180px;
  padding: 7px 12px 7px 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  transition: all 0.15s ease;
}

.search-box input:focus {
  background: var(--bg-card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
  width: 220px;
}

/* Auth Zone */
.auth-zone {
  display: flex;
  align-items: center;
  position: relative;
}

.auth-guest-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost-sm {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-ghost-sm:hover {
  background: var(--bg-hover);
  border-color: var(--text-tertiary);
}

.btn-primary-sm {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-primary-sm:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.user-pill:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
}

.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}

.user-pill-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-arrow {
  font-size: 9px;
  color: var(--text-tertiary);
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.user-pill.open .user-pill-arrow {
  transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 2000;
  animation: dropIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.user-dropdown-menu.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.dropdown-user-name { font-size: 13px; font-weight: 700; color: var(--text); }
.dropdown-user-handle { font-size: 11px; color: var(--text-tertiary); }
.dropdown-role-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 800;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  margin-top: 4px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s ease;
}

.user-dropdown-item:hover { background: var(--bg-hover); }
.user-dropdown-item svg { color: var(--text-secondary); }

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger svg { color: var(--danger); }
.user-dropdown-item.danger:hover { background: var(--danger-light); }

/* ═══════════════════════════════════════════════════════════════════════
   TICKER BAR (below fixed nav, strictly isolated)
   ═══════════════════════════════════════════════════════════════════════ */

.ticker-bar {
  margin-top: var(--nav-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  z-index: 900;
}

.ticker-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 3px 10px;
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-full);
  z-index: 5;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(217, 64, 64, 0.7);
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 64, 64, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(217, 64, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 64, 64, 0); }
}

.ticker-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ticker-marquee-viewport {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}

.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-slide 34s linear infinite;
  color: var(--text-secondary);
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-tag {
  color: var(--text);
  font-weight: 700;
  margin-right: 4px;
}

@keyframes ticker-slide {
  0% { transform: translateX(20px); }
  100% { transform: translateX(-100%); }
}

/* ═══════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════ */

.content-wrap {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

.tab-pane {
  display: none;
  animation: fadeUp 0.15s ease;
}

.tab-pane.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s ease;
}

.card:hover { box-shadow: var(--shadow-sm); }

/* ═══════════════════════════════════════════════════════════════════════
   COMPOSER TRIGGER
   ═══════════════════════════════════════════════════════════════════════ */

.composer-trigger { cursor: pointer; }

.composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--accent-border);
}

.composer-placeholder {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-tertiary);
}

.composer-tools {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.tool-chip:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════
   FILTER CHIPS
   ═══════════════════════════════════════════════════════════════════════ */

.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.chip {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.12s ease;
}

.chip:hover { background: var(--bg-hover); color: var(--text); }

.chip.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════
   HASHTAG / KEYWORD TOPICS STRIP & ACTIVE BANNER
   ═══════════════════════════════════════════════════════════════════════ */

.hashtag-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 2px 0 6px;
  overflow: hidden;
}

.hashtag-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hash-symbol {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.hashtag-scroll-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}

.hashtag-scroll-track::-webkit-scrollbar { display: none; }

.hashtag-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s ease;
}

.hashtag-chip:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent-border);
}

.hashtag-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Active Hashtag Filter Banner */
.active-tag-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text);
  animation: fadeIn 0.15s ease;
}

.active-tag-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.active-tag-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
}

.clear-tag-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  transition: all 0.12s ease;
}

.clear-tag-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════
   POST CARDS
   ═══════════════════════════════════════════════════════════════════════ */

.feed { display: flex; flex-direction: column; gap: 16px; }

.post-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

@keyframes postSpotlight {
  0% { box-shadow: 0 0 0 0 rgba(38, 83, 69, 0.45); border-color: var(--accent); }
  50% { box-shadow: 0 0 0 10px rgba(38, 83, 69, 0.18); border-color: var(--accent); transform: scale(1.015); }
  100% { box-shadow: 0 0 0 0 rgba(38, 83, 69, 0); border-color: var(--border); transform: scale(1); }
}

.post-highlight-pulse {
  animation: postSpotlight 1.8s cubic-bezier(0.4, 0, 0.2, 1) 2 !important;
  border-color: var(--accent) !important;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-name { font-weight: 700; font-size: 14px; color: var(--text); }
.post-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }

.post-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.post-delete-btn:hover {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: var(--danger);
  transform: scale(1.05);
}

.badge {
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge.mint { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }
.badge.blue { background: var(--blue-light); color: var(--blue-text); border: 1px solid var(--blue-border); }
.badge.warn { background: var(--warning-light); color: #8A6818; border: 1px solid var(--warning-border); }
.badge.rose { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge.muted { background: var(--bg-input); color: var(--text-tertiary); border: 1px solid var(--border); }

/* DISTINCT HEADLINE */
.post-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.018em;
}

/* DISTINCT READABLE BODY */
.post-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-secondary);
  margin-bottom: 12px;
  word-break: break-word;
}

.post-body.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* DISTINCT READ MORE BUTTON */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.15s ease;
}

.read-more-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.read-more-btn svg {
  transition: transform 0.15s ease;
}

.read-more-btn:hover svg {
  transform: translateY(2px);
}

/* Dedicated Date & Time Stamp below post description */
.post-datetime-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-input);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  margin: 4px 0 10px 0;
  width: fit-content;
}

.post-datetime-stamp svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.datetime-label {
  font-weight: 800;
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.datetime-value {
  font-weight: 600;
  color: var(--text);
}

.datetime-dot {
  opacity: 0.4;
}

.datetime-relative {
  color: var(--text-tertiary);
}

.datetime-readtime {
  color: var(--text-tertiary);
}

.hashtag-link {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.hashtag-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* DISTINCT HASHTAGS SHELF */
.post-tags-shelf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px 0;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.tags-shelf-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-tertiary);
  margin-right: 4px;
}

.post-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.post-tag-badge:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.post-tag-badge .tag-hash {
  opacity: 0.55;
  font-weight: 800;
}

.media-frame {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}

.media-frame img, .media-frame video {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: all 0.12s ease;
}

.source-link:hover { color: var(--accent); }

/* Post Actions */
.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.action-btn:hover { background: var(--bg-hover); color: var(--text); }

.action-btn.liked { color: var(--danger); background: var(--danger-light); }
.action-btn.liked svg { fill: var(--danger); stroke: var(--danger); }

.action-btn.saved { color: #B88A20; background: var(--warning-light); }
.action-btn.saved svg { fill: #B88A20; stroke: #B88A20; }

.action-spacer { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════
   EXCEPTIONAL COMMENTS SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.comments-section {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: none;
}

.comments-section.open {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.18s ease;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.comments-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.comments-count-pill {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.comments-safe-guard {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* Exceptional Composer Card */
.comment-composer-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.comment-input-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-input-field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 12px;
  transition: all 0.15s ease;
}

.comment-input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
  background: var(--bg-card);
}

.comment-quick-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.quick-tag-pill {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.quick-tag-pill:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-1px);
}

.comment-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.comment-safety-feedback {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-safety-feedback.blocked {
  color: var(--danger);
}

.post-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeIn 0.18s ease;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--accent-border);
}

.comment-bubble {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 14px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: border-color 0.15s ease;
}

.comment-bubble:hover {
  border-color: var(--accent-border);
}

.comment-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 8px;
}

.comment-author-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.comment-author-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  text-transform: uppercase;
}

.comment-author-badge.editorial {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent-border);
}

.comment-time {
  font-size: 11px;
  color: var(--text-tertiary);
  cursor: help;
}

.comment-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-tertiary);
}

.comment-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-weight: 600;
  background: transparent;
  border: none;
  color: inherit;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: all 0.12s ease;
}

.comment-action:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.comment-action.liked {
  color: #E05252;
}

.comment-action.liked svg {
  fill: #E05252;
}

.comment-delete-btn:hover {
  color: var(--danger) !important;
  background: var(--danger-light) !important;
}

/* Empty Comments Prompt */
.comments-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  gap: 6px;
}

.comments-empty-state .empty-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.comments-empty-state p {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.45;
}

/* Confirm Delete Modal */
.confirm-modal {
  max-width: 380px;
  text-align: center;
  padding: 24px;
}

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
}

.confirm-modal h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.confirm-modal p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════
   SHARE MODAL (NATIVE PEBBLE SHARE SHEET)
   ═══════════════════════════════════════════════════════════════════════ */
.share-modal {
  max-width: 440px;
  width: 100%;
  padding: 24px;
}

.share-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.share-header-title h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.015em;
}

.share-header-title svg {
  color: var(--accent);
}

.share-preview-card {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0 18px 0;
}

.share-preview-badge {
  display: inline-block;
  margin-bottom: 6px;
}

.share-preview-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.share-preview-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.share-section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.share-link-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  user-select: all;
  text-overflow: ellipsis;
}

.share-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.share-channel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.share-channel-btn:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
  border-color: var(--border-hover);
}

.share-channel-whatsapp:hover {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.4);
  background: rgba(37, 211, 102, 0.08);
}

.share-channel-x:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

.share-channel-telegram:hover {
  color: #0088cc;
  border-color: rgba(0, 136, 204, 0.4);
  background: rgba(0, 136, 204, 0.08);
}

.share-channel-native:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

@media (max-width: 440px) {
  .share-channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feed-end {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════
   COMMUNITIES
   ═══════════════════════════════════════════════════════════════════════ */

.section-header-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.section-header-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }

.section-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-tabs { display: flex; gap: 4px; }

.sub-tab {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.sub-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.communities-list { display: flex; flex-direction: column; gap: 8px; }

.comm-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.comm-tile-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comm-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comm-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.comm-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 4px; }

/* Community Detail */
.comm-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.comm-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-light);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comm-detail-info { flex: 1; }
.comm-detail-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.comm-detail-info p { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }

.badge-row { display: flex; gap: 6px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.back-link:hover { color: var(--accent); }

.comm-composer { margin-bottom: 12px; }
.comm-composer-label { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.comm-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.comm-attachment-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════════════════ */

.settings-wrap { display: flex; flex-direction: column; gap: 12px; }
.settings-wrap h2 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-icon { font-size: 22px; }
.section-title h3 { font-size: 15px; font-weight: 800; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-option {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.theme-option:hover { border-color: var(--text-tertiary); }
.theme-option.active { border-color: var(--accent); background: var(--accent-light); }

.theme-preview {
  height: 40px;
  border-radius: 6px;
  margin-bottom: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-light { background: #F8FAFC; border: 1px solid #CBD5E1; }
.preview-dark { background: #090D14; border: 1px solid #1E293B; }
.preview-sepia { background: #FAF7F2; border: 1px solid #E8E0D2; }

.preview-bar { border-radius: 3px; }
.preview-light .bar-1 { height: 8px; background: #2563EB; }
.preview-light .bar-2 { flex: 1; background: #E2E8F0; }
.preview-dark .bar-1 { height: 8px; background: #38BDF8; }
.preview-dark .bar-2 { flex: 1; background: #1E293B; }
.preview-sepia .bar-1 { height: 8px; background: #4F46E5; }
.preview-sepia .bar-2 { flex: 1; background: #E8E0D2; }

.theme-label { font-size: 12px; font-weight: 700; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-title { display: block; font-size: 14px; font-weight: 700; }
.setting-desc { display: block; font-size: 12px; color: var(--text-tertiary); }

.seg-control {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.seg-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.seg-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}



.saved-articles-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-tile {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.saved-tile:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.saved-tile-content {
  flex: 1;
  min-width: 0;
}

.saved-tile-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-tile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.saved-tile-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.saved-tile-action .remove-save-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.info-banner {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  font-size: 12px;
  color: var(--blue-text);
}

.info-banner strong { display: block; margin-bottom: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

.input-field {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.12s ease;
}

.input-field:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input-area {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  min-height: 60px;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.12s ease;
}

.input-area:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.select-control {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.select-control.full { width: 100%; border-radius: var(--radius-sm); padding: 10px 14px; }

.headline-input {
  width: 100%;
  padding: 8px 0;
  font-size: 20px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.body-textarea {
  width: 100%;
  padding: 6px 0;
  font-size: 15px;
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.btn-primary {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.12s ease;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary.btn-full { width: 100%; text-align: center; }
.btn-primary.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-outline {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  transition: all 0.12s ease;
}

.btn-outline:hover { background: var(--bg-hover); }
.btn-outline.btn-full { width: 100%; text-align: center; }
.btn-outline.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-danger {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.12s ease;
}

.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-danger.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Filter Status */
.filter-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.filter-status.safe { background: var(--accent-light); color: var(--accent); }
.filter-status.blocked {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  animation: shake 0.25s ease;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ═══════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 480px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 { font-size: 17px; font-weight: 800; }

.modal-close {
  font-size: 22px;
  color: var(--text-tertiary);
  padding: 2px;
  line-height: 1;
}

.studio-modal { max-width: 580px; }

.studio-controls { display: flex; gap: 8px; margin-bottom: 10px; }

.source-drawer { margin-bottom: 10px; }

/* Studio Hashtag Insertion Helper */
.studio-tags-row {
  margin: 8px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.studio-tags-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.studio-tag-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.studio-tag-chips::-webkit-scrollbar { display: none; }

.tag-insert-chip {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s ease;
}

.tag-insert-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

.attachment-preview {
  position: relative;
  margin: 10px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 240px;
  background: #000;
}

.attachment-preview img, .attachment-preview video {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.remove-attach-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.studio-media-btns { display: flex; gap: 6px; }
.studio-actions { display: flex; gap: 6px; }

/* Auth Modal */
.auth-modal { max-width: 420px; }

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.field-hint {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.icon-picker { display: flex; gap: 6px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.active { border-color: var(--accent); background: var(--accent-light); }

/* Violation Modal */
.violation-modal { max-width: 440px; text-align: center; }

.violation-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 1px solid var(--danger-border);
}

.violation-modal h3 { font-size: 17px; font-weight: 800; color: var(--danger); margin-bottom: 4px; }
.violation-modal p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

.violation-list {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 12px;
  text-align: left;
}

.v-item { font-size: 12px; font-weight: 700; color: var(--danger); margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════════════════
   AUTH FORM UPGRADES (Show/Hide, Strength, Prefixes)
   ═══════════════════════════════════════════════════════════════════════ */

.auth-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark.sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
  border-radius: 6px;
}

.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-btn {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  background: none;
}

.link-btn:hover { text-decoration: underline; }

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 38px;
  width: 100%;
}

.pwd-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease;
  user-select: none;
}

.pwd-toggle-btn:hover { opacity: 1; }

.handle-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.handle-prefix {
  position: absolute;
  left: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  font-size: 14px;
  pointer-events: none;
}

.handle-input {
  padding-left: 28px !important;
}

.pwd-strength-bar {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strength-track {
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.25s ease, background-color 0.25s ease;
  background: var(--danger);
}

.strength-fill.weak { width: 33%; background: var(--danger); }
.strength-fill.fair { width: 66%; background: #E6A23C; }
.strength-fill.strong { width: 100%; background: var(--accent); }

.strength-text {
  font-size: 11px;
  color: var(--text-tertiary);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.error-hint {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

/* Account Recovery Card & Code Box */
.recovery-account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.recovery-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}

.recovery-account-info { flex: 1; }
.recovery-name { font-size: 13px; font-weight: 700; color: var(--text); }
.recovery-meta { font-size: 11px; color: var(--text-tertiary); }

.recovery-sent-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sent-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sent-info {
  flex: 1;
}

.sent-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.sent-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.sent-desc strong {
  color: var(--text);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label-row label {
  margin-bottom: 0;
}

.resend-otp-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.12s;
}

.resend-otp-btn:hover {
  text-decoration: underline;
}

.resend-otp-btn:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  text-decoration: none;
}

.otp-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  padding: 10px 14px;
}

/* ═══════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { transform: translateY(12px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════ */

.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (Top Ribbon Always Frozen & Central)
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  .nav-inner { padding: 0 14px; gap: 10px; }
  .brand-name { display: none; }
  .search-box input { width: 140px; }
  .nav-tab { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 600px) {
  .top-nav { height: 56px; }
  .nav-inner { padding: 0 10px; gap: 8px; }
  .search-box { display: none; }
  .nav-tabs { padding: 2px; gap: 1px; }
  .nav-tab { padding: 5px 8px; font-size: 11px; gap: 4px; }
  .nav-tab span { font-size: 11px; }
  .btn-ghost-sm { padding: 5px 10px; font-size: 12px; }
  .btn-primary-sm { padding: 5px 12px; font-size: 12px; }
  .user-pill-name { max-width: 70px; }
  .content-wrap { padding: 14px 10px 80px; }
  .card { padding: 14px; border-radius: 12px; }
  .post-title { font-size: 16px; }
  .setting-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .theme-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}
