/* ==============================================
   MY JOURNEY — Inspired by Journey (ThatGameCompany)
   Warm desert tones, golden light, flowing design
   ============================================== */

/* --- CSS Variables --- */
:root {
  --sand-light: #F5E6CA;
  --sand: #E8C170;
  --sand-dark: #D4963C;
  --sunset-orange: #E07B4C;
  --sunset-red: #C1443E;
  --cloak-red: #B5314A;
  --sky-warm: #F9D29D;
  --sky-purple: #6B4C82;
  --sky-deep: #2D1B4E;
  --mountain: #4A3560;
  --text-dark: #2D1F14;
  --text-light: #FFF5E6;
  --text-muted: #A89279;
  --glass: rgba(255, 255, 255, 0.10);
  --glass-hover: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --gold: #FFD700;
  --gold-soft: #F0C75E;
  --soin-green: #7EBF8E;
  --soin-green-soft: rgba(126, 191, 142, 0.7);
  --green-soft: #7EBF8E;
  --red-soft: #D4736C;
  --shadow: rgba(0, 0, 0, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 70px;
  --header-height: auto;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-light);
  background: var(--sky-deep);
  -webkit-font-smoothing: antialiased;
}

/* --- Background Layer --- */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    170deg,
    #1a0a2e 0%,
    #2D1B4E 20%,
    #6B4C82 40%,
    #D4963C 65%,
    #E07B4C 80%,
    #F9D29D 100%
  );
  transition: background 3s ease, opacity 0.8s ease;
}

#bg-layer.custom-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Stars layer (visible on night theme) */
#stars-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
}

#stars-layer.visible {
  opacity: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: star-twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

.star.bright {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

/* Mountain silhouette */
#mountain-silhouette {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40vh;
  z-index: 1;
  background: linear-gradient(to top, rgba(26, 10, 46, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

#mountain-silhouette::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 45vw solid transparent;
  border-right: 45vw solid transparent;
  border-bottom: 35vh solid rgba(74, 53, 96, 0.35);
  filter: blur(2px);
}

/* Bright peak light */
#mountain-silhouette::after {
  content: '';
  position: absolute;
  bottom: 33vh;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow:
    0 0 20px 8px rgba(255, 215, 0, 0.4),
    0 0 60px 20px rgba(255, 215, 0, 0.15);
  animation: peak-glow 4s ease-in-out infinite;
}

@keyframes peak-glow {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
}

/* --- App Container --- */
#app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 900px;
  margin: 0 auto;
}

/* --- Header --- */
#app-header {
  padding: 14px 20px 8px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  flex-shrink: 0;
}

#greeting {
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 2px 8px var(--shadow);
}

#date-display {
  font-size: 0.75rem;
  color: var(--sand-light);
  opacity: 0.8;
  margin-top: 1px;
}

/* Balance Meter */
#balance-meter {
  margin-top: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#balance-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  gap: 2px;
}

#balance-obligations {
  background: linear-gradient(90deg, var(--sunset-orange), var(--sand-dark));
  height: 100%;
  border-radius: 5px 0 0 5px;
  transition: width 0.6s ease;
  min-width: 2px;
}

#balance-soins {
  background: linear-gradient(90deg, var(--soin-green), var(--soin-green-soft));
  height: 100%;
  transition: width 0.6s ease;
  min-width: 2px;
}

#balance-plaisirs {
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  height: 100%;
  border-radius: 0 5px 5px 0;
  transition: width 0.6s ease;
  min-width: 2px;
}

#balance-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem;
  opacity: 0.7;
}

#balance-labels strong {
  opacity: 1;
  color: var(--text-light);
}

/* --- Main Content --- */
#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#content::-webkit-scrollbar {
  width: 4px;
}

#content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* --- Daily Observation --- */
#daily-observation {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-light);
  opacity: 0.85;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.6s ease;
}

#daily-observation .obs-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-dismiss-obs {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.4;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
}

/* --- Main Mission --- */
#main-mission {
  background: linear-gradient(135deg, rgba(240, 199, 94, 0.12), rgba(255, 215, 0, 0.06));
  border: 1px solid rgba(240, 199, 94, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

#main-mission::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.mission-prompt {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 8px;
  font-weight: 500;
}

