/* Pane — Paper & Ink. Full replacement; no remote fonts or assets.
   Pantone-referenced color families; custom digital values for screen contrast.
   Keep ROW=8, GAP=16 in app.js. The internal "white" token means Oat. */
:root {
  --ground: #182631;
  --ground-2: #1c2b37;
  --panel: #223440;
  --panel-2: #293e4b;
  --line: #3a4e5a;
  --line-strong: #6c8491;
  --ink: #e8e1d4;
  --ink-2: #c6cdc9;
  --muted: #a6b5ba;
  --accent: #b5cbd5;
  --accent-ink: #1c2b37;
  --danger: #e4a5a0;
  --saved: #a8b79b;
  --shadow: 0 2px 5px #0d1b2414;
  --shadow-lift: 0 8px 24px #0d1b2433;
  --radius: 8px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-tape: var(--font-ui);
  --bar-h: 82px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #e9e3d7;
  --ground-2: #f0eadd;
  --panel: #f4eedf;
  --panel-2: #e8e2d4;
  --line: #d0c9ba;
  --line-strong: #8a999b;
  --ink: #283b46;
  --ink-2: #465963;
  --muted: #59686a;
  --accent: #3e5c6c;
  --accent-ink: #f4eedf;
  --danger: #9e534c;
  --saved: #667b5b;
  --shadow: 0 2px 5px #4f483308;
  --shadow-lift: 0 8px 24px #4f483312;
  color-scheme: light;
}

