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

:root {
  --bg:         #FFFFFF;
  --canvas:     #FBE07E;
  --surface:    #FFFFFF;
  --surface-2:  #F1EFE8;
  --ink:        #1F2530;
  --ink-soft:   #5B6473;
  --muted:      #98A0AC;
  --line:       #ECE7DD;
  --brand:      #2A97AD;
  --brand-soft: #E2F1F4;
  --green:      #16A34A;
  --danger:     #DC2626;
  --today:      #D97706;
  --radius:     14px;
  --shadow:     0 2px 12px rgba(31, 37, 48, 0.06);
  --card-line:  #E6E4DD;

  --topbar-h:   72px;
  --dots-h:     32px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* board scrolls horizontally, columns scroll vertically */
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--topbar-h);
}
/* Fixed topbar means every page-level container needs to offset itself by
   the topbar height. The page-view / board / memory containers each include
   `var(--topbar-h)` in their own height calc, so they sit flush below. */
body { padding-top: var(--topbar-h); }

.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.4rem; font-weight: 800;
  letter-spacing: -0.5px;
}

.logo { font-size: 1.5rem; }
img.logo-full { height: 78px; display: block; }
.bg-sun {
  position: fixed; bottom: -30vw; left: -24vw; width: 80vw; min-width: 700px;
  opacity: 0.3; pointer-events: none; z-index: -1; user-select: none;
}

.filters { display: flex; gap: 8px; }
.filters.hidden, .hidden { display: none !important; }

/* View toggle: To-dos / Calendar / Memory / Settings.
   Absolutely centered in the topbar so it stays put when right-side filters
   appear/disappear between views (Board has them, Calendar doesn't). */
.view-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  min-width: 0;
  max-width: calc(100vw - 280px);   /* leave room for brand + filters at the edges */
}
.view-toggle::-webkit-scrollbar { display: none; }
.view-btn {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.view-btn.active {
  background: var(--ink);
  color: white;
}

/* Generic page view (placeholders + simple pages) */
.page-view {
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 20px 16px 40px;
}
.page-view > .empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 16px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* ── Board (the row of columns) ──────────────────────────────────────── */

.board {
  display: flex;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - var(--topbar-h) - var(--dots-h));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.board::-webkit-scrollbar { height: 6px; }
.board::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.board > .empty {
  margin: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Column ──────────────────────────────────────────────────────────── */

.column {
  flex: 0 0 calc(100vw - 32px);
  max-width: 360px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 8px 10px 4px;
  overflow: hidden;
}

.col-head {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--line);
  position: relative;   /* anchors the .col-menu dropdown */
}

/* List menu (☰ top-left of each column) */
.col-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 3px;
  border-radius: 4px;
  line-height: 1;
}
.col-menu-btn:hover { background: var(--bg); color: var(--ink); }
.col-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  min-width: 215px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px -10px rgba(31, 37, 48, 0.25);
  padding: 5px;
  display: flex;
  flex-direction: column;
}
.col-menu.hidden { display: none; }
.col-menu button {
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}
.col-menu button:hover { background: var(--bg); }
.col-drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: -2px;
  padding: 2px 2px;
  border-radius: 4px;
  user-select: none;
}
.col-drag-handle:hover { color: var(--ink); background: var(--bg); }
.col-drag-handle:active { cursor: grabbing; }
.col-emoji {
  cursor: pointer;
  padding: 2px 2px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
}
.col-emoji:hover { background: var(--bg); }
.col-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
  cursor: text;
  /* Sizes to text content (no flex grow) so clicking past the last letter
     hits the empty col-spacer instead of focusing the contenteditable. */
}
.col-title:hover { background: var(--bg); }
.col-title:focus  { background: var(--brand-soft); overflow: visible; text-overflow: clip; }
.col-spacer { flex: 1; min-width: 8px; align-self: stretch; }
.col-delete, .col-fullscreen {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px 3px;
  border-radius: 4px;
  line-height: 1;
}
.col-delete:hover    { background: #FEE2E2; color: #B91C1C; }
.col-fullscreen:hover { background: var(--bg); color: var(--ink); }

.column.minimized .col-body,
.column.minimized .col-add { display: none; }

.column.col-dragging {
  opacity: 0.35;
  pointer-events: none;
}
.column.col-drop-target { outline: 2px dashed var(--brand); outline-offset: -2px; }

/* Fullscreen list view — grid of square-ish cards. */
.column-fullscreen {
  flex: 1 1 100%;
  max-width: 100%;
  width: 100%;
  padding: 12px 18px;
  cursor: default;
}
.col-head-fullscreen { cursor: default; gap: 12px; }
.col-head-fullscreen .fs-back {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.col-head-fullscreen .fs-back:hover { background: var(--bg); border-color: var(--brand); color: var(--brand); }
.col-head-fullscreen .col-title { font-size: 1.15rem; }
.col-body-grid { padding: 16px 0; }
.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.grid-list .row {
  /* row keeps its slot + card structure; just changes how it fills */
  align-items: stretch;
}
.grid-list .row .card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
}
/* Inside the grid: titles wrap and show in full, not single-line ellipsis. */
.grid-list .name-line { align-items: flex-start; }
.grid-list .name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  line-height: 1.3;
}
.col-add-fullscreen { margin-top: 16px; max-width: 360px; }

