/* Notepan 3.3 — flat, soft and calm. No web fonts, no frameworks.
   Every colour is a token below, tuned separately for light and dark. */
:root {
  --paper: #fbfbf8;        /* main surface */
  --side: #f3f3ef;         /* sidebar */
  --ink: #2f2f2c;          /* text — never pure black */
  --graphite: #85847e;     /* secondary text */
  --rule: #e9e8e2;         /* hairlines */
  --wash: #f0efea;         /* quiet fills */
  --hover: #ebeae4;
  --accent: #4f7d70;       /* soft sage */
  --accent-soft: #e3ece8;
  --accent-ink: #2f5a4e;
  --on-accent: #ffffff;
  --mark: #f5e6a8;
  --danger: #b9524e;
  --danger-soft: #f6e5e3;
  --pop: #ffffff;
  --shadow: 0 1px 2px rgba(40, 40, 30, .04), 0 12px 32px -12px rgba(40, 40, 30, .18);
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Charter, Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --editor-font: var(--sans);
  --zoom: 1;
  --side-w: 272px;
  --r: 10px;
  --r-sm: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d1e20; --side: #18191b; --ink: #e5e4df; --graphite: #9a9993; --rule: #2a2b2e;
    --wash: #232427; --hover: #2a2b2f; --accent: #8fc1b1; --accent-soft: #24322d; --accent-ink: #b8ddd0;
    --on-accent: #12201b; --mark: #4b4220; --danger: #ec8a84; --danger-soft: #3a2523; --pop: #242528;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -14px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1d1e20; --side: #18191b; --ink: #e5e4df; --graphite: #9a9993; --rule: #2a2b2e;
  --wash: #232427; --hover: #2a2b2f; --accent: #8fc1b1; --accent-soft: #24322d; --accent-ink: #b8ddd0;
  --on-accent: #12201b; --mark: #4b4220; --danger: #ec8a84; --danger-soft: #3a2523; --pop: #242528;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -14px rgba(0, 0, 0, .6); color-scheme: dark;
}
:root[data-editor-font="serif"] { --editor-font: var(--serif); }
:root[data-editor-font="mono"] { --editor-font: var(--mono); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 40px; color: var(--graphite); font-size: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; }
svg.i .dotf { fill: currentColor; stroke: none; }
.emo { font-family: var(--emoji); font-size: 16px; line-height: 1; width: 18px; text-align: center; flex: none; }
.emo.sm { font-size: 14px; width: 16px; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { color: var(--graphite); font-size: 12px; font-variant-numeric: tabular-nums; }
kbd { font: 11px/1 var(--sans); color: var(--graphite); background: var(--wash); border-radius: 5px; padding: 3px 6px; }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--wash); color: var(--ink); border-radius: var(--r); padding: 7px 13px; min-height: 34px; white-space: nowrap; font-weight: 500; transition: background .12s; }
.btn:hover { background: var(--hover); }
.btn.solid, .btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.solid:hover, .btn.primary:hover { background: var(--accent-ink); }
:root[data-theme="dark"] .btn.solid:hover, :root[data-theme="dark"] .btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--danger); background: var(--danger-soft); }
.btn.sm { min-height: 28px; padding: 4px 10px; font-size: 13px; }
.btn.icon { padding: 7px 9px; }
.btn[disabled] { opacity: .45; cursor: default; }
.iconbtn { border: 0; background: none; color: var(--graphite); border-radius: var(--r-sm); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background .12s, color .12s; }
.iconbtn:hover { background: var(--hover); color: var(--ink); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; }
.scrim { display: none; }
.side { background: var(--side); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 16px 14px 10px 18px; }
.brand b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; flex: 1; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.logo svg.i { width: 15px; height: 15px; }
.searchbtn { margin: 2px 12px 6px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: var(--r); background: var(--wash); color: var(--graphite); text-align: left; }
.searchbtn:hover { background: var(--hover); }
:root[data-theme="dark"] .searchbtn, :root[data-theme="dark"] .side kbd { background: var(--hover); }
.side-scroll { flex: 1; overflow: auto; padding: 4px 8px 18px; scrollbar-width: thin; }
.side-label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--graphite); margin: 16px 10px 4px; text-transform: uppercase; }
.side-label svg.i { width: 12px; height: 12px; }
.side-empty { color: var(--graphite); margin: 4px 12px; font-size: 13px; }
.side-foot { padding: 6px 8px 10px; display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--rule); }
.foot-row { flex: 1; }
.side-foot svg.i { width: 16px; height: 16px; }

.row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px 5px 4px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; min-height: 32px; color: var(--ink); position: relative; }
.row:hover { background: var(--hover); }
.row.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.row.on .count { color: var(--accent-ink); opacity: .75; }
.row > svg.i:first-child { margin-left: 4px; }
.row .more { opacity: 0; width: 24px; height: 24px; }
.row:hover .more, .row:focus-within .more, .row.on .more { opacity: 1; }
.row:hover .count, .row:focus-within .count { display: none; }
.row.on:not(:hover) .more { opacity: 0; }
.ghost-row { color: var(--graphite); }
.ghost-row:hover { color: var(--ink); }
.archive-row svg.i:last-child { transition: transform .15s; color: var(--graphite); }
.archive-row.open svg.i:last-child { transform: rotate(180deg); }
.archive-list { margin: 2px 0 6px; padding-left: 6px; }
.archive-list .row { opacity: .85; }

/* pan tree */
.twisty { border: 0; background: none; width: 18px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--graphite); border-radius: 5px; flex: none; }
.twisty svg.i { width: 13px; height: 13px; transform: rotate(-90deg); transition: transform .15s; }
.twisty.open svg.i { transform: none; }
.twisty:hover { background: var(--hover); color: var(--ink); }
.twisty-space { width: 18px; flex: none; }
.row.pan > .twisty, .row.pan > .twisty-space { margin-left: -4px; }
.pan-children { margin: 1px 0 2px 17px; padding-left: 4px; border-left: 1px solid var(--rule); }
.pan-children .row { min-height: 30px; font-size: 13.5px; }

/* drag handles */
.grip { border: 0; background: none; width: 16px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--graphite); opacity: 0; cursor: grab; touch-action: none; flex: none; border-radius: 5px; }
.grip svg.i { width: 12px; height: 12px; }
.grip-space { width: 16px; flex: none; }
.row:hover .grip, .note:hover .grip, .tab:hover .grip, .grip:focus-visible { opacity: .6; }
.grip:hover { opacity: 1 !important; background: var(--hover); }
@media (hover: none) { .grip { opacity: .45; } }
.sortlist { display: flex; flex-direction: column; gap: 1px; }
.dragging { opacity: .95; }
.dragging > .row, .dragging.note, .dragging.tab { background: var(--pop) !important; box-shadow: var(--shadow); border-radius: var(--r-sm); }
.sorting .dragging { position: relative; z-index: 3; }

.pan-notes { margin: 1px 0 6px 14px; padding-left: 4px; border-left: 1px solid var(--rule); }
.note { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 3px 4px 3px 2px; border: 0; background: none; border-radius: var(--r-sm); color: var(--graphite); font-size: 13.5px; text-align: left; cursor: pointer; }
.note:hover { background: var(--hover); color: var(--ink); }
.note.active { color: var(--ink); background: var(--wash); font-weight: 600; }
.note .more { opacity: 0; width: 22px; height: 22px; }
.note:hover .more, .note:focus-within .more { opacity: 1; }
.pin-mark { color: var(--graphite); display: inline-flex; }
.pin-mark svg.i { width: 12px; height: 12px; }
.note:hover .pin-mark { display: none; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--paper); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 20px; min-height: 56px; }
.top-title { margin: 0; font-size: 16px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; }
.crumb { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 6px 6px; border-radius: var(--r-sm); color: var(--graphite); font-size: 14px; max-width: 160px; flex: none; }
.crumb span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { background: var(--hover); color: var(--ink); }
.crumb-sep { color: var(--graphite); opacity: .6; padding: 0 1px; }
.crumbs .pan-title { margin-left: 0; flex: 0 1 auto; }
.crumbs > .pan-title:first-child { margin-left: -8px; }
.new-sub { margin-left: 6px; color: var(--graphite); flex: none; }
.new-sub:hover { color: var(--ink); }
.pan-title { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 8px; margin-left: -8px; border-radius: var(--r-sm); font-size: 16px; font-weight: 650; letter-spacing: -.01em; min-width: 0; color: var(--ink); }
.pan-title:hover { background: var(--hover); }
.pan-title .pan-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pan-title svg.i { color: var(--graphite); width: 14px; height: 14px; }
.pan-title .emo { font-size: 18px; width: auto; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }
.btn.icon.menu-toggle, .iconbtn.menu-toggle { display: none; }
.tool { border: 0; background: none; border-radius: var(--r-sm); min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--graphite); transition: background .12s, color .12s; }
.tool:hover { background: var(--hover); color: var(--ink); }
.tool.on { background: var(--accent-soft); color: var(--accent-ink); }
.vsep { width: 1px; height: 18px; background: var(--rule); margin: 0 6px; }
.zoom { display: inline-flex; align-items: center; background: var(--wash); border-radius: var(--r); padding: 2px; }
.zoom .tool { min-width: 28px; height: 28px; padding: 0 6px; }
.zoom output { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--graphite); cursor: pointer; }
.btn.publish { margin-left: 8px; }
.show-sm { display: none !important; }
.banner { display: flex; align-items: center; gap: 10px; margin: 0 20px 6px; padding: 8px 12px; border-radius: var(--r); background: var(--wash); color: var(--graphite); font-size: 13px; }

