/* ═══════════════════════════════════
   USER GUIDE
═══════════════════════════════════ */

.guide-welcome-card {
  text-align: center;
  background: linear-gradient(135deg, #fff8f8, #fdf2f5);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-8);
  margin-bottom: var(--sp-8);
  position: relative;
  overflow: hidden;
}

.guide-welcome-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent-pink), var(--color-accent-script), var(--color-accent-sage-light));
}

.guide-welcome-peony {
  font-size: 2.8rem;
  margin-bottom: var(--sp-3);
  animation: float 3s ease-in-out infinite;
}

.guide-welcome-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-2);
}

.guide-welcome-script {
  font-family: var(--font-script);
  font-size: var(--fs-xl);
  color: var(--color-accent-script);
  margin-bottom: var(--sp-5);
}

.guide-welcome-msg {
  font-size: var(--fs-md);
  color: var(--color-text-body);
  line-height: 1.85;
  max-width: 560px;
  margin: 0 auto;
}

.guide-section-heading {
  font-family: var(--font-script);
  font-size: var(--fs-2xl);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-6);
  padding-left: var(--sp-2);
  border-left: 3px solid #e8b4c0;
}

.guide-card {
  margin-bottom: var(--sp-10);
}

.guide-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
}

.guide-card-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: auto;
  white-space: nowrap;
  text-align: center;
  padding-top: 2px;
}

.guide-card-title {
  font-family: var(--font-script);
  font-size: var(--fs-xl);
  font-weight: normal;
  color: var(--color-text-heading);
  line-height: 1.2;
}

.guide-card-sub {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.guide-card-body {
  font-size: var(--fs-md);
  color: var(--color-text-body);
  line-height: 1.75;
}

.guide-card-body strong {
  font-family: var(--font-script);
  font-weight: normal;
  font-size: 1.1em;
  color: var(--color-accent-script);
}

.guide-card-body p { margin-bottom: var(--sp-3); }
.guide-card-body p:last-child { margin-bottom: 0; }

.guide-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.guide-list li {
  padding-left: var(--sp-5);
  position: relative;
}

.guide-list li::before {
  content: '🌷';
  position: absolute;
  left: 0;
  font-size: 0.85rem;
  top: 2px;
}

.guide-tip {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-accent-sage-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm) !important;
  color: var(--color-text-muted) !important;
  margin-top: var(--sp-3) !important;
}

.guide-mode-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-4) 0;
}

.guide-mode-block {
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.guide-mode-block.morning {
  background: linear-gradient(135deg, #fffbf0, #fef4d8);
  border: 1px solid #f0e0b0;
}

.guide-mode-block.evening {
  background: linear-gradient(135deg, #f5f0fd, #ede8fa);
  border: 1px solid #d4c8f0;
}

.guide-mode-label {
  font-family: var(--font-script);
  font-weight: normal;
  font-size: var(--fs-md);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-2);
}

.guide-closing-card {
  text-align: center;
  background: linear-gradient(135deg, #fdf8f8, #fef2f5);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-8);
  margin-top: var(--sp-4);
}

.guide-closing-icon { font-size: 2.4rem; margin-bottom: var(--sp-4); }

.guide-closing-text {
  font-size: var(--fs-md);
  color: var(--color-text-body);
  line-height: 1.85;
  max-width: 520px;
  margin: 0 auto var(--sp-6);
}

.guide-closing-sig {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-1);
}

.guide-closing-name {
  font-family: var(--font-script);
  font-size: var(--fs-2xl);
  color: var(--color-accent-script);
  margin-bottom: var(--sp-4);
}

.guide-closing-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.guide-theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-4) 0;
}

.guide-theme-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-full);
  border: 1.5px solid;
  font-size: var(--fs-sm);
  color: var(--color-text-body);
  font-family: var(--font-heading);
}

.guide-theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
  .guide-mode-pair { grid-template-columns: 1fr; }
  .guide-welcome-card, .guide-closing-card { padding: var(--sp-8) var(--sp-4); }
}

/* ═══════════════════════════════════
   DASHBOARD WIDGETS
═══════════════════════════════════ */

.today-widgets-row {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.widget-card {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-3);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  position: relative;
  overflow: hidden;
}

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