.mission-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 6px;
}

.mission-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.mission-title.completed {
  text-decoration: none;
  color: var(--gold);
  opacity: 0.8;
}

.mission-bravo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sand-light);
  margin-bottom: 8px;
}

#mission-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

#mission-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#mission-input:focus {
  border-color: var(--gold-soft);
}

#mission-picker .btn-save {
  padding: 10px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
}

#mission-from-tasks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.mission-task-chip {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mission-task-chip:hover {
  border-color: var(--gold-soft);
  background: rgba(240, 199, 94, 0.15);
}

.mission-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mission-actions .btn-save {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.mission-actions .btn-cancel {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* --- Views --- */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.dashboard-grid.three-cols {
  grid-template-columns: 1fr 1fr 1fr;
}

.task-column h2 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  opacity: 0.8;
}

#col-obligations h2 { color: var(--sunset-orange); }
#col-soins h2 { color: var(--soin-green); }
#col-plaisirs h2 { color: var(--gold); }

.dashboard-footer {
  text-align: center;
  margin-top: 6px;
  padding-bottom: 4px;
}

.btn-manage-tasks {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 6px 16px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.75rem;
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-manage-tasks:hover {
  opacity: 1;
  background: var(--glass-hover);
}

/* --- Task Cards --- */
.task-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  cursor: pointer;
}

.task-card:hover {
  background: var(--glass-hover);
  transform: translateY(-1px);
}

.task-card.completed {
  opacity: 0.5;
}

.task-card.completed .task-title {
  text-decoration: line-through;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  cursor: pointer;
  background: transparent;
}

.task-checkbox:hover {
  border-color: var(--gold);
}

.task-card.completed .task-checkbox {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.task-card.completed .task-checkbox::after {
  content: '✓';
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.task-title {
  font-size: 0.82rem;
  font-weight: 500;
  flex: 1;
}

.task-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-priority.p1 { background: var(--green-soft); }
.task-priority.p2 { background: var(--gold-soft); }
.task-priority.p3 { background: var(--red-soft); }

/* --- Daily Stats --- */
#daily-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
}

#stat-obligations { color: var(--sunset-orange); }
#stat-soins { color: var(--soin-green); }
#stat-plaisirs { color: var(--gold); }

.stat-label {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Contacts who need attention (dashboard) --- */
#contacts-reminder {
  margin-top: 16px;
}

#contacts-reminder h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 8px;
}

.contact-chip {
  display: inline-block;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  margin: 0 6px 6px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-chip:hover {
  background: var(--glass-hover);
}

.contact-chip.overdue {
  border-color: var(--sunset-orange);
  color: var(--sunset-orange);
}

/* --- View Header --- */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.view-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

/* --- Buttons --- */
.btn-add {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-add:hover {
  background: var(--glass-hover);
  transform: translateY(-1px);
}

.btn-save {
  background: linear-gradient(135deg, var(--sunset-orange), var(--sand-dark));
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 123, 76, 0.4);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 10px 24px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: var(--glass);
}

.btn-random {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-random:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 199, 94, 0.3);
}

/* --- Task List (manage view) --- */
.task-list-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.task-list-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-list-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.task-list-meta {
  font-size: 0.72rem;
  opacity: 0.6;
}

.task-list-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--glass-hover);
}

.btn-icon.delete:hover {
  border-color: var(--red-soft);
  color: var(--red-soft);
}

/* --- Plaisirs --- */
.plaisirs-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.filter-btn.active {
  background: var(--gold-soft);
  color: var(--text-dark);
  border-color: var(--gold-soft);
  font-weight: 600;
}

.plaisir-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

.plaisir-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.plaisir-desc {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 2px;
}

.plaisir-duration {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold);
  white-space: nowrap;
}

/* Task in progress — the checkbox circle breathes */
.task-in-progress .task-checkbox {
  border-color: var(--gold);
  background: rgba(240, 199, 94, 0.08);
  animation: circle-breathe 4s ease-in-out infinite;
}