.strip { display: flex; align-items: center; gap: 4px; padding: 0 16px 0 18px; min-height: 42px; }
.strip-scroll { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 4px 0; flex: 0 1 auto; }
.strip-scroll::-webkit-scrollbar { display: none; }
.strip-tabs { display: flex; align-items: center; gap: 4px; flex: none; }
.strip-sep { width: 1px; height: 18px; background: var(--rule); margin: 0 4px; flex: none; }
.strip-all svg.i { width: 14px; height: 14px; }
.strip-tabs::-webkit-scrollbar { display: none; }
.strip.autohide { max-height: 8px; min-height: 8px; overflow: hidden; transition: max-height .15s ease; }
.strip.autohide:hover, .strip.autohide:focus-within { max-height: 60px; min-height: 42px; }
.tab { display: flex; align-items: center; gap: 5px; max-width: 220px; height: 32px; padding: 0 12px; border-radius: var(--r); color: var(--graphite); flex: none; cursor: pointer; transition: background .12s, color .12s; user-select: none; -webkit-user-select: none; }
.tab .grip { display: none; }
@media (hover: none) { .tab .grip { display: inline-flex; margin-left: -8px; } }
.tab-pin { display: inline-flex; opacity: .6; }
.tab-pin svg.i { width: 12px; height: 12px; }
.strip-tabs.sorting .tab { transition: none; }
.tab.dragging { cursor: grabbing; }
.tab:hover { background: var(--hover); color: var(--ink); }
.tab.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tab .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab .x { width: 22px; height: 22px; opacity: 0; color: inherit; }
.tab:hover .x, .tab.on .x { opacity: .7; }
.tab .x:hover { opacity: 1; }
.tab .x svg.i { width: 13px; height: 13px; }
.strip-add { width: 30px; height: 30px; }

.findbar { display: flex; gap: 6px; align-items: center; margin: 2px 18px 6px; padding: 8px; border-radius: var(--r); flex-wrap: wrap; background: var(--wash); }
.findbar input[type="text"] { border: 0; background: var(--paper); border-radius: var(--r-sm); padding: 6px 10px; width: 180px; }
.findbar input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.findbar .btn { background: var(--paper); min-height: 30px; padding: 4px 10px; }
.findbar .btn:hover { background: var(--hover); }
.findbar .hits { color: var(--graphite); font-size: 12px; min-width: 60px; }
.findbar label { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--graphite); }
.findbar input[type="checkbox"] { accent-color: var(--accent); }

