/* DocVault: "the study". Manila folders in a quiet cabinet, a green banker's lamp, brass fittings.
   Layout: a slim index of categories and groups on the left, documents as a grid of folders on the right.
   Motion: papers slide out of their folders, folders glide when the view changes, a folder opens into the viewer. */
:root {
  /* Color */
  --bg: #ecefe7;
  --panel: #fafbf7;
  --panel-glass: rgba(250, 251, 247, .84);
  --field: #f2f4ee;
  --hover: #e3e8dc;
  --line: #d9ded2;
  --line-strong: #c3cbbb;
  --ink: #1d2721;
  --ink-2: #5d6a61;
  --ink-3: #9aa59c;
  --green: #1f5641;
  --green-2: #2e6f55;
  --green-ink: #1f5641;
  --green-soft: #d8e6db;
  --ring: rgba(31, 86, 65, .2);
  --brass: #a87a2a;
  --brass-ink: #7d5a17;
  --brass-soft: #f3e6c4;
  --folder: #e5d1a2;
  --folder-2: #eedcb2;
  --folder-edge: #d2ba82;
  --folder-ink: #4d3f1f;
  --paper: #fffdf6;
  --paper-2: #f4efe2;
  --paper-ink: #3a3a33;
  --paper-line: #e3dcc9;
  --paper-tint: #e9efe3;
  --danger: #b3261e;
  --danger-fill: #b3261e;
  --mark-bg: #f6dc8a;
  --mark-ink: #1d2721;
  --glow: rgba(255, 233, 184, .6);
  --toast-ok: #9fd8b9;
  --toast-warn: #f2c46b;
  --shadow: 0 1px 2px rgba(29, 39, 33, .06), 0 6px 18px -10px rgba(29, 39, 33, .24);
  --shadow-lift: 0 2px 4px rgba(29, 39, 33, .06), 0 20px 36px -18px rgba(29, 39, 33, .38);
  --shadow-pop: 0 28px 64px -24px rgba(22, 30, 25, .5);
  --shadow-bar: 0 12px 30px -24px rgba(22, 30, 25, .6);

  /* Type */
  --font-display: "Young Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Courier Prime", "Courier New", ui-monospace, monospace;

  /* Motion and shape */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .55, 1);
  --bar-h: 64px;
  --radius: 18px;
  color-scheme: light;
}
/* Night in the study: the lamp is on. Used when the system is dark (and light wasn't chosen), or when dark is chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111813;
    --panel: #172019;
    --panel-glass: rgba(23, 32, 25, .84);
    --field: #1c261f;
    --hover: #223027;
    --line: #2a372e;
    --line-strong: #3a4a3f;
    --ink: #e8ede6;
    --ink-2: #a3b0a6;
    --ink-3: #5f6d63;
    --green: #2c7356;
    --green-2: #3f8f6d;
    --green-ink: #8fd1b0;
    --green-soft: #1f3a2d;
    --ring: rgba(143, 209, 176, .22);
    --brass: #e2b25a;
    --brass-ink: #e2b25a;
    --brass-soft: #3a3020;
    --folder: #3b3628;
    --folder-2: #464031;
    --folder-edge: #2d2a1f;
    --folder-ink: #eadbb5;
    --paper: #e6e1d3;
    --paper-2: #d8d2c2;
    --paper-ink: #2f2e28;
    --paper-line: #cbc4b1;
    --paper-tint: #d9dfcf;
    --danger: #f2948a;
    --danger-fill: #a8281f;
    --mark-bg: #6a5420;
    --mark-ink: #fff1cf;
    --glow: rgba(226, 178, 90, .09);
    --toast-ok: #1f7a55;
    --toast-warn: #9a6a00;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px -12px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 40px -18px rgba(0, 0, 0, .75);
    --shadow-pop: 0 30px 70px -24px rgba(0, 0, 0, .8);
    --shadow-bar: 0 12px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111813;
  --panel: #172019;
  --panel-glass: rgba(23, 32, 25, .84);
  --field: #1c261f;
  --hover: #223027;
  --line: #2a372e;
  --line-strong: #3a4a3f;
  --ink: #e8ede6;
  --ink-2: #a3b0a6;
  --ink-3: #5f6d63;
  --green: #2c7356;
  --green-2: #3f8f6d;
  --green-ink: #8fd1b0;
  --green-soft: #1f3a2d;
  --ring: rgba(143, 209, 176, .22);
  --brass: #e2b25a;
  --brass-ink: #e2b25a;
  --brass-soft: #3a3020;
  --folder: #3b3628;
  --folder-2: #464031;
  --folder-edge: #2d2a1f;
  --folder-ink: #eadbb5;
  --paper: #e6e1d3;
  --paper-2: #d8d2c2;
  --paper-ink: #2f2e28;
  --paper-line: #cbc4b1;
  --paper-tint: #d9dfcf;
  --danger: #f2948a;
  --danger-fill: #a8281f;
  --mark-bg: #6a5420;
  --mark-ink: #fff1cf;
  --glow: rgba(226, 178, 90, .09);
  --toast-ok: #1f7a55;
  --toast-warn: #9a6a00;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px -12px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 40px -18px rgba(0, 0, 0, .75);
  --shadow-pop: 0 30px 70px -24px rgba(0, 0, 0, .8);
  --shadow-bar: 0 12px 30px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
/* "hidden" must win over display rules like .welcome { display: grid } */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font: 400 14.5px/1.5 var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* The lamp's glow sits on its own fixed layer: a "fixed" page background is repainted on every scroll frame */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1100px 560px at 92% -14%, var(--glow), transparent 62%);
}
/* Paints the strip above the sticky header on phones with a notch */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 40;
  height: env(safe-area-inset-top, 0px); background: var(--panel);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