@keyframes circle-breathe {
  0%, 100% {
    border-color: rgba(240, 199, 94, 0.4);
    box-shadow: 0 0 0 0 rgba(240, 199, 94, 0);
  }
  50% {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(240, 199, 94, 0.12);
  }
}

.task-timer {
  font-size: 0.65rem;
  opacity: 0.4;
  font-weight: 300;
  margin-left: auto;
  white-space: nowrap;
}

/* Postpone button on task cards */
.btn-postpone {
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.2;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity 0.2s;
  margin-left: auto;
}
.btn-postpone:hover, .btn-postpone:active {
  opacity: 0.7;
}

/* Urgent tasks (deadline today or overdue) */
.task-urgent {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.task-urgent .task-title::before {
  content: '! ';
  font-weight: 700;
}

/* Priority 4 = urgent (auto from deadline) */
.task-priority.p4 {
  background: #fff;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-urgent 1.5s ease-in-out infinite;
}
/* Stop pulsing when task is done */
.task-card.completed .task-priority.p4 {
  animation: none;
  opacity: 0.3;
}
@keyframes pulse-urgent {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }
}

/* Multi-step dots */
.step-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.step-dot.done {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.step-count {
  font-size: 0.7rem;
  opacity: 0.5;
  margin-left: auto;
}

.task-card.multi-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Postpone button in edit modal */
.btn-postpone-from-modal {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Pause button in edit modal */
.btn-pause-from-modal {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(240, 199, 94, 0.3);
  background: rgba(240, 199, 94, 0.1);
  color: var(--gold);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Delete button in edit modal */
.btn-delete-from-modal {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 100, 100, 0.3);
  background: rgba(255, 100, 100, 0.1);
  color: var(--red-soft, #ff6b6b);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Paused rituals */
.task-list-item.paused {
  opacity: 0.45;
}
.task-list-item.paused .task-list-title {
  text-decoration: line-through;
}

/* --- Breathing Exercise (Coherence Cardiaque) --- */
.breathing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 30px;
}

.breathing-timer {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.5;
  letter-spacing: 0.15em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.breathing-circle-wrap {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 199, 94, 0.6), rgba(240, 199, 94, 0.1));
  box-shadow: 0 0 40px rgba(240, 199, 94, 0.2);
}

.breathing-circle.breathing-inhale {
  width: 180px;
  height: 180px;
  box-shadow: 0 0 60px rgba(240, 199, 94, 0.4);
  transition: width 4s ease-in-out, height 4s ease-in-out, box-shadow 4s ease-in-out;
}

.breathing-circle.breathing-exhale {
  width: 80px;
  height: 80px;
  box-shadow: 0 0 20px rgba(240, 199, 94, 0.1);
  transition: width 6s ease-in-out, height 6s ease-in-out, box-shadow 6s ease-in-out;
}

.breathing-label {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.1em;
  min-height: 1.5em;
}

.breathing-stop {
  padding: 10px 30px;
  border-radius: 25px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.breathing-stop:hover, .breathing-stop:active {
  opacity: 1;
}

/* Sync conflict cards */
.sync-version-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.sync-version-card:active {
  transform: scale(0.97);
  border-color: var(--gold);
}
.sync-version-card .sync-version-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.sync-version-card .sync-version-detail {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Checkbox label in forms */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* Edit button on plaisir cards */
.edit-plaisir {
  opacity: 0.4;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}
.edit-plaisir:hover, .edit-plaisir:active {
  opacity: 0.9;
}

/* Missing duration badge */
.plaisir-duration.missing {
  background: rgba(255, 100, 100, 0.15);
  color: var(--red-soft, #ff6b6b);
}

/* Logged pleasant activities on dashboard */
.logged-plaisir {
  border-color: rgba(240, 199, 94, 0.3);
}
.logged-plaisir .task-checkbox {
  background: var(--gold-soft);
  border-color: var(--gold);
}

/* Plaisir cards — tappable + logged state */
.plaisir-card {
  cursor: pointer;
  transition: all 0.25s ease;
}

.plaisir-card:active {
  transform: scale(0.97);
}

.plaisir-card.logged {
  background: rgba(240, 199, 94, 0.12);
  border-color: rgba(240, 199, 94, 0.3);
}

.plaisir-card.logged .plaisir-title {
  opacity: 0.6;
}

.plaisir-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--text-dark);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 6px;
  vertical-align: middle;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* Suggestions "Et si tu..." */
#plaisirs-suggestions {
  margin-bottom: 20px;
}

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

.suggestions-header h3 {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0;
}

.btn-refresh {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-refresh:active {
  background: var(--glass-hover, rgba(255,255,255,0.15));
}

#suggestions-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.suggestion-card {
  background: linear-gradient(135deg, rgba(240, 199, 94, 0.15), rgba(255, 215, 0, 0.08));
  border: 1px solid rgba(240, 199, 94, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.suggestion-card:active {
  transform: scale(0.95);
  background: linear-gradient(135deg, rgba(240, 199, 94, 0.3), rgba(255, 215, 0, 0.18));
}

.suggestion-card.logged {
  background: rgba(240, 199, 94, 0.25);
  border-color: rgba(240, 199, 94, 0.4);
}

.suggestion-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
}

.suggestion-card-desc {
  font-size: 0.72rem;
  opacity: 0.6;
  margin-top: 4px;
}

/* --- Contacts --- */
.contact-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sunset-orange), var(--sand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-meta {
  font-size: 0.72rem;
  opacity: 0.6;
}

.contact-meta.overdue {
  color: var(--sunset-orange);
  opacity: 1;
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.btn-contacted {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--green-soft);
  background: transparent;
  color: var(--green-soft);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-contacted:hover {
  background: var(--green-soft);
  color: var(--text-dark);
}

/* --- Stats View --- */
.stats-section {
  margin-bottom: 24px;
}

.stats-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 12px;
}

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

.day-cell {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.day-cell.today {
  border-color: var(--gold-soft);
}

.day-label {
  font-size: 0.65rem;
  opacity: 0.5;
  text-transform: uppercase;
}

.day-date {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 4px 0;
}

.day-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.2);
  margin-top: 4px;
  overflow: hidden;
}

.day-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.day-bar-fill.obligations { background: var(--sunset-orange); }
.day-bar-fill.soins { background: var(--soin-green); }
.day-bar-fill.plaisirs { background: var(--gold); }

/* --- Settings --- */
.setting-group {
  margin-bottom: 24px;
}

.setting-group h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

#settings-content input[type="text"],
#settings-content input[type="url"],
#settings-content textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  outline: none;
  transition: border-color 0.2s ease;
}

#settings-content input:focus,
#settings-content textarea:focus {
  border-color: var(--gold-soft);
}

#bg-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

#bg-presets::-webkit-scrollbar {
  height: 3px;
}

