[hidden]{ display:none !important; }
    :root{
      --bg:#0b0f14;
      --panel:#0f1620;
      --panel2:#0c121a;
      --text:#e7edf5;
      --muted:#9fb0c3;
      --border:rgba(255,255,255,.10);
      --hover:rgba(255,255,255,.06);
      --shadow: 0 10px 28px rgba(0,0,0,.35);
      --radius:14px;

      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
      --editorFont: var(--mono);

      /* limited, theme-friendly colors */
      --ink0:#e7edf5;
      --ink1:#9fb0c3;
      --ink2:#7dd3fc;
      --ink3:#f0abfc;

      --hl0: rgba(250, 204, 21, .55);
      --hl1: rgba(56, 189, 248, .45);
      --hl2: rgba(52, 211, 153, .45);
      --hl3: rgba(244, 63, 94, .40);

      /* ruler ticks */
      --rulerMinor: rgba(255,255,255,.10);
      --rulerMajor: rgba(255,255,255,.18);

      /* syntax helpers */
      --synCodeBg: rgba(255,255,255,.07);
      --synCodeBorder: rgba(255,255,255,.12);


      /* statuses */
      --s-red-bg:   rgba(248,113,113,.18);
      --s-yellow-bg:rgba(250,204,21,.16);
      --s-blue-bg:  rgba(96,165,250,.16);
      --s-green-bg: rgba(34,197,94,.16);

      --s-red-b:   rgba(248,113,113,.36);
      --s-yellow-b:rgba(250,204,21,.32);
      --s-blue-b:  rgba(96,165,250,.32);
      --s-green-b: rgba(34,197,94,.32);
    }

    [data-theme="light"]{
      --bg:#f6f7fb;
      --panel:#ffffff;
      --panel2:#fbfcff;
      --text:#0e1621;
      --muted:#5c6b7a;
      --border:rgba(15,22,33,.12);
      --hover:rgba(15,22,33,.05);
      --shadow: 0 10px 28px rgba(15,22,33,.12);

      --ink0:#0e1621;
      --ink1:#5c6b7a;
      --ink2:#1d4ed8;
      --ink3:#6d28d9;

      --hl0: rgba(234, 179, 8, .34);
      --hl1: rgba(59, 130, 246, .20);
      --hl2: rgba(34, 197, 94, .18);
      --hl3: rgba(244, 63, 94, .20);

      /* ruler ticks */
      --rulerMinor: rgba(15,22,33,.12);
      --rulerMajor: rgba(15,22,33,.20);

      /* syntax helpers */
      --synCodeBg: rgba(15,22,33,.045);
      --synCodeBorder: rgba(15,22,33,.10);


      --s-red-bg:   rgba(239,68,68,.12);
      --s-yellow-bg:rgba(234,179,8,.12);
      --s-blue-bg:  rgba(59,130,246,.12);
      --s-green-bg: rgba(34,197,94,.12);

      --s-red-b:   rgba(239,68,68,.26);
      --s-yellow-b:rgba(234,179,8,.22);
      --s-blue-b:  rgba(59,130,246,.22);
      --s-green-b: rgba(34,197,94,.22);
    }

    *{ box-sizing:border-box; }
    html,body{ height:100%; }
    body{
      margin:0;
      background:var(--bg);
      color:var(--text);
      font-family:var(--mono);
      -webkit-font-smoothing:antialiased;
      -moz-osx-font-smoothing:grayscale;
      letter-spacing:.1px;
    }
    button, input, select, textarea{ font-family:var(--mono); }

    /* Header */
    .bar{
      position:sticky; top:0; z-index:50;
      height:54px;
      display:grid;
      grid-template-columns: 1fr auto 1fr;
      align-items:center;
      gap:10px;
      padding:10px 14px;
      border-bottom:1px solid var(--border);
      background:linear-gradient(to bottom, rgba(255,255,255,.03), transparent);
    }
    .leftBar{ display:flex; align-items:center; gap:10px; min-width:0; }
    .rightBar{ display:flex; align-items:center; justify-content:flex-end; gap:8px; min-width:0; }

    .brand{ display:flex; align-items:center; gap:10px; font-weight:950; user-select:none; }
    .logo{
      width:28px;height:28px;border-radius:10px;display:grid;place-items:center;
      border:1px solid var(--border); background:var(--panel2);
    }
    .logo svg{ width:16px;height:16px; opacity:.95; }
    .activeTitle{
      color:var(--muted);
      font-weight:650;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
      max-width:40vw;
    }

    .activeTitle{ cursor:text; }
    .activeTitleInput{
      width:34vw;
      max-width:440px;
      border:1px solid var(--border);
      background:var(--panel);
      color:var(--text);
      border-radius:10px;
      padding:6px 10px;
      outline:none;
      font-weight:950;
      font-family:var(--mono);
    }

    .btn{
      border:1px solid var(--border);
      background:transparent;
      color:var(--text);
      border-radius:12px;
      padding:8px 10px;
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      transition:.15s ease;
      user-select:none;
    }
    .btn:hover{ background:var(--hover); }
    .btn:active{ transform:translateY(1px); }
    .btn svg{ width:18px;height:18px; opacity:.9; }
    .btn.small{ padding:7px 9px; border-radius:11px; }
    .btn.danger{ border-color:rgba(239,68,68,.35); color:rgba(239,68,68,.95); }
    .btn.danger:hover{ background:rgba(239,68,68,.10); }

    .btn.quiet{ border-color:transparent; }
    .btn.quiet:hover{ border-color:var(--border); }
    .iconBtn{ padding:7px 8px; }

    
    /* Focus button icon swap */
    #focusBtn .eyeOff{ display:none; }
    #focusBtn.toggleOn .eyeOn{ display:none; }
    #focusBtn.toggleOn .eyeOff{ display:block; }
