@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Professional Dark Mode - Twitter/Reddit/Instagram Standard */
  --bg-start: #0f1419;
  --bg-end: #09101b;
  --text-primary: #f0f5fa;
  --text-secondary: #8fa3c4;
  --glass-bg: rgba(15, 20, 31, 0.68);
  --glass-border: rgba(80, 180, 255, 0.12);
  --accent: #1da1f2;
  --radius: 14px;
  --transition: 0.2s ease;
}
/* Make layout calculations predictable and prevent horizontal scroll */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

body.light-mode {
  --bg-start: #f8fafc;
  --bg-end: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(203, 213, 225, 0.5);
  --accent: #0ea5e9;
  --accent-light: rgba(14, 165, 233, 0.08);
  --accent-border: rgba(14, 165, 233, 0.16);
  --button-bg: #f1f5f9;
  --button-border: #cbd5e1;
  --icon-color: #0ea5e9;
}
body.light-mode .swal2-title {
  color: #0f1419 !important;
}
body.light-mode .swal2-html-container {
  color: #0f1419 !important;
}
body.light-mode .swal2-popup {
  background: rgba(255, 255, 255, 0.97) !important;
}
body.light-mode .toast-notification {
  background: rgba(29, 161, 242, 0.95) !important;
}
body.light-mode .toast-notification .swal2-title {
  color: white !important;
}
body.light-mode .modal-title { color: #0f1419 !important; }

body.light-mode .hug-btn.hugged {
  background: rgba(255,0,0,0.08);
  border-color: rgba(255,0,0,0.16);
}

body.light-mode .sort-tab.active,
body.light-mode .mood-btn.active,
body.light-mode .lifespan-pill.active {
  background: #0ea5e9 !important;
  color: white !important;
  border-color: #0ea5e9 !important;
}

body.light-mode .vent-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(207, 217, 232, 0.32);
  box-shadow: 0 4px 12px rgba(15, 20, 31, 0.06), inset 0 1px 0 rgba(255,255,255,0.6);
}

body.light-mode .glass-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(207, 217, 232, 0.3);
}

body.light-mode input[type="text"],
body.light-mode textarea {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(207, 217, 232, 0.4) !important;
  color: #0f1419 !important;
}
body.light-mode input[type="text"]::placeholder,
body.light-mode textarea::placeholder {
  color: rgba(83, 100, 113, 0.6) !important;
}

body.light-mode .header-wrapper,
body.light-mode .mobile-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

body.light-mode .bottom-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-top-color: rgba(207, 217, 232, 0.24) !important;
}

/* Light mode text colors for professional readability */
body.light-mode .reply-alias {
  color: #0ea5e9 !important;
  font-weight: 700;
}
body.light-mode .reply-text {
  color: #0f172a !important;
}
body.light-mode .stat-pill {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.16) !important;
  color: #475569 !important;
}
body.light-mode .action-count {
  background: rgba(14, 165, 233, 0.08) !important;
  color: #0369a1 !important;
}
body.light-mode .char-counter {
  color: #475569 !important;
}
body.light-mode .mood-btn {
  color: #0f172a !important;
  background: rgba(14, 165, 233, 0.08) !important;
}
body.light-mode .mood-btn.active {
  background: #0ea5e9 !important;
  color: white !important;
}
body.light-mode .swatch {
  border-color: #cbd5e1 !important;
}
body.light-mode .lifespan-pill {
  color: #0f172a !important;
  background: rgba(14, 165, 233, 0.08) !important;
}
body.light-mode .lifespan-pill.active {
  background: #0ea5e9 !important;
  color: white !important;
}

/* Activity item improvements for light mode */
body.light-mode .activity-item {
  background: rgba(247,249,251,0.8) !important;
  border-color: rgba(29,161,242,0.12) !important;
}
body.light-mode .activity-item:hover {
  background: rgba(247,249,251,1) !important;
  border-color: rgba(29,161,242,0.2) !important;
}
body.light-mode .delete-activity-btn {
  background: linear-gradient(135deg, rgba(29,161,242,0.08), rgba(29,161,242,0.05)) !important;
  border-color: rgba(29,161,242,0.16) !important;
  color: #1da1f2 !important;
}
body.light-mode [data-lucide] {
  color: #0f1419 !important;
  stroke: #0f1419 !important;
}

[data-lucide].lucide-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 800;
  font-family: system-ui, sans-serif;
}

body.light-mode .header-actions button,
body.light-mode .mobile-header button {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode .header-actions button:hover,
body.light-mode .mobile-header button:hover {
  background: rgba(14,165,233,0.08) !important;
  border-color: #0ea5e9 !important;
}

body.light-mode .search-icon,
body.light-mode .mobile-search i {
  color: #0ea5e9 !important;
}

body.light-mode .bell-desktop .badge {
  background: linear-gradient(135deg, #ff3b30, #ff2d55) !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  width: 100%;
  background: radial-gradient(circle at 20% 20%, var(--bg-start), var(--bg-end));
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body:not(.light-mode) {
  background:
    radial-gradient(900px 550px at 10% -5%, rgba(29, 161, 242, 0.06), transparent 60%),
    radial-gradient(700px 450px at 95% 5%, rgba(29, 161, 242, 0.04), transparent 58%),
    linear-gradient(180deg, #0f1419 0%, #0a0f1a 55%, #050a15 100%);
}

body:not(.light-mode) .swal2-popup {
  background: linear-gradient(180deg, rgba(15, 20, 31, 0.97), rgba(10, 15, 26, 0.99)) !important;
  border: 1px solid rgba(80, 180, 255, 0.14) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45) !important;
}
body:not(.light-mode) .swal2-title {
  color: #f0f5fa !important;
}
body:not(.light-mode) .swal2-html-container {
  color: #8fa3c4 !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Mobile: hide native scrollbar to avoid visible right-side bar while touch-scrolling */
@media (max-width: 768px) {
  html, body { -webkit-overflow-scrolling: touch; }
  ::-webkit-scrollbar { display: none; }
  body { overscroll-behavior-y: contain; }
  .app-container { -webkit-overflow-scrolling: touch; }

  /* Keep action buttons compact on mobile while allowing wrap when needed */
  .vent-card .actions,
  .vent-card .vent-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 8px 0;
    min-width: 0;
  }

  .vent-card .actions button,
  .vent-card .actions .action-btn,
  .vent-card .actions .hug-btn,
  .vent-card .actions .reply-btn,
  .vent-card .actions .share-btn,
  .vent-card .actions .save-btn,
  .vent-card .actions .report-btn,
  .vent-card .vent-actions button,
  .vent-card .vent-actions .action-btn,
  .vent-card .vent-actions .hug-btn,
  .vent-card .vent-actions .reply-btn,
  .vent-card .vent-actions .share-btn,
  .vent-card .vent-actions .save-btn,
  .vent-card .vent-actions .report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 8px 10px;
    border-radius: 10px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.03);
    flex: 0 0 auto;
  }

  .vent-card .vent-actions .action-count {
    margin-left: 6px;
    font-size: 0.85rem;
  }

  /* Allow a denser layout for long action rows without overflowing the viewport */
  .vent-card .vent-actions { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .sort-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vent-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    overflow: visible !important;
    padding: 8px 0 2px !important;
    margin: 0 !important;
    width: 100% !important;
    scrollbar-width: none;
  }
/* ---------- Desktop Header (exactly like view.php) ---------- */
.header-wrapper {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    max-width: none;
    min-height: 46px;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 10px;
}
@media (min-width: 769px) {
  .header-wrapper { display: block; position: sticky; top: 0; }
  .mobile-header { display: none !important; }
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 64px;
  width: 100%;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .header-search {
    margin: 0 8px;
    max-width: 320px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions button {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
}

.header-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7dd3fc, #1da1f2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  cursor: pointer;
}
body.light-mode .header-logo h1,
body.light-mode .mobile-logo {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #0f1419 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}
body.light-mode .mobile-header .mobile-logo {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #0f1419 !important;
}
body.light-mode .header-logo h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}
body.light-mode .mobile-logo {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f1419 !important;
}

.header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 16px;
  position: relative;
}

.header-search .search-input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  border-radius: 24px;
  background: rgba(80,180,255,0.06);
  border: 1px solid rgba(80,180,255,0.12);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(80,180,255,0.08);
  border: 1px solid rgba(80,180,255,0.14);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}
.header-actions button:hover { background: rgba(80,180,255,0.14); }
.header-actions button:active { transform: scale(0.96); }

body:not(.light-mode) .header-wrapper,
body:not(.light-mode) .mobile-header {
  background: linear-gradient(180deg, rgba(15, 20, 31, 0.98), rgba(10, 15, 26, 0.95));
  border-bottom-color: rgba(80, 180, 255, 0.14);
}
body:not(.light-mode) .header-logo h1,
body:not(.light-mode) .mobile-header .mobile-logo {
  background: linear-gradient(135deg, #7dd3fc, #1da1f2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body:not(.light-mode) .header-search .search-input,
body:not(.light-mode) .mobile-header .mobile-search {
  background: rgba(80,180,255,0.04);
  border-color: rgba(80,180,255,0.12);
  box-shadow: inset 0 1px 0 rgba(80,180,255,0.03);
}
body:not(.light-mode) .header-actions button {
  background: linear-gradient(180deg, rgba(80,180,255,0.06), rgba(80,180,255,0.03));
  border-color: rgba(80,180,255,0.14);
}

/* When search is active hide desktop composer and tabs for focused search UX */
@media (min-width: 769px) {
  .search-active .vent-form.desktop-only,
  .search-active #sortTabs,
  .search-active .trending-topics,
  .search-active #dailyPromptBanner {
    display: none !important;
  }
}

/* Make legal pages use a clean, full-width layout on desktop */
.legal-page { padding: 28px 12px; }
.legal-page .legal-shell {
  max-width: none;
  width: calc(100% - 48px);
  margin: 0 auto;
  border-radius: 12px;
  padding: 20px;
}

@media (min-width: 769px) {
  .legal-page .legal-shell { width: 100%; }
}

/* provide a subtle indicator when search mode is active on desktop */
@media (min-width: 769px) {
  .search-active .header-search .search-input {
    box-shadow: 0 6px 30px rgba(56,189,248,0.12);
    border-color: rgba(56,189,248,0.28) !important;
  }
}

/* Double-tap hug floating heart animation */
.floating-heart {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: transform 420ms cubic-bezier(.17,.67,.36,1), opacity 420ms ease-out;
  z-index: 9999;
}
.floating-heart.show {
  transform: translate(-50%, -70%) scale(1.05);
  opacity: 1;
}
.floating-heart.pop {
  transform: translate(-50%, -140%) scale(0.8);
  opacity: 0;
}
.hug-pop {
  animation: hugPulse 280ms ease-out;
}
@keyframes hugPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.bell-desktop { position: relative; }
.bell-desktop { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.bell-desktop .badge {
  position: absolute;
  top: -4px; right: -4px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.5s infinite;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  border: 2px solid rgba(15, 23, 42, 0.95);
}

/* ---------- Mobile Header (exactly like view.php, but sticky) ---------- */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(15,20,31,0.96), rgba(10,15,26,0.92));
  backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid rgba(80,180,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16), 0 2px 0 rgba(29,161,242,0.06) inset;
  animation: slideDownHeader 0.3s ease;
}
@keyframes slideDownHeader { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mobile-header .mobile-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1da1f2, #0ea5e9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: -0.5px;
  transition: transform 0.2s;
}
.mobile-header .mobile-logo:active { transform: scale(0.95); }
.mobile-header .mobile-search {
  display: flex;
  align-items: center;
  background: rgba(29,161,242,0.06);
  border: 1px solid rgba(80,180,255,0.12);
  border-radius: 18px;
  padding: 9px 12px;
  gap: 8px;
  flex: 1;
  min-width: 0;
  transition: all 0.2s;
}
.mobile-header .mobile-search:focus-within {
  background: rgba(29,161,242,0.10);
  border-color: rgba(80,180,255,0.2);
  box-shadow: 0 0 12px rgba(29,161,242,0.12);
}
.mobile-header .mobile-search i { width: 16px; height: 16px; color: var(--text-secondary); }
.mobile-header .mobile-search input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.96rem;
  width: 100%;
  min-width: 0;
  outline: none;
}
.mobile-header .mobile-search input::placeholder { color: var(--text-secondary); }
.mobile-header button,
.mobile-header .mobile-theme-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-primary);
}
.mobile-header button i,
.mobile-header button svg,
.mobile-header .mobile-theme-btn i,
.mobile-header .mobile-theme-btn svg {
  width: 18px;
  height: 18px;
  color: inherit;
  stroke: currentColor;
  fill: none;
}
@media (max-width: 768px) {
  .header-wrapper { display: none !important; }
  .mobile-header { display: flex !important; }
}
@media (min-width: 769px) {
  .header-wrapper { display: block !important; position: sticky; top: 0; }
  .mobile-header { display: none !important; }
}