.widget-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.widget-card:nth-child(1)::before { background: linear-gradient(90deg, #fdc8d0, #f8a8b8); }
.widget-card:nth-child(2)::before { background: linear-gradient(90deg, #c8d8fd, #a8b8f0); }
.widget-card:nth-child(3)::before { background: linear-gradient(90deg, #c8f0d8, #a8d8c0); }

.widget-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 2px;
}

.widget-value {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1;
}

.widget-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 400px) {
  .today-widgets-row { gap: var(--sp-2); }
  .widget-card { padding: var(--sp-3) var(--sp-2); }
  .widget-value { font-size: var(--fs-xl); }
}

/* ═══════════════════════════════════
   TODAY / ENTRY PAGE
═══════════════════════════════════ */

.entry-hero {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-4);
  position: relative;
}

.entry-hero-date {
  font-family: var(--font-script);
  font-size: var(--fs-script-lg);
  color: var(--color-accent-script);
  line-height: 1;
  margin-bottom: var(--sp-1);
}

.entry-hero-day {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.1;
}

.entry-hero-year {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-floral-header {
  position: absolute;
  right: -20px;
  top: -10px;
  width: 140px;
  height: 140px;
  opacity: 0.55;
  pointer-events: none;
}

.entry-section-title {
  font-family: var(--font-script);
  font-size: var(--fs-xl);
  color: var(--color-accent-script);
  margin-bottom: var(--sp-4);
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.entry-save-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6) 0 var(--sp-4);
}

.entry-save-message {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.entry-save-message.success {
  color: var(--color-success);
}

/* ═══════════════════════════════════
   FREE WRITE PAGE
═══════════════════════════════════ */

.freewrite-container {
  position: relative;
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
}

.freewrite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.freewrite-title {
  font-family: var(--font-script);
  font-size: var(--fs-script-lg);
  color: var(--color-accent-script);
}

.paper-style-toggle {
  display: flex;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 1px;
}

.paper-style-btn {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}

.paper-style-btn.active {
  background: var(--color-surface);
  color: var(--color-text-heading);
  box-shadow: var(--shadow-sm);
}

.freewrite-paper {
  flex: 1;
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-surface);
  transition: background var(--transition-base);
  min-height: 480px;
}

.freewrite-paper.paper-lined {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    #f0d8d8 31px,
    #f0d8d8 32px
  );
  background-size: 100% 32px;
  background-position: 0 36px;
}

.freewrite-paper.paper-dot {
  background-image: radial-gradient(circle, #e0c4c4 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 14px 14px;
}

.freewrite-paper.paper-blank {
  background: var(--color-surface);
}

.freewrite-textarea {
  width: 100%;
  height: 100%;
  min-height: 480px;
  background: transparent;
  border: none;
  padding: var(--sp-10) var(--sp-6) var(--sp-6);
  font-family: var(--font-answer, var(--font-body));
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text-body);
  resize: none;
  outline: none;
  position: relative;
  z-index: 1;
}

.freewrite-textarea::placeholder {
  color: var(--color-text-light);
  font-style: italic;
}

.freewrite-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
  padding: 0 var(--sp-2);
}

.freewrite-autosave {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  transition: color var(--transition-fast);
}

.freewrite-autosave.saved { color: var(--color-success); }
.freewrite-autosave-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.freewrite-counts {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
}

/* ═══════════════════════════════════
   CALENDAR PAGE
═══════════════════════════════════ */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.calendar-month-label {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-text-heading);
  font-weight: 700;
}

.calendar-month-sub {
  font-family: var(--font-script);
  font-size: var(--fs-md);
  color: var(--color-accent-script);
  display: block;
  line-height: 1;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: var(--sp-2);
}

.cal-day-name {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--sp-2) 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--sp-1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  background: var(--color-surface);
  font-size: var(--fs-xs);
  gap: 2px;
  position: relative;
}

.cal-day:hover {
  border-color: var(--color-border);
  background: var(--color-surface-alt);
}

.cal-day.today {
  background: linear-gradient(135deg, #fde8e8, #f8d8d8);
  border-color: var(--color-accent-rose);
}

.cal-day.has-entry {
  background: linear-gradient(135deg, #fef0f0, #fce8e8);
  border-color: var(--color-border-light);
}

.cal-day.other-month {
  opacity: 0.35;
  cursor: default;
}

.cal-day.other-month:hover { background: transparent; border-color: transparent; }

.cal-day-num {
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--color-text-heading);
  line-height: 1;
  margin-top: 2px;
}

.cal-day.today .cal-day-num {
  color: var(--color-accent-deep);
}

.cal-day-mood { font-size: 0.7rem; line-height: 1; }

.cal-day-dots {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent-rose);
  opacity: 0.6;
}