#bg-presets::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.bg-preset {
  min-width: 80px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  scroll-snap-align: start;
  position: relative;
}

.bg-preset::after {
  content: attr(title);
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.5rem;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.bg-preset:hover, .bg-preset.active {
  border-color: var(--gold);
  transform: scale(1.05);
}

#settings-content button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#settings-content button:hover {
  background: var(--glass-hover);
}

/* --- Bottom Navigation --- */
#bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(26, 10, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px 8px;
  font-family: inherit;
}

.nav-btn.active {
  opacity: 1;
}

.nav-btn:hover {
  opacity: 0.8;
}

.nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Sparkle — subtle twinkle every ~8s */
.nav-icon.sparkle {
  animation: twinkle 8s ease-in-out infinite;
}
/* Offset the second sparkle icon so they don't flash together */
.nav-btn[data-view="contacts"] .nav-icon.sparkle {
  animation-delay: 4s;
}

@keyframes twinkle {
  0%, 85%, 100% { opacity: 0.8; text-shadow: none; }
  90% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }
  95% { opacity: 0.8; text-shadow: none; }
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Voice Button (bubble floating above "Mes rituels") --- */
.dashboard-footer {
  text-align: center;
  position: relative;
}

.btn-voice-inline {
  position: absolute;
  top: -18px;
  left: calc(50% + 60px);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
}

.btn-voice-inline:active {
  transform: scale(0.85);
}

