@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Brand tokens — Teal / Studio (default) ──────────────────── */
:root {
  --plum:       #3A7A82;  /* Teal Dark */
  --plum-dark:  #0A0A0A;  /* Ink Black */
  --plum-mid:   #5A9AA2;  /* Teal Mid */
  --plum-light: #A8D4DA;  /* Teal Light */
  --lav:        #EEF7F8;  /* Light Teal */
  --gold:       #A8D4DA;  /* Teal Light — topbar rule */
  --gold-soft:  rgba(168,212,218,0.18);
  --ink:        #0A0A0A;  /* Ink Black */
  --ink-soft:   #3A7A82;  /* Teal Dark */
  --ink-faint:  #6B6B6B;  /* Mid Gray */
  --white:      #FFFFFF;
  --mist:       #EEF7F8;  /* Light Teal */
  --shadow:     rgba(10,10,10,0.08);
  --border:     #C2E2E6;
}

/* ── Blush theme (dusty rose) ─────────────────────────────────── */
[data-theme="blush"] {
  --plum:       #A84E68;
  --plum-dark:  #5A1E30;
  --plum-mid:   #C47890;
  --plum-light: #E4A8B8;
  --lav:        #FAEFF3;
  --gold:       #D4A07A;
  --gold-soft:  rgba(212,160,122,0.18);
  --ink:        #40182A;
  --ink-soft:   #804860;
  --ink-faint:  #C090A4;
  --mist:       #FDF7F9;
  --shadow:     rgba(90,30,50,0.08);
  --border:     #F0DBE2;
}

/* ── Slate theme (steel blue) ────────────────────────────────── */
[data-theme="slate"] {
  --plum:       #3A5878;
  --plum-dark:  #1A2838;
  --plum-mid:   #5A7890;
  --plum-light: #90B0C8;
  --lav:        #EBF0F5;
  --gold:       #6A9AB8;
  --gold-soft:  rgba(106,154,184,0.18);
  --ink:        #1A2838;
  --ink-soft:   #3A5878;
  --ink-faint:  #88A8C0;
  --mist:       #F2F5F8;
  --shadow:     rgba(26,40,56,0.08);
  --border:     #D0DDE8;
}

/* ── Sage theme (forest green) ───────────────────────────────── */
[data-theme="sage"] {
  --plum:       #3D7058;
  --plum-dark:  #1A3028;
  --plum-mid:   #5A9078;
  --plum-light: #90B8A8;
  --lav:        #EBF3EF;
  --gold:       #C8B07A;
  --gold-soft:  rgba(200,176,122,0.18);
  --ink:        #1A3028;
  --ink-soft:   #3D7058;
  --ink-faint:  #80A893;
  --mist:       #F2F6F4;
  --shadow:     rgba(26,48,40,0.08);
  --border:     #CCE0D6;
}

/* ── Caramel theme (warm luxury) ─────────────────────────────── */
[data-theme="caramel"] {
  --plum:       #8C5A38;
  --plum-dark:  #402018;
  --plum-mid:   #A87850;
  --plum-light: #C8A888;
  --lav:        #FAF3EC;
  --gold:       #C8A060;
  --gold-soft:  rgba(200,160,96,0.18);
  --ink:        #402018;
  --ink-soft:   #7A5038;
  --ink-faint:  #B89078;
  --mist:       #FDF7F0;
  --shadow:     rgba(64,32,24,0.08);
  --border:     #EAD8C4;
}

/* ── Midnight theme (deep navy) ──────────────────────────────── */
[data-theme="midnight"] {
  --plum:       #1E3A5A;
  --plum-dark:  #0A1820;
  --plum-mid:   #3A5A78;
  --plum-light: #7A9AB8;
  --lav:        #E8EFF5;
  --gold:       #8AACCC;
  --gold-soft:  rgba(138,172,204,0.18);
  --ink:        #0A1820;
  --ink-soft:   #2A4A68;
  --ink-faint:  #7A9AB0;
  --mist:       #F0F4F8;
  --shadow:     rgba(10,24,32,0.08);
  --border:     #C8D8E8;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--mist);
  color: var(--ink);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
}