/* Main Grid (mobile first: single column) */
html, body {
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 12px 80px;
  display: grid;
  grid-template-columns: 1fr;          /* mobile: one column */
  gap: 20px;
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Main content wrapper – keep feed stuff together */
.main-content,
.feed,
.sort-tabs,
.vent-card {
  min-width: 0;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

/* Desktop: two columns (feed + sidebar) */
@media (min-width: 481px) and (max-width: 768px) {
  .app-container {
    padding: 18px 14px 120px;
    gap: 20px;
  }

  .vent-card {
    padding: 16px 18px;
  }
}

@media (min-width: 769px) {
  .app-container {
    grid-template-columns: 1fr 280px;
    gap: 32px;
    padding: 20px 16px 20px;
  }

  .vent-card {
    padding: 18px 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .app-container {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 22px;
  }
  .floating-about {
    top: 78px;
    padding: 12px 10px;
  }
}

/* Sorting Tabs - Compact, minimalist design */
.sort-tabs { 
  display: flex; 
  gap: 6px; 
  overflow: hidden; 
  padding: 2px 0;
  margin-bottom: 12px;
  white-space: nowrap;
  width: 100%;
}
.sort-tab {
  padding: 6px 14px; 
  border-radius: 16px; 
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(125, 211, 252, 0.08);
  color: var(--text-secondary);
  font-size: 0.85rem; 
  font-weight: 500; 
  cursor: pointer; 
  white-space: nowrap; 
  transition: all var(--transition);
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.sort-tab:hover { 
  background: rgba(255,255,255,0.06);
  border-color: rgba(125, 211, 252, 0.12);
}
.sort-tab.active { 
  background: var(--accent); 
  color: white;
  border-color: var(--accent); 
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(29,161,242,0.25);
}

body.light-mode .sort-tab {
  background: rgba(29, 161, 242, 0.04);
  border-color: rgba(29, 161, 242, 0.08);
  color: #536471;
}
body.light-mode .sort-tab:hover {
  background: rgba(29, 161, 242, 0.08);
  border-color: rgba(29, 161, 242, 0.12);
}
body.light-mode .sort-tab.active {
  background: #1da1f2;
  color: white;
  border-color: #1da1f2;
}

/* Trending pills - more subtle */
.trending-topics { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  margin-top: 6px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.trending-pill {
  background: rgba(255,255,255,0.04); 
  border: 1px solid rgba(255,255,255,0.08); 
  border-radius: 16px;
  padding: 5px 12px; 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: all var(--transition);
}

body:not(.light-mode) .trending-pill {
  background: rgba(255,255,255,0.035);
  border-color: rgba(125, 211, 252, 0.14);
  color: #b8c9e4;
}

/* Vent Form - Premium Design */
.vent-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(15,20,31,0.8), rgba(8,13,24,0.9));
  border: 1px solid rgba(29,161,242,0.12);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
body:not(.light-mode) .vent-form {
  background: linear-gradient(160deg, rgba(10,16,30,0.92), rgba(8,13,24,0.95));
  border-color: rgba(125, 211, 252, 0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
body.light-mode .vent-form {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(247,249,251,0.95)) !important;
  border: 1px solid rgba(207,217,232,0.24) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
}
.vent-form textarea, .vent-form input[type="text"] {
  width: 100%; 
  background: rgba(15,23,42,0.5); 
  border: 1px solid rgba(29,161,242,0.12); 
  border-radius: 12px;
  padding: 12px 14px; 
  color: var(--text-primary); 
  font-family: inherit; 
  font-size: 0.95rem;
  transition: all var(--transition); 
  backdrop-filter: blur(8px);
}
.vent-form textarea:focus, .vent-form input[type="text"]:focus { 
  outline: none; 
  border-color: var(--accent); 
  box-shadow: 0 0 0 2px rgba(29,161,242,0.15); 
  background: rgba(15,23,42,0.6);
}
body:not(.light-mode) .vent-form textarea,
body:not(.light-mode) .vent-form input[type="text"] {
  background: rgba(255,255,255,0.03);
  border-color: rgba(29,161,242,0.12);
}
body:not(.light-mode) .vent-form textarea:focus,
body:not(.light-mode) .vent-form input[type="text"]:focus {
  background: rgba(29,161,242,0.08);
  border-color: rgba(29,161,242,0.3);
  box-shadow: 0 0 0 2px rgba(29,161,242,0.12);
}
body.light-mode .vent-form textarea, body.light-mode .vent-form input[type="text"] {
  background: rgba(255,255,255,0.95) !important; 
  border-color: rgba(207,217,232,0.24) !important;
}
body.light-mode .vent-form textarea:focus, body.light-mode .vent-form input[type="text"]:focus {
  background: rgba(255,255,255,0.98) !important; 
  border-color: #1da1f2 !important; 
  box-shadow: 0 0 0 2px rgba(29,161,242,0.12) !important;
}
.vent-form textarea::placeholder, .vent-form input[type="text"]::placeholder { 
  color: var(--text-secondary); 
}
.char-counter { 
  text-align: right; 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  transition: color var(--transition); 
}
.mood-selector { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px;
  opacity: 0.9;
}
.mood-btn {
  padding: 6px 12px; 
  border-radius: 16px; 
  font-size: 0.8rem; 
  font-weight: 500;
  color: var(--text-primary); 
  background: rgba(255,255,255,0.04); 
  border: 1px solid rgba(29,161,242,0.08);
  cursor: pointer; 
  transition: all var(--transition);
}
.mood-btn:hover { background: rgba(255,255,255,0.08); }
.mood-btn.active { 
  border-color: var(--accent); 
  background: rgba(29,161,242,0.15); 
  box-shadow: 0 0 6px rgba(29,161,242,0.15);
}
.color-swatches { display: none !important; }

/* Lifespan Toggle - more compact */
.lifespan-toggle { 
  display: flex; 
  gap: 8px; 
  margin-top: 10px; 
  align-items: center; 
  flex-wrap: wrap;
  opacity: 0.85;
}
.lifespan-toggle label { 
  color: var(--text-secondary); 
  font-size: 0.8rem; 
  flex-basis: 100%;
  font-weight: 500;
}
.lifespan-pill {
  padding: 6px 12px; 
  border-radius: 14px; 
  font-size: 0.8rem; 
  font-weight: 500;
  color: var(--text-primary); 
  background: rgba(255,255,255,0.04); 
  border: 1px solid rgba(29,161,242,0.08);
  cursor: pointer; 
  transition: all var(--transition); 
  flex: 1; 
  min-width: 80px; 
  text-align: center;
}
.lifespan-pill:hover { 
  background: rgba(255,255,255,0.06);
  border-color: rgba(29,161,242,0.12);
}
.lifespan-pill.active { 
  background: var(--accent); 
  color: white;
  border-color: var(--accent); 
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(29,161,242,0.25);
}

/* Buttons - Simple, minimal design */
.btn-load { 
  padding: 10px 20px; 
  font-weight: 600; 
  border-radius: 8px; 
  background: rgba(29,161,242,0.1);
  border: 1px solid rgba(29,161,242,0.12);
  color: var(--text-primary); 
  cursor: pointer; 
  transition: all var(--transition);
  font-size: 0.95rem;
}
.btn-load:hover { 
  background: rgba(29,161,242,0.15);
  border-color: rgba(29,161,242,0.24);
  transform: translateY(-1px);
}
.btn-load:active { transform: translateY(0); }

.btn-submit { 
  background: var(--accent) !important;
  color: white !important; 
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(29,161,242,0.2);
  transition: all var(--transition);
  border: none !important;
  font-size: 0.95rem;
}
body.light-mode .btn-submit { 
  background: #1da1f2 !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(29,161,242,0.2) !important;
}
.btn-submit:hover { 
  background: #1a91da !important;
  box-shadow: 0 4px 12px rgba(29,161,242,0.3);
  transform: translateY(-1px);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; box-shadow: none; cursor: not-allowed; }

.btn-burn {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(239,68,68,0.12) !important;
  color: var(--text-primary) !important;
}
.btn-burn:hover {
  background: rgba(239,68,68,0.1) !important;
  border-color: rgba(239,68,68,0.24) !important;
}

/* Load More Wrapper */
.load-more-wrapper { display: flex; justify-content: center; align-items: center; width: 100%; padding: 20px 0; }
.load-more-wrapper .btn-load { min-width: 140px; }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 16px; width: 100%; box-sizing: border-box; }

.load-more-wrapper { display: none; }

#feedSentinel { width: 100%; height: 1px; }

/* Vent Card – professional design */
.vent-card {
  padding: 20px 22px;
  border-left: none;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeInUp 0.4s ease both;
  border-radius: var(--radius);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(160deg, rgba(15,20,31,0.95) 0%, rgba(10,15,26,0.90) 55%, rgba(8,12,24,0.96) 100%);
  border: 1px solid rgba(80, 180, 255, 0.09);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: visible;
  margin: 0 auto;
}
/* Ensure cards don't create a stacking context that clips floating FAB */
.vent-card {
  z-index: 1 !important;
  overflow: visible !important;
}
.vent-card { position: relative; }
.vent-card[class*="mood-"] .vent-mood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(80,180,255,0.05);
  border: 1px solid rgba(80,180,255,0.08);
}
.vent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.vent-card .vent-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.vent-card-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.vent-card .vent-time {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.vent-card .vent-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.vent-card .empathy-badge,
.vent-card .metoo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 0.85rem;
}
.vent-card .vent-message {
  padding-right: 0;
}

body.light-mode .vent-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.vent-card .vent-message {
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 1rem;
  margin-bottom: 10px;
}
.vent-card .vent-mood {
  width: fit-content;
}
.vent-card.mood-general,
.vent-card.mood-sad,
.vent-card.mood-angry,
.vent-card.mood-happy,
.vent-card.mood-anxious,
.vent-card.mood-burnout,
.vent-card.mood-toxic_boss,
.vent-card.mood-imposter,
.vent-card.mood-office_politics,
.vent-card.mood-monday_blues {
  background: linear-gradient(160deg, rgba(15,20,31,0.96) 0%, rgba(10,15,26,0.91) 55%, rgba(8,12,24,0.96) 100%) !important;
}
.vent-card.mood-sad .mood-emoji,
.vent-card.mood-angry .mood-emoji,
.vent-card.mood-happy .mood-emoji,
.vent-card.mood-anxious .mood-emoji,
.vent-card.mood-burnout .mood-emoji,
.vent-card.mood-toxic_boss .mood-emoji,
.vent-card.mood-imposter .mood-emoji,
.vent-card.mood-office_politics .mood-emoji,
.vent-card.mood-monday_blues .mood-emoji { 
  filter: none;
}
.vent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

body.light-mode .vent-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ai-tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(29,161,242,0.10);
  border: 1px solid rgba(29,161,242,0.16);
  color: #7dd3fc;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
body.light-mode .ai-tag-chip {
  background: rgba(29,161,242,0.08);
  border-color: rgba(29,161,242,0.14);
  color: #0b74b8;
}
.hashtag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(29,161,242,0.08);
  border: 1px solid rgba(29,161,242,0.14);
  color: #7dd3fc;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}
.hashtag:hover,
.ai-tag-chip:hover {
  background: rgba(29,161,242,0.16);
  border-color: rgba(29,161,242,0.24);
  text-decoration: none;
}
body.light-mode .hashtag {
  background: rgba(29,161,242,0.06);
  border-color: rgba(29,161,242,0.12);
  color: #0b74b8;
}
/* Action buttons: clean, compact, and mobile-friendly */
.vent-card .actions,
.vent-card .vent-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px;
  margin: 0;
}
.vent-card .actions::-webkit-scrollbar,
.vent-card .vent-actions::-webkit-scrollbar { display: none; }
.vent-card .actions button,
.vent-card .actions .action-btn,
.vent-card .actions .hug-btn,
.vent-card .actions .reply-btn,
.vent-card .actions .share-btn,
.vent-card .actions .save-btn,
.vent-card .actions .report-btn,
.vent-card .vent-actions button,
.vent-card .vent-actions .action-btn,
.vent-card .vent-actions .hug-btn,
.vent-card .vent-actions .reply-btn,
.vent-card .vent-actions .share-btn,
.vent-card .vent-actions .save-btn,
.vent-card .vent-actions .report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  flex-shrink: 0;
}
.vent-card .vent-actions button:hover {
  background: rgba(29,161,242,0.12);
  border-color: rgba(29,161,242,0.25);
  transition: all 0.2s ease;
}
.vent-card .vent-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.vent-card .actions .action-btn .action-count { margin-left: 6px; }
.vent-card .vent-actions .action-count { margin-left: 4px; margin-right: 0; font-size: 0.9rem; white-space: nowrap; }

/* Hide tag chips in the main feed by default; only show during search */
.feed .ai-tags { display: flex; gap:8px; flex-wrap:wrap; }

/* Light mode vent card readability improvements */
body.light-mode .vent-card {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15,20,25,0.06);
  border-left: none;
  box-shadow: 0 6px 18px rgba(15, 20, 31, 0.04);
}
body.light-mode .vent-card .vent-text,
body.light-mode .vent-card .vent-message { color: #0f172a; font-weight: 600; }
body.light-mode .vent-card .vent-time { color: #6b7280; }
body.light-mode .vent-card .vent-card-header { border-bottom: 1px solid rgba(15,20,25,0.04); padding-bottom: 10px; }
body.light-mode .vent-card .vent-actions button {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transition: all 0.2s ease;
}
body.light-mode .vent-card .vent-actions button:hover {
  background: #f1f5f9;
  border-color: #0ea5e9;
  box-shadow: none;
}
body.light-mode .hug-btn.hugged {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #dc2626;
}
body.light-mode .hug-btn.hugged:hover {
  background: rgba(239, 68, 68, 0.15);
}
body.light-mode .bookmark-btn.saved {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #16a34a;
}
body.light-mode .bookmark-btn.saved:hover {
  background: rgba(34, 197, 94, 0.15);
}
body.light-mode .vent-card .action-count {
  background: rgba(29,161,242,0.08);
  color: #0b74b8;
}
body.light-mode .vent-card.mood-general,
body.light-mode .vent-card.mood-sad,
body.light-mode .vent-card.mood-angry,
body.light-mode .vent-card.mood-happy,
body.light-mode .vent-card.mood-anxious,
body.light-mode .vent-card.mood-burnout,
body.light-mode .vent-card.mood-toxic_boss,
body.light-mode .vent-card.mood-imposter,
body.light-mode .vent-card.mood-office_politics,
body.light-mode .vent-card.mood-monday_blues {
  background: #ffffff !important;
  border: 1px solid rgba(15,20,25,0.06) !important;
  border-left: none !important;
  box-shadow: 0 6px 18px rgba(15, 20, 31, 0.04) !important;
}

/* Make AI tags more visible in both modes when shown */
.ai-tag-chip { background: rgba(29,161,242,0.08); border-color: rgba(29,161,242,0.12); color: var(--accent); }
body.light-mode .ai-tag-chip { background: rgba(29,161,242,0.08); border-color: rgba(29,161,242,0.12); color: #0369a1; }

/* SweetAlert2 modal: prevent background scrolling and allow tall alert lists */
body.swal2-shown { overflow: hidden !important; }
.swal2-container .swal2-popup { max-height: calc(100vh - 120px); overflow: hidden; }
.alert-shell,
.account-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.alert-shell {
  max-height: calc(65vh - 26px);
}
.account-shell {
  max-height: calc(70vh - 26px);
}
.alert-shell,
.account-shell,
.alert-shell .alert-list,
.account-scroll {
  scrollbar-gutter: stable;
}
.alert-shell .alert-list,
.account-scroll {
  overflow: auto;
  min-height: 0;
}
.alert-shell .alert-list {
  max-height: min(44vh, 420px);
}
.account-scroll {
  max-height: min(40vh, 360px);
}
.notif-pref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.notif-pref-btn {
  border: 1px solid rgba(56,189,248,0.16);
  background: rgba(56,189,248,0.08);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
  min-height: 42px;
}
.notif-pref-btn.active {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.28);
  color: #fca5a5;
}
body.light-mode .notif-pref-btn {
  background: rgba(14,165,233,0.08);
  border-color: rgba(14,165,233,0.16);
  color: #0f172a;
}
body.light-mode .notif-pref-btn.active {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.22);
  color: #b91c1c;
}

/* Export-ready card adjustments (used during html2canvas capture) */
.vent-card.export-ready { box-shadow: none !important; border-left-width: 0 !important; border-radius: 12px !important; }
.vent-card.export-ready .vent-card-header { padding-bottom: 8px; margin-bottom: 10px; }
.vent-card.export-ready .vent-actions {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 8px;
}
.vent-card.export-ready .vent-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
}