.btn-voice-inline.listening {
  animation: voice-pulse 1s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(240, 199, 94, 0.5)); }
}

/* --- Blocked Button --- */
/* Freeze button — inspired by Journey's snow mountain */
#btn-blocked {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 14px);
  right: 16px;
  z-index: 50;
  background: linear-gradient(135deg, #1B2845 0%, #2C3E6B 40%, #6CB4EE 80%, #D4E9F7 100%);
  border: 1px solid rgba(180, 220, 255, 0.35);
  border-radius: 28px;
  padding: 12px 20px 12px 16px;
  color: #D4E9F7;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow:
    0 0 12px rgba(108, 180, 238, 0.25),
    0 0 30px rgba(108, 180, 238, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  animation: frost-shimmer 4s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(180, 220, 255, 0.5);
}

/* Floating ice particles — children of button, positioned around it */
#btn-blocked .ice-particle {
  position: absolute;
  color: rgba(180, 220, 255, 0.8);
  pointer-events: none;
  z-index: 2;
}

#btn-blocked .ice-p1 {
  top: -12px;
  right: 20px;
  font-size: 0.75rem;
  animation: ice-float-1 5s ease-in-out infinite;
}

#btn-blocked .ice-p2 {
  top: -8px;
  left: -6px;
  font-size: 0.55rem;
  animation: ice-float-2 7s ease-in-out infinite;
}

#btn-blocked .ice-p3 {
  bottom: -10px;
  right: 40px;
  font-size: 0.6rem;
  animation: ice-float-3 6s ease-in-out infinite;
  animation-delay: -2s;
}

#btn-blocked .ice-p4 {
  top: -6px;
  left: 30px;
  font-size: 0.5rem;
  animation: ice-float-1 8s ease-in-out infinite;
  animation-delay: -3s;
}

/* Frost edge glow on button */
#btn-blocked::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 50%, rgba(180, 220, 255, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

/* Inner frost crystals text */
#btn-blocked .blocked-label {
  position: relative;
  z-index: 1;
}

#btn-blocked .blocked-label::before {
  content: '✦';
  margin-right: 6px;
  font-size: 0.7rem;
  opacity: 0.7;
  animation: crystal-pulse 3s ease-in-out infinite;
}

#btn-blocked:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 20px rgba(108, 180, 238, 0.45),
    0 0 50px rgba(108, 180, 238, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(180, 220, 255, 0.6);
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(180, 220, 255, 0.9);
}

@keyframes frost-shimmer {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(108, 180, 238, 0.25),
      0 0 30px rgba(108, 180, 238, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow:
      0 0 20px rgba(108, 180, 238, 0.4),
      0 0 45px rgba(108, 180, 238, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

@keyframes ice-float-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  25% { transform: translateY(-8px) rotate(45deg); opacity: 0.9; }
  50% { transform: translateY(-4px) rotate(90deg); opacity: 0.4; }
  75% { transform: translateY(-10px) rotate(135deg); opacity: 0.7; }
}

@keyframes ice-float-2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
  33% { transform: translate(-5px, -6px) rotate(60deg); opacity: 0.8; }
  66% { transform: translate(3px, -3px) rotate(120deg); opacity: 0.4; }
}

@keyframes ice-float-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-7px) rotate(180deg); opacity: 0.8; }
}

@keyframes crystal-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* --- Overlays --- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 10, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.4s ease;
}

/* Blocked overlay — starts frozen, feels like shelter */
#blocked-overlay {
  background: linear-gradient(
    170deg,
    rgba(15, 20, 40, 0.92) 0%,
    rgba(27, 40, 69, 0.90) 30%,
    rgba(44, 62, 107, 0.85) 50%,
    rgba(108, 180, 238, 0.15) 80%,
    rgba(212, 233, 247, 0.08) 100%
  );
  animation: thaw 2s ease forwards;
}