/* Seven persistent data values; neutral paper, small color markers. */
[data-color="white"]  { --marker: #cabea8; }
[data-color="yellow"] { --marker: #c2ad75; }
[data-color="orange"] { --marker: #c69578; }
[data-color="blue"]   { --marker: #8caebd; }
[data-color="green"]  { --marker: #a0b19b; }
[data-color="red"]    { --marker: #c79898; }
[data-color="violet"] { --marker: #b0a1b8; }
:root[data-theme="light"] [data-color="white"]  { --marker: #847963; }
:root[data-theme="light"] [data-color="yellow"] { --marker: #8b7138; }
:root[data-theme="light"] [data-color="orange"] { --marker: #a46d4f; }
:root[data-theme="light"] [data-color="blue"]   { --marker: #54778b; }
:root[data-theme="light"] [data-color="green"]  { --marker: #6c8064; }
:root[data-theme="light"] [data-color="red"]    { --marker: #a46d6c; }
:root[data-theme="light"] [data-color="violet"] { --marker: #8c7798; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scrollbar-gutter: stable; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 14px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
input, textarea { caret-color: var(--accent); }
input::selection, textarea::selection, ::selection { background: var(--accent); color: var(--accent-ink); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .knob { fill: var(--ground-2); }
button svg, a svg { pointer-events: none; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; min-height: 20px; padding: 1px 5px;
  border: 1px solid var(--line); border-radius: 4px;
  font: 500 11px/1.2 var(--font-ui); color: var(--muted);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code { font: 12px/1.6 "Cascadia Mono", Consolas, monospace; color: var(--ink-2); overflow-wrap: anywhere; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* One calm toolbar. Navigation stays visibly separate from the search field. */
.bar {
  position: sticky; top: 0; z-index: 20;
  min-height: var(--bar-h); display: flex; align-items: center; gap: 24px;
  padding: 16px 32px; background: var(--ground-2);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand::before {
  content: ""; display: block; width: 22px; height: 26px;
  border: 1.5px solid currentColor; border-radius: 3px;
  background: linear-gradient(90deg, transparent 5px, currentColor 5px, currentColor 6.5px, transparent 6.5px);
}
.tape-mark { font-size: 23px; line-height: 1; font-weight: 600; letter-spacing: -.055em; }
.search {
  display: flex; align-items: center; gap: 9px;
  flex: 1 1 220px; min-width: 130px; max-width: 420px;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); background: var(--ground);
  transition: border-color 150ms, background 150ms;
}
.search:focus-within { border-color: var(--line-strong); background: var(--panel); }
.search svg { width: 17px; height: 17px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.search-count:empty { display: none; }
.views { align-self: stretch; display: flex; align-items: stretch; gap: 18px; }
.view {
  position: relative; display: flex; align-items: center; gap: 7px;
  padding: 0 2px; border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.view::after { content: ""; position: absolute; bottom: -17px; left: 0; right: 0; height: 2px; background: transparent; }
.view:hover, .view.is-on { color: var(--ink); }
.view.is-on::after { background: var(--accent); }
.count { min-width: 19px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-variant-numeric: tabular-nums; background: var(--panel-2); color: var(--muted); }
.view.is-on .count { color: var(--ink-2); }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.save-state { display: flex; align-items: center; gap: 7px; margin-right: 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.save-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--saved); flex: none; }
.save-state[data-state="saving"]::before { background: var(--accent); }
.save-state[data-state="error"] { color: var(--danger); max-width: 190px; white-space: normal; line-height: 1.4; }
.save-state[data-state="error"]::before { background: var(--danger); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 13px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: transparent; color: var(--ink); font-size: 13px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background 150ms, border-color 150ms;
}
.btn:hover { background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.primary kbd { color: inherit; border-color: currentColor; opacity: .65; }
.btn.icon { width: 36px; min-height: 38px; padding: 0; border-color: transparent; color: var(--ink-2); }
.btn.icon:hover { color: var(--ink); background: var(--panel-2); }
#btn-new { margin-right: 7px; }

/* Measured grid: unchanged 8px rows and a script-managed vertical gutter. */
.wall { max-width: 1920px; margin: 0 auto; padding: 28px 32px 80px; min-height: calc(100vh - var(--bar-h)); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 8px; column-gap: 20px; row-gap: 0; align-items: start;
}
.note {
  grid-row-end: span 26; position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 180ms, box-shadow 180ms, opacity 180ms, transform 180ms;
}
.note:hover { border-color: var(--line-strong); }
.note:focus-within, .note.is-focused { z-index: 3; border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong); }
.note:has(.swatches:not([hidden])) { z-index: 5; }
.note.is-leaving { opacity: 0; transform: translateY(6px); }
.note.is-shelved { background: var(--ground-2); }
.tape { display: flex; align-items: center; gap: 10px; min-height: 55px; padding: 15px 20px 4px; }
.tape::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--marker); flex: none; }
.tape .title {
  flex: 1; min-width: 0; width: 100%; height: 30px; padding: 0;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.015em; text-overflow: ellipsis;
}
.tape .title:focus { text-overflow: clip; }
.tape .title::placeholder { color: var(--ink-2); opacity: 1; }
.tape .title:focus-visible { outline: none; }
.tape kbd { margin-left: auto; flex: none; }
.tools {
  position: absolute; right: 12px; bottom: 10px;
  display: flex; align-items: center; gap: 1px; color: var(--muted);
}
.tools button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 4px; background: transparent; color: inherit;
}
.tools button:hover { background: var(--panel-2); color: var(--ink); }
.tools svg { width: 16px; height: 16px; }
.tools .t-color { color: var(--marker); }
.note.is-pinned .t-pin { color: var(--accent); }
.note.is-pinned .t-pin svg { fill: currentColor; fill-opacity: .16; }
.tools .t-restore { display: none; }
.note.is-shelved .tools .t-shelve { display: none; }
.note.is-shelved .tools .t-restore { display: inline-flex; }
.swatches {
  position: absolute; z-index: 6; right: 12px; bottom: 48px;
  display: flex; gap: 6px; padding: 10px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--ground-2); box-shadow: var(--shadow-lift);
}
.swatch { width: 25px; height: 25px; padding: 0; border: 3px solid var(--ground-2); outline: 1px solid transparent; border-radius: 50%; background: var(--marker); }
.swatch:hover { outline-color: var(--muted); }
.swatch.is-on { outline: 2px solid var(--accent); outline-offset: 1px; }
.note .body {
  display: block; width: 100%; margin: 0; padding: 9px 20px 16px;
  min-height: 96px; max-height: min(52vh, 440px);
  border: 0; outline: 0; background: transparent; resize: none; overflow-y: auto;
  font: 14px/1.7 var(--font-ui); letter-spacing: .002em; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
}
.note .body:focus { color: var(--ink); }
.note .body::placeholder { color: var(--muted); opacity: 1; }
.foot {
  display: flex; align-items: center; flex-wrap: wrap; column-gap: 8px; row-gap: 2px;
  min-height: 50px; margin: 0 20px; padding: 10px 90px 13px 0;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5;
}
.when { font-variant-numeric: tabular-nums; }
.pinflag { display: none; align-items: center; gap: 3px; color: var(--ink-2); font-size: 10px; }
.pinflag svg { width: 10px; height: 10px; }
.note.is-pinned .pinflag { display: inline-flex; }
.note.capture { background: var(--ground-2); border-color: var(--line-strong); box-shadow: none; }
.note.capture .tape::before { width: 14px; height: 14px; border-radius: 0; background: linear-gradient(var(--accent),var(--accent)) center / 1.5px 12px no-repeat, linear-gradient(var(--accent),var(--accent)) center / 12px 1.5px no-repeat; }
.note.capture .tape .title { font-weight: 500; }
.note.capture .body { min-height: 135px; padding-top: 8px; padding-bottom: 24px; }
.note.capture:focus-within { border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 1px var(--accent); }
.empty { max-width: 430px; margin: 45px auto 0; padding: 20px; color: var(--muted); text-align: center; }
.empty h2 { margin: 0 0 8px; color: var(--ink); font-size: 19px; line-height: 1.4; font-weight: 500; letter-spacing: -.025em; }
.empty p { margin: 0 0 18px; }

/* Transient UI uses the same paper and ink. */
.drop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(3px); pointer-events: none; }
.drop-card { display: flex; align-items: center; gap: 12px; max-width: 480px; padding: 26px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lift); }
.drop-card svg { width: 24px; height: 24px; color: var(--accent); }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 16px; max-width: 560px; padding: 12px 14px 12px 18px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lift); font-size: 13px; pointer-events: auto; animation: rise 180ms ease-out; }
.toast button { flex: none; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.toast.out { opacity: 0; transition: opacity 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dlg { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lift); }
.dlg::backdrop { background: #101f2b99; backdrop-filter: blur(3px); }
.dlg-body { display: flex; flex-direction: column; gap: 24px; margin: 0; padding: 26px 28px 30px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dlg h2 { margin: 0; font-size: 23px; line-height: 1.3; font-weight: 500; letter-spacing: -.035em; }
.dlg h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.dlg section { padding-top: 22px; border-top: 1px solid var(--line); }
.dlg section:first-of-type { padding-top: 0; border-top: 0; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.row + .hint { margin-top: 12px; }
.hint:empty { display: none; }
.hint.ok { color: var(--ink-2); }
.hint.err { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { color: var(--ink-2); font-size: 12px; font-weight: 500; }
.field input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--ground-2); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.radios { flex-direction: column; align-items: flex-start; gap: 10px; }
.row.radios label { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 13px; }
input[type="radio"] { accent-color: var(--accent); }
.adv { margin-top: 18px; }
.adv summary { color: var(--ink-2); cursor: pointer; font-size: 13px; font-weight: 500; }
.adv p { margin-top: 12px; }
.keys { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.keys div { display: flex; align-items: center; gap: 14px; }
.keys dt { min-width: 80px; }
.keys dd { margin: 0; color: var(--ink-2); font-size: 12px; }

/* Touch tools stay visible; smaller windows reflow instead of hiding actions. */
@media (max-width: 1190px) {
  .bar { gap: 18px; padding-right: 24px; padding-left: 24px; }
  .save-state { margin-right: 7px; }
  #btn-new kbd { display: none; }
  .wall { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 1040px) {
  :root { --bar-h: 126px; }
  .bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 20px; min-height: var(--bar-h); padding: 14px 24px; }
  .brand { grid-area: 1 / 1; }
  .bar-actions { grid-area: 1 / 2; justify-self: end; }
  .views { grid-area: 2 / 1; min-height: 36px; }
  .view::after { bottom: -14px; }
  .search { grid-area: 2 / 2; width: 100%; max-width: none; height: 36px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
  html { scroll-padding-top: 152px; }
}
@media (max-width: 640px) {
  .bar { padding: 12px 16px; gap: 12px 18px; }
  .brand { gap: 8px; }
  .brand::before { width: 18px; height: 22px; }
  .tape-mark { font-size: 22px; }
  .bar-actions { gap: 1px; }
  .save-state { display: none; }
  .save-state[data-state="error"] { position: fixed; display: flex; left: 16px; right: 16px; bottom: 16px; z-index: 30; max-width: none; margin: 0; padding: 12px 14px; border: 1px solid var(--danger); border-radius: 6px; background: var(--panel); box-shadow: var(--shadow-lift); font-size: 12px; }
  #btn-new { margin-right: 3px; width: 36px; padding: 0; }
  #btn-new span { display: none; }
  .btn.icon { width: 34px; }
  .views { gap: 14px; }
  .search { flex: 1 1 110px; min-width: 110px; padding: 0 9px; gap: 7px; }
  .search kbd { display: none; }
  .search-count { font-size: 10px; }
  .wall { padding: 20px 16px 70px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tape { padding-right: 18px; padding-left: 18px; }
  .note .body { padding-right: 18px; padding-left: 18px; max-height: 55vh; }
  .note.capture .body { min-height: 100px; }
  .foot { margin-right: 18px; margin-left: 18px; min-height: 58px; padding-right: 112px; }
  .tools { right: 10px; bottom: 8px; gap: 1px; }
  .tools button { width: 36px; height: 38px; }
  .tools svg { width: 17px; height: 17px; }
  .swatches { bottom: 54px; right: 12px; }
  .swatch { width: 29px; height: 29px; }
  .dlg-body { padding: 20px; gap: 20px; }
  .dlg h2 { font-size: 21px; }
  .dlg .btn { white-space: normal; text-align: left; }
  .toast { gap: 10px; padding: 12px; }
}
@media (forced-colors: active) {
  .note, .search, .btn, .dlg { border-color: CanvasText; }
  .view.is-on::after, .tape::before { background: Highlight; }
  .swatch.is-on { outline-color: Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Folio — Ryan's selected editorial direction, with UFO engraving.
   Append to Paper & Ink's complete contract-compatible foundation. */
:root { --radius: 5px; --bar-h: 88px; --font-editorial: Georgia, "Times New Roman", serif; }
body { font-size: 15px; }
.bar { min-height: var(--bar-h); gap: 24px; padding: 20px 38px; }
.brand { gap: 14px; }
.brand::before { width: 25px; height: 34px; border-radius: 2px; }
.tape-mark { font: 400 34px/1 var(--font-editorial); letter-spacing: -.045em; }
.search { height: 46px; max-width: 430px; border-radius: 5px; }
.search input { font-size: 14px; }
.views { gap: 24px; }
.view { font-size: 14px; }
.view::after { bottom: -21px; }
.count { font-size: 12px; }
.btn { min-height: 44px; font-size: 14px; border-radius: 5px; }
.btn.icon { min-height: 44px; width: 36px; }
.save-state { font-size: 12px; }
.wall { padding: 28px 28px 72px; }
.grid { column-gap: 18px; }
.note { box-shadow: 0 1px 3px #283b4608; }
.tape { gap: 12px; min-height: 64px; padding: 17px 22px 5px; }
.tape::before { width: 5px; height: 23px; border-radius: 2px; }
.tape .title { height: 35px; font: 400 22px/1.3 var(--font-editorial); letter-spacing: -.035em; }
.tape .title::placeholder { color: var(--ink); }
.note .body { padding: 8px 24px 18px; min-height: 100px; max-height: 450px; font: 16px/1.66 var(--font-ui); letter-spacing: 0; }
.foot { min-height: 52px; margin: 0 24px; padding: 12px 96px 14px 0; font-size: 11.5px; }
.tools { right: 12px; bottom: 12px; gap: 2px; }
.tools button { width: 30px; height: 30px; }
.tools svg { width: 16px; height: 16px; }
.note.is-pinned .title { padding-right: 24px; }
.pinflag { position: absolute; top: 24px; right: 21px; display: none; width: 18px; height: 18px; overflow: hidden; font-size: 0; color: var(--marker); }
.pinflag svg { width: 16px; height: 16px; flex: none; }
.note.capture { background: var(--panel); border-color: var(--line-strong); }
.note.capture .tape { gap: 12px; }
.note.capture .tape::before { flex: 0 0 14px; }
.note.capture .tape .title { font-weight: 400; }
.note.capture .body { min-height: 62px; padding-top: 0; padding-bottom: 8px; color: var(--muted); }
.capture-illustration { display: block; flex: none; align-self: flex-end; width: 190px; height: 94px; object-fit: contain; margin: 0 18px 10px auto; opacity: .92; pointer-events: none; user-select: none; }
:root[data-theme="dark"] .capture-illustration { filter: brightness(1.9) saturate(.55); opacity: .88; }
.dlg h2 { font-family: var(--font-editorial); font-weight: 400; }
@media (min-width: 1320px) { .grid { grid-template-columns: minmax(0, 1.14fr) repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1319px) and (min-width: 1041px) {
  .bar { padding-right: 24px; padding-left: 24px; gap: 18px; }
  .brand { gap: 10px; }
  .tape-mark { font-size: 30px; }
  .views { gap: 18px; }
}
@media (max-width: 1040px) {
  :root { --bar-h: 138px; }
  .bar { padding: 15px 24px; gap: 14px 24px; }
  .brand::before { width: 22px; height: 30px; }
  .tape-mark { font-size: 30px; }
  .views { gap: 20px; }
  .view::after { bottom: -16px; }
  .search { height: 40px; max-width: none; }
  html { scroll-padding-top: 160px; }
}
@media (max-width: 640px) {
  :root { --bar-h: 134px; }
  .bar { padding: 12px 16px; gap: 12px 18px; }
  .brand { gap: 10px; }
  .brand::before { width: 20px; height: 27px; }
  .tape-mark { font-size: 29px; }
  .bar-actions { gap: 0; }
  .btn.icon { width: 31px; min-height: 40px; }
  #btn-new { width: 34px; min-height: 40px; margin-right: 2px; }
  .views { gap: 15px; }
  .view { font-size: 13px; }
  .view::after { bottom: -13px; }
  .search { min-width: 100px; height: 38px; padding: 0 9px; }
  .search input { font-size: 13px; }
  .wall { padding: 20px 16px 70px; }
  .tape { padding-right: 18px; padding-left: 18px; }
  .tape .title { font-size: 21px; }
  .note .body { padding-right: 20px; padding-left: 20px; font-size: 15px; max-height: 55vh; }
  .note.capture .body { min-height: 62px; }
  .capture-illustration { width: 178px; height: 94px; margin-right: 16px; margin-bottom: 12px; }
  .foot { min-height: 60px; margin-right: 20px; margin-left: 20px; padding-right: 112px; }
  .tools { right: 10px; bottom: 10px; gap: 1px; }
  .tools button { width: 36px; height: 38px; }
  .tools svg { width: 17px; height: 17px; }
  .pinflag { top: 24px; right: 18px; }
}

/* ---- drag to rearrange: behaviour hooks added by Claude 2026-10-27; Chat owns how they look ---- */
.tools .t-drag { cursor: grab; }
.note[draggable="true"] { cursor: grab; }
.grid .note.is-dragging { opacity: .35; }
.grid .note.drop-before { box-shadow: 0 -4px 0 0 var(--accent); }
.grid .note.drop-after { box-shadow: 0 4px 0 0 var(--accent); }
body.is-rearranging .note .body, body.is-rearranging .note .title, body.is-rearranging .tools { pointer-events: none; }
body.is-rearranging { user-select: none; }

/* ---- snooze, checklists, history, images, labels, review, Today, quick search:
   behaviour hooks added by Claude 2026-10-28. Placeholder look only; Chat owns how these look. ---- */

/* five tools now (grip, label, snooze, pin, shelve): keep the footer text clear of them */
.foot { padding-right: 160px; }
.foot .when {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
.foot .when:hover, .foot .when:focus-visible { color: var(--ink-2); text-decoration-color: currentColor; }
.note.is-snoozed .tools .t-snooze { color: var(--accent); }

/* snooze menu: same shape as the color swatches popover */
.note:has(.snooze-menu:not([hidden])) { z-index: 5; }
.snooze-menu {
  position: absolute; z-index: 6; right: 12px; bottom: 48px; width: 290px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--ground-2); box-shadow: var(--shadow-lift);
}
.snooze-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-size: 13px; text-align: left;
}
.snooze-opt span { white-space: nowrap; }
.snooze-opt small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.snooze-opt:hover, .snooze-opt:focus-visible { background: var(--panel-2); outline: none; }
.snooze-custom { display: flex; gap: 6px; padding: 8px 4px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.snooze-pick { flex: 1; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--ground); color: var(--ink); font-size: 12px; color-scheme: inherit; }
.snooze-set { padding: 0 12px; border: 0; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

/* notes coming back, and a note opened from quick search */
.grid .note.is-woken { box-shadow: 0 0 0 2px var(--accent); }
.grid .note.is-found { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }
.note.is-daily .tape::before { background: var(--accent); }

/* checklist read view: same box as the textarea it stands in for */
.note .body-view {
  display: block; padding: 8px 24px 18px; min-height: 100px; max-height: 450px; overflow-y: auto;
  font: 16px/1.66 var(--font-ui); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; cursor: text;
}
.note .body-view:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.body-view .line:empty::before { content: "\200b"; }
.body-view .check { display: flex; align-items: flex-start; gap: 9px; padding-left: calc(var(--indent, 0) * 0.55em); }
.body-view .check input { flex: none; width: 16px; height: 16px; margin: 0.32em 0 0; accent-color: var(--accent); cursor: pointer; }
.body-view .check-text { flex: 1; min-width: 0; }
.body-view .check.is-done .check-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* pasted images */
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 14px; }
.attachment { padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--ground-2); overflow: hidden; cursor: zoom-in; line-height: 0; }
.attachment img { display: block; max-width: 100%; max-height: 160px; object-fit: contain; }
.attachments .attachment:only-child img { max-height: 240px; }
.attachment.is-missing { min-width: 120px; min-height: 48px; line-height: 1.4; }
.attachment.is-missing::after { content: "Image not found"; display: block; padding: 14px; color: var(--muted); font-size: 11px; }
.attachment.is-missing img { display: none; }
.image-dlg { width: min(1100px, calc(100vw - 32px)); }
.image-dlg h2 { font-size: 15px; font-family: var(--font-ui); overflow-wrap: anywhere; }
.image-full { display: block; max-width: 100%; max-height: calc(100dvh - 170px); margin: 0 auto; object-fit: contain; }

/* label filter row and the stale-note prompt */
.wall-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; }
.label-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 12.5px;
}
.label-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.label-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--panel-2); }
.label-chip.is-empty { opacity: .55; }
.label-chip .count { padding: 0 4px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--marker); flex: none; }
.review-nudge { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--ink-2); font-size: 13px; }
.review-nudge .btn { min-height: 34px; }
.review-nudge .btn.icon { min-height: 34px; width: 32px; }

/* settings: label names */
.label-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.label-field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--ground-2); }
.label-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; }
.label-field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="checkbox"] { accent-color: var(--accent); }
.row.radios label:has(input[type="checkbox"]) { align-items: flex-start; }
.row.radios label input[type="checkbox"] { margin-top: 4px; flex: none; }

/* history and review dialogs */
.h-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.h-controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.h-when { margin: 0; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.h-preview { margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--ground-2); max-height: 46vh; overflow: auto; }
.h-preview h3 { margin: 0 0 8px; font: 400 19px/1.3 var(--font-editorial); }
.h-preview pre { margin: 0; font: 14px/1.6 var(--font-ui); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.r-card .hint { margin: 12px 0 0; }

@media (max-width: 640px) {
  .foot { padding-right: 196px; }
  .snooze-menu { bottom: 54px; right: 10px; width: min(260px, calc(100vw - 52px)); }
  .note .body-view { padding-right: 20px; padding-left: 20px; font-size: 15px; max-height: 55vh; }
  .attachments { padding-right: 20px; padding-left: 20px; }
}

/* quick search window (search.html) */
.qs-body { margin: 0; background: var(--ground-2); overflow: hidden; }
.qs { display: flex; flex-direction: column; height: 100vh; border: 1px solid var(--line-strong); }
.qs-field { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); -webkit-app-region: drag; }
.qs-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 18px; -webkit-app-region: no-drag; }
.qs-field kbd { -webkit-app-region: no-drag; }
.qs-results { flex: 1; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.qs-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 5px; cursor: pointer; }
.qs-item[aria-selected="true"] { background: var(--panel-2); }
.qs-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.qs-snippet { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-snippet mark { background: none; color: var(--ink); font-weight: 600; }
.qs-meta { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400; white-space: nowrap; }
.qs-empty { padding: 22px 18px; color: var(--muted); font-size: 13px; }
.qs-foot { display: flex; gap: 16px; padding: 8px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

/* ---- welcome + folder picker: behaviour hooks added by Claude 2026-10-28 (shareable build).
   Placeholder look only; Chat owns how these look. ---- */
.welcome-dlg .w-vaults { display: grid; gap: 6px; margin: 8px 0 10px; }
.welcome-dlg .w-vault { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line, rgba(0,0,0,.15)); border-radius: 6px; cursor: pointer; }
.welcome-dlg .w-vault input { grid-row: span 3; }
.welcome-dlg .w-vault:has(input:checked) { border-color: currentColor; }
.welcome-dlg .w-path, .welcome-dlg .w-note { grid-column: 2; opacity: .7; overflow-wrap: anywhere; }
.welcome-dlg .w-live { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; }
.welcome-dlg .w-actions { margin-top: 14px; align-items: center; }

/* ---- note color, marks, delete, label rename, bookshelf: behaviour hooks added by Claude 2026-10-29.
   Placeholder look only; Chat owns how these look. ---- */
.swatches { top: 48px; bottom: auto; flex-direction: column; align-items: stretch; gap: 4px; width: 292px; max-width: calc(100vw - 48px); }
.swatches .look-h { margin: 4px 2px 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.swatches .look-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tint { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--swatch, transparent); }
.tint:hover { outline: 1px solid var(--muted); outline-offset: 1px; }
.tint.is-on { outline: 2px solid var(--accent); outline-offset: 2px; }
.tint-none { background: linear-gradient(135deg, transparent 46%, var(--muted) 46% 54%, transparent 54%); }
.tint-wheel { background: var(--swatch, conic-gradient(red, #ff0, lime, cyan, blue, #f0f, red)); }
.wheel-panel { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; align-items: center; padding: 6px 2px; }
.wheel-panel[hidden] { display: none; }
.wheel { position: relative; grid-row: span 2; width: 120px; height: 120px; border-radius: 50%; touch-action: none; cursor: crosshair;
  background: radial-gradient(closest-side, #fff, #fff0), conic-gradient(red, #ff0, lime, cyan, blue, #f0f, red); }
.wheel::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #000; opacity: calc(1 - var(--v, 1)); pointer-events: none; }
.wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wheel-dot { position: absolute; z-index: 1; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #0008; pointer-events: none; }
.wheel-field { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.wheel-field input[type="text"] { width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: transparent; color: var(--ink); font: 12px ui-monospace, Consolas, monospace; }
.mark-opt { display: grid; place-items: center; width: 54px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: transparent; }
.mark-opt img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mark-opt.is-on { outline: 2px solid var(--accent); outline-offset: 1px; }
.mark-none { background: linear-gradient(135deg, transparent 47%, var(--muted) 47% 53%, transparent 53%); }
.note-mark { display: block; flex: none; align-self: flex-end; width: 130px; max-height: 76px; object-fit: contain; margin: -4px 18px 4px auto; opacity: .9; pointer-events: none; user-select: none; }
.note-mark[hidden] { display: none; }
:root[data-theme="dark"] .note:not([data-tint="light"]) .note-mark, .note[data-tint="dark"] .note-mark { filter: brightness(1.9) saturate(.55); }
.note[data-tint] { border-color: color-mix(in srgb, var(--tint) 70%, #000); }
.tools .t-delete:hover { color: var(--danger); }
.btn.danger { border-color: var(--danger); background: var(--danger); color: var(--ground, #fff); }
.delete-dlg { width: min(460px, calc(100vw - 32px)); }
.delete-dlg .dlg-body > .hint { margin: 0 0 16px; }
.labels .label-rename { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); }
.labels .label-rename:hover { border-color: var(--line); color: var(--ink); }
.labels .label-rename svg { width: 16px; height: 16px; }
.label-chip.is-editing { padding-right: 6px; }
.label-chip.is-editing input { width: 9em; min-width: 0; padding: 2px 4px; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: inherit; }
.label-chip.is-editing input:focus { outline: 0; border-bottom-color: var(--accent); }
.bookshelf { display: flex; align-items: flex-end; gap: 2px; margin: 4px 0 18px; padding: 0 6px; border-bottom: 6px solid var(--line-strong); }
.bookshelf[hidden] { display: none; }
.spines { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3px; min-width: 0; flex: 0 1 auto; }
.bookend { flex: none; width: 14px; height: 120px; border: 1px solid var(--line-strong); background: var(--ground-2); }
.bookend-left { border-radius: 3px 0 0 0; }
.bookend-right { border-radius: 0 3px 0 0; }
.spine { display: flex; align-items: center; justify-content: center; width: var(--spine-w, 30px); height: 150px; padding: 10px 0; border: 1px solid var(--line-strong); border-radius: 3px 3px 0 0;
  background: var(--tint, color-mix(in srgb, var(--marker) 40%, var(--panel))); color: var(--ink); cursor: pointer; }
.spine[data-tint="light"] { color: #1f2a30; }
.spine[data-tint="dark"] { color: #f3efe6; }
.spine:hover { transform: translateY(-4px); }
.spine.is-open { transform: translateY(-10px); box-shadow: 0 0 0 2px var(--accent); }
.spine:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spine-title { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px/1 var(--font-editorial, Georgia, serif); }
:root[data-theme="dark"] .mark-opt img { filter: brightness(1.9) saturate(.55); }
/* the look menu keeps the page's own colors even on a colored note (custom properties resolve at :root) */
:root { --base-ground-2: var(--ground-2); --base-panel: var(--panel); --base-ink: var(--ink); --base-ink-2: var(--ink-2); --base-muted: var(--muted); --base-line: var(--line); --base-line-strong: var(--line-strong); }
.note[data-tint] .swatches, .note[data-tint] .snooze-menu {
  --ground-2: var(--base-ground-2); --panel: var(--base-panel); --panel-2: var(--base-panel); --ink: var(--base-ink); --ink-2: var(--base-ink-2);
  --muted: var(--base-muted); --line: var(--base-line); --line-strong: var(--base-line-strong); color: var(--ink);
}

/* ---- command bar, keyboard selection, picked notes, combine, sort, focus mode, progress, search marks:
   behaviour hooks added by Claude 2026-10-30. Placeholder look only; Chat owns how these look. ---- */
.wall-head .sort-pick { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 12.5px; }
.wall-head .sort-pick select { min-height: 30px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; }
.grid .note.is-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.grid .note.is-picked { box-shadow: 0 0 0 3px var(--accent); }
.grid .note.is-picked::before { content: "\2713"; position: absolute; top: -9px; left: -9px; z-index: 4; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #fff); font-size: 12px; }
.bulk { position: fixed; z-index: 30; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lift); }
.bulk[hidden] { display: none; }
.bulk .bulk-count { margin-right: 6px; font-size: 13px; font-weight: 600; }
.bulk select.btn { padding-right: 8px; }
.bulk [hidden] { display: none; }
.grid .note.merge-hover::after, .grid .note.merge-armed::after { content: ""; position: absolute; inset: 0; z-index: 5; border: 2px dashed var(--accent); border-radius: inherit; pointer-events: none; }
.grid .note.merge-hover::before { content: ""; position: absolute; left: 0; bottom: 0; z-index: 6; height: 4px; width: 0; background: var(--accent); animation: merge-fill 1.5s linear forwards; }
.grid .note.merge-armed::after { border-style: solid; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.grid .note.merge-armed::before { content: "Let go to combine"; position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 13px; white-space: nowrap; }
@keyframes merge-fill { to { width: 100%; } }
.view.drop-into, .label-chip.drop-into { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmd-dlg { width: min(560px, calc(100vw - 32px)); margin-top: 12vh; }
.cmd-body { gap: 6px; padding: 12px; }
.cmd-body #cmd-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--ink); font-size: 16px; }
.cmd-body #cmd-input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.cmd-for { margin: 2px 2px 0; min-height: 1em; }
.cmd-list { max-height: 52vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.cmd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; cursor: pointer; }
.cmd-item[aria-selected="true"] { background: var(--panel-2); }
.cmd-item .cmd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item .cmd-hint { color: var(--muted); font-size: 12px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-empty { padding: 10px; color: var(--muted); }
.cmd-foot { margin: 4px 2px 0; }
.focus-scrim { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--ground, #000) 78%, transparent); }
.focus-scrim[hidden] { display: none; }
.grid .note.is-focus-card { position: fixed; z-index: 41; top: 6vh; left: 50%; width: min(780px, calc(100vw - 32px)); max-height: 88vh; transform: translateX(-50%); overflow: auto; box-shadow: var(--shadow-lift); }
.grid .note.is-focus-card .body, .grid .note.is-focus-card .body-view { max-height: none; font-size: 17px; }
.note.is-focus-card .tools .t-focus { color: var(--accent); }
.foot .progress { margin-left: auto; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.foot .progress.is-complete { border-color: var(--accent); color: var(--ink); }
.foot .progress[hidden] { display: none; }
.spine { position: relative; }
.spine .spine-progress { position: absolute; bottom: 4px; left: 0; right: 0; font-size: 9px; text-align: center; opacity: .8; }
.body-view mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 2px; }
/* seven card tools no longer fit beside the footer text: they get their own row under it (Chat may redo this) */
.foot, .note .foot { padding-right: 0; padding-bottom: 46px; }
.foot .progress { margin-left: 0; }
@media (max-width: 760px) { .foot, .note .foot { padding-right: 0; padding-bottom: 52px; } }

/* combined notes: titles inside the text read like the card title; notes fade between two colors.
   Placeholder look added by Claude 2026-10-30; Chat owns it. */
.body-view .line.heading { margin: 10px 0 2px; color: var(--ink); font: 400 19px/1.3 var(--font-editorial, Georgia, serif); letter-spacing: -.02em; }
.body-view .line.heading:first-child { margin-top: 0; }
.body-view .line.divider { height: 0; margin: 10px 0; border-top: 1px solid var(--line-strong); }
.note[data-tint2] { border-color: color-mix(in srgb, var(--tint2) 60%, #000); }
.note[data-tint2="clash"][data-tint="dark"] :is(.title, .body, .body-view, .foot) { text-shadow: 0 0 3px rgba(10,16,22,.85), 0 0 1px rgba(10,16,22,.9); }
.note[data-tint2="clash"][data-tint="light"] :is(.title, .body, .body-view, .foot) { text-shadow: 0 0 3px rgba(255,252,245,.9), 0 0 1px rgba(255,252,245,.95); }

/* ---- text styles: the style bar and how styled text reads. Placeholder look added by Claude 2026-10-30; Chat owns it. ---- */
.fmt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; margin: 4px 20px 8px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.fmt-bar[hidden] { display: none; }
.fmt-bar button { min-width: 26px; height: 26px; padding: 0 5px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-2); font: 13px/1 var(--font-ui); }
.fmt-bar button:hover { background: var(--panel-2); color: var(--ink); }
.fmt-bar button mark { background: color-mix(in srgb, #e8c547 55%, transparent); color: inherit; padding: 0 2px; }
.fmt-bar button code { font: 11px ui-monospace, Consolas, monospace; }
.fmt-bar .fmt-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--line-strong); }
.body-view strong { font-weight: 700; color: var(--ink); }
.body-view mark.hl { background: color-mix(in srgb, #e8c547 45%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.body-view code { padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; font: .88em ui-monospace, Consolas, monospace; }
.body-view a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.body-view .line.bullet, .body-view .line.numbered { position: relative; padding-left: calc(18px + var(--indent, 0) * 8px); }
.body-view .line.bullet::before { content: "\2022"; position: absolute; left: calc(4px + var(--indent, 0) * 8px); color: var(--muted); }
.body-view .line.numbered::before { content: attr(data-n); position: absolute; left: calc(var(--indent, 0) * 8px); color: var(--muted); font-variant-numeric: tabular-nums; }
.body-view .line.quote { padding-left: 12px; border-left: 3px solid var(--line-strong); color: var(--ink-2); font-style: italic; }
/* spines take their height from --spine-h (a few stock sizes, set per note); bookends stand a little taller than most */
.spine { height: var(--spine-h, 150px); }
.bookend { height: 160px; }
/* Chat's wizard shelf (wizard-shelf.css) sets the shelf to display:block; keep it hidden off the Shelf tab */
.bookshelf.wizard-shelf[hidden] { display: none; }

/* created / updated dates under each title, bold so they read at a glance.
   Placeholder look added by Claude 2026-11-03; Chat owns it. */
.note .stamp { margin: 0; padding: 0 24px 2px; font: 700 12.5px/1.4 var(--font-ui); letter-spacing: .01em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.note .stamp-sep { font-weight: 400; color: var(--muted); }
.note .stamp mark { font-weight: 700; }
.note.capture .stamp { display: none; }
@media (max-width: 640px) { .note .stamp { padding-right: 20px; padding-left: 20px; } }

/* prompt dialog (Claude's placeholder; Chat owns the look) */
.prompt-dlg { width: min(760px, calc(100vw - 32px)); }
.prompt-dlg section { display: flex; flex-direction: column; gap: 14px; }
.prompt-dlg .p-row { justify-content: space-between; align-items: center; }
.p-text { width: 100%; min-height: 320px; max-height: 58dvh; resize: vertical; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-2); color: var(--ink); font: 13.5px/1.55 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.p-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.prompt-dlg .sort-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.prompt-dlg .sort-pick select { min-height: 32px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; }

/* instant button names (Claude's placeholder; Chat owns the look) */
.tip { position: fixed; top: 0; left: 0; z-index: 1000; max-width: 260px; padding: 5px 9px; border-radius: 5px; background: var(--ink); color: var(--panel); font: 600 12px/1.3 var(--font-ui); letter-spacing: .01em; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px #0004; }
.tip[hidden] { display: none; }

/* names always shown under each note button (Settings > Note buttons) */
.show-tool-names .tools { left: 12px; flex-wrap: wrap; justify-content: flex-end; row-gap: 2px; }
.show-tool-names .tools button { width: auto; min-width: 38px; height: auto; flex-direction: column; gap: 2px; padding: 4px 5px 3px; }
.show-tool-names .tools button::after { content: attr(data-name); font: 600 10.5px/1.1 var(--font-ui); letter-spacing: .01em; white-space: nowrap; }
.show-tool-names .note .foot { padding-bottom: calc(var(--tools-h, 40px) + 16px); }

/* setup: Just Pane or Pane and Obsidian; the Obsidian switch in Settings (Claude's placeholder; Chat owns the look) */
.welcome-dlg .dlg-head .hint { margin: 0; }
.welcome-dlg .w-modes { display: grid; gap: 8px; margin: 8px 0 4px; }
.welcome-dlg .w-mode { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.welcome-dlg .w-mode input { grid-row: span 2; }
.welcome-dlg .w-mode:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.welcome-dlg .w-mode-name { font-weight: 600; color: var(--ink); }
.welcome-dlg .w-mode-note { grid-column: 2; margin-top: 3px; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.welcome-dlg #w-obsidian { margin-top: 12px; }
.obs-switch { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-weight: 600; color: var(--ink); cursor: pointer; }
#obs-home { margin: 10px 0 4px; }

/* the tour */
.tour-dlg { width: min(540px, calc(100vw - 32px)); }
.tour-dlg .tour-step { margin: 0 0 10px; }
.tour-dlg .tour-text { min-height: 170px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.tour-dlg .tour-text p { margin: 0 0 12px; }
.tour-dlg .tour-text b { color: var(--ink); }
.tour-ico { width: 17px; height: 17px; vertical-align: -3px; color: var(--ink); }
.tour-dlg .tour-actions { justify-content: flex-end; }
.tour-dots { display: inline-flex; gap: 6px; margin-right: auto; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.tour-dots i.is-on { background: var(--accent); }

/* word suggestions: the rest of the word, faint, right after the caret (placeholder look; Chat owns the styling) */
.suggest-ghost { position: fixed; z-index: 60; pointer-events: none; white-space: pre; color: var(--muted); display: flex; align-items: baseline; gap: 6px; }
.suggest-ghost .sg-rest { opacity: .5; }
.suggest-ghost kbd { font: 600 10px/1 system-ui, sans-serif; padding: 2px 4px; border: 1px solid currentColor; border-radius: 4px; opacity: .45; }
.suggest-ghost.is-below { background: var(--sg-bg, var(--panel-2)); padding: 2px 6px; border-radius: 6px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }

/* ===== 1.12.0: links, copy for Teams, pop-out, to-dos, templates, locked notes =====
   Claude's placeholder look; Chat owns the styling. Keep the class names and ids. */
/* [[links]] in the read view, and the "Linked from" line under a note */
.body-view a.note-link { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.body-view a.note-link.is-missing { color: var(--muted); text-decoration-style: dashed; }
.backlinks { margin: 0; padding: 0 24px 12px; font-size: 12.5px; color: var(--muted); }
.backlinks-h { font-weight: 600; }
.backlinks a.backlink { color: var(--ink-2); }
/* the [[ name list at the caret */
.link-pop { position: fixed; z-index: 70; margin: 0; padding: 4px; list-style: none; min-width: 200px; max-width: 360px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .3); font: 14px/1.3 var(--font-ui, system-ui); }
.link-pop .link-opt { padding: 6px 10px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-pop .link-opt[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.link-pop .link-opt.is-new { color: var(--muted); font-style: italic; }
/* locked notes */
.note.is-locked .t-lock { color: var(--accent); }
.lock-cover { display: flex; align-items: center; gap: 10px; margin: 6px 24px 16px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); }
.lock-cover svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lock-cover .lock-open { margin-left: auto; }
.lock-dlg { width: min(520px, calc(100vw - 32px)); }
.lock-dlg .lock-explain p { margin: 0 0 10px; }
.lock-dlg .lock-warn { color: var(--ink); }
.lock-dlg .lk-ack { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; color: var(--ink-2); font-size: 13px; }
/* the To-dos tab */
.todos { max-width: 760px; margin: 0 auto; padding: 4px 0 40px; }
.todos-head { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
.todos-done { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); cursor: pointer; }
.todo-group { margin: 0 0 18px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.todo-note { margin: 0 0 6px; font-size: 15px; }
.todo-note a { color: var(--ink); text-decoration: none; }
.todo-note a:hover { text-decoration: underline; }
.todo-count { color: var(--muted); font-weight: 400; font-size: 12px; }
.todo-items { margin: 0; padding: 0; list-style: none; }
.todo-item { padding: 3px 0 3px calc(var(--indent, 0) * 0.55em); }
.todo-item label { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; color: var(--ink-2); }
.todo-item input { margin-top: .25em; accent-color: var(--accent); }
.todo-item.is-done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-snoozed summary { cursor: pointer; color: var(--muted); margin: 6px 0 12px; }
.todos-empty { text-align: center; color: var(--muted); padding: 40px 0; }
/* templates: the button on the new-note card, its menu, and the Templates dialog */
.capture-tpl { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.capture-tpl:hover { color: var(--ink); background: var(--panel-2); }
.capture-tpl svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tpl-menu { position: fixed; z-index: 70; display: grid; min-width: 220px; max-width: 320px; padding: 4px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.tpl-menu .tpl-opt { text-align: left; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.tpl-menu .tpl-opt:hover, .tpl-menu .tpl-opt:focus-visible { background: var(--panel-2); outline: none; }
.tpl-menu .tpl-manage { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.tpl-menu .tpl-none { margin: 6px 10px; }
.tpl-dlg { width: min(560px, calc(100vw - 32px)); }
.tpl-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tpl-item { display: flex; gap: 6px; align-items: center; }
.tpl-item .tpl-rename { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--ink); font: inherit; }
/* a popped-out note (desktop app): just the one card, filling its small window */
body.is-popout .bar, body.is-popout .wall-head, body.is-popout #bookshelf, body.is-popout #bulk { display: none !important; }
body.is-popout .wall { padding: 8px; }
body.is-popout .grid { display: block; }
body.is-popout .note { min-height: calc(100vh - 16px); }
body.is-popout .note .t-drag, body.is-popout .note .t-snooze, body.is-popout .note .t-pin, body.is-popout .note .t-shelve, body.is-popout .note .t-restore,
body.is-popout .note .t-focus, body.is-popout .note .t-delete, body.is-popout .note .t-popout { display: none !important; }