/* ── Top bar ──────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 10px;
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  flex-shrink: 0;
  gap: 12px;
}
.topbar-left  { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.account-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  color: var(--white);
  transition: background 0.15s;
  flex-shrink: 0;
}
.account-btn:hover { background: rgba(255,255,255,0.12); }

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-clip {
  width: 94px;
  height: 56px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.logo-img {
  position: absolute;
  height: 162px;
  width: 162px;
  top: -42px;
  left: -26px;
}

.date-pill {
  background: var(--lav);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.cal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--plum);
  border: none;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  color: var(--white);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: opacity .2s;
}
.cal-btn:hover { opacity: .85; }

.nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background .15s;
}
.nav-btn:hover { background: var(--lav); }

/* ── Theme picker ─────────────────────────────────────────────── */
.theme-picker-wrap {
  position: relative;
}
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
  padding: 0;
}
.theme-toggle-btn:hover { border-color: var(--plum-mid); }
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--plum);
  transition: background .3s;
  display: block;
}

.theme-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px var(--shadow);
  z-index: 200;
  animation: popIn .18s ease;
  min-width: 220px;
}
.theme-drawer.open { display: block; }
.theme-drawer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.theme-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.theme-swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: transform .15s, border-color .15s;
  position: relative;
}
.theme-swatch:hover .theme-swatch-dot { transform: scale(1.12); }
.theme-swatch.active .theme-swatch-dot {
  border-color: var(--ink);
  transform: scale(1.12);
}
.theme-swatch-dot[data-color="plum"]     { background: #3A7A82; }
.theme-swatch-dot[data-color="blush"]    { background: #A84E68; }
.theme-swatch-dot[data-color="slate"]    { background: #3A5878; }
.theme-swatch-dot[data-color="sage"]     { background: #3D7058; }
.theme-swatch-dot[data-color="caramel"]  { background: #8C5A38; }
.theme-swatch-dot[data-color="midnight"] { background: #1E3A5A; }
.theme-swatch-name {
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-faint);
  text-transform: capitalize;
  letter-spacing: 0.03em;
}
.theme-swatch.active .theme-swatch-name { color: var(--ink); }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  flex-shrink: 0;
  gap: 4px;
}
.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .2s;
  letter-spacing: 0.01em;
}
.tab:hover  { color: var(--plum-mid); }
.tab.active { color: var(--plum); border-bottom-color: var(--plum); }

/* ── Main layout ──────────────────────────────────────────────── */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.panel { display: none; width: 100%; height: 100%; }
.panel.active { display: flex; }

/* ─────────────────────────────────────────────────────────────── */
/* DAILY VIEW                                                      */
/* ─────────────────────────────────────────────────────────────── */
#daily { display: none; flex-direction: row; overflow: hidden; }
#daily.active { display: flex; }

/* Time column */
.time-col {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--white);
  padding-bottom: 40px;
}
.time-col::-webkit-scrollbar { width: 4px; }
.time-col::-webkit-scrollbar-thumb { background: var(--lav); border-radius: 2px; }

.time-slot {
  display: flex;
  align-items: flex-start;
  min-height: 60px;
  padding: 0 12px;
  border-bottom: 1px solid var(--lav);
  cursor: pointer;
}
.time-slot:hover { background: var(--mist); }
.time-label {
  font-size: 11px;
  color: var(--ink-faint);
  padding-top: 8px;
  width: 44px;
  flex-shrink: 0;
}
.time-event-area { flex: 1; padding: 6px 0 6px 8px; min-height: 60px; }

/* Event blocks */
.event-block {
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 3px;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.01em;
}
.ev-lav   { background: var(--lav);       color: var(--plum-dark); }
.ev-plum  { background: var(--plum);      color: var(--white);     }
.ev-gold  { background: var(--gold-soft); color: #7B5C2A;          }
.ev-sage  { background: #D8EDE5;          color: #2A5040;          }

.event-block .ev-del {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: inherit; opacity: 0.5; display: none; line-height: 1;
}
.event-block:hover .ev-del { display: block; }

.add-event-btn {
  font-size: 11px;
  color: var(--plum);
  cursor: pointer;
  padding: 2px 0;
  display: none;
  font-weight: 500;
}
.time-slot:hover .add-event-btn { display: block; }

/* Right side of daily */
.daily-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--mist);
}

.daily-pencil-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.pencil-label { font-size: 13px; opacity: .5; }

.tool-btn, .size-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  color: var(--ink-soft);
}
.tool-btn.active, .size-btn.active {
  background: var(--lav);
  border-color: var(--plum-mid);
  color: var(--plum);
}
.size-btn { font-size: 11px; font-weight: 600; font-family: 'Inter',sans-serif; width: 26px; }
.tool-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }

.color-swatch {
  width: 20px; height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.color-swatch.active { border-color: var(--white); transform: scale(1.2); box-shadow: 0 0 0 2px var(--plum); }

.clear-btn {
  font-size: 11px; font-weight: 500; font-family: 'Inter',sans-serif;
  color: var(--ink-soft); background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 4px 10px; cursor: pointer;
  transition: all .15s; margin-left: auto;
}
.clear-btn:hover { border-color: var(--plum-mid); color: var(--plum); }

.daily-right-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
}
.daily-right-cards {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  flex: 1;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-plum { background: var(--plum); }

/* Task list */
.task-list { list-style: none; }
.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--lav);
}
.task-item:last-child { border-bottom: none; }
.task-cb {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--plum-mid);
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--white);
  position: relative;
  transition: all .15s;
}
.task-cb:checked { background: var(--plum); border-color: var(--plum); }
.task-cb:checked::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 10px;
}
.task-text {
  flex: 1;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}
.task-text.done { text-decoration: line-through; color: var(--ink-faint); }
.task-del-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 16px;
  opacity: 0; transition: opacity .15s;
  line-height: 1; padding: 0 2px;
}
.task-item:hover .task-del-btn { opacity: 1; }

.task-input-row {
  display: flex; gap: 6px; margin-top: 10px;
}
.task-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Inter',sans-serif;
  color: var(--ink);
  background: var(--mist);
  outline: none;
  transition: border-color .2s;
}
.task-input:focus { border-color: var(--plum); }
.task-add-btn {
  width: 32px; height: 32px;
  background: var(--plum);
  color: var(--white);
  border: none; border-radius: 10px;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

/* Quote card */
.quote-card {
  background: linear-gradient(135deg, #0A0A0A 0%, #3A7A82 100%);
  border-radius: 16px;
  padding: 20px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(58,122,130,.25);
  position: relative;
  overflow: hidden;
}
.quote-card::before {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.quote-butterfly {
  width: 22px; height: 22px;
  color: rgba(255,255,255,.5);
  margin-bottom: 10px;
  flex-shrink: 0;
}
.quote-text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--white);
  line-height: 1.65;
  text-align: center;
}

/* Daily canvas area */
.daily-canvas-wrap {
  flex: 1;
  position: relative;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}
.daily-canvas-label {
  position: absolute;
  top: 12px; left: 14px;
  font-size: 11px;
  color: var(--ink-faint);
  pointer-events: none;
  font-style: italic;
  letter-spacing: 0.02em;
}
.ruled-lines { position: absolute; inset: 0; pointer-events: none; }
.ruled-line  {
  position: absolute; left: 0; right: 0;
  height: 1px; background: var(--lav);
}
#dailyCanvas { position: absolute; inset: 0; touch-action: none; }

/* ─────────────────────────────────────────────────────────────── */
/* WEEKLY VIEW                                                     */
/* ─────────────────────────────────────────────────────────────── */
#weekly { display: none; flex-direction: column; }
#weekly.active { display: flex; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  gap: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.week-day {
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  cursor: default;
}
.week-day:last-child { border-right: none; }
.week-day.today { background: var(--lav); }

.week-day-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.week-day-num {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}
.today-num { color: var(--plum); }
.week-events { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
.week-chip {
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-add {
  font-size: 11px;
  color: var(--plum-mid);
  cursor: pointer;
  padding: 2px 0;
  font-weight: 500;
}
.week-add:hover { color: var(--plum); }

.week-tasks-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  overflow-x: auto;
}
.strip-title {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.strip-tasks { display: flex; gap: 12px; flex-wrap: wrap; }
.strip-task {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-soft);
}
.strip-task input[type=checkbox] {
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--plum-mid);
  appearance: none;
  cursor: pointer;
  background: var(--white);
  transition: all .15s;
}
.strip-task input[type=checkbox]:checked { background: var(--plum); border-color: var(--plum); }

/* ─────────────────────────────────────────────────────────────── */
/* NOTES VIEW                                                      */
/* ─────────────────────────────────────────────────────────────── */
#notes { display: none; flex-direction: column; }
#notes.active { display: flex; }

.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.tool-group { display: flex; gap: 5px; align-items: center; }
.pencil-badge {
  font-size: 11px;
  color: var(--plum);
  font-weight: 500;
  background: var(--lav);
  border-radius: 10px;
  padding: 3px 10px;
  margin-left: auto;
  letter-spacing: 0.01em;
}

.canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--white);
}
#noteCanvas { position: absolute; inset: 0; touch-action: none; }