.column-add {
  flex: 0 0 240px;
  display: flex; align-items: flex-start;
  padding: 12px 0;
}
.column-add button {
  background: var(--surface-2);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.column-add button:hover { border-color: var(--brand); color: var(--brand); }

/* ── Snooze tile + per-card icon + snoozed section ───────────────────── */

.snooze-tile {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  box-shadow: none;
  transition: all 0.15s;
}
.snooze-tile:hover { color: var(--ink); border-color: var(--brand); }
.snooze-tile.snooze-drop-target {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: scale(1.02);
}

.row { position: relative; }
.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-top: 4px;
}
.name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.name-line .name { flex: 1; min-width: 0; }
.row-later {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #000;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.3;
  opacity: 1;
}
.row-later:hover { background: var(--brand-soft); }
/* On hover-capable devices, hide Later until the card is hovered and grey
   out the title to bring the action button forward. */
@media (hover: hover) {
  .card .row-later { opacity: 0; transition: opacity 0.1s; }
  .card:hover .row-later { opacity: 1; }
  .card:hover .name { color: var(--muted); }
}

.row-cal {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.row-cal:hover { background: #bbf7d0; }

/* Link chip — shown when a task's notes carry a URL (e.g. a wishlist item). */
.row-link {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-link:hover { background: #DBEAFE; }

details.snoozed-section {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
details.snoozed-section summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  list-style: none;
  padding: 4px 2px;
}
details.snoozed-section summary::-webkit-details-marker { display: none; }
details.snoozed-section[open] summary { color: var(--ink-soft); }

.snoozed-list {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 6px;
}
.snoozed-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border-radius: 8px;
  padding: 7px 10px;
  opacity: 0.6;
  font-size: 0.82rem;
}
.snoozed-row .snoozed-title { flex: 1; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snoozed-row .snoozed-when  { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.snoozed-row .snoozed-wake {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.snoozed-row .snoozed-wake:hover { color: var(--brand); background: var(--brand-soft); }

/* ── Modal (snooze dialog and similar) ──────────────────────────────── */

.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(15, 18, 24, 0.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: scrim-in 0.18s ease-out;
}
.modal-card {
  background: var(--bg);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(15,18,24,0.3);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: transparent; border: none;
  color: var(--ink-soft); font-size: 1.1rem;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer;
}
.modal-close:hover { background: var(--line); }
.modal-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-sub { color: var(--ink); font-weight: 600; }
.modal-sub.muted { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
/* Combined reminder + snooze popup */
.modal-card.actions-card { max-width: 720px; }
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.actions-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.actions-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
}
.parse-saved {
  color: #1f7a3a;
  background: #e6f5ec;
  border: 1px solid #b9e0c8;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.9rem;
}
@media (max-width: 560px) {
  .actions-grid { grid-template-columns: 1fr; }
}

.snooze-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.snooze-presets button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.snooze-presets button:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.snooze-label { display: flex; flex-direction: column; gap: 4px; }
.snooze-label span { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.snooze-input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-family: inherit;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.modal-save {
  background: var(--ink) !important;
  color: white !important;
  border-color: var(--ink) !important;
}
.modal-save:disabled { opacity: 0.5; cursor: wait; }

/* ── Image lightbox ──────────────────────────────────────────────────── */

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.col-count {
  background: var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.col-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
  scrollbar-width: thin;
}
.col-body::-webkit-scrollbar { width: 6px; }
.col-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

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

.col-add {
  display: flex; gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.col-add input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
}
.col-add input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

.col-add button {
  width: 36px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Groups within a column ──────────────────────────────────────────── */

.group { display: flex; flex-direction: column; gap: 6px; }

.group-h {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 0 2px;
}

.group-h.danger { color: var(--danger); }
.group-h.today  { color: var(--today); }

.group-count {
  background: var(--line);
  color: var(--ink-soft);
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0;
}

/* ── Regular reminders list — category sections + schedule meta ─────── */

/* Section header rendered as an <li> inside the same <ul> as the cards,
   so drag-and-drop targeting still walks to `.row` cleanly. The header
   itself is not draggable. */
.rem-section-head {
  list-style: none;
  cursor: default;
  display: flex;
  align-items: center;
  margin-top: 2px;
  padding: 4px 2px 2px;
  user-select: none;
}
.rem-list-grouped > .rem-section-head:first-child { margin-top: 0; }
.rem-section-label {
  display: inline-block;
  background: var(--cat-bg, var(--line));
  color: var(--cat-fg, var(--ink-soft));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}

/* Inert version of the .slot-num used for reminder categories — same shape
   as the Today numbered slot but no number, no click. The pastel colour
   comes from the row's --slot-bg via .row.has-slot. */
.slot-num.slot-category {
  cursor: default;
}

/* Small grey schedule line under the task name (e.g. "Daily at 8am"). */
.meta-schedule {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 500;
}

ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }

/* ── Task row ────────────────────────────────────────────────────────── */

.row {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0;
  transition: opacity 0.2s, transform 0.15s;
  cursor: grab;
}
.row.has-slot {
  background: var(--slot-bg, transparent);
  padding: 3px 3px 3px 0;
}
/* Un-prioritised (backlog) cards have no coloured background, but reuse the
   same padding box as coloured rows so the white card lines up on every edge
   with the coloured cards above — same left/right inset (HES-103). */
.row.no-slot { padding: 3px 3px 3px 0; }
.row .card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px 8px;
  border: 1px solid var(--card-line);
}
.row.has-slot .card { border-radius: 7px; border-color: transparent; }
.row:active { cursor: grabbing; }

.row.pending { opacity: 0.5; }
.row.done { opacity: 0.55; }
.row.done .name { text-decoration: line-through; color: var(--muted); }
.row.dragging {
  opacity: 0;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  pointer-events: none;
  transform: none;
}
.drop-placeholder {
  list-style: none;
  background: var(--brand-soft);
  border: 2px dashed var(--brand);
  border-radius: 10px;
  margin: 0;
  box-sizing: border-box;
  transition: height 0.12s ease;
}

.column.drag-over {
  background: var(--brand-soft);
  outline: 2px dashed var(--brand);
  outline-offset: -2px;
}

.check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
/* On devices that can hover, fade the tick in after a short delay so the title
   sits flush against the slot the rest of the time. Touch devices keep it
   visible. */
@media (hover: hover) {
  .card .check {
    width: 0;
    border-width: 0;
    opacity: 0;
    margin-right: -10px;   /* cancel the card's gap when hidden */
    overflow: hidden;
    transition: width 0.2s ease 0.2s, opacity 0.2s ease 0.2s,
                margin-right 0.2s ease 0.2s, border-width 0.2s ease 0.2s;
  }
  .card:hover .check,
  .row.done .card .check {
    width: 22px;
    border-width: 1.5px;
    opacity: 1;
    margin-right: 0;
  }
  .row.done .card .check { transition: none; }   /* always shown — no fade */
}

.slot-num {
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  align-self: stretch;
  color: var(--slot-fg, var(--muted));
}
.row.done .slot-num { opacity: 0.5; filter: saturate(0.4); }
.slot-num.slot-clickable { cursor: pointer; }
.slot-num.slot-clickable:hover { filter: brightness(0.92); }

/* Today priority picker — small popover anchored to the slot number. */
.prio-picker {
  position: absolute;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15,18,24,0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}
.prio-opt {
  display: flex; align-items: center; gap: 10px;
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.prio-opt:hover { background: var(--surface-2); }
.prio-opt.active { background: var(--brand-soft); color: var(--brand); }
.prio-swatch {
  width: 16px; height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06) inset;
}
.prio-swatch-none {
  background: transparent;
  border: 1.5px dashed var(--line);
  box-shadow: none;
}

/* Drawer priority picker */
.drawer-prio-list {
  display: flex; flex-direction: column; gap: 4px;
}
.drawer-prio-opt {
  display: flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid var(--line);
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.drawer-prio-opt:hover { background: var(--surface-2); }
.drawer-prio-opt.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.row.done .check {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.body { flex: 1; min-width: 0; }

.name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.3;
  cursor: text;
  min-width: 0;
}
.name[contenteditable="true"] {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  cursor: text;
}
.name[contenteditable="true"]:focus {
  background: var(--bg);
  border-radius: 4px;
  padding: 2px 4px;
  outline: none;
}
.row-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 6px;
}
.row-rail .row-src {
  margin: 0;
}

.meta {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.due { font-weight: 600; }

.src, .prio, .list-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.src { background: var(--line); color: var(--ink-soft); }
.src-whatsapp  { background: #DCFCE7; color: #166534; }
.src-voicenote { background: #E2F1F4; color: #1E6B7A; }
.src-email     { background: #DBEAFE; color: #1E40AF; }
.src-web       { background: #EFE6D3; color: #6B5638; }

.prio {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
}
.prio-urgent { background: #FEE2E2; color: #B91C1C; }
.prio-high   { background: #EFE6D3; color: #6B5638; }
.prio-medium { background: #E0E7FF; color: #3730A3; }
.prio-low    { background: #ECFDF5; color: #047857; }

.list-badge { background: #F1F0EB; color: var(--ink-soft); }

.more {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.more:hover { color: var(--ink); }

.task-thumb {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  cursor: zoom-in;
  background: var(--bg);
}
.task-thumb:hover { opacity: 0.92; }

/* ── Edit panel (inline under a row) ─────────────────────────────────── */

.edit-panel {
  list-style: none;
  background: var(--surface);
  border-radius: 10px;
  margin-top: -2px;
  padding: 12px;
  border: 1px solid var(--card-line);
}
.edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.edit-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.edit-grid select,
.edit-grid input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--bg);
  width: 100%;
}
.edit-grid .del-btn {
  grid-column: 1 / -1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
}
.edit-grid .del-btn:hover { background: #FEE2E2; }

/* ── Pagination dots (mobile) ────────────────────────────────────────── */

.dots {
  display: flex; justify-content: center; gap: 8px;
  height: var(--dots-h);
  align-items: center;
  background: var(--bg);
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}
.dot.active {
  background: var(--ink);
  transform: scale(1.3);
}

/* ── Desktop layout ──────────────────────────────────────────────────── */

@media (min-width: 900px) {
  .board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    overflow-x: auto;
    scroll-snap-type: none;
    padding: 16px;
    gap: 16px;
  }
  .column {
    flex: none;
    max-width: none;
    min-width: 0;
  }
  .dots { display: none; }
  :root { --dots-h: 0px; }
}

/* ── Memory view ─────────────────────────────────────────────────────── */

.memory {
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 20px 16px 40px;
}

.memory > .empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 16px;
}

.mem-page {
  max-width: 1200px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 32px;
}

.mem-page section {
  display: flex; flex-direction: column; gap: 14px;
}

.mem-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.mem-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.mem-actions { display: flex; gap: 8px; }

.mem-btn {
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.mem-btn:hover:not(:disabled) { opacity: 0.9; }
.mem-btn:disabled { opacity: 0.5; cursor: wait; }
.mem-btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.mem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.mem-empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 8px 4px;
}

.mem-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--card-line);
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.mem-card:focus-within { border-color: var(--brand-soft); }

.mem-card header {
  display: flex; align-items: center; gap: 8px;
}
.mem-emoji {
  font-size: 1.4rem;
  outline: none;
  border-radius: 6px;
  padding: 0 2px;
}
.mem-emoji[contenteditable="true"]:focus { background: var(--bg); }
.mem-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  flex: 1; min-width: 0;
  outline: none;
  border-radius: 6px;
  padding: 2px 4px;
}
.mem-card h3[contenteditable="true"]:focus { background: var(--bg); }

.mem-kind {
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: lowercase;
}
.mem-auto {
  background: #EFE6D3;
  color: #6B5638;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  text-transform: uppercase;
}

.mem-del {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.mem-del:hover { color: var(--danger); background: #FEE2E2; }

.mem-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.mem-chip {
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}

.mem-notes {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
}
.mem-notes:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

.mem-card-footer {
  font-size: 0.7rem;
  color: var(--muted);
}

.mem-muted {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Discover suggestions box */
.mem-suggest-box {
  background: var(--surface);
  border: 1px dashed var(--brand);
  border-radius: 14px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.mem-suggest-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 4px;
  border-radius: 8px;
}
.mem-suggest-item:hover { background: var(--bg); }
.mem-suggest-name { font-weight: 600; }
.mem-suggest-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ── Memory entity cards (HES-79) ────────────────────────────────────── */

.ent-card header { align-items: flex-start; }
.ent-title {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ent-title h3 { padding: 0; }
.ent-summary {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.ent-rows { display: flex; flex-direction: column; gap: 4px; }
.ent-row {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 0.8rem;
}
.ent-row-label {
  color: var(--muted);
  font-weight: 600;
  min-width: 92px;
  flex-shrink: 0;
}
.ent-row-value {
  color: var(--ink);
  min-width: 0;
  /* Now a click-to-edit <button>: strip chrome, keep row typography */
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s, color 0.15s;
}
.ent-row-value:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* Editability affordances: a faint pencil on every editable value (visible on
   touch where hover doesn't exist), stronger on hover; one hint line above
   the cards. */
.ent-pencil { font-size: 0.72rem; margin-left: 6px; opacity: 0.3; transition: opacity 0.15s; }
.ent-row-value:hover .ent-pencil { opacity: 0.9; }
.ent-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 14px;
}

/* Unknown field: dashed "tap to tell me" affordance living in the value slot
   of its locked-grid row (the separate chips block is gone). */
.ent-row-empty {
  font-family: inherit;
  line-height: inherit;
  border: 1.5px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ent-row-empty:hover { border-color: var(--brand); color: var(--brand); }

/* Derived values (Age): plain text, not clickable — the tooltip points at
   the source field instead. */
.ent-row-derived { color: var(--ink); cursor: default; }

/* Link-type rows (url/email/phone/address): the value navigates; a separate
   small ✏️ (or the address text itself) opens the inline editor. */
.ent-row-slot {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.ent-row-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ent-row-link:hover { border-bottom-color: var(--brand); }
.ent-row-editbtn {
  border: 0;
  background: transparent;
  font-size: 0.72rem;
  line-height: inherit;
  padding: 0;
  cursor: pointer;
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.ent-row-editbtn:hover,
.ent-row:hover .ent-row-editbtn { opacity: 0.9; }
.ent-row-map {
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.ent-row-map:hover { color: var(--brand); }

/* Inline edit state: input swapped in for a chip / known value */
.ent-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ent-edit-input {
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  padding: 3px 8px;
  width: 170px;
  max-width: 100%;
  outline: none;
}
.ent-edit-wa {
  font-size: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.75;
}
.ent-edit-wa:hover { opacity: 1; }

/* "What's happening lately" — Saturday's recent commentary, visually separate
   from the locked grid of core info above it. */
.ent-lately {
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 8px 10px 8px 12px;
}
.ent-lately-head {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft); /* --muted is too faint on the tinted background */
  margin-bottom: 4px;
}
.ent-facts {
  list-style: disc;
  padding-left: 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.ent-facts li {
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.ent-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.ent-foot {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
}
a.ent-foot:hover { color: var(--brand); }

/* Divider between the entities section and the legacy notes/topics UI */
.mem-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.mem-divider::before,
.mem-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Reminders view ──────────────────────────────────────────────────── */

.rem-page {
  max-width: 900px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px;
}

.rem-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rem-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.rem-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rem-toggle {
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}

.rem-section-h {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
  padding: 0 4px;
}

.rem-list { display: flex; flex-direction: column; gap: 6px; }

.rem-row {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-line);
  transition: opacity 0.2s;
}
.rem-row.done { opacity: 0.55; }
.rem-row.done .rem-title { text-decoration: line-through; color: var(--muted); }
.rem-row .check {
  margin-top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.rem-row .check.on {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.rem-body { flex: 1; min-width: 0; }
.rem-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  border-radius: 6px;
  padding: 1px 4px;
}
.rem-title[contenteditable="true"]:focus { background: var(--bg); }
.rem-meta {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
}
.rem-chip {
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.rem-chip-date { background: #FFEDD5; color: #C2410C; }
.rem-src       { background: #DCFCE7; color: #166534; text-transform: capitalize; }
.rem-kid       { background: #FCE7F3; color: #9D174D; }
.rem-notes {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  outline: none;
  border-radius: 6px;
  padding: 2px 4px;
}
.rem-notes[contenteditable="true"]:focus { background: var(--bg); }
.rem-del, .rem-cal-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.rem-del:hover { color: var(--danger); background: #FEE2E2; }
.rem-cal-btn:hover:not(:disabled) { color: var(--brand); background: var(--brand-soft); }
.rem-cal-btn.synced { color: var(--green); }
.rem-cal-btn:disabled { opacity: 0.4; cursor: wait; }
.rem-cal-on { background: #DCFCE7; color: #166534; }

/* ── Calendar view (multi-source week/month grid) ───────────────────── */

#calendar.page-view { padding: 0; }
.cal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: calc(100vh - var(--topbar-h));
  background: var(--bg);
}
.cal-sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  overflow-y: auto;
  background: var(--surface-2);
}
.cal-sidebar-section { margin-bottom: 22px; }
.cal-sidebar-section h3 {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.cal-sources { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cal-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--ink);
}
.cal-source:hover { background: var(--bg); }
.cal-source input[type="checkbox"] { margin: 0; cursor: pointer; }
.cal-source-swatch {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--cal-source-color, var(--brand));
  flex-shrink: 0;
}
.cal-source-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-source-account {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}
.cal-loading { color: var(--muted); font-size: 0.85rem; padding: 4px 8px; }

.cal-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 12px;
}
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.cal-nav-btn:hover { border-color: var(--brand); color: var(--brand); }
.cal-range-label { font-size: 1rem; font-weight: 700; margin-left: 14px; color: var(--ink); }
.cal-view-toggle {
  display: flex; gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
}
.cal-view-btn {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.cal-view-btn.active { background: var(--ink); color: white; }

.cal-grid {
  flex: 1; min-height: 0;
  overflow: auto;
  background: var(--bg);
}

/* Week view: 8 cols (time gutter + 7 days), 24 rows per day */
.cal-week {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  background: var(--surface);
  min-width: 800px;
}
.cal-week-header,
.cal-week-day-header {
  position: sticky; top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink-soft);
  z-index: 2;
}
.cal-week-day-header strong { display: block; font-size: 1.1rem; color: var(--ink); font-weight: 700; }
.cal-week-day-header.today strong { color: var(--brand); }
.cal-week-hour-label {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
  padding: 2px 6px;
  background: var(--surface);
}
.cal-week-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  min-height: 36px;
  background: var(--surface);
}
.cal-week-cell.today { background: #FFFCF5; }
.cal-event-block {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--cal-event-bg, var(--brand-soft));
  border-left: 3px solid var(--cal-event-accent, var(--brand));
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.76rem;
  color: var(--ink);
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.15s;
}
.cal-event-block:hover { filter: brightness(0.96); }
.cal-event-block .cal-event-title { font-weight: 600; }
.cal-event-block .cal-event-meta { font-size: 0.7rem; color: var(--ink-soft); margin-top: 1px; }
.cal-event-block.all-day { left: 2px; right: 2px; top: 2px; }

/* Month view: 7 cols x 6 rows */
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(110px, 1fr);
  background: var(--surface);
  min-height: 600px;
}
.cal-month-day-header {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  z-index: 2;
}
.cal-month-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 6px;
  display: flex; flex-direction: column; gap: 2px;
  overflow: hidden;
}
.cal-month-cell.other-month { background: #FAF8F4; color: var(--muted); }
.cal-month-cell.today { background: #FFFCF5; }
.cal-month-day-num { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.cal-month-cell.today .cal-month-day-num { color: var(--brand); }
.cal-month-event {
  font-size: 0.72rem;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--cal-event-bg, var(--brand-soft));
  border-left: 3px solid var(--cal-event-accent, var(--brand));
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.cal-month-event-more { font-size: 0.7rem; color: var(--muted); padding: 0 5px; }

/* Sidebar collapses to a top strip on narrow screens. */
@media (max-width: 800px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 200px;
    padding: 12px;
  }
}

.cal-page {
  max-width: 900px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.cal-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.cal-head p { margin-top: 4px; }
.cal-empty-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--ink-soft);
}
.cal-empty-card h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.cal-empty-card p  { font-size: 0.9rem; }

.cal-day {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.cal-day h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.cal-day ul { display: flex; flex-direction: column; gap: 6px; }
.cal-event {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  border-radius: 8px;
}
.cal-event:hover { background: var(--bg); }
.cal-event.flash {
  animation: cal-flash 2.2s ease-out;
}
@keyframes cal-flash {
  0%   { background: #e5dcc8; box-shadow: 0 0 0 3px #b09a72 inset; }
  60%  { background: #efe6d3; box-shadow: 0 0 0 2px #b09a72 inset; }
  100% { background: transparent; box-shadow: none; }
}
.cal-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.cal-summary {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
}
.cal-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.cal-link:hover { color: var(--ink); }

/* ── Task detail drawer ──────────────────────────────────────────────── */

.task-drawer-scrim {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(15, 18, 24, 0.35);
  backdrop-filter: blur(2px);
  animation: scrim-in 0.18s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

.task-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
  width: 440px; max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(15, 18, 24, 0.15);
  display: flex; flex-direction: column;
  animation: drawer-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.task-drawer .drawer-loading {
  padding: 60px 24px; text-align: center; color: var(--muted);
}

.drawer-head {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  background: transparent; border: none;
  color: var(--ink-soft); font-size: 1.4rem;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer;
}
.drawer-close:hover { background: var(--line); color: var(--ink); }

.drawer-body {
  flex: 1; overflow-y: auto;
  padding: 8px 24px 40px;
  display: flex; flex-direction: column; gap: 18px;
}

.drawer-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
  outline: none;
  min-height: 1.5em;
}
.drawer-title[contenteditable="true"]:focus { background: var(--surface); }
.drawer-title:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.drawer-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.drawer-chip {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.drawer-chip select,
.drawer-chip input,
.drawer-input {
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
  width: 100%;
}

.drawer-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.drawer-section h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.drawer-muted {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.drawer-textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
}
.drawer-input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  width: auto;
}

.drawer-rem-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 10px;
}
.drawer-rem-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.drawer-rem-text { display: flex; flex-direction: column; gap: 2px; }
.drawer-rem-text strong { font-size: 0.88rem; color: var(--ink); }
.drawer-rem-del {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.drawer-rem-del:hover { color: var(--danger); background: #FEE2E2; }

details.drawer-rem-add {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
details.drawer-rem-add summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--brand);
  list-style: none;
  padding: 4px 0;
}
details.drawer-rem-add summary::-webkit-details-marker { display: none; }
details.drawer-rem-add[open] summary { color: var(--ink); }

.drawer-picker {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-picker-tabs {
  display: inline-flex;
  background: var(--surface);
  border-radius: 99px;
  padding: 3px;
  align-self: flex-start;
}
.rem-tab {
  background: transparent; border: none;
  padding: 5px 12px; border-radius: 99px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
}
.rem-tab.active { background: var(--ink); color: white; }
.rem-mode.hidden { display: none; }

.rem-quick {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rem-quick button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--ink); cursor: pointer;
}
.rem-quick button:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.rem-custom {
  display: flex; gap: 6px; align-items: center; margin-top: 8px;
}
.rem-custom input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.88rem;
  font-family: inherit;
}

.rem-days {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.rem-days button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 0.78rem; font-weight: 700;
  color: var(--ink-soft); cursor: pointer;
}
.rem-days button.on { background: var(--ink); border-color: var(--ink); color: white; }

.drawer-picker-actions {
  display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px;
}
.drawer-picker-actions button {
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
}
.drawer-rem-save {
  background: var(--ink) !important; color: white !important; border-color: var(--ink) !important;
}

.drawer-img {
  width: 100%; border-radius: 8px;
}

/* Parse-then-confirm box (reminder + snooze) */
.parse-box {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 8px;
}
.parse-input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 50px;
}
.parse-input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.parse-input:disabled { background: var(--surface); color: var(--ink-soft); }
.parse-preview {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
.parse-preview.hidden { display: none; }
.parse-actions { display: flex; justify-content: flex-end; gap: 6px; }
.parse-btn {
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.parse-btn:hover:not(:disabled) { opacity: 0.9; }
.parse-btn:disabled { opacity: 0.5; cursor: wait; }
.parse-btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.drawer-del {
  background: transparent; border: 1px solid var(--line);
  color: var(--danger); border-radius: 8px;
  padding: 10px; width: 100%;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.drawer-del:hover { background: #FEE2E2; }

@media (max-width: 600px) {
  .task-drawer { width: 100%; max-width: 100%; border-left: none; }
}

/* ── Login (unchanged from before) ──────────────────────────────────── */

body.login {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  padding: 24px;
  overflow: auto;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  width: 100%; max-width: 360px;
  text-align: center;
  display: flex; flex-direction: column; gap: 16px;
}

.login-card .logo { font-size: 2.5rem; }
.login-card h1    { font-size: 1.8rem; font-weight: 800; }

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
}
.login-card input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

.login-card button {
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-card .err { color: var(--danger); font-size: 0.9rem; }


/* ── Must do today sections ──────────────────────────────────────────── */

.must-section-head {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 2px 2px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}
.must-section-head::before {
  content: '';
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
.must-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
li + .must-section-head { margin-top: 10px; }
.must-section-hint {
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0 2px 8px;
}

/* List chip on Today-homepage rows pulled from other lists. */
.row-list-chip {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-2);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Today homepage — agenda layout ──────────────────────────────────── */

.board.today-page { justify-content: center; }
.board.today-page .column-today-page {
  flex: 0 1 720px;
  max-width: 720px;
  padding: 18px 22px;
  cursor: default;
}
.column-today-page .col-head-fullscreen { border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.column-today-page .col-title { font-size: 1.5rem; }
.today-date {
  margin-left: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.column-today-page .col-body-grid { padding: 12px 0; }
.column-today-page .grid-list { display: flex; flex-direction: column; gap: 8px; }
.column-today-page .grid-list .row { align-items: center; }
.column-today-page .must-section-head { margin-top: 16px; }
.board.today-page .column-today-page { margin-left: auto; margin-right: auto; }
.column-today-page .grid-list .row .card { min-height: 0; flex-direction: row; }
.column-today-page .grid-list .row { min-height: 0; }


/* ── Three-tier list sections (Must do today / Next up / Backlog) ────── */

.sec-head {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 2px 2px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sec-head::before {
  content: '';
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.sec-head::after {
  content: '';
  flex: 1;
  height: 0;
  border-top: 1.5px dotted var(--line);
}
li + .sec-head { margin-top: 14px; border-top: 1.5px dotted var(--line); padding-top: 12px; }
.sec-must    { color: var(--brand); }
.sec-must::before    { background: var(--brand); }
.sec-next    { color: #4E93A3; }
.sec-next::before    { background: #BFDEE5; }
.sec-backlog { color: var(--muted); }
.sec-backlog::before { background: transparent; border: 1.5px solid var(--line); }

/* Tracking-flavoured columns (own Tracking list + other people's lists)
   highlight in brand yellow instead of teal. */
.column-tracking .sec-must           { color: #8A6D1A; }
.column-tracking .sec-must::before   { background: #FBE07E; }
.column-tracking .sec-next           { color: #A8892E; }
.column-tracking .sec-next::before   { background: #FDF0C4; }

/* ── Today page: main column + Tracking column side by side ─────────── */
.today-split {
  display: flex;
  gap: 18px;
  width: 100%;
  align-items: stretch;
  min-width: 0;
}
.today-split > .column-fullscreen { flex: 1 1 62%; min-width: 0; }
.today-split > .today-tracking-col { flex: 1 1 38%; min-width: 0; }
.today-tracking-col .col-head-fullscreen { border-bottom-color: #E9C93F; }

/* Stacked per-list groups inside the Today tracking column */
.col-body-tracking {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.tracking-group {
  border: 1.5px dashed transparent;
  border-radius: 14px;
  padding: 8px;
  margin: 0 -8px;
  transition: background 0.15s, border-color 0.15s;
}
.tracking-group.drag-over {
  border-color: #E9C93F;
  background: rgba(251, 224, 126, 0.28);
}
.tracking-group-head {
  display: flex; align-items: center; gap: 7px;
  padding: 2px 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A6D1A;
}
.tracking-group-head::after {
  content: '';
  flex: 1;
  border-top: 1.5px dotted var(--line);
}
.tracking-group-head .tg-emoji { font-size: 0.9rem; }
.tracking-group-head .tg-count {
  background: #FBE07E;
  color: #6B5310;
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 0.7rem;
}
.tg-empty {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px 2px 2px;
}
@media (max-width: 760px) {
  .today-split {
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
  }
  .today-split > .column-fullscreen,
  .today-split > .today-tracking-col {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
  }
}


/* ── Goal tracking (MVP) ─────────────────────────────────────────────── */

/* Goal cards sit side by side as columns — same interface as the To-dos
   board (horizontal scroll, snap per column). */
#goals { overflow: hidden; }
.gt-wrap {
  display: flex; gap: 12px;
  padding: 12px;
  height: calc(100vh - var(--topbar-h) - 12px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  align-items: stretch;
}
.gt-wrap::-webkit-scrollbar { height: 6px; }
.gt-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.gt-intro { display: none; }   /* columns speak for themselves */

.gt-card {
  flex: 0 0 calc(100vw - 32px);
  max-width: 400px;
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.gt-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.gt-emoji { font-size: 1.5rem; }
.gt-head-text { flex: 1; min-width: 0; }
.gt-head h2 { font-size: 1.05rem; }
.gt-milestone { color: var(--ink-soft); font-size: 0.8rem; margin-top: 2px; }
.gt-gear { color: var(--muted); font-size: 1.05rem; }
.gt-head:hover .gt-gear { color: var(--brand); }

/* Timeline: horizontal strip of day chips, newest on the right. */
.gt-timeline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.gt-chip {
  flex: 0 0 auto; min-width: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border-radius: 10px; padding: 6px 6px 5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.gt-chip-dow { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; }
.gt-chip-mark { font-size: 0.95rem; font-weight: 800; line-height: 1.1; }
.gt-chip-val { font-size: 0.62rem; font-weight: 700; white-space: nowrap; }
.gt-chip-sub { font-size: 0.58rem; white-space: nowrap; }
.gt-chip.hit     { background: #E8F7EE; border-color: #BFE8CF; color: var(--green); }
.gt-chip.miss    { background: #FDECEC; border-color: #F5C6C6; color: var(--danger); }
.gt-chip.partial { background: #FEF6E7; border-color: #F5DFAE; color: var(--today); }
.gt-chip.pending { background: var(--surface); }
.gt-chip.blank   { opacity: 0.35; }
.gt-chip.future  { background: var(--surface); border-style: dashed; color: var(--muted); }
.gt-chip.future .gt-chip-val { color: var(--ink-soft); font-weight: 600; }
.gt-chip.milestone {
  background: var(--brand-soft); border: 1.5px solid var(--brand); color: var(--brand);
  font-weight: 700;
}
.gt-chip.is-today { outline: 2px solid var(--brand); outline-offset: 1px; }

.gt-statusline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }
.gt-quiet { color: var(--muted); font-size: 0.78rem; }
.gt-bar { flex: 1; min-width: 90px; max-width: 220px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.gt-bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

.gt-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

/* "This week" — same geometry as the must-head, in the pale blue the
   reminders categories use (there's no pale-blue token in :root). */
.week-section-head {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 2px 2px 6px;
  font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: hsl(210, 50%, 40%);
}
.week-section-head::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: hsl(210, 70%, 78%); flex-shrink: 0;
}
.week-section-head::after { content: ''; flex: 1; height: 1px; background: hsl(210, 70%, 90%); }
.gt-list + .gt-list .week-section-head, .gt-list .must-section-head + * { margin-top: 0; }

/* Session rows reuse the board's .row/.slot-num/.card/.check classes so the
   colouring mirrors the To-dos tab exactly; only behavioural tweaks here. */
#goals .row { cursor: default; }
#goals .row .card { align-items: center; }
#goals .check { border-color: var(--brand); }
#goals .row.done .check { background: var(--brand); border-color: var(--brand); color: #fff; }
.gt-sess-actual { color: var(--green); font-size: 0.78rem; font-weight: 600; }
.gt-week-row .name { font-size: 0.88rem; color: var(--ink-soft); }
.gt-week-day { color: var(--slot-fg, hsl(210, 50%, 30%)); font-weight: 700; }

.gt-connect { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; }
.gt-conn.ok { color: var(--green); font-weight: 600; }
.gt-mini {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 8px; padding: 6px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.gt-mini.ghost { background: var(--surface); color: var(--brand); }
.gt-mini:disabled { opacity: 0.5; cursor: default; }
.gt-oura-form { display: flex; gap: 6px; align-items: center; }
.gt-oura-form.hidden { display: none; }
.gt-oura-token { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 0.8rem; width: 260px; }

/* Settings drawer (rides the existing #task-drawer shell). */
.gt-drawer { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.gt-drawer header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1rem; }
.gt-drawer-close { border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--muted); }
.gt-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--ink-soft); }
.gt-field input, .gt-field select {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; color: var(--ink);
}
.gt-drawer-note { font-size: 0.78rem; color: var(--muted); background: var(--brand-soft); border-radius: 8px; padding: 10px 12px; }
.gt-save {
  border: 0; background: var(--brand); color: #fff; border-radius: 10px;
  padding: 11px; font-size: 0.95rem; font-weight: 700; cursor: pointer;
}
