/* ============================================================
   SOMEDAYO — style.css
============================================================ */

:root {
  --cream: #FAF7F2;
  --warm-white: #FFFDF9;
  --ink: #1C1A17;
  --ink-light: #5C574F;
  --ink-faint: #A09890;
  --ryan: #3A6BC4;
  --ryan-light: #D8E4F0;
  --louise: #C4603A;
  --louise-light: #F0E0D8;
  --gold: #C9A84C;
  --gold-light: #F5EDD4;
  --border: #E8E2D9;
  --shadow: 0 2px 16px rgba(28,26,23,0.07);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  padding: 48px 24px 80px;
}

.page { max-width: 780px; margin: 0 auto; }

/* ============================================================
   GATE
============================================================ */
#gate {
  position: fixed; inset: 0; background: var(--cream); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate-box {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 36px; max-width: 380px; width: 100%;
  box-shadow: 0 8px 40px rgba(28,26,23,0.12); text-align: center;
}
.gate-icon    { font-size: 36px; margin-bottom: 16px; }
.gate-title   { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.gate-sub     { font-size: 14px; color: var(--ink-faint); margin-bottom: 28px; font-style: italic; }
.gate-input {
  width: 100%; background: var(--cream); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; font-size: 15px;
  font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none;
  text-align: center; letter-spacing: 0.05em; margin-bottom: 12px; transition: border-color 0.2s;
}
.gate-input:focus { border-color: var(--ryan); }
.gate-btn {
  width: 100%; padding: 12px; border-radius: 10px; border: none;
  background: var(--ink); color: var(--cream); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.15s;
}
.gate-btn:hover    { background: var(--ryan); }
.gate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.gate-error   { font-size: 13px; color: var(--louise); margin-top: 10px; }
.gate-success { font-size: 13px; color: #2d6e35; margin-top: 10px; font-style: italic; }
#gate.hidden  { display: none; }

/* ============================================================
   PRESENCE
============================================================ */
.presence-bar {
  position: fixed; top: 12px; right: 16px; z-index: 600;
  display: flex; gap: 8px; align-items: center;
}
.presence-pill {
  display: flex; align-items: center; gap: 6px; background: var(--warm-white);
  border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px;
  font-size: 12px; color: var(--ink-light); box-shadow: var(--shadow); transition: opacity 0.3s;
}
.presence-dot { width: 7px; height: 7px; border-radius: 50%; animation: pulse 2s infinite; }
.presence-dot.ryan   { background: var(--ryan); }
.presence-dot.louise { background: var(--louise); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.user-pill {
  background: var(--warm-white); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 12px; font-size: 12px; color: var(--ink-faint);
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.15s;
}
.user-pill:hover { border-color: var(--louise); color: var(--louise); }

/* ============================================================
   HEADER
============================================================ */
.header {
  text-align: center; padding: 56px 0 48px;
  border-bottom: 1px solid var(--border); margin-bottom: 48px;
}
/* Logo SVG container in header */
#header-logo-container {
  display: flex; justify-content: center; align-items: center;
  min-height: 80px;
}
#header-logo-container svg { max-width: 380px; }

/* Gate logo — smaller */
#gate-logo-container svg { max-width: 260px !important; }

/* Legacy h1 kept in case needed */
.header h1 {
  font-family: 'Lora', serif; font-size: clamp(28px,5vw,44px);
  font-weight: 600; color: var(--ink); line-height: 1.2; margin-bottom: 8px;
}
.header h1 .accent    { color: var(--louise); }
.header-tagline { font-family: 'Lora', serif; font-style: italic; font-size: 14px; color: var(--ink-faint); margin-bottom: 14px; }
.header-date    { margin-top: 18px; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.08em; }
.reset-btn {
  margin-top: 16px; background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 12px; font-size: 11px; color: var(--ink-faint);
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s;
}
.reset-btn:hover { border-color: var(--louise); color: var(--louise); }

/* ============================================================
   SECTION TITLES
============================================================ */
.section-title {
  font-family: 'Lora', serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   MONTH CARDS (legacy styles kept for any fallback use)
============================================================ */
.months-grid  { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.month-card   { background: var(--warm-white); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.month-card.drag-over { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-light), var(--shadow); }
.month-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.month-header-left { display: flex; align-items: center; gap: 14px; }
.month-badge  { height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; padding: 0 12px; background: var(--cream); color: var(--ink-light); border: 1px solid var(--border); white-space: nowrap; letter-spacing: 0.03em; }
.month-card.has-content .month-badge { background: var(--ryan-light); color: var(--ryan); border-color: var(--ryan-light); }
.month-label   { font-size: 15px; font-weight: 500; color: var(--ink); }
.month-preview { font-size: 12px; color: var(--ink-faint); margin-top: 2px; font-style: italic; }
.month-toggle  { font-size: 18px; color: var(--ink-faint); transition: transform 0.2s; line-height: 1; }
.month-card.open .month-toggle { transform: rotate(180deg); }
.month-body { display: none; padding: 16px 20px 20px; }
.month-card.open .month-body { display: block; }
.drop-hint { display: none; border: 2px dashed var(--gold); border-radius: 8px; padding: 10px; text-align: center; font-size: 12px; color: var(--gold); margin-bottom: 10px; font-style: italic; }
.month-card.drag-over .drop-hint { display: block; }

/* ============================================================
   ITEMS
============================================================ */
.items-list { list-style: none; margin-bottom: 12px; }
.item-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.item-row:last-child { border-bottom: none; }
.item-dot   { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.item-dot.ryan   { background: var(--ryan); }
.item-dot.louise { background: var(--louise); }
.item-dot.shared { background: var(--gold); }
.item-main { flex: 1; min-width: 0; }
.item-top  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item-text { font-size: 14px; color: var(--ink); line-height: 1.4; }
.item-desc { font-size: 12px; color: var(--ink-faint); font-style: italic; margin-top: 3px; line-height: 1.4; }
.item-cost-tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500;
  color: var(--ink-faint); background: var(--cream); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; margin-top: 4px;
}
.item-drag-handle { cursor: grab; color: var(--border); font-size: 11px; padding: 2px; flex-shrink: 0; touch-action: none; line-height: 1.5; opacity: 0; }
.item-row:hover .item-drag-handle { opacity: 1; }
.item-drag-handle:active { cursor: grabbing; opacity: 1; }
.item-row.dragging-item { opacity: 0.35; background: var(--gold-light); border-radius: 8px; }
.item-row.drag-target-above { border-top: 2px solid var(--gold); }
.item-row.drag-target-below { border-bottom: 2px solid var(--gold) !important; }
.item-actions { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.item-row:hover .item-actions { opacity: 1; }
@media (max-width: 768px) { .item-actions { opacity: 1; } .item-drag-handle { opacity: 0.3; } }
.item-edit   { background: none; border: none; cursor: pointer; color: var(--ink-faint); font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 4px; transition: color 0.15s; }
.item-edit:hover   { color: var(--ryan); }
.item-delete { background: none; border: none; cursor: pointer; color: var(--ink-faint); font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 4px; transition: color 0.15s; }
.item-delete:hover { color: var(--louise); }
.item-cat { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 10px; vertical-align: middle; flex-shrink: 0; opacity: 0.85; }

/* CHECKBOX */
.item-check {
  width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border);
  background: transparent; cursor: pointer; flex-shrink: 0;
  appearance: none; -webkit-appearance: none; transition: all 0.15s; margin-top: 3px; position: relative;
}
.item-check:hover   { border-color: var(--ryan); }
.item-check:checked { background: var(--ryan); border-color: var(--ryan); }
.item-check:checked::after { content: '✓'; position: absolute; color: white; font-size: 11px; font-weight: 700; top: -1px; left: 2px; }
.item-row.completed { opacity: 0.5; }
.item-row.completed .item-text  { text-decoration: line-through; color: var(--ink-faint); }
.item-row.completed .item-check { background: var(--ryan); border-color: var(--ryan); }
.item-row.completed .item-check::after { content: '✓'; position: absolute; color: white; font-size: 11px; font-weight: 700; top: -1px; left: 2px; }

/* DATE PILL */
.item-date {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 500;
  color: var(--ink-faint); background: var(--cream); border: 1px solid var(--border);
  border-radius: 12px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; white-space: nowrap;
}
.item-date.overdue { background: #FEE; border-color: #fca5a5; color: #dc2626; }
.item-date.today   { background: var(--gold-light); border-color: var(--gold); color: #7a5c0a; }
.item-date.soon    { background: var(--ryan-light); border-color: var(--ryan); color: var(--ryan); }

/* SHOW/HIDE COMPLETED TOGGLE */
.completed-toggle { font-size: 11px; color: var(--ink-faint); cursor: pointer; padding: 4px 0; display: flex; align-items: center; gap: 5px; user-select: none; margin-top: 4px; }
.completed-toggle:hover { color: var(--ink-light); }

/* ============================================================
   EDIT MODAL
============================================================ */
#editModal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(28,26,23,0.45); align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
#editModal.open { display: flex; }
.edit-box {
  background: var(--warm-white); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; max-width: 420px; width: 100%; box-shadow: 0 12px 48px rgba(28,26,23,0.2);
}
.edit-title         { font-family: 'Lora', serif; font-size: 16px; font-weight: 600; margin-bottom: 18px; color: var(--ink); }
.edit-row           { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.edit-input         { flex: 1; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; }
.edit-input:focus   { border-color: var(--ryan); }
.edit-who-group     { display: flex; gap: 4px; margin-bottom: 10px; }
.edit-cost-row      { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.edit-section-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.edit-select        { width: 100%; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; cursor: pointer; margin-bottom: 12px; }
.edit-actions       { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.edit-save { padding: 8px 20px; border-radius: 8px; border: none; background: var(--ink); color: var(--cream); font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.15s; }
.edit-save:hover   { background: var(--ryan); }
.edit-cancel { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--ink-light); font-size: 13px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.edit-cancel:hover { border-color: var(--louise); color: var(--louise); }

/* ============================================================
   ADD FORMS
============================================================ */
.add-form       { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.add-row1       { display: flex; gap: 8px; margin-bottom: 8px; }
.add-input      { flex: 1; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; transition: border-color 0.2s; }
.add-input:focus { border-color: var(--ryan); }
.add-input::placeholder { color: var(--ink-faint); font-style: italic; }
.add-row-cat    { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.add-cat-select { flex: 1; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; font-family: 'DM Sans', sans-serif; color: var(--ink-light); outline: none; cursor: pointer; }
.add-cat-select:focus { border-color: var(--ryan); }
.add-desc-input { width: 100%; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 12px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; transition: border-color 0.2s; margin-bottom: 8px; }
.add-desc-input:focus { border-color: var(--ryan); }
.add-desc-input::placeholder { color: var(--ink-faint); font-style: italic; }
.add-date-input { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; cursor: pointer; }
.add-date-input:focus { border-color: var(--ryan); }
.add-row2       { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-btn { padding: 7px 16px; border-radius: 8px; border: none; background: var(--ink); color: var(--cream); font-size: 12px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.15s; margin-left: auto; }
.add-btn:hover { background: var(--ryan); }

/* WHO BUTTONS */
.who-group { display: flex; gap: 4px; }
.who-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--cream); font-size: 11px; font-weight: 500; cursor: pointer; letter-spacing: 0.05em; transition: all 0.15s; color: var(--ink-light); }
.who-btn.ryan:hover,   .who-btn.ryan.active   { background: var(--ryan-light);   border-color: var(--ryan);   color: var(--ryan); }
.who-btn.louise:hover, .who-btn.louise.active { background: var(--louise-light); border-color: var(--louise); color: var(--louise); }
.who-btn.shared:hover, .who-btn.shared.active { background: var(--gold-light);   border-color: var(--gold);   color: #8a6a1a; }

/* COST */
.cost-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); cursor: pointer; user-select: none; }
.cost-toggle input[type=checkbox] { accent-color: var(--ryan); cursor: pointer; }
.cost-wrap      { display: none; align-items: center; gap: 4px; }
.cost-wrap.show { display: flex; }
.cost-sym  { font-size: 13px; color: var(--ink-faint); }
.cost-input { width: 76px; background: var(--cream); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; }
.cost-input:focus { border-color: var(--ryan); }

/* ICON PICKER */
.icon-picker-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--cream); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.15s; }
.icon-picker-btn:hover { border-color: var(--ryan); }
#iconPopup { display: none; position: fixed; z-index: 9999; background: var(--warm-white); border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(28,26,23,0.18); width: 236px; }
#iconPopup.open { display: block; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.icon-opt  { width: 30px; height: 30px; border-radius: 6px; border: none; background: none; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.1s; }
.icon-opt:hover { background: var(--cream); }
.icon-opt.sel   { background: var(--ryan-light); }

/* ============================================================
   VIEW SWITCHER
============================================================ */
.view-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; margin-top: 4px;
}
.view-tabs {
  display: flex; gap: 2px; background: var(--cream);
  border: 1px solid var(--border); border-radius: 10px; padding: 3px;
}
.view-tab {
  padding: 6px 18px; border-radius: 7px; border: none; background: transparent;
  font-size: 12px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif;
  color: var(--ink-faint); transition: all 0.15s;
}
.view-tab:hover  { color: var(--ink); }
.view-tab.active { background: var(--warm-white); color: var(--ink); box-shadow: 0 1px 4px rgba(28,26,23,0.1); }

/* Today button */
.today-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--warm-white); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: 'DM Sans', sans-serif; color: var(--ink-light);
  transition: all 0.15s;
}
.today-btn:hover { border-color: var(--ryan); color: var(--ryan); }

/* Week view grid */
.week-view { margin-bottom: 48px; }
.week-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 14px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.week-title  { font-family: 'Lora', serif; font-size: 18px; font-weight: 600; color: var(--ink); }
.week-grid   { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-day-col { min-height: 120px; }
.week-day-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.week-day-label.today { color: var(--ryan); border-color: var(--ryan); }
.week-task-chip { font-size: 11px; padding: 3px 7px; border-radius: 6px; background: var(--warm-white); border: 1px solid var(--border); margin-bottom: 4px; color: var(--ink-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: border-color 0.15s; }
.week-task-chip:hover { border-color: var(--ryan); color: var(--ink); }
.week-task-chip.completed { opacity: 0.4; text-decoration: line-through; }
.week-add-chip { font-size: 11px; padding: 3px 7px; border-radius: 6px; border: 1px dashed var(--border); color: var(--ink-faint); cursor: pointer; transition: all 0.15s; background: none; font-family: 'DM Sans', sans-serif; width: 100%; text-align: left; margin-top: 2px; }
.week-add-chip:hover { border-color: var(--ryan); color: var(--ryan); }

/* Day view */
.day-view { margin-bottom: 48px; }
.day-view-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 14px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.day-view-title  { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.day-view-date   { font-size: 13px; color: var(--ink-faint); }
.day-time-slots  { display: flex; flex-direction: column; gap: 0; }
.day-slot { display: flex; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--border); padding: 8px 0; }
.day-slot-time { font-size: 11px; color: var(--ink-faint); width: 44px; flex-shrink: 0; padding-top: 2px; letter-spacing: 0.02em; }
.day-slot-tasks { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.day-slot-task  { background: var(--warm-white); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--ink); cursor: pointer; transition: border-color 0.15s; }
.day-slot-task:hover { border-color: var(--ryan); }
.day-slot-task.completed { opacity: 0.4; text-decoration: line-through; }
.day-all-day { background: var(--gold-light); border-color: var(--gold); border-radius: 8px; padding: 6px 12px; margin-bottom: 12px; font-size: 12px; font-weight: 500; color: #7a5c0a; }

@media (max-width: 560px) { .week-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; } .view-tab { padding: 6px 10px; } }

/* ============================================================
   MONTH NAVIGATOR
============================================================ */
.month-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.month-nav-arrow {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer; font-size: 20px; color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; line-height: 1;
}
.month-nav-arrow:hover { border-color: var(--ryan); color: var(--ryan); }
.month-nav-pills { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; -ms-overflow-style: none; flex: 1; }
.month-nav-pills::-webkit-scrollbar { display: none; }
.month-pill {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--warm-white); font-size: 12px; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all 0.15s; color: var(--ink-faint); font-family: 'DM Sans', sans-serif;
}
.month-pill:hover            { border-color: var(--ryan); color: var(--ryan); }
.month-pill.active           { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.month-pill.has-items        { border-color: var(--ryan-light); }
.month-pill.active.has-items { background: var(--ryan); border-color: var(--ryan); }

/* ============================================================
   MONTH DETAIL VIEW
============================================================ */
.month-detail { margin-bottom: 48px; }
.month-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 16px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.month-detail-title  { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.month-detail-stats  { font-size: 12px; color: var(--ink-faint); }

/* DAY SECTIONS */
.day-section { margin-bottom: 4px; }
.day-header  { display: flex; align-items: center; gap: 12px; padding: 10px 0 6px; cursor: pointer; user-select: none; }
.day-header-date { font-size: 12px; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.06em; min-width: 80px; }
.day-header-date.today { color: var(--ryan); }
.day-header-date.past  { color: var(--ink-faint); opacity: 0.6; }
.day-header-line  { flex: 1; height: 1px; background: var(--border); }
.day-header-count { font-size: 11px; color: var(--ink-faint); }
.day-tasks { padding-left: 0; }

/* UNDATED / SOMEDAY IN MONTH */
.undated-section { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.undated-header  { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }

/* INLINE ADD TASK */
.day-add-btn { display: flex; align-items: center; gap: 6px; padding: 6px 0; color: var(--ink-faint); font-size: 13px; cursor: pointer; border: none; background: none; font-family: 'DM Sans', sans-serif; transition: color 0.15s; width: 100%; }
.day-add-btn:hover { color: var(--ryan); }
.day-add-btn .plus { font-size: 16px; line-height: 1; width: 18px; text-align: center; }
.day-inline-form { display: none; padding: 8px 0 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.day-inline-form.open { display: block; }
.day-inline-input { width: 100%; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--ink); outline: none; margin-bottom: 6px; transition: border-color 0.2s; }
.day-inline-input:focus { border-color: var(--ryan); }
.day-inline-row     { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.day-inline-actions { display: flex; gap: 6px; justify-content: flex-end; }
.day-inline-save { padding: 5px 14px; border-radius: 7px; border: none; background: var(--ink); color: var(--cream); font-size: 12px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.15s; }
.day-inline-save:hover   { background: var(--ryan); }
.day-inline-cancel { padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border); background: transparent; color: var(--ink-faint); font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; }

/* ============================================================
   CONTEXT MENU
============================================================ */
#ctxMenu {
  display: none; position: fixed; z-index: 9998; background: var(--warm-white);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(28,26,23,0.18); width: 260px;
  max-height: 80vh; overflow: hidden; flex-direction: column;
}
#ctxMenu.open { display: flex; }
.ctx-scroll  { overflow-y: auto; flex: 1; }
.ctx-header  { padding: 8px 14px 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--border); background: var(--warm-white); position: sticky; top: 0; }
.ctx-item    { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 13px; color: var(--ink-light); cursor: pointer; transition: background 0.1s; }
.ctx-item:hover { background: var(--cream); color: var(--ink); }
.ctx-item .ctx-badge { font-size: 10px; padding: 1px 7px; border-radius: 12px; background: var(--ryan-light); color: var(--ryan); font-weight: 500; margin-left: auto; white-space: nowrap; }
.ctx-item .ctx-icon  { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.ctx-item.ctx-delete       { color: var(--louise); }
.ctx-item.ctx-delete:hover { background: var(--louise-light); }
.ctx-divider { height: 1px; background: var(--border); margin: 3px 0; }

/* ============================================================
   FUTURE / SOMEDAY CARD (legacy styles)
============================================================ */
.future-section    { margin-bottom: 48px; }
.future-card       { background: var(--warm-white); border: 1px solid var(--border); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); transition: border-color 0.2s, box-shadow 0.2s; }
.future-card.drag-over { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-light); }
.future-drop-hint  { display: none; border: 2px dashed var(--gold); border-radius: 8px; padding: 10px; text-align: center; font-size: 12px; color: var(--gold); margin-bottom: 12px; font-style: italic; }
.future-card.drag-over .future-drop-hint { display: block; }

/* ============================================================
   WISHLIST
============================================================ */
.wishlist-section { margin-bottom: 48px; }
.wishlist-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wish-add-toggle  {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--warm-white); font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--ink-faint); display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0; font-family: 'DM Sans', sans-serif;
}
.wish-add-toggle:hover  { border-color: var(--ryan); color: var(--ryan); }
.wish-add-toggle.active { background: var(--ryan); border-color: var(--ryan); color: white; }
.wishlist-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.wish-item {
  background: var(--warm-white); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow); cursor: grab; transition: all 0.15s; user-select: none;
}
.wish-item:hover   { box-shadow: 0 4px 20px rgba(28,26,23,0.12); transform: translateY(-1px); }
.wish-item.dragging { opacity: 0.35; cursor: grabbing; }
.wish-item.assigned { opacity: 0.55; }
.wish-icon  { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.wish-text  { font-size: 14px; font-weight: 500; color: var(--ink); }
.wish-desc  { font-size: 11px; color: var(--ink-faint); font-style: italic; margin-top: 3px; line-height: 1.4; }
.wish-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 500; letter-spacing: 0.05em; background: var(--gold-light); color: #8a6a1a; margin-top: 4px; display: inline-block; }
.wish-actions { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; margin-top: 1px; }
.wish-item:hover .wish-actions { opacity: 1; }
@media (max-width: 768px) { .wish-actions { opacity: 1; } }
.wish-delete { background: none; border: none; cursor: pointer; color: var(--ink-faint); font-size: 15px; padding: 2px 4px; border-radius: 4px; transition: color 0.15s; flex-shrink: 0; }
.wish-delete:hover { color: var(--louise); }
.wish-edit   { background: none; border: none; cursor: pointer; color: var(--ink-faint); font-size: 13px; padding: 2px 4px; border-radius: 4px; transition: color 0.15s; flex-shrink: 0; }
.wish-edit:hover   { color: var(--ryan); }
.add-wish-form  { background: var(--warm-white); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); }
.add-wish-title { font-size: 12px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }

/* ============================================================
   SYNC BAR
============================================================ */
.sync-bar  { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; z-index: 500; }
.sync-pill { background: var(--ink); color: var(--cream); font-size: 12px; padding: 8px 14px; border-radius: 8px; opacity: 0; transition: opacity 0.3s; pointer-events: none; font-family: 'DM Sans', sans-serif; }
.sync-pill.show  { opacity: 1; }
.sync-pill.error { background: var(--louise); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 560px) {
  .wishlist-grid { grid-template-columns: 1fr; }
  .add-row2      { flex-wrap: wrap; }
  .month-badge   { font-size: 10px; padding: 0 8px; }
  .presence-bar  { top: 8px; right: 8px; }
}