/* The writing surface takes the whole width. */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 28px 0 30px; }
.title-row { position: relative; padding-bottom: 8px; }
.title-emoji { border: 0; background: none; border-radius: var(--r); color: var(--graphite); transition: opacity .12s, background .12s; }
.title-emoji.has { display: block; font: calc(40px * var(--zoom))/1 var(--emoji); padding: 4px; margin: 0 0 6px -4px; }
.title-emoji:not(.has) { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12.5px; opacity: 0; background: var(--wash); }
.title-row:hover .title-emoji, .title-emoji:focus-visible { opacity: 1; }
.title-emoji:hover { background: var(--hover); color: var(--ink); }
.title-emoji svg.i { width: 15px; height: 15px; }
@media (hover: none) { .title-emoji:not(.has) { opacity: .7; } }
.title-in { width: 100%; min-width: 0; border: 0; background: none; outline: none; font: 650 calc(26px * var(--zoom))/1.25 var(--editor-font); letter-spacing: -.015em; padding: 0; color: var(--ink); }
.title-in::placeholder, .editor::placeholder { color: var(--graphite); opacity: .55; }
.editor-wrap { position: relative; flex: 1; min-height: 0; }
.editor, .backdrop { position: absolute; inset: 0; margin: 0; border: 0; padding: 4px 0 40vh; font: calc(16.5px * var(--zoom))/1.75 var(--editor-font); white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; tab-size: 4; }
.editor, .backdrop { scrollbar-gutter: stable; }
.editor { resize: none; outline: none; background: transparent; overflow: auto; z-index: 1; color: var(--ink); scrollbar-width: thin; }
.backdrop { color: transparent; overflow: hidden; pointer-events: none; z-index: 0; }
.backdrop mark { color: transparent; background: var(--mark); border-radius: 3px; }
.backdrop mark.find { background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.status { display: flex; gap: 16px; padding: 8px 20px 10px 30px; color: var(--graphite); font-size: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.status .grow { flex: 1; }
.status .dupes { color: var(--accent-ink); }

.empty { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px 30px 80px; max-width: 560px; }
.empty-emoji { font: 40px/1 var(--emoji); margin-bottom: 16px; }
.empty h2 { font-size: 24px; font-weight: 650; margin: 0 0 6px; letter-spacing: -.015em; }
.empty p { color: var(--graphite); font-size: 15px; margin: 0 0 20px; }

/* ---------- views (favorites / published / settings) ---------- */
.view { flex: 1; overflow: auto; padding: 8px 30px 60px; }
.view-inner { max-width: 760px; }
.view h1 { font-size: 26px; font-weight: 650; margin: 8px 0 4px; letter-spacing: -.015em; }
.view > .view-inner > p.lede { color: var(--graphite); margin: 0 0 24px; font-size: 14.5px; max-width: 62ch; }
.card { background: var(--wash); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.card p { margin: 0; color: var(--graphite); }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.list-item .grow { white-space: normal; }
.list-item h3 { margin: 0 0 3px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.list-item p { margin: 0; color: var(--graphite); font-size: 13px; overflow-wrap: anywhere; }
.list-item .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; font-size: 11.5px; background: var(--wash); border-radius: 999px; padding: 2px 9px; margin-right: 4px; color: var(--graphite); }
.pill.dark { background: var(--accent-soft); color: var(--accent-ink); }
.setting { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.setting h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.setting p { margin: 0; color: var(--graphite); font-size: 13px; }
.section-title { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .03em; color: var(--graphite); margin: 30px 0 0; }
.seg { display: inline-flex; background: var(--wash); border-radius: var(--r); padding: 3px; flex: none; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: var(--r-sm); color: var(--graphite); }
.seg button.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .seg button.on { background: var(--hover); }
.switch { position: relative; width: 38px; height: 22px; flex: none; appearance: none; -webkit-appearance: none; background: var(--hover); border-radius: 999px; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.changelog h4 { margin: 18px 0 6px; font-size: 14px; }
.changelog ul { margin: 0; padding-left: 18px; color: var(--graphite); }
.changelog li { margin: 3px 0; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--graphite); font-size: 12px; margin-top: 4px; }
.input, .select, .textarea { width: 100%; border: 1px solid transparent; background: var(--wash); border-radius: var(--r); padding: 9px 11px; color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.textarea { min-height: 80px; resize: vertical; font-size: 15px; line-height: 1.55; }
.inline { display: flex; gap: 8px; }
.inline > * { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { border: 0; background: var(--wash); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--graphite); }
.chip:hover { background: var(--hover); color: var(--ink); }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.choice { display: flex; gap: 10px; align-items: flex-start; background: var(--wash); border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-size: 14px; font-weight: 600; }
.choice span { color: var(--graphite); font-size: 13px; }
.note-box { background: var(--wash); border-radius: var(--r); padding: 10px 12px; font-size: 13px; color: var(--graphite); }
.linkbox { display: flex; gap: 6px; }
.linkbox input { flex: 1; font-family: var(--mono); font-size: 12px; }
.block-edit { background: var(--wash); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.block-edit .input, .block-edit .textarea { background: var(--paper); }
.block-edit .inline { margin-bottom: 6px; }
.err { color: var(--danger); font-size: 13px; margin: 0 0 10px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 20, 16, .28); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; z-index: 50; overflow: auto; animation: fade .12s ease; }
.modal { background: var(--pop); color: var(--ink); border-radius: 18px; width: 100%; max-width: 500px; box-shadow: var(--shadow); animation: rise .16s ease; }
.modal.wide { max-width: 620px; }
.modal header { padding: 20px 22px 2px; }
.modal header h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.modal header p { margin: 6px 0 0; color: var(--graphite); font-size: 13px; }
.modal .body { padding: 14px 22px; }
.modal footer { padding: 6px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.99); } }

/* search */
.search-in { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 18px 22px; font-size: 17px; background: none; outline: none; }
.results { max-height: 52vh; overflow: auto; padding: 8px; }
.result { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: var(--r); }
.result.on, .result:hover { background: var(--wash); }
.result b { display: block; font-size: 14px; font-weight: 600; }
.result span { color: var(--graphite); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result mark { background: var(--mark); color: inherit; border-radius: 3px; }

/* ---------- popovers: menu + emoji ---------- */
.pop { position: fixed; z-index: 70; background: var(--pop); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); animation: rise .12s ease; }
.menu { min-width: 220px; padding: 6px; }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: var(--r-sm); text-align: left; color: var(--ink); font-size: 13.5px; }
.mi:hover, .mi:focus-visible { background: var(--wash); outline: none; }
.mi svg.i { color: var(--graphite); }
.mi.danger, .mi.danger svg.i { color: var(--danger); }
.mi kbd { background: none; padding: 0; }
.mi-emoji { font-family: var(--emoji); width: 16px; text-align: center; }
.mdiv { height: 1px; background: var(--rule); margin: 5px 6px; }
.emoji-pop { width: 316px; padding: 10px; }
.emoji-head { display: flex; gap: 6px; align-items: center; }
.emoji-search { flex: 1; border: 0; background: var(--wash); border-radius: var(--r); padding: 8px 10px; outline: none; }
.emoji-search:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.emoji-cats { display: flex; gap: 2px; margin: 8px 0 6px; overflow-x: auto; scrollbar-width: none; }
.emoji-cat { border: 0; background: none; border-radius: var(--r-sm); width: 32px; height: 30px; font: 16px/1 var(--emoji); flex: none; opacity: .55; }
.emoji-cat:hover { background: var(--wash); opacity: 1; }
.emoji-cat.on { background: var(--accent-soft); opacity: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.emoji { border: 0; background: none; border-radius: var(--r-sm); aspect-ratio: 1; font: 21px/1 var(--emoji); display: flex; align-items: center; justify-content: center; transition: transform .08s; }
.emoji:hover { background: var(--wash); transform: scale(1.12); }
.emoji.on { background: var(--accent-soft); }
.emoji-empty { grid-column: 1 / -1; color: var(--graphite); font-size: 13px; text-align: center; padding: 24px 0; margin: 0; }

/* 📌 copy-to-sticky button: appears when the text is zoomed past 150% */
.page { position: relative; }
.sticky-fab { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 12px); z-index: 5; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px 10px 14px; background: var(--pop); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.sticky-fab .emo { font-size: 18px; width: auto; }
.sticky-fab:hover { background: var(--accent-soft); color: var(--accent-ink); }
/* 📌 beside the zoom buttons, only past 150% */
.zoom-pin { display: inline-flex !important; margin-right: 6px; }
.zoom-pin .emo { font-size: 16px; width: auto; }
@keyframes pop-in { from { opacity: 0; transform: scale(.6); } }
.mi kbd { font-size: 11px; opacity: .8; }
html.zoom-sticky:not(.fab-off) .sticky-fab { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

/* ---------- sticky notes wall ---------- */
:root { --stk-yellow: #fbf1c7; --stk-orange: #fbe4cf; --stk-pink: #f8e0e5; --stk-purple: #ebe3f6; --stk-blue: #dfeaf7; --stk-green: #dcefdf; --stk-gray: #ecebe6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --stk-yellow: #423c25; --stk-orange: #45352a; --stk-pink: #45303a; --stk-purple: #382f47; --stk-blue: #2a3746; --stk-green: #2b3d31; --stk-gray: #2d2e31; } }
:root[data-theme="dark"] { --stk-yellow: #423c25; --stk-orange: #45352a; --stk-pink: #45303a; --stk-purple: #382f47; --stk-blue: #2a3746; --stk-green: #2b3d31; --stk-gray: #2d2e31; }
.c-yellow { --stk: var(--stk-yellow); } .c-orange { --stk: var(--stk-orange); } .c-pink { --stk: var(--stk-pink); } .c-purple { --stk: var(--stk-purple); }
.c-blue { --stk: var(--stk-blue); } .c-green { --stk: var(--stk-green); } .c-gray { --stk: var(--stk-gray); }
.sticky-nav { margin-bottom: 4px; }
.sticky-nav .emo { margin-left: 4px; }
.board { padding-top: 4px; }
.board-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.board-intro h1 { margin-bottom: 2px; }
.board-intro .lede { color: var(--graphite); margin: 0; font-size: 14px; }
.board-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-search { width: 220px; }
.board-colors { display: flex; align-items: center; gap: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--stk); box-shadow: inset 0 0 0 2.5px var(--dot); flex: none; transition: transform .1s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: inset 0 0 0 2.5px var(--dot), 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.swatch.sm { width: 22px; height: 22px; }
.swatches { display: flex; gap: 8px; padding: 10px; }
.wall-label { margin: 6px 2px 10px; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; margin-bottom: 26px; }
.stk { background: var(--stk); border-radius: 16px; padding: 10px 14px 10px; display: flex; flex-direction: column; min-height: 170px; transition: transform .15s, box-shadow .15s; position: relative; }
.stk:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(40, 40, 20, .35); }
.stk:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.stk.dragging { transform: rotate(-1.5deg) scale(1.02); box-shadow: var(--shadow); z-index: 3; }
.stk-top { display: flex; align-items: center; gap: 4px; margin: 0 -6px 2px -8px; min-height: 28px; }
.stk .grip { opacity: .35; }
.stk:hover .grip { opacity: .7; }
.wall.no-sort .grip { visibility: hidden; }
.stk-btn { border: 0; background: none; border-radius: 8px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); opacity: 0; transition: opacity .12s, background .12s; }
.stk:hover .stk-btn, .stk:focus-within .stk-btn { opacity: .75; }
.stk-btn:hover { opacity: 1 !important; background: rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .stk-btn:hover { background: rgba(255, 255, 255, .08); }
@media (hover: none) { .stk-btn { opacity: .6; } }
.dot-c { width: 14px; height: 14px; border-radius: 50%; background: var(--stk); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .25); }
.stk-pin { display: inline-flex; color: var(--ink); opacity: .55; }
.stk-pin svg.i { width: 14px; height: 14px; }
.stk-title { border: 0; background: none; outline: none; font: 650 16px/1.3 var(--sans); color: var(--ink); padding: 2px 0 4px; width: 100%; }
.stk-title:placeholder-shown { font-weight: 500; }
.stk-title::placeholder, .stk-text::placeholder { color: var(--ink); opacity: .35; }
.stk-text { border: 0; background: none; outline: none; resize: none; font: 14.5px/1.6 var(--editor-font); color: var(--ink); padding: 0; width: 100%; min-height: 72px; overflow-y: auto; scrollbar-width: thin; }
.stk-foot { margin-top: auto; padding-top: 8px; font-size: 11.5px; color: var(--ink); opacity: .45; }
.board-empty { max-width: 520px; padding: 40px 0; }

/* floating pins */
.pins-fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; border-radius: 999px; box-shadow: var(--shadow); }
.pins-pop { position: fixed; right: 18px; bottom: 66px; z-index: 30; width: 280px; max-height: 50vh; overflow: auto; background: var(--pop); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.pins-pop h4 { margin: 4px 8px 6px; font-size: 12px; color: var(--graphite); }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-size: 13px; pointer-events: auto; box-shadow: var(--shadow); animation: rise .15s ease; }
.toast-act { border: 0; background: none; color: inherit; font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reader ---------- */
.reader-body { min-height: 100vh; }
.reader { max-width: 760px; margin: 0 auto; padding: 56px 28px 80px; min-height: 100vh; }
.reader .meta { color: var(--graphite); font-size: 13px; margin-bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.reader h1 { font: 650 calc(32px * var(--zoom))/1.18 var(--editor-font); margin: 0 0 18px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.reader .content { font: calc(17px * var(--zoom))/1.75 var(--editor-font); white-space: pre-wrap; overflow-wrap: anywhere; }
.reader .bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 28px 0; align-items: center; }
.reader .gate { max-width: 480px; padding-top: 6vh; }
.reader .gate h1 { font-size: 30px; }
.reader .gate p { color: var(--graphite); font-size: 15.5px; margin: 0 0 18px; }
.blocks { margin-top: 30px; }
.blocks h2 { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .03em; color: var(--graphite); margin: 0 0 8px; }
.cblock { background: var(--wash); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; }
.cblock .grow { white-space: normal; }
.cblock b { display: block; font-size: 13px; margin-bottom: 3px; }
.cblock pre { margin: 0; font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.cblock .btn { background: var(--paper); }
.foot-note { color: var(--graphite); font-size: 12px; margin-top: 40px; }
.foot-note a { color: inherit; }


/* ---------- colour labels (pans, subpans, tabs) ---------- */
:root { --dot-yellow: #e0b53a; --dot-orange: #e5874a; --dot-pink: #dc6b88; --dot-purple: #9878d4; --dot-blue: #5a8ed4; --dot-green: #5aa877; --dot-gray: #9a9890; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dot-yellow: #e8c45c; --dot-orange: #ee9a64; --dot-pink: #e7849e; --dot-purple: #ac93e0; --dot-blue: #78a6e3; --dot-green: #78bf92; --dot-gray: #a9a8a1; } }
:root[data-theme="dark"] { --dot-yellow: #e8c45c; --dot-orange: #ee9a64; --dot-pink: #e7849e; --dot-purple: #ac93e0; --dot-blue: #78a6e3; --dot-green: #78bf92; --dot-gray: #a9a8a1; }
.c-yellow { --dot: var(--dot-yellow); } .c-orange { --dot: var(--dot-orange); } .c-pink { --dot: var(--dot-pink); } .c-purple { --dot: var(--dot-purple); }
.c-blue { --dot: var(--dot-blue); } .c-green { --dot: var(--dot-green); } .c-gray { --dot: var(--dot-gray); }
.cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; display: inline-block; }
.cdot.cdot-none { background: none; box-shadow: inset 0 0 0 1.5px var(--graphite); opacity: .6; }
.cdot.rainbow { background: conic-gradient(var(--dot-yellow), var(--dot-orange), var(--dot-pink), var(--dot-purple), var(--dot-blue), var(--dot-green), var(--dot-yellow)); }
.rainbow-mini { width: 22px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--dot-yellow), var(--dot-orange), var(--dot-pink), var(--dot-purple), var(--dot-blue), var(--dot-green)); opacity: .8; }
.row.pan .cdot { margin-right: 2px; }
.pan-title .cdot { width: 10px; height: 10px; }
.tab .cdot { width: 8px; height: 8px; }
.tab.tinted { background: var(--stk); color: var(--ink); }
.tab.tinted:hover { background: color-mix(in srgb, var(--stk) 80%, var(--dot)); }
.tab.tinted.on { background: color-mix(in srgb, var(--stk) 72%, var(--dot)); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--dot); }
.side-label.with-btn { display: flex; align-items: center; margin-right: 4px; }
.label-btn { border: 0; background: none; color: var(--graphite); display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; font: 600 11px var(--sans); text-transform: none; letter-spacing: 0; }
.label-btn:hover { background: var(--hover); color: var(--ink); }
.label-btn svg.i { width: 13px; height: 13px; }
.strip-sort.active { color: var(--accent-ink); background: var(--accent-soft); }
.label-chips { display: inline-flex; gap: 2px; margin-left: 2px; flex: none; }
.label-chip { border: 0; background: none; width: 28px; height: 28px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--graphite); }
.label-chip:hover { background: var(--hover); color: var(--ink); }
.label-chip .cdot { width: 12px; height: 12px; }
.label-bar { display: flex; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.label-pill { border: 0; background: var(--wash); color: var(--graphite); border-radius: 999px; padding: 4px 11px 4px 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; transition: background .12s, color .12s; }
.label-pill:hover { background: var(--hover); color: var(--ink); }
.label-pill .cdot { width: 11px; height: 11px; }
.label-pill svg.i { width: 14px; height: 14px; }
.tinted-page .sheet { box-shadow: inset 0 2px 0 color-mix(in srgb, var(--dot) 70%, transparent); }
.title-emoji:not(.has) { display: none; }
.color-pop { padding: 8px; min-width: 0; }
.color-pop .swatches { padding: 4px 2px 8px; }
.color-pop .mi { font-size: 13px; }

/* colour takes over the whole pan row, breadcrumb and title */
.row.pan.tinted { background: var(--stk); color: var(--ink); }
.row.pan.tinted:hover { background: color-mix(in srgb, var(--stk) 80%, var(--dot)); }
.row.pan.tinted.on { background: color-mix(in srgb, var(--stk) 70%, var(--dot)); color: var(--ink); box-shadow: inset 3px 0 0 var(--dot); }
.row.pan.tinted .count { color: var(--ink); opacity: .6; }
.pan-title.tinted, .crumb.tinted { background: var(--stk); color: var(--ink); padding-left: 10px; padding-right: 10px; }
.pan-title.tinted:hover, .crumb.tinted:hover { background: color-mix(in srgb, var(--stk) 80%, var(--dot)); }
.crumbs > .pan-title.tinted:first-child { margin-left: 0; }
.tinted-page { background: color-mix(in srgb, var(--stk) 28%, var(--paper)); }
.tinted-page .sheet { box-shadow: none; }
.measure { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; padding: 0; margin: 0; border: 0; height: auto; z-index: -1; }
.new-pan-box { background: var(--wash); border-radius: 12px; padding: 12px 12px 2px; margin-top: -4px; }
.new-pan-box .input, .new-pan-box .select { background: var(--paper); }

/* hidden labels */
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--wash); border-radius: var(--r); padding: 8px; min-height: 46px; cursor: text; }
.tag-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tag-chips { display: contents; }
.tag-input { flex: 1; min-width: 140px; border: 0; background: none; outline: none; padding: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.tag.ghost { background: var(--wash); color: var(--graphite); font-weight: 500; cursor: pointer; }
.tag.ghost:hover { background: var(--hover); color: var(--ink); }
button.tag { cursor: pointer; }
.tag.on { box-shadow: 0 0 0 1.5px var(--accent); }
.tag b { font-weight: 500; opacity: .7; }
.tag.sm { font-size: 11px; padding: 1px 7px; background: color-mix(in srgb, var(--paper) 65%, transparent); color: var(--graphite); font-weight: 500; }
.tag-x { border: 0; background: none; color: inherit; padding: 0 0 0 2px; font-size: 15px; line-height: 1; opacity: .7; cursor: pointer; }
.tag-x:hover { opacity: 1; }
.tag-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tag-hint { font-size: 12px; color: var(--graphite); margin-right: 2px; }
.org-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
/* groups in the sidebar and tab row */
.side-group-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--graphite); margin: 10px 10px 3px 14px; }
.side-group-label .cdot { width: 8px; height: 8px; }
.strip-group-label { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--graphite); padding: 0 4px 0 10px; margin-left: 4px; border-left: 1px solid var(--rule); height: 22px; }
.strip-group-label:first-child { border-left: 0; margin-left: 0; padding-left: 2px; }
.strip-group-label .cdot { width: 8px; height: 8px; }

