  :root {
    --bg: #0e0e0e; --bg2: #161616; --bg3: #1e1e1e; --bg4: #252525;
    --border: rgba(255,255,255,0.07); --border2: rgba(255,255,255,0.12);
    --text: #f0ede8; --text2: #8a8880; --text3: #555350;
    --accent: #c8f07a; --accent2: #a8d45a;
    --accent-dim: rgba(200,240,122,0.1); --accent-dim2: rgba(200,240,122,0.06);
    --teal: #5dcaa5; --teal-dim: rgba(93,202,165,0.1);
    --coral: #f0997b; --coral-dim: rgba(240,153,123,0.1);
    --purple: #a89fec; --purple-dim: rgba(168,159,236,0.1);
    --amber: #f0c060; --amber-dim: rgba(240,192,96,0.1);
    --red: #f07070; --red-dim: rgba(240,112,112,0.1);
    --radius: 10px; --radius-lg: 14px;
    --font-display: 'Instrument Serif', serif; --font-body: 'DM Sans', sans-serif;
    --accent-ink: #0e0e0e; /* readable "ink" colour to sit ON the accent fill */
  }
  /* GRAY THEME - a softer slate dark, lighter than the near-black default */
  [data-theme="gray"] {
    --bg: #202124; --bg2: #282a2d; --bg3: #313337; --bg4: #3c3e42;
    --border: rgba(255,255,255,0.08); --border2: rgba(255,255,255,0.15);
    --text: #e9e7e3; --text2: #a4a29c; --text3: #6f6d69;
    --accent: #c8f07a; --accent2: #a8d45a;
    --accent-dim: rgba(200,240,122,0.12); --accent-dim2: rgba(200,240,122,0.07);
    --accent-ink: #0e0e0e;
  }
  /* LIGHT THEME - light surfaces, dark text. Accent darkens to a deep green so
     it stays readable as text on white; ink on the accent flips to white. */
  [data-theme="light"] {
    --bg: #f4f2ed; --bg2: #ffffff; --bg3: #f0ede7; --bg4: #e7e2d9;
    --border: #b0aa9f; --border2: #888078;
    --text: #1c1b18; --text2: #45423b; --text3: #706d65;
    --accent: #5f8a23; --accent2: #4e7619;
    --accent-dim: rgba(95,138,35,0.13); --accent-dim2: rgba(95,138,35,0.07);
    --accent-ink: #ffffff;
    --teal-dim: rgba(45,150,115,0.15); --coral-dim: rgba(210,110,70,0.15);
    --purple-dim: rgba(120,108,210,0.15); --amber-dim: rgba(190,140,30,0.16);
    --red-dim: rgba(210,70,70,0.13);
  }
  /* LATTE - warm cream & coffee tones with amber accent */
  [data-theme="latte"] {
    --bg: #f2ece2; --bg2: #faf7f2; --bg3: #e8e0d2; --bg4: #ddd4c4;
    --border: #b8a890; --border2: #9c8870;
    --text: #28200e; --text2: #503e22; --text3: #7a6040;
    --accent: #c87020; --accent2: #a85c18;
    --accent-dim: rgba(200,112,32,0.13); --accent-dim2: rgba(200,112,32,0.07);
    --accent-ink: #ffffff;
    --red: #c0392b; --red-dim: rgba(192,57,43,0.12);
    --teal-dim: rgba(40,140,100,0.13); --purple-dim: rgba(110,80,180,0.12);
  }
  /* MIST - cool blue-gray with a vivid blue accent */
  [data-theme="mist"] {
    --bg: #edf1f7; --bg2: #f8fafc; --bg3: #e0e8f2; --bg4: #d0daea;
    --border: #a8b8d0; --border2: #8aa0bc;
    --text: #0f172a; --text2: #2d3f58; --text3: #536a84;
    --accent: #2563eb; --accent2: #1d4ed8;
    --accent-dim: rgba(37,99,235,0.12); --accent-dim2: rgba(37,99,235,0.07);
    --accent-ink: #ffffff;
    --red: #dc2626; --red-dim: rgba(220,38,38,0.12);
    --teal-dim: rgba(20,180,160,0.13); --purple-dim: rgba(120,80,220,0.12);
  }
  /* BLUSH - soft rose & pink with a rose accent */
  [data-theme="blush"] {
    --bg: #fcf2f4; --bg2: #fff8f9; --bg3: #f5e4ea; --bg4: #edd4dc;
    --border: #c8a0b0; --border2: #b08090;
    --text: #280f1a; --text2: #5a2438; --text3: #8a5468;
    --accent: #c82060; --accent2: #a81850;
    --accent-dim: rgba(200,32,96,0.12); --accent-dim2: rgba(200,32,96,0.07);
    --accent-ink: #ffffff;
    --red: #be123c; --red-dim: rgba(190,18,60,0.12);
    --teal-dim: rgba(20,160,140,0.13); --purple-dim: rgba(140,80,200,0.12);
  }
  /* CHALK - clean neutral white with indigo accent */
  [data-theme="chalk"] {
    --bg: #f5f5f5; --bg2: #ffffff; --bg3: #ebebeb; --bg4: #dedede;
    --border: #b8b8b8; --border2: #9a9a9a;
    --text: #111111; --text2: #333333; --text3: #5a5a5a;
    --accent: #4f46e5; --accent2: #4338ca;
    --accent-dim: rgba(79,70,229,0.12); --accent-dim2: rgba(79,70,229,0.07);
    --accent-ink: #ffffff;
    --red: #dc2626; --red-dim: rgba(220,38,38,0.12);
    --teal-dim: rgba(20,180,160,0.13); --purple-dim: rgba(120,80,220,0.12);
  }
  /* NEBULA - deep indigo space with a vivid violet accent */
  [data-theme="nebula"] {
    --bg: #14111f; --bg2: #1c1830; --bg3: #251f3d; --bg4: #322a55;
    --border: rgba(184,164,255,0.10); --border2: rgba(184,164,255,0.22);
    --text: #ece9f7; --text2: #a59fcb; --text3: #6e688f;
    --accent: #c77dff; --accent2: #a25cf0;
    --accent-dim: rgba(199,125,255,0.15); --accent-dim2: rgba(199,125,255,0.08);
    --accent-ink: #14111f;
    --teal: #4fd6c4; --coral: #ff9bb0; --purple: #b9a7ff; --amber: #f5c66b; --red: #ff7a8a;
  }
  /* OCEAN - deep sea blue-teal with a bright aqua accent */
  [data-theme="ocean"] {
    --bg: #08171c; --bg2: #0d2128; --bg3: #122c35; --bg4: #1a3c47;
    --border: rgba(120,222,232,0.10); --border2: rgba(120,222,232,0.22);
    --text: #e4f4f5; --text2: #8fb8bf; --text3: #587a81;
    --accent: #2ee6c5; --accent2: #1cc6a6;
    --accent-dim: rgba(46,230,197,0.15); --accent-dim2: rgba(46,230,197,0.08);
    --accent-ink: #08171c;
    --teal: #3ee0d0; --coral: #ff9e7a; --purple: #9fb4ff; --amber: #ffd27a; --red: #ff8088;
  }
  /* SUNSET - warm dark plum with a coral-orange accent */
  [data-theme="sunset"] {
    --bg: #1b1116; --bg2: #271a20; --bg3: #34232b; --bg4: #432e38;
    --border: rgba(255,184,160,0.10); --border2: rgba(255,184,160,0.22);
    --text: #f7ece8; --text2: #c6a69f; --text3: #8c6e68;
    --accent: #ff8a5c; --accent2: #f06d3c;
    --accent-dim: rgba(255,138,92,0.15); --accent-dim2: rgba(255,138,92,0.08);
    --accent-ink: #1b1116;
    --teal: #5dd6b0; --coral: #ff9b7b; --purple: #c4a3f0; --amber: #ffc861; --red: #ff7676;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { transition: background-color 0.25s ease, color 0.25s ease; }
  html { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
  body { min-height: 100vh; }
  a { color: inherit; text-decoration: none; }
  button { font-family: var(--font-body); cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
  input, textarea, select { font-family: var(--font-body); font-size: 14px; color: var(--text); background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; outline: none; transition: border-color 0.15s; width: 100%; }
  input:focus, textarea:focus, select:focus { border-color: var(--border2); background: var(--bg4); }
  input::placeholder, textarea::placeholder { color: var(--text3); }
  select option { background: var(--bg3); }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

  /* AUTH */
  #auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
  .auth-box { width: 100%; max-width: 380px; animation: fadeUp 0.4s ease; }
  .auth-logo { font-family: var(--font-display); font-size: 32px; margin-bottom: 8px; letter-spacing: -0.5px; }
  .auth-logo span { color: var(--accent); font-style: italic; }
  .auth-sub { font-size: 13px; color: var(--text2); margin-bottom: 2rem; }
  .auth-field { margin-bottom: 12px; }
  .auth-field label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
  .auth-btn { width: 100%; padding: 12px; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-weight: 500; font-size: 14px; margin-top: 8px; transition: background 0.15s, transform 0.1s; }
  .auth-btn:hover { background: var(--accent2); }
  .auth-btn:active { transform: scale(0.98); }
  .auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .auth-toggle { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text2); }
  .auth-toggle button { color: var(--accent); font-size: 13px; }
  .auth-error { background: var(--red-dim); border: 1px solid var(--red); color: var(--red); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; display: none; }
  .auth-info { background: var(--bg3); border: 1px solid var(--border2); color: var(--text2); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; display: none; }
  .pw-field-wrap { position: relative; }
  .pw-field-wrap input { padding-right: 40px; }
  .pw-toggle-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 6px; margin: 0; cursor: pointer; color: var(--text3); display: flex; align-items: center; justify-content: center; }
  .pw-toggle-btn:hover { color: var(--text2); }
  .pw-toggle-btn svg { width: 17px; height: 17px; }

  /* APP SHELL */
  #app { display: none; min-height: 100vh; }
  .sidebar { position: fixed; top: 0; left: 0; width: 240px; height: 100vh; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1.5rem 1.25rem; z-index: 100; }
  .sidebar-logo { font-family: var(--font-display); font-size: 22px; margin-bottom: 2rem; padding: 0 0.5rem; letter-spacing: -0.3px; }
  .sidebar-logo span { color: var(--accent); font-style: italic; }
  .nav-section { margin-bottom: 1.5rem; }
  .nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3); padding: 0 0.5rem; margin-bottom: 6px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); font-size: 13px; color: var(--text2); cursor: pointer; transition: all 0.15s; border: 1px solid transparent; margin-bottom: 2px; width: 100%; text-align: left; }
  .nav-item:hover { background: var(--bg3); color: var(--text); }
  .nav-item.active { background: var(--accent-dim2); color: var(--accent); border-color: rgba(200,240,122,0.15); }
  .nav-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.8; }
  .nav-hide-menu { background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px; padding: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.35); min-width: 160px; }
  .nav-hide-menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; font-size: 13px; color: var(--text2); background: none; border: none; border-radius: 6px; cursor: pointer; }
  .nav-hide-menu button:hover { background: var(--bg3); color: var(--red,#f87171); }
  .nav-badge { margin-left: auto; background: var(--bg4); color: var(--text3); font-size: 10px; padding: 1px 6px; border-radius: 10px; }
  /* sidebar-scroll contains both Spaces + Account so they scroll together;
     logo stays pinned at top, user chip stays pinned at bottom */
  .sidebar-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
  .sidebar-bottom { flex-shrink: 0; }
  .user-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); }
  .user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 500; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .user-email { font-size: 11px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .signout-btn { font-size: 11px; color: var(--text3); flex-shrink: 0; }
  .signout-btn:hover { color: var(--red); }
  .main-content { margin-left: 240px; padding: 2rem 3rem; min-height: 100vh; width: calc(100% - 240px); }
  .page { display: none; animation: fadeUp 0.25s ease; }
  .page.active { display: block; }
  .page-header { margin-bottom: 2rem; }
  .page-title { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.5px; line-height: 1.2; }
  .page-title span { color: var(--accent); font-style: italic; }
  .page-subtitle { font-size: 13px; color: var(--text2); margin-top: 4px; }

  /* CARDS */
  .card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
  .card-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
  .card-title-action { font-size: 12px; color: var(--text2); cursor: pointer; text-transform: none; letter-spacing: 0; background: none; border: none; }
  .card-title-action:hover { color: var(--accent); }
  .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
  .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
  .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

  /* STAT CARDS */
  .stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
  .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 8px; }
  .stat-value { font-family: var(--font-display); font-size: 36px; line-height: 1; }
  .stat-sub { font-size: 12px; color: var(--text2); margin-top: 6px; }

  /* BADGES */
  .badge { display: inline-flex; align-items: center; font-size: 11px; padding: 3px 9px; border-radius: 20px; }
  .badge-green { background: var(--teal-dim); color: var(--teal); }
  .badge-amber { background: var(--amber-dim); color: var(--amber); }
  .badge-purple { background: var(--purple-dim); color: var(--purple); }
  .badge-coral { background: var(--coral-dim); color: var(--coral); }
  .badge-gray { background: var(--bg4); color: var(--text2); }
  .badge-accent { background: var(--accent-dim); color: var(--accent); }

  /* BUTTONS */
  .btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius); font-size: 13px; transition: all 0.15s; border: 1px solid var(--border); cursor: pointer; background: none; color: var(--text); }
  .btn:hover { background: var(--bg3); border-color: var(--border2); }
  .btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 500; }
  .btn-accent:hover { background: var(--accent2); border-color: var(--accent2); color: var(--accent-ink); }
  .btn-sm { padding: 6px 12px; font-size: 12px; }
  .btn-ghost { border-color: transparent; color: var(--text2); }
  .btn-ghost:hover { background: var(--bg3); border-color: var(--border); color: var(--text); }
  .btn-danger { border-color: var(--red-dim); color: var(--red); background: var(--red-dim); }
  .btn-danger:hover { background: var(--red); color: white; }
  .btn svg { width: 15px; height: 15px; stroke-width: 2; flex-shrink: 0; }
  .divider { height: 1px; background: var(--border); margin: 1rem 0; }

  /* OVERVIEW */
  .overview-greeting { font-family: var(--font-display); font-size: 28px; margin-bottom: 1.5rem; }
  .overview-greeting span { color: var(--accent); font-style: italic; }
  .today-habit-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .today-habit-row:last-child { border-bottom: none; }
  .habit-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border2); background: transparent; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .habit-check.done { background: var(--teal); border-color: var(--teal); }
  .habit-check.done svg { display: block; }
  .habit-check svg { display: none; width: 12px; height: 12px; stroke: #0e0e0e; stroke-width: 2.5; }
  .habit-name-label { font-size: 13px; display: flex; align-items: center; gap: 10px; }

  /* NEWS */
  .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
  .news-card { display: block; text-decoration: none; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; transition: border-color 0.15s; }
  .news-card:hover { border-color: var(--border2); }
  .news-title { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.4; }
  .news-loading { display: flex; align-items: center; gap: 10px; padding: 1rem; color: var(--text2); font-size: 13px; }
  .news-empty { padding: 1rem; color: var(--text3); font-size: 13px; }

  /* HABITS */
  .habit-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
  .hw-day-label { text-align: center; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 4px; }
  .hw-cell { height: 32px; border-radius: 6px; background: var(--bg3); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; }
  .hw-cell:hover { border-color: var(--border2); }
  .hw-cell.done { background: var(--teal); border-color: var(--teal); }
  .hw-cell.today { border-color: var(--border2); }
  .hw-cell.today.done { box-shadow: 0 0 0 2px rgba(93,202,165,0.3); }
  .habit-streak-pill { background: var(--teal-dim); color: var(--teal); font-size: 11px; padding: 3px 9px; border-radius: 20px; }
  .habit-block { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 10px; }
  .habit-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .habit-block-name { font-size: 14px; display: flex; align-items: center; gap: 10px; }
  .progress-bar { height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 10px; }
  .progress-fill { height: 100%; background: var(--teal); border-radius: 2px; transition: width 0.4s; }
  .add-habit-form { display: flex; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }

  /* IDEAS */
  .idea-capture-bar { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
  .idea-capture-bar input { flex: 1; min-width: 200px; }
  .kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
  .kanban-col { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; min-height: 200px; }
  .kanban-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .kanban-col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text2); display: flex; align-items: center; gap: 7px; }
  .kanban-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
  .kanban-count { font-size: 11px; color: var(--text3); background: var(--bg4); padding: 1px 6px; border-radius: 10px; }
  .idea-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; transition: border-color 0.15s; }
  .idea-card:hover { border-color: var(--border2); }
  .idea-card:last-child { margin-bottom: 0; }
  .idea-card-text { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
  .idea-card-footer { display: flex; align-items: center; justify-content: space-between; }
  .idea-card-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
  .idea-card:hover .idea-card-actions { opacity: 1; }
  .idea-action-btn { padding: 3px 7px; border-radius: 5px; font-size: 11px; color: var(--text2); border: 1px solid var(--border); background: var(--bg2); cursor: pointer; }
  .idea-action-btn:hover { color: var(--text); border-color: var(--border2); }

  /* JOURNAL */
  .journal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; }
  .journal-write-area { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
  .journal-write-area textarea { background: transparent; border: none; color: var(--text); font-size: 15px; line-height: 1.8; min-height: 220px; resize: none; padding: 0; }
  .journal-write-area textarea:focus { background: transparent; border: none; }
  .journal-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
  .journal-date-label { font-size: 12px; color: var(--text3); }
  .mood-row { display: flex; gap: 8px; margin-bottom: 1rem; flex-wrap: wrap; }
  .mood-btn { padding: 6px 14px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border); color: var(--text2); background: var(--bg3); transition: all 0.15s; cursor: pointer; }
  .mood-btn.selected { background: var(--accent-dim); border-color: rgba(200,240,122,0.3); color: var(--accent); }
  .prompts-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
  .prompt-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; color: var(--text2); margin-bottom: 8px; cursor: pointer; transition: all 0.15s; line-height: 1.5; }
  .prompt-chip:hover { border-color: var(--border2); color: var(--text); }
  .entry-list { margin-top: 1.5rem; }
  .entry-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .entry-item:last-child { border-bottom: none; }
  .entry-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .entry-meta-left { display: flex; align-items: center; gap: 10px; }
  .entry-date-label { font-size: 11px; color: var(--text3); }
  .entry-preview { font-size: 13px; color: var(--text2); line-height: 1.6; }
  .entry-delete-btn { opacity: 0; font-size: 11px; color: var(--text3); padding: 3px 8px; border-radius: 5px; border: 1px solid transparent; background: none; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
  .entry-item:hover .entry-delete-btn { opacity: 1; }
  .entry-delete-btn:hover { color: var(--red); border-color: var(--red-dim); background: var(--red-dim); }

  /* ERRANDS */
  .errand-section { margin-bottom: 1.5rem; }
  .errand-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
  .errand-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
  .errand-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--border); margin-bottom: 6px; transition: border-color 0.15s; }
  .errand-item:hover { border-color: var(--border2); }
  .errand-check { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--border2); background: transparent; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .errand-check.done { background: var(--teal); border-color: var(--teal); }
  .errand-check.done svg { display: block; }
  .errand-check svg { display: none; width: 11px; height: 11px; stroke: #0e0e0e; stroke-width: 3; }
  .errand-text { font-size: 13px; flex: 1; transition: color 0.15s; }
  .errand-text.done { color: var(--text3); text-decoration: line-through; }
  .errand-delete { opacity: 0; color: var(--text3); font-size: 14px; padding: 2px 6px; border-radius: 4px; border: none; background: none; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
  .errand-item:hover .errand-delete { opacity: 1; }
  .errand-delete:hover { color: var(--red); background: var(--red-dim); }
  .errand-due { font-size:11px; color:var(--text3); white-space:nowrap; flex-shrink:0; }
  .errand-due.overdue { color:var(--red); font-weight:500; }
  .errand-notes-dot { font-size:9px; color:var(--accent); flex-shrink:0; }
  .errand-add-row { display: flex; gap: 8px; margin-top: 8px; }
  /* DAY VIEW */
  .cal-day-view { border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
  .cal-day-allday { padding:8px 8px 8px 64px; border-bottom:1px solid var(--border); display:flex; flex-wrap:wrap; gap:4px; background:var(--bg2); }
  .cal-day-hour-row { display:flex; min-height:50px; border-bottom:1px solid var(--border); }
  .cal-day-hour-row:last-child { border-bottom:none; }
  .cal-day-hour-label { width:56px; font-size:11px; color:var(--text3); padding:6px 8px 0; flex-shrink:0; text-align:right; }
  .cal-day-hour-slot { flex:1; border-left:1px solid var(--border); padding:4px 6px; cursor:pointer; transition:background 0.1s; }
  .cal-day-hour-slot:hover { background:var(--bg3); }
  .errand-add-row input { flex: 1; }
  .errand-add-row select { width: auto; min-width: 130px; }

  /* DISCOVERY */
  .discovery-add-bar { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
  .discovery-add-bar input { flex: 1; min-width: 200px; }
  .discovery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
  .discovery-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: border-color 0.15s; }
  .discovery-card:hover { border-color: var(--border2); }
  .discovery-type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 6px; }
  .discovery-title { font-size: 14px; line-height: 1.4; margin-bottom: 10px; }
  .discovery-card-footer { display: flex; align-items: center; justify-content: space-between; }
  .discovery-actions { opacity: 0; transition: opacity 0.15s; display: flex; gap: 6px; }
  .discovery-card:hover .discovery-actions { opacity: 1; }

  /* GOALS */
  .goal-block { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 10px; }
  .goal-block:hover { border-color: var(--border2); }
  .goal-block-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
  .goal-block-title { font-size: 15px; display: flex; align-items: center; gap: 10px; }
  .goal-block-emoji { font-size: 20px; }
  .goal-block-pct { font-family: var(--font-display); font-size: 24px; color: var(--text2); }
  .goal-bar { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
  .goal-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
  .goal-note { font-size: 12px; color: var(--text3); }
  .goal-add-form { display: flex; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }

  /* RESEARCH */
  .research-mode-tabs { display: flex; gap: 6px; margin-bottom: 1.5rem; }
  .research-tab { padding: 8px 18px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border); color: var(--text2); background: var(--bg2); cursor: pointer; transition: all 0.15s; }
  .research-tab.active { background: var(--accent-dim2); color: var(--accent); border-color: rgba(200,240,122,0.2); }
  .research-panel { display: none; }
  .research-panel.active { display: block; animation: fadeUp 0.2s ease; }
  .research-prompt-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-bottom: 1.5rem; }
  .research-prompt-title { font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
  .research-prompt-title span { color: var(--accent); font-style: italic; }
  .research-prompt-sub { font-size: 13px; color: var(--text2); margin-bottom: 1.5rem; }
  .research-prompt-bar { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
  .research-prompt-bar input { flex: 1; font-size: 15px; padding: 12px 16px; }
  .research-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
  .research-result-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: border-color 0.15s; display: flex; flex-direction: column; }
  .research-result-card:hover { border-color: var(--border2); }
  .research-result-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .research-result-source { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
  .research-result-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
  .research-result-summary { font-size: 12px; color: var(--text2); line-height: 1.6; flex: 1; margin-bottom: 12px; }
  .research-result-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
  .research-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: var(--bg4); color: var(--text2); border: 1px solid var(--border); }
  .research-result-actions { display: flex; gap: 6px; }
  .research-read-zone { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
  .research-read-tabs { display: flex; gap: 8px; margin-bottom: 1.25rem; }
  .research-read-tab { padding: 7px 16px; border-radius: var(--radius); font-size: 13px; border: 1px solid var(--border); color: var(--text2); background: var(--bg3); cursor: pointer; transition: all 0.15s; }
  .research-read-tab.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(200,240,122,0.2); }
  .research-input-panel { display: none; }
  .research-input-panel.active { display: block; }
  .research-url-bar { display: flex; gap: 10px; }
  .research-url-bar input { flex: 1; }
  .research-drop-zone { border: 2px dashed var(--border2); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; cursor: pointer; transition: all 0.2s; }
  .research-drop-zone:hover, .research-drop-zone.drag-over { border-color: var(--accent); background: var(--accent-dim2); }
  .research-drop-zone p { font-size: 14px; color: var(--text2); margin-bottom: 6px; }
  .research-drop-zone span { font-size: 12px; color: var(--text3); }
  .research-summary-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
  .research-summary-title { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
  .research-summary-source { font-size: 12px; color: var(--text3); margin-bottom: 1rem; }
  .research-summary-body { font-size: 14px; color: var(--text2); line-height: 1.8; margin-bottom: 1.25rem; }
  .research-insights { margin-bottom: 1.25rem; }
  .research-insight-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text2); line-height: 1.5; }
  .research-insight-item:last-child { border-bottom: none; }
  .research-insight-bullet { color: var(--accent); flex-shrink: 0; font-size: 16px; line-height: 1.3; }
  .research-quotes { margin-bottom: 1.25rem; }
  .research-quote { background: var(--bg2); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; margin-bottom: 8px; font-size: 13px; color: var(--text2); font-style: italic; line-height: 1.6; cursor: pointer; transition: border-color 0.15s; }
  .research-quote:hover { border-left-color: var(--teal); }
  .research-quote.clipped { border-left-color: var(--teal); background: var(--teal-dim); color: var(--teal); font-style: normal; }
  .research-notes { width: 100%; min-height: 80px; margin-bottom: 1rem; resize: vertical; font-size: 13px; }
  .research-save-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .lib-filter-bar { display: flex; gap: 8px; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: center; }
  .lib-filter-bar input { flex: 1; min-width: 180px; max-width: 300px; }
  .lib-filter-tag { font-size: 12px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg2); color: var(--text2); cursor: pointer; transition: all 0.15s; }
  .lib-filter-tag.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(200,240,122,0.2); }
  .lib-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 10px; transition: border-color 0.15s; }
  .lib-item:hover { border-color: var(--border2); }
  .lib-item.liked { border-color: rgba(200,240,122,0.2); }
  .lib-item-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
  .lib-item-title { font-size: 15px; color: var(--text); line-height: 1.4; flex: 1; }
  .lib-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
  .lib-item-meta { font-size: 11px; color: var(--text3); margin-bottom: 8px; display: flex; gap: 12px; }
  .lib-item-summary { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 10px; }
  .lib-item-clips { margin-bottom: 10px; }
  .lib-clip { background: var(--bg3); border-left: 2px solid var(--teal); padding: 6px 10px; border-radius: 0 6px 6px 0; font-size: 12px; color: var(--text2); font-style: italic; margin-bottom: 4px; }
  .lib-item-notes { font-size: 12px; color: var(--text3); font-style: italic; padding-top: 8px; border-top: 1px solid var(--border); }
  .research-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; gap: 12px; color: var(--text2); font-size: 14px; }
  .recommend-strip { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }

  /* SETTINGS */
  .settings-section { margin-bottom: 2rem; }
  .settings-section-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 1rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .settings-row:last-child { border-bottom: none; }
  .settings-row-label { font-size: 13px; color: var(--text); }
  .settings-row-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
  .settings-row-control { flex-shrink: 0; margin-left: 1rem; }
  .settings-row-control input { width: 220px; }
  .settings-row-control select { width: 180px; }
  .settings-row-control textarea { width: 320px; min-height: 80px; resize: vertical; }
  .toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
  .toggle input { opacity: 0; width: 0; height: 0; }
  .toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg4); border-radius: 22px; transition: 0.2s; border: 1px solid var(--border2); }
  .toggle-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background: var(--text3); border-radius: 50%; transition: 0.2s; }
  .toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
  .toggle input:checked + .toggle-slider:before { transform: translateX(18px); background: var(--accent-ink); }
  .section-overview-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
  .overview-toggle-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
  .overview-toggle-item span { font-size: 13px; color: var(--text2); }
  .overview-note-card { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;background:var(--bg2);border:1.5px dashed var(--border2);border-radius:var(--radius);padding:14px;transition:border-color 0.15s,background 0.15s; }
  .overview-note-card:hover { border-color:var(--accent);background:var(--accent-dim); }
  #overview-widgets { display:flex;flex-direction:column;gap:1rem; }
  .widget-wrap { position:relative; }
  .widget-ctrl { position:absolute;top:10px;right:10px;display:flex;gap:2px;background:var(--bg4);border:1px solid var(--border2);border-radius:20px;padding:3px 4px;z-index:5; }
  .widget-ctrl button { width:27px;height:27px;border:none;background:none;color:var(--text2);border-radius:50%;cursor:pointer;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:background 0.1s; }
  .widget-ctrl button:hover:not([disabled]) { background:var(--bg3);color:var(--text); }
  .widget-ctrl button[disabled] { opacity:0.22;cursor:default; }
  .widget-ctrl .wc-remove { color:var(--red,#e05c5c); }
  .widget-ctrl .wc-remove:hover { background:var(--red-dim,rgba(224,92,92,.15)); }
  .stat-ctrl { position:absolute;bottom:8px;right:8px;display:flex;gap:2px;background:var(--bg4);border:1px solid var(--border2);border-radius:20px;padding:3px 4px;z-index:5; }
  .stat-ctrl button { width:24px;height:24px;border:none;background:none;color:var(--text2);border-radius:50%;cursor:pointer;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:background 0.1s; }
  .stat-ctrl button:hover:not([disabled]) { background:var(--bg3);color:var(--text); }
  .stat-ctrl button[disabled] { opacity:0.22;cursor:default; }
  .stat-ctrl .sc-remove { color:var(--red,#e05c5c); }
  .stat-ctrl .sc-remove:hover { background:var(--red-dim,rgba(224,92,92,.15)); }
  .stat-card-full { grid-column: 1 / -1; }

  /* MOBILE */
  .mobile-header { display: none; }
  .loading-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
  #toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--bg4); border: 1px solid var(--border2); color: var(--text); font-size: 13px; padding: 10px 16px; border-radius: var(--radius); opacity: 0; transform: translateY(8px); transition: all 0.2s; pointer-events: none; z-index: 9999; }
  #toast.show { opacity: 1; transform: translateY(0); }

  @keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  /* DRAG-AND-DROP */
  .kanban-cards { min-height: 60px; }
  .sortable-ghost { opacity: 0.35; background: var(--bg4) !important; border: 1px dashed var(--border2) !important; border-radius: var(--radius); }
  .sortable-drag { box-shadow: 0 8px 28px rgba(0,0,0,0.5) !important; transform: rotate(1.5deg); }

  /* CALENDAR */
  .cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 10px; }
  .cal-nav-title { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.5px; }
  .cal-nav-btns { display: flex; gap: 8px; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
  .cal-day-label { text-align: center; font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 0 6px; }
  .cal-day { min-height: 88px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 7px; cursor: pointer; transition: border-color 0.15s, background 0.15s; overflow: hidden; }
  .cal-day:hover { border-color: var(--border2); background: var(--bg3); }
  .cal-day.today { border-color: var(--accent); }
  .cal-day.other-month { opacity: 0.3; pointer-events: none; }
  .cal-day-num { font-size: 12px; color: var(--text2); margin-bottom: 4px; font-weight: 500; }
  .cal-day.today .cal-day-num { color: var(--accent); font-weight: 700; }
  .cal-event-pill { font-size: 10px; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; display: block; line-height: 1.4; }
  .cal-event-pill.type-personal { background: var(--accent-dim); color: var(--accent); }
  .cal-event-pill.type-errand { background: var(--amber-dim); color: var(--amber); }
  .cal-event-pill.type-habit { background: var(--teal-dim); color: var(--teal); }
  .cal-event-pill.type-goal { background: var(--purple-dim); color: var(--purple); }
  .cal-more { font-size: 9px; color: var(--text3); }
  /* WEEK VIEW - Google Calendar-style time grid */
  .cal-wk-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
  .cal-wk-hdr { display: flex; border-bottom: 1px solid var(--border2); background: var(--bg2); flex-shrink: 0; }
  .cal-wk-corner { width: 52px; flex-shrink: 0; }
  .cal-wk-day-hd-top { flex: 1; min-width: 0; text-align: center; padding: 8px 4px; border-left: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .cal-wk-day-hd-top.today { background: var(--bg3); }
  .cal-wk-day-name { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
  .cal-wk-day-num { font-size: 18px; font-weight: 700; color: var(--text2); line-height: 1; }
  .cal-wk-day-num.today { color: var(--accent); }
  .cal-wk-scroll { overflow-y: auto; max-height: min(580px, calc(100vh - 230px)); }
  .cal-wk-inner { display: flex; }
  .cal-wk-gutter { width: 52px; flex-shrink: 0; }
  .cal-wk-time { height: 48px; font-size: 10px; color: var(--text3); display: flex; align-items: flex-start; justify-content: flex-end; padding: 0 6px 0; box-sizing: border-box; line-height: 1; transform: translateY(-5px); }
  .cal-wk-cols { flex: 1; display: flex; position: relative; }
  .cal-wk-col { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
  .cal-wk-day-hd { display: none; } /* header now lives in .cal-wk-hdr */
  .cal-wk-body { position: relative; cursor: pointer; flex: 1; }
  .cal-wk-body:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
  .cal-wk-hline { position: absolute; left: 0; right: 0; height: 48px; border-top: 1px solid var(--border); pointer-events: none; box-sizing: border-box; }
  .cal-wk-ev { position: absolute; left: 2px; right: 2px; border-radius: 4px; padding: 2px 5px; font-size: 10px; overflow: hidden; cursor: grab; z-index: 1; border-left: 2px solid currentColor; }
  .cal-wk-ev:hover { filter: brightness(1.15); z-index: 2; }
  .cal-wk-ev-dragging { cursor: grabbing; opacity: 0.9; box-shadow: 0 4px 14px rgba(0,0,0,0.4); z-index: 5 !important; }
  .cal-event-pill[draggable="true"] { cursor: grab; }
  .cal-wk-ev-time { font-size: 9px; opacity: 0.75; display: block; line-height: 1.3; }
  .cal-wk-ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 1.3; }
  .cal-wk-ev.recurring { cursor: pointer; }
  .cal-wk-ev.compact { display: flex; flex-direction: row; align-items: center; gap: 4px; }
  .cal-wk-ev.compact .cal-wk-ev-time { display: inline; flex-shrink: 0; white-space: nowrap; }
  .cal-wk-ev.compact .cal-wk-ev-title { display: inline; flex: 1 1 0; min-width: 0; }
  .cal-wk-ev.type-personal { background: var(--accent-dim); color: var(--accent); }
  .cal-wk-ev.type-errand { background: var(--amber-dim); color: var(--amber); }
  .cal-wk-ev.type-habit { background: var(--teal-dim); color: var(--teal); }
  .cal-wk-ev.type-goal { background: var(--purple-dim); color: var(--purple); }
  .cal-wk-ev.type-idea { background: rgba(56,189,248,0.12); color: #38bdf8; }
  .cal-wk-allday-row { padding: 2px 4px; display: flex; flex-wrap: wrap; gap: 2px; }
  .cal-wk-now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red,#f87171); z-index: 3; pointer-events: none; }
  .cal-wk-drag-preview { position: absolute; left: 2px; right: 2px; border-radius: 4px; background: var(--accent-dim); border: 1.5px dashed var(--accent); color: var(--accent); font-size: 10px; font-weight: 600; padding: 3px 5px; pointer-events: none; z-index: 10; overflow: hidden; user-select: none; }
  .cal-wk-pending { position: absolute; left: 2px; right: 2px; border-radius: 4px; background: rgba(240,160,64,0.15); border: 1.5px solid #f0a040; color: #f0a040; font-size: 10px; font-weight: 600; padding: 3px 5px; pointer-events: none; z-index: 8; overflow: hidden; }
  .cal-wk-body { cursor: crosshair; }
  .cal-wk-now-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red,#f87171); }
  .cal-view-toggle { border: 1px solid var(--border2) !important; }
  .cal-view-toggle.active { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: var(--accent) !important; }
  /* EVENT MODAL */
  .event-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn 0.15s ease; }
  .event-modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 1.5rem; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; animation: scaleIn 0.2s ease; }
  .event-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
  .event-modal-title { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.3px; }
  .event-modal-field { margin-bottom: 12px; min-width: 0; }
  .event-modal-field label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
  .event-modal-field input[type="date"] { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .event-time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .event-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.25rem; align-items: center; }

  @media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; padding: 1rem; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border); background: var(--bg2); position: sticky; top: 0; z-index: 50; }
    .mobile-logo { font-family: var(--font-display); font-size: 18px; }
    .mobile-logo span { color: var(--accent); font-style: italic; }
    .hamburger { padding: 6px; border-radius: var(--radius); border: 1px solid var(--border); }
    .hamburger svg { width: 18px; height: 18px; stroke: var(--text2); }
    .journal-layout { grid-template-columns: 1fr; }
    .settings-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .settings-row-control input, .settings-row-control select, .settings-row-control textarea { width: 100%; }
    .section-overview-toggles { grid-template-columns: 1fr; }
    /* iOS Safari auto-zooms the whole page in when you focus any input/select
       under 16px - independent of the viewport meta's user-scalable setting.
       That auto-zoom, not deliberate pinching, is almost certainly the "buggy"
       zoom behavior: it fires every time a field is tapped. Bumping to 16px
       here removes the trigger entirely, on mobile only (desktop keeps 14px). */
    input, textarea, select { font-size: 16px; }
  }
  @media (max-width: 480px) {
    .grid2, .grid3 { grid-template-columns: 1fr; }
    .kanban { grid-template-columns: 1fr; }
    /* iOS Safari's native date control has a fixed-ish internal width that
       our own padding can push past the input's box on narrow screens -
       trimming the padding here gives it enough room to stay inside. */
    .event-modal-field input[type="date"] { padding: 10px 6px; }
  }
  /* THEME PICKER (segmented control) */
  .theme-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border2); flex-shrink: 0; }
  .theme-picker-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg3); color: var(--text); font-size: 13px; cursor: pointer; transition: border-color 0.15s; min-width: 140px; }
  .theme-picker-btn:hover { border-color: var(--border2); }
  .theme-swatch-split { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(128,128,128,0.2); }
  .theme-picker-btn span:nth-child(2) { flex: 1; text-align: left; }
  .theme-picker-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 10px; z-index: 300; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
  .theme-pop-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; font-size: 13px; color: var(--text2); transition: all 0.15s; }
  .theme-pop-opt:hover { background: var(--bg3); color: var(--text); }
  .theme-pop-opt.active { border-color: var(--border2); color: var(--text); background: var(--bg3); }

  /* DISCOVERY - FOLDER GRID */
  .disc-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }
  .disc-folder { position: relative; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 1.25rem 1.25rem; cursor: pointer; transition: border-color 0.15s, transform 0.1s, background 0.15s; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .disc-folder:hover { border-color: var(--border2); background: var(--bg3); transform: translateY(-2px); }
  .disc-folder-icon { width: 46px; height: 46px; color: var(--accent); }
  .disc-folder-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .disc-folder-label { font-size: 14px; color: var(--text); font-weight: 500; text-align: center; }
  .disc-folder-count { font-size: 11px; color: var(--text3); }
  .disc-folder-remove { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; color: var(--text3); opacity: 0; transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
  .disc-folder:hover .disc-folder-remove { opacity: 1; }
  .disc-folder-remove:hover { color: var(--red); background: var(--red-dim); }
  .disc-folder-add { border-style: dashed; justify-content: center; color: var(--text3); min-height: 120px; }
  .disc-folder-add:hover { color: var(--accent); border-color: var(--accent); background: var(--bg2); }
  .disc-folder-add svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

  /* DISCOVERY - ICON PICKER */
  .disc-icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
  .disc-icon-opt { width: 38px; height: 38px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg3); color: var(--text3); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.15s, background 0.15s; }
  .disc-icon-opt svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .disc-icon-opt:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
  .disc-icon-opt.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

  /* DISCOVERY - INSIDE A FOLDER */
  .disc-folder-head { display: flex; align-items: center; gap: 14px; margin-bottom: 1.25rem; flex-wrap: wrap; }
  .disc-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--border); }
  .disc-back:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
  .disc-folder-head-title { font-family: var(--font-display); font-size: 22px; display: flex; align-items: center; gap: 10px; }
  .disc-folder-head-title svg { width: 22px; height: 22px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.6; }
  .discovery-card { cursor: pointer; }
  .discovery-rating { margin: 2px 0 10px; }

  /* STAR RATING */
  .stars { display: inline-flex; gap: 3px; }
  .star { cursor: pointer; color: var(--text3); font-size: 15px; line-height: 1; transition: color 0.1s, transform 0.1s; background: none; padding: 0; border: none; }
  .star.filled { color: var(--amber); }
  .star:hover { transform: scale(1.15); }
  .stars-lg .star { font-size: 26px; }

  /* SHARED MODAL EXTRAS (reuses .event-modal-backdrop / .event-modal) */
  .modal-wide { max-width: 520px; }
  .event-modal-field select { width: 100%; }
  .prompt-q { font-size: 15px; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
  .prompt-sub { font-size: 12px; color: var(--text3); margin-bottom: 1.4rem; }
  .prompt-count { font-size: 11px; color: var(--text3); text-align: center; margin-top: 14px; }
  .modal-label { font-size: 12px; color: var(--text2); margin-bottom: 6px; display: block; }

  /* IDEA NOTION-STYLE MODAL */
  .modal-notion { max-width: 680px; padding-top: 1rem; }
  .notion-title { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.4px; width: 100%; background: none; border: none; color: var(--text); outline: none; resize: none; line-height: 1.3; padding: 0; margin-bottom: 5px; overflow: hidden; }
  .notion-title::placeholder { color: var(--text3); }
  .notion-meta-row { display: flex; gap: 10px; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; }
  .notion-meta-item { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
  .notion-meta-item select { font-size: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; color: var(--text); }
  .notion-body { width: 100%; min-height: 160px; background: none; border: none; border-top: 1px solid var(--border); color: var(--text); font-size: 14px; line-height: 1.75; padding: 14px 0 0 0; resize: none; outline: none; }
  .notion-body::placeholder { color: var(--text3); }

  /* GOAL CARDS */
  .goal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 10px; cursor: pointer; transition: border-color 0.15s; }
  .goal-card:hover { border-color: var(--border2); }
  .goal-card-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
  .goal-card-emoji { font-size: 30px; line-height: 1; flex-shrink: 0; }
  .goal-card-text { flex: 1; min-width: 0; }
  .goal-card-name { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
  .goal-card-note { font-size: 12px; color: var(--text3); }
  .goal-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
  .goal-pct-big { font-family: var(--font-display); font-size: 26px; color: var(--text2); line-height: 1; }
  .goal-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border2); background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 2px; transition: all 0.15s; color: transparent; }
  .goal-check svg { width: 14px; height: 14px; stroke-width: 3; }
  .goal-check:hover { border-color: var(--accent); }
  .goal-check.done { background: var(--amber); border-color: var(--amber); color: var(--bg); }
  .goal-completed-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber); }
  .goal-card-done .goal-card-name { text-decoration: line-through; opacity: 0.55; }
  .goal-card-done { opacity: 0.85; }
  .goals-completed-header { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); margin: 1.75rem 0 0.75rem; font-weight: 600; }
  .goal-date-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; white-space: nowrap; font-weight: 500; }
  .goal-date-ok { background: rgba(93,202,165,0.15); color: var(--teal); }
  .goal-date-warn { background: rgba(240,192,96,0.15); color: var(--amber); }
  .goal-date-over { background: rgba(240,112,112,0.15); color: var(--red); }
  .goal-bar-lg { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
  .goal-bar-lg-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
  .goal-milestone-preview { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
  .goal-ms-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
  .goal-ms-dot { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid var(--border2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: transparent; }
  .goal-ms-dot.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

  /* GOAL DETAIL MODAL */
  .modal-goal { max-width: 540px; }
  .goal-modal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 1rem; }
  .goal-modal-emoji-inp { font-size: 24px; width: 52px; text-align: center; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
  .goal-modal-name-inp { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.3px; flex: 1; }
  .milestone-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 8px; }
  .milestone-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
  .milestone-row:last-child { border-bottom: none; }
  .milestone-toggle { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--border2); background: none; cursor: pointer; flex-shrink: 0; font-size: 11px; color: transparent; display: flex; align-items: center; justify-content: center; }
  .milestone-toggle.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .milestone-text-inp { flex: 1; background: none; border: none; font-size: 13px; color: var(--text); outline: none; }
  .milestone-text-inp::placeholder { color: var(--text3); }
  .milestone-del-btn { color: var(--text3); font-size: 11px; cursor: pointer; padding: 2px 6px; background: none; border: none; }
  .milestone-del-btn:hover { color: var(--red); }
  .milestone-add-row { display: flex; gap: 8px; }

  /* IDEA event pill on calendar */
  .cal-event-pill.type-idea { background: rgba(56,189,248,0.12); color: #38bdf8; }

  /* Drag-to-schedule panel */
  .schedule-panel { margin-bottom: 10px; }
  .schedule-panel-toggle { display:flex; align-items:center; gap:6px; cursor:pointer; font-size:12px; color:var(--text3); padding:4px 0 4px; user-select:none; background:none; border:none; width:100%; text-align:left; }
  .schedule-panel-toggle:hover { color:var(--text2); }
  .sp-arrow { transition:transform 0.18s; display:inline-block; }
  .schedule-panel-toggle.open .sp-arrow { transform:rotate(90deg); }
  .schedule-chips { display:flex; flex-wrap:wrap; gap:6px; padding:6px 0 10px; }
  .schedule-chip { display:inline-flex; align-items:center; gap:5px; font-size:12px; padding:4px 10px; border-radius:20px; border:1px solid var(--border); background:var(--bg2); color:var(--text2); cursor:grab; max-width:180px; }
  .schedule-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .schedule-chip:hover { border-color:var(--border2); color:var(--text); }
  .schedule-chip:active { cursor:grabbing; opacity:0.65; }
  .cal-day.drag-over { background:var(--accent-dim2) !important; outline:2px dashed var(--accent); outline-offset:-2px; }
  .cal-week-day.drag-over { background:var(--accent-dim2) !important; outline:2px dashed var(--accent); outline-offset:-2px; }

  /* Sessions in idea / goal modals */
  .sessions-section { margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--border); }
  .sessions-section-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
  .sessions-section-title { font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--text3); font-weight:500; }
  .session-row { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:1px solid var(--border); }
  .session-row:last-child { border-bottom:none; }
  .session-row-date { font-size:11px; color:var(--text3); min-width:78px; flex-shrink:0; }
  .session-row-title { font-size:13px; color:var(--text2); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .session-row-btn { font-size:11px; color:var(--accent); background:none; border:none; cursor:pointer; padding:2px 6px; border-radius:4px; flex-shrink:0; }
  .session-row-btn:hover { background:var(--accent-dim); }
  .sessions-empty { font-size:12px; color:var(--text3); font-style:italic; padding:2px 0; }
  .session-add-btn { font-size:11px; color:var(--text3); background:none; border:1px solid var(--border); border-radius:12px; padding:2px 10px; cursor:pointer; white-space:nowrap; }
  .session-add-btn:hover { color:var(--text); border-color:var(--border2); }
  .session-row { cursor:pointer; border-radius:5px; }
  .session-row:hover { background:var(--bg3); }
  .session-notes-dot { font-size:9px; color:var(--accent); margin-left:5px; vertical-align:middle; }

  /* NOTES WORKSPACE */
  .notes-bc { display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-bottom:1.25rem; }
  .notes-bc-btn { background:none; border:none; color:var(--text2); font-size:13px; cursor:pointer; padding:3px 6px; border-radius:4px; transition:background 0.1s; }
  .notes-bc-btn:hover { background:var(--bg3); color:var(--text); }
  .notes-bc-sep { color:var(--text3); font-size:13px; }
  .notes-bc-cur { font-size:13px; color:var(--text); font-weight:500; padding:3px 6px; }
  .notes-empty { text-align:center; padding:4rem 1rem; color:var(--text2); }
  .notes-sec-label { font-size:11px; text-transform:uppercase; letter-spacing:0.08em; color:var(--text3); margin-bottom:8px; }
  .notes-folder-list { display:flex; flex-direction:column; gap:5px; }
  .notes-folder-card { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); cursor:pointer; transition:border-color 0.15s,background 0.15s; }
  .notes-folder-card:hover { border-color:var(--border2); }
  .notes-folder-card.drag-over { border-color:var(--accent); background:var(--accent-dim2,var(--accent-dim)); }
  .notes-folder-name { font-size:14px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .notes-folder-meta { font-size:11px; color:var(--text3); margin-top:1px; }
  .notes-folder-icon { width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:var(--bg4,var(--bg3)); flex-shrink:0; }
  .notes-folder-menu { margin-left:4px; background:none; border:none; color:var(--text3); font-size:18px; cursor:pointer; padding:0 4px; opacity:0; transition:opacity 0.12s; line-height:1; flex-shrink:0; }
  .notes-folder-card:hover .notes-folder-menu { opacity:1; }
  .notes-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
  .notes-note-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:14px; cursor:pointer; transition:border-color 0.15s; display:flex; flex-direction:column; gap:4px; min-height:80px; position:relative; }
  .notes-note-card:hover { border-color:var(--border2); }
  .notes-note-title { font-size:14px; font-weight:500; color:var(--text); line-height:1.35; padding-right:20px; }
  .notes-note-preview { font-size:12px; color:var(--text3); line-height:1.55; flex:1; overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; white-space:pre-line; }
  .notes-note-ts { font-size:11px; color:var(--text3); margin-top:auto; padding-top:6px; }
  .notes-file-badge { font-size:10px; padding:2px 7px; border-radius:10px; background:var(--bg4,var(--bg3)); color:var(--text2); border:1px solid var(--border); }
  .notes-card-menu { position:absolute; top:8px; right:8px; background:var(--bg3); border:1px solid var(--border); border-radius:5px; color:var(--text3); font-size:15px; cursor:pointer; padding:0 5px; line-height:22px; opacity:0; transition:opacity 0.12s; }
  .notes-note-card:hover .notes-card-menu { opacity:1; }
  /* Note editor full-screen */
  .note-editor-topbar { display:flex; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid var(--border); background:var(--bg); flex-shrink:0; }
  .note-editor-title { flex:1; font-size:18px; font-weight:500; border:none; background:transparent; color:var(--text); padding:0; min-width:0; }
  .note-editor-title:focus { outline:none; }
  .note-trash-btn { font-size:12px; padding:4px 10px; border-radius:var(--radius); border:1px solid var(--red,#f87171); color:var(--red,#f87171); background:transparent; cursor:pointer; transition:background 0.1s; flex-shrink:0; }
  .note-trash-btn:hover { background:rgba(248,113,113,0.1); }
  .note-editor-bar { display:flex; align-items:center; gap:3px; padding:5px 12px; border-bottom:1px solid var(--border); background:var(--bg); flex-wrap:wrap; flex-shrink:0; }
  .note-fmt-group { display:flex; gap:1px; }
  .note-fmt-btn { padding:4px 8px; border-radius:4px; border:none; background:transparent; color:var(--text2); font-size:13px; cursor:pointer; line-height:1.2; transition:background 0.1s,color 0.1s; white-space:nowrap; display:flex; align-items:center; gap:3px; }
  .note-fmt-btn:hover { background:var(--bg3); color:var(--text); }
  .note-fmt-btn.active { background:var(--accent-dim); color:var(--accent); }
  .note-bar-sep { width:1px; height:18px; background:var(--border2); margin:0 4px; flex-shrink:0; }
  .note-editor-scroll { flex:1; overflow-y:auto; padding:28px 32px; }
  .note-editor-body { max-width:760px; margin:0 auto; min-height:300px; font-size:15px; line-height:1.85; color:var(--text); outline:none; }
  .note-editor-body:empty::before { content:attr(data-placeholder); color:var(--text3); pointer-events:none; }
  .note-editor-body h1 { font-family:var(--font-display); font-size:2.2rem; margin:0.5em 0 0.3em; line-height:1.1; }
  .note-editor-body h2 { font-size:1.3rem; font-weight:600; margin:0.75em 0 0.25em; }
  .note-editor-body ul,.note-editor-body ol { padding-left:1.5rem; margin:0.4rem 0; }
  .note-editor-body li { margin-bottom:0.2rem; }
  .note-editor-body blockquote { border-left:3px solid var(--accent); padding-left:1rem; color:var(--text2); margin:0.75rem 0; font-style:italic; }
  .note-editor-body hr { border:none; border-top:1px solid var(--border2); margin:1.75rem 0; }
  .note-editor-body b,.note-editor-body strong { color:var(--text); font-weight:600; }
  .note-editor-body a { color:var(--accent); text-decoration:underline; }
  /* Sticky notes */
  .notes-sticky { position:absolute; width:150px; border-radius:4px; padding:6px 6px 8px; box-shadow:0 2px 10px rgba(0,0,0,0.25); cursor:move; z-index:10; }
  .notes-sticky-x { position:absolute; top:2px; right:4px; background:none; border:none; font-size:15px; line-height:1; cursor:pointer; color:rgba(0,0,0,0.35); padding:0; }
  .notes-sticky-ta { width:100%; min-height:56px; background:transparent; border:none; resize:none; font-size:12px; color:#333; line-height:1.45; padding-top:14px; cursor:text; outline:none; }
  /* Move to modal */
  .notes-move-row { padding:9px 12px; font-size:13px; color:var(--text2); cursor:pointer; border-radius:var(--radius); transition:background 0.1s; }
  .notes-move-row:hover { background:var(--bg3); color:var(--text); }
  .notes-move-row.active { background:var(--accent-dim); color:var(--accent); }
  /* Custom dialogs */
  .notes-dialog-input { width:100%; box-sizing:border-box; background:var(--bg3); border:1px solid var(--border2); border-radius:var(--radius); color:var(--text); font-size:14px; padding:9px 12px; outline:none; transition:border-color 0.15s; }
  .notes-dialog-input:focus { border-color:var(--accent); }
  .notes-action-btn { display:flex; align-items:center; gap:8px; width:100%; padding:10px 12px; border-radius:var(--radius); border:none; background:transparent; color:var(--text2); font-size:13px; cursor:pointer; text-align:left; transition:background 0.1s,color 0.1s; }
  .notes-action-btn:hover { background:var(--bg3); color:var(--text); }
  .notes-action-btn-danger { color:var(--red,#f87171); }
  .notes-action-btn-danger:hover { background:rgba(248,113,113,0.08); color:var(--red,#f87171); }
  .btn-danger { background:var(--red,#f87171) !important; color:#fff !important; border-color:transparent !important; }

  /* REMINDERS */
  .reminder-add-card { display:flex; flex-direction:column; gap:10px; }
  .reminder-text-input { width:100%; font-size:18px; font-weight:500; background:none; border:none; border-bottom:1.5px solid var(--border2); outline:none; padding:4px 0 8px; color:var(--text); }
  .reminder-text-input::placeholder { color:var(--text3); font-weight:400; }
  .reminder-text-input:focus { border-bottom-color:var(--accent); }
  .reminder-add-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
  .reminder-add-meta input[type="date"] { flex:1; min-width:120px; }
  .reminder-add-meta .tp-field { flex:1; min-width:120px; }

  /* FOCUS TIMER */
  .focus-page { display:flex; flex-direction:column; align-items:center; padding-top:0.5rem; }
  .focus-home-layout { display:grid; grid-template-columns:1fr 1fr; gap:2rem; width:100%; max-width:820px; align-items:start; }
  .focus-setup-panel { transition:opacity 0.35s ease, transform 0.35s ease; }
  .focus-home-layout.focus-launching .focus-setup-panel { opacity:0; transform:translateX(-30px); pointer-events:none; }
  .focus-timer-panel { display:flex; flex-direction:column; align-items:center; padding-top:0.25rem; }
  @media(max-width:680px) { .focus-home-layout { grid-template-columns:1fr; } .focus-timer-panel { order:-1; } }
  .focus-modes { display:flex; gap:8px; margin-bottom:1.75rem; flex-wrap:wrap; justify-content:center; }
  .focus-mode-btn { display:flex; flex-direction:column; align-items:center; gap:2px; padding:9px 18px; border-radius:var(--radius); border:1px solid var(--border); background:var(--bg2); color:var(--text2); cursor:pointer; transition:all 0.15s; }
  .focus-mode-btn:hover { border-color:var(--border2); }
  .focus-mode-btn.active { border-color:var(--accent); background:var(--accent-dim); color:var(--accent); }
  .focus-mode-label { font-size:14px; font-weight:500; }
  .focus-mode-sub { font-size:11px; opacity:0.7; }
  .focus-timer-wrap { position:relative; width:300px; height:300px; max-width:80vw; }
  .focus-ring { width:100%; height:100%; }
  .focus-ring-bg { fill:none; stroke:var(--border); stroke-width:10; }
  .focus-ring-fg { fill:none; stroke:var(--accent); stroke-width:10; stroke-linecap:round; transition:stroke-dashoffset 0.95s linear, stroke 0.3s; }
  .focus-timer-wrap.is-break .focus-ring-fg { stroke:#5dcaa5; }
  .focus-ring-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
  .focus-phase { font-size:12px; text-transform:uppercase; letter-spacing:0.12em; color:var(--text3); }
  .focus-time { font-family:var(--font-display,inherit); font-size:64px; font-weight:600; line-height:1; color:var(--text); font-variant-numeric:tabular-nums; }
  .focus-mode-name { font-size:12px; color:var(--text3); }
  .focus-controls { display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; margin-top:1.75rem; }
  .focus-today { margin-top:1.5rem; font-size:13px; color:var(--text3); display:flex; gap:10px; align-items:center; }
  .focus-today-stat strong { color:var(--text); font-weight:600; }
  .focus-today-dot { opacity:0.5; }
  .focus-session-title { font-family:var(--font-display); font-size:22px; letter-spacing:-0.3px; color:var(--text); width:100%; background:none; border:none; border-bottom:1.5px solid transparent; outline:none; text-align:center; padding:4px 0; margin-bottom:0.5rem; transition:border-color 0.15s; }
  .focus-session-title:hover { border-bottom-color:var(--border2); }
  .focus-session-title:focus { border-bottom-color:var(--accent); }
  .focus-session-title::placeholder { color:var(--text3); }
  .focus-loop-badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--accent); background:var(--accent-dim); border-radius:20px; padding:4px 10px; margin-bottom:10px; }
  .focus-loop-row { display:flex; align-items:center; gap:10px; margin-top:1.25rem; justify-content:center; }
  .focus-loop-label { font-size:13px; color:var(--text3); }

  @media(max-width:600px) {
    .note-editor-scroll { padding:16px; }
    .notes-card-grid { grid-template-columns:1fr 1fr; }
    .note-editor-bar { gap:1px; padding:4px 8px; }
    .note-fmt-btn { padding:4px 5px; font-size:12px; }
  }

  /* HEALTH PAGE */
  .health-week-strip { display:flex; gap:4px; margin-bottom:1.25rem; overflow-x:auto; padding:4px 0; }
  .health-week-day { display:flex; flex-direction:column; align-items:center; gap:5px; min-width:46px; padding:9px 6px; border-radius:var(--radius); border:1px solid transparent; background:none; cursor:pointer; transition:all 0.15s; color:var(--text); }
  .health-week-day:hover { background:var(--bg3); }
  .health-week-day.active { background:var(--bg3); border-color:var(--border2); }
  .health-week-day.today .health-week-num { color:var(--accent); font-weight:700; }
  .health-week-label { font-size:10px; color:var(--text3); text-transform:uppercase; letter-spacing:0.05em; }
  .health-week-num { font-size:14px; font-weight:500; color:var(--text); line-height:1; }
  .health-week-dot { width:8px; height:8px; border-radius:50%; transition:background 0.2s; }
  .health-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--border); }
  .health-row:last-of-type { border-bottom:none; }
  .health-row-col { flex-direction:column; align-items:flex-start; gap:8px; }
  .health-row-label { font-size:13px; color:var(--text2); min-width:92px; flex-shrink:0; }
  .health-ctrl-wrap { display:flex; align-items:center; gap:8px; }
  .health-ctrl-sub { font-size:11px; color:var(--text3); margin-top:3px; }
  .health-unit { font-size:12px; color:var(--text3); }
  .health-num { width:72px; text-align:center; padding:5px 6px; }
  .health-notes { width:100%; box-sizing:border-box; resize:vertical; }
  /* stepper */
  .health-stepper { display:flex; align-items:center; gap:4px; }
  .health-stepper button { width:30px; height:30px; border-radius:8px; border:1px solid var(--border2); background:var(--bg3); color:var(--text); font-size:17px; cursor:pointer; line-height:1; transition:all 0.12s; }
  .health-stepper button:hover { background:var(--bg4); border-color:var(--accent); }
  .health-stepper-val { min-width:30px; text-align:center; font-size:16px; font-weight:600; font-variant-numeric:tabular-nums; }
  /* scale rows */
  .health-scale-row { display:flex; gap:6px; flex-wrap:wrap; }
  .health-mood-btn { display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 8px; border-radius:var(--radius); border:1px solid var(--border); background:var(--bg3); cursor:pointer; transition:all 0.15s; min-width:50px; }
  .health-mood-btn.active { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 12%, transparent); }
  .health-mood-btn:hover:not(.active) { background:var(--bg4); border-color:var(--border2); }
  .health-energy-bar { width:26px; height:34px; border-radius:5px; border:1.5px solid var(--border2); background:var(--bg3); cursor:pointer; transition:all 0.15s; }
  .health-energy-bar.filled { background:var(--accent); border-color:var(--accent); }
  .health-energy-bar:hover:not(.filled) { background:var(--bg4); }
  .health-pill { min-width:34px; height:34px; border-radius:8px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); font-size:13px; cursor:pointer; transition:all 0.12s; }
  .health-pill.active { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
  /* dots */
  .health-drop-row { display:flex; gap:2px; flex-wrap:wrap; }
  .health-drop { font-size:19px; background:none; border:none; cursor:pointer; opacity:0.2; transition:opacity 0.1s, transform 0.1s; padding:1px 2px; line-height:1; }
  .health-drop.filled { opacity:1; }
  .health-drop:hover { transform:scale(1.2); opacity:0.7; }
  .health-drop.filled:hover { opacity:1; }
  /* yes/no + streak toggle */
  .health-toggle { display:inline-flex; border:1px solid var(--border2); border-radius:8px; overflow:hidden; }
  .health-toggle button { padding:6px 14px; background:var(--bg3); color:var(--text2); border:none; cursor:pointer; font-size:13px; transition:all 0.12s; }
  .health-toggle button + button { border-left:1px solid var(--border2); }
  .health-toggle button.active { background:var(--accent); color:var(--accent-ink); font-weight:600; }
  .health-toggle button.active.no { background:var(--text3); color:var(--bg); }
  .health-toggle button:hover:not(.active) { background:var(--bg4); }
  /* customize controls */
  .health-track-ctrl { display:flex; gap:2px; background:var(--bg4); border:1px solid var(--border2); border-radius:20px; padding:3px 4px; }
  .health-track-ctrl button { width:26px; height:26px; border:none; background:none; color:var(--text2); border-radius:50%; cursor:pointer; font-size:13px; transition:all 0.12s; }
  .health-track-ctrl button:hover:not(:disabled) { background:var(--bg2); color:var(--text); }
  .health-track-ctrl button:disabled { opacity:0.3; cursor:default; }
  .health-track-ctrl .htc-remove { color:var(--red,#e05c5c); }
  /* add panel */
  .health-add-panel { background:var(--bg2); border:1px dashed var(--border2); border-radius:var(--radius-lg); padding:1rem 1.25rem; margin-bottom:1.5rem; }
  .health-add-title { font-size:12px; text-transform:uppercase; letter-spacing:0.05em; color:var(--text3); margin-bottom:10px; font-weight:600; }
  .health-add-chips { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .health-add-chip { font-size:12px; padding:6px 12px; border-radius:20px; border:1.5px dashed var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; transition:all 0.12s; }
  .health-add-chip:hover { border-color:var(--accent); color:var(--text); }
  .health-add-chip.custom { border-style:solid; background:var(--bg4); }
  .health-custom-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
  /* history */
  .health-history-row { display:flex; align-items:flex-start; gap:10px; padding:12px 0; border-bottom:1px solid var(--border); transition:opacity 0.15s; }
  .health-history-main { flex:1; min-width:0; cursor:pointer; }
  .health-history-row:hover { opacity:0.85; }
  .health-history-row.active { background:var(--bg2); border-radius:var(--radius); padding:12px 10px; margin:0 -10px; }
  .health-history-del { color:var(--text3); background:none; border:none; cursor:pointer; font-size:14px; padding:2px 6px; flex-shrink:0; transition:color 0.12s; }
  .health-history-del:hover { color:var(--red,#e05c5c); }
  .health-history-date { font-size:12px; font-weight:600; color:var(--text2); margin-bottom:6px; }
  .health-history-chips { display:flex; flex-wrap:wrap; gap:5px; }
  .health-chip { font-size:11px; padding:2px 8px; border-radius:20px; background:var(--bg3); border:1px solid var(--border); color:var(--text2); }
  .health-history-notes { font-size:12px; color:var(--text3); margin-top:6px; font-style:italic; }
  .stat-sub { font-size:11px; color:var(--text3); margin-top:2px; }

  /* MORNING ROUTINE */
  .morning-launch { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; text-align:left; border:none; cursor:pointer; border-radius:var(--radius-lg); padding:16px 20px; margin:0.5rem 0 1.25rem; color:#3a2410; background:linear-gradient(110deg,#ffd194 0%,#fcb69f 45%,#ff9a8b 100%); box-shadow:0 6px 22px -10px rgba(255,154,139,0.7); transition:transform 0.12s, box-shadow 0.12s; }
  .morning-launch:hover { transform:translateY(-1px); box-shadow:0 10px 26px -10px rgba(255,154,139,0.85); }
  .morning-launch-left { display:flex; align-items:center; gap:14px; }
  .morning-launch-emoji { font-size:30px; line-height:1; filter:drop-shadow(0 2px 4px rgba(180,90,40,0.35)); }
  .morning-launch-title { font-size:16px; font-weight:700; letter-spacing:-0.2px; }
  .morning-launch-sub { font-size:12px; opacity:0.75; margin-top:2px; }
  .morning-launch-time { font-family:'Bebas Neue',sans-serif; font-size:30px; letter-spacing:1px; line-height:1; }

  .morning-overlay { position:fixed; inset:0; z-index:200; overflow-y:auto; background:linear-gradient(180deg,#fde7c4 0%,#ffc796 32%,#ff9e7d 70%,#f97e7e 100%); -webkit-overflow-scrolling:touch; }
  .morning-inner { max-width:560px; margin:0 auto; padding:3.5rem 1.25rem 4rem; color:#3a2410; }
  .morning-close { position:absolute; top:18px; right:18px; width:38px; height:38px; border-radius:50%; border:none; background:rgba(255,255,255,0.45); color:#3a2410; font-size:16px; cursor:pointer; transition:background 0.15s; }
  .morning-close:hover { background:rgba(255,255,255,0.75); }
  .morning-clock { font-family:'Bebas Neue',sans-serif; font-size:84px; line-height:0.9; letter-spacing:2px; text-align:center; text-shadow:0 3px 10px rgba(180,90,40,0.25); }
  .morning-ampm { font-size:30px; margin-left:8px; opacity:0.8; }
  .morning-greeting { text-align:center; font-family:var(--font-display); font-size:30px; margin-top:6px; letter-spacing:-0.3px; }
  .morning-date { text-align:center; font-size:13px; opacity:0.7; margin-top:2px; margin-bottom:1.75rem; text-transform:uppercase; letter-spacing:0.08em; }
  .morning-card { background:rgba(255,255,255,0.55); backdrop-filter:blur(6px); border:1px solid rgba(255,255,255,0.6); border-radius:16px; padding:16px 18px; margin-bottom:14px; box-shadow:0 4px 16px -8px rgba(180,90,40,0.3); }
  .morning-card-label { font-size:11px; text-transform:uppercase; letter-spacing:0.07em; font-weight:700; opacity:0.65; margin-bottom:12px; }
  .morning-sleep-row { display:flex; align-items:center; gap:10px; }
  .morning-sleep-row input { width:84px; text-align:center; padding:8px; font-size:16px; border-radius:10px; border:1px solid rgba(120,70,30,0.25); background:rgba(255,255,255,0.7); color:#3a2410; }
  .morning-sleep-unit { font-size:13px; opacity:0.7; }
  .morning-sleep-card .btn-accent { margin-left:auto; }
  .morning-weather-main { display:flex; align-items:center; gap:12px; }
  .morning-weather-emoji { font-size:42px; line-height:1; }
  .morning-weather-temp { font-family:'Bebas Neue',sans-serif; font-size:48px; line-height:1; letter-spacing:1px; }
  .morning-weather-meta { margin-top:6px; }
  .morning-weather-desc { font-size:15px; font-weight:600; }
  .morning-weather-sub { font-size:12px; opacity:0.7; margin-top:2px; }
  .morning-todos { display:flex; flex-direction:column; gap:4px; }
  .morning-todo-group { font-size:11px; text-transform:uppercase; letter-spacing:0.05em; opacity:0.55; font-weight:700; margin:8px 0 2px; }
  .morning-todo-group:first-child { margin-top:0; }
  .morning-todo-row { display:flex; align-items:center; gap:10px; font-size:14px; padding:4px 0; }
  .morning-todo-row.done span { text-decoration:line-through; opacity:0.5; }
  .morning-check { width:22px; height:22px; border-radius:50%; border:2px solid rgba(120,70,30,0.4); background:rgba(255,255,255,0.5); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; color:transparent; transition:all 0.12s; }
  .morning-check svg { width:12px; height:12px; stroke-width:3; }
  .morning-check:hover { border-color:#c2632b; }
  .morning-check.done { background:#e07b39; border-color:#e07b39; color:#fff; }
  .morning-overdue { font-size:10px; color:#b23b3b; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; }
  .morning-brief { display:flex; flex-direction:column; gap:2px; }
  .morning-brief-item { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid rgba(120,70,30,0.12); text-decoration:none; color:#3a2410; transition:opacity 0.12s; }
  .morning-brief-item:last-child { border-bottom:none; }
  .morning-brief-item:hover { opacity:0.65; }
  .morning-brief-title { font-size:13px; line-height:1.35; }
  .morning-quote { text-align:center; margin:1.5rem 0 1.75rem; padding:0 10px; }
  .morning-quote-text { font-family:var(--font-display); font-size:19px; line-height:1.4; }
  .morning-quote-author { font-size:12px; opacity:0.7; margin-top:8px; text-transform:uppercase; letter-spacing:0.06em; }
  .morning-done-btn { display:block; width:100%; padding:14px; border:none; border-radius:14px; background:#3a2410; color:#ffd194; font-size:15px; font-weight:700; cursor:pointer; transition:opacity 0.15s; }
  .morning-done-btn:hover { opacity:0.88; }
  .morning-loading, .morning-empty { font-size:13px; opacity:0.7; display:flex; align-items:center; gap:8px; }
  .morning-link { background:none; border:none; color:#b25a1e; font-weight:700; cursor:pointer; padding:0; text-decoration:underline; font-size:inherit; }
  /* staggered intro: sections reveal top-to-bottom (delays set per-open in JS) */
  .morning-inner { position:relative; z-index:1; }
  .morning-clock, .morning-greeting, .morning-date, .morning-card, .morning-quote, .morning-done-btn { animation:morningReveal 0.55s cubic-bezier(0.2,0.7,0.3,1) both; }
  @keyframes morningReveal { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
  .morning-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
  .morning-card-head .morning-card-label { margin-bottom:0; }
  .morning-plan-btn { font-size:11px; font-weight:700; padding:5px 12px; border-radius:20px; border:none; background:#3a2410; color:#ffd194; cursor:pointer; transition:opacity 0.15s; }
  .morning-plan-btn:hover { opacity:0.85; }
  .morning-sched-time { font-variant-numeric:tabular-nums; font-weight:700; font-size:12px; opacity:0.7; min-width:42px; }
  .morning-todo-row .morning-sched-time + span { font-size:14px; }
  /* overview morning summary */
  .morning-summary { border-radius:var(--radius-lg); padding:14px 18px; margin:0.5rem 0 1.25rem; color:#3a2410; background:linear-gradient(110deg,#ffe2b8 0%,#ffd0a8 55%,#ffc0b0 100%); box-shadow:0 4px 16px -10px rgba(255,154,139,0.6); }
  .morning-summary-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
  .morning-summary-title { font-size:14px; font-weight:800; letter-spacing:-0.2px; }
  .morning-summary-replay { font-size:11px; font-weight:700; background:rgba(255,255,255,0.5); border:none; border-radius:20px; padding:4px 12px; cursor:pointer; color:#3a2410; transition:background 0.15s; }
  .morning-summary-replay:hover { background:rgba(255,255,255,0.8); }
  .morning-sum-row { display:flex; align-items:center; gap:10px; font-size:13px; padding:3px 0; }
  .morning-sum-time { font-variant-numeric:tabular-nums; font-weight:700; min-width:42px; opacity:0.75; }
  .morning-sum-empty { font-size:13px; opacity:0.8; padding:2px 0; }
  .morning-sum-quote { margin-top:10px; padding-top:10px; border-top:1px solid rgba(120,70,30,0.18); font-family:var(--font-display); font-size:14px; line-height:1.4; }
  .morning-sum-quote span { display:block; font-family:var(--font-sans,inherit); font-size:11px; opacity:0.7; margin-top:4px; text-transform:uppercase; letter-spacing:0.05em; }
  /* day planner modal */
  .planner-group { margin-bottom:14px; }
  .planner-group-label { font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--text3); font-weight:700; margin-bottom:8px; }
  .planner-chips { display:flex; flex-wrap:wrap; gap:8px; }
  .planner-chip { font-size:13px; padding:7px 13px; border-radius:20px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; transition:all 0.12s; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .planner-chip:hover { border-color:var(--accent); color:var(--text); background:var(--bg4); }
  /* two-pane planner: items (left) + today's calendar (right), centered */
  #day-planner-modal { z-index:290; } /* below the event modal (300) so it opens on top */
  .planner-wrap { display:flex; gap:16px; width:100%; max-width:884px; align-items:stretch; justify-content:center; }
  .planner-pane { flex:1 1 0; max-width:430px; display:flex; flex-direction:column; max-height:88vh; }
  .planner-day-cal { overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg); }
  .planner-back { display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:600; color:var(--text2); background:none; border:none; cursor:pointer; padding:4px 8px 4px 0; border-radius:6px; transition:color 0.12s; }
  .planner-back:hover { color:var(--accent); }
  .planner-sched-item { margin-bottom:14px; }
  /* time grid */
  .pln-allday { display:flex; flex-wrap:wrap; gap:5px; padding:8px 10px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--bg); z-index:6; }
  .pln-grid { position:relative; margin:6px 0; }
  .pln-hour { position:absolute; left:0; right:0; height:0; }
  .pln-hour-label { position:absolute; left:6px; top:-7px; width:44px; font-size:10px; color:var(--text3); text-align:right; }
  .pln-hour-line { position:absolute; left:56px; right:8px; top:0; border-top:1px solid var(--border); }
  .pln-event { position:absolute; left:60px; right:10px; border-radius:6px; padding:3px 7px; font-size:11px; line-height:1.3; color:var(--text2); background:var(--bg3); overflow:hidden; cursor:pointer; }
  .pln-event b { color:var(--text); font-weight:600; }
  .pln-draft { position:absolute; left:60px; right:10px; border-radius:8px; background:color-mix(in srgb, var(--accent) 24%, var(--bg2)); border:1.5px solid var(--accent); box-shadow:0 3px 12px -4px var(--accent); z-index:5; touch-action:none; }
  .pln-body { padding:5px 9px; height:100%; box-sizing:border-box; cursor:grab; overflow:hidden; }
  .pln-body:active { cursor:grabbing; }
  .pln-time-label { font-weight:700; font-size:11px; color:var(--text); }
  .pln-draft-title { font-size:11px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pln-resize { position:absolute; left:0; right:0; height:11px; cursor:ns-resize; z-index:6; }
  .pln-resize-top { top:-3px; }
  .pln-resize-bottom { bottom:-3px; }
  .pln-resize::after { content:''; position:absolute; left:50%; width:26px; height:3px; margin-left:-13px; border-radius:3px; background:var(--accent); opacity:0; transition:opacity 0.12s; }
  .pln-resize-top::after { top:3px; } .pln-resize-bottom::after { bottom:3px; }
  .pln-draft:hover .pln-resize::after { opacity:0.8; }
  @media (max-width: 820px) {
    .planner-wrap { flex-direction:column; align-items:center; max-height:92vh; overflow-y:auto; flex-wrap:nowrap; }
    .planner-pane { flex:0 0 auto; max-width:480px; width:100%; max-height:none; }
    .planner-day-cal { max-height:46vh; }
    .wp-week { max-height:46vh; }
  }
  /* WEEK PLANNER */
  #week-planner-modal { z-index:290; } /* below the event modal/detail (300) */
  .wp-week-nav { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; font-size:13px; color:var(--text2); }
  .wp-week-nav button { width:30px; height:30px; border-radius:8px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; transition:all 0.12s; }
  .wp-week-nav button:hover { border-color:var(--accent); color:var(--text); }
  .wp-week-nav span { font-weight:600; color:var(--text); }
  .wp-day-row { display:flex; gap:5px; flex-wrap:wrap; }
  .wp-day-chip { display:flex; flex-direction:column; align-items:center; gap:1px; min-width:42px; padding:6px 4px; border-radius:9px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; transition:all 0.12s; }
  .wp-day-chip:hover { border-color:var(--accent); }
  .wp-day-chip.active { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
  .wp-day-chip-dow { font-size:10px; text-transform:uppercase; letter-spacing:0.04em; }
  .wp-day-chip-num { font-size:15px; font-weight:700; }
  .wp-week { overflow-y:auto; display:flex; flex-direction:column; gap:8px; }
  .wp-day { border:1px solid var(--border); border-radius:10px; padding:9px 11px; background:var(--bg); transition:border-color 0.12s, background 0.12s; }
  .wp-day.today { border-color:var(--border2); }
  .wp-day.sel { border-color:var(--accent); background:var(--accent-dim); cursor:pointer; }
  .wp-day-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:6px; }
  .wp-day-name { font-size:12px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:0.04em; }
  .wp-day.today .wp-day-name { color:var(--accent); }
  .wp-day-date { font-size:11px; color:var(--text3); }
  .wp-day-evts { display:flex; flex-direction:column; gap:4px; }
  .wp-day-empty { font-size:12px; color:var(--text3); }
  .wp-draft-pill { background:var(--accent) !important; color:var(--accent-ink) !important; border:none !important; font-weight:600; }
  /* overview task subheads */
  .ov-task-subhead { font-size:10px; text-transform:uppercase; letter-spacing:0.06em; color:var(--text3); font-weight:700; margin:12px 0 2px; }
  .ov-task-subhead:first-child { margin-top:4px; }

  /* CUSTOM TIME PICKER */
  .tp-field { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:8px 12px; background:var(--bg3); border:1px solid var(--border2); border-radius:var(--radius); color:var(--text); font-size:14px; font-family:inherit; cursor:pointer; text-align:left; transition:border-color 0.12s, background 0.12s; }
  .tp-field:hover { border-color:var(--accent); background:var(--bg4); }
  .tp-field.tp-empty span { color:var(--text3); }
  .tp-field svg { width:15px; height:15px; color:var(--text3); flex-shrink:0; }
  .tp-popover { position:fixed; z-index:400; width:248px; background:var(--bg2); border:1px solid var(--border2); border-radius:16px; box-shadow:0 16px 44px -10px rgba(0,0,0,0.6); padding:14px; animation:scaleIn 0.14s ease; }
  .tp-preview { text-align:center; font-family:'Bebas Neue',sans-serif; font-size:34px; letter-spacing:1.5px; color:var(--accent); line-height:1; margin-bottom:12px; }
  .tp-cols { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; }
  .tp-col { height:148px; overflow-y:auto; border:1px solid var(--border); border-radius:10px; padding:4px; background:var(--bg); scrollbar-width:thin; }
  .tp-col::-webkit-scrollbar { width:6px; }
  .tp-col::-webkit-scrollbar-thumb { background:var(--border2); border-radius:3px; }
  .tp-opt { padding:8px 0; text-align:center; font-size:14px; color:var(--text2); border-radius:8px; cursor:pointer; font-variant-numeric:tabular-nums; transition:background 0.1s, color 0.1s; }
  .tp-opt:hover { background:var(--bg3); color:var(--text); }
  .tp-opt.sel { background:var(--accent); color:var(--accent-ink); font-weight:700; }
  .tp-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; }
  .tp-actions button { font-size:12px; padding:6px 12px; border-radius:8px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; transition:all 0.12s; }
  .tp-actions button:hover { border-color:var(--border2); background:var(--bg4); color:var(--text); }
  .tp-actions .tp-clear { border:none; background:none; color:var(--text3); padding:6px 4px; }
  .tp-actions .tp-done { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:600; }
  .tp-actions .tp-done:hover { background:var(--accent); color:var(--accent-ink); opacity:0.9; }
  .tp-text-input { width:100%; padding:6px 10px; background:var(--bg3); border:1px solid var(--border2); border-radius:8px; color:var(--text); font-size:14px; font-family:inherit; outline:none; margin-bottom:10px; box-sizing:border-box; }
  .tp-text-input:focus { border-color:var(--accent); }
  .tp-text-input::placeholder { color:var(--text3); }
  /* Custom recurrence day chips */
  .recur-day-chip { width:32px; height:32px; border-radius:50%; border:1px solid var(--border2); background:var(--bg); color:var(--text2); font-size:12px; font-weight:600; cursor:pointer; transition:all 0.12s; padding:0; display:inline-flex; align-items:center; justify-content:center; }
  .recur-day-chip:hover { border-color:var(--accent); color:var(--accent); }
  .recur-day-chip.active { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
  /* News interest category picker - a fixed list instead of free text, so a
     typed term can never silently fail to match any feed (e.g. "artificial
     intelligence" doesn't literally contain "ai" as a substring, so it never
     matched Tech, which is the category that actually covers AI news). */
  .interests-picker { display:flex; flex-wrap:wrap; gap:8px; }
  .interest-chip { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:20px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); font-size:12px; cursor:pointer; transition:all 0.15s; user-select:none; }
  .interest-chip:hover { border-color:var(--accent); }
  .interest-chip.active { background:var(--accent-dim); border-color:var(--accent); color:var(--accent); }
  .interest-chip input { position:absolute; opacity:0; width:0; height:0; }
  #custom-recur-panel input[type="number"], #custom-recur-panel input[type="date"] { padding:5px 8px; background:var(--bg); border:1px solid var(--border2); border-radius:var(--radius); color:var(--text); font-size:13px; font-family:inherit; }
  #custom-recur-panel select { padding:5px 8px; background:var(--bg); border:1px solid var(--border2); border-radius:var(--radius); color:var(--text); font-size:13px; font-family:inherit; }
  #custom-recur-panel input[type="radio"] { accent-color:var(--accent); cursor:pointer; }

  /* compact morning brief (headlines only) */
  /* habit monthly calendar */
  .hcal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
  .hcal-nav button { width:30px; height:30px; border-radius:8px; border:1px solid var(--border2); background:var(--bg3); color:var(--text2); cursor:pointer; font-size:14px; transition:all 0.12s; }
  .hcal-nav button:hover { border-color:var(--accent); color:var(--text); }
  .hcal-nav span { font-weight:600; color:var(--text); font-size:14px; }
  .hcal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
  .hcal-dow { text-align:center; font-size:10px; color:var(--text3); text-transform:uppercase; padding-bottom:2px; }
  .hcal-cell { aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:50%; font-size:12px; color:var(--text2); background:var(--bg3); border:1.5px solid transparent; }
  .hcal-cell.done { background:var(--accent); color:var(--accent-ink); font-weight:700; }
  .hcal-cell.today { border-color:var(--accent); }
  .hcal-summary { text-align:center; font-size:12px; color:var(--text3); margin-top:14px; }

  /* GAMES */
  .games-hub { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:14px; }
  .game-card { display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; padding:20px; border-radius:var(--radius-lg); border:1px solid var(--border); background:var(--bg2); cursor:pointer; transition:all 0.15s; }
  .game-card:hover { border-color:var(--accent); transform:translateY(-2px); background:var(--bg3); }
  .game-card-emoji { font-size:34px; line-height:1; margin-bottom:6px; }
  .game-card-name { font-size:16px; font-weight:600; color:var(--text); }
  .game-card-desc { font-size:12px; color:var(--text2); line-height:1.4; }
  .game-card-best { font-size:11px; color:var(--accent); margin-top:8px; font-weight:600; }
  .game-stage-head { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
  .game-back { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text2); padding:7px 12px; border-radius:var(--radius); border:1px solid var(--border); cursor:pointer; background:none; transition:all 0.15s; }
  .game-back:hover { background:var(--bg3); color:var(--text); border-color:var(--border2); }
  .game-stage-title { font-family:var(--font-display); font-size:22px; color:var(--text); }
  .game-btn { font-size:13px; font-weight:600; padding:8px 16px; border-radius:8px; border:none; background:var(--accent); color:var(--accent-ink); cursor:pointer; transition:opacity 0.12s; }
  .game-btn:hover { opacity:0.88; }
  .game-hint { font-size:12px; color:var(--text3); text-align:center; margin-top:12px; }
  /* flappy */
  .flappy-wrap { display:flex; flex-direction:column; align-items:center; }
  #flappy-canvas { border:1px solid var(--border2); border-radius:var(--radius-lg); background:var(--bg2); max-width:100%; touch-action:manipulation; cursor:pointer; }
  /* 2048 */
  .g2048-wrap { max-width:380px; margin:0 auto; position:relative; }
  .g2048-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
  .g2048-score { font-size:12px; color:var(--text2); background:var(--bg3); border:1px solid var(--border); border-radius:8px; padding:6px 12px; }
  .g2048-score b { color:var(--text); font-size:15px; margin-left:4px; }
  .g2048-head .game-btn { margin-left:auto; }
  .g2048-board { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; padding:8px; background:var(--bg4); border-radius:12px; aspect-ratio:1; touch-action:none; }
  .g2048-tile { display:flex; align-items:center; justify-content:center; border-radius:7px; font-weight:800; font-size:26px; color:#fff; background:rgba(255,255,255,0.04); font-variant-numeric:tabular-nums; transition:background 0.1s; }
  .g2048-tile.v2 { background:#5c5750; } .g2048-tile.v4 { background:#736857; }
  .g2048-tile.v8 { background:#e8a05c; color:#241606; } .g2048-tile.v16 { background:#e8854a; color:#241606; }
  .g2048-tile.v32 { background:#e86a44; color:#fff; } .g2048-tile.v64 { background:#e0503a; color:#fff; }
  .g2048-tile.v128 { background:#efc95c; color:#241606; font-size:22px; } .g2048-tile.v256 { background:#efc34c; color:#241606; font-size:22px; }
  .g2048-tile.v512 { background:#efbd3c; color:#241606; font-size:22px; } .g2048-tile.v1024 { background:#efb72c; color:#241606; font-size:18px; }
  .g2048-tile.v2048 { background:#efb01c; color:#241606; font-size:18px; box-shadow:0 0 16px rgba(239,176,28,0.6); } .g2048-tile.vbig { background:#7d5fd0; color:#fff; font-size:18px; }
  .g2048-over { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; background:rgba(0,0,0,0.55); border-radius:12px; backdrop-filter:blur(2px); }
  /* trivia + flags */
  .quiz-wrap { max-width:440px; margin:0 auto; }
  .quiz-top { display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--text2); margin-bottom:18px; }
  .quiz-top b { color:var(--accent); }
  .quiz-q { font-family:var(--font-display); font-size:24px; line-height:1.3; color:var(--text); margin-bottom:18px; }
  .quiz-opts { display:flex; flex-direction:column; gap:10px; }
  .quiz-opt { text-align:left; padding:13px 16px; border-radius:var(--radius); border:1px solid var(--border2); background:var(--bg2); color:var(--text); font-size:14px; cursor:pointer; transition:all 0.12s; }
  .quiz-opt:hover:not(:disabled) { border-color:var(--accent); background:var(--bg3); }
  .quiz-opt:disabled { cursor:default; }
  .quiz-opt.correct { background:var(--teal); border-color:var(--teal); color:#0c2018; font-weight:600; }
  .quiz-opt.wrong { background:var(--red); border-color:var(--red); color:#fff; }
  .flag-img { display:block; width:100%; max-width:300px; margin:0 auto 20px; border-radius:10px; border:1px solid var(--border2); box-shadow:0 6px 20px -8px rgba(0,0,0,0.5); }

  /* TRASH PAGE */
  /* BODY HEALTH TAB */
  .body-layout { display:grid; grid-template-columns:200px 1fr; gap:1.75rem; align-items:start; }
  @media(max-width:680px) { .body-layout { grid-template-columns:1fr; } }
  .body-map-col { position:sticky; top:1.5rem; }
  .body-view-toggle { display:flex; gap:6px; margin-bottom:14px; }
  .body-view-btn { flex:1; padding:7px 12px; border-radius:var(--radius); border:1px solid var(--border2); background:var(--bg3); color:var(--text2); font-size:12px; cursor:pointer; font-weight:500; transition:all 0.15s; }
  .body-view-btn.active { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
  .body-svg-wrap { width:100%; max-width:200px; margin:0 auto; }

  /* SVG clickable regions */
  .body-region { fill:rgba(255,255,255,0.04); stroke:rgba(255,255,255,0.13); stroke-width:0.8; cursor:pointer; transition:fill 0.12s; }
  .body-region:hover { fill:rgba(255,255,255,0.11); stroke:rgba(255,255,255,0.25); }
  .body-region.selected { fill:rgba(200,240,122,0.1); stroke:var(--accent); stroke-width:1.5; }
  .body-region.has-issue { fill:rgba(255,255,255,0.06); }
  .body-region.has-issue:hover { fill:rgba(255,255,255,0.12); }
  .body-region.has-issue.selected { fill:rgba(200,240,122,0.1); }
  [data-theme="light"] .body-region { fill:rgba(0,0,0,0.05); stroke:rgba(0,0,0,0.18); }
  [data-theme="light"] .body-region:hover { fill:rgba(0,0,0,0.1); stroke:rgba(0,0,0,0.3); }
  [data-theme="light"] .body-region.selected { fill:rgba(60,120,0,0.08); stroke:var(--accent); }

  /* Issue panel */
  .body-panel-col { min-height:300px; }
  .body-issue-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:14px; margin-bottom:10px; }
  .body-issue-resolved { opacity:0.55; }
  .body-issue-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:8px; }
  .body-sev-dot { width:8px; height:8px; border-radius:50%; display:inline-block; flex-shrink:0; }
  .body-issue-desc { font-size:12px; color:var(--text3); line-height:1.55; margin-bottom:10px; white-space:pre-wrap; }
  .body-tx-wrap { border-top:1px solid var(--border); padding-top:10px; margin-top:10px; }
  .body-tx-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--text3); }
  .body-tx-row { display:flex; align-items:flex-start; gap:8px; padding:6px 0; border-bottom:1px solid var(--border); }
  .body-tx-row:last-child { border-bottom:none; padding-bottom:0; }

  /* Severity selector buttons (modal) */
  .body-sev-btn { padding:6px 14px; border-radius:var(--radius); border:1px solid var(--border2); background:var(--bg3); color:var(--text2); font-size:12px; cursor:pointer; transition:all 0.15s; font-weight:500; }
  .body-sev-btn.active[data-sev="mild"]     { background:rgba(240,192,96,0.15); border-color:var(--amber); color:var(--amber); }
  .body-sev-btn.active[data-sev="moderate"] { background:rgba(240,160,64,0.15); border-color:#f0a040; color:#f0a040; }
  .body-sev-btn.active[data-sev="severe"]   { background:rgba(240,112,112,0.15); border-color:var(--red); color:var(--red); }

  /* Commitment stars (modal) */
  .body-commit-star { background:none; border:none; cursor:pointer; font-size:22px; color:var(--border2); padding:0 3px; transition:color 0.1s; line-height:1; }
  .body-commit-star.active { color:var(--amber); }
  .body-commit-star:hover ~ .body-commit-star { color:var(--border2); }

  /* TAB MANAGEMENT (settings) */
  .tab-manage-row { display:flex; align-items:center; gap:10px; padding:8px 10px; background:var(--bg2); border-radius:8px; border:1px solid var(--border); }
  .tab-manage-row svg { width:14px; height:14px; flex-shrink:0; color:var(--text3); }
  .tab-manage-handle { cursor:grab; color:var(--text3); font-size:16px; line-height:1; padding:0 2px; user-select:none; }
  .tab-manage-handle:active { cursor:grabbing; }
  .tab-manage-label { flex:1; font-size:13px; color:var(--text); }
  .tab-manage-remove { background:none; border:none; cursor:pointer; color:var(--text3); padding:3px 5px; display:flex; align-items:center; border-radius:4px; transition:color 0.15s; }
  .tab-manage-remove:hover { color:var(--red); }
  .tab-manage-row-hidden { opacity:0.5; }
  .tab-manage-row-hidden svg { color:var(--text3); }

  .trash-section { margin-bottom:2rem; }
  .trash-section-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text3); margin-bottom:8px; }
  .trash-row { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius); margin-bottom:8px; background:var(--bg2); transition:opacity 0.2s; }
  .trash-row-meta { font-size:12px; color:var(--text3); margin-top:3px; }

  /* SESSION FULL PAGE */
  .session-pg-back { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text2); padding:7px 12px; border-radius:var(--radius); border:1px solid var(--border); margin-bottom:1.75rem; cursor:pointer; background:none; transition:all 0.15s; }
  .session-pg-back:hover { background:var(--bg3); color:var(--text); border-color:var(--border2); }
  .session-pg-title { font-family:var(--font-display); font-size:34px; letter-spacing:-0.5px; color:var(--text); width:100%; background:none; border:none; border-bottom:1.5px solid transparent; outline:none; resize:none; padding:0 0 3px 0; line-height:1.25; overflow:hidden; min-height:1.4em; transition:border-color 0.15s; }
  .session-pg-title:hover { border-bottom-color:var(--border2); }
  .session-pg-title:focus { border-bottom-color:var(--accent); }
  .session-pg-title::placeholder { color:var(--text3); }
  .session-pg-body { width:100%; min-height:calc(100vh - 360px); background:none; border:none; color:var(--text); font-size:15px; line-height:1.85; outline:none; resize:none; padding:0; font-family:var(--font-body); }
  .session-pg-body::placeholder { color:var(--text3); }
  .session-pg-status { font-size:12px; color:var(--text3); transition:color 0.2s; }
  .session-pg-status.saving { color:var(--amber); }
  .session-pg-status.saved { color:var(--teal); }

  /* BREATHWORK */
  .breathwork-wrap { max-width:480px; margin:0 auto; padding:0 16px 40px; display:flex; flex-direction:column; align-items:center; gap:24px; }
  .breathwork-presets { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
  .breath-preset-btn { padding:8px 16px; border-radius:20px; border:1.5px solid var(--border2); background:var(--bg2); color:var(--text2); font-size:13px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:2px; transition:border-color 0.15s, color 0.15s, background 0.15s; }
  .breath-preset-btn small { font-size:10px; color:var(--text3); font-variant-numeric:tabular-nums; }
  .breath-preset-btn:hover { border-color:var(--accent); color:var(--accent); }
  .breath-preset-btn.active { background:var(--accent); border-color:var(--accent); color:var(--bg); }
  .breath-preset-btn.active small { color:var(--bg); opacity:0.75; }
  .breathwork-stage { position:relative; width:260px; height:260px; flex-shrink:0; }
  .breath-ring-svg { position:absolute; top:0; left:0; width:100%; height:100%; overflow:visible; }
  .breath-ring-bg { fill:none; stroke:var(--border2); stroke-width:2; }
  .breath-ring-prog { fill:none; stroke:var(--teal); stroke-width:3.5; stroke-linecap:round; stroke-dasharray:741.42; stroke-dashoffset:741.42; transform:rotate(-90deg); transform-origin:130px 130px; transition:stroke 0.4s ease; }
  .breath-circle-outer { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:218px; height:218px; }
  .breath-circle-inner { width:100%; height:100%; border-radius:50%; --bc:var(--teal); background:radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--bc) 75%, #fff), var(--bc)); box-shadow:0 0 64px -4px var(--bc); transform:scale(0.38); will-change:transform; transition:background 0.4s ease, box-shadow 0.4s ease; }
  .breath-phase-info { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; pointer-events:none; user-select:none; width:150px; }
  .breath-phase-label { font-size:14px; font-weight:700; color:var(--text); letter-spacing:0.12em; text-transform:uppercase; }
  .breath-phase-count { font-size:46px; font-weight:800; color:var(--text); line-height:1.05; font-variant-numeric:tabular-nums; margin-top:1px; }
  .breathwork-controls { display:flex; align-items:center; gap:20px; }
  .breath-session-label { font-size:13px; color:var(--text3); font-variant-numeric:tabular-nums; }
  .breath-custom-editor { width:100%; max-width:320px; padding:16px; background:var(--bg2); border-radius:var(--radius); border:1px solid var(--border); }
  .breath-custom-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--border); }
  .breath-custom-row:last-child { border-bottom:none; }
  .breath-custom-row select { flex:1; }
  .breath-custom-row input[type=number] { width:58px; }