h1, h2, h3 { text-wrap: balance; }
mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, border-color .2s, filter .2s, transform .25s var(--ease-spring);
}
.btn .i { width: 17px; height: 17px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary {
  background: var(--green); border-color: var(--green); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 14px -8px var(--green);
}
.btn.primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn.primary:active { transform: scale(.96); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.1); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink);
  transition: background-color .2s, transform .25s var(--ease-spring);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.9); }
.mini-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.mini-btn .i { width: 15px; height: 15px; }
.mini-btn:hover { background: var(--hover); color: var(--green-ink); }
.mini-btn[data-act="remove"]:hover { color: var(--danger); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: var(--bar-h); padding: 0 20px;
  background: var(--panel-glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.topbar.scrolled { box-shadow: var(--shadow-bar); }
.menu-btn { display: none; }
.brand {
  display: flex; align-items: center; gap: 10px; width: 232px; flex: none;
  font: 400 21px/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap;
}
.logo { width: 30px; height: 30px; flex: none; }
.logo .lb { fill: var(--green); }
.logo .lp { fill: var(--paper); transition: transform .45s var(--ease-spring); }
.logo .lf { fill: var(--green-2); }
.logo .lc { fill: var(--brass); }
.brand:hover .lp { transform: translateY(-3px); }

.search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; }
.search > .i { position: absolute; left: 15px; color: var(--ink-2); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 44px 0 43px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--field); outline: none;
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
.search input::placeholder { color: var(--ink-2); }
.search input:focus { border-color: var(--green-ink); background: var(--panel); box-shadow: 0 0 0 4px var(--ring); }
.search kbd {
  position: absolute; right: 13px; padding: 3px 7px; pointer-events: none;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel);
  font: 700 11px/1 var(--font-mono); color: var(--ink-2); transition: opacity .2s;
}
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { opacity: 0; }
.topbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-btn { position: relative; }
.theme-btn .i { position: absolute; inset: 0; margin: auto; transition: transform .55s var(--ease-spring), opacity .3s; }
.theme-btn .moon { opacity: 0; transform: rotate(-80deg) scale(.4); }
:root[data-theme="dark"] .theme-btn .sun { opacity: 0; transform: rotate(80deg) scale(.4); }
:root[data-theme="dark"] .theme-btn .moon { opacity: 1; transform: none; }