/* save status in the note's status bar */
.saved-pill { display: inline-flex; align-items: center; gap: 5px; }
.saved-pill svg.i { width: 12px; height: 12px; }

/* move or duplicate window */
.dest-list { max-height: 300px; overflow: auto; margin: 10px 0; padding: 4px; background: var(--wash); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.dest { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; border-radius: 9px; padding: 7px 10px; text-align: left; color: var(--ink); min-height: 34px; }
.dest:hover:not([disabled]) { background: var(--hover); }
.dest.tinted { background: color-mix(in srgb, var(--stk) 70%, transparent); }
.dest.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dest[disabled] { opacity: .45; cursor: not-allowed; }
.dest-elbow { color: var(--graphite); width: 12px; flex: none; }
.dest .kind { background: var(--paper); }
.dest-crumb { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 10px; }
.dest-crumb b { font-weight: 650; overflow-wrap: anywhere; }
.dest-k { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; opacity: .8; flex: none; }
.dest-new { display: flex; flex-direction: column; gap: 6px; }
.dest-new .dest-k { color: var(--graphite); }
.dest-new .btn { flex: none; }

/* favorites dashboard */
.fav-lede { color: var(--graphite); margin: 4px 0 16px; max-width: 64ch; }
.fav-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fav-stat { background: var(--wash); border-radius: 14px; padding: 12px 14px; }
.fav-stat b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.fav-stat span { color: var(--graphite); font-size: 12.5px; }
.fav-card { min-height: 170px; }
.fav-snippet { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); opacity: .85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; white-space: pre-line; }
.crumb-chip { border: 0; background: color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 999px; padding: 2px 9px 2px 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--graphite); max-width: 70%; min-width: 0; }
.crumb-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-chip svg.i { width: 12px; height: 12px; }
.crumb-chip:hover { color: var(--ink); }
.mini-btn.on { opacity: 1; color: var(--accent-ink); }
.mini-btn.heart.on { color: var(--danger); opacity: .9; }
.fav-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.fav-chip { border: 0; background: var(--wash); border-radius: 999px; padding: 6px 12px 6px 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.fav-chip.tinted { background: var(--stk); }
.fav-chip svg.i { width: 13px; height: 13px; color: var(--graphite); }
.fav-chip:hover svg.i { color: var(--danger); }

/* deleting + recycle bin */
.modal-text { margin: 0 0 12px; color: var(--graphite); }
.warn-box { display: flex; gap: 12px; align-items: flex-start; background: var(--danger-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.warn-box svg.i { color: var(--danger); margin-top: 2px; }
.warn-box b { display: block; margin-bottom: 2px; }
.warn-box p { margin: 0; color: var(--graphite); font-size: 13px; }
.linkish { border: 0; background: none; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish svg.i { width: 14px; height: 14px; }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: var(--danger); filter: brightness(.92); }
:root[data-theme="dark"] .btn.danger-solid { color: #1d1e20; }
.toast .toast-act + .toast-act { margin-left: -2px; opacity: .85; }
.bin-item { align-items: center; padding: 12px 14px; border-radius: 14px; border-bottom: 0; background: var(--wash); margin-bottom: 8px; }
.bin-item.tinted { background: var(--stk); }
.bin-emo { font-size: 24px; width: 32px; }
.settings-section.focus { background: var(--accent-soft); border-radius: 14px; padding: 2px 14px 6px; margin: 18px -14px 0; transition: background 1.5s; }
.settings-section.focus .section-title { margin-top: 14px; }

/* 🏠 brand = Home */
.brand { padding-left: 10px; }
.brand-home { display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px; margin-left: -2px; border-radius: 10px; color: var(--ink); cursor: pointer; }
.brand-home b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand-home:hover, .brand-home.on { background: var(--hover); }
.brand .grow { flex: 1; }

/* ♻️ Recovery parent menu */
.rec-parent svg.i { margin-left: auto; color: var(--graphite); transition: transform .15s; transform: rotate(-90deg); }
.rec-parent.open svg.i { transform: none; }
.rec-parent.within { color: var(--accent-ink); font-weight: 600; }
.rec-children { margin: 1px 0 4px 18px; padding-left: 4px; border-left: 1px solid var(--rule); }
.rec-children .row { min-height: 30px; font-size: 13.5px; }
.new-pan-top { margin-top: 6px; }

/* 🏷 label badge + popover */
.lbl-badge { border: 0; background: color-mix(in srgb, var(--accent-soft) 80%, transparent); color: var(--accent-ink); border-radius: 999px; padding: 1px 7px; font-size: 12px; line-height: 1.5; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; flex: none; }
.lbl-badge:hover { background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.lbl-badge.sm { font-size: 11px; padding: 0 6px; }
.lbl-n { font-weight: 700; font-size: 10.5px; }
.title-badge { font-size: 14px; padding: 3px 10px; margin-left: 8px; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title-emoji.has { display: inline-flex; margin: 0 0 0 -4px; font: calc(30px * var(--zoom))/1 var(--emoji); padding: 2px; }
.lbl-pop, .hist-pop { padding: 10px; min-width: 240px; max-width: 340px; }
.hist-pop { width: 340px; }
.lbl-pop-h { font-size: 12px; font-weight: 600; color: var(--graphite); margin: 2px 4px 8px; text-transform: uppercase; letter-spacing: .03em; }
.lbl-pop-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 8px; }
.hist-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 9px; text-align: left; color: var(--ink); }
.hist-row:hover, .hist-row:focus-visible { background: var(--wash); outline: none; }
.hist-row b, .hist-go b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row small, .hist-go small { display: block; color: var(--graphite); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row time { color: var(--graphite); font-size: 11.5px; flex: none; }
.hist-row.gone, .hist-line.gone { opacity: .55; }
.hist-line { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--rule); }
.hist-line time { width: 56px; flex: none; color: var(--graphite); font-size: 12px; font-variant-numeric: tabular-nums; }
.hist-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px; border-radius: 10px; text-align: left; color: var(--ink); }
.hist-go:hover { background: var(--wash); }
.view .input[type="search"] { margin-bottom: 8px; }
.muted-p { color: var(--graphite); margin: 6px 0 14px; font-size: 13.5px; }
.wide-inner { max-width: 1100px; }

/* 🗄️ Archive */
.arc-home { background: linear-gradient(135deg, var(--stk-yellow), var(--stk-orange)); }
.arc-badge { font-size: 11px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 999px; padding: 2px 9px; }
.arc-view { min-height: 300px; font-family: var(--editor-font); }

/* 🏠 Home */
.home { padding-top: 6px; }
.home-hello h1 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.home-hello p { color: var(--graphite); margin: 0 0 18px; }
.home-card { background: var(--wash); border-radius: 20px; padding: 18px 20px 12px; margin-bottom: 26px; }
.home-pad { width: 100%; min-height: 220px; border: 0; background: none; resize: vertical; outline: none; font: 600 calc(22px * var(--zoom))/1.55 var(--editor-font); color: var(--ink); letter-spacing: -.005em; }
.home-pad::placeholder { color: var(--graphite); opacity: .5; font-weight: 700; }
.home-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 10px; }
.home-bar .btn { background: var(--paper); }
.home-meta { color: var(--graphite); font-size: 12px; }
.home-sc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.home-sc-head h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); margin: 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sc { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: var(--wash); border-radius: 16px; padding: 14px 14px 12px; min-height: 104px; text-align: left; cursor: pointer; color: var(--ink); transition: transform .15s, box-shadow .15s; user-select: none; }
.sc.tinted { background: var(--stk); }
.sc:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(40, 40, 20, .35); }
.sc.dragging { transform: rotate(-2deg) scale(1.03); box-shadow: var(--shadow); z-index: 3; }
.sc .grip { position: absolute; top: 8px; right: 8px; }
.sc-emoji { font: 26px/1 var(--emoji); margin-bottom: 8px; }
.sc b { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sc-sub { font-size: 11.5px; color: var(--graphite); }
.sc.missing { opacity: .55; }
.sc-add { background: none; box-shadow: inset 0 0 0 1.5px var(--rule); }
.sc-add .sc-emoji { color: var(--graphite); font-family: var(--sans); }
.home-grid.editing .sc:not(.sc-add) { animation: wiggle .35s ease-in-out infinite alternate; }
@keyframes wiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.sc-x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1; cursor: pointer; }
.home-tip { color: var(--graphite); font-size: 12px; margin-top: 12px; }
.home-restore { position: sticky; bottom: 16px; margin: 0 auto 16px; width: min(640px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; background: var(--pop); border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow); border: 1px solid var(--rule); animation: rise .2s ease; z-index: 6; }
.home-restore .grow { white-space: normal; font-size: 13.5px; }
.sc-pick-list { max-height: 360px; }
.sc-pick { display: flex; flex-direction: column; gap: 2px; }
.sc-pick .field { margin: 6px 4px; }