@keyframes thaw {
  0% {
    background: linear-gradient(
      170deg,
      rgba(15, 20, 40, 0.95) 0%,
      rgba(27, 40, 69, 0.95) 30%,
      rgba(44, 62, 107, 0.90) 50%,
      rgba(108, 180, 238, 0.25) 80%,
      rgba(212, 233, 247, 0.15) 100%
    );
  }
  100% {
    background: linear-gradient(
      170deg,
      rgba(26, 10, 46, 0.88) 0%,
      rgba(45, 27, 78, 0.85) 30%,
      rgba(107, 76, 130, 0.60) 50%,
      rgba(212, 150, 60, 0.15) 80%,
      rgba(249, 210, 157, 0.08) 100%
    );
  }
}

#blocked-overlay .overlay-content h2 {
  color: #D4E9F7;
  animation: text-warm 2.5s ease forwards;
}

@keyframes text-warm {
  0% { color: #D4E9F7; text-shadow: 0 0 15px rgba(108, 180, 238, 0.3); }
  100% { color: var(--sand-light); text-shadow: 0 0 15px rgba(240, 199, 94, 0.2); }
}

.overlay.hidden {
  display: none;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-content {
  text-align: center;
  max-width: 420px;
}

.overlay-content h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--sand-light);
}

.overlay-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 12px;
  opacity: 0.85;
}

#cortisol-suggestion {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  margin: 20px 0;
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

#blocked-suggestion {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  animation: suggestion-thaw 2.5s ease forwards;
  border: 1px solid rgba(108, 180, 238, 0.2);
  background: rgba(27, 40, 69, 0.4);
  color: #B8D4E3;
}

@keyframes suggestion-thaw {
  0% {
    border-color: rgba(108, 180, 238, 0.3);
    background: rgba(27, 40, 69, 0.5);
    color: #B8D4E3;
  }
  100% {
    border-color: rgba(240, 199, 94, 0.2);
    background: rgba(240, 199, 94, 0.08);
    color: var(--gold);
  }
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.overlay-actions button {
  padding: 12px 24px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.overlay-actions button:hover {
  background: var(--glass-hover);
}

.overlay-actions button:last-child {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--text-dark);
  border: none;
}

/* --- Modals --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 10, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(170deg, rgba(107, 76, 130, 0.6), rgba(45, 27, 78, 0.8));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-content h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.8;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-soft);
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.form-group select option {
  background: var(--sky-deep);
  color: var(--text-light);
}

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

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-group.radio-group-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.radio-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.radio-card:has(input:checked) {
  border-color: var(--gold-soft);
  background: rgba(240, 199, 94, 0.15);
}

.radio-card input {
  display: none;
}

.weekday-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weekday-selector label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.weekday-selector label:has(input:checked) {
  border-color: var(--gold-soft);
  background: rgba(240, 199, 94, 0.15);
}

.weekday-selector input {
  display: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Secondary actions row (pause + delete) */
.form-actions-secondary {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.form-actions-secondary .btn-pause-from-modal,
.form-actions-secondary .btn-delete-from-modal {
  flex: 1;
  text-align: center;
}

/* --- Empty states --- */
.empty-state {
  text-align: center;
  padding: 30px 20px;
  opacity: 0.6;
  font-size: 0.9rem;
}

.empty-state .empty-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

/* --- Projects --- */
.project-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin: 16px 0 10px;
}

.project-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.project-card:hover {
  background: var(--glass-hover);
}

.project-card.expanded {
  background: var(--glass-hover);
}

.project-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

.project-name {
  font-size: 1rem;
  font-weight: 700;
}

.project-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}

.project-tag {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-tag.nourishing {
  background: rgba(126, 191, 142, 0.2);
  color: var(--soin-green);
}

.project-tag.stressful {
  background: rgba(212, 115, 108, 0.2);
  color: var(--red-soft);
}

.project-tag.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.project-deadline {
  font-size: 0.7rem;
  opacity: 0.7;
}

.project-deadline.urgent {
  color: var(--red-soft);
  opacity: 1;
  font-weight: 600;
}

.project-progress {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.2);
  overflow: hidden;
}

.project-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  transition: width 0.4s ease;
}

.project-progress-text {
  font-size: 0.7rem;
  opacity: 0.6;
  white-space: nowrap;
}

.project-actions {
  display: flex;
  gap: 6px;
}

/* Project checklist (expanded) */
.project-checklist {
  margin-top: 12px;
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
  display: none;
}