/* ---------- Layout and sidebar ---------- */
.layout { display: flex; min-height: calc(100vh - var(--bar-h)); }
.sidebar {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); flex: none;
  width: 264px; height: calc(100vh - var(--bar-h) - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 22px; padding: 20px 14px 14px;
  overflow-y: auto; border-right: 1px solid var(--line); isolation: isolate;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
/* The soft highlight that slides to whichever view is open */
.nav-pill {
  position: absolute; top: 0; left: 0; z-index: -1;
  border-radius: 12px; background: var(--green-soft); opacity: 0; pointer-events: none;
}
.nav-pill.ready { transition: transform .5s var(--ease-spring), width .3s, height .3s, opacity .2s; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-head {
  display: flex; align-items: center; justify-content: space-between; padding: 0 6px 6px 12px;
  font: 700 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 12px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink);
  font-weight: 500; text-align: left; transition: background-color .2s, color .2s;
}
.nav-item:hover:not(.active) { background: var(--hover); }
.nav-item.active { color: var(--green-ink); font-weight: 650; }
.nav-item > .i { color: var(--ink-2); transition: color .2s, transform .35s var(--ease-spring); }
.nav-item:hover > .i { transform: scale(1.12); }
.nav-item.active > .i, .nav-item.active em, .nav-item.active .label { color: var(--green-ink); }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item em { font-style: normal; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dot { flex: none; width: 10px; height: 10px; margin: 0 4px; border-radius: 3px; background: var(--dot, var(--ink-3)); }
.dot-empty { background: transparent; border: 1.5px dashed var(--ink-3); }
.nav-row { position: relative; display: flex; align-items: center; }
.nav-row .nav-item { flex: 1; min-width: 0; }
/* Rename and delete show on hover, or when tabbing onto the row */
.row-actions { position: absolute; right: 5px; display: none; gap: 2px; }
.nav-row:hover .row-actions, .nav-row:focus-within .row-actions { display: flex; }
.nav-row:hover em, .nav-row:focus-within em { visibility: hidden; }
/* Touch screens have no hover, so keep rename and delete in view */
@media (hover: none) {
  .row-actions { position: static; display: flex; }
  .nav-row em { visibility: visible !important; }
}
.nav-empty { padding: 4px 12px; color: var(--ink-2); font-size: 12.5px; }
.storage {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 10px 2px;
  border-top: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--ink-2);
}
.storage p { margin: 0; }
.backup-btns { display: flex; flex-direction: column; gap: 6px; }
.backup-btns .btn { justify-content: flex-start; height: 34px; font-size: 13px; font-weight: 500; }
.backdrop { display: none; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 30px 34px 72px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.heading { min-width: 0; }
.eyebrow {
  margin: 0 0 8px; font: 700 11.5px/1.2 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--brass-ink);
}
.toolbar h1 { margin: 0; font: 400 34px/1.1 var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.sub { margin: 8px 0 0; color: var(--ink-2); }
.toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  height: 38px; padding: 0 36px 0 15px; -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  font-size: 13.5px; font-weight: 550; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.select select:hover { border-color: var(--line-strong); }
.select select:focus-visible { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 4px var(--ring); }
.select select:disabled { opacity: .55; cursor: default; }
.select .i { position: absolute; right: 13px; width: 15px; height: 15px; color: var(--ink-2); pointer-events: none; }
/* Grid / list switch with a thumb that slides between the two */
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--hover); }
.seg::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--panel); box-shadow: var(--shadow);
  transition: transform .45s var(--ease-spring);
}
.seg[data-active="list"]::before { transform: translateX(100%); }
.seg button {
  position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 32px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); transition: color .2s;
}
.seg button.active { color: var(--ink); }

/* ---------- Welcome card (shown while the example documents are in) ---------- */
.welcome {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 26px;
  margin-bottom: 28px; padding: 18px 24px 18px 18px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow);
}
.welcome-art { width: 104px; height: 80px; }
.welcome h2 { margin: 0 0 4px; font: 400 21px/1.2 var(--font-display); }
.welcome p { margin: 0; max-width: 62ch; color: var(--ink-2); }
.try-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.try {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px dashed var(--line-strong); border-radius: 999px; background: transparent;
  font: 700 12px/1 var(--font-mono); color: var(--green-ink);
  transition: background-color .2s, border-color .2s, transform .25s var(--ease-spring);
}
.try .i { width: 13px; height: 13px; }
.try:hover { background: var(--green-soft); border-color: var(--green-soft); transform: translateY(-2px); }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Folders (document cards) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 22px 18px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  cursor: pointer; outline-offset: 3px;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s;
}
/* Folders off screen aren't drawn until they scroll near, which keeps big vaults smooth */
.grid .card { content-visibility: auto; contain-intrinsic-size: auto 330px; }
.list .card { content-visibility: auto; contain-intrinsic-size: auto 62px; }
.cabinet { position: relative; height: 134px; margin-top: 16px; }
.folder-back { position: absolute; inset: 0; border-radius: 3px 12px 10px 10px; background: var(--folder); }
.folder-tab {
  position: absolute; left: 0; bottom: 100%; display: flex; align-items: center; gap: 6px;
  max-width: 74%; height: 20px; padding: 0 20px 0 9px;
  border-radius: 8px 0 0 0; background: var(--folder);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
  font: 700 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--folder-ink);
}
.folder-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tab .dot { width: 7px; height: 7px; margin: 0; border-radius: 2px; }
/* The paper tucked inside the folder: a tiny preview of the real document */
.paper {
  position: absolute; left: 12%; right: 12%; top: 10px; height: 116px; padding: 10px 11px;
  overflow: hidden; border-radius: 3px; background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 8px 16px -10px rgba(0, 0, 0, .35);
  font: 400 6.6px/1.55 var(--font-mono);
  transform: rotate(-1.5deg); transform-origin: 50% 100%;
  transition: transform .6s var(--ease-spring);
}
.paper.under { background: var(--paper-2); transform: rotate(2.5deg) translateX(6px); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.paper b {
  display: block; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 7.6px/1.3 var(--font-mono);
}
.paper p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.paper table { width: 100%; border-collapse: collapse; table-layout: fixed; font: 400 6.4px/1.4 var(--font-mono); }
.paper td { padding: 1.5px 3px; border: .5px solid var(--paper-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper tr:first-child td { background: var(--paper-tint); font-weight: 700; }
.paper.ledger { padding: 8px; }
.paper.slide-paper {
  left: 7%; right: 7%; top: 16px; height: 84px; padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px; text-align: center;
  border-top: 3px solid var(--type); font-family: var(--font-body);
}
.paper.slide-paper b { white-space: normal; font: 700 8.6px/1.25 var(--font-body); }
.paper.slide-paper p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 6.4px; }
.paper.photo { left: 15%; right: 15%; padding: 6px 6px 18px; transform: rotate(2deg); }
.paper.photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.paper.photo .ph, .paper.blank { display: flex; justify-content: center; padding-top: 12px; color: var(--type); }
.paper.blank .i, .paper.photo .ph .i { width: 30px; height: 30px; stroke-width: 1.5; }
.folder-front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 10px;
  border-radius: 6px 6px 10px 10px; background: var(--folder-2);
  box-shadow: 0 -1px 0 var(--folder-edge), 0 -8px 14px -12px rgba(0, 0, 0, .4);
  transform-origin: 50% 100%; transition: transform .6s var(--ease-out);
}
.type-tag {
  padding: 4px 7px; border-radius: 5px; background: var(--type); color: #fff;
  font: 700 10px/1 var(--font-mono); letter-spacing: .08em; box-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}
/* Pull the paper out and tip the folder open */
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
  .card:hover .paper:not(.under) { transform: translateY(-18px) rotate(0deg); }
  .card:hover .paper.under { transform: translateY(-7px) rotate(4.5deg) translateX(12px); }
  .card:hover .folder-front { transform: perspective(520px) rotateX(-16deg); }
}
.card:focus-visible .paper:not(.under) { transform: translateY(-18px) rotate(0deg); }
.card:focus-visible .folder-front { transform: perspective(520px) rotateX(-16deg); }

.star-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; place-items: center;
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-glass); color: var(--ink-2);
  transition: transform .35s var(--ease-spring), color .2s, background-color .2s;
}
.star-btn .i { width: 16px; height: 16px; }
.star-btn:hover { color: var(--brass); transform: scale(1.12); }
.star-btn.on { border-color: transparent; background: var(--brass-soft); color: var(--brass); }
.star-btn.on .i, #vStar.on .i { fill: currentColor; }
.star-btn.pop::after {
  content: ""; position: absolute; inset: -3px; border: 2px solid var(--brass); border-radius: 999px;
  animation: ring .55s ease-out forwards; pointer-events: none;
}
.star-btn.pop .i, #vStar.pop .i { animation: star-pop .55s var(--ease-spring); }
@keyframes star-pop { 0% { transform: scale(.3) rotate(-40deg); } 60% { transform: scale(1.3) rotate(8deg); } 100% { transform: none; } }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.row-icon {
  display: none; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: color-mix(in srgb, var(--type) 14%, transparent);
  color: color-mix(in srgb, var(--type) 70%, var(--ink));
}
.card-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 0 2px 2px; }
.card-name {
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-size: 14.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips:empty { display: none; }
.chip {
  display: inline-block; max-width: 100%; height: 22px; padding: 0 9px; overflow: hidden;
  border-radius: 999px; background: var(--hover); color: var(--ink-2);
  font-size: 11.5px; font-weight: 600; line-height: 22px; text-overflow: ellipsis; white-space: nowrap;
}
.chip.cat { background: var(--folder-2); color: var(--folder-ink); }
.chip.grp { background: var(--green-soft); color: var(--green-ink); }
.grid .chip.cat { display: none; } /* the folder's tab already names the category */
.snippet {
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
}
.card-meta { font: 400 11.5px/1.3 var(--font-mono); letter-spacing: .02em; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* List layout */
.list { display: flex; flex-direction: column; gap: 8px; }
.list .card { flex-direction: row; align-items: center; gap: 14px; padding: 10px 58px 10px 12px; border-radius: 14px; }
.list .cabinet { display: none; }
.list .row-icon { display: grid; }
.list .card-body { flex: 1; flex-direction: row; align-items: center; gap: 14px; padding: 0; }
.list .card-name { flex: 1; min-width: 120px; -webkit-line-clamp: 1; }
.list .chips { flex-wrap: nowrap; max-width: 40%; overflow: hidden; }
.list .snippet { display: none; }
.list .star-btn { top: 50%; right: 12px; margin-top: -16px; }
@media (hover: hover) {
  .list .card:hover { transform: translateX(4px); }
}

/* First load: folders rise in one after another, then their papers drop into place */
.intro .card { animation: card-rise .7s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.intro .paper:not(.under) { animation: paper-slip .9s var(--ease-spring) backwards; animation-delay: calc(var(--i, 0) * 55ms + 180ms); }
@keyframes card-rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes paper-slip { from { opacity: 0; transform: translateY(-34px) rotate(-6deg); } }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; text-align: center; }
.empty-art { width: 220px; height: 150px; max-width: 100%; margin-bottom: 4px; }
.empty h2 { margin: 0; font: 400 26px/1.2 var(--font-display); }
.empty p { margin: 0; max-width: 46ch; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.ea-shadow { fill: var(--line); }
.ea-back { fill: var(--folder); }
.ea-front { fill: var(--folder-2); }
.ea-sheet { fill: var(--paper); stroke: var(--paper-line); stroke-width: 1; }
.ea-line { fill: none; stroke: var(--paper-line); stroke-width: 3; stroke-linecap: round; }
.welcome-art .ea-line { stroke-width: 2.5; }
.ea-label { fill: var(--brass); }
.ea-p1 { animation: bob 5s ease-in-out infinite; }
.ea-p2 { animation: bob 5s ease-in-out -2.5s infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }

/* ---------- Drop overlay ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: rgba(16, 22, 18, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.drop-overlay.show { opacity: 1; visibility: visible; }
.drop-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 56px; text-align: center;
  border: 2px dashed var(--green-ink); border-radius: 26px; background: var(--panel); box-shadow: var(--shadow-pop);
  transform: scale(.92); transition: transform .45s var(--ease-spring);
}
.drop-overlay.show .drop-card { transform: none; }
.drop-card .i { width: 42px; height: 42px; color: var(--green-ink); animation: lift 1.4s ease-in-out infinite; }
.drop-card strong { font: 400 23px/1.2 var(--font-display); }
.drop-card span { color: var(--ink-2); }
@keyframes lift { 50% { transform: translateY(-7px); } }

/* ---------- Dialogs ---------- */
dialog { color: var(--ink); }
.dialog {
  width: min(560px, calc(100vw - 32px)); padding: 24px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow-pop);
  opacity: 0; translate: 0 16px; scale: .97;
  transition: opacity .22s ease, translate .4s var(--ease-out), scale .4s var(--ease-out),
    overlay .4s allow-discrete, display .4s allow-discrete;
}
.dialog[open] { opacity: 1; translate: none; scale: none; }
@starting-style { .dialog[open] { opacity: 0; translate: 0 16px; scale: .97; } }
.dialog::backdrop {
  background-color: transparent;
  transition: background-color .3s, overlay .3s allow-discrete, display .3s allow-discrete;
}
.dialog[open]::backdrop { background-color: rgba(16, 22, 18, .45); }
@starting-style { .dialog[open]::backdrop { background-color: transparent; } }
.small-dialog { width: min(400px, calc(100vw - 32px)); }
.small-dialog p { margin: 0; line-height: 1.55; }
.dialog h2 { margin: 0 0 16px; font: 400 22px/1.2 var(--font-display); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid small { font-weight: 400; color: var(--ink-2); }
.dialog input, .dialog textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--field); font-weight: 400; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.dialog input:focus, .dialog textarea:focus { border-color: var(--green-ink); background: var(--panel); box-shadow: 0 0 0 4px var(--ring); }
.dialog textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#uploadStatus { margin: 10px 0 0; }
#uploadStatus:empty { display: none; }

/* Upload checklist: each file ticks off as it is saved */
.file-list {
  margin: 0 0 16px; padding: 4px; max-height: 196px; overflow-y: auto; list-style: none;
  border: 1px solid var(--line); border-radius: 14px; background: var(--field);
}
.file-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 20px; align-items: center; gap: 10px; padding: 7px 8px; font-size: 13px; }
.file-list li + li { border-top: 1px dashed var(--line); }
.fl-icon {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--type) 14%, transparent); color: color-mix(in srgb, var(--type) 70%, var(--ink));
}
.fl-icon .i { width: 15px; height: 15px; }
.fl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.fl-size { font: 400 11.5px/1 var(--font-mono); color: var(--ink-2); }
.fl-state { display: grid; place-items: center; width: 20px; height: 20px; }
.fl-state .i { display: none; width: 17px; height: 17px; stroke-width: 2.4; }
li[data-state="wait"] .fl-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
li[data-state="work"] .fl-state::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--green-soft); border-top-color: var(--green-ink); animation: spin .7s linear infinite;
}
li[data-state="done"] .fl-state .ok { display: block; color: var(--green-ink); stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s var(--ease-out) forwards; }
li[data-state="fail"] .fl-state .bad { display: block; color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.progress { height: 6px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: var(--hover); }
.progress span {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--brass)); transition: width .5s var(--ease-out);
}

/* ---------- Viewer ---------- */
.viewer {
  width: min(1180px, calc(100vw - 32px)); height: calc(100vh - 32px); max-width: none; max-height: none;
  padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px;
  background: var(--panel); box-shadow: var(--shadow-pop);
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background-color: rgba(16, 22, 18, .5); }
.viewer.pop[open] { animation: viewer-pop .42s var(--ease-out); }
@keyframes viewer-pop { from { opacity: 0; transform: translateY(22px) scale(.97); } }
.viewer-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--line); }
.viewer-title {
  flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 19px/1.3 var(--font-display);
}
.viewer-actions { display: flex; align-items: center; gap: 6px; }
.viewer-actions .btn { height: 36px; padding: 0 13px; }
#vStar.on { color: var(--brass-ink); }
.viewer-body { flex: 1; display: flex; min-height: 0; }
.viewer-content { flex: 1; min-width: 0; display: flex; overflow: auto; background: var(--field); }
.viewer-content > * { margin: auto; }
.viewer-info { width: 290px; flex: none; padding: 20px; overflow-y: auto; border-left: 1px solid var(--line); }
.viewer-info dl { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.viewer-info dt {
  margin-bottom: 5px; font: 700 10.5px/1 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.viewer-info dd { margin: 0; overflow-wrap: anywhere; }
.loader { display: flex; gap: 7px; }
.loader span { width: 9px; height: 9px; border-radius: 50%; background: var(--green-ink); animation: dots 1s var(--ease-out) infinite; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { transform: scale(.5); opacity: .35; } 40% { transform: none; opacity: 1; } }

.viewer-content iframe { width: 100%; height: 100%; border: 0; background: var(--paper); }
.viewer-content img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-content video, .viewer-content audio { max-width: 94%; }
.viewer-content pre {
  width: 100%; min-height: 100%; margin: 0; padding: 24px 28px;
  white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13.5px/1.65 var(--font-mono); color: var(--ink);
}
.viewer-content .docx {
  align-self: flex-start; width: min(820px, calc(100% - 32px)); margin: 24px auto; padding: 52px 60px;
  border-radius: 6px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-lift); line-height: 1.65;
}
.viewer-content .docx img { max-width: 100%; }
.viewer-content .docx table { border-collapse: collapse; }
.viewer-content .docx td, .viewer-content .docx th { padding: 4px 8px; border: 1px solid var(--paper-line); }
.viewer-content .pdf-pages { align-self: flex-start; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; }
.viewer-content .pdf-pages canvas { max-width: 100%; height: auto; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-lift); }
.sheet-view { width: 100%; height: 100%; display: flex; flex-direction: column; margin: 0 !important; }
.sheet-table { flex: 1; overflow: auto; background: var(--panel); }
.sheet-table table { min-width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet-table td, .sheet-table th { padding: 6px 12px; border: 1px solid var(--line); white-space: nowrap; }
.sheet-table tr:first-child td { position: sticky; top: 0; background: var(--field); font-weight: 650; }
.sheet-table p { padding: 20px; }
.sheet-tabs { display: flex; flex: none; gap: 2px; padding: 0 8px; overflow-x: auto; border-top: 1px solid var(--line); background: var(--field); }
.sheet-tabs button {
  padding: 9px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--ink-2); font-weight: 600; white-space: nowrap; transition: color .2s, border-color .2s;
}
.sheet-tabs button.active { border-bottom-color: var(--green-ink); background: var(--panel); color: var(--green-ink); }
.slides-view { align-self: flex-start; width: min(840px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 16px; padding: 18px 0 32px; }
.slides-view > p { margin: 0; }
.slide {
  position: relative; min-height: 200px; padding: 28px 32px 28px 64px;
  border-top: 4px solid #b05a1f; border-radius: 12px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-lift);
}
.slide h3 { margin: 0 0 10px; font: 400 21px/1.25 var(--font-display); }
.slide p { margin: 5px 0; line-height: 1.5; }
.slide-no { position: absolute; left: 22px; top: 32px; font: 700 13px/1 var(--font-mono); color: #9a4a14; }
.no-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; text-align: center; }
.np-icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px;
  background: color-mix(in srgb, var(--type) 14%, transparent); color: color-mix(in srgb, var(--type) 70%, var(--ink));
}
.np-icon .i { width: 34px; height: 34px; stroke-width: 1.5; }
.no-preview h3 { margin: 6px 0 0; font: 400 20px/1.2 var(--font-display); }
.no-preview p { margin: 0 0 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 200;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 11px 18px 11px 14px;
  border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-pop);
  font-weight: 600; pointer-events: none;
  opacity: 0; transform: translate(-50%, 24px) scale(.96);
  transition: transform .5s var(--ease-spring), opacity .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 18px; height: 18px; stroke-width: 2.4; color: var(--toast-ok); }
.toast[data-tone="warn"] .i { color: var(--toast-warn); }

/* ---------- Account and sync ---------- */
.account-btn { position: relative; }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--green); color: #fff; font: 700 14px/1 var(--font-body);
}
/* The little light that tells whether everything is saved to the account */
.sync-dot {
  width: 11px; height: 11px; flex: none; border-radius: 999px;
  border: 2px solid var(--panel); background: var(--ink-3);
}
.account-btn .sync-dot { position: absolute; right: 3px; bottom: 3px; }
.sync-dot[data-state="ok"] { background: var(--green-ink); }
.sync-dot[data-state="syncing"] { background: var(--brass); animation: pulse 1.2s ease-in-out infinite; }
.sync-dot[data-state="error"] { background: var(--danger); }
.sync-dot[data-state="warn"] { background: var(--brass); }
@keyframes pulse { 50% { transform: scale(.7); opacity: .55; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack p { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; }
.btn.wide { width: 100%; height: 42px; }
.or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-error { margin: 12px 0 0; font-size: 13px; color: var(--danger); }
.form-error:empty { display: none; }
.sent-note { display: flex; align-items: flex-start; gap: 14px; }
.sent-note p { margin: 0 0 8px; }
.sent-icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border-radius: 14px; background: var(--green-soft); color: var(--green-ink);
}
.sent-icon .i { width: 22px; height: 22px; animation: lift 1.6s ease-in-out infinite; }
.account-email { margin: -8px 0 14px; font-weight: 650; overflow-wrap: anywhere; }
.sync-line {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--field);
}
.sync-line .sync-dot { margin-top: 5px; border-color: var(--field); }
.sync-line p { margin: 0; line-height: 1.5; }
.sync-problems { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--danger); }
.sync-problems li + li { margin-top: 4px; }
.move-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 14px;
  border: 1px dashed var(--line-strong); border-radius: 14px;
}
.move-box p { margin: 0; }
#accountDialog .dialog-actions { flex-wrap: wrap; }
.card-meta .pending { color: var(--brass-ink); }
.card-meta .pending.bad { color: var(--danger); }