/* ---------- Organizer ---------- */
.org-count { color: var(--graphite); font-size: 13px; margin-right: 6px; }
.org-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 6px 0 20px; }
.org-card { background: var(--wash); border-radius: 16px; padding: 14px 16px; }
.org-card h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--graphite); }
.org-card .muted { color: var(--graphite); font-size: 13px; margin: 0 0 10px; }
.cmap-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--hover); gap: 2px; margin-bottom: 10px; }
.cmap-seg { background: var(--dot); min-width: 4px; }
.cmap-seg.none { background: var(--rule); }
.cmap-legend { display: flex; flex-wrap: wrap; gap: 4px; }
.legend { border: 0; background: var(--paper); border-radius: 999px; padding: 3px 9px 3px 7px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--graphite); }
.legend b { color: var(--ink); font-weight: 600; }
.legend.on { box-shadow: 0 0 0 1.5px var(--accent); color: var(--ink); }
.shelf { display: flex; flex-wrap: wrap; gap: 4px; }
.shelf-emoji { border: 0; background: var(--paper); border-radius: 10px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--graphite); }
.shelf-emoji .emo { font-size: 18px; width: auto; }
.shelf-emoji.on { box-shadow: 0 0 0 1.5px var(--accent); }
.big-num { font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1; margin-bottom: 4px; }
.org-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; position: sticky; top: 0; background: var(--paper); padding: 6px 0 10px; z-index: 4; }
.org-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-row .input { flex: 1; min-width: 200px; }
.org-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--graphite); }
.org-sel .select { width: auto; padding: 6px 10px; }
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: 8px 10px 8px 14px; margin-bottom: 14px; position: sticky; top: 92px; z-index: 4; }
.bulk .btn { background: var(--paper); }
.bulk .cdot { width: 12px; height: 12px; }
.org-group { margin: 14px 2px 8px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 10px; }
.org-item { background: var(--wash); border-radius: 16px; padding: 10px 14px 12px; cursor: pointer; display: flex; flex-direction: column; min-height: 140px; transition: transform .15s, box-shadow .15s; outline-offset: 2px; }
.org-item.tinted { background: var(--stk); }
.org-item:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(40, 40, 20, .35); }
.org-item.selected { box-shadow: 0 0 0 2px var(--accent); }
.org-top { display: flex; align-items: center; gap: 6px; min-height: 28px; margin: 0 -6px 4px 0; }
.org-check { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; opacity: .35; cursor: pointer; }
.org-item:hover .org-check, .org-check:checked, .org-check:focus-visible { opacity: 1; }
.kind { font-size: 11px; font-weight: 600; color: var(--graphite); background: color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 999px; padding: 1px 8px; }
.mini-btn { border: 0; background: none; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); opacity: .55; }
.mini-btn:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.mini-btn .cdot { width: 13px; height: 13px; }
.org-item h4 { margin: 0 0 4px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.org-item h4 .emo { font-size: 18px; width: auto; }
.org-sub { margin: 0 0 6px; font-size: 12px; color: var(--graphite); }
.org-meta { margin: 0; font-size: 13px; color: var(--ink); opacity: .8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.org-foot { margin-top: auto; padding-top: 10px; font-size: 11.5px; color: var(--ink); opacity: .45; }
@media (max-width: 820px) { .bulk { top: 0; } .org-filters { position: static; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hide-sm { display: none !important; }
  .show-sm { display: inline-flex !important; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 40; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(20, 20, 16, .3); }
  .btn.icon.menu-toggle, .iconbtn.menu-toggle { display: inline-flex; }
  .topbar { padding: 8px 10px; gap: 4px; }
  .crumb, .crumb-sep { display: none; }
  .crumbs > .pan-title { margin-left: -4px; }
  .strip { padding: 0 10px; }
  .sheet { padding: 12px 16px 0; }
  .status { padding: 8px 16px; }
  .findbar { margin: 2px 10px 6px; }
  .view { padding: 8px 16px 60px; }
  .banner { margin: 0 10px 6px; }
  .empty { padding: 30px 20px; }
  .reader { padding: 32px 18px 60px; }
}
@media (max-width: 480px) { .hide-xs { display: none; } .btn.publish { margin-left: 2px; padding: 7px 10px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.dest-new .linkbox input { font-family: var(--sans); font-size: 14px; }
body:has(.home-restore) .toasts { bottom: 96px; }

/* pans, tabs and every clickable row show a hand, not a text cursor */
.row, .row.pan, .note, .tab, .sc, .dest, .org-item, .result, .hist-go, .hist-row, .crumb, .pan-title, .label-chip, .tool, .iconbtn, .lbl-badge, .twisty, .brand-home { cursor: pointer; }
.row.pan, .row.pan *, .tab, .tab * { -webkit-user-select: none; user-select: none; }
.row.pan .grip, .tab .grip { cursor: grab; }

/* toolbar spacing: zoom group stands apart from its neighbours */
.top-tools .zoom { margin: 0 4px; }
.top-tools > .vsep:last-of-type { margin: 0 4px 0 10px; }

/* welcome on Home (shown as the pad's placeholder until you type) */
.home-pad.welcome { min-height: 640px; }
.home-pad.welcome::placeholder { font: 500 calc(16.5px * var(--zoom))/1.75 var(--editor-font); color: var(--ink); opacity: .55; letter-spacing: 0; }

/* About */
.about h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 14px; }
.about-p { font-size: 15.5px; line-height: 1.7; margin: 0 0 14px; white-space: pre-line; }
.about-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 10px; }
.iconbtn.on { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 3.14: Home dock (tiny icons that magnify under the pointer) ---------- */
.dock-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 8px; background: var(--wash); border-radius: 22px; padding: 14px 16px 12px; width: fit-content; max-width: 100%; margin: 0 auto; }
.dock { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 6px; padding-top: 22px; }
.dock-item { --mag: 1; position: relative; width: 38px; height: 38px; border-radius: 11px; background: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; transform: scale(var(--mag)); transform-origin: 50% 100%; transition: transform .12s ease-out, margin .12s ease-out; margin: 0 calc((var(--mag) - 1) * 14px); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.dock-item.tinted { background: var(--stk); }
.dock-item .dock-emoji { font: 20px/1 var(--emoji); pointer-events: none; }
.dock-item .grip { display: none; }
.dock-item::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(calc(1 / var(--mag))); transform-origin: 50% 100%; white-space: nowrap; font: 600 11px/1 var(--sans); color: var(--paper); background: var(--ink); padding: 5px 8px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .1s; }
.dock-item:hover::after, .dock-item:focus-visible::after { opacity: 1; }
.dock-item.missing { opacity: .5; }
.dock-item.dragging { opacity: .6; }
.dock.editing .dock-item { animation: wiggle .3s ease-in-out infinite alternate; }
.dock-add { width: 38px; height: 38px; border-radius: 11px; border: 0; background: none; box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--graphite); font-size: 18px; cursor: pointer; flex: none; }
.dock-add:hover { color: var(--ink); background: var(--paper); }
.dock .sc-x { top: -7px; left: -7px; width: 18px; height: 18px; font-size: 12px; }
@media (hover: none) { .dock-item { --mag: 1 !important; } }

/* collapsed top menu: tiny icons below Search */
.menu-mini { display: flex; align-items: center; gap: 2px; margin: 2px 0 4px; padding: 2px 4px 2px 6px; border-radius: var(--r-sm); }
.menu-mini .mini-ico { border: 0; background: none; width: 28px; height: 28px; border-radius: 7px; font: 15px/1 var(--emoji); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .12s, background .12s; }
.menu-mini .mini-ico:hover { background: var(--hover); transform: scale(1.18); }
.menu-mini .mini-ico.on { background: var(--accent-soft); }
.menu-mini-title { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--graphite); padding-left: 4px; }
.menu-toggle-btn svg.i { transform: rotate(-90deg); transition: transform .15s; }
.menu-toggle-btn.open svg.i { transform: none; }
.menu-box { margin-bottom: 4px; }

/* floating pinned button: draggable anywhere */
.pins-wrap { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 30; } /* right middle: clear of the status bar */
.pins-wrap .pins-fab { position: static; cursor: grab; touch-action: none; }
.pins-wrap.dragging-fab .pins-fab { cursor: grabbing; box-shadow: var(--shadow); transform: scale(1.04); }
.pins-wrap .pins-pop { position: absolute; right: calc(100% + 10px); top: 50%; bottom: auto; transform: translateY(-50%); }
.pins-wrap.custom .pins-pop { right: 0; top: auto; transform: none; bottom: calc(100% + 8px); }
.toast.toast-hint { animation: rise .2s ease; }

/* status bar: total / text / empty lines */
.line-stats { display: inline-flex; gap: 10px; }
.line-stats .ls-part { opacity: .85; }
.line-stats .ls-part::before { content: '·'; margin-right: 10px; opacity: .6; }
.setting.focus-row { background: var(--accent-soft); border-radius: 12px; padding-left: 12px; padding-right: 12px; }
.pins-wrap.custom.below .pins-pop { bottom: auto; top: calc(100% + 8px); }
.pins-wrap.custom.leftish .pins-pop { right: auto; left: 0; }
.home-card { margin-top: 18px; }

/* Home = notepad layout */
.main { position: relative; }
.home-greet { color: var(--graphite); font-size: 13px; margin-right: 6px; white-space: nowrap; }
.dock-strip { display: flex; align-items: flex-end; gap: 6px; padding: 2px 16px 6px 18px; min-height: 48px; }
.dock-strip .dock { flex: 1; justify-content: flex-start; flex-wrap: wrap; gap: 4px; padding-top: 14px; }
.dock-strip .dock-item { width: 30px; height: 30px; border-radius: 9px; background: var(--wash); box-shadow: none; margin: 0 calc((var(--mag) - 1) * 11px); }
.dock-strip .dock-item .dock-emoji { font-size: 16px; }
.dock-strip .dock-item.tinted { background: var(--stk); }
.dock-add-sm { flex: none; }
.home-page .sheet { padding-top: 8px; }
.home-pad.editor { padding-top: 4px; }
.home-pad.welcome::placeholder { font: 400 calc(16px * var(--zoom))/1.75 var(--editor-font); opacity: .6; }
.home-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 20px 0 30px; }
.home-actions .btn { background: var(--wash); }
.home-actions .btn:hover { background: var(--hover); }
.home-restore { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); margin: 0; }
@media (max-width: 820px) { .dock-strip { padding: 2px 10px 6px; } .home-actions { padding: 6px 12px 0 16px; } }

