/* Sleeky Notes: the app (note/app.js, note/editor.js, note/lock.js).
   Layout: on a wide screen, the side list (folders and tags), your notes, and the open note, side by
   side. On a phone, your notes fill the screen (folders and tags become rows of chips) and a note
   opens over them. Light or dark by data-mode on <html>; amber is Notes' own colour, beside
   Slides' purple, Docs' blue and Tasks' green. */
:root { --n-bg: #FFFFFF; --n-app: #F7F7F9; --n-fg: #1D1D1F; --n-muted: #6E6E73; --n-faint: #A1A1A6; --n-line: rgba(0,0,0,0.09); --n-fill: #F2F2F5; --n-card: #F6F6F8; --n-raise: #FFFFFF;
        --n-acc: #F5A80C; --n-acc-ink: #2A1B00; --n-acc-text: #A86A00; --n-acc-soft: rgba(245,168,12,0.16); --n-ok: #12A36A; --n-bad: #D93F45; --n-glow: 50%;
        --n-bloom: inset 0 0 0 1.5px var(--n-acc), -12px 7px 24px -9px color-mix(in srgb, var(--n-acc) var(--n-glow), transparent), 0 9px 22px -10px color-mix(in srgb, #FFD466 var(--n-glow), transparent), 12px 7px 24px -9px color-mix(in srgb, #FF8A4C var(--n-glow), transparent);
        --n-ff: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; color-scheme: light; }
:root[data-mode="dark"] { --n-bg: #0E0E11; --n-app: #131316; --n-fg: #F2F2F5; --n-muted: #A1A1A6; --n-faint: #6E6E76; --n-line: rgba(255,255,255,0.10); --n-fill: #1C1C21; --n-card: #16161A; --n-raise: #1D1D22;
        --n-acc: #FFC53D; --n-acc-text: #FFC53D; --n-acc-soft: rgba(255,197,61,0.16); --n-ok: #2FC184; --n-bad: #FF6B70; --n-glow: 66%; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--n-bg); color: var(--n-fg); font: 15px/1.5 var(--n-ff); -webkit-font-smoothing: antialiased; overflow: hidden; transition: opacity .2s ease; }
html.booting body { opacity: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* focus: a button or a link gets a ring in its own shape, with a soft bloom */
:is(button, a):focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--n-acc); outline-offset: 2px; box-shadow: 0 0 0 6px var(--n-acc-soft); }
/* a field never gets a ring of its own. The shape that holds it lights up, with a soft light in Notes' colours behind
   it (--n-bloom), as the address box does in the Sleek browser */
input:not([type="checkbox"]):focus, input:not([type="checkbox"]):focus-visible { outline: none; }
.search:focus-within, span.chip:focus-within, span.navb:focus-within, .sheet input:not([type="checkbox"]):focus { box-shadow: var(--n-bloom); }
span.chip:focus-within, span.navb:focus-within { background: var(--n-bg); animation: bloom .4s ease; }
@keyframes bloom { from { box-shadow: inset 0 0 0 1.5px transparent, 0 0 0 0 transparent, 0 0 0 0 transparent, 0 0 0 0 transparent; } }
/* on a phone, a field's text is 16px or the page zooms in when the cursor goes into it */
@media (pointer: coarse) { input:not([type="checkbox"]) { font-size: 16px !important; } .chip input { width: 112px; } }

/* inside the Sleek browser on iPhone, its bar takes room at the top or the foot of the screen (--sleek-bar-top, --sleek-bar-bottom) */
.nt { display: grid; grid-template-columns: 236px 356px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: calc(100dvh - var(--sleek-bar-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
.nav { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; background: var(--n-app); border-right: 1px solid var(--n-line); padding: 14px 10px calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
.listp, .notep { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.listp { border-right: 1px solid var(--n-line); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 18px 20px; scrollbar-width: thin; }
.notep .scroll { padding: 12px max(24px, calc(50% - 360px)) 40px; }
.brandrow, .listp .foot, #chips, .back { display: none; }
.grow { flex: 1; }

/* ---------- the side list ---------- */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -0.03em; color: inherit; text-decoration: none; padding: 2px 6px 12px; border-radius: 10px; }
.brand img { display: block; height: auto; }
.navb { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--n-muted); transition: background .2s, color .2s; flex: none; }
.navb svg { font-size: 17px; }
.navb span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navb:hover { background: var(--n-fill); }
.navb[aria-pressed="true"] { background: var(--n-acc-soft); color: var(--n-acc-text); font-weight: 650; }
.navb.new { background: var(--n-acc); color: var(--n-acc-ink); font-weight: 650; margin-bottom: 10px; box-shadow: 0 10px 22px -12px var(--n-acc); transition: transform .15s, box-shadow .25s; }
.navb.new:hover { background: var(--n-acc); box-shadow: 0 14px 28px -12px var(--n-acc), 0 0 0 5px var(--n-acc-soft); }
.navb.new:active { transform: scale(.97); }
.navb input { width: 100%; border: 0; background: none; outline: none; box-shadow: none; }
.navtags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 10px; }
.label { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 650; color: var(--n-faint); margin: 16px 4px 8px; display: flex; align-items: center; gap: 6px; min-height: 22px; }
.label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--n-muted); } .mini:hover { background: var(--n-fill); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding-top: 12px; font-size: 12.5px; color: var(--n-faint); }
.foot button { min-height: 30px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; } .foot button:hover { background: var(--n-fill); color: var(--n-fg); }
.foot svg { font-size: 16px; }

/* ---------- your notes ---------- */
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 13px; background: var(--n-fill); color: var(--n-muted); font-size: 16px; transition: box-shadow .25s; }
.search span { display: grid; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; box-shadow: none; font-size: 15.5px; color: var(--n-fg); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.chips { display: flex; gap: 7px; overflow-x: auto; margin: 0 -18px -16px; padding: 10px 18px 16px; scrollbar-width: none; }   /* room below for a field's bloom */
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 17px; background: var(--n-fill); font-size: 13.5px; font-weight: 600; color: var(--n-muted); white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--n-acc); color: var(--n-acc-ink); }
.chip.tag { height: 30px; padding: 0 11px; font-weight: 550; background: none; box-shadow: inset 0 0 0 1px var(--n-line); }
.chip.tag[aria-pressed="true"] { background: var(--n-acc-soft); color: var(--n-acc-text); box-shadow: inset 0 0 0 1px var(--n-acc); }
.chip input { width: 96px; border: 0; background: none; outline: none; box-shadow: none; font-size: 13.5px; }
.tiles { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }      /* every note is a tile, pinned or not */
.tile { display: flex; flex-direction: column; gap: 8px; padding: 13px; border-radius: 20px; background: var(--n-card); box-shadow: inset 0 0 0 1px var(--n-line); min-height: 118px; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s; }
.tile b { font-weight: 650; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile .sn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }
.ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.sn { font-size: 13.5px; color: var(--n-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk { display: inline-flex; align-items: center; gap: 5px; color: var(--n-faint); font-style: normal; }
/* hover: the lift and bloom of Slides' deck tiles, in the note's own colour */
@media (hover: hover) { .tile:hover { transform: translateY(-2px); background: var(--n-card); box-shadow: inset 0 0 0 1px var(--n-line), 0 14px 30px -18px var(--c, var(--n-acc)), 0 0 0 5px color-mix(in srgb, var(--c, var(--n-acc)) 9%, transparent); } }
.tile.on { background: var(--n-acc-soft); }
.fresh { animation: pop .6s cubic-bezier(.2,1.3,.3,1), ring 1.8s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ring { 0%, 55% { box-shadow: 0 0 0 2px var(--n-acc), 0 0 0 8px var(--n-acc-soft); } 100% { box-shadow: 0 0 0 2px transparent, 0 0 0 8px transparent; } }
.empty { color: var(--n-faint); text-align: center; padding: 46px 10px; font-size: 14px; text-wrap: balance; }
.jot { flex: none; display: flex; gap: 8px; align-items: center; margin: 0 12px calc(14px + env(safe-area-inset-bottom, 0px) + var(--sleek-bar-bottom, 0px)); padding: 6px 6px 6px 16px; border-radius: 26px; background: var(--n-raise); box-shadow: 0 0 0 1px var(--n-line), 0 14px 30px -14px rgba(0,0,0,0.4); transition: box-shadow .25s; }
.jot:focus-within { box-shadow: var(--n-bloom), 0 14px 30px -14px rgba(0,0,0,0.4); }
.jot input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; outline: none; box-shadow: none; font-size: 16px; }
.send { width: 40px; height: 40px; border-radius: 50%; background: var(--n-acc); color: var(--n-acc-ink); display: grid; place-items: center; font-size: 20px; flex: none; transition: transform .15s; }
.send:active { transform: scale(.9); }

/* ---------- a note ---------- */
.in { animation: in .42s cubic-bezier(.2,.8,.2,1); }
@keyframes in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.in.back { animation-name: inb; }
@keyframes inb { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.bar { display: flex; align-items: center; gap: 4px; min-height: 44px; margin: 0 -8px 8px; }
.back { color: var(--n-acc-text); font-weight: 550; font-size: 16px; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 2px; border-radius: 12px; }
.back svg { font-size: 22px; }
.sp { flex: 1; }
.tool { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--n-muted); transition: background .2s, color .2s, transform .2s cubic-bezier(.2,1.4,.3,1); }
.tool:hover { background: var(--n-fill); color: var(--n-fg); }
.tool:active { transform: scale(.88); }
.tool[aria-pressed="true"] { color: var(--n-acc-text); background: var(--n-acc-soft); }
.tool[aria-pressed="true"] svg { fill: color-mix(in srgb, var(--n-acc) 35%, transparent); }
.bigic { width: 60px; height: 60px; border-radius: 19px; font-size: 31px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: 0 16px 34px -18px var(--c); transition: transform .25s cubic-bezier(.2,1.4,.3,1); }
.bigic:hover { transform: scale(1.06) rotate(-3deg); }
.ttl { font-size: 27px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 14px 0 6px; outline: none; border-radius: 8px; overflow-wrap: anywhere; }
:is(.ttl, .body):is(:focus, :focus-visible) { outline: none; box-shadow: none; }      /* where you write shows no ring: the cursor says where you are */
.ttl:empty::before { content: attr(data-ph); color: var(--n-faint); pointer-events: none; }
.body > div:only-child:not(.ck):has(> br:only-child)::before { content: "Write something…"; position: absolute; color: var(--n-faint); pointer-events: none; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--n-faint); }
.meta button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; margin-left: -10px; border-radius: 10px; color: var(--n-muted); font-weight: 550; }
.meta button:hover { background: var(--n-fill); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.body { font-size: 16.5px; line-height: 1.55; outline: none; min-height: 40vh; padding-bottom: 60px; overflow-wrap: anywhere; }
.body b { font-weight: 700; }
/* a checklist line: its box sits in the space to its left, and a click there ticks it (note/editor.js) */
.body .ck { position: relative; padding-left: 32px; margin: 3px 0; }
.body .ck::before { content: ""; position: absolute; left: 2px; top: .22em; width: 20px; height: 20px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--n-faint); cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s cubic-bezier(.2,1.5,.3,1); }
.body .ck[data-done="1"]::before { background: var(--n-acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A1B00' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: none; transform: scale(1.04); }
.body .ck[data-done="1"] { color: var(--n-faint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--n-faint) 60%, transparent); }
.reveal { animation: reveal .7s cubic-bezier(.2,.8,.2,1); }
@keyframes reveal { from { opacity: 0; filter: blur(14px); transform: translateY(8px); } to { opacity: 1; filter: none; transform: none; } }
.vault { margin-top: 6px; padding: 30px 20px; border-radius: 24px; background: var(--n-card); box-shadow: inset 0 0 0 1px var(--n-line); display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 460px; }
.vault .big { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; color: var(--n-acc-text); background: var(--n-acc-soft); margin-bottom: 4px; }
.vault b { font-size: 17px; } .vault span { color: var(--n-muted); font-size: 14px; max-width: 32ch; text-wrap: balance; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 23px; background: var(--n-acc); color: var(--n-acc-ink); font-weight: 650; box-shadow: 0 12px 26px -12px var(--n-acc); transition: transform .15s, opacity .2s; }
.vault .btn { margin-top: 10px; }
.btn svg { font-size: 20px; } .btn:active { transform: scale(.96); } .btn:disabled { opacity: .55; }
.btn.small { height: 40px; padding: 0 16px; border-radius: 20px; box-shadow: none; flex: none; } .btn.wide { width: 100%; }
.hint { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--n-acc-soft); color: var(--n-acc-text); font-size: 13.5px; display: flex; gap: 8px; align-items: center; animation: in .4s; }
.blank { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--n-faint); font-size: 14px; }
.blank svg { font-size: 34px; }