/* Countdown timer on vent cards for 48h visibility */
.vent-countdown {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Circular progress ring for countdown */
.countdown-ring { position: relative; width:44px; height:44px; display:inline-block; }
.countdown-ring svg { transform: rotate(-90deg); width:100%; height:100%; }
.countdown-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width:6; }
.countdown-ring .ring-fg { fill: none; stroke: var(--accent); stroke-width:6; stroke-linecap:round; transition: stroke-dashoffset 0.4s linear, stroke 0.25s linear; }
.countdown-ring .ring-label { position:absolute; left:0; top:0; right:0; bottom:0; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:700; color:var(--text-primary); }

/* Keep detail view countdown aligned with feed sizing */
.vent-detail .countdown-ring { width:44px; height:44px; }
.vent-detail .countdown-ring .ring-label { font-size:0.75rem; }
.vent-detail { padding-right: 16px; }
.vent-detail .vent-card-header {
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.vent-card-header-left {
  min-width: 0;
  flex: 1 1 320px;
}
.vent-card-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vent-detail .vent-countdown {
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.reply-threads-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.reply-thread-control {
  border: 1px solid rgba(56,189,248,0.18);
  background: rgba(56,189,248,0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.reply-thread-control:hover {
  background: rgba(56,189,248,0.14);
}

@media (max-width: 480px) {
  .vent-detail { padding-right: 16px; }
  .vent-detail .vent-countdown { position: static; margin-top: 8px; pointer-events: auto; }
}

/* Keep page content above fixed bottom navigation and FAB on small screens */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 18px) !important;
  }
  .content, .main, #app, .app-shell {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 18px) !important;
  }
}

/* Ensure action counts are visible on small screens */
.vent-card .vent-actions .action-count { display:inline-block !important; font-size:0.95rem; margin-left:6px !important; }
@media (max-width:420px) {
  .vent-card .vent-actions .action-count { font-size:0.92rem; }
}

/* Notification badge alignment fixes */
.badge { position: relative; top: -6px; right: -6px; left: auto; display:inline-flex; min-width:18px; height:18px; padding:0 5px; border-radius:9px; font-size:0.75rem; text-align:center; vertical-align:middle; align-items:center; justify-content:center; animation: badge-pop 220ms ease; }
.badge.has-new { animation: badge-pop 220ms ease; }
.bell-desktop { position: relative; }
.bell-desktop .badge { top: -6px; right: -6px; left: auto; }
.bottom-nav .badge { position: absolute; top:6px; right:12px; left:auto; }
.vent-card.export-ready .vent-message {
  line-height: 1.6;
}

/* Mobile: ensure actions stay in a row and are touch-friendly */
@media (max-width: 360px) {
  .vent-card {
    padding: 12px 10px;
    border-left: none;
  }
  .vent-card .vent-message {
    font-size: 0.95rem;
  }
  .vent-card .vent-actions {
    gap: 6px;
    flex-wrap: wrap;
    overflow-x: hidden;
    padding: 6px 4px;
    margin: 0;
  }
  .vent-card .vent-actions button {
    min-width: 42px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 calc(33.333% - 8px);
  }
  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 15px;
    height: 15px;
  }
  .action-count {
    font-size: 0.65rem;
    padding: 1px 3px;
    margin-left: 3px;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .vent-card-header {
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .vent-card .vent-time {
    font-size: 0.75rem;
    flex-basis: auto;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .vent-card .vent-countdown {
    flex-shrink: 0;
    margin-left: 4px;
  }
  .vent-card .vent-countdown .countdown-ring {
    width: 36px !important;
    height: 36px !important;
  }
  .vent-card .vent-countdown .countdown-ring .ring-label {
    font-size: 0.65rem !important;
  }
  .vent-mood {
    font-size: 0.85rem;
  }
  .vent-mood span:last-child {
    display: none;
  }
  .ai-tags {
    gap: 4px;
  }
  .ai-tag-chip, .hashtag {border-left-width: 4px; }
  .vent-card .vent-message { font-size: 0.97rem; }
  .vent-card .vent-actions { gap: 6px; }
  .vent-card .vent-actions button {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
  }
    .vent-card .vent-actions button i,
    .vent-card .vent-actions button svg {
      width: 18px;
      height: 18px;
    }
    .action-count {
      font-size: 0.72rem;
      margin-left: 5px;
    }
    .vent-card-header { gap: 8px; }
    .vent-card .vent-time { font-size: 0.8rem; }
    .vent-card .vent-message { font-size: 0.98rem; }
    .vent-card .vent-actions button {
      min-width: 40px;
      min-height: 40px;
      padding: 8px 10px;
      border: 1px solid rgba(255,255,255,0.15);
      background: rgba(255,255,255,0.06);
    }
}

/* Tablet: 481-768px */
@media (min-width: 481px) and (max-width: 768px) {
  .vent-card { padding: 16px 14px; }
  .vent-card .vent-message { font-size: 0.98rem; }
  .vent-card .vent-actions button {
    min-width: 42px;
    min-height: 42px;
    padding: 8px 10px;
  }
  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 17px;
    height: 17px;
  }
  .hug-btn .action-count,
  .reply-btn .action-count {
    font-size: 0.76rem;
  }
}

/* Final FAB override for small screens: keep centered above bottom-nav consistently */
@media (max-width: 768px) {
  .fab {
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(70px + 12px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1100 !important;
  }
}
.daily-prompt {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  opacity: 0.9;
}
.daily-prompt-label {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}
.daily-prompt-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}
.daily-prompt-btn {
  align-self: flex-start;
  border: 1px solid rgba(29,161,242,0.12);
  background: rgba(29,161,242,0.08);
  color: var(--accent);
  border-radius: 8px;
  padding: 5px 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.daily-prompt-btn:hover {
  background: rgba(29,161,242,0.12);
}
body.light-mode .daily-prompt-btn {
  background: rgba(29,161,242,0.06);
  border-color: rgba(29,161,242,0.12);
  color: #1da1f2;
}

.vent-stats { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-pill {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 5px 10px; font-size: 0.8rem; color: var(--text-secondary);
}
.stat-pill i { width: 14px; height: 14px; }
.stat-pill span { font-weight: 500; }

.vent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: hidden;
  scrollbar-width: none;
}
.vent-actions::-webkit-scrollbar { display: none; }
.vent-actions button {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 6px 8px; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  color: var(--text-primary);
  flex: 0 0 auto;
}
.vent-actions button { position: relative; }
.action-count {
  display: inline-block;
  margin-left: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1;
  vertical-align: middle;
}
/* Clean Red Icon */
.hug-btn.hugged i,
.hug-btn.hugged svg {
  color: #ef4444;
  fill: #ef4444;
  stroke: #ef4444;
  fill-opacity: 1;
  stroke-width: 2.5;
  filter: none;
  animation: hugIconPulse 0.35s ease-out;
}
@keyframes hugGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,23,68,0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(255,23,68,0.8)); }
}
.hug-btn.hugged {
  box-shadow: none;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  transition: all 0.2s ease;
}
.light-mode .hug-btn.hugged {
  background: rgba(255, 23, 68, 0.08);
  border-color: rgba(255, 23, 68, 0.18);
}
.hug-btn.hugged:hover {
  box-shadow: 0 0 6px rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.1);
}
.light-mode .hug-btn.hugged:hover {
  background: rgba(255, 23, 68, 0.12);
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.12);
}

.hug-btn.hug-pop i {
  animation: hugIconPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hug-btn.hug-pop svg {
  animation: hugIconPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes hugIconPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes hugIconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.vent-actions button:hover { background: rgba(255,255,255,0.1); box-shadow: 0 0 6px rgba(255,255,255,0.1); }
.vent-actions button:disabled { opacity: 0.5; cursor: default; }
.vent-actions button i { width: 18px; height: 18px; }
.vent-actions button i,
.vent-actions button svg {
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
  fill: none;
  display: block;
}

/* Clean action buttons */
.hug-btn,
.reply-btn,
.share-btn,
.bookmark-btn,
.delete-btn,
.report-btn {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  gap: 0;
  background: rgba(255,255,255,0.04);
  box-shadow: none;
}
.hug-btn {
  border-color: rgba(255, 255, 255, 0.12);
}
.hug-btn:hover,
.reply-btn:hover,
.share-btn:hover,
.bookmark-btn:hover,
.delete-btn:hover,
.report-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255,255,255,0.08);
}
.hug-btn .action-count,
.reply-btn .action-count {
  margin-left: 10px;
  padding: 3px 8px;
  font-weight: 700;
}
.hug-btn i {
  color: #ffffff;
  fill: none;
  stroke: #ffffff;
}
.hug-btn svg {
  color: #ffffff;
  fill: none;
  stroke: #ffffff;
}
/* Force bright red for hugged state in light-mode too */
body.light-mode .hug-btn.hugged i,
body.light-mode .hug-btn.hugged svg,
.hug-btn.hugged i,
.hug-btn.hugged svg {
  color: #ff1744 !important;
  fill: #ff1744 !important;
  stroke: #ff1744 !important;
  filter: drop-shadow(0 0 10px rgba(255,23,68,0.7)) !important;
}
body.light-mode .hug-btn:not(.hugged) i {
  color: #1da1f2;
  fill: none;
  stroke: #1da1f2;
}
body.light-mode .hug-btn:not(.hugged) svg {
  color: #1da1f2;
  fill: none;
  stroke: #1da1f2;
}
body.light-mode .hug-btn.hugged i {
  color: #ff1744 !important;
  fill: #ff1744 !important;
  stroke: #ff1744 !important;
}
body.light-mode .hug-btn.hugged svg {
  color: #ff1744 !important;
  fill: #ff1744 !important;
  stroke: #ff1744 !important;
}
body.light-mode .hug-btn,
body.light-mode .reply-btn,
body.light-mode .share-btn,
body.light-mode .bookmark-btn,
body.light-mode .delete-btn,
body.light-mode .report-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,250,245,0.72));
  border-color: rgba(217,119,6,0.14);
}
body.light-mode .vent-actions button:hover {
  background: #f1f5f9;
  box-shadow: none;
}

/* Reply item delete button */
.reply-item {
  position: relative;
  padding: 14px;
  padding-right: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reply-item::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(56,189,248,0.08);
  opacity: 0.6;
  pointer-events: none;
}
.reply-item[data-level="0"]::before { display: none; }
.reply-parent-label {
  font-size: 0.75rem;
  color: #7dd3fc;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border-left: 2px solid rgba(56, 189, 248, 0.22);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.reply-item .reply-alias {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  row-gap: 6px;
  margin-bottom: 0;
  min-width: 0;
}
.reply-item .reply-alias-name { min-width: 0; overflow-wrap: anywhere; flex: 1 1 auto; }
.reply-thread-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #7dd3fc;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.18);
  flex-shrink: 0;
}
.reply-item .reply-to-btn {
  margin-left: auto;
  border: 1px solid rgba(56,189,248,0.18);
  background: rgba(56,189,248,0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.reply-item .reply-to-btn:hover {
  background: rgba(56,189,248,0.16);
}
.reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
  flex-wrap: wrap;
}
.reply-targeted {
  border-color: rgba(125,211,252,0.55) !important;
  box-shadow: 0 0 0 1px rgba(125,211,252,0.18), 0 12px 28px rgba(2,132,199,0.16) !important;
  background: linear-gradient(180deg, rgba(8,145,178,0.12), rgba(15,23,42,0.88)) !important;
}
.reply-item:hover,
.reply-item:focus-within {
  border-color: rgba(125,211,252,0.42);
  box-shadow: 0 0 0 1px rgba(125,211,252,0.12), 0 14px 34px rgba(2,132,199,0.16);
}
.reply-item .reply-alias,
.reply-item .reply-text,
.reply-item .reply-footer {
  min-width: 0;
}
.reply-item[data-level="0"] {
  padding-left: 14px;
  border-left: 1px solid rgba(56,189,248,0.12);
  background: linear-gradient(90deg, rgba(56,189,248,0.02), transparent 30%);
}
/* container for nested replies (used for collapse/expand) */
.reply-children {
  margin-top: 10px;
  margin-left: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(56,189,248,0.06);
  display: block;
}
.reply-item.collapsed > .reply-children { display: none !important; }
.collapse-toggle {
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.16);
  color: #7dd3fc;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.collapse-toggle:hover { 
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.28);
  color: #bfdbfe;
}
.collapse-toggle.collapsed {
  background: rgba(100,150,200,0.08);
  border-color: rgba(100,150,200,0.16);
  color: #9fb3d5;
}
.collapse-toggle.collapsed:hover {
  background: rgba(100,150,200,0.15);
}
.report-btn.reported {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.16) !important;
  border-color: rgba(248, 113, 113, 0.28);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.1), 0 8px 18px rgba(248, 113, 113, 0.14);
}
.report-btn.reported i,
.report-btn.reported svg {
  fill: currentColor;
}
.bookmark-btn.saved {
  color: #7dd3fc;
  background: rgba(56,189,248,0.16) !important;
  border-color: rgba(56,189,248,0.2);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.08), 0 8px 18px rgba(56,189,248,0.12);
  transform: translateY(-1px);
}
.bookmark-btn.saved i,
.bookmark-btn.saved svg {
  fill: currentColor;
}
.reply-target-preview {
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.45;
  padding-left: 8px;
  border-left: 2px solid rgba(125,211,252,0.22);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.reply-item .op-badge { 
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    padding: 4px 10px;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
    border: 1px solid rgba(251, 191, 36, 0.4);
}
  .reply-item .healer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(167,243,208,0.95), rgba(110,231,183,0.9));
    color: #064e3b;
    padding: 4px 10px;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(16, 185, 129, 0.35);
  }
body.light-mode .reply-item .op-badge {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    color: #7c2d12;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
    border: 1px solid rgba(217, 119, 6, 0.5);
}
  body.light-mode .reply-item .healer-badge {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-color: rgba(16,185,129,0.35);
    box-shadow: 0 2px 10px rgba(16,185,129,0.18);
  }
.reply-item .reply-text {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.reply-item .reply-time { font-size: 0.78rem; color: var(--text-secondary); margin-top:8px; }
.reply-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(56,189,248,0.2);
  background: rgba(56,189,248,0.08);
  color: #7dd3fc;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.reply-like-btn:hover { background: rgba(56,189,248,0.16); }
.reply-like-btn.active {
  color: #fda4af;
  border-color: rgba(244,63,94,0.28);
  background: rgba(244,63,94,0.16);
  animation: badge-pop 180ms ease;
}
.vent-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.empathy-badge,
.metoo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(56,189,248,0.22);
  color: #7dd3fc;
  background: rgba(56,189,248,0.1);
}
.metoo-badge {
  border-color: rgba(251,113,133,0.24);
  color: #fda4af;
  background: rgba(251,113,133,0.12);
}
.metoo-btn.active {
  color: #fda4af !important;
  border-color: rgba(251,113,133,0.35) !important;
  background: rgba(251,113,133,0.14) !important;
}
.reply-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(239,68,68,0.15);
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reply-delete:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.2);
}
.reply-delete:active { transform: scale(0.96); }
.reply-delete::after {
  content: 'Delete';
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,23,42,0.95);
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity 0.12s ease;
}
.reply-delete:hover::after { opacity: 1; }

body.light-mode .reply-delete {
  border-color: rgba(217,119,6,0.2) !important;
  background: rgba(217,119,6,0.08) !important;
  color: #d97706 !important;
}
body.light-mode .reply-delete:hover {
  background: rgba(217,119,6,0.15) !important;
  border-color: rgba(217,119,6,0.3) !important;
}
.reply-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239,68,68,0.25);
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08));
  color: #fca5a5;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}
.reply-footer .reply-delete-btn {
  align-self: flex-end;
}
.reply-delete-btn:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(239,68,68,0.12));
  transform: translateY(-1px);
}
body.light-mode .delete-btn {
  background: rgba(217,119,6,0.12) !important;
  border-color: rgba(217,119,6,0.25) !important;
  color: #d97706 !important;
}
body.light-mode .delete-btn:hover {
  background: rgba(217,119,6,0.2) !important;
  border-color: rgba(217,119,6,0.4) !important;
}
.bookmark-btn.saved { color: var(--accent); background: rgba(56,189,248,0.15) !important; }

/* Skeleton */
.skeleton-card { padding: 18px 20px; border-radius: var(--radius); background: rgba(30,41,59,0.3); border: 1px solid rgba(255,255,255,0.03); overflow: hidden; }
.skeleton-line { height: 14px; background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; margin-bottom: 12px; }
.skeleton-line.wide { width: 90%; } .skeleton-line.medium { width: 70%; } .skeleton-line.short { width: 40%; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Share, Bookmark */
.share-btn, .bookmark-btn { background: transparent; border: none; cursor: pointer; color: var(--text-secondary); transition: color var(--transition); }
.share-btn:hover { color: var(--accent); } .bookmark-btn:hover { color: var(--accent); }

/* ---------- Mobile Bottom Nav & Overlay ---------- */
.bottom-nav, .fab { display: none; }

@media (min-width: 769px) {
  .bottom-nav, .fab { display: none !important; }
}

@media (max-width: 768px) {
  .app-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-bottom: 150px !important;
  }

  .mobile-header {
    padding: 10px 10px 8px !important;
    gap: 8px !important;
  }

  .mobile-header .mobile-logo {
    font-size: 1.16rem !important;
    line-height: 1.1 !important;
  }

  .mobile-header .mobile-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    border-radius: 16px !important;
  }

  .mobile-header .mobile-search input {
    font-size: 0.92rem !important;
  }

  .vent-card {
    padding: 14px 12px !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .vent-card .vent-actions,
  .vent-card .actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 6px 2px 6px 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .vent-card .vent-actions::-webkit-scrollbar {
    display: none;
  }
  .vent-card .vent-actions button,
  .vent-card .actions button {
    flex: 0 0 auto !important;
    min-width: 52px !important;
    min-height: 44px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
  .vent-card .vent-actions .action-count,
  .vent-card .actions .action-count {
    margin-left: 4px !important;
    font-size: 0.92rem !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .floating-about {
    display: none !important;
  }

  .bottom-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 2px solid rgba(56, 189, 248, 0.2) !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) 0 !important;
    box-sizing: border-box !important;
  }

  body:not(.light-mode) .bottom-nav {
    background: linear-gradient(180deg, rgba(8,13,24,0.98), rgba(6,10,18,0.98)) !important;
    border-top: 1px solid rgba(125, 211, 252, 0.24) !important;
    box-shadow: 0 -10px 28px rgba(2, 6, 23, 0.52) !important;
  }

  .nav-item {
    color: var(--text-secondary) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65rem !important;
    gap: 2px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    transition: color 0.2s ease !important;
    padding: 8px 4px !important;
    min-width: 0 !important;
    flex: 1 0 auto !important;
    max-width: none !important;
    font-weight: 500 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .nav-item span {
    display: block;
    font-size: 0.62rem;
    color: inherit;
    font-weight: 500;
  }

  .nav-item i,
  .nav-item svg {
    display: inline-flex !important;
    width: 20px !important;
    height: 20px !important;
    color: inherit !important;
    stroke: currentColor !important;
    fill: none !important;
    visibility: visible !important;
  }

  .nav-item:hover {
    color: var(--accent);
  }

  .nav-item.active {
    color: var(--accent);
  }

  .nav-item .badge {
    position: absolute;
    top: -2px;
    right: 8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
  }

  .fab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    left: 50% !important;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-50%);
    width: 56px !important;
    height: 56px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(56, 189, 248, 0.24) !important;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
    color: #021124 !important;
    box-shadow: 0 10px 26px rgba(14, 165, 233, 0.35) !important;
    z-index: 1100 !important;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s !important;
    animation: fabBounce 0.6s ease-out !important;
  }

  .fab i,
  .fab svg {
    width: 22px !important;
    height: 22px !important;
    color: inherit !important;
    stroke: currentColor !important;
    fill: none !important;
  }

  .fab:hover {
    transform: translateX(-50%) scale(1.1) !important;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4) !important;
  }

  .fab:active {
    transform: translateX(-50%) scale(0.95) !important;
  }

  @keyframes fabBounce {
    from {
      transform: translateX(-50%) scale(0.8);
      opacity: 0;
    }
    to {
      transform: translateX(-50%) scale(1);
      opacity: 1;
    }
  }

  .vent-form.desktop-only {
    display: none;
  }

  .form-overlay {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    padding: 56px 20px calc(120px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 32px rgba(56, 189, 248, 0.2);
  }

  body:not(.light-mode) .form-overlay {
    background: linear-gradient(180deg, rgba(8,13,24,0.98), rgba(6,10,18,0.98));
    border-top: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: 0 -12px 34px rgba(2, 6, 23, 0.55);
  }

  body.light-mode .form-overlay {
    background: rgba(255, 250, 245, 0.98) !important;
    border-top: 1px solid rgba(217, 119, 6, 0.18);
    box-shadow: 0 -10px 30px rgba(217, 119, 6, 0.12) !important;
  }

  .form-overlay.active {
    transform: translateY(0);
  }

  body.overlay-open {
    overflow: hidden;
    touch-action: none;
  }

  .form-overlay-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0;
  }

  body.light-mode .form-overlay-close {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(217, 119, 6, 0.18);
    color: #1f2937;
  }

  body.light-mode .form-overlay-close:hover {
    background: rgba(255, 250, 245, 1);
    border-color: rgba(217, 119, 6, 0.28);
  }

  .form-overlay-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
  }

  /* extra bottom padding for feed on mobile + nav */
  .app-container { padding-bottom: 160px; }
  
  .site-footer {
    margin-bottom: 20px;
    padding-bottom: 40px;
  }
}

/* Prevent FAB overlapping card actions: lift FAB and add card bottom spacing on small screens */
@media (max-width: 768px) {
  .fab {
    bottom: calc(70px + 28px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 12px 30px rgba(14,165,233,0.32) !important;
  }

  .vent-card {
    margin-bottom: 18px !important;
  }
}
@media (min-width: 769px) { .form-overlay { display: none; } }

@media (max-width: 480px) {
  .mobile-header {
    align-items: center;
    padding: 10px 12px 8px;
    min-width: 0;
  }

  .mobile-header .mobile-logo {
    font-size: 1.15rem;
    min-width: 0;
    flex-shrink: 1;
  }

  .mobile-header .mobile-search {
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-header .mobile-search input {
    min-width: 0;
    font-size: 0.92rem;
  }

  .mobile-header button,
  .mobile-header .mobile-theme-btn {
    width: 38px !important;
    height: 38px !important;
  }

  .app-container {
    padding: 12px 10px 100px;
    gap: 16px;
  }

  .main-content {
    gap: 14px;
  }

  .feed {
    gap: 14px;
  }

  .sort-tabs {
    gap: 6px;
    padding: 2px 0;
    overflow: hidden;
    scrollbar-width: none;
  }
  .sort-tabs::-webkit-scrollbar { display: none; }

  .sort-tab {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .vent-card {
    padding: 12px 12px;
    margin: 0 0 16px 0;
    background: linear-gradient(160deg, rgba(12,19,36,0.9) 0%, rgba(10,16,30,0.85) 55%, rgba(8,12,24,0.92) 100%) !important;
    border: 1px solid rgba(125, 211, 252, 0.08) !important;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35), inset 0 1px 0 rgba(255,255,255,0.02) !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .vent-card.mood-general,
  .vent-card.mood-sad,
  .vent-card.mood-angry,
  .vent-card.mood-happy,
  .vent-card.mood-anxious,
  .vent-card.mood-burnout,
  .vent-card.mood-toxic_boss,
  .vent-card.mood-imposter,
  .vent-card.mood-office_politics,
  .vent-card.mood-monday_blues {
    background: linear-gradient(160deg, rgba(12,19,36,0.9) 0%, rgba(10,16,30,0.85) 55%, rgba(8,12,24,0.92) 100%) !important;
    border: 1px solid rgba(125, 211, 252, 0.08) !important;
  }

  body.light-mode .vent-card {
    background: rgba(255, 250, 245, 0.9) !important;
    border-color: rgba(217, 119, 6, 0.1) !important;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.08), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  }

  body.light-mode .vent-card.mood-general,
  body.light-mode .vent-card.mood-sad,
  body.light-mode .vent-card.mood-angry,
  body.light-mode .vent-card.mood-happy,
  body.light-mode .vent-card.mood-anxious,
  body.light-mode .vent-card.mood-burnout,
  body.light-mode .vent-card.mood-toxic_boss,
  body.light-mode .vent-card.mood-imposter,
  body.light-mode .vent-card.mood-office_politics,
  body.light-mode .vent-card.mood-monday_blues {
    background: rgba(255, 250, 245, 0.9) !important;
    border-color: rgba(217, 119, 6, 0.1) !important;
  }

  body.light-mode .vent-message {
    color: #2a1f18 !important;
  }

  body.light-mode .vent-time,
  body.light-mode .vent-mood,
  body.light-mode .vent-location {
    color: #8b7765 !important;
  }

  .vent-card-header {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }
  .vent-card-header-left {
    min-width: 0;
    width: 100%;
  }
  .vent-time {
    width: 100%;
    text-align: left;
    font-size: 0.75rem;
  }

  .vent-card-header-left {
    gap: 4px;
  }
  .vent-actions {
    justify-content: flex-start;
  }

  .sort-tabs { padding-left: 8px; padding-right: 8px; }

  /* Ensure bottom navigation sits above content and is visible */
  .bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    display: flex;
    z-index: 1200;
    background: var(--bg-end);
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  .vent-mood {
    font-size: 0.85rem;
    gap: 6px;
  }
  .vent-mood .mood-emoji {
    font-size: 1.1rem;
  }

  .vent-message {
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
    word-spacing: 0.05em;
  }
  .ai-tags {
    gap: 6px;
    margin-bottom: 10px;
  }
  .ai-tag-chip {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .vent-location {
    font-size: 0.73rem;
    gap: 4px;
  }

  .vent-stats {
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
  }
  .stat-pill {
  }

    font-size: 0.78rem;
    padding: 4px 9px;
  }

  .vent-actions {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    align-items: center;
    overflow-y: hidden;
    padding: 8px 4px;
    margin: 0;
    width: 100%;
    scrollbar-width: none;
  }
  .vent-actions::-webkit-scrollbar { display: none; }
  .vent-actions button {
    min-width: 46px;
    flex: 0 0 auto;
    max-width: none;
    min-height: 46px;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .vent-actions button i,
  .vent-actions button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  .vent-actions .action-count {
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: 2px;
  }
  .delete-btn {
    position: relative;
  }

  .vent-form {
    gap: 16px;
    padding: 18px 16px;
    background: linear-gradient(135deg, rgba(30,41,59,0.8), rgba(15,23,42,0.9));
    border: 1px solid rgba(56,189,248,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(56,189,248,0.12);
  }
  .vent-form textarea {
    font-size: 1rem;
    min-height: 120px;
    padding: 14px;
    border-radius: 14px;
    line-height: 1.6;
    border: 1px solid rgba(56,189,248,0.1);
    background: rgba(255,255,255,0.03);
    transition: all 0.2s;
  }
  .vent-form textarea:focus {
    background: rgba(56,189,248,0.08);
    border-color: rgba(56,189,248,0.3);
    box-shadow: 0 0 16px rgba(56,189,248,0.15);
  }
  .vent-form .char-counter {
    font-size: 0.75rem;
    padding: 0 4px;
    text-align: right;
    color: var(--text-secondary);
  }
  .vent-form .mood-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .vent-form .mood-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(56,189,248,0.1);
    transition: all 0.2s;
    flex: 0 1 calc(50% - 4px);
  }
  .vent-form .mood-btn:hover {
    background: rgba(56,189,248,0.12);
    border-color: rgba(56,189,248,0.3);
  }
  .vent-form .mood-btn.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    font-weight: 600;
  }
  .vent-form .color-swatches {
    display: none !important;
  }
  .vent-form .swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
  }
  .vent-form .swatch:hover {
    transform: scale(1.15);
  }
  .vent-form .swatch.active {
    border-color: white;
  }
  .reply-item {
    padding: 12px !important;
    padding-right: 12px !important;
    position: relative !important;
    margin-bottom: 8px !important;
  }
  .reply-item[data-level="0"] {
    background: none !important;
    border-left: none !important;
  }
  .reply-item > div:last-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .collapse-toggle {
    padding: 3px 6px !important;
    font-size: 0.7rem !important;
    width: 100%;
    text-align: left;
  }
  .reply-actions-inline {
    width: 100% !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .reply-to-btn {
    width: 100% !important;
    padding: 6px 8px !important;
  }
  .reply-delete {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
  }
  .reply-delete-btn {
    align-self: stretch;
    width: 100%;
  }
  .vent-form .lifespan-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
  }
  .vent-form .lifespan-toggle label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .vent-form .lifespan-pill {
    padding: 10px 12px;
    font-size: 0.88rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(56,189,248,0.1);
    transition: all 0.2s;
    cursor: pointer;
    flex: 1;
    min-width: 85px;
    text-align: center;
    font-weight: 500;
  }
  .vent-form .lifespan-pill:hover {
    background: rgba(56,189,248,0.12);
    border-color: rgba(56,189,248,0.2);
  }
  .vent-form .lifespan-pill.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(56,189,248,0.3);
  }
  .vent-form .btn-submit {
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    border: none;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(56,189,248,0.3);
  }
  .vent-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56,189,248,0.4);
  }
  .vent-form .btn-submit:active {
    transform: translateY(0);
  }

  .footer-links {
    justify-content: center;
    align-items: center;
  }

  .load-more-wrapper {
    padding: 14px 0;
  }
}

