/* Theme: dark */
body[data-theme="dark"] {
  background: #050910;
  color: #f5f5f5;
}

body[data-theme="dark"] .topbar {
  background: #0b1118;
  border-bottom-color: #111822;
  color: #f5f5f5;
}

body[data-theme="dark"] .bottom-sheet,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .post-overlay,
body[data-theme="dark"] .chat-window,
body[data-theme="dark"] .post-card {
  background: #0b1118;
  color: #f5f5f5;
  border-color: #151b24;
}

body[data-theme="dark"] .chip,
body[data-theme="dark"] .action-btn,
body[data-theme="dark"] .btn-primary {
  background: #151b24;
  color: #f5f5f5;
  border-color: #1f2834;
}

body[data-theme="dark"] .post-body {
  color: #d0d4db;
}

body[data-theme="dark"] .chat-messages {
  background: #050910;
}

body[data-theme="dark"] .chat-bubble.me {
  background: #2962ff;
  color: #fff;
}

body[data-theme="dark"] .chat-bubble.them {
  background: #151b24;
  color: #f5f5f5;
}

/* Marine theme */
body[data-theme="marine"] {
  background: #02131f;
  color: #e3f2fd;
}

body[data-theme="marine"] .topbar {
  background: #032136;
  border-bottom-color: #06324c;
}

body[data-theme="marine"] .bottom-sheet,
body[data-theme="marine"] .modal-content,
body[data-theme="marine"] .post-overlay,
body[data-theme="marine"] .chat-window,
body[data-theme="marine"] .post-card {
  background: #032136;
  color: #e3f2fd;
  border-color: #06324c;
}

body[data-theme="marine"] .chip,
body[data-theme="marine"] .action-btn,
body[data-theme="marine"] .btn-primary {
  background: #06324c;
  color: #e3f2fd;
  border-color: #0b4a6e;
}

body[data-theme="marine"] .post-body {
  color: #c6e3ff;
}

body[data-theme="marine"] .chat-messages {
  background: #02131f;
}

body[data-theme="marine"] .chat-bubble.me {
  background: #0277bd;
  color: #fff;
}

body[data-theme="marine"] .chat-bubble.them {
  background: #06324c;
  color: #e3f2fd;
}

/* Responsive adjustments kept across modules */
@media (max-width: 768px) {
  .topbar { height: 50px; padding: 0 10px; }
  .topbar-logo { height: 40px; }
  .category-chips { gap: 4px; }
  .chip { padding: 4px 8px; font-size: 10px; }
  .side-actions { right: 10px; top: 60px; }
  .action-btn { width: 48px; height: 48px; font-size: 24px; }
  #map { height: calc(var(--vh, 100vh) - 50px); }
  .bottom-sheet { max-height: 80vh; z-index: 900; }
  .sheet-content { padding: 8px; max-height: calc(80vh - 52px); }
  .post-card { padding: 8px; margin-bottom: 8px; }
  .chat-window { left: 0; right: 0; width: 100vw; height: 55vh; border-radius: 16px 16px 0 0; bottom: 0; z-index: 980; }
  .toast-container { bottom: 10px; right: 10px; left: 10px; }
  .toast { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
  .topbar { height: 48px; }
  .topbar-logo { height: 38px; }
  .chip { padding: 3px 8px; font-size: 10px; }
  .action-btn { width: 46px; height: 46px; font-size: 22px; }
  #map { height: calc(var(--vh, 100vh) - 48px); top: 48px; }
  .side-actions { right: 8px; top: 56px; gap: 6px; }
  .bottom-sheet { max-height: 80vh; }
  .sheet-content { padding: 8px; }
  .post-card { padding: 8px; margin-bottom: 8px; }
  .toast-container { bottom: 10px; right: 10px; left: 10px; }
  .toast { padding: 10px 12px; font-size: 13px; }
}

/* Print Styles */
@media print {
  .topbar, .side-actions, .bottom-sheet, .modal { display: none !important; }
}