/* ============================================================
   StillBloom — Design System
   Colors: Sage, Warm, Blush
   Fonts: Outfit (body), Syne (headings)
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sage: #8B9E7C;
  --sage-light: #C4D4B6;
  --sage-pale: #EAF0E4;
  --warm: #D4A574;
  --warm-light: #F0DCC8;
  --warm-pale: #FDF6EF;
  --blush: #C48B7C;
  --blush-light: #E8C4BA;
  --blush-pale: #F0E0DC;
  --text: #2C2C2C;
  --text-soft: #5A5A5A;
  --text-muted: #8A8A8A;
  --bg: #FDFBF8;
  --white: #FFFFFF;
  --border: rgba(139,158,124,0.15);
  --border-warm: rgba(212,165,116,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  line-height: 1.2;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--text); }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* ============ NAVIGATION ============ */
.app-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text) !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-soft);
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--sage-pale);
}

.nav-links a.active {
  color: var(--sage);
  background: var(--sage-pale);
  font-weight: 500;
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.nav-user-name {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}

.nav-btn {
  background: var(--sage) !important;
  color: var(--white) !important;
  font-weight: 500 !important;
  padding: 8px 20px !important;
}
.nav-btn:hover {
  background: #7A8E6B !important;
}

.nav-btn-outline {
  border: 1px solid var(--border) !important;
  color: var(--text-soft) !important;
}
.nav-btn-outline:hover {
  border-color: var(--sage) !important;
  color: var(--sage) !important;
  background: transparent !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--sage);
  color: var(--white);
}
.btn-primary:hover {
  background: #7A8E6B;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.btn-full { width: 100%; text-align: center; }

.btn-warm {
  background: var(--warm);
  color: var(--white);
}
.btn-warm:hover {
  background: #C49564;
}

/* ============ ALERTS ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-error {
  background: #FFF0F0;
  color: #C44;
  border: 1px solid #F0D0D0;
}

.alert-success {
  background: var(--sage-pale);
  color: #4A6A3A;
  border: 1px solid var(--sage-light);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -2px;
  margin-bottom: 12px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-pale);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

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

/* ============ AUTH PAGES ============ */
.auth-page {
  min-height: calc(100vh - 64px - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-soft);
  font-weight: 300;
}

.auth-form {
  margin-top: 24px;
}

.auth-form .btn {
  margin-top: 8px;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--sage);
  font-weight: 500;
}

/* ============ FORM PAGES ============ */
.form-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto;
}

.form-card-wide {
  max-width: 700px;
}

.form-card h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.form-subtitle {
  color: var(--text-soft);
  font-weight: 300;
  margin-bottom: 28px;
}

/* ============ COMMUNITY PAGE ============ */
.community-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.community-hero {
  text-align: center;
  padding: 48px 0 40px;
}

.community-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 8px;
}

.community-hero p {
  color: var(--text-soft);
  font-weight: 300;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.community-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar */
.community-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
}

.community-sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.topic-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-soft) !important;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.topic-link:hover {
  background: var(--sage-pale);
  color: var(--text) !important;
}

.topic-link.active {
  background: var(--sage-pale);
  color: var(--sage) !important;
  font-weight: 500;
}

.topic-icon { font-size: 1.1rem; }
.topic-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Filter banner */
.filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--sage-pale);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.filter-clear {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Discussion cards */
.discussion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discussion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  color: var(--text) !important;
  text-decoration: none !important;
}

.discussion-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.discussion-card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.discussion-topic-badge {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.discussion-card-content {
  flex: 1;
  min-width: 0;
}

.discussion-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.discussion-excerpt {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 300;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discussion-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.discussion-card-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  margin-left: 16px;
}

.discussion-card-stats .stat {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.discussion-card-stats .stat.hearted {
  color: var(--warm);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-soft);
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto 20px;
}

.empty-state-small {
  padding: 24px;
  text-align: center;
}
.empty-state-small p {
  color: var(--text-soft);
  margin-bottom: 12px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ DISCUSSION DETAIL ============ */
.discussion-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.discussion-header {
  margin-bottom: 24px;
}

.back-link {
  font-size: 0.9rem;
  color: var(--text-muted) !important;
  display: inline-block;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--sage) !important; }

.discussion-full {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.discussion-full-header {
  margin-bottom: 24px;
}

.condition-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--sage-pale);
  border-radius: 100px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.discussion-full-header h1 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.discussion-full-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.discussion-full-meta .author { font-weight: 500; color: var(--text-soft); }

.discussion-full-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.discussion-full-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.heart-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 100px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: all 0.2s;
}

.heart-btn:hover {
  border-color: var(--warm);
  color: var(--warm);
}

.heart-btn.hearted {
  background: var(--warm-pale);
  border-color: var(--warm);
  color: var(--warm);
}

.heart-display {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Replies */
.replies-section {
  margin-top: 8px;
}

.replies-section h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.empty-replies {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.reply-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.reply-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reply-author { font-weight: 500; color: var(--text-soft); }

.reply-body {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.reply-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.reply-form h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
}

.reply-cta {
  text-align: center;
  padding: 24px;
  background: var(--sage-pale);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

/* ============ CONDITIONS PAGE ============ */
.conditions-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.conditions-hero {
  text-align: center;
  padding: 48px 0 40px;
}

.conditions-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 8px;
}

.conditions-hero p {
  color: var(--text-soft);
  font-weight: 300;
  font-size: 1.1rem;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.condition-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  text-decoration: none !important;
  color: var(--text) !important;
  position: relative;
  overflow: hidden;
}

.condition-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.condition-card-sage::before { background: var(--sage); }
.condition-card-warm::before { background: var(--warm); }
.condition-card-blush::before { background: var(--blush); }

.condition-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.condition-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.condition-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.condition-card p {
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 12px;
}

.condition-card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sage);
}