/* ---------- sheets and toasts ---------- */
.shade { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.36); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 430px; max-height: 84dvh; overflow-y: auto; padding: 18px 18px 20px; border-radius: 24px; background: var(--n-raise); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6), 0 0 0 1px var(--n-line); animation: up .4s cubic-bezier(.2,.9,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.grab { display: none; width: 38px; height: 5px; border-radius: 3px; background: var(--n-line); margin: -6px auto 12px; }
.sheet h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.sheet p { margin: 0 0 12px; } .small { font-size: 13.5px; color: var(--n-muted); text-wrap: pretty; } .small b { color: var(--n-fg); } .small.bad { color: var(--n-bad); }
.sheet form { display: grid; gap: 10px; }
.sheet form.line { grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.sheet input:not([type="checkbox"]) { height: 46px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--n-fill); font-size: 16px; min-width: 0; transition: box-shadow .25s, background .2s; }
.tick { display: flex; gap: 10px; align-items: center; font-size: 14.5px; padding: 4px 2px; } .tick input { width: 20px; height: 20px; accent-color: var(--n-acc); }
.icons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.icons button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--n-muted); background: var(--n-fill); transition: transform .2s cubic-bezier(.2,1.4,.3,1), color .2s, background .2s; }
.icons button:hover { transform: scale(1.08); }
.icons button[aria-pressed="true"] { color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 2px var(--c); }
.dots { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.dots button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); transition: transform .2s cubic-bezier(.2,1.4,.3,1); }
.dots button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--n-raise), 0 0 0 5px var(--c); transform: scale(.9); }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border-radius: 14px; font-weight: 550; }
.pick:hover { background: var(--n-fill); } .pick svg { font-size: 19px; color: var(--n-muted); }
.pick[aria-pressed="true"] { background: var(--n-acc-soft); color: var(--n-acc-text); } .pick[aria-pressed="true"] svg, .pick.bad svg { color: inherit; }
.pick.bad { color: var(--n-bad); margin-top: 6px; }
.news { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; margin-bottom: 14px; } .news span { color: var(--n-faint); font-size: 12.5px; }
.news ul { grid-column: 1 / -1; margin: 4px 0 0; padding-left: 18px; color: var(--n-muted); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px) + var(--sleek-bar-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-radius: 20px; background: var(--n-fg); color: var(--n-bg); font-size: 13.5px; font-weight: 600; max-width: calc(100vw - 32px); animation: toast .35s cubic-bezier(.2,.9,.2,1); }
.toast button { color: var(--n-acc); font-weight: 700; padding: 2px 4px; border-radius: 6px; }
:root:not([data-mode="dark"]) .toast button { color: #FFC53D; }
@keyframes toast { from { transform: translate(-50%, 20px); opacity: 0; } }

/* ---------- movement between views (note/app.js: move), with the browser's view transitions, as Sleek Tasks moves ----------
   data-shift on <html> says what kind of change is under way:
     open, close   a phone: the note grows out of its tile, and draws back into it
     fwd, back     a phone, when that tile is not on the screen: the note slides in from the right, the list from the left
     swap          a wide screen: the note beside the list changes with a soft rise
     list          the list changed: each note (named n-<id> for the moment) glides to its new place; new ones pop in
     fade          the note locks or its lock comes off;   look   light or dark */
.in.still { animation: none; }
.toast.out { opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
/* the menu on a note: hold it, or right-click it (note/app.js, noteMenu). Held, the note lifts off the list (.ghost) and
   the rest blurs behind it; the menu grows out of the corner nearest the note */
.tile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tile.holding { transform: scale(.96); transition-duration: .4s; }
/* swipe a note to the left to delete it (note/app.js): red shows behind it (.wipe), and the bin grows once letting go will delete */
.tile { touch-action: pan-y; }
.tile.swiping { position: relative; z-index: 1; background: var(--n-card); transition: none; }
.wipe { position: absolute; z-index: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 20px; border-radius: 20px; background: var(--n-bad); color: #fff; font-size: 24px; animation: fade .12s; transition: opacity .2s ease; }
.wipe svg { transition: transform .25s cubic-bezier(.2,.9,.2,1.5); } .wipe.over svg { transform: scale(1.4); }
.wipe.gone { opacity: 0; }
.shade.menu { display: block; padding: 0; background: none; animation: none; }
.shade.menu.lift { background: color-mix(in srgb, var(--n-bg) 50%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); animation: fade .25s; }
.ghost { position: fixed; margin: 0; background: var(--n-raise); transform: scale(1.03); view-transition-class: none; animation: lift .42s cubic-bezier(.2,.9,.2,1.25) both;
         box-shadow: inset 0 0 0 1px var(--n-line), 0 26px 50px -20px rgba(0,0,0,0.5), 0 14px 46px -14px color-mix(in srgb, var(--c) 55%, transparent); }
@keyframes lift { from { transform: scale(.96); box-shadow: inset 0 0 0 1px var(--n-line), 0 0 0 0 transparent, 0 0 0 0 transparent; } }
.ctx { position: fixed; display: grid; gap: 1px; width: 244px; padding: 6px; border-radius: 18px; background: color-mix(in srgb, var(--n-raise) 86%, transparent); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
       box-shadow: 0 0 0 1px var(--n-line), 0 26px 60px -22px rgba(0,0,0,0.55); animation: ctx .3s cubic-bezier(.2,.9,.2,1.15) both; }
@keyframes ctx { from { opacity: 0; transform: scale(.6); } }
.ctx button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15.5px; font-weight: 500; transition: background .15s; }
.ctx button:hover, .ctx button:focus-visible { background: var(--n-fill); outline: none; box-shadow: none; }
.ctx button:active { background: var(--n-acc-soft); }
.ctx svg { font-size: 19px; color: var(--n-muted); }
.ctx .bad, .ctx .bad svg { color: var(--n-bad); }
.ctx hr { border: 0; height: 1px; margin: 4px 8px; background: var(--n-line); }
.shade.menu.out .ctx { opacity: 0; transform: scale(.86); transition: opacity .18s ease, transform .18s ease; }
.shade.menu.out .ghost { transform: none; transition: transform .2s ease; }
.shade.out { opacity: 0; pointer-events: none; transition: opacity .2s ease; } .shade.out .sheet { transform: translateY(26px); transition: transform .2s cubic-bezier(.4,0,1,1); }
/* the first time the list is drawn, its notes rise in one after another */
.first .tile { animation: vt-rise .5s cubic-bezier(.2,.8,.2,1) both; }
.first .tile:nth-child(2) { animation-delay: .04s; } .first .tile:nth-child(3) { animation-delay: .08s; } .first .tile:nth-child(4) { animation-delay: .12s; }
.first .tile:nth-child(5) { animation-delay: .16s; } .first .tile:nth-child(6) { animation-delay: .2s; } .first .tile:nth-child(n+7) { animation-delay: .24s; }
@keyframes vt-fade { to { opacity: 0; } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes vt-on-right { from { opacity: 0; transform: translateX(34px); } }
@keyframes vt-on-left { from { opacity: 0; transform: translateX(-34px); } }
@keyframes vt-off-left { to { opacity: 0; transform: translateX(-34px); } }
@keyframes vt-off-right { to { opacity: 0; transform: translateX(34px); } }
@keyframes vt-pop { from { opacity: 0; transform: scale(.86); } }
@keyframes vt-shrink { to { opacity: 0; transform: scale(.9); } }
.tile { view-transition-class: card; }
@media (min-width: 860px) { .notep { view-transition-name: pane; } }
@media (max-width: 859px) { .nt.open .notep { view-transition-name: note; } }
::view-transition-group(*) { animation-duration: .44s; animation-timing-function: cubic-bezier(.3,.85,.2,1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
html[data-shift]::view-transition-old(root) { animation: .2s ease both vt-fade; } html[data-shift]::view-transition-new(root) { animation: none; }
html[data-shift="look"]::view-transition-old(root) { animation: .36s ease both vt-fade; }
html[data-shift="open"]::view-transition-group(note), html[data-shift="close"]::view-transition-group(note) { animation-duration: .5s; animation-timing-function: cubic-bezier(.3,.9,.2,1); border-radius: 20px; overflow: clip; }
html:is([data-shift="open"], [data-shift="close"])::view-transition-old(note), html:is([data-shift="open"], [data-shift="close"])::view-transition-new(note) { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
/* the tile is small and the note is large: stretched across the whole movement its words would loom, so it is seen only while it is near its own size */
@keyframes vt-in { from { opacity: 0; } }
html[data-shift="open"]::view-transition-old(note) { animation: .12s ease both vt-fade; } html[data-shift="open"]::view-transition-new(note) { animation: .2s ease both vt-in; }
html[data-shift="close"]::view-transition-old(note) { animation: .26s ease .16s both vt-fade; } html[data-shift="close"]::view-transition-new(note) { animation: .18s ease .32s both vt-in; }
html[data-shift="fwd"]::view-transition-old(root) { animation: .22s cubic-bezier(.4,0,1,1) both vt-off-left; } html[data-shift="fwd"]::view-transition-new(note) { animation: .4s cubic-bezier(.2,.8,.2,1) .06s both vt-on-right; }
html[data-shift="back"]::view-transition-old(note) { animation: .22s cubic-bezier(.4,0,1,1) both vt-off-right; } html[data-shift="back"]::view-transition-new(root) { animation: .4s cubic-bezier(.2,.8,.2,1) .06s both vt-on-left; }
html[data-shift="swap"]::view-transition-old(pane) { animation: .16s ease both vt-fade; } html[data-shift="swap"]::view-transition-new(pane) { animation: .42s cubic-bezier(.2,.8,.2,1) .04s both vt-rise; }
html[data-shift="fade"]::view-transition-old(pane), html[data-shift="fade"]::view-transition-old(note) { animation: .18s ease both vt-fade; }
html[data-shift="fade"]::view-transition-new(pane), html[data-shift="fade"]::view-transition-new(note) { animation: .42s cubic-bezier(.2,.8,.2,1) .04s both vt-rise; }
/* a note that changes shape on its way (a pinned tile becomes a row): its box changes size, and what is in it is drawn at its own size, never stretched */
::view-transition-group(.card) { overflow: clip; border-radius: 16px; }
::view-transition-old(.card), ::view-transition-new(.card) { width: 100%; height: 100%; object-fit: none; object-position: left top; }
::view-transition-new(.card):only-child { animation: .44s cubic-bezier(.2,1.25,.3,1) both vt-pop; } ::view-transition-old(.card):only-child { animation: .2s ease both vt-shrink; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- a narrower screen: no side list; then, on a phone, one thing at a time ---------- */
@media (max-width: 1100px) { .nt { grid-template-columns: 208px 316px minmax(0, 1fr); } }
@media (max-width: 859px) {
  .nt { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .listp { border-right: 0; }
  .nt.open .listp, .nt:not(.open) .notep { display: none; }
  .brandrow { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 10px; }
  .brandrow .brand { font-size: 28px; padding: 0; gap: 10px; }
  .round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--n-fill); transition: transform .15s; } .round:active { transform: scale(.92); }
  #chips, .listp .foot { display: block; } .listp .foot { display: flex; justify-content: center; padding: 22px 0 4px; }
  .back { display: inline-flex; }
  .scroll { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .notep .scroll { padding: 6px max(20px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px) + var(--sleek-bar-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .listp::before { content: ""; position: absolute; inset: calc(0px - env(safe-area-inset-top, 0px)) 0 auto 0; height: calc(280px + env(safe-area-inset-top, 0px)); pointer-events: none; background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--n-acc) 22%, transparent), transparent 60%), radial-gradient(90% 70% at 100% 0%, rgba(255,142,224,0.12), transparent 60%); }
  .listp > * { position: relative; }
  .shade { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-radius: 28px 28px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px) + var(--sleek-bar-bottom, 0px)); } .grab { display: block; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }
