/* Archive: calm slate surfaces, one teal accent, manila folders as the one memorable touch. */

:root {
  color-scheme: light dark;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #edf1f4;
  --ink: #0f1b23;
  --ink-2: #52636e;
  --line: #e0e6ea;
  --line-strong: #c3cfd6;
  --accent: #0d7a70;
  --accent-ink: #ffffff;
  --accent-soft: #dcf2ef;
  --danger: #b4382a;
  --danger-soft: #fbe8e5;
  --ok: #23764a;
  --warn: #8a6208;
  --focus: #0d7a70;
  --folder: #f6e4a8;
  --folder-edge: #d6b44c;
  --folder-ink: #4a3a0a;
  --dark-panel: #0f1b23;
  --shadow: 0 1px 2px rgba(15, 27, 35, .06);
  --shadow-pop: 0 10px 30px rgba(15, 27, 35, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1318;
    --surface: #131d25;
    --surface-2: #1b2731;
    --ink: #e9eff2;
    --ink-2: #9aabb6;
    --line: #243440;
    --line-strong: #3a4c59;
    --accent: #4fc3b6;
    --accent-ink: #04201d;
    --accent-soft: #123430;
    --danger: #ef8c7d;
    --danger-soft: #3a1f1b;
    --ok: #79cc9c;
    --warn: #e3bd58;
    --focus: #7fd8cd;
    --folder: #4b4020;
    --folder-edge: #a98a2f;
    --folder-ink: #f3e2ab;
    --dark-panel: #070d11;
    --shadow: none;
    --shadow-pop: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
h1, h2, h3 { font-weight: 650; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.boot { padding: 2rem; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: .9rem; max-width: 60ch; }
.icon { flex: none; }

/* ---------- Buttons and fields ---------- */

.btn {
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1rem; min-height: 40px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; list-style: none;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: .35rem .75rem; min-height: 34px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.upload:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 2.25rem; height: 2.25rem; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2);
  cursor: pointer; list-style: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: .6rem .8rem; min-height: 42px; width: 100%;
}
select { width: auto; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }

/* ---------- Sign-in page ---------- */

.auth-grid { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-side {
  background: var(--dark-panel); color: #e8eef1;
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem;
}
.auth-side h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); max-width: 14ch; }
.auth-side p { color: #b9c6ce; max-width: 38ch; }
.auth-brand { font-weight: 700; font-size: 1.1rem; margin: 0; color: #e8eef1 !important; }
.folder-art { position: relative; height: 150px; margin-bottom: auto; }
.folder-art span { position: absolute; left: 0; width: 70%; height: 90px; background: #e2c675; border-radius: 0 10px 10px 10px; }
.folder-art span::before { content: ""; position: absolute; top: -16px; left: 0; width: 34%; height: 16px; background: inherit; border-radius: 8px 8px 0 0; }
.folder-art span:nth-child(1) { top: 0; background: #6f828e; }
.folder-art span:nth-child(2) { top: 26px; left: 10%; background: #b79d4f; }
.folder-art span:nth-child(3) { top: 52px; left: 20%; background: #f0d98c; }
.auth-main { padding: 3rem clamp(1.25rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; max-width: 34rem; width: 100%; }
.form { display: grid; gap: 1rem; }
.field { display: block; }
.msg { margin: 0; padding: .6rem .8rem; border-radius: 10px; font-size: .92rem; border: 1px solid var(--line-strong); background: var(--surface); }
.msg.error { border-color: var(--danger); color: var(--danger); }
.msg.ok { border-color: var(--ok); color: var(--ok); }
.switch { margin: 0; font-size: .92rem; color: var(--ink-2); }
.notice { display: grid; gap: .5rem; }

/* ---------- App shell ---------- */

.app { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 200; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: 8px; }
.skip:focus { left: .5rem; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.1rem .85rem;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; padding: .2rem .5rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 8px; background: var(--folder); color: var(--folder-ink); }
.brand-mark.big { width: 3rem; height: 3rem; border-radius: 12px; }
.side-nav { display: grid; gap: .15rem; }
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); }

.usage:empty { display: none; }
.usage:not(:empty) { margin-top: auto; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.usage:not(:empty) + .side-foot { margin-top: 0; }
.usage-row { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.usage-text { margin: .4rem 0 0; font-size: .8rem; color: var(--ink-2); }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.side-foot { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1; }
.avatar { display: grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--folder); color: var(--folder-ink); font-weight: 700; font-size: .9rem; }
.me-text { display: grid; min-width: 0; line-height: 1.25; }
.me-text strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { color: var(--ink-2); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; max-width: 84rem; width: 100%; }
.main:focus { outline: none; }
.main.is-fill { padding-bottom: 1.5rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; min-width: 0; }
.crumb {
  font: inherit; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.015em;
  background: none; border: 0; padding: .15rem .4rem; border-radius: 8px;
  color: var(--ink-2); cursor: pointer;
  max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crumb:hover { background: var(--surface-2); color: var(--ink); }
.crumb.is-current { color: var(--ink); cursor: default; }
.crumb.is-current:hover { background: none; }
.crumbs .sep { color: var(--line-strong); }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.search { position: relative; flex: 1 1 16rem; min-width: 12rem; }
.search .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input { padding-left: 2.5rem; }
.sort { display: block; margin: 0; }
.seg-icons { display: inline-flex; gap: .15rem; padding: .15rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .9rem; }
.filter-note { color: var(--ink-2); font-size: .9rem; }
.chip {
  font: inherit; font-size: .8rem; cursor: pointer; padding: .15rem .65rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-2);
}
.chip:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- Files: grid view ---------- */

.grid { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.grid.folders { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.grid.files { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }

.folder-card { position: relative; margin-top: 9px; }
.folder-open {
  position: relative; width: 100%; display: flex; align-items: center; gap: .7rem;
  text-align: left; font: inherit; font-weight: 600; cursor: pointer;
  padding: .95rem 3rem .95rem 1rem;
  background: var(--folder); color: var(--folder-ink);
  border: 1px solid var(--folder-edge); border-radius: 0 12px 12px 12px;
}
.folder-open::before {
  content: ""; position: absolute; left: -1px; top: -10px; width: 42%; height: 10px;
  background: var(--folder); border: 1px solid var(--folder-edge); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.folder-open:hover { filter: brightness(.97); }
.folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-menu { position: absolute; top: .45rem; right: .35rem; }
.card-menu .icon-btn { color: var(--folder-ink); }
.card-menu .icon-btn:hover { background: rgba(0, 0, 0, .08); }

.file-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.file-card:hover { border-color: var(--line-strong); }
.thumb {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 0;
  border: 0; border-radius: 13px 13px 0 0; background: var(--surface-2); cursor: pointer; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.type-tile { display: grid; place-items: center; width: 3.4rem; height: 4.2rem; border-radius: 8px; color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .04em; background: #5b6b76; }
.file-info { padding: .7rem .85rem .2rem; min-width: 0; }
.file-name { margin: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin: .1rem 0 0; font-size: .8rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.card-actions { display: flex; align-items: center; justify-content: flex-end; gap: .1rem; padding: .25rem .4rem .4rem; margin-top: auto; }

.k-pdf { background: #a93a2a; }
.k-doc { background: #2f5fa8; }
.k-ppt { background: #a65410; }
.k-xls { background: #2b7547; }
.k-img { background: #1f6f78; }
.k-vid { background: #6b4aa0; }
.k-aud { background: #8a4a73; }
.k-zip { background: #6b5b3a; }
.k-txt { background: #52606b; }
.k-dir { background: var(--folder); color: var(--folder-ink); }

/* ---------- Files and accounts: list view ---------- */

.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.row {
  display: grid; grid-template-columns: 2.9rem minmax(0, 1fr) 5.5rem 7.5rem auto;
  align-items: center; column-gap: .9rem; padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row.user { grid-template-columns: minmax(0, 1fr) 9rem 11rem 8.5rem auto; }
.row-main { min-width: 0; }
.name {
  font: inherit; font-weight: 600; text-align: left; color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.name:hover { color: var(--accent); text-decoration: underline; }
.name.static { cursor: default; margin: 0; }
.name.static:hover { color: var(--ink); text-decoration: none; }
.sub { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:not(.user) .sub { display: none; }
.row .sub.always { display: block; }
.num, .date { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.9rem; height: 2.1rem; border-radius: 6px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #5b6b76;
}

.status { font-size: .82rem; font-weight: 700; }
.s-pending { color: var(--warn); }
.s-approved { color: var(--ok); }
.s-rejected { color: var(--danger); }

.seg { display: flex; gap: .35rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.seg button {
  font: inherit; font-size: .9rem; cursor: pointer; padding: .4rem .95rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.summary { color: var(--ink-2); margin: .25rem 0 0; }

.empty, .empty-block { display: grid; justify-items: center; text-align: center; gap: .25rem; padding: 3.5rem 1rem; }
.empty-mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); margin-bottom: .5rem; }
.empty-title { font-weight: 650; margin: 0; }

/* More menu */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 12rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: .3rem;
  box-shadow: var(--shadow-pop);
}
.menu.up .menu-pop { top: auto; bottom: calc(100% + 4px); right: auto; left: 0; min-width: 16rem; }
.menu-item {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; font: inherit; font-size: .9rem;
  padding: .55rem .7rem; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }

/* ---------- Notes ---------- */

.notes { display: grid; grid-template-columns: 21rem minmax(0, 1fr); gap: 1rem; height: calc(100vh - 3rem); min-height: 30rem; }
.note-list, .editor { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.note-list-head { display: grid; gap: .6rem; padding: .75rem; border-bottom: 1px solid var(--line); }
.note-list-head .btn { width: 100%; }
.note-items { flex: 1; min-height: 0; overflow-y: auto; padding: .4rem; display: grid; align-content: start; gap: .1rem; }
.note-list-foot { padding: .5rem; border-top: 1px solid var(--line); }
.note-item {
  display: grid; gap: .15rem; width: 100%; text-align: left; font: inherit; color: var(--ink);
  padding: .7rem .8rem; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
.note-item:hover { background: var(--surface-2); }
.note-item.is-active { background: var(--accent-soft); }
.note-item-title { display: flex; align-items: center; gap: .35rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-mark { display: inline-flex; color: var(--accent); }
.note-item-excerpt { font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item-date { font-size: .76rem; color: var(--ink-2); }
.notes-empty { padding: 2.5rem 1rem; text-align: center; }

.editor-bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
.editor-tools { margin-left: auto; display: flex; align-items: center; gap: .3rem; flex: none; }
.save-state { font-size: .85rem; color: var(--ink-2); min-width: 0; }
.save-state[data-state="error"] { color: var(--danger); }
.back-btn { display: none; }
.note-title, .note-body { border: 0; border-radius: 0; background: transparent; width: 100%; }
.note-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; padding: 1.1rem 1.4rem .3rem; min-height: 0; }
.note-body { flex: 1; min-height: 0; resize: none; padding: .5rem 1.4rem 1rem; font-size: 1.02rem; line-height: 1.7; }
.note-title:focus-visible, .note-body:focus-visible { outline-offset: -3px; }
.editor-foot { padding: .5rem 1.4rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.editor-empty { display: grid; place-content: center; justify-items: center; text-align: center; gap: .4rem; height: 100%; padding: 2rem; }

/* ---------- Signed-out gate, dialogs, toasts, upload queue ---------- */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.gate-card { width: min(28rem, 100%); display: grid; gap: .6rem; justify-items: start; padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.gate-card h1, .gate-card p { margin: 0; }
.gate-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

dialog.dlg {
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 0;
  background: var(--surface); color: var(--ink);
  width: min(30rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
}
dialog.dlg.wide { width: min(60rem, calc(100vw - 2rem)); }
dialog.dlg::backdrop { background: rgba(8, 14, 19, .6); }
.dlg-body { padding: 1.25rem; display: grid; gap: .6rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pv-head h2 { margin: 0; overflow-wrap: anywhere; }
.pv-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.pv-img, .pv-media { max-width: 100%; max-height: 70vh; margin: 0 auto; display: block; }
.pv-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pv-audio { width: 100%; }
.ledger.in-dialog { max-height: 60vh; overflow: auto; box-shadow: none; }

.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: .4rem; width: min(26rem, calc(100vw - 2rem)); }
.toast { padding: .7rem 1rem; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .92rem; }
.toast.error { background: var(--danger); color: #fff; }

.queue { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; width: min(22rem, calc(100vw - 2rem)); }
.queue-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: .7rem .9rem; display: grid; gap: .4rem; box-shadow: var(--shadow-pop); }
.queue ul { display: grid; gap: .3rem; font-size: .85rem; }
.queue li { display: flex; justify-content: space-between; gap: .75rem; }
.q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-state { color: var(--ink-2); flex-shrink: 0; }
.queue li.error .q-state { color: var(--danger); }
.queue li.done .q-state { color: var(--ok); }

.drop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 3px dashed var(--accent); margin: .75rem; border-radius: 18px;
  font-size: 1.4rem; font-weight: 650; pointer-events: none;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; overflow: visible;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
    padding: .6rem .85rem; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-nav { display: flex; order: 3; width: 100%; gap: .25rem; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .usage:not(:empty) { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border-top: 0; flex: none; }
  .me { flex: none; }
  .me-text { display: none; }
  .main { padding: 1rem; }
  .main.is-fill { padding-bottom: 1rem; }

  .notes { grid-template-columns: 1fr; height: calc(100vh - 8.5rem); min-height: 26rem; }
  .notes[data-view="editor"] .note-list { display: none; }
  .notes[data-view="list"] .editor { display: none; }
  .back-btn { display: inline-flex; }
  .note-title { font-size: 1.4rem; padding: .9rem 1rem .25rem; }
  .note-body { padding: .4rem 1rem .8rem; }
  .editor-foot { padding: .5rem 1rem; }
}

@media (max-width: 760px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { padding: 1.5rem; }
  .folder-art { display: none; }
  .auth-main { max-width: none; padding: 1.5rem; }

  .row { grid-template-columns: 2.9rem minmax(0, 1fr); row-gap: .5rem; }
  .row:not(.user) .sub { display: block; }
  .row .num, .row .date { display: none; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .row.user { grid-template-columns: minmax(0, 1fr); }
  .row.user .num, .row.user .date { display: block; }
  .row.user .row-actions { grid-column: auto; }
  .grid.files, .grid.folders { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
  .crumb { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Logo */
.brand-logo { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 8px; display: block; }
.brand-logo.big { width: 3rem; height: 3rem; border-radius: 12px; }
.auth-brand { display: flex; align-items: center; gap: .6rem; }