.project-card.expanded .project-checklist {
  display: block;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.checklist-item.completed .checklist-title {
  text-decoration: line-through;
  opacity: 0.5;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.checklist-item.completed .checklist-checkbox {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.checklist-item.completed .checklist-checkbox::after {
  content: '✓';
  font-size: 0.65rem;
  color: var(--text-dark);
  font-weight: 700;
}

.checklist-title {
  flex: 1;
  font-size: 0.85rem;
}

.checklist-delete {
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.3;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  transition: opacity 0.2s;
}

.checklist-delete:hover {
  opacity: 1;
  color: var(--red-soft);
}

.checklist-add {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.checklist-add input {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
}

.checklist-add input:focus {
  border-color: var(--gold-soft);
}

.checklist-add button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.checklist-add button:hover {
  background: var(--glass-hover);
}

.project-card .project-description {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 4px;
}

/* --- Media Shelf --- */
#media-shelf {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
}

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

.shelf-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.8;
}

.shelf-header .btn-add {
  padding: 4px 12px;
  font-size: 0.8rem;
}

.media-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-card:hover {
  background: var(--glass-hover);
}

.media-card.finished,
.media-card.aside {
  opacity: 0.5;
}

.media-icon {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
}

.media-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.media-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-where {
  font-size: 0.7rem;
  opacity: 0.6;
}

.media-status-tag {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.media-status-tag.in_progress {
  background: rgba(240, 199, 94, 0.15);
  color: var(--gold);
}

.media-status-tag.finished {
  background: rgba(126, 191, 142, 0.15);
  color: var(--soin-green);
}

.media-status-tag.aside {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.media-status-tag.upcoming {
  background: rgba(108, 180, 238, 0.15);
  color: #6CB4EE;
}

.media-card.upcoming {
  opacity: 0.7;
  border-style: dashed;
}

.shelf-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.4;
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 6px 0;
  transition: opacity 0.2s;
}

.shelf-toggle:hover {
  opacity: 0.7;
}

.media-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Suggestions list (settings) */
#suggestions-list {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.suggestion-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.suggestion-item button {
  width: auto !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
}

.suggestion-text {
  flex: 1 1 auto !important;
  font-size: 0.8rem;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.suggestion-delete {
  flex: 0 0 auto !important;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.3;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.2s;
}

.suggestion-delete:hover {
  opacity: 1;
  color: var(--red-soft);
}

/* Date input styling */
input[type="date"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input[type="date"]:focus {
  border-color: var(--gold-soft);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .dashboard-grid,
  .dashboard-grid.three-cols {
    grid-template-columns: 1fr;
  }

  #daily-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .radio-group.radio-group-3 {
    grid-template-columns: 1fr;
  }

  #greeting {
    font-size: 1.25rem;
  }

  #bg-presets {
    grid-template-columns: repeat(3, 1fr);
  }

  .week-grid {
    gap: 4px;
  }

  .day-cell {
    padding: 6px 2px;
  }

  /* Mountain: wider angle but same size on mobile */
  #mountain-silhouette::before {
    border-left: 60vw solid transparent;
    border-right: 60vw solid transparent;
    border-bottom: 35vh solid rgba(74, 53, 96, 0.35);
  }

  /* Nav labels smaller */
  .nav-label {
    font-size: 0.5rem;
    letter-spacing: 0;
  }

  /* Blocked button: compact snowflake on mobile */
  #btn-blocked {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 14px;
  }
  #btn-blocked .blocked-text {
    display: none;
  }
  #btn-blocked .blocked-icon {
    display: block;
    font-size: 1.4rem;
  }
  #btn-blocked .blocked-label::before {
    display: none;
  }
  #btn-blocked::before {
    border-radius: 50%;
  }
}

/* Desktop: hide the snowflake icon, show text */
.blocked-icon {
  display: none;
}

@media (max-width: 380px) {
  #app-header {
    padding: 14px 14px 10px;
  }

  #content {
    padding: 0 14px 14px;
  }

  .nav-label {
    font-size: 0.55rem;
  }
}

/* --- Notification toast --- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 10px 20px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 200;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.4s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}
