/* DpKeep owner app: a calm card grid, light and dark (Drop's palette). */
:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --fg: #1d2125;
  --muted: #66707a;
  --line: #dfddd6;
  --accent: #2f6f6a;
  --accent-fg: #ffffff;
  --accent-soft: #e2efed;
  --danger: #b3412f;
  --hover: rgba(0, 0, 0, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .06);
  --radius: 10px;
  --top: 56px;
  --drawer: 264px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b;
    --card: #1e2226;
    --fg: #e6e8ea;
    --muted: #98a1aa;
    --line: #30363c;
    --accent: #5fb3aa;
    --accent-fg: #0d1f1d;
    --accent-soft: #1f3330;
    --danger: #e0715f;
    --hover: rgba(255, 255, 255, .07);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; }

/* ---------- controls ---------- */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--fg);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 14px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .icon { width: 18px; height: 18px; }
.icon-btn.on { color: var(--accent); }
.icon-btn.on .icon { fill: currentColor; fill-opacity: .25; }
input[type=text], input[type=url], input[type=search], input[type=password], textarea, select {
  font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 0 8px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none;
         font-weight: 650; font-size: 19px; padding: 0 8px 0 2px; }
.search {
  flex: 1; min-width: 0; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 6px 0 12px;
  color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }

/* ---------- drawer ---------- */
.drawer {
  position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--drawer); z-index: 20;
  overflow-y: auto; padding: 8px 8px 32px; background: var(--bg);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between;
               padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted);
               text-transform: uppercase; letter-spacing: .04em; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul ul { padding-left: 16px; }
.nb-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 0 20px 20px 0;
  color: var(--fg); text-decoration: none; min-height: 38px;
}
.nb-link:hover { background: var(--hover); }
.nb-link.active { background: var(--accent-soft); font-weight: 600; }
.nb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--line);
       border: 1px solid rgba(0, 0, 0, .12); }
.scrim { position: fixed; inset: var(--top) 0 0 0; background: rgba(0, 0, 0, .35); z-index: 15; }