/* Entry preview panel */
.entry-preview-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-top: var(--sp-6);
  display: none;
  animation: slideDown 0.3s ease;
}

.entry-preview-panel.open { display: block; }

.entry-preview-date {
  font-family: var(--font-script);
  font-size: var(--fs-lg);
  color: var(--color-accent-script);
  margin-bottom: var(--sp-3);
}

/* ═══════════════════════════════════
   MONTHLY GOALS PAGE
═══════════════════════════════════ */

.goals-hero {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-4);
}

.goals-hero-title {
  font-family: var(--font-script);
  font-size: var(--fs-script-xl);
  color: var(--color-accent-script);
}

.goals-month-label {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-text-heading);
  margin-top: var(--sp-2);
}

.goal-category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  transition: box-shadow var(--transition-fast);
}

.goal-category-card:hover { box-shadow: var(--shadow-md); }

.goal-category-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.goal-category-icon {
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fde8e8, #f8d8d8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-category-name {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--color-text-heading);
  font-weight: 700;
}

.goal-category-name-input {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--color-text-heading);
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed var(--color-border);
  outline: none;
  padding: 2px 4px;
  width: 100%;
  min-width: 80px;
  transition: border-color var(--transition-fast);
}

.goal-category-name-input:focus {
  border-bottom-color: var(--color-accent-rose);
  background: var(--color-surface-warm);
  border-radius: 4px 4px 0 0;
}

.goal-category-name-input::placeholder {
  color: var(--color-text-light);
  font-style: italic;
  font-weight: 400;
}

.goal-category-progress {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-left: auto;
}

.goal-input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.goal-input-row .checkbox-input {
  flex-shrink: 0;
}

.goal-input {
  flex: 1;
}

/* ═══════════════════════════════════
   MONTHLY RECAP PAGE
═══════════════════════════════════ */

.recap-hero {
  text-align: center;
  padding: var(--sp-4) 0 var(--sp-6);
}

.recap-title {
  font-family: var(--font-script);
  font-size: var(--fs-script-xl);
  color: var(--color-accent-script);
}

.recap-subtitle {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-text-heading);
  margin-top: var(--sp-2);
}

.recap-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.recap-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-align: center;
}

.recap-stat-icon { font-size: 1.8rem; margin-bottom: var(--sp-2); }

.recap-stat-value {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1;
}

.recap-stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

.recap-star-row {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--sp-2) 0 0;
}

.recap-star {
  font-size: 0.95rem;
  color: var(--color-star-empty);
  line-height: 1;
}

.recap-star.filled {
  color: var(--color-star-fill);
}

.recap-mood-display {
  font-size: 2.2rem;
  display: block;
  margin-bottom: var(--sp-1);
}

.recap-gratitude-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.recap-gratitude-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text-body);
}

.recap-gratitude-item::before {
  content: '✿';
  color: var(--color-accent-rose);
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 520px) {
  .recap-stats-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════
   GALLERY PAGE
═══════════════════════════════════ */

.gallery-filters {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.gallery-filter-btn {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
  background: linear-gradient(135deg, #fde8e8, #f8d8d8);
  border-color: var(--color-accent-rose);
  color: var(--color-text-heading);
}

.gallery-grid {
  columns: 3;
  column-gap: var(--sp-3);
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: var(--sp-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast);
  break-inside: avoid;
}

.gallery-item:hover { transform: scale(1.02); }

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(92,61,61,0.6) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: flex-end;
  padding: var(--sp-3);
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-date {
  color: rgba(255,255,255,0.9);
  font-size: var(--fs-xs);
  font-family: var(--font-heading);
}

.gallery-empty {
  text-align: center;
  padding: var(--sp-16) var(--sp-4);
  color: var(--color-text-muted);
}

.gallery-empty-icon { font-size: 3rem; margin-bottom: var(--sp-4); opacity: 0.5; }

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 10, 0.92);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: fadeIn 0.2s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}

.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-4);
  background: linear-gradient(to top, rgba(20,10,10,0.8), transparent);
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-sm);
  font-family: var(--font-heading);
}

@media (max-width: 600px) {
  .gallery-grid { columns: 2; }
}

/* ═══════════════════════════════════
   EMPTY STATES
═══════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: var(--sp-4); opacity: 0.5; }
.empty-state-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-2);
}
.empty-state-desc { color: var(--color-text-muted); font-size: var(--fs-sm); }

/* ═══════════════════════════════════
   HOMEPAGE — PEONY MEANING
═══════════════════════════════════ */