/* 🔔 bell + reminders */
.tool.bell { position: relative; }
.bell-dot { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 9.5px/15px var(--sans); text-align: center; padding: 0 3px; }
.bell-pop { width: 360px; padding: 10px; }
.bell-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bell-head .seg button { font-size: 12.5px; padding: 4px 9px; }
.bell-body { max-height: 340px; overflow: auto; margin-bottom: 6px; }
.hist-row.unread b, .hist-line.unread b { color: var(--accent-ink); }
.hist-row.unread { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.rem-mark { font: 11px/1 var(--emoji); opacity: .8; }
.dest-inside { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--graphite); margin-top: 6px; }
.dest-inside input { accent-color: var(--accent); }
.dest-inside input:disabled + span { opacity: .6; }
.menu-mini .mini-ico { width: 25px; height: 26px; font-size: 14px; } .menu-mini { gap: 0; }

/* back button + long toasts */
.back-btn { flex: none; }
.back-btn[disabled] { opacity: .3; cursor: default; }
.back-btn[disabled]:hover { background: none; }
.toast-x { border: 0; background: none; color: inherit; font-size: 17px; line-height: 1; padding: 0 0 0 4px; opacity: .7; cursor: pointer; }
.toast-x:hover { opacity: 1; }

/* ======================================================================
   3.17 — note rail, ⏰ hub, Pomodoro, clock, and a fresher page layout
   ====================================================================== */

/* note rail: a slim menu for the open note, on the right edge of the page */
.page.with-rail .sheet { padding-right: 62px; }
.note-rail { position: absolute; top: 6px; right: 8px; bottom: 6px; width: 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; z-index: 3; border-left: 2px solid color-mix(in srgb, var(--accent) 22%, var(--rule)); }
.rail-btn { position: relative; width: 32px; height: 32px; border: 0; background: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, transform .12s; }
.rail-btn .emo { font-size: 16px; width: auto; filter: saturate(.85); }
.rail-btn:hover { background: var(--hover); transform: scale(1.12); }
.rail-btn.on { background: var(--accent-soft); }
.rail-btn::after { content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; font: 600 11.5px/1 var(--sans); color: var(--paper); background: var(--ink); padding: 6px 9px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .1s; }
.rail-btn:hover::after, .rail-btn:focus-visible::after { opacity: 1; }
.rail-badge { position: absolute; top: 0; right: -2px; min-width: 14px; height: 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 9px/14px var(--sans); text-align: center; padding: 0 3px; }
.rail-sep { width: 18px; height: 1px; background: var(--rule); margin: 4px 0; }
.pins-pop-r { width: 300px; padding: 10px; max-height: 60vh; overflow: auto; }
@media (max-width: 820px) { .note-rail { display: none; } .page.with-rail .sheet { padding-right: 16px; } }

/* ⏰ hub button + popover */
.tool.hub.running { background: var(--accent-soft); color: var(--accent-ink); padding: 0 10px; gap: 5px; border-radius: 999px; }
.hub-pill { font: 700 12.5px/1 var(--sans); font-variant-numeric: tabular-nums; }
.hub-pop { width: 360px; padding: 12px; }
.hub-now { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.hub-now .emo { font-size: 22px; width: auto; }
.hub-now b { display: block; font-size: 13px; }
.hub-time { font: 700 22px/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.hub-tile { border: 0; background: var(--wash); border-radius: 12px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); transition: background .12s, transform .12s; }
.hub-tile:hover { background: var(--hover); transform: translateY(-1px); }
.hub-tile .emo { font-size: 20px; width: auto; }
.hub-tile b { font-size: 12.5px; }
.hub-tile small { font-size: 11px; color: var(--graphite); }
.hub-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.hub-line { font-size: 13px; color: var(--graphite); padding: 4px 2px; }
.hub-line b { color: var(--ink); font-weight: 600; }

/* 🍅 Pomodoro page */
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.focus-card { background: var(--wash); border-radius: 20px; padding: 18px 20px; }
.focus-card h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.timer-card { grid-row: span 2; display: flex; flex-direction: column; align-items: center; text-align: center; background: linear-gradient(160deg, var(--wash), color-mix(in srgb, var(--accent-soft) 60%, var(--wash))); }
.focus-dial { position: relative; width: 240px; height: 240px; margin: 6px auto 8px; }
.focus-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--rule); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.mode-short .ring-fg, .mode-long .ring-fg { stroke: var(--dot-blue); }
.mode-timer .ring-fg { stroke: var(--dot-orange); }
.focus-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.focus-center .emo { font-size: 26px; width: auto; }
.focus-center b { font: 700 46px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.focus-center small { color: var(--graphite); font-size: 13px; }
.focus-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.focus-dots .fd { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.focus-dots .fd.on { background: var(--accent); }
.focus-ctrl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.focus-link { width: 100%; max-width: 360px; text-align: left; }
.focus-link .select { background: var(--paper); }
.focus-quick { justify-content: center; align-items: center; }
.focus-quick .muted-p { margin: 0 4px 0 0; }
.focus-card .fav-stat { background: var(--paper); }
.focus-log { margin-top: 10px; max-height: 220px; overflow: auto; }
.alarm-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; }
.alarm-row.off { opacity: .55; }
.alarm-row b { display: block; font-size: 13.5px; }
.alarm-row small { color: var(--graphite); font-size: 12px; }
.alarm-time { border: 0; background: none; font: 700 22px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); cursor: pointer; padding: 2px 4px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.alarm-time:hover { background: var(--hover); }
.focus-nums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 10px; }
.focus-nums .input { background: var(--paper); }

/* site-wide clock: tiny, above Settings */
.side-clock { font-size: 11.5px; color: var(--graphite); padding: 6px 18px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* toasts sit above the status bar, never on top of it */
.toasts { bottom: 46px; }

/* erase dialog */
.erase-h { font-size: 13px; margin: 16px 0 8px; }
.erase-backups { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.erase-backups .btn { justify-content: flex-start; }

/* ---------- fresher, centred pages (Favorites, Published, Settings, Archive, Bin, History, About, Reminders…) ---------- */
.view { padding: 26px 32px 70px; }
.view-inner { max-width: 880px; margin: 0 auto; }
.view-inner.wide-inner, .org .view-inner { max-width: 1180px; }
.org, .favs, .board { padding-left: 32px; padding-right: 32px; }
.org > *, .favs > *, .board > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.view-inner > .lede, .view > .lede, .fav-lede, .page-head .lede, .board-intro .lede {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 70%, var(--wash)), var(--wash));
  border-radius: 18px; padding: 16px 20px; color: var(--ink); opacity: .9; font-size: 14.5px; line-height: 1.6; max-width: none; margin: 0 0 22px; }
.page-head h1, .view h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin: 0 0 12px; }
.section-title { margin-top: 30px; margin-bottom: 10px; }
.view .setting { background: var(--wash); border: 0; border-radius: 14px; padding: 14px 18px; margin-bottom: 8px; }
.view .setting:hover { background: color-mix(in srgb, var(--hover) 60%, var(--wash)); }
.view .setting .select, .view .setting .seg { background: var(--paper); }
.view .card { border-radius: 18px; }
.view .list-item:not(.bin-item) { background: var(--wash); border: 0; border-radius: 14px; padding: 14px 18px; margin-bottom: 8px; }
.hist-line { border-bottom: 0; background: var(--wash); border-radius: 12px; padding: 2px 8px 2px 14px; margin-bottom: 4px; }
.changelog { background: var(--wash); border-radius: 18px; padding: 6px 20px 16px; }
@media (max-width: 820px) { .view, .org, .favs, .board { padding-left: 16px; padding-right: 16px; } .focus-dial { width: 200px; height: 200px; } .focus-center b { font-size: 38px; } }
.focus-card .checkrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 13.5px; }
.view .empty { margin: 30px auto; align-items: center; text-align: center; }
.view .empty p { max-width: 46ch; }
.sticky-fab { bottom: 70px; }
.pop { z-index: 90; }