/* ---------- main ---------- */
.main { padding: calc(var(--top) + 16px) 24px 64px calc(var(--drawer) + 24px); }
.nb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.nb-head h1 { font-size: 22px; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.nb-head .dot { width: 16px; height: 16px; }
.nb-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.sec { margin-bottom: 8px; }
.sec h2, .stack-title { font-size: 12px; font-weight: 650; color: var(--muted);
                        text-transform: uppercase; letter-spacing: .05em; margin: 8px 4px 8px; }
.empty { color: var(--muted); padding: 24px 4px; }
.welcome { text-align: center; padding: 64px 16px; }

/* quick capture */
.capture { max-width: 600px; margin: 0 auto 28px; background: var(--card); border-radius: var(--radius);
           box-shadow: var(--shadow); border: 1px solid var(--line); }
.cap-closed { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px 6px 16px;
              border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 500;
              text-align: left; cursor: text; min-height: 48px; }
.cap-closed > span:first-child { flex: 1; }
.cap-icons { display: flex; gap: 2px; color: var(--muted); }
.cap-icons .icon-btn { cursor: pointer; }
.cap-open { padding: 8px 8px 6px; display: flex; flex-direction: column; gap: 4px; }
.cap-open input[type=text], .cap-open textarea { border: 0; background: transparent; padding: 6px 8px; }
.cap-open input#cap-title { font-weight: 600; font-size: 16px; }
.cap-open textarea { resize: vertical; min-height: 64px; }
.cap-open :is(input, textarea):focus { outline: none; }
.cap-bar { display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.cap-bar label.icon-btn { cursor: pointer; }

/* masonry grid: JS sets each card's row span (4 px rows) */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: 4px; column-gap: 12px; align-items: start; min-height: 8px;
}
.card { position: relative; }
.card-in {
  margin-bottom: 12px; background: var(--note-bg, var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px 4px; cursor: pointer; overflow: hidden;
  transition: box-shadow .12s;
}
.card.tinted .card-in { border-color: transparent; color: #202124; }
.card.tinted .muted { color: #4a4f55; }
.card:hover .card-in, .card:focus-visible .card-in { box-shadow: var(--shadow); }
.card:focus-visible { outline: none; }
.card:focus-visible .card-in { outline: 2px solid var(--accent); }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; overflow-wrap: anywhere; }
.card-text { margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere;
             display: -webkit-box; -webkit-line-clamp: 12; -webkit-box-orient: vertical; overflow: hidden; }
.card-list { list-style: none; margin: 0 0 4px; padding: 0; }
.card-list label { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; cursor: pointer; }
.card-list input { margin-top: 2px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 2px;
             overflow-wrap: anywhere; }
.card-link .icon { width: 16px; height: 16px; }
.card .url { margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-files { margin: -12px -14px 8px; display: grid; gap: 2px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.card-files .file.img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.card-files .file.doc { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-bar { display: flex; align-items: center; margin: 0 -8px; opacity: 0; transition: opacity .12s; }
.card:hover .card-bar, .card:focus-within .card-bar { opacity: 1; }
.card-bar .icon-btn.on { opacity: 1; }
.card.dragging { opacity: .4; }
.card.drop-before .card-in { box-shadow: -4px 0 0 var(--accent); }
.card.drop-after .card-in { box-shadow: 4px 0 0 var(--accent); }
.card.drop-y.drop-before .card-in { box-shadow: 0 -4px 0 var(--accent); }
.card.drop-y.drop-after .card-in { box-shadow: 0 4px 0 var(--accent); }
.grid.drop-into, .stack-head.drop-into, .nb-link.drop-into { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.stack-head.drop-before, .nb-link.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.stack-head.drop-after, .nb-link.drop-after { box-shadow: 0 3px 0 var(--accent); }
/* touch drag (ui.js): the lifted copy follows the finger; the page does not scroll under it */
.drag-ghost {
  position: fixed; z-index: 1000; pointer-events: none; margin: 0;
  transform: rotate(1.5deg) scale(1.02); box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  border-radius: var(--radius); background: var(--card); list-style: none;
}
.drag-ghost .card-in { margin-bottom: 0; }
.drag-ghost .card-bar { opacity: 1; }
.stack-head.drag-ghost, .nb-link.drag-ghost { padding-left: 8px; padding-right: 8px; }
body.touch-dragging { touch-action: none; overscroll-behavior: none; }
.stack-head.dragging, .nb-link.dragging { opacity: .4; }
@media (pointer: coarse) {
  /* a long press lifts the item: no text selection or callout on what can be dragged */
  .card[draggable="true"], .stack-head[draggable="true"], .nb-link[draggable="true"] {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
}

/* stacks */
.stack { margin: 8px 0 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.stack .stack { margin-left: 16px; }
.stack-head { display: flex; align-items: center; gap: 2px; cursor: grab; min-height: 40px; }
.stack-head .stack-title { margin: 0; font-size: 13px; }
.stack-head .count { font-size: 12px; color: var(--muted); background: var(--hover); border-radius: 999px; padding: 0 8px; margin-left: 6px; }
.fold .icon { transform: rotate(90deg); transition: transform .12s; }
.stack.folded > .stack-head .fold .icon { transform: none; }
.stack.folded > .stack-body { display: none; }
.stack-body { padding-top: 6px; }

/* search */
.hits { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.hit { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 8px;
       background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
       color: var(--fg); text-decoration: none; }
.hit:hover { box-shadow: var(--shadow); }
.snippet { margin: 4px 0 0; overflow-wrap: anywhere; }
mark { background: #fff475; color: #202124; border-radius: 2px; padding: 0 1px; }

/* ---------- dialogs ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg);
  padding: 20px; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
}
dialog.wide { width: min(720px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog.lightbox { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  width: 100vw; height: 100dvh; max-width: none; max-height: none; cursor: zoom-out; }
dialog.lightbox[open] { display: flex; align-items: center; justify-content: center; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 94dvh; object-fit: contain; border-radius: 4px; }
dialog h2 { font-size: 18px; margin-bottom: 12px; overflow-wrap: anywhere; }
dialog p { margin: 0 0 14px; }
dialog label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
dialog select, dialog input[type=text] { width: 100%; }
dialog .row select, dialog .row input[type=text] { width: auto; flex: 1; min-width: 120px; }
dialog .row.end { margin-top: 18px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dlg-head h2 { margin: 0; }
#ask-input { width: 100%; }

/* the note editor */
dialog.editor {
  width: min(820px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 48px)); max-height: none;
  padding: 0; display: none; flex-direction: column; overflow: hidden;
  background: var(--note-bg, var(--card));
}
dialog.editor[open] { display: flex; }
dialog.editor.tinted { color: #202124; }
dialog.editor.tinted .muted, dialog.editor.tinted .ed-status { color: #4a4f55; }
.ed-head { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ed-status { font-size: 13px; color: var(--muted); padding-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-scroll { flex: 1; overflow-y: auto; padding: 12px 24px 24px; }
.ed-title { width: 100%; border: 0 !important; background: transparent !important; font-size: 22px !important;
            font-weight: 650; padding: 6px 0 !important; color: inherit !important; }
.ed-title:focus { outline: none; }
.toolbar {
  position: sticky; top: -12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 2px; align-items: center;
  padding: 4px; margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card);
}
.editor.tinted .toolbar { background: rgba(255, 255, 255, .7); border-color: rgba(0, 0, 0, .12); }
.toolbar button {
  min-width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: inherit;
  font: 600 14px/1 system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.toolbar button:hover { background: var(--hover); }
.toolbar button:disabled { opacity: .35; cursor: default; }
.toolbar .icon { width: 18px; height: 18px; }
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.swatch-line { stroke: #d93025; stroke-width: 3; }
.swatch-line.hl { stroke: #fbbc04; }
.ed-body { min-height: 240px; outline: none; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.ed-body:empty::before { content: attr(data-placeholder); color: var(--muted); }
.ed-body p { margin: 0 0 .6em; }
.ed-body h1 { font-size: 1.6em; margin: .5em 0 .3em; }
.ed-body h2 { font-size: 1.3em; margin: .5em 0 .3em; }
.ed-body h3 { font-size: 1.1em; margin: .5em 0 .3em; }
.ed-body blockquote { margin: .4em 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.ed-body pre, .ed-body code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; }
.ed-body pre { background: var(--hover); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; }
.ed-body code { background: var(--hover); padding: 1px 4px; border-radius: 4px; }
.ed-body pre code { background: transparent; padding: 0; }
.ed-body a { cursor: text; }
.ed-list { display: flex; flex-direction: column; }
.li-row { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.li-row .li-text { flex: 1; min-width: 0; border: 0; background: transparent; border-bottom: 1px solid transparent;
                   border-radius: 0; padding: 6px 2px; color: inherit; }
.li-row .li-text:focus { outline: none; border-bottom-color: var(--accent); }
.li-row.done .li-text { text-decoration: line-through; color: var(--muted); }
.li-del { opacity: 0; }
.li-row:hover .li-del, .li-row:focus-within .li-del { opacity: 1; }
.li-add { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--muted);
          font: inherit; padding: 8px 0; cursor: pointer; }
.li-done-h { margin: 14px 0 4px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.ed-link label { font-size: 14px; color: var(--muted); display: block; margin: 8px 0 4px; }
.ed-link input { flex: 1; min-width: 0; }
.field-err { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.ed-files { display: grid; gap: 10px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ed-files .file { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); color: inherit; text-decoration: none; }
.ed-files .file.img img { display: block; width: 100%; height: auto; }
.ed-files .file.doc { display: flex; align-items: center; gap: 10px; padding: 12px; }
.ed-files:has(> :only-child) { grid-template-columns: 1fr; }
.file-wrap { position: relative; min-width: 0; }
.file-wrap .file-more {
  position: absolute; bottom: 6px; right: 6px; width: 32px; height: 32px;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.file-wrap .file.doc { padding-right: 46px; }
.ed-foot { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.ed-foot label.btn { cursor: pointer; }

/* conflict and history */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two h3 { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.copy { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 40vh; overflow: auto; font-size: 14px; }
.copy ul { margin: 6px 0 0; padding-left: 4px; list-style: none; }
.copy li.done { color: var(--muted); }
.copy p { margin: 6px 0 0; }
.versions { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.version { border-bottom: 1px solid var(--line); padding: 10px 0; }
.v-head { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.v-head .btn { margin-left: auto; }
.v-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.v-action { font-style: italic; margin-bottom: 2px; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 0; font-size: 14px; }

/* share */
.shares, .people-list { list-style: none; margin: 0 0 12px; padding: 0; }
.share-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.share-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.share-row select { width: auto; }
.people { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.people summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.invite-out { margin-top: 10px; }
.invite-out input { flex: 1; }

/* menus and palettes (popovers) */
.menu, .palette {
  position: fixed; inset: auto; margin: 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--fg); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 6px;
}
.menu { min-width: 200px; max-width: calc(100vw - 16px); }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: inherit;
             font: inherit; padding: 9px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.palette { grid-template-columns: repeat(6, 32px); gap: 6px; padding: 10px; }
.palette:popover-open { display: grid; }  /* a bare display here would show the closed popover */
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.swatch.none { background: var(--card); position: relative; }
.swatch.none::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 2px solid var(--danger); transform: rotate(-45deg); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; max-width: calc(100vw - 32px);
}

/* ---------- sign-in page ---------- */
.login-body { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 16px; }
.login { width: min(360px, 100%); text-align: center; }
.login h1 { font-size: 24px; margin: 8px 0 20px; }
.login form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.login label { font-size: 14px; color: var(--muted); }
.login-err { color: var(--danger); margin: 0; }

/* ---------- narrower screens ---------- */
@media (max-width: 899px) {
  .drawer { transform: translateX(-100%); transition: transform .18s; box-shadow: none; background: var(--card); }
  body.drawer-open .drawer { transform: none; box-shadow: 0 0 24px rgba(0, 0, 0, .25); }
  .main { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 900px) {
  #menu-btn { display: none; }
  .scrim { display: none !important; }
}
@media (max-width: 599px) {
  .grid { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .top { gap: 2px; }
  .card-bar { opacity: 1; }
  .li-del { opacity: 1; }
  .two { grid-template-columns: 1fr; }
  dialog.editor { width: 100vw; height: 100dvh; max-width: 100vw; border-radius: 0; border: 0; }
  .ed-scroll { padding: 8px 16px 24px; }
  .nb-head h1 { font-size: 20px; }
  .capture { margin-bottom: 20px; }
}

/* ---------- family app (keep.dolper.com) ---------- */
.lang-pick { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px;
             font-size: 14px; color: var(--muted); }
.lang-pick select { width: auto; }
.login form p { margin: 0; }
.tree-shared { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.tree-shared .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.cap-buttons { max-width: 600px; margin: 0 auto 28px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cap-buttons .btn { display: inline-flex; align-items: center; gap: 6px; }
.viewer .vw-title { font-size: 22px; font-weight: 600; margin: 8px 0 12px; overflow-wrap: anywhere; }
.viewer .ed-body { min-height: 0; }
.viewer .ed-body a { cursor: pointer; }
.vw-list { list-style: none; margin: 0; padding: 0; }
.vw-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; overflow-wrap: anywhere; }
.vw-list li.done { color: var(--muted); text-decoration: line-through; }
.vw-link { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.card-list input:disabled + span { cursor: default; }