.toggleOn{
      border-color:rgba(110,168,254,.30) !important;
      background:rgba(110,168,254,.10) !important;
    }

    /* Toast pill (hidden unless shown) */
    .toastPill{
      display:inline-flex;
      align-items:center;
      gap:8px;
      font-size:11px;
      font-weight:950;
      padding:6px 10px;
      border-radius:999px;
      border:1px solid var(--border);
      user-select:none;
      line-height:1;
      min-width: 120px;
      justify-content:center;
      white-space:nowrap;
    }
    .toastPill[hidden]{ display:none; }
    .dot{ width:8px;height:8px;border-radius:999px; border:1px solid var(--border); }
    .red   { background:var(--s-red-bg);    border-color:var(--s-red-b); }
    .yellow{ background:var(--s-yellow-bg); border-color:var(--s-yellow-b); }
    .blue  { background:var(--s-blue-bg);   border-color:var(--s-blue-b); }
    .green { background:var(--s-green-bg);  border-color:var(--s-green-b); }
    .red   .dot{ background:rgba(248,113,113,.95); }
    .yellow .dot{ background:rgba(250,204,21,.95); }
    .blue  .dot{ background:rgba(96,165,250,.95); }
    .green .dot{ background:rgba(34,197,94,.95); }

    /* Layout */
    .shell{
      height:calc(100% - 54px);
      display:flex;
      padding:14px;
      gap:12px;
      min-height:0;
    }

    .editorCol{
      flex:1;
      min-width:0;
      display:flex;
      flex-direction:column;
      gap:10px;
      min-height:0;
    }

    /* Right sidebar (single content area; scrollable) */
    .sidePanel{
      width:340px;
      flex:0 0 auto;
      display:none;
      min-height:0;
    }
    .sidePanel.open{ display:flex; flex-direction:column; gap:10px; }
    .sidePanel .card{
      flex:1;
      min-height:0;
      display:flex;
      flex-direction:column;
      overflow:hidden;
    }
    .compactModal{
      width:min(360px, 92vw);
    }
    .compactModal .modalBody{ padding:12px; overflow:auto; flex:1; }
    .modalFoot{
      padding:12px;
      border-top:1px solid var(--border);
      display:flex;
      gap:10px;
      align-items:center;
      flex-wrap:wrap;
    }

    /* Settings modal tabs */
    .settingsTabs{
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      margin-bottom:10px;
    }
    .settingsTab{ border-radius:999px; }
    .settingsTab.on{
      background:rgba(255,255,255,.10);
      border-color:var(--border);
    }
    .settingsPane[hidden]{ display:none !important; }

    /* Inline verification badge inside email row */
    .inputWrap{ position:relative; flex:1; min-width:240px; max-width:420px; }
    .verifyRow.inline{
      margin-top:0;
      position:absolute;
      right:10px;
      top:50%;
      transform:translateY(-50%);
      pointer-events:none;
    }
    .emailRow{
      display:flex;
      gap:8px;
      align-items:center;
      flex-wrap:wrap;
      margin-top:6px;
    }

    .sidePanel .cardPad{
      flex:1;
      min-height:0;
      overflow:auto; /* <-- FIX: sidebar scroll */
    }

    .card{
      border:1px solid var(--border);
      border-radius:var(--radius);
      background:var(--panel);
      box-shadow:var(--shadow);
      overflow:hidden;
      min-height:0;
    }
    .cardPad{ padding:12px; }

    /* Formatting toolbar */
    .toolbarShell{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      padding:10px 12px;
      border:1px solid var(--border);
      border-radius:var(--radius);
      background:var(--panel);
      box-shadow:var(--shadow);
    }
    .toolbarShell[hidden]{ display:none; }
    .toolbar{ display:flex; align-items:center; gap:8px; flex-wrap:nowrap; min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
    .toolbar::-webkit-scrollbar{ height:0; }
    .toolbarActions{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
    .toolGroup.advancedOpt{ display:none !important; }
    .toolbarShell.showAdvanced .toolGroup.advancedOpt{ display:flex !important; }
    .toolbarShell{ min-width:0; }
    .toolGroup{ flex:0 0 auto; }
    .toolBtn.iconOnly{ padding:7px 8px; }
    .toolGroup{
      display:flex; align-items:center; gap:6px;
      padding-right:10px; margin-right:4px;
      border-right:1px solid var(--border);
    }
    .toolGroup:last-child{ border-right:none; padding-right:0; margin-right:0; }
    .toolBtn{
      border:1px solid var(--border);
      background:transparent;
      color:var(--text);
      border-radius:12px;
      padding:7px 9px;
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      transition:.15s ease;
      user-select:none;
    }
    .toolBtn:hover{ background:var(--hover); }
    .toolBtn svg{ width:18px;height:18px; opacity:.9; }
    .miniLabel{ font-size:11px; color:var(--muted); margin-right:6px; user-select:none; }

    select{
      border:1px solid var(--border);
      background:transparent;
      color:var(--text);
      border-radius:12px;
      padding:6px 10px;
      height:34px;
      outline:none;
      font-size:13px;
    }
    .swatch{
      width:22px;height:22px;border-radius:9px;border:1px solid var(--border);cursor:pointer;
    }

    /* Editor */
    .editorPanel{
      flex:1;
      display:flex;
      flex-direction:column;
      min-height:0;
    }
    .editorWrap{
      flex:1;
      min-height:0;
      padding:14px;
      display:flex;
      overflow:auto; /* scroll */
    }
    .editor{
      flex:1;
      min-height:100%;
      padding:18px 18px;
      border:1px solid var(--border);
      border-radius:var(--radius);
      background:var(--panel2);
      outline:none;
      line-height:1.6;
      font-size:15px;
      white-space:pre-wrap;
      word-break:break-word;
      overflow:auto;
      font-family: var(--editorFont);
    }
    .editor:empty::before{ content:"Start Typing ..."; color:rgba(159,176,195,.55); }

    /* Bottom bar */
    .status{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      padding:10px 14px 12px;
      font-size:12px;
      border-top:1px solid var(--border);
      user-select:none;
      flex:0 0 auto;
      color:var(--muted);
    }
    .statusRight{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:950;
  opacity:.95;
  min-width:0;
}
#bottomStatus{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:48vw;
}
.typingDots{ display:inline-flex; align-items:center; gap:4px; color:var(--muted); }
.typingDots span{ width:4px;height:4px;border-radius:50%; background:currentColor; opacity:.25; animation: dotPulse 1s infinite; }
.typingDots span:nth-child(2){ animation-delay:.15s; }
.typingDots span:nth-child(3){ animation-delay:.30s; }
@keyframes dotPulse{ 0%,80%,100%{opacity:.25; transform:translateY(0);} 40%{opacity:.9; transform:translateY(-2px);} }

.modBox{ display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; }
.modPill{
  height:22px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(110,168,254,.12);
  color:var(--text);
  font-weight:950;
  font-size:11px;
  letter-spacing:.02em;
}
.modPill.caps{
  background:rgba(250,204,21,.14);
  border-color:rgba(250,204,21,.25);
}
.statusLeft{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}
.keyBox{
  flex:0 0 auto;
  min-width:40px;
  height:22px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:950;
  font-size:12px;
  letter-spacing:.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.keyBox.special{
  background:rgba(250,204,21,.16);
  border-color:rgba(250,204,21,.30);
}
    .statusHidden .status{ display:none; } /* hide bottom status when Insights open */

    /* Sidebar blocks */
    .section{
      border:1px solid var(--border);
      border-radius:14px;
      padding:12px;
      background:var(--panel2);
      margin-bottom:10px;
    }


/* Collapsible sidebar widgets */
.collSec{ padding:0; overflow:hidden; }
.secHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  cursor:pointer;
  user-select:none;
}
.secTitle{ font-weight:950; font-size:12px; }
.secToggle{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  border-radius:10px;
  width:30px; height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.secToggle:hover{ background:var(--hover); }
.secBody{ padding:0 12px 12px; }
.collSec.collapsed .secBody{ display:none; }
.collSec.collapsed .secToggle.collapseToggle svg{ transform:rotate(-90deg); }
.secToggle svg{ width:16px;height:16px; transition:.12s ease; }

/* Calendar reminders */
.calNav{ display:flex; gap:6px; align-items:center; }
.calMonth{ font-size:12px; color:var(--muted); margin-right:4px; user-select:none; display:block; line-height:1.1; }
.calMonthLine{ font-size:12px; font-weight:850; color:var(--muted); }
.calMonthTop{ font-size:12px; }
.calMonthYear{ font-size:11px; opacity:.85; margin-top:2px; }
.calTitleBtn{
  border:none;
  background:transparent;
  color:var(--text);
  font-weight:950;
  cursor:pointer;
  padding:4px 8px;
  border-radius:10px;
}
.calTitleBtn:hover{ background:var(--hover); }

.calDay{ position:relative; cursor:pointer; }
.calDay.sel{ border-color:rgba(110,168,254,.45); background:rgba(110,168,254,.08); font-weight:950; }
.calDay.hasRem::after{
  content:"";
  position:absolute;
  width:5px;height:5px;
  border-radius:50%;
  background:rgba(34,197,94,.9);
  bottom:4px; left:50%;
  transform:translateX(-50%);
  opacity:.9;
}

.remRow{ display:flex; gap:8px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.remForm{ display:grid; gap:8px; margin-top:10px; }
.remForm input, .remForm textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  outline:none;
  font-size:13px;
}
.remForm textarea{ min-height:74px; resize:vertical; }

.remList{ margin-top:10px; display:grid; gap:8px; }
.remItem{
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  border-radius:14px;
  padding:10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.remItemTitle{ font-weight:950; }
.remItemMeta{ color:var(--muted); font-size:11px; margin-top:4px; }
.remDel,.remEdit{
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  border-radius:11px;
  padding:6px 7px;
  cursor:pointer;
  flex:0 0 auto;
}
.remDel:hover,.remEdit:hover{ border-color:var(--border); background:var(--hover); }


    /* Calendar header layout (month/year under title) */
    .calHead{ align-items:flex-start; }
    .calHeadLeft{ display:flex; flex-direction:column; gap:4px; min-width:0; }

    
    /* Toggle switch (About settings) */
    .switch{ position:relative; display:inline-block; width:44px; height:24px; flex:0 0 auto; }
    .switch input{ opacity:0; width:0; height:0; }
    .switch .slider{
      position:absolute; inset:0;
      cursor:pointer;
      background:rgba(255,255,255,.10);
      border:1px solid var(--border);
      border-radius:999px;
      transition:background .15s ease, border-color .15s ease;
    }
    .switch .slider:before{
      content:"";
      position:absolute;
      width:18px; height:18px;
      left:3px; top:2px;
      border-radius:999px;
      background:var(--text);
      opacity:.85;
      transition:transform .15s ease;
    }
    .switch input:checked + .slider{
      background:rgba(34,197,94,.20);
      border-color:rgba(34,197,94,.45);
    }
    .switch input:checked + .slider:before{ transform:translateX(20px); }


    /* Reminders actions: show on hover/focus */
    .remActions{ display:flex; gap:6px; opacity:0; pointer-events:none; transition:opacity .12s ease; }
    .remItem:hover .remActions,
    .remItem:focus-within .remActions{ opacity:1; pointer-events:auto; }
    @media (hover: none){ .remActions{ opacity:1; pointer-events:auto; } }

    
    /* Switch toggle (Settings) */
    .switch{ position:relative; display:inline-block; width:44px; height:26px; }
    .switch input{ opacity:0; width:0; height:0; }
    .switch .slider{
      position:absolute; cursor:pointer; inset:0;
      background: var(--panel2);
      border:1px solid var(--border);
      transition: .2s;
      border-radius: 999px;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,.02);
    }
    .switch .slider:before{
      position:absolute; content:"";
      height:20px; width:20px;
      left:3px; top:2px;
      background: var(--text);
      border-radius: 999px;
      transition: .2s;
      box-shadow: 0 2px 8px rgba(0,0,0,.25);
    }
    .switch input:checked + .slider{
      background: rgba(34,197,94,.22);
      border-color: rgba(34,197,94,.35);
    }
    [data-theme="light"] .switch input:checked + .slider{
      background: rgba(34,197,94,.16);
      border-color: rgba(34,197,94,.30);
    }
    .switch input:checked + .slider:before{ transform: translateX(18px); }

    /* User card (Info) */
    .userRow{ display:flex; align-items:center; gap:12px; }
    .avatar{
      width:42px; height:42px; border-radius:14px;
      border:1px solid var(--border);
      background: var(--panel2);
      display:grid; place-items:center;
      overflow:hidden;
      flex:0 0 auto;
    }
    .avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
    .avatarPh{ font-weight:950; color: var(--muted); }
    .userMeta{ min-width:0; flex:1; }
    .userName{ font-weight:950; line-height:1.1; }
    .userHandle{ color:var(--muted); font-size:12px; margin-top:2px; }
    .userBtns{ display:flex; gap:6px; }

    /* Minimal emoji picker */
    #emojiModal .modal{ width:520px; max-width: calc(100vw - 28px); }
    #emojiModal .modalBody{ padding:12px; overflow:auto; flex:1; }
    .emojiMini{
      background: rgba(0,0,0,.35);
      border:1px solid var(--border);
      border-radius: 18px;
      padding:12px;
    }
    [data-theme="light"] .emojiMini{
      background: rgba(0,0,0,.06);
    }
    .emojiGrid{
      grid-template-columns: repeat(9, 1fr);
      gap:10px;
      max-height: 290px;
      padding:4px;
    }
    .emojiChip{
      border:none;
      background: transparent;
      border-radius: 14px;
      padding:10px 0;
      font-size:28px;
    }
    .emojiChip:hover{ background: var(--hover); }
    .emojiHintLine{ color: var(--muted); font-size:12px; margin-top:10px; }

    /* Checklist */
    .checkItem{ display:flex; align-items:flex-start; gap:10px; padding:4px 0; }
    .checkItem input.cb{ margin-top:6px; width:16px; height:16px; }
    .checkItem span{ flex:1; min-width:0; }
    .checkItem.done span{ text-decoration: line-through; opacity:.75; }


    /* Emoji grids */
    .emojiGrid{
      display:grid;
      grid-template-columns: repeat(8, 1fr);
      gap:6px;
      max-height:180px;
      overflow:auto;
      padding:2px;
    }
    .emojiChip{
      border:1px solid var(--border);
      background:var(--panel2);
      border-radius:12px;
      padding:6px 0;
      text-align:center;
      cursor:pointer;
      font-size:18px;
      line-height:1;
      user-select:none;
    }
    .emojiChip:hover{ background:var(--hover); }
    @media (max-width: 520px){
      .emojiGrid{ grid-template-columns: repeat(8, 1fr); }
    }


    /* Syntax coloring */
.syn-url{ color: var(--ink2); text-decoration: underline; text-underline-offset:2px; }
.syn-hash{ color: var(--ink3); }
.syn-mention{ color: var(--ink2); }
.syn-keyword{ color: rgba(250,204,21,.95); }


/* Code-ish syntax */
.syn-code{
  font-family: var(--editorFont);
  background: var(--synCodeBg);
  border:1px solid var(--synCodeBorder);
  padding:1px 4px;
  border-radius:8px;
}
.syn-cmt{ color: var(--muted); font-style: italic; }
.syn-str{ color: var(--ink2); }
.syn-num{ color: var(--ink3); }
.syn-ckw{ color: var(--ink3); font-weight:850; }
.syn-op{ color: var(--ink1); }


/* One-line toolbar buttons */
.toolMini{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  border-radius:12px;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.toolMini:hover{ background:var(--hover); }
.toolMini svg{ width:18px;height:18px; opacity:.9; }

/* Small hint bubble */
.hintBubble{
  position:fixed;
  z-index:90;
  padding:10px 12px;
  border:1px solid var(--border);
  background:rgba(15, 23, 42, .92);
  backdrop-filter: blur(10px);
  border-radius:14px;
  box-shadow:0 18px 80px rgba(0,0,0,.45);
  font-size:12px;
  color:var(--text);
  max-width:340px;
}
[data-theme="light"] .hintBubble{ background:rgba(255,255,255,.92); }
    .row{
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      margin-top:8px;
    }
    .row:first-child{ margin-top:0; }
    .rowLabel{ font-size:11px; color:var(--muted); }
    .rowValue{ font-weight:950; color:var(--text); text-align:right; }

    /* Calendar */
    .calHeader{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
    .calTitle{ font-weight:950; font-size:12px; }
    .calGrid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; font-size:11px; color:var(--muted); user-select:none; }
    .calCell{ text-align:center; padding:6px 0; border-radius:10px; border:1px solid transparent; }
    .calDow{ opacity:.8; padding:2px 0 6px; }
    .calDay{ color:var(--text); border-color:var(--border); }
    .calDay.muted{ color:rgba(159,176,195,.55); }
    .calDay.today{ border-color:rgba(110,168,254,.35); background:rgba(110,168,254,.10); font-weight:950; }

    /* Minimal weather */
    .notice{ font-size:12px; color:var(--muted); line-height:1.45; }
    .inlineBtns{ display:flex; gap:8px; margin-top:10px; }
    .weatherMain{ font-weight:950; color:var(--text); margin-top:8px; }
    .weatherSub{ font-size:11px; color:var(--muted); margin-top:6px; }

    /* Metrics (base) */
    .metricRow{
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      padding:8px 0;
      border-bottom:1px solid rgba(255,255,255,.06);
    }
    [data-theme="light"] .metricRow{ border-bottom-color: rgba(15,22,33,.08); }
    .metricRow:last-child{ border-bottom:none; }
    .pill{
      background:rgba(255,255,255,.10);
      border:1px solid var(--border);
      border-radius:999px;
      padding:4px 10px;
      font-size:12px;
      font-weight:950;
      color:var(--text);
      white-space:nowrap;
    }

    /* Insights: smaller typography */
    #sideContent[data-mode="insights"]{ font-size:12px; }
    #sideContent[data-mode="insights"] .metricRow{ padding:6px 0; font-size:12px; }
    #sideContent[data-mode="insights"] .pill{ padding:3px 8px; font-size:11px; }

    /* Keywords */
    .kwWrap{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
    .kwTag{
      display:inline-flex; align-items:center; gap:6px;
      padding:4px 8px;
      border-radius:999px;
      border:1px solid var(--border);
      background:rgba(255,255,255,.08);
      font-size:11px;
      font-weight:950;
    }
    .kwTag span{ color:var(--muted); font-weight:650; }


    .subHead{
      margin-top:14px;
      font-weight:950;
      font-size:11px;
      color:var(--muted);
      letter-spacing:.04em;
      text-transform:uppercase;
    }
    .kwHeaderRow{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .kwTabs{ display:flex; gap:6px; }
    .kwTab{
      border:1px solid var(--border);
      background:rgba(255,255,255,.06);
      color:var(--text);
      padding:4px 9px;
      border-radius:999px;
      font-weight:950;
      font-size:11px;
      cursor:pointer;
    }
    .kwTab.on{ background:rgba(255,255,255,.14); }
    .kwList{ margin-top:10px; }
    .kwRow{
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      padding:6px 0;
      border-bottom:1px dashed var(--border);
    }
    .kwRow:last-child{ border-bottom:none; }
    .kwWord{
      font-weight:850;
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
      max-width:64%;
    }



    /* Ruler */
    .ruler{
      height:18px;
      border-bottom:1px solid var(--border);
      background-image:
        repeating-linear-gradient(to right, var(--rulerMinor) 0, var(--rulerMinor) 1px, transparent 1px, transparent 10px),
        repeating-linear-gradient(to right, var(--rulerMajor) 0, var(--rulerMajor) 1px, transparent 1px, transparent 50px);
      opacity:.95;
      border-radius:16px 16px 0 0;
      margin:10px 10px 0 10px;
    }

    /* Checklist */
    .checkItem{ display:flex; align-items:flex-start; gap:10px; padding:2px 0; }
    .checkItem input.cb{ margin-top:3px; }
    .checkItem.done span{ text-decoration:line-through; color:var(--muted); }

    /* Emoji picker */
    .emojiPicker{
      position:fixed;
      z-index:80;
      padding:10px;
      border:1px solid var(--border);
      background:rgba(15, 23, 42, .92);
      backdrop-filter: blur(10px);
      border-radius:14px;
      box-shadow:0 18px 80px rgba(0,0,0,.45);
      max-width:320px;
    }
    body.light .emojiPicker{ background:rgba(255,255,255,.92); }
    .emojiGrid{
      display:grid;
      grid-template-columns: repeat(8, 1fr);
      gap:6px;
    }
    .emojiCell{
      width:32px; height:32px;
      display:flex; align-items:center; justify-content:center;
      border-radius:10px;
      border:1px solid transparent;
      cursor:pointer;
      font-size:18px;
      user-select:none;
    }
    .emojiCell:hover{
      background:rgba(255,255,255,.08);
      border-color:var(--border);
    }


    /* Library (left sidebar; docked like Info/Insights) */
    .leftPanel{
      width:340px;
      flex:0 0 auto;
      display:none;
      min-height:0;
      background:var(--panel);
      border:1px solid var(--border);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      overflow:hidden;
    }
    .leftPanel.open{ display:flex; flex-direction:column; }

.drawerTop{
      padding:12px;
      border-bottom:1px solid var(--border);
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
    }
    .drawerTitle{ font-weight:950; }

    .searchBox{
      padding:10px 12px;
      border-bottom:1px solid var(--border);
    }
    .searchInput{
      width:100%;
      padding:10px 12px;
      border-radius:12px;
      border:1px solid var(--border);
      background:var(--panel2);
      color:var(--text);
      outline:none;
      font-size:13px;
    }
    .searchInput::placeholder{ color:rgba(159,176,195,.65); }

    .noteList{
      flex:1;
      overflow:auto;
      padding:8px;
      display:flex;
      flex-direction:column;
      gap:8px;
    }
    .notePill{
      border:1px solid transparent;
      border-radius:14px;
      padding: 10px;
      background:transparent;
      transition:.15s ease;
      cursor:pointer;
      position:relative;
      display:block; /* prevents any flex-gap space reserved for hover actions */
    }
    .notePill:hover{ background:var(--hover); }

    .notePill.pinned{ padding-left:26px; }
    .notePill.pinned::before{
      content:"★";
      position:absolute;
      left:10px;
      top:10px;
      font-size:12px;
      color:var(--muted);
      opacity:.9;
      pointer-events:none;
    }
    .notePill.trashed{ opacity:.78; }
    .notePill.active{
      background:rgba(110,168,254,.12);
      border-color:rgba(110,168,254,.25);
    }
    .noteLeft{ min-width:0; display:flex; flex-direction:column; gap:6px; flex:1; }
    .noteTitleInput{
      width:100%;
      border:none;
      background:transparent;
      color:var(--text);
      font-weight:950;
      outline:none;
      padding:0;
      font-size:13px;
      letter-spacing:.1px;
    }
    .noteTitleInput:focus{
      background:var(--hover);
      border:1px solid var(--border);
      padding:6px 8px;
      border-radius:10px;
    }

    /* Settings/profile inputs (match rename/pill edit style) */
    .fieldInput, .fieldTextarea{
      width:100%;
      border:1px solid transparent;
      background:transparent;
      color:var(--text);
      font-weight:650;
      outline:none;
      padding:6px 8px;
      border-radius:10px;
      font-size:13px;
      letter-spacing:.1px;
    }
    .fieldInput:focus, .fieldTextarea:focus{
      background:var(--hover);
      border-color:var(--border);
    }
    .fieldTextarea{
      min-height:72px;
      resize:none;
      line-height:1.4;
    }

    /* v6.11.3 UI tweaks */
    .profileFields{
      max-width:420px;
    }
    @media (max-width:520px){
      .profileFields{ max-width:none; }
    }

    .verifyBadge{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:18px;
      height:18px;
      border-radius:999px;
      border:1px solid var(--border);
      font-size:12px;
      line-height:1;
      user-select:none;
    }
    .verifyBadge.on{
      color:rgba(34,197,94,.95);
      border-color:rgba(34,197,94,.55);
      background:rgba(34,197,94,.08);
    }
    .verifyBadge.off{
      color:var(--muted);
      background:transparent;
    }
    .verifyRow{
      display:flex;
      gap:8px;
      align-items:center;
      margin-top:6px;
      color:var(--muted);
      font-size:12px;
    }
    .verifyLabel{ color:var(--muted); }

    .dataGroup{
      margin-top:12px;
      padding:10px;
      border:1px solid var(--border);
      border-radius:14px;
      background:rgba(255,255,255,.02);
    }
    .dataGroupTitle{
      font-weight:900;
      font-size:12px;
      letter-spacing:.2px;
      color:var(--muted);
      text-transform:uppercase;
    }
    .dataGroup.danger{
      background:rgba(248,113,113,.04);
      border-color:rgba(248,113,113,.18);
    }

    /* Versioned release notes */
    .verBlock{
      margin-top:10px;
      border:1px solid var(--border);
      border-radius:14px;
      padding:10px;
      background:rgba(255,255,255,.02);
    }
    .verBlock > summary{
      cursor:pointer;
      font-weight:900;
      list-style:none;
      outline:none;
    }
    .verBlock > summary::-webkit-details-marker{ display:none; }
    .rnGroup{ margin-top:10px; }
    .rnTitle{
      font-weight:950;
      font-size:12px;
      color:var(--muted);
      text-transform:uppercase;
      letter-spacing:.2px;
    }
    .rnGroup ul{ margin:6px 0 0 18px; line-height:1.5; }

    .bioMeta{
      margin-top:6px;
      font-size:12px;
      color:var(--muted);
      display:flex;
      justify-content:flex-end;
    }
    .noteMeta{
      color:var(--muted);
      font-size:12px;
      white-space:normal;
      overflow:hidden;
      display:-webkit-box;
      -webkit-line-clamp:2;
      -webkit-box-orient:vertical;
    }
    .noteActions{
      display:flex;
      gap:6px;
      position:absolute;
      right:10px;
      top:10px;
      opacity:0;
      pointer-events:none;
      transition:.15s ease;
      align-items:center;
    }
    .notePill:hover .noteActions,
    .notePill:focus-within .noteActions{
      display:flex;
      gap:6px;
      position:absolute;
      right:10px;
      top:10px;
      opacity: 1;
      pointer-events: auto;
      transition:.15s ease;
      align-items:center;
    }
    .noteActionBtn:hover{
      border-color:var(--border);
      background:var(--hover);
    }
    .noteActionBtn svg{ width:16px;height:16px; opacity:.9; }

    
    /* Preferences (minimal layout) */
    .prefHeader{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .prefRow{ margin-top:10px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .prefLabel{ font-size:13px; color:var(--text); }
    .prefControl{ max-width:240px; width:240px; }
    .prefSliderBlock{ margin-top:10px; }
    .prefSliderBlock input[type="range"]{ width:100%; max-width:420px; }
    .prefStack{ margin-top:10px; }
    .prefRow.dim{ opacity:.65; }

    /* Library pill: actions hover over meta */
    .notePill{ position:relative; }
    .noteMeta{ padding-right:0; }
    .noteActions{
      display:flex;
      gap:6px;
      position:absolute;
      right:10px;
      bottom:10px;
      top:auto;
      opacity:0;
      pointer-events:none;
      transition:.15s ease;
      align-items:center;
      padding:4px;
      border-radius:999px;
      background:rgba(0,0,0,.10);
      backdrop-filter: blur(6px);
      border:1px solid rgba(255,255,255,.08);
    }
    body.light .noteActions{ background:rgba(255,255,255,.55); border:1px solid rgba(0,0,0,.10); }
    .notePill:hover .noteActions,
    .notePill:focus-within .noteActions{
      opacity:1;
      pointer-events:auto;
    }
    .notePill.archived{ opacity:.92; }
    .noteMeta .miniIcon{ display:inline-flex; vertical-align:-2px; margin-right:6px; opacity:.85; }
    .noteMeta .miniIcon svg{ width:12px; height:12px; }

.drawerFooter{
      padding:12px;
      border-top:1px solid var(--border);
      display:flex;
      gap:10px;
      align-items:flex-start;
    }
    .footText{ min-width:0; flex:1; }
    .footName{ font-weight:950; }
    .footDesc{ font-size:12px; color:var(--muted); margin-top:6px; line-height:1.35; }
    .footerLinks{
      display:flex;
      gap:8px;
      margin-top:10px;
      flex-wrap:wrap;
    }

    /* Modals */
    .modalWrap{
      position:fixed; inset:0;
      display:none;
      z-index:80;
    }
    .modalWrap.open{ display:block; }

    /* App Lock */
    .lockWrap{
      position:fixed; inset:0;
      display:none;
      z-index:200;
      align-items:center;
      justify-content:center;
    }
    .lockWrap.open{ display:flex; }
    .lockBack{
      position:absolute; inset:0;
      background:rgba(0,0,0,.55);
      backdrop-filter: blur(10px);
    }
    .lockCard{
      position:relative;
      width:min(520px, 92vw);
      background:var(--panel);
      border:1px solid var(--border);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:16px;
    }
    .lockTitle{ font-weight:1000; font-size:18px; letter-spacing:.2px; }
    .lockHint{ color:var(--muted); font-size:13px; margin-top:6px; line-height:1.35; }
    .lockRow{ display:flex; gap:10px; align-items:center; margin-top:14px; }
    .lockInput{ flex:1; }
    .lockError{ min-height:18px; margin-top:10px; color:var(--danger); font-size:13px; }
    .lockFoot{ display:flex; justify-content:flex-end; margin-top:6px; }

/* Lock screen: PIN dots + keypad */
.lockInputHidden{
  position:absolute;
  left:-9999px;
  width:1px; height:1px;
  opacity:0;
  pointer-events:none;
}
.pinDots{
  margin-top:14px;
  display:flex;
  justify-content:center;
  gap:10px;
  user-select:none;
}
.pinDot{
  width:14px;
  height:14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:transparent;
  opacity:.95;
}

    .pinDot.hidden{ display:none; }
.pinDot.filled{
  background:var(--text);
  border-color:rgba(127,127,127,.30);
}
.lockKeypad{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
}
.keyBtn{
  height:48px;
  border-radius:14px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  transition:.15s ease;
  user-select:none;
}
.keyBtn:hover{ background:var(--hover); }
.keyBtn:active{ transform: translateY(1px); }
.keyBtn.keyAction{
  font-size:12px;
  letter-spacing:.6px;
  text-transform:uppercase;
}
.lockActions{ justify-content:center; }

/* Inline field errors */
.fieldError{
  border-color:rgba(239,68,68,.65)!important;
  box-shadow:0 0 0 3px rgba(239,68,68,.15);
}
    body.appLocked .shell{ filter: blur(2px); }

    .modalBack{ position:absolute; inset:0; background:rgba(0,0,0,.45); }
    .modal{
      position:absolute;
      left:50%; top:50%;
      transform:translate(-50%, -50%);
      width:min(720px, 94vw);
      max-height: calc(100vh - 28px);
      display:flex;
      flex-direction:column;
      background:var(--panel);
      border:1px solid var(--border);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      overflow:hidden;
    }
    .modalTop{
      padding:12px 12px;
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      border-bottom:1px solid var(--border);
    }
    .modalBody{ padding:12px; overflow:auto; flex:1; }
    .chipRow{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .chip{
      border:1px solid var(--border);
      background:transparent;
      color:var(--text);
      border-radius:999px;
      padding:7px 10px;
      cursor:pointer;
      font-weight:950;
      font-size:12px;
      text-decoration:none;
      display:inline-flex;
      align-items:center;
      gap:8px;
    }
    .chip:hover{ background:var(--hover); }
    .hint{ margin-top:10px; color:var(--muted); font-size:12px; line-height:1.45; }

    @media (max-width: 980px){
      .sidePanel.open{ display:none !important; }
      .shell.libOpen{ padding:0; }
      .shell.libOpen .editorCol{ display:none; }
      .shell.libOpen .sidePanel{ display:none !important; }
      .leftPanel{ width:100%; border-radius:0; height:100%; }
      .activeTitle{ max-width:55vw; }
    }
  
    /* Reminder alert (non-blocking) */
    .remAlert{
      position:fixed;
      right:16px;
      bottom:66px;
      width:280px;
      max-width:calc(100vw - 32px);
      background:var(--panel);
      border:1px solid var(--border);
      border-radius:16px;
      box-shadow:var(--shadow);
      padding:12px 12px;
      display:none;
      z-index:2500;
    }
    .remAlert.open{ display:block; }
    .remAlertTop{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .remAlertTitle{ font-weight:950; }
    .remAlertClose{
      border:1px solid transparent;
      background:transparent;
      color:var(--muted);
      cursor:pointer;
      font-size:18px;
      width:28px;height:28px;
      border-radius:10px;
      display:flex; align-items:center; justify-content:center;
    }
    .remAlertClose:hover{ background:var(--hover); color:var(--text); }
    .remAlertMeta{ margin-top:6px; font-size:12px; color:var(--muted); }
    .remAlertDetails{ margin-top:6px; font-size:12px; color:var(--text); opacity:.9; line-height:1.35; max-height:110px; overflow:auto; }
    .remAlertRow{ margin-top:10px; display:flex; gap:8px; justify-content:flex-end; }
    

    .editor.readOnly{ opacity:.92; }


    /* --- Review fixes: modern hover actions + minimal pref tabs + meta length --- */
    .notePill{ padding:10px; }
    .notePill.pinned{ padding-left:26px; }

    .noteMeta{
      white-space:normal;
      overflow:hidden;
      text-overflow:clip;
      line-height:1.25;
      padding-right:0 !important;
      display:-webkit-box;
      -webkit-box-orient:vertical;
      -webkit-line-clamp:2;
    }

    .noteActions{
      right:12px !important;
      bottom:12px !important;
      top:auto !important;
      padding:4px !important;
      border-radius:999px;
      background:rgba(127,127,127,.14);
      border:1px solid rgba(255,255,255,.10);
      backdrop-filter: blur(6px);
    }
    body.light .noteActions{
      background:rgba(255,255,255,.70);
      border:1px solid rgba(0,0,0,.10);
    }

    .noteActionBtn{
      width:30px;
      height:30px;
      padding:0;
      border-radius:999px;
      border:1px solid transparent;
      background:transparent;
      color:var(--text);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      transition:.15s ease;
    }
    .noteActionBtn:hover{
      background:rgba(127,127,127,.14);
      border-color:rgba(127,127,127,.20);
    }
    body.light .noteActionBtn:hover{
      background:rgba(0,0,0,.06);
      border-color:rgba(0,0,0,.10);
    }
    .noteActionBtn svg{ width:18px; height:18px; opacity:.92; }

    /* Preferences: minimal tabs */
    .prefTabs{
      margin-top:12px;
      display:flex;
      gap:8px;
      flex-wrap:wrap;
    }
    .prefTab{
      border:1px solid transparent;
      background:transparent;
      color:var(--muted);
      border-radius:999px;
      padding:6px 10px;
      font-size:12px;
      cursor:pointer;
      transition:.15s ease;
      user-select:none;
    }
    .prefTab:hover{
      background:var(--hover);
      color:var(--text);
      border-color:var(--border);
    }
    .prefTab.on{
      background:rgba(110,168,254,.12);
      color:var(--text);
      border-color:rgba(110,168,254,.25);
    }

    /* Help: minimal tabs */
    .helpTabs{
      margin-top:6px;
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      margin-bottom:12px;
    }
    .helpTab{
      border:1px solid transparent;
      background:transparent;
      color:var(--muted);
      border-radius:999px;
      padding:6px 10px;
      font-size:12px;
      cursor:pointer;
      transition:.15s ease;
      user-select:none;
    }
    .helpTab:hover{
      background:var(--hover);
      color:var(--text);
      border-color:var(--border);
    }
    .helpTab.on{
      background:rgba(110,168,254,.12);
      color:var(--text);
      border-color:rgba(110,168,254,.25);
    }

    .settingsPane[data-settings-pane="preferences"] .dataGroupTitle{ display:none; }
    .settingsPane[data-settings-pane="preferences"] .dataGroup{ margin-top:12px; }