/* ─────────────────────────────────────────────────────────────── */
/* MODAL                                                           */
/* ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,10,.4);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 28px;
  width: min(400px, 90vw);
  box-shadow: 0 12px 50px rgba(10,10,10,.18);
  animation: popIn .22s ease;
}
@keyframes popIn {
  from { opacity:0; transform: scale(.93) translateY(12px); }
  to   { opacity:1; transform: scale(1)   translateY(0);    }
}
.modal h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--ink);
}
.modal-field { margin-bottom: 14px; }
.modal-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.modal-field input,
.modal-field select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--mist);
  outline: none;
  transition: border-color .2s;
}
.modal-field input:focus,
.modal-field select:focus { border-color: var(--plum); }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-pick {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.color-pick:hover { transform: scale(1.15); }
.color-pick.sel   { border-color: var(--ink); transform: scale(1.15); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}
.btn-ghost {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: none;
  font-family: 'Inter',sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--plum-mid); color: var(--plum); }
.btn-primary {
  padding: 9px 20px;
  background: var(--plum);
  border: none;
  border-radius: 10px;
  font-family: 'Inter',sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .88; }

/* Calendar modal list */
.cal-option-list { display: flex; flex-direction: column; gap: 8px; }
.cal-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  transition: all .15s;
}
.cal-option:hover { border-color: var(--plum); background: var(--lav); }
.cal-option-icon { font-size: 20px; }

/* ─────────────────────────────────────────────────────────────── */
/* BIG 3                                                           */
/* ─────────────────────────────────────────────────────────────── */
.big3-card { min-width: 180px; }

.big3-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--lav);
}
.big3-item:last-child { border-bottom: none; }

.big3-num {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--plum);
  width: 14px;
  flex-shrink: 0;
  text-align: center;
}

.big3-cb {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--plum-mid);
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--white);
  position: relative;
  transition: all .15s;
}
.big3-cb:checked { background: var(--plum); border-color: var(--plum); }
.big3-cb:checked::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 10px;
}

.big3-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  padding: 0;
  line-height: 1.4;
  min-width: 0;
}
.big3-input.done { text-decoration: line-through; color: var(--ink-faint); }
.big3-input::placeholder { color: var(--ink-faint); font-style: italic; }

/* ─────────────────────────────────────────────────────────────── */
/* HABITS STRIP                                                    */
/* ─────────────────────────────────────────────────────────────── */
.habits-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 6px var(--shadow);
  min-height: 44px;
  overflow: hidden;
}

.habits-list {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
}
.habits-list::-webkit-scrollbar { display: none; }

.habit-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--mist);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}
.habit-chip:hover { border-color: var(--plum-mid); }
.habit-chip.done  { background: var(--plum); border-color: var(--plum); color: var(--white); }

.habit-chip-check { font-size: 10px; opacity: 0; }
.habit-chip.done .habit-chip-check { opacity: 1; }

.habits-edit-btn {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink-faint);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.habits-edit-btn:hover { border-color: var(--plum-mid); color: var(--plum); }

.habits-empty {
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────── */
/* RECURRING EVENT ICON                                            */
/* ─────────────────────────────────────────────────────────────── */
.ev-recurring { font-size: 9px; opacity: 0.6; margin-left: 3px; vertical-align: middle; }

/* ─────────────────────────────────────────────────────────────── */
/* HABIT MANAGER (inside modal)                                    */
/* ─────────────────────────────────────────────────────────────── */
.habit-manager-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.habit-manager-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--mist);
  border: 1px solid var(--border);
}
.habit-manager-name { flex: 1; font-size: 13px; color: var(--ink); }
.habit-rm-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 18px; line-height: 1;
  padding: 0 2px; opacity: 0.5; transition: opacity .15s;
}
.habit-rm-btn:hover { opacity: 1; color: #C0392B; }

/* ─────────────────────────────────────────────────────────────── */
/* MONTH VIEW                                                      */
/* ─────────────────────────────────────────────────────────────── */
#month { display: none; flex-direction: column; overflow: hidden; }
#month.active { display: flex; }

.month-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.month-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  min-width: 180px;
  text-align: center;
}

.month-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.month-dow-row > div {
  text-align: center;
  padding: 8px 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  overflow-y: auto;
  background: var(--mist);
  gap: 1px;
}
.month-cell {
  background: var(--white);
  padding: 8px;
  min-height: 80px;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.month-cell:hover { background: var(--lav); }
.month-cell.today { background: rgba(168,212,218,0.2); }
.month-cell.other-month { opacity: 0.4; }

.month-day-num {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}
.month-cell.today .month-day-num { color: var(--plum); font-weight: 500; }

.month-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.month-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.month-dot.ev-lav  { background: var(--plum-light); }
.month-dot.ev-plum { background: var(--plum); }
.month-dot.ev-gold { background: var(--gold); }
.month-dot.ev-sage { background: #90B8A8; }

/* ─────────────────────────────────────────────────────────────── */
/* Scrollbar polish                                                */
/* ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--plum-light); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