@media (max-width: 360px) {
  .app-container {
    padding: 10px 8px 98px;
    gap: 14px;
  }

  .mobile-header {
    padding: 9px 10px 8px;
    gap: 8px;
  }

  .mobile-header .mobile-logo {
    font-size: 1.02rem;
  }

  .mobile-header .mobile-search {
    padding: 7px 9px;
    gap: 6px;
    min-width: 0;
  }

  .sort-tab {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .vent-card {
    padding: 12px;
  }

  .vent-message {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .bottom-nav {
    height: 74px !important;
    justify-content: space-between !important;
  }

  .nav-item {
    padding: 6px 2px !important;
    min-width: 0 !important;
  }

  .fab {
    width: 52px !important;
    height: 52px !important;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 360px) {
  .vent-form .mood-btn,
  .vent-form .lifespan-pill {
    flex: 1 1 100%;
  }
  .footer-support-btn {
    font-size: 0.78rem;
    padding: 8px 10px;
  }
}

/* Floating About Box – now a normal sidebar in the grid, hidden on mobile */
.floating-about {
  background: linear-gradient(180deg, rgba(15,23,42,0.82), rgba(15,23,42,0.68));
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 84px;
  align-self: start;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}
body:not(.light-mode) .floating-about {
  background: linear-gradient(180deg, rgba(9,14,26,0.94), rgba(7,11,22,0.88));
  border-color: rgba(125, 211, 252, 0.15);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
body:not(.light-mode) .floating-about p,
body:not(.light-mode) .floating-about ul li {
  color: #c6d5ee;
}
body.light-mode .floating-about {
  background: linear-gradient(180deg, rgba(255,250,245,0.96), rgba(255,247,240,0.86)) !important;
  border-color: rgba(217,119,6,0.15) !important;
  box-shadow: 0 12px 26px rgba(217,119,6,0.08) !important;
}
.floating-about h4 { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 0.95rem; margin-bottom: 8px; font-weight: 700; }
body.light-mode .floating-about h4 { color: #d97706 !important; }
.floating-about h4 i { width: 14px; height: 14px; }
.floating-about p { color: #cbd5e1; font-size: 0.78rem; line-height: 1.5; margin-bottom: 6px; }
body.light-mode .floating-about p { color: #5a4f44 !important; }
.floating-about ul { list-style: none; padding: 0; margin: 0; }
.floating-about ul li { padding: 3px 0 3px 16px; font-size: 0.75rem; color: #e2e8f0; position: relative; margin-bottom: 2px; }
body.light-mode .floating-about ul li { color: #5a4f44 !important; }
.floating-about ul li::before { content: "•"; position: absolute; left: 6px; color: var(--accent); font-weight: bold; font-size: 0.75rem; }
.floating-about .critical-support-fab {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  margin-top: 4px;
  justify-content: center;
}
.floating-about p strong { font-weight: 700; }
.floating-about a { color: var(--accent); font-weight: 600; text-decoration: none; transition: all var(--transition); }
.floating-about a:hover { text-decoration: underline; }
body.light-mode .floating-about a { color: #d97706 !important; }
body.light-mode .floating-about ul li::before { color: #d97706; }

/* Compact legal pages */
.legal-page {
  max-width: 920px;
  margin: 0 auto;
  padding-top: 28px;
  padding-bottom: 28px;
}
.legal-shell {
  padding: clamp(18px, 3vw, 30px);
  margin-top: 8px;
}
.legal-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.legal-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}
.legal-hero h1 {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.legal-intro {
  max-width: 62ch;
  color: var(--text-secondary);
}
.legal-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.legal-card {
  padding: 16px 17px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(56,189,248,0.12);
  color: var(--text-primary);
  line-height: 1.55;
}
body.light-mode .legal-card {
  background: rgba(255,250,245,0.88);
  border-color: rgba(124, 111, 98, 0.16);
  color: #1a1410;
}
.legal-section-title {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 1.02rem;
  font-weight: 800;
}
.legal-back-link {
  color: var(--accent);
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 768px) {
  .daily-prompt,
  .trending-topics,
  .floating-about {
    display: none !important;
  }

  .sort-tabs {
    padding-top: 0;
    gap: 6px;
  }

  .sort-tab {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .vent-card {
    background: linear-gradient(160deg, rgba(13,20,38,0.94) 0%, rgba(10,16,30,0.9) 55%, rgba(8,12,24,0.96) 100%) !important;
    border: 1px solid rgba(125, 211, 252, 0.10) !important;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255,255,255,0.03) !important;
  }

  .vent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vent-actions button {
    width: 100%;
    justify-content: center;
  }

  .header-inner,
  .mobile-header,
  .app-container,
  .legal-page {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 480px) {
  .app-container { padding: 12px 10px 104px; }
  .main-content { gap: 12px; }
  .feed { gap: 12px; }
  .vent-card { padding: 14px 14px; }
  .vent-card-header { margin-bottom: 10px; }
  .vent-message { font-size: 0.98rem; line-height: 1.68; }
  .ai-tags { gap: 6px; }
  .ai-tag-chip { font-size: 0.68rem; padding: 4px 8px; }
  .reply-item { padding: 12px !important; }
  .reply-footer { flex-direction: column; align-items: flex-start; }
  .reply-delete-btn { width: 100%; }
  .vent-actions {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    width: 100%;
  }
  .vent-actions button {
    min-width: 0;
    width: 100%;
    flex: none;
    padding: 8px 0;
    min-height: 44px;
    border-radius: 12px;
  }
  .vent-actions button i,
  .vent-actions button svg {
    width: 16px;
    height: 16px;
  }
  .vent-actions .action-count {
    display: none;
  }
  .legal-shell { padding: 16px; }
  .legal-hero h1 { font-size: 1.8rem; }
}

body.light-mode .header-logo h1,
body.light-mode .mobile-header .mobile-logo {
  color: #d97706 !important;
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  text-shadow: none !important;
}
body.light-mode .mobile-theme-btn,
body.light-mode #mobileThemeSwitcher {
  color: #b45309 !important;
}
body.light-mode .header-search .search-input,
body.light-mode .mobile-header .mobile-search {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(217,119,6,0.16) !important;
  box-shadow: 0 8px 18px rgba(217,119,6,0.06);
}

body.light-mode .fab {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  border-color: rgba(180, 83, 9, 0.32) !important;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35) !important;
}

body.light-mode .fab:hover {
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.42) !important;
}

/* Alert inbox / notification cards */
.alert-modal .swal2-title {
  margin-bottom: 12px !important;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
}
.alert-modal .swal2-html-container {
  margin: 0 !important;
  display: block !important;
  text-align: left !important;
  max-height: min(65vh, 600px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.alert-modal .swal2-html-container::-webkit-scrollbar-thumb {
    right: 8px;
  border-radius: 4px;
}
.alert-modal .swal2-html-container::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}
.alert-modal .swal2-popup {
  max-width: 95vw !important;
  width: 100% !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
}
@media (min-width: 480px) {
  .alert-modal .swal2-popup {
    max-width: 500px !important;
    width: 90vw !important;
  }
}
@media (min-width: 768px) {
  .alert-modal .swal2-popup {
    max-width: 560px !important;
    width: min(92vw, 560px) !important;
  }
  .alert-modal .swal2-html-container {
    max-height: min(60vh, 500px) !important;
  }
}
.alert-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.alert-empty {
  text-align: center !important;
  color: var(--text-secondary) !important;
  padding: 20px !important;
}
.alert-card {
  border-radius: 16px;
  padding: 12px 18px 12px; /* more horizontal breathing room */
  border: 1px solid rgba(56,189,248,0.12);
  background: linear-gradient(180deg, rgba(15,23,42,0.86), rgba(15,23,42,0.62));
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  word-break: break-word;
}
body.light-mode .alert-card {
  background: linear-gradient(180deg, rgba(255,250,245,0.92), rgba(255,245,230,0.85)) !important;
  border-color: rgba(217,119,6,0.15) !important;
  box-shadow: 0 6px 16px rgba(217,119,6,0.08) !important;
}
.alert-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  border-color: rgba(56,189,248,0.22);
}
body.light-mode .alert-card {
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.95), rgba(255, 245, 235, 0.90));
  border: 1px solid rgba(217, 119, 6, 0.2);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.1);
}
body.light-mode .alert-card:hover {
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.3);
}
.alert-unread {
  border-left: 4px solid #38bdf8;
}
.alert-read {
  opacity: 0.88;
}
.alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.alert-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.alert-title {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 0.96rem;
}
body.light-mode .alert-title {
  color: #1a1410 !important;
}
.alert-time {
  color: var(--text-secondary);
  font-size: 0.74rem;
}
body.light-mode .alert-time {
  color: #6b5d50 !important;
}
.alert-pill {
  flex-shrink: 0;
  background: rgba(56,189,248,0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,0.18);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
body.light-mode .alert-pill {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.alert-body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.light-mode .alert-body {
  color: #4a423a !important;
}
.alert-meta {
  color: #94a3b8;
  font-size: 0.76rem;
}
body.light-mode .alert-meta {
  color: #6b5d50 !important;
}
.alert-reply-snippet {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
}
body.light-mode .alert-reply-snippet {
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.15);
  color: #1a1410;
}
.alert-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.alert-open-btn,
.alert-read-btn {
  border: 1px solid rgba(56,189,248,0.18);
  background: rgba(56,189,248,0.10);
  color: #7dd3fc;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.alert-open-btn:hover {
  background: rgba(56,189,248,0.18);
  border-color: rgba(56,189,248,0.3);
}
.alert-read-btn {
  background: rgba(148,163,184,0.10);
  color: var(--text-secondary);
  border-color: rgba(148,163,184,0.18);
}
.alert-read-btn:hover {
  background: rgba(148,163,184,0.18);
  border-color: rgba(148,163,184,0.3);
}
body.light-mode .alert-open-btn {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
body.light-mode .alert-open-btn:hover {
  background: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.4);
}
body.light-mode .alert-read-btn {
  background: rgba(107, 93, 80, 0.12);
  color: #5a4f44;
  border: 1px solid rgba(107, 93, 80, 0.25);
}
body.light-mode .alert-read-btn:hover {
  background: rgba(107, 93, 80, 0.2);
  border-color: rgba(107, 93, 80, 0.4);
}
.alert-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 18px 10px;
}

/* Therapeutic Burn effect */
.therapeutic-burn {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 14px 10px 6px;
}
.burn-modal {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.burn-modal .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}
.burn-title {
  color: #fff !important;
  font-size: clamp(1.35rem, 3vw, 2rem) !important;
  letter-spacing: 0.02em;
  text-shadow: 0 0 22px rgba(255, 174, 66, 0.35);
}
.burn-scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 84%, rgba(251, 146, 60, 0.55), rgba(239, 68, 68, 0.14) 18%, rgba(2, 6, 23, 0.96) 48%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.98));
}
.burn-sky,
.burn-embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.burn-sky {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.10) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 18%, rgba(255,255,255,0.07) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 12%, rgba(255,255,255,0.08) 0 1px, transparent 2px);
  opacity: 0.65;
}
.burn-embers {
  background-image: radial-gradient(circle, rgba(255, 209, 102, 0.95) 0 1px, transparent 2px);
  background-size: 26px 26px;
  opacity: 0.28;
  animation: emberDrift 6.4s linear infinite;
}
  .burn-core {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 24px));
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 28px 22px 30px;
  text-align: center;
}
.burn-flame-hero {
  width: min(260px, 48vw);
  height: min(260px, 48vw);
  filter: drop-shadow(0 0 28px rgba(251, 146, 60, 0.42)) drop-shadow(0 0 64px rgba(239, 68, 68, 0.28));
  transform-origin: center bottom;
}
.burn-copy {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 248, 230, 0.88);
  font-size: 0.95rem;
  line-height: 1.7;
}
.burn-copy-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  color: #081126;
  background: linear-gradient(135deg, #fbbf24, #fb923c 48%, #ef4444);
  box-shadow: 0 10px 26px rgba(251, 146, 60, 0.22), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.burn-copy-btn:hover {
  transform: translateY(-1px);
}
.privacy-modal {
  width: min(560px, calc(100% - 24px)) !important;
  max-width: 560px !important;
  border-radius: 22px !important;
  padding: 14px !important;
}
.privacy-modal-title {
  color: var(--text-primary) !important;
  font-size: clamp(1.2rem, 3vw, 1.6rem) !important;
}
.privacy-modal-html {
  margin: 0 !important;
  padding: 0 !important;
}
.privacy-save-modal {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 8px 6px 2px;
  text-align: center;
}
.privacy-save-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(29,161,242,0.16), rgba(29,161,242,0.08));
  border: 1px solid rgba(29,161,242,0.18);
  color: #7dd3fc;
}
.privacy-save-badge i,
.privacy-save-badge svg {
  width: 24px;
  height: 24px;
}
.privacy-save-title {
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.privacy-save-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.96rem;
  max-width: 42ch;
}
.privacy-save-btn {
  border: 1px solid rgba(29,161,242,0.2);
  background: linear-gradient(135deg, rgba(29,161,242,0.16), rgba(29,161,242,0.08));
  color: #7dd3fc;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  max-width: 260px;
}
.privacy-save-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.swal2-popup.privacy-modal .swal2-actions {
  margin-top: 8px;
}
.swal2-popup.privacy-modal .swal2-styled.swal2-confirm {
  border-radius: 12px;
  padding: 10px 18px;
}
@keyframes emberDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-40px, -70px, 0); }
}