/* ===================== 3.18 ===================== */
/* top bar: Publish is the last thing on the right */
.top-tools .btn.publish { margin-left: 2px; }
/* ⚡ quick sticky capture + a compact wall */
.quick-bar { display: flex; align-items: flex-start; gap: 6px; background: var(--stk); border-radius: 14px; padding: 8px 8px 8px 12px; margin: 0 0 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.quick-bar > .emo { font-size: 16px; margin-top: 6px; }
.stk-quick { flex: 1; border: 0; background: none; outline: none; resize: none; font: 15px/1.5 var(--editor-font); color: var(--ink); padding: 5px 0; min-height: 32px; max-height: 200px; }
.stk-quick::placeholder { color: var(--ink); opacity: .45; }
.quick-bar .stk-btn { opacity: .8; margin-top: 2px; }
.quick-bar .btn { margin-top: 2px; }
.quick-dot .dot-c { width: 14px; height: 14px; }
.wall { display: block; columns: 200px; column-gap: 10px; margin-bottom: 18px; }
.wall .stk { break-inside: avoid; margin: 0 0 10px; min-height: 0; padding: 6px 10px 6px; border-radius: 12px; display: flex; }
.wall .stk:hover { transform: none; box-shadow: 0 6px 16px -10px rgba(40, 40, 20, .35); }
.stk .stk-top { min-height: 24px; margin-bottom: 0; }
.stk .stk-btn { width: 24px; height: 24px; }
.stk-text { font-size: 14px; line-height: 1.5; min-height: 22px; }
.stk-foot { padding-top: 2px; font-size: 10.5px; }
.stk-flag { font: 11px/1 var(--emoji); opacity: .8; }
.stk.dragging { transform: rotate(-1deg); }
/* 📌 pinned list: open + one-click copy + float switch */
.pins-panel { min-width: 280px; max-width: 340px; }
.pin-row { display: flex; align-items: center; gap: 4px; border-radius: 10px; margin-bottom: 2px; }
.pin-row.tinted { background: color-mix(in srgb, var(--stk) 70%, transparent); }
.pin-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 10px; text-align: left; color: var(--ink); cursor: pointer; }
.pin-open:hover { background: var(--wash); }
.pin-open b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-open small { display: block; color: var(--graphite); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-copy { flex: none; border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; color: var(--graphite); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pin-copy:hover { background: var(--accent-soft); color: var(--accent-ink); }
.pin-float-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--rule); margin-top: 6px; padding: 10px 6px 4px; font-size: 13px; cursor: pointer; }
.pins-wrap .pins-pop { padding: 10px; }
/* ⌨️ emoji keyboard */
.emoji-pop.keyboard { width: 360px; }
.emoji-pop.keyboard .emoji-grid { grid-template-columns: repeat(9, 1fr); max-height: 260px; }

/* ===================== 3.19 ===================== */
/* emoji and colours: full strength everywhere (menus, rails, pickers) */
.emo, .mi-emoji, .emoji-cat, .rem-mark, .stk-flag, .mini-ico, .rail-btn .emo, .dock-emoji, .sc-emoji { opacity: 1 !important; filter: none !important; }
.emoji-cat { opacity: .9 !important; }
.emoji-cat.on, .emoji-cat:hover { opacity: 1 !important; }
.mi-emoji { font-size: 16px; }
.mi svg.i { color: var(--ink); opacity: .75; }
.swatch { background: var(--dot); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch.on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch.sm { width: 22px; height: 22px; }
.color-pop .swatch { width: 28px; height: 28px; }
.cdot { box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.dot-c { background: var(--dot) !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18) !important; }

/* clickable note names (reminders, alarms, timers, notifications) */
.note-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px 2px 7px; font: 600 12px/1.6 var(--sans); cursor: pointer; max-width: 100%; }
.note-link span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-link:hover { box-shadow: 0 0 0 1.5px var(--accent); }
.nl-arrow { opacity: .7; }
.nl-none { color: var(--graphite); font-size: 12px; }