.home-page {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-8) var(--sp-6) var(--sp-12);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(196, 160, 160, 0.3);
  border-radius: var(--radius-xl);
  margin: var(--sp-4);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 20px rgba(196, 160, 160, 0.08);
}

.home-floral-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
}

.home-journal-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-10);
  line-height: 1.15;
  gap: 0;
}

.home-journal-day {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  color: #b09888;
  letter-spacing: -0.01em;
  display: block;
}

.home-journal-chance {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 600;
  color: var(--color-accent-script);
  display: block;
  margin-top: -0.1em;
  padding-left: 1.2em;
}

.home-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: var(--color-text-heading);
  font-weight: 700;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-3);
  line-height: 1.1;
}

.home-meanings {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
  width: 100%;
  max-width: 540px;
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-8);
}

.home-meaning-block {
  display: flex;
  flex-direction: column;
}

.home-meaning-block.right {
  align-items: flex-end;
  text-align: right;
}

.home-meaning-word {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  margin-bottom: var(--sp-2);
}

.home-meaning-word.rose   { color: var(--color-accent-pink); }
.home-meaning-word.sage   { color: var(--color-accent-sage); }

.home-meaning-quote {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--color-text-heading);
  font-weight: 400;
  line-height: 1.55;
  max-width: 360px;
}

.home-divider {
  width: 80px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--color-accent-rose), transparent);
  margin: var(--sp-4) 0;
}

.home-meaning-block.right .home-divider {
  margin-left: auto;
}

.home-peony {
  width: min(340px, 78vw);
  height: auto;
  position: relative;
  z-index: 1;
  margin: var(--sp-4) auto var(--sp-8);
  animation: petalDrop 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  filter: drop-shadow(0 8px 24px rgba(180, 100, 120, 0.18));
}

.home-cta-area {
  position: relative;
  z-index: 1;
  text-align: center;
}

.home-cta-label {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

/* ═══════════════════════════════════
   THEME PICKER
═══════════════════════════════════ */

.theme-toggle-btn {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 90;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    display: none;
  }
}

.theme-picker {
  position: fixed;
  bottom: calc(var(--sp-6) + 52px);
  right: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-lg);
  z-index: 91;
  min-width: 200px;
  animation: slideDown 0.25s ease;
  display: none;
}

.theme-picker.open { display: block; }

@media (max-width: 768px) {
  .theme-picker {
    bottom: calc(var(--mobile-nav-height) + var(--sp-4) + 48px);
    right: var(--sp-4);
  }
}

.theme-picker-title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--color-text-heading);
  font-weight: 700;
  margin-bottom: var(--sp-3);
  text-align: center;
}