/* Just Vent & Destroy full-screen fire sequence */
body.burning-lock {
  overflow: hidden !important;
}
.fire-storm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
.fire-storm-overlay.fade-out {
  animation: fireStormFade 1s ease forwards;
}
.fire-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 100%, rgba(239, 68, 68, 0.5) 0%, rgba(251,146,60,0.38) 28%, rgba(2,6,23,0.96) 72%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.98));
}
.fire-wave {
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -8%;
  border-radius: 50% 50% 0 0;
  filter: blur(1px);
}
.fire-wave-1 {
  height: 40vh;
  background: radial-gradient(ellipse at 50% 85%, rgba(251,146,60,0.9), rgba(239,68,68,0.55) 50%, rgba(239,68,68,0.05) 78%);
  animation: fireRise 2.6s ease-in-out infinite;
}
.fire-wave-2 {
  height: 54vh;
  background: radial-gradient(ellipse at 50% 88%, rgba(255,209,102,0.7), rgba(251,146,60,0.45) 46%, rgba(239,68,68,0.03) 75%);
  animation: fireRise 3.2s ease-in-out infinite reverse;
}
.fire-wave-3 {
  height: 65vh;
  background: radial-gradient(ellipse at 50% 90%, rgba(255,244,214,0.38), rgba(251,146,60,0.22) 44%, rgba(239,68,68,0) 74%);
  animation: fireRise 3.8s ease-in-out infinite;
}
.fire-center-glow {
  position: absolute;
  width: min(60vw, 420px);
  height: min(60vw, 420px);
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,245,213,0.5) 0%, rgba(251,146,60,0.24) 36%, rgba(239,68,68,0) 70%);
  filter: blur(8px);
}
.fire-emoji-layer {
  position: absolute;
  inset: 0;
}
.fire-emoji {
  position: absolute;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.8);
  animation-name: fireEmojiFloat;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
.fire-burn-copy {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  color: #fff2d1;
  font-size: clamp(1rem, 3.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 0 22px rgba(251,146,60,0.58);
}
@keyframes fireEmojiFloat {
  0% { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.7) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -74vh, 0) scale(1.28) rotate(20deg); }
}
@keyframes fireRise {
  0%, 100% { transform: scaleX(1) translateY(0); }
  50% { transform: scaleX(1.08) translateY(-2.5vh); }
}
@keyframes fireStormFade {
  from { opacity: 1; }
  to { opacity: 0; }
}
.burn-flame {
  width: 72px;
  height: 72px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 50% 32%, #fff7cc 0%, #ffd166 24%, #fb923c 48%, #ef4444 72%, rgba(239,68,68,0.08) 100%);
  box-shadow: 0 0 28px rgba(251, 146, 60, 0.45), 0 0 50px rgba(239, 68, 68, 0.25);
  animation: burnPulse 1.1s ease-in-out infinite, burnFloat 1.8s ease-in-out infinite;
  position: relative;
}
.burn-flame::before,
.burn-flame::after {
  content: '';
  position: absolute;
  inset: 14px 18px 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  filter: blur(4px);
}
.burn-flame::after {
  inset: 24px 28px 26px;
  background: rgba(255,255,255,0.22);
}
.burn-caption {
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.02em;
}
@keyframes burnPulse {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(2deg); }
}
@keyframes burnFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

/* Replies section styling and alignment (improved) */
.replies-section { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 12px; }
.replies-section h3 { margin-bottom: 16px !important; font-size: 1.05rem; color: var(--text-primary); font-weight: 700; letter-spacing: 0.01em; }
.replies-section #repliesContainer { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.replies-section .reply-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 16px 15px;
  background: linear-gradient(135deg, rgba(20,28,45,0.65), rgba(15,23,42,0.5));
  border: 1px solid rgba(56,189,248,0.08);
  border-radius: 16px;
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}
.replies-section .reply-thread-row {
  display: contents;
}
.replies-section .reply-avatar {
  grid-column: 1;
  grid-row: 1 / span 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56,189,248,0.24), rgba(14,165,233,0.4));
  border: 1px solid rgba(125,211,252,0.28);
  color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(2,132,199,0.12);
}
.replies-section .reply-body {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.replies-section .reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.replies-section .reply-item[data-level] {
  width: 100%;
  max-width: 100%;
}
.replies-section .reply-item:hover {
  border-color: rgba(56,189,248,0.15);
  box-shadow: 0 6px 24px rgba(56,189,248,0.1), inset 0 1px 0 rgba(255,255,255,0.02);
  transform: none;
}
.replies-section .reply-alias {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--accent);
  white-space: normal;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.replies-section .reply-alias-name { min-width: 0; overflow-wrap: anywhere; }
.replies-section .reply-alias,
.replies-section .reply-time,
.replies-section .reply-text,
.replies-section .reply-footer,
.replies-section .reply-children,
.replies-section .reply-parent-label {
  grid-column: 2;
}
.replies-section .reply-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.replies-section .reply-text {
  margin-top: 0;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.7;
  font-size: 0.97rem;
  min-width: 0;
}
.replies-section .reply-footer {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.replies-section .reply-footer-actions,
.replies-section .reply-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.replies-section .reply-children {
  margin-top: 12px;
  margin-left: 10px;
  padding-left: 12px;
  grid-column: 2;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.replies-section .reply-item[data-level="1"] {
  border-left: none;
  background: linear-gradient(135deg, rgba(14,23,39,0.72), rgba(12,18,32,0.56));
}
.replies-section .reply-item[data-level="1"] .reply-parent-label {
  margin-top: 0;
}
.replies-section .reply-item[data-level="1"] .reply-avatar {
  width: 32px;
  height: 32px;
}
.replies-section .reply-targeted {
  border-color: rgba(125,211,252,0.55);
  box-shadow: 0 0 0 1px rgba(125,211,252,0.14), 0 10px 24px rgba(2,132,199,0.12);
  background: linear-gradient(135deg, rgba(8,145,178,0.12), rgba(15,23,42,0.62));
}

@media (min-width: 769px) {
  .vent-card {
    padding: 20px 22px;
  }

  .vent-message {
    font-size: 1.15rem;
    line-height: 1.85;
    letter-spacing: 0.015em;
  }

  .replies-section #repliesContainer {
    gap: 16px;
  }

  .replies-section .reply-item {
    padding: 17px 18px 16px;
  }
  .reply-item .reply-to-btn { padding: 5px 12px; font-size: 0.76rem; }
}

@media (max-width: 480px) {
  .replies-section { gap: 14px; margin-top: 10px; }
  .replies-section h3 { font-size: 1rem; margin-bottom: 14px !important; }
  .replies-section #repliesContainer { gap: 16px; }
  .replies-section .reply-item { padding: 12px; width: 100%; min-width: 0; grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  .replies-section .reply-avatar { width: 30px; height: 30px; font-size: 0.75rem; }
  .replies-section .reply-head { gap: 6px; }
  .replies-section .reply-alias { font-size: 0.95rem; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
  .replies-section .reply-time { font-size: 0.73rem; }
  .replies-section .reply-text { margin-top: 8px; font-size: 0.93rem; line-height: 1.55; word-break: break-word; }
  .reply-item .reply-to-btn { margin-left: 0; padding: 4px 8px; font-size: 0.68rem; width: auto; }
  .collapse-toggle { padding: 2px 4px; font-size: 0.84rem; }
  .reply-like-btn { width: auto; font-size: 0.75rem; padding: 5px 8px; }
  .reply-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .reply-footer .reply-time {
    width: 100%;
  }
  .reply-target-preview { font-size: 0.72rem; }
  .reply-delete-btn {
    width: 100%;
    padding: 6px 8px;
  }
  .reply-parent-label { font-size: 0.73rem; padding: 5px 6px; margin-bottom: 6px; }
  .replies-section .reply-item[data-level="1"] { padding-left: 0; }
  .replies-section .reply-children { margin-left: 6px; padding-left: 8px; }
  .reply-threads-actions { gap: 6px; margin-bottom: 10px; }
  .reply-thread-control { width: 100%; justify-content: center; }
  .load-more-wrapper { padding: 16px 0; }
  .daily-prompt { padding: 12px 14px; }
  .daily-prompt-text { font-size: 0.93rem; }
}

/* Final light-mode override to beat mobile breakpoint mood-card backgrounds */
body.light-mode .vent-card.mood-general,
body.light-mode .vent-card.mood-sad,
body.light-mode .vent-card.mood-angry,
body.light-mode .vent-card.mood-happy,
body.light-mode .vent-card.mood-anxious,
body.light-mode .vent-card.mood-burnout,
body.light-mode .vent-card.mood-toxic_boss,
body.light-mode .vent-card.mood-imposter,
body.light-mode .vent-card.mood-office_politics,
body.light-mode .vent-card.mood-monday_blues {
  background: #ffffff !important;
  border: 1px solid rgba(15,20,25,0.06) !important;
  border-left: none !important;
  box-shadow: 0 6px 18px rgba(15, 20, 31, 0.04) !important;
}

/* Tablet readability adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .vent-message {
    font-size: 1.08rem;
    line-height: 1.78;
    letter-spacing: 0.01em;
  }

  .vent-card {
    padding: 16px 18px;
  }
  .vent-actions {
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .vent-actions::-webkit-scrollbar { display: none; }
  .vent-actions button {
    min-height: 42px;
    padding: 7px 9px;
  }
}

@media (max-width: 768px) {
  .floating-about { 
    display: block !important;
    position: static;
    top: auto;
    background: rgba(30,41,59,0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56,189,248,0.1);
    border-radius: 20px;
    padding: 18px 16px;
    margin-top: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(56,189,248,0.08);
  }
  .floating-about h4 { font-size: 0.95rem; margin-bottom: 8px; }
  .floating-about p { font-size: 0.8rem; margin-bottom: 10px; }
  .floating-about ul li { padding: 4px 0 4px 18px; font-size: 0.78rem; }
}

@media (min-width: 769px) {
  .load-more-wrapper { display: none !important; }
}

/* Site Footer */
.site-footer {
  background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8; font-size: 0.75rem; text-align: center;
  padding: 20px 1rem 24px; line-height: 1.6;
  width: 100%;
}
body:not(.light-mode) .site-footer {
  background: linear-gradient(180deg, rgba(7, 11, 21, 0.96), rgba(5, 8, 16, 0.98));
  border-top-color: rgba(125, 211, 252, 0.16);
  color: #9fb1ce;
}
body:not(.light-mode) .site-footer a {
  color: #7dd3fc;
}
body:not(.light-mode) .footer-support {
  border-top-color: rgba(125, 211, 252, 0.15);
}
body:not(.light-mode) .footer-support-btn {
  border-color: rgba(125, 211, 252, 0.3);
  background: linear-gradient(135deg, rgba(56,189,248,0.18), rgba(56,189,248,0.08));
  color: #bfe9ff;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.35);
}
body:not(.light-mode) .footer-support-btn:hover {
  background: linear-gradient(135deg, rgba(56,189,248,0.24), rgba(56,189,248,0.12));
}
.site-footer a { color: var(--accent); text-decoration: none; margin: 0 8px; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* Merged Share & Download Menu */
.share-download-menu {
  position: relative;
  display: inline-flex;
}
.share-download-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.share-download-toggle:hover {
  background: rgba(29,161,242,0.12);
  border-color: rgba(29,161,242,0.25);
}
.share-download-toggle i,
.share-download-toggle svg {
  width: 16px;
  height: 16px;
}
.share-download-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 8px;
  z-index: 1000;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
}

.share-download-dropdown.mobile-popup {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  top: auto !important;
  bottom: 76px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  z-index: 5000 !important;
  border-radius: 18px !important;
  padding: 10px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.38) !important;
}
.share-download-dropdown.mobile-popup::after {
  display: none;
}
.share-download-dropdown.mobile-popup .share-option,
.share-download-dropdown.mobile-popup .share-option {
  min-height: 48px;
  padding: 12px 14px;
}

/* Dropdown arrow and fixed positioning variants */
.share-download-dropdown.open-up::after,
.share-download-dropdown.open-down::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--glass-bg);
  transform: rotate(45deg);
  border: 1px solid var(--glass-border);
  z-index: -1;
}
.share-download-dropdown.open-up::after { /* arrow pointing down (dropdown sits above toggle) */
  bottom: -6px;
  right: 12px;
}
.share-download-dropdown.open-down::after { /* arrow pointing up (dropdown sits below toggle) */
  top: -6px;
  right: 12px;
}

/* Mobile icon alignment: keep actions in a single horizontal row (scrollable) */
@media (max-width: 520px) {
  .vent-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
  }
  .vent-actions::-webkit-scrollbar { display: none; }
  .vent-actions button {
    flex: 0 0 auto !important;
    min-width: 48px !important;
    height: 44px !important;
    padding: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }
  .share-download-menu { margin-left: 6px; }
}
.share-option,
.share-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: left;
  font-weight: 500;
}
.share-option:hover,
.share-option:hover {
  background: rgba(29,161,242,0.12);
  color: var(--accent);
}
.share-option i,
.share-option svg,
.share-option svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