/* 💬 comment beside labels */
.lbl-comment { display: flex; gap: 6px; align-items: flex-start; background: var(--wash); border-radius: 10px; padding: 8px 10px; margin: 0 2px 8px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.lbl-c { font: 10px/1 var(--emoji); }
.pin-off { font: 13px/1 var(--emoji); }

/* 🗄️ archive meter */
.arc-tools { display: flex; align-items: center; gap: 10px; margin: -6px 0 16px; }
.arc-meter { width: 160px; height: 6px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.arc-meter-bar { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.arc-tools small { color: var(--graphite); font-variant-numeric: tabular-nums; }

/* 🗂️ one tab at a time */
.tab-lock { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tab-lock-card { width: min(460px, 100%); background: var(--pop); border-radius: 22px; padding: 28px 26px 24px; box-shadow: var(--shadow); text-align: center; }
.tab-lock-ico { font: 40px/1 var(--emoji); margin-bottom: 10px; }
.tab-lock-card h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; }
.tab-lock-card p { color: var(--graphite); margin: 0 0 18px; font-size: 14px; line-height: 1.55; }
.tab-lock-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tab-lock-hint { margin-top: 14px !important; font-size: 13px !important; }

/* ◎ floating widget (AssistiveTouch style) */
.assist { position: fixed; z-index: 40; width: 54px; height: 54px; }
.assist-dot { position: relative; width: 54px; height: 54px; border-radius: 16px; border: 0; padding: 0; cursor: pointer; touch-action: none;
  background: rgba(28, 28, 30, .55); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45), inset 0 0 0 .5px rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center;
  opacity: .62; transition: opacity .25s, transform .15s; }
.assist-dot:hover, .assist.open .assist-dot, .assist.dragging .assist-dot, .assist-dot:focus-visible { opacity: 1; }
.assist.dragging .assist-dot { transform: scale(1.08); cursor: grabbing; }
.assist-ring { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .28); display: flex; align-items: center; justify-content: center; }
.assist-core { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.assist-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 10px/18px var(--sans); padding: 0 5px; text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.assist-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .12); }
.assist-panel { position: absolute; top: 0; width: min(340px, calc(100vw - 24px)); max-height: min(540px, calc(100vh - 80px)); display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--pop) 96%, transparent); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-radius: 22px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .5), inset 0 0 0 .5px rgba(255, 255, 255, .35); overflow: hidden; }
.assist-panel.anim { animation: assistIn .18s ease-out; }
.assist-panel.from-right { right: 64px; transform-origin: right top; }
.assist-panel.from-left { left: 64px; transform-origin: left top; }
.assist-panel.upward { top: auto; bottom: 0; transform-origin: right bottom; }
@keyframes assistIn { from { opacity: 0; transform: scale(.92); } }
.assist-head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px 10px; }
.assist-tabs { display: flex; flex: 1; gap: 2px; background: var(--wash); border-radius: 12px; padding: 3px; }
.assist-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; border-radius: 9px; padding: 6px 4px; font: 600 11.5px var(--sans); color: var(--graphite); cursor: pointer; white-space: nowrap; }
.assist-tabs button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.assist-n { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 9.5px; padding: 0 5px; line-height: 15px; }
.assist-body { padding: 6px 12px 14px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.assist-body::-webkit-scrollbar { display: none; }
.assist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.assist-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; border: 0; border-radius: 16px; background: var(--wash); cursor: pointer; color: var(--ink); transition: transform .12s, background .12s; }
.assist-tile:hover { background: var(--accent-soft); transform: translateY(-1px); }
.assist-tile .emo { font-size: 24px; width: auto; }
.assist-tile small { font: 600 11px/1.2 var(--sans); text-align: center; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pins-panel.compact { min-width: 0; max-width: none; }
.pins-panel.compact .pin-float-row { margin-top: 8px; }
.assist-qbar { display: flex; flex-direction: column; gap: 6px; background: var(--stk-yellow); border-radius: 14px; padding: 8px 10px; margin-bottom: 10px; }
.assist-quick { border: 0; background: none; outline: none; resize: none; font: 14.5px/1.5 var(--editor-font); color: var(--ink); width: 100%; }
.assist-qacts { display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.assist-empty { color: var(--graphite); font-size: 12.5px; text-align: center; margin: 6px 0; }
.held { display: flex; align-items: flex-start; gap: 6px; background: var(--wash); border-radius: 12px; padding: 7px 6px 7px 10px; margin-bottom: 6px; }
.held-text { flex: 1; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 84px; overflow: hidden; }
.held-acts { display: flex; flex: none; }
.held-acts .iconbtn { width: 26px; height: 26px; }
.assist-saveall { width: 100%; margin-top: 4px; }
.pin-limit-list { max-height: 300px; overflow: auto; }
.pin-limit-list .pin-row { padding: 4px 4px 4px 8px; background: var(--wash); margin-bottom: 4px; }
@media (max-width: 520px) { .assist-panel.from-right, .assist-panel.from-left { position: fixed; left: 12px; right: 12px; top: auto; bottom: 16px; width: auto; } }

/* ⏱️ Focus & Reminders — compact cockpit */
.fx { padding-top: 10px; }
.fx-inner { max-width: 1180px; margin: 0 auto; }
.fx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fx-kpi { display: flex; align-items: center; gap: 12px; background: var(--wash); border-radius: 14px; padding: 12px 14px; }
.fx-kpi .emo { font-size: 20px; width: auto; }
.fx-kpi b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fx-kpi small { color: var(--graphite); font-size: 11.5px; }
.fx-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.fx-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fx-card { background: var(--wash); border-radius: 16px; padding: 14px 16px; }
.fx-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.fx-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.005em; }
.fx-filter button { padding: 4px 9px; font-size: 12px; }
.fx-modes { width: 100%; display: flex; }
.fx-modes button { flex: 1; font-size: 12.5px; padding: 6px 4px; }
.fx-modes button[disabled] { opacity: .5; cursor: default; }
.fx-timer-body { display: flex; align-items: center; gap: 16px; margin: 14px 0 10px; }
.fx-dial { position: relative; width: 168px; height: 168px; flex: none; }
.fx-dial .focus-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-dial .ring-bg { fill: none; stroke: var(--hover); stroke-width: 9; }
.fx-dial .ring-fg { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.fx-dial.mode-short .ring-fg, .fx-dial.mode-long .ring-fg { stroke: var(--dot-blue); }
.fx-dial.mode-timer .ring-fg { stroke: var(--dot-orange); }
.fx-dial-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fx-time { font: 700 34px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fx-dial-c small { color: var(--graphite); font-size: 11.5px; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.fx-timer-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fx-ctrls { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-ctrls .btn { min-height: 32px; padding: 5px 12px; }
.fx-ctrls .btn:not(.primary) { background: var(--paper); }
.fx-start { width: 100%; }
.fx-dots { display: flex; gap: 5px; }
.fx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hover); }
.fx-dot.on { background: var(--accent); }
.fx-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--graphite); }
.fx-field .select, .fx-field .input { background: var(--paper); padding: 6px 9px; font-size: 13px; font-weight: 400; color: var(--ink); }
.fx-quick { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 10px; }
.fx-quick .chip { background: var(--paper); padding: 3px 10px; font-size: 12px; }
.fx-k { font-size: 11.5px; font-weight: 600; color: var(--graphite); margin-right: 4px; }
.fx-day { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--graphite); margin: 12px 0 4px; }
.fx-day:first-of-type { margin-top: 4px; }
.fx-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; background: var(--paper); margin-bottom: 4px; }
.fx-row.off { opacity: .6; }
.fx-row.unread { box-shadow: inset 3px 0 0 var(--accent); }
.fx-row time { width: 64px; flex: none; font: 600 12px var(--sans); color: var(--graphite); font-variant-numeric: tabular-nums; }
.fx-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.fx-row-main b { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row-main small { color: var(--graphite); font-size: 11.5px; }
.fx-row-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.fx-row-acts .iconbtn { width: 26px; height: 26px; }
.fx-dotmark { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.fx-row:not(.unread) .fx-dotmark { background: var(--rule); }
.fx-empty { color: var(--graphite); font-size: 13px; margin: 4px 0 2px; }
.fx-settings summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.fx-settings summary::-webkit-details-marker { display: none; }
.fx-settings summary::after { content: '▸'; float: right; color: var(--graphite); transition: transform .15s; }
.fx-settings[open] summary::after { transform: rotate(90deg); }
.fx-set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.fx-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; }
.switch.sm { width: 32px; height: 18px; }
.switch.sm::after { width: 12px; height: 12px; }
.switch.sm:checked::after { transform: translateX(14px); }
.fx-open { display: flex; }
@media (max-width: 980px) { .fx-cols { grid-template-columns: 1fr; } .fx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fx-timer-body { flex-direction: column; } .fx-dial { width: 150px; height: 150px; } }
/* pop-ups sit at the top right, under the top bar — never over the bottom buttons or the status bar */
.toasts { top: 104px; bottom: auto !important; left: auto; right: 72px; transform: none; align-items: flex-end; }
.toast { max-width: min(460px, calc(100vw - 32px)); }
@media (max-width: 820px) { .toasts { right: 12px; left: 12px; align-items: stretch; } }
/* pop-ups: a slim line over the status bar at the bottom centre — the status bar only shows text,
   so no button is ever covered; two pop-ups sit side by side instead of stacking upward */
.toasts { top: auto !important; bottom: 6px !important; left: 50% !important; right: auto !important; transform: translateX(-50%) !important;
  flex-direction: row !important; flex-wrap: nowrap; align-items: flex-end !important; justify-content: center; gap: 8px; width: max-content; max-width: calc(100vw - 340px); }
.toast { padding: 6px 12px 6px 14px; font-size: 12.5px; line-height: 1.35; max-width: 460px; min-height: 30px; }
.toast .toast-act { font-size: 12.5px; }
@media (max-width: 820px) { .toasts { max-width: calc(100vw - 16px); flex-direction: column !important; } }

/* ===================== 3.20 ===================== */
/* note rail: macOS-Dock magnify */
.rail-btn { --mag: 1; transform: scale(var(--mag)); transform-origin: 100% 50%; transition: transform .1s ease-out, margin .1s ease-out; margin: calc((var(--mag) - 1) * 9px) 0; }
@media (hover: none) { .rail-btn { --mag: 1 !important; } }
/* floating widget: free placement + opacity */
.assist-dot { opacity: var(--assist-op, .62); }
.assist-op { display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; border-top: 1px solid var(--rule); font: 600 11.5px var(--sans); color: var(--graphite); }
.assist-op input { flex: 1; accent-color: var(--accent); }
.assist-opv { width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.assist-trayacts { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.assist-cap { font: 600 11.5px var(--sans); color: var(--graphite); font-variant-numeric: tabular-nums; }
.assist-cap.full { color: var(--danger); }
/* sticky wall */
.wall-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--wash); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.wall-cap { display: flex; align-items: center; gap: 8px; }
.wall-cap b { font-size: 14px; font-variant-numeric: tabular-nums; }
.wall-cap small { color: var(--graphite); font-size: 11.5px; }
.wall-cap.full b, .wall-cap.full small { color: var(--danger); }
.wall-meter { width: 110px; height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.wall-meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.wall-cap.full .wall-meter span { background: var(--danger); }
.wall-mix { display: flex; width: 120px; height: 10px; border-radius: 999px; overflow: hidden; gap: 1px; }
.wall-mix span { background: var(--dot); min-width: 3px; }
.wall-today { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; }
.wall-sort { width: auto; padding: 5px 10px; font-size: 13px; background: var(--paper); }
.danger-text { color: var(--danger) !important; }
.wall-bulk { position: sticky; top: 0; z-index: 5; }
.wall-bulk .btn[disabled] { opacity: .45; }
.wall-filter { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quick-bar.full { opacity: .85; }
.stk.selectable { cursor: pointer; }
.stk.selectable .stk-text { pointer-events: none; }
.stk.selected { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 16px -10px rgba(40, 40, 20, .35); }
.stk-check { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--ink); opacity: .55; display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--sans); flex: none; margin-right: 2px; }
.stk-check.on { background: var(--accent); color: var(--on-accent); box-shadow: none; opacity: 1; }
.stk .stk-emo { font-size: 15px; width: auto; }
.stk .lbl-badge { margin-left: 2px; }
/* 📊 Insights */
.ins { margin-bottom: 18px; }
.ins-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ins-kpi { display: flex; gap: 10px; align-items: center; background: var(--wash); border-radius: 14px; padding: 12px; min-width: 0; }
.ins-kpi .emo { font-size: 20px; width: auto; }
.ins-kpi b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ins-kpi small { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.ins-kpi em { display: block; color: var(--graphite); font-size: 11px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.ins-card { background: var(--wash); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.ins-card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; }
.ins-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.ins-bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.ins-bar { width: 100%; max-width: 26px; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 6px 6px 3px 3px; }
.ins-bar.today { background: var(--accent); }
.ins-bar-wrap small { color: var(--graphite); font-size: 10.5px; }
.ins-pans { display: flex; flex-direction: column; gap: 8px; }
.ins-pan { display: grid; grid-template-columns: minmax(0, 1fr) 1.2fr; grid-template-rows: auto auto; gap: 2px 10px; border: 0; background: var(--paper); border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--ink); }
.ins-pan:hover { box-shadow: 0 0 0 1.5px var(--accent); }
.ins-pan-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ins-pan-bar { align-self: center; height: 8px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.ins-pan-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ins-pan-bar span[class^="c-"] { background: var(--dot); }
.ins-pan small { grid-column: 1 / -1; color: var(--graphite); font-size: 11.5px; }
.ins-foot { margin: 12px 0 0; font-size: 12.5px; color: var(--graphite); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ins-split { margin-top: 6px !important; }
.dl-name .input { font-family: var(--sans); }
.dl-ext { align-self: center; color: var(--graphite); font-weight: 600; }
@media (max-width: 1100px) { .ins-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ins-row { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ins-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stk.selected, .stk.selected:hover { box-shadow: 0 0 0 2.5px var(--accent), 0 6px 16px -10px rgba(40, 40, 20, .35) !important; }

/* ===================== 4.0 launch ===================== */
/* first paint: a quiet skeleton in the app's own colours (no "Opening…" text, no flash) */
.skel { position: fixed; inset: 0; display: flex; background: var(--paper); }
.skel-side { width: 264px; background: var(--side); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.skel-side i, .skel-main i { display: block; height: 14px; border-radius: 7px; background: var(--hover); opacity: .55; }
.skel-side i:first-child { width: 60%; height: 22px; }
.skel-side i:nth-child(2) { height: 34px; border-radius: 10px; }
.skel-main { flex: 1; padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.skel-main i:first-child { width: 220px; height: 26px; }
.skel-main i:last-child { width: 46%; }
@media (max-width: 820px) { .skel-side { display: none; } }
.seo-intro { max-width: 760px; margin: 40px auto; padding: 0 24px; font-size: 16px; line-height: 1.6; color: var(--ink); }
html.js .seo-intro { display: none; }
html:not(.js) .skel { display: none; }
.about-ver { color: var(--graphite); margin: 18px 0 0; font-size: 13px; }
.about-ver a { color: var(--accent-ink); }
/* floating widget footer: on/off + opacity on every section */
.assist-foot { border-top: 1px solid var(--rule); }
.assist-foot .assist-op { border-top: 0; padding-top: 4px; }
.assist-en { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; font: 600 12px var(--sans); color: var(--ink); cursor: pointer; }