/* ---------- View transitions (folders gliding, a folder opening into the viewer, the lamp switching) ---------- */
:root[data-vt="cards"] .card { view-transition-name: var(--vtn, none); }
:root[data-vt="cards"] .topbar { view-transition-name: topbar; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
::view-transition-new(*):only-child { animation: vt-enter .42s cubic-bezier(.2, .8, .2, 1) both; }
::view-transition-old(*):only-child { animation: vt-leave .24s ease both; }
@keyframes vt-enter { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes vt-leave { to { opacity: 0; transform: scale(.94); } }
::view-transition-group(hero) { animation-duration: .5s; animation-timing-function: cubic-bezier(.3, .9, .25, 1); overflow: clip; border-radius: 20px; }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; object-fit: cover; object-position: top; }
:root[data-vt="theme"]::view-transition-old(root), :root[data-vt="theme"]::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .brand { display: none; }
  .topbar { gap: 8px; padding: 0 12px; }
  .sidebar {
    position: fixed; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; z-index: 25;
    width: min(300px, 86vw); height: auto;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: max(14px, env(safe-area-inset-left, 0px));
    border-radius: 0 22px 22px 0; background: var(--panel); box-shadow: var(--shadow-pop);
    transform: translateX(-104%); transition: transform .45s var(--ease-out);
  }
  .sidebar.open { transform: none; }
  .resizing .sidebar, .resizing .backdrop { transition: none; }
  .backdrop {
    display: block; position: fixed; inset: 0; z-index: 24; background: rgba(16, 22, 18, .45);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .backdrop.show { opacity: 1; pointer-events: auto; }
  .main { padding: 22px 16px 64px; }
  .toolbar h1 { font-size: 28px; }
  .welcome { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .welcome-art { display: none; }
  .welcome-actions { flex-direction: row; flex-wrap: wrap; }
  .viewer-body { flex-direction: column; }
  .viewer-info { width: auto; max-height: 38%; border-left: 0; border-top: 1px solid var(--line); }
  .viewer-head { padding: 10px 10px 10px 16px; }
  .viewer-actions { gap: 4px; }
  .viewer-actions .txt { display: none; }
  .viewer-actions .btn { width: 38px; padding: 0; }
  .list .chips, .list .card-meta { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #uploadBtn, #signInBtn { width: 42px; padding: 0; }
  #uploadBtn .btn-text, #signInBtn .btn-text { display: none; }
  .topbar-end { gap: 4px; }
  .search kbd { display: none; }
  .search input { padding-right: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
  .card { gap: 11px; padding: 11px; }
  .cabinet { height: 112px; }
  .paper { height: 96px; }
  .paper.slide-paper { height: 70px; }
  .card-name { font-size: 13.5px; }
  .toolbar { align-items: flex-start; }
  /* Dialogs become sheets that slide up from the bottom */
  .dialog {
    width: 100%; max-width: 100%; margin: auto 0 0;
    padding: 22px max(18px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0; border-radius: 24px 24px 0 0; translate: 0 100%; scale: none;
  }
  .dialog[open] { translate: none; }
  @starting-style { .dialog[open] { translate: 0 100%; } }
  .dialog::before { content: ""; display: block; width: 40px; height: 4px; margin: -8px auto 16px; border-radius: 99px; background: var(--line-strong); }
  .viewer { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; }
}

/* ---------- Less motion when the system asks for it ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