.theme-swatches {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.theme-swatch-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.theme-swatch-btn:hover {
  background: var(--color-surface-alt);
}

.theme-swatch-btn.active {
  border-color: var(--color-accent-rose);
  background: var(--color-surface-alt);
}

.theme-swatch-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.theme-swatch-label {
  font-size: var(--fs-sm);
  color: var(--color-text-body);
  font-weight: 500;
}

/* ── Midnight glow effects ── */
[data-theme="midnight"] .home-page {
  background: rgba(10, 8, 20, 0.35);
  border-color: rgba(180, 100, 240, 0.12);
  box-shadow: 0 0 40px rgba(140, 60, 220, 0.08);
}

[data-theme="midnight"] .card {
  border-color: #2a2a44;
  box-shadow: 0 0 0 1px rgba(180,100,240,0.08), 0 4px 24px rgba(0,0,0,0.5);
}

[data-theme="midnight"] .card-label,
[data-theme="midnight"] .modal-subtitle,
[data-theme="midnight"] .guide-welcome-script,
[data-theme="midnight"] .guide-card-title,
[data-theme="midnight"] .guide-section-heading {
  text-shadow: 0 0 18px rgba(240,128,208,0.75);
}

[data-theme="midnight"] .scripture-card {
  background: linear-gradient(135deg, #181830, #1e1438);
  border-color: #3a2a54;
  box-shadow: 0 0 24px rgba(180,100,240,0.18);
}

[data-theme="midnight"] .scripture-text {
  color: #e0d0f8;
}

[data-theme="midnight"] .input,
[data-theme="midnight"] .textarea {
  background: #1e1e32;
  border-color: #3a3a58;
  color: #f0e8ff;
}

[data-theme="midnight"] .input::placeholder,
[data-theme="midnight"] .textarea::placeholder {
  color: #8878c0;
  opacity: 1;
}

[data-theme="midnight"] .input:focus,
[data-theme="midnight"] .textarea:focus {
  border-color: #c090e0;
  background: #24243c;
  box-shadow: 0 0 0 3px rgba(184,127,212,0.2), 0 0 12px rgba(240,128,208,0.15);
}

[data-theme="midnight"] .btn-primary {
  background: linear-gradient(135deg, #8a4ab0, #6a2a90);
  box-shadow: 0 0 20px rgba(180,100,240,0.45);
}

[data-theme="midnight"] .btn-primary:hover {
  background: linear-gradient(135deg, #9a5ac0, #7a3aa0);
  box-shadow: 0 0 28px rgba(180,100,240,0.6);
}

[data-theme="midnight"] .btn-save {
  background: linear-gradient(135deg, #8a4ab0, #6a2a90);
  box-shadow: 0 0 20px rgba(180,100,240,0.45);
}

[data-theme="midnight"] .nav-item.active .nav-icon,
[data-theme="midnight"] .nav-item:hover .nav-icon {
  box-shadow: 0 0 12px rgba(240,128,208,0.4);
}

[data-theme="midnight"] .field-label {
  color: #e0d0f8;
}

[data-theme="midnight"] .modal-box {
  background: #12121e;
  border: 1px solid #2a2a44;
  box-shadow: 0 0 40px rgba(180,100,240,0.2), 0 20px 60px rgba(0,0,0,0.7);
}

[data-theme="midnight"] .star-btn.filled {
  text-shadow: 0 0 10px rgba(240,208,80,0.8);
}

[data-theme="midnight"] .mobile-nav-item[data-route="#home"]      .mobile-nav-icon { background: linear-gradient(135deg, #2a1830, #1e1228); }
[data-theme="midnight"] .mobile-nav-item[data-route="#guide"]    .mobile-nav-icon { background: linear-gradient(135deg, #1e1a30, #16122a); }
[data-theme="midnight"] .mobile-nav-item[data-route="#today"]    .mobile-nav-icon { background: linear-gradient(135deg, #2a1438, #1e0e2c); }
[data-theme="midnight"] .mobile-nav-item[data-route="#goals"]    .mobile-nav-icon { background: linear-gradient(135deg, #0e2820, #0a1e18); }

[data-theme="midnight"] .trial-banner {
  background: linear-gradient(90deg, #1a1030, #14102a);
  border-bottom-color: #2e2248;
  color: #e0d4f8;
}

[data-theme="midnight"] .guide-welcome-card {
  background: linear-gradient(135deg, #14102a, #1a1230);
  border-color: #2e2248;
}

[data-theme="midnight"] .guide-closing-card {
  background: linear-gradient(135deg, #14102a, #1a1230);
  border-color: #3a2a54;
}

[data-theme="midnight"] .guide-mode-block.morning {
  background: linear-gradient(135deg, #1e1808, #241e10);
  border-color: #3a3018;
}

[data-theme="midnight"] .guide-mode-block.evening {
  background: linear-gradient(135deg, #12103a, #180e2e);
  border-color: #2e2258;
}

[data-theme="midnight"] .guide-tip {
  background: #181828;
  border-left-color: #4a9580;
}

/* ── Font Picker ── */
#font-toggle-btn {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.font-picker {
  min-width: 240px;
  bottom: calc(var(--sp-6) + 104px);
}

@media (max-width: 768px) {
  .theme-picker,
  .font-picker {
    bottom: auto;
    top: var(--header-height);
    right: var(--sp-3);
    left: var(--sp-3);
    min-width: unset;
  }
}

@media (max-width: 768px) {
  .entry-floral-header { display: none; }
}

.font-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.font-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
}

.font-option-btn:hover { background: var(--color-surface-alt); }

.font-option-btn.active {
  border-color: var(--color-accent-rose);
  background: var(--color-surface-alt);
}

.font-option-sample {
  font-size: 1rem;
  color: var(--color-text-body);
  line-height: 1.3;
}

.font-option-label {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Past-entry editing banner ── */
.past-entry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  background: var(--color-surface-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.past-entry-back {
  color: var(--color-accent-rose);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
}

.past-entry-back:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .past-entry-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
  }

  .entry-floral-header { display: none; }
}

/* ── Cursor glow ── */
#cursor-glow {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle, var(--cursor-glow-color) 0%, transparent 70%);
}

[data-theme="midnight"] #cursor-glow {
  width: 44px;
  height: 44px;
}