body.light-mode .share-download-toggle {
  background: rgba(255,255,255,0.05);
  border-color: rgba(207,217,232,0.25);
}
body.light-mode .share-download-toggle:hover {
  background: rgba(29,161,242,0.1);
  border-color: rgba(29,161,242,0.2);
}
body.light-mode .share-download-dropdown {
  background: rgba(255,255,255,0.95);
  border-color: rgba(207,217,232,0.3);
  box-shadow: 0 8px 24px rgba(15,20,31,0.1);
}
body.light-mode .share-option:hover,
body.light-mode .share-option:hover {
  background: rgba(14,165,233,0.1);
}

@media (max-width: 768px) {
  .share-download-dropdown {
    display: none !important;
  }
  .share-download-dropdown.mobile-popup {
    display: flex !important;
  }
}
.footer-support {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-support-btn {
  appearance: none;
  border: 1px solid rgba(239,68,68,0.22);
  background: linear-gradient(135deg, rgba(239,68,68,0.16), rgba(239,68,68,0.08));
  color: #fca5a5;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 18px rgba(239,68,68,0.08);
}
.footer-support-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(239,68,68,0.12));
  box-shadow: 0 10px 22px rgba(239,68,68,0.12);
}
@media (max-width: 768px) {
  .site-footer { padding: 20px 1rem 140px; font-size: 0.7rem; margin-bottom: 20px; }
  .footer-links { gap: 10px; margin-top: 10px; }
  .footer-support { margin-top: 10px; padding-top: 10px; padding-inline: 0; }
  .footer-support-btn { width: 100%; max-width: none; }
  .site-footer p { margin-bottom: 10px; }
}

/* Support Button – moved to footer */
.support-btn {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #0f172a; border: none;
  padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; z-index: 1;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3); transition: transform 0.2s, box-shadow 0.2s;
}
.support-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(245,158,11,0.4); }
@media (max-width: 768px) {
  .support-btn { padding: 6px 12px; font-size: 0.85rem; }
}

.critical-support-fab {
  position: fixed;
  right: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  border: 1px solid rgba(239,68,68,0.35);
  background: linear-gradient(135deg, rgba(239,68,68,0.88), rgba(220,38,38,0.88));
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(239,68,68,0.28);
  cursor: pointer;
}
.critical-support-fab:hover { transform: translateY(-1px); }
@media (min-width: 769px) {
  .critical-support-fab { bottom: 22px; right: 22px; font-size: 0.82rem; }
}

/* SweetAlert2 */
.swal2-popup.glass-panel { background: rgba(15,23,42,0.8) !important; backdrop-filter: blur(20px) !important; border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 20px !important; color: var(--text-primary) !important; }
.swal2-title { color: var(--text-primary) !important; }
.swal2-html-container { color: var(--text-secondary) !important; }
.swal2-confirm { background: var(--accent) !important; color: #0f172a !important; font-weight: 600 !important; border-radius: 12px !important; }
.swal2-cancel { background: rgba(255,255,255,0.1) !important; color: var(--text-primary) !important; border-radius: 12px !important; }
.swal2-container { z-index: 12000 !important; }
.toast-notification { z-index: 12001 !important; }

/* Activity modal - mobile adjustments for button alignment */
@media (max-width: 520px) {
  .swal2-popup.account-modal {
    width: calc(100% - 14px) !important;
    max-width: calc(100% - 14px) !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .account-shell {
    gap: 10px !important;
  }

  .account-shell .tab-pill {
    padding: 8px 10px !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
  }

  .account-scroll {
    max-height: 42vh !important;
  }

  .activity-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  .activity-item > div:last-child {
    width: 100% !important;
    margin-left: 0 !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .activity-item .open-activity-link,
  .activity-item .delete-activity-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }
}

/* Premium toast visuals */
.swal2-popup.toast-notification { 
    padding: 12px !important; 
    border-radius: 14px !important;
    min-width: 300px !important;
    max-width: 500px !important;
}
.swal2-popup.toast-notification .premium-toast { 
    display: grid; 
    grid-template-columns: 44px minmax(0,1fr) auto; 
    gap: 12px; 
    align-items: flex-start; 
    min-width: 280px; 
    max-width: 460px; 
}
.swal2-popup.toast-notification .premium-left { 
    width: 44px; 
    height: 44px; 
    flex-shrink: 0; 
    border-radius: 14px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: linear-gradient(135deg,var(--accent),#60a5fa); 
    box-shadow: 0 8px 20px rgba(8,30,63,0.35); 
}
.swal2-popup.toast-notification .premium-left i { 
    color: #081126; 
    width: 20px; 
    height: 20px; 
}
.swal2-popup.toast-notification .premium-body { 
    min-width: 0; 
    flex: 1;
}
.swal2-popup.toast-notification .premium-title {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.swal2-popup.toast-notification .premium-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.swal2-popup.toast-notification .premium-action,
.swal2-popup.toast-notification .premium-close { margin-left:8px; flex-shrink:0; }
.swal2-popup.toast-notification .premium-action a,
.swal2-popup.toast-notification .premium-close { display:inline-flex; align-items:center; justify-content:center; min-width:68px; height:34px; padding:0 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.08); color:var(--text-primary); font-weight:800; text-decoration:none; }
.swal2-popup.toast-notification .premium-action a { background:linear-gradient(90deg,#0ea5e9,#38bdf8); color:#021124; border-color:transparent; box-shadow:0 6px 14px rgba(56,189,248,0.12); }
body.light-mode .swal2-popup.toast-notification { background: rgba(255,250,245,0.98) !important; }
body.light-mode .swal2-popup.toast-notification .premium-title,
body.light-mode .swal2-popup.toast-notification .premium-sub { color:#1a1410 !important; }

@media (max-width: 520px) {
  .swal2-popup.toast-notification { 
    padding: 10px !important; 
    min-width: 280px !important;
    max-width: 90vw !important;
    margin: 10px auto !important;
    border-radius: 12px !important;
  }
  .swal2-popup.toast-notification .premium-toast { 
    max-width: 100%; 
    grid-template-columns: 38px minmax(0,1fr) auto; 
    gap: 10px;
    min-width: auto;
  }
  .swal2-popup.toast-notification .premium-left { 
    width: 38px; 
    height: 38px; 
    border-radius: 12px;
    flex-shrink: 0;
  }
  .swal2-popup.toast-notification .premium-left i {
    width: 18px;
    height: 18px;
  }
  .swal2-popup.toast-notification .premium-title { 
    font-size: 0.92rem;
    font-weight: 700;
  }
  .swal2-popup.toast-notification .premium-sub {
    font-size: 0.78rem;
  }
  .swal2-popup.toast-notification .premium-action {
    margin-left: 4px;
  }
  .swal2-popup.toast-notification .premium-action a {
    min-width: 60px;
    height: 30px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .swal2-container { z-index: 12000 !important; }
  .swal2-popup { 
    width: 85vw !important; 
    max-width: 85% !important; 
    margin: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
}

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes badge-pop { 0% { transform: scale(0.92); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Final UI consistency overrides */
@media (min-width: 769px) {
  .header-inner,
  .app-container {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }

  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 480px) {
  .mobile-header {
    padding: 10px 12px 8px !important;
    gap: 8px !important;
    align-items: center;
  }

  .mobile-header .mobile-logo {
    font-size: 1.05rem !important;
    flex: 0 0 auto;
  }

  .mobile-header .mobile-search {
    padding: 8px 10px !important;
    gap: 6px;
  }

  .vent-card .vent-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px !important;
    overflow: visible !important;
  }

  .vent-card .vent-actions button,
  .vent-card .vent-actions .hug-btn,
  .vent-card .vent-actions .reply-btn,
  .vent-card .vent-actions .share-btn,
  .vent-card .vent-actions .bookmark-btn,
  .vent-card .vent-actions .delete-btn,
  .vent-card .vent-actions .report-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 7px 0;
    border-radius: 10px;
    justify-content: center;
  }

  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 16px !important;
    height: 16px !important;
  }

  .vent-card .vent-actions .action-count {
    display: none;
  }

  .vent-card .vent-actions .hug-btn .action-count,
  .vent-card .vent-actions .reply-btn .action-count {
    display: inline-block;
  }
}

@media (max-width: 360px) {
  .mobile-header {
    padding: 9px 10px 8px !important;
  }

  .mobile-header .mobile-logo {
    font-size: 1rem !important;
  }

  .vent-card .vent-actions {
    gap: 5px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vent-card .vent-actions button {
    min-height: 36px;
    padding: 6px 0;
    border-radius: 9px;
  }

  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 15px !important;
    height: 15px !important;
  }
}

body.light-mode .header-logo h1,
body.light-mode .mobile-header .mobile-logo {
  color: #0f172a !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: none !important;
}

body.light-mode .vent-card,
body.light-mode .vent-card.mood-general,
body.light-mode .vent-card.mood-sad,
body.light-mode .vent-card.mood-angry,
body.light-mode .vent-card.mood-happy,
body.light-mode .vent-card.mood-anxious,
body.light-mode .vent-card.mood-burnout,
body.light-mode .vent-card.mood-toxic_boss,
body.light-mode .vent-card.mood-imposter,
body.light-mode .vent-card.mood-office_politics,
body.light-mode .vent-card.mood-monday_blues {
  border-left-color: #0ea5e9 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

body.light-mode .vent-card .action-count,
body.light-mode .ai-tag-chip,
body.light-mode .hashtag {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.16) !important;
  color: #0369a1 !important;
}

.vent-card .vent-actions button,
.vent-card .vent-actions button:hover,
.hug-btn.hugged,
.hug-btn.hugged:hover {
  box-shadow: none !important;
}

.hug-btn.hugged i,
.hug-btn.hugged svg {
  filter: none !important;
}

body:not(.light-mode) .vent-form {
  background: linear-gradient(180deg, rgba(9, 14, 25, 0.98), rgba(7, 11, 20, 0.96)) !important;
  border: 1px solid rgba(125, 211, 252, 0.12) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

body:not(.light-mode) .vent-form textarea,
body:not(.light-mode) .vent-form input[type="text"] {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(125, 211, 252, 0.12) !important;
  color: #f0f5fa !important;
}

body:not(.light-mode) .vent-form textarea:focus,
body:not(.light-mode) .vent-form input[type="text"]:focus {
  background: rgba(56, 189, 248, 0.06) !important;
  border-color: rgba(56, 189, 248, 0.32) !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12) !important;
}

body:not(.light-mode) .vent-card,
body:not(.light-mode) .vent-card.mood-general,
body:not(.light-mode) .vent-card.mood-sad,
body:not(.light-mode) .vent-card.mood-angry,
body:not(.light-mode) .vent-card.mood-happy,
body:not(.light-mode) .vent-card.mood-anxious,
body:not(.light-mode) .vent-card.mood-burnout,
body:not(.light-mode) .vent-card.mood-toxic_boss,
body:not(.light-mode) .vent-card.mood-imposter,
body:not(.light-mode) .vent-card.mood-office_politics,
body:not(.light-mode) .vent-card.mood-monday_blues {
  background: linear-gradient(180deg, rgba(13, 19, 34, 0.98), rgba(9, 14, 25, 0.95)) !important;
  border: 1px solid rgba(125, 211, 252, 0.10) !important;
  border-left: none !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

body.light-mode .vent-card,
body.light-mode .vent-card.mood-general,
body.light-mode .vent-card.mood-sad,
body.light-mode .vent-card.mood-angry,
body.light-mode .vent-card.mood-happy,
body.light-mode .vent-card.mood-anxious,
body.light-mode .vent-card.mood-burnout,
body.light-mode .vent-card.mood-toxic_boss,
body.light-mode .vent-card.mood-imposter,
body.light-mode .vent-card.mood-office_politics,
body.light-mode .vent-card.mood-monday_blues {
  border-left: none !important;
}

body:not(.light-mode) .vent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(56,189,248,0.08) !important;
}

body:not(.light-mode) .vent-card .vent-card-header {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

body:not(.light-mode) .vent-card .vent-message {
  color: #eef6ff;
  line-height: 1.72;
  font-size: 1.02rem;
}

body:not(.light-mode) .vent-card .vent-mood,
body:not(.light-mode) .vent-card .vent-time,
body:not(.light-mode) .vent-card .vent-location {
  color: #9fb4d1;
}

body:not(.light-mode) .vent-card .vent-actions {
  gap: 8px;
}

body:not(.light-mode) .vent-card .vent-actions button,
body:not(.light-mode) .vent-card .vent-actions .hug-btn,
body:not(.light-mode) .vent-card .vent-actions .reply-btn,
body:not(.light-mode) .vent-card .vent-actions .share-btn,
body:not(.light-mode) .vent-card .vent-actions .bookmark-btn,
body:not(.light-mode) .vent-card .vent-actions .delete-btn,
body:not(.light-mode) .vent-card .vent-actions .report-btn {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(125, 211, 252, 0.10) !important;
  color: #f0f5fa !important;
}

body:not(.light-mode) .vent-card .vent-actions button:hover {
  background: rgba(56, 189, 248, 0.10) !important;
  border-color: rgba(56, 189, 248, 0.22) !important;
}

body:not(.light-mode) .vent-card .action-count {
  background: rgba(56, 189, 248, 0.10);
  color: #ccecff;
}

body:not(.light-mode) .mood-btn,
body:not(.light-mode) .lifespan-pill {
  background: rgba(255,255,255,0.04);
  border-color: rgba(125, 211, 252, 0.08);
}

body:not(.light-mode) .mood-btn.active,
body:not(.light-mode) .lifespan-pill.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.36);
  color: #dff7ff;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.08);
}

body:not(.light-mode) .btn-load {
  background: rgba(255,255,255,0.04);
  border-color: rgba(125, 211, 252, 0.10);
  color: #f0f5fa;
}

body:not(.light-mode) .btn-submit {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
  color: #021124 !important;
  border: none !important;
  box-shadow: 0 8px 20px rgba(56,189,248,0.18) !important;
}

body:not(.light-mode) .btn-burn {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(248, 113, 113, 0.16) !important;
  color: #f0f5fa !important;
}

body:not(.light-mode) .btn-burn:hover {
  background: rgba(248, 113, 113, 0.10) !important;
}

/* Final vent card polish: keep date/time on right and improve card finish */
.vent-card {
  border-radius: 18px;
}

.vent-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0));
  pointer-events: none;
}

.vent-card .vent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}

.vent-card .vent-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.vent-card .vent-time {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  width: auto;
  flex: 0 0 auto;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.vent-card .vent-message {
  margin-bottom: 12px;
}

.vent-card .vent-actions {
  padding-top: 10px;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
  margin-top: 8px !important;
  position: relative !important;
  z-index: 2 !important;
}

body.light-mode .vent-card .vent-actions {
  border-top: 1px solid rgba(14, 165, 233, 0.10);
}

/* ==========================================
   MOBILE VIEW RESPOSIVE FIXES (<= 480px)
   ========================================== */
@media (max-width: 480px) {
    /* 1. கார்டுகள் ஸ்க்ரீன் ஓரத்தை இடிக்காமல் இருக்க மார்ஜின் */
    .vent-card {
        margin: 12px 8px !important;
        padding: 14px 12px !important;
        width: calc(100% - 16px) !important;
    }

    /* 2. Keep action buttons in a single fixed horizontal row on mobile */
    .vent-card .vent-actions {
      display: flex !important;
      flex-wrap: nowrap !important;
      gap: 6px !important;
      padding: 10px 4px 0 4px !important;
      margin: 12px 0 0 0 !important;
      justify-content: flex-start !important;
      overflow-x: visible !important;
      -webkit-overflow-scrolling: touch !important;
    }

    /* 3. மொபைல் பட்டன்களின் அளவை சரிசெய்தல் */
    .vent-card .vent-actions button,
    .vent-card .vent-actions .share-download-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 6px 10px !important;
        font-size: 0.85rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
    }

    /* 4. பட்டன் உள்ளே இருக்கும் எண்களின் மார்ஜின் */
    .vent-card .vent-actions button .action-count {
        margin-left: 4px !important;
    }

    /* 5. FAB (+) பட்டன் கன்டென்ட்டை மறைக்காமல் இருக்க ஓரத்திற்கு மாற்றுவது */
    .fab {
      position: fixed !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      bottom: calc(70px + 14px + env(safe-area-inset-bottom, 0px)) !important;
      right: auto !important;
      z-index: 1100 !important;
        box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4) !important;
    }
}

@media (max-width: 360px) {
  .vent-card .vent-actions {
    gap: 4px !important;
  }

  .vent-card .vent-actions button {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    border-radius: 9px !important;
  }

  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 15px !important;
    height: 15px !important;
  }
}