/* ============ CONDITION DETAIL PAGE ============ */
.condition-detail-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.condition-detail-hero {
  text-align: center;
  padding: 40px 0 48px;
}

.condition-detail-hero .back-link {
  display: block;
  margin-bottom: 20px;
}

.condition-detail-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.condition-detail-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.condition-detail-subtitle {
  font-size: 1.15rem;
  color: var(--text-soft);
  font-weight: 300;
  font-style: italic;
}

.condition-detail-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.content-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sage-pale);
}

.content-body {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.symptom-list, .tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.symptom-item, .tip-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.symptom-item h3, .tip-item h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.symptom-item p, .tip-item p {
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 300;
  line-height: 1.6;
}

.real-talk-section {
  background: var(--warm-pale);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.real-talk-section h2 {
  border-color: var(--warm-light);
}

.real-talk-body {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.9;
  font-style: italic;
}

.mini-discussion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.mini-discussion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  transition: background 0.2s;
}
.mini-discussion:hover { background: var(--sage-pale); }

.mini-discussion-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.mini-discussion-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ JOURNAL PAGE ============ */
.journal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.journal-hero {
  text-align: center;
  padding: 48px 0 40px;
}

.journal-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 8px;
}

.journal-hero p {
  color: var(--text-soft);
  font-weight: 300;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.journal-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journal-entry-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  color: var(--text) !important;
  text-decoration: none !important;
}
.journal-entry-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.journal-entry-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.journal-date-day {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.journal-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.journal-entry-content {
  flex: 1;
  min-width: 0;
}

.journal-entry-mood {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.mood-emoji { font-size: 1.3rem; }
.mood-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.journal-entry-symptoms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.symptom-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  background: var(--sage-pale);
  color: var(--text-soft);
}

.symptom-badge.severity-3 { background: var(--warm-pale); color: var(--warm); }
.symptom-badge.severity-4 { background: var(--blush-pale); color: var(--blush); }
.symptom-badge.severity-5 { background: #FCE4E4; color: #C44; }

.journal-entry-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ JOURNAL FORM ============ */
.mood-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mood-option {
  cursor: pointer;
}

.mood-option input { display: none; }

.mood-option-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  min-width: 70px;
}

.mood-option input:checked + .mood-option-display {
  border-color: var(--sage);
  background: var(--sage-pale);
}

.mood-emoji-large { font-size: 1.8rem; }
.mood-label-small { font-size: 0.75rem; color: var(--text-muted); }

.symptom-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.symptom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.symptom-label {
  font-size: 0.9rem;
  min-width: 180px;
  font-weight: 400;
}

.severity-selector {
  display: flex;
  gap: 4px;
}

.severity-option {
  cursor: pointer;
}

.severity-option input { display: none; }

.severity-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.severity-option input:checked + .severity-display {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--white);
}

.severity-option input[value="3"]:checked + .severity-display {
  background: var(--warm);
  border-color: var(--warm);
}

.severity-option input[value="4"]:checked + .severity-display {
  background: var(--blush);
  border-color: var(--blush);
}

.severity-option input[value="5"]:checked + .severity-display {
  background: #C44;
  border-color: #C44;
}

/* ============ JOURNAL DETAIL ============ */
.journal-detail-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.journal-detail-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.journal-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.mood-emoji-xl { font-size: 3rem; }

.journal-detail-header h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.mood-label-detail {
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 400;
}

.journal-detail-symptoms h2,
.journal-detail-notes h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.symptom-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.symptom-detail-item {
  display: grid;
  grid-template-columns: 32px 160px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  opacity: 0.4;
}

.symptom-detail-item.has-severity {
  opacity: 1;
}

.symptom-detail-icon { font-size: 1.2rem; }
.symptom-detail-name { font-size: 0.9rem; font-weight: 500; }

.severity-bar {
  height: 8px;
  background: var(--sage-pale);
  border-radius: 4px;
  overflow: hidden;
}

.severity-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.severity-fill-0 { background: transparent; }
.severity-fill-1 { background: var(--sage-light); }
.severity-fill-2 { background: var(--sage); }
.severity-fill-3 { background: var(--warm); }
.severity-fill-4 { background: var(--blush); }
.severity-fill-5 { background: #C44; }

.severity-value {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  color: var(--text-muted);
}

.severity-label {
  display: none;
}

.journal-detail-notes {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.journal-detail-notes p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.8;
}

/* ============ FOOTER ============ */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--sage); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ MOBILE RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; }

  .nav-user-area {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
    justify-content: space-between;
  }

  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px;
  }

  .community-sidebar h3 {
    width: 100%;
    margin-bottom: 4px;
  }

  .topic-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .discussion-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .discussion-card-stats {
    margin-left: 0;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .form-card {
    padding: 32px 24px;
  }

  .symptom-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .symptom-label {
    min-width: auto;
  }

  .symptom-detail-item {
    grid-template-columns: 28px 1fr 40px;
    gap: 6px;
  }

  .symptom-detail-name {
    grid-column: 2 / -1;
    margin-bottom: -4px;
  }

  .severity-bar {
    grid-column: 2;
  }

  .discussion-full {
    padding: 24px 20px;
  }

  .condition-detail-hero {
    padding: 24px 0 32px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .mood-selector {
    justify-content: center;
  }

  .mood-option-display {
    padding: 8px 10px;
    min-width: 56px;
  }

  .mood-emoji-large { font-size: 1.4rem; }

  .severity-display {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .conditions-grid {
    grid-template-columns: 1fr;
  }
}