/* --- Overrides: card cleanup, mobile icon row, owner-only delete visibility, vent-updates --- */
.vent-card,
.vent-card.mood-monday_blues {
  /* remove heavy left accent and soften border */
  border-left: none !important;
  border-left-width: 0 !important;
  border-left-style: none !important;
  border-left-color: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12) !important;
}

/* Final responsiveness overrides: keep action rows in one row on small screens */
.vent-actions,
.vent-card .vent-actions,
.vent-card .actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
}
.vent-actions button,
.vent-card .vent-actions button,
.vent-card .actions button {
  flex: 0 0 auto !important;
  min-width: auto !important;
  max-width: none !important;
}

/* Ensure action icons remain in a single row and are touch-friendly */
.vent-card .vent-actions,
.vent-card .actions {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}
.vent-card .vent-actions {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}
.vent-card .vent-actions::-webkit-scrollbar { display: none !important; }

/* Make action buttons compact, centered and touch-friendly */
.vent-card .vent-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}
.reaction-picker {
  position: relative;
  z-index: 50;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
.reaction-popover {
  pointer-events: auto;
}
.vent-card .vent-actions button i,
.vent-card .vent-actions button svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: inherit !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
}
.vent-card .vent-actions button .action-count {
  margin-left: 6px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.hug-btn .reaction-emoji {
  display: none;
  font-size: 1rem;
  line-height: 1;
}
.hug-btn.has-reaction i {
  display: none !important;
}
.hug-btn.has-reaction .reaction-emoji {
  display: inline-flex !important;
}
.reaction-status {
  display: block;
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.reaction-popover {
  display: none;
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(100% + 8px);
  gap: 8px;
  background: rgba(10, 15, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px 12px 10px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: min(100vw - 32px, 320px);
  transform: translateX(-50%);
}
.vent-card.reaction-open .reaction-popover {
  display: flex;
}
.reaction-popover .reaction-option {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.reaction-popover .reaction-option:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
.reaction-popover .reaction-option.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.06);
}

@media (max-width: 480px) {
  .reaction-popover {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    bottom: calc(100% + 8px);
    padding: 8px;
    max-width: calc(100vw - 24px);
  }
  .vent-card.reaction-open .vent-actions {
    overflow-x: visible !important;
  }
}

/* Hide reply delete controls by default; owner JS will reveal them after verification */
.reply-delete-btn, .reply-delete { display: none !important; }

/* Hide vent-update forms everywhere by default. Owner view will explicitly show its form. */
.vent-update-form { display: none !important; }

/* Mobile: ensure action icons wrap and stay visible without horizontal overflow */
@media (max-width: 480px) {
  .vent-card .vent-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    padding: 8px 8px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .vent-card .vent-actions button {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: 44px !important;
    padding: 8px 10px !important;
    white-space: nowrap !important;
  }
  .vent-card .vent-actions .delete-btn,
  .vent-card .vent-actions .report-btn {
    flex: 0 0 auto !important;
    max-width: none !important;
  }
  .vent-card .vent-actions .action-count { margin-left: 4px !important; }
}

/* Clean header: remove divider lines and tighten spacing */
.vent-card .vent-card-header { border-bottom: none !important; padding-bottom: 6px !important; margin-bottom: 8px !important; }
body.light-mode .vent-card .vent-card-header { border-bottom: none !important; }

/* Vent updates (follow-ups) styles */
.vent-updates { margin-top: 12px; display:flex; flex-direction:column; gap:8px; }
.vent-update-item { background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.03); padding:10px 12px; border-radius:10px; font-size:0.95rem; color:var(--text-secondary); }
.vent-update-form { margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.vent-update-form textarea { min-height:60px; resize:vertical; }

/* Visual niceties: reduce harsh inset lines */
.vent-card { inset: 0; }

/* ===== FOOTER STYLING ===== */
.site-footer, footer, [role="contentinfo"] {
  margin-top: 40px;
  padding: 24px 20px;
  background: rgba(15,23,42,0.4);
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.site-footer p, footer p, [role="contentinfo"] p {
  margin: 8px 0;
}
.site-footer a, footer a, [role="contentinfo"] a {
  color: #7dd3fc;
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover, footer a:hover, [role="contentinfo"] a:hover {
  color: #56d8f3;
  text-decoration: underline;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
body.light-mode .site-footer, body.light-mode footer, body.light-mode [role="contentinfo"] {
  background: rgba(255,250,245,0.4);
  border-top-color: rgba(217,119,6,0.08);
  color: #8b7765;
}
body.light-mode .site-footer a, body.light-mode footer a, body.light-mode [role="contentinfo"] a {
  color: #d1410a;
}
body.light-mode .site-footer a:hover, body.light-mode footer a:hover, body.light-mode [role="contentinfo"] a:hover {
  color: #e85c0d;
}

@media (max-width: 480px) {
  .site-footer, footer, [role="contentinfo"] {
    padding: 16px 14px;
    font-size: 0.8rem;
    margin-top: 24px;
  }
  .footer-links {
    gap: 10px;
    flex-wrap: wrap;
  }
  .footer-links a {
    font-size: 0.75rem;
  }
}

/* ===== MASTER MOBILE STABILITY OVERRIDES ===== */
@media (max-width: 480px) {
  .vent-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
  }

  .vent-card .vent-message {
    font-size: 0.98rem !important;
    line-height: 1.62 !important;
  }

  .vent-card .vent-actions {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    overflow: visible !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    scrollbar-width: none !important;
  }

  .vent-card .vent-actions button {
    flex: 0 0 auto !important;
    min-width: 44px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
  }

  .vent-card .vent-actions .action-count {
    display: inline-flex !important;
    font-size: 0.82rem !important;
    margin-left: 5px !important;
  }

  .vent-card .share-download-menu {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    margin-left: 0 !important;
  }

  .vent-card .vent-actions .hug-btn,
  .vent-card .vent-actions .reply-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 54px !important;
    max-width: none !important;
    padding: 0 12px !important;
  }
}

@media (max-width: 360px) {
  .vent-card .vent-actions,
  .vent-card .actions {
    gap: 4px !important;
  }

  .vent-card .vent-actions button,
  .vent-card .actions button {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    border-radius: 9px !important;
  }

  .vent-card .share-download-menu {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }

  .vent-card .vent-actions .hug-btn,
  .vent-card .vent-actions .reply-btn {
    width: auto !important;
    min-width: 52px !important;
    max-width: none !important;
    padding: 0 10px !important;
       flex: 0 0 auto !important;
       max-width: none !important;
  }

  .vent-card .vent-actions .action-count {
    display: inline-flex !important;
    font-size: 0.78rem !important;
    margin-left: 4px !important;
  }

  .reply-item {
    padding: 12px;
  }
  .reply-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* MOBILE DESIGN HARDENING: final overrides to stop card/action-row breakage */
@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }

  .app-container,
  .main-content,
  .feed {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-container,
  .main-shell,
  .feed-shell {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .mobile-header {
    padding: 10px 10px 8px !important;
    gap: 8px !important;
  }

  .mobile-header .mobile-search {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .mobile-header .mobile-search input {
    font-size: 0.92rem !important;
  }

  .vent-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    margin: 0 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .vent-card .vent-card-header {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .vent-card .vent-card-header-left {
    width: 100% !important;
  }

  .vent-card .vent-time {
    margin-left: 0 !important;
    font-size: 0.78rem !important;
    width: 100% !important;
    text-align: left !important;
  }

  .vent-card .vent-message {
    font-size: 0.96rem !important;
    line-height: 1.58 !important;
  }

  .vent-card .vent-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 6px 0 2px !important;
    margin: 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .vent-card .vent-actions::-webkit-scrollbar {
    display: none !important;
  }

  .vent-card .vent-actions button,
  .vent-card .actions button,
  .vent-card .share-download-menu {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: auto !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
  .vent-card .share-download-menu .share-download-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }

  .vent-card .vent-actions button span,
  .vent-card .vent-actions .action-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .vent-card .vent-actions button i,
  .vent-card .vent-actions button svg {
    width: 16px !important;
    height: 16px !important;
  }

  .vent-card .vent-actions .action-count {
    display: inline-flex !important;
    font-size: 0.75rem !important;
    margin-left: 4px !important;
  }

  .bottom-nav {
    padding: 6px 6px 10px !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .bottom-nav .nav-item {
    flex: 1 0 auto !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    text-align: center !important;
  }
}

@media (max-width: 360px) {
  .mobile-header {
    padding: 8px 8px 6px !important;
  }

  .app-container,
  .main-content,
  .feed {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .vent-card {
    padding: 10px 8px !important;
  }

  .vent-card .vent-actions button {
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 7px 8px !important;
  }

  .vent-card .vent-actions .action-count {
    font-size: 0.72rem !important;
  }
}

/* Final fixed action-row overrides: apply last across all responsive blocks */
.vent-card .vent-actions,
.vent-card .actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
}
.vent-card .vent-actions button,
.vent-card .actions button,
.vent-card .share-download-menu {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.vent-card .share-download-menu {
  margin: 0 !important;
  width: 100% !important;
}
.vent-card .share-download-menu .share-download-toggle {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}
.vent-card .vent-actions .reply-btn,
.vent-card .vent-actions .hug-btn,
.vent-card .vent-actions .bookmark-btn,
.vent-card .vent-actions .report-btn,
.vent-card .vent-actions .delete-btn {
  width: 100% !important;
}
.bottom-nav {
  justify-content: space-around !important;
  padding: 0 4px !important;
}
.bottom-nav .nav-item {
  flex: 1 0 auto !important;
  min-width: 0 !important;
  text-align: center !important;
}
.fab {
  bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 1100 !important;
}
.app-container {
  padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 480px) {
  .bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 0 !important;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .bottom-nav .nav-item {
    width: 100% !important;
    padding: 8px 0 !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .bottom-nav .nav-item span:not(.badge) {
    display: none !important;
  }

  .bottom-nav .nav-item i,
  .bottom-nav .nav-item svg {
    width: 22px !important;
    height: 22px !important;
  }

  .bottom-nav .nav-item .badge {
    top: 2px !important;
    right: 50% !important;
    transform: translateX(12px) !important;
  }
}

@media (max-width: 360px) {
  .bottom-nav {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .bottom-nav .nav-item i,
  .bottom-nav .nav-item svg {
    width: 20px !important;
    height: 20px !important;
  }
}
