/* Fornax — library window.
   Look (2026-11-12): a native macOS app, the way SwiftUI draws one on Tahoe. The user asked for "apple style with swift ui"
   after saving the Mizu Pro popover (ui-elements/2026-11-12-bestdesignsonx-780eac), and for the "ascii" to stay.
   - A floating sidebar (real macOS sidebar material in the app: main.mjs turns on vibrancy and adds ?vib=1), accent-tinted
     icons, a grey selection; a toolbar of glass capsules over the content; a large title; Photos-style cards.
   - Grouped sections like System Settings for Settings, Connect and the inspector; menus with a soft grey highlight.
   - SF Pro at macOS sizes (13px body), Apple's label/fill/separator colors, light and dark from the system.
   - The dithered Caesar stays: the home banner (ui/night.js), the faint bust beside page titles, the mark.
   Earlier look (Marcel-style SaaS, 2026-11-10/11) is in git-less backups; see memory. Icons: Hugeicons, monochrome. */
:root {
  --window: #ffffff; --panel: var(--window); --page: var(--window);
  --side: #f3f3f6; --side-tint: rgba(250, 250, 252, .42); --side-edge: rgba(0, 0, 0, .07);
  --raised: #ffffff; --group: #f5f5f7; --well: #f3f3f5; --stage: #101011;
  --glass: rgba(255, 255, 255, .82); --glass-edge: rgba(0, 0, 0, .085);
  --track: rgba(118, 118, 128, .12); --track-2: rgba(118, 118, 128, .2);
  --hover: rgba(0, 0, 0, .045); --hover-2: rgba(0, 0, 0, .065); --press: rgba(0, 0, 0, .08); --sel: rgba(0, 0, 0, .075);
  --ink: rgba(0, 0, 0, .86); --ink-2: rgba(0, 0, 0, .68); --muted: rgba(60, 60, 67, .6); --faint: rgba(60, 60, 67, .32);
  --line: rgba(0, 0, 0, .075); --line-2: rgba(0, 0, 0, .1); --line-3: rgba(0, 0, 0, .17);
  --accent: #2f55ff; --accent-2: #4a6bff; --accent-soft: rgba(47, 85, 255, .1); --accent-ink: #2442e6; --focus: rgba(47, 85, 255, .3);
  --ink-btn: #161616;
  --green: #1f9d55; --green-soft: rgba(31, 157, 85, .11); --red: #e5484d; --red-soft: rgba(229, 72, 77, .1); --amber: #b26a00; --amber-soft: rgba(255, 159, 10, .14);
  --shadow-glass: 0 0 0 .5px var(--glass-edge), 0 1px 2px rgba(0, 0, 0, .05), 0 4px 14px -6px rgba(0, 0, 0, .1);
  --shadow-card: 0 0 0 .5px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-pop: 0 0 0 .5px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06), 0 16px 40px -10px rgba(0, 0, 0, .24);
  --shadow-btn: var(--shadow-glass);
  --seg-on: #ffffff; --seg-on-shadow: none;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.25, .4, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --window: #1e1e20;
    --side: #29292c; --side-tint: rgba(36, 36, 40, .38); --side-edge: rgba(255, 255, 255, .08);
    --raised: #2c2c30; --group: rgba(255, 255, 255, .045); --well: #18181a; --stage: #080809;
    --glass: rgba(64, 64, 70, .72); --glass-edge: rgba(255, 255, 255, .1);
    --track: rgba(118, 118, 128, .24); --track-2: rgba(118, 118, 128, .34);
    --hover: rgba(255, 255, 255, .06); --hover-2: rgba(255, 255, 255, .09); --press: rgba(255, 255, 255, .1); --sel: rgba(255, 255, 255, .1);
    --ink: rgba(255, 255, 255, .9); --ink-2: rgba(255, 255, 255, .72); --muted: rgba(235, 235, 245, .55); --faint: rgba(235, 235, 245, .28);
    --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .1); --line-3: rgba(255, 255, 255, .17);
    --accent: #4a6bff; --accent-2: #6a85ff; --accent-soft: rgba(74, 107, 255, .2); --accent-ink: #9fb0ff; --focus: rgba(74, 107, 255, .45);
    --ink-btn: #f3f3f3;
    --green: #4cd486; --green-soft: rgba(76, 212, 134, .13); --red: #ff6961; --red-soft: rgba(255, 105, 97, .13); --amber: #ffbf4d; --amber-soft: rgba(255, 191, 77, .13);
    --shadow-glass: 0 0 0 .5px var(--glass-edge), 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -6px rgba(0, 0, 0, .4);
    --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-pop: 0 0 0 .5px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .3), 0 18px 44px -10px rgba(0, 0, 0, .6);
    --seg-on: rgba(255, 255, 255, .2); --seg-on-shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--window); color: var(--ink); font: 13px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.drag { -webkit-app-region: drag; }
.no-drag, .drag button, .drag input, .drag a, .drag label, .drag [contenteditable] { -webkit-app-region: no-drag; }
/* Overlays sit above the title-bar drag strip; without this Electron swallows clicks on their top rows. */
.detail-wrap, .sheet-wrap, .modal-wrap, .lightbox, .menu, .toast { -webkit-app-region: no-drag; }
code, .mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; }
code { font-size: 11.5px; background: var(--track); padding: 1px 5px; border-radius: 5px; }
.hi { width: 17px; height: 17px; flex: none; display: block; }
.cap-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.vdiv { display: none; }

/* ---------- window + floating sidebar ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100vh; background: var(--window); }
.side { margin: 8px 0 8px 8px; border-radius: 18px; background: var(--side); box-shadow: inset 0 0 0 .5px var(--side-edge);
  display: flex; flex-direction: column; padding: 0 10px 10px; overflow-y: auto; scrollbar-width: none; }
/* In the app the sidebar is the real macOS sidebar material: the page is clear there, and the gutters around it are painted
   window-white by the spread shadow, so the sidebar floats like Tahoe's. */
html.vib, html.vib body, html.vib .shell { background: transparent; }
html.vib .side { background: var(--side-tint); box-shadow: inset 0 0 0 .5px var(--side-edge), 0 0 0 48px var(--window); }
.side > * { flex-shrink: 0; } /* the sidebar scrolls when it's taller than the window; nothing in it gets squashed */
.side-top { height: 36px; flex: none; } /* the traffic lights live here */
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 12px; }
.brand b { flex: 1; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.ws-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mark { width: 22px; height: 22px; flex: none; display: block; border-radius: 6px; image-rendering: pixelated; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2); } /* the dithered Caesar, ui/mark.png */
.search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 9px; margin: 0 0 10px; border-radius: 999px; background: var(--track); color: var(--muted); transition: background .15s, box-shadow .15s; }
.search .hi { width: 15px; height: 15px; }
.search input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; color: var(--ink); font-size: 13px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 500 11px -apple-system, system-ui, sans-serif; color: var(--faint); letter-spacing: .04em; transition: opacity .15s; }
.search:focus-within { box-shadow: 0 0 0 3px var(--focus); background: var(--raised); }
.search.has kbd { opacity: 0; }
.sec { display: flex; align-items: center; justify-content: space-between; height: 28px; margin-top: 10px; padding: 0 2px 0 8px; font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .01em; }
.sec-add { width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; opacity: 0; transition: background .15s, color .15s, opacity .15s; }
.side:hover .sec-add, .sec-add:focus-visible { opacity: 1; }
.sec-add .hi { width: 15px; height: 15px; }
.sec-add:hover { background: var(--hover); color: var(--ink); }
.nav-btn, .skill { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; border: 0; background: transparent; border-radius: 8px; padding: 0 8px; text-align: left; color: var(--ink); font-size: 13px; transition: background .12s; }
.nav-btn > span, .skill > .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-btn .hi, .skill .stile { color: var(--accent); } /* macOS sidebars tint their symbols with the accent */
.nav-btn:hover, .skill:hover { background: var(--hover); }
.nav-btn:active, .skill:active { background: var(--press); }
.nav-btn.on, .skill.on { background: var(--sel); }
.skills { display: flex; flex-direction: column; gap: 1px; }
.skill .stile { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.skill .stile .hi { width: 17px; height: 17px; }
.skill em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 1px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: #30d158; }

/* ---------- content + toolbar ---------- */
.main { display: flex; min-width: 0; min-height: 0; background: var(--window); }
.panel { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--window); overflow-y: auto; position: relative; }
.topbar { position: sticky; top: 0; z-index: 7; flex: none; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px 0 20px;
  background: color-mix(in srgb, var(--window) 78%, transparent); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); transition: box-shadow .2s; }
.panel.scrolled .topbar:has(+ .toolbar[hidden]), .panel.scrolled .toolbar { box-shadow: 0 .5px 0 var(--line-2); }
.skill-icon { border: 0; padding: 0; background: none; border-radius: 9px; flex: none; }
.htile { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); transition: transform .3s var(--spring); }
.htile .hi { width: 17px; height: 17px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: -.01em; min-width: 0; flex: 1; }
.crumbs .hi { width: 14px; height: 14px; color: var(--faint); }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-tools { display: flex; align-items: center; gap: 8px; flex: none; }

/* buttons: glass capsules, one accent-filled capsule */
.btn { border: 0; border-radius: 999px; height: 30px; padding: 0 14px; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; background: transparent; color: var(--ink); transition: background .15s, color .15s, transform .12s var(--ease), opacity .15s, box-shadow .15s, filter .15s; }
.btn .hi { width: 16px; height: 16px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.icon { width: 30px; padding: 0; }
/* no shadows on buttons (the user's call, 2026-11-12): flat fills, the shape and the color do the work */
.btn.raised, .btn.line { background: var(--track); color: var(--ink); }
.btn.raised:hover, .btn.line:hover { background: var(--track-2); }
.btn.raised .hi, .btn.line .hi { color: var(--ink-2); }
.topbar .btn { height: 34px; }
.topbar .btn.icon { width: 34px; }
.topbar .btn .hi { width: 18px; height: 18px; }
#sortBtn .hi:last-child { width: 13px; height: 13px; color: var(--muted); margin-right: -4px; }
.btn.primary { color: #fff; background: var(--accent); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); color: #fff; }
.btn.primary .hi { color: #fff; }
.btn.text { color: var(--muted); }
.btn.small { height: 26px; padding: 0 12px; font-size: 12.5px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn[disabled] { opacity: .45; }
#rulesBtn.busy .hi { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the second toolbar row: a scope bar (filters), sort, grid/list */
.toolbar { position: sticky; top: 54px; z-index: 6; flex: none; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 6px 20px;
  background: color-mix(in srgb, var(--window) 78%, transparent); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); transition: box-shadow .2s; }
/* segmented control */
.seg { display: flex; gap: 0; padding: 2px; border-radius: 999px; background: var(--track); min-width: 0; }
.seg button { flex: none; height: 26px; min-width: 28px; border: 0; background: transparent; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; justify-content: center; transition: background .18s, color .15s, box-shadow .18s; }
.seg button .hi { width: 16px; height: 16px; }
#viewSeg button { padding: 0; width: 34px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-on-shadow); }
.seg button em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] em { color: var(--muted); }
.tabs { overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.over { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
/* the toolbar gives way from the tabs (they scroll, with the fade): sort and grid/list always stay whole */
.toolbar > :not(.tabs) { flex: none; }
.toolbar .tabs { flex: 0 1 auto; min-width: 0; }
@media (max-width: 1180px) {
  #sortLabel { display: none; }              /* sort keeps its icon and chevron; the menu still names the order */
  #sortBtn { padding: 0 10px; }
}
@media (max-width: 1020px) {
  .toolbar { gap: 8px; padding: 0 12px 6px 16px; }
  #shown { display: none; }
  #sortBtn { margin-left: auto; }
}
.hint { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- the page ---------- */
.well { flex: 1 0 auto; background: var(--page); }
.phead { padding: 18px 28px 18px; position: relative; }
/* a faint dithered Caesar on the right of each page title, like the ASCII temple on the Firecrawl page the user saved */
.phead.art { padding-right: 140px; }
.phead.art::after { content: ""; position: absolute; right: 32px; top: 4px; width: 66px; height: 84px; background: url(/ui/bust-faint.png) right top / 66px 84px no-repeat; image-rendering: pixelated; opacity: .12; pointer-events: none; }
@media (prefers-color-scheme: dark) { .phead.art::after { opacity: .28; } }
.phead h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.022em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 7px; padding: 0 5px; margin-left: -5px; outline: none; max-width: max-content; }
.phead h1[contenteditable="true"] { cursor: text; }
.phead h1[contenteditable="true"]:hover { background: var(--hover); }
.phead h1[contenteditable="true"]:focus { background: var(--raised); box-shadow: 0 0 0 .5px var(--line-3), 0 0 0 3.5px var(--focus); }
.phead p { margin: 4px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- home banner (Recent saves): the dithered night, words on the left ---------- */
.banner { position: relative; margin: 6px 24px 0; height: 220px; border-radius: 16px; overflow: hidden; background: #05061a; color: #fff; isolation: isolate;
  box-shadow: 0 0 0 .5px rgba(5, 6, 26, .2), 0 10px 30px -18px rgba(5, 6, 26, .55); }
.banner[hidden] { display: none; }
.banner-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; image-rendering: pixelated; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(150, 160, 255, .14); pointer-events: none; }
.banner-copy { height: 100%; max-width: 470px; padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.banner-pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 4px; border-radius: 99px; font-size: 12px; font-weight: 500; color: #dfe3ff;
  background: rgba(5, 6, 26, .5); box-shadow: inset 0 0 0 .5px rgba(150, 160, 255, .3); backdrop-filter: blur(6px); }
.banner-pill img { display: block; border-radius: 4px; image-rendering: pixelated; }
.banner h2 { margin: 12px 0 0; font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; text-shadow: 0 2px 16px rgba(5, 6, 26, .7); }
.banner p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: #c9cefc; text-shadow: 0 1px 8px rgba(5, 6, 26, .9); }
.banner-btns { display: flex; gap: 8px; margin-top: 18px; }
.hbtn { height: 32px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; border: 0; transition: transform .12s, background .15s, filter .15s; }
.hbtn .hi { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.hbtn:active { transform: scale(.97); }
.hbtn.solid { background: #fff; color: #05061a; }
.hbtn.solid:hover .hi { transform: translateX(2px); }
.hbtn.ghost { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.hbtn.ghost:hover { background: rgba(255, 255, 255, .18); }
@media (max-width: 1000px) { .banner p { display: none; } }

.stat { background: var(--raised); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow-card); }

/* ---------- saves: Photos-style — the picture is the card, the caption sits under it ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 22px 18px; padding: 0 24px 32px; }
.card { position: relative; cursor: default; outline: none; min-width: 0; background: none; border-radius: 12px; }
.card .media { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--well); isolation: isolate; box-shadow: var(--shadow-card); transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.card .media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06); pointer-events: none; z-index: 3; }
.card:focus-visible .media { box-shadow: 0 0 0 3px var(--focus), var(--shadow-card); }
.card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease), opacity .25s; }
.card .media video { opacity: 0; }
.card.playing .media video { opacity: 1; }
.card .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 12px; }
/* loading placeholders while a page's saves arrive */
.card.skel { pointer-events: none; }
.card.skel .media, .card.skel i { background: linear-gradient(90deg, var(--well) 30%, var(--track) 50%, var(--well) 70%) 0 0 / 300% 100%; animation: skel 1.4s ease-in-out infinite; box-shadow: none; }
.card.skel i { display: block; height: 11px; width: 46%; margin: 11px 2px 6px; border-radius: 6px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
.badge { position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; height: 22px; font-size: 11.5px; font-weight: 600; padding: 0 8px 0 6px; border-radius: 99px; background: rgba(0, 0, 0, .42); color: #fff; backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6); font-variant-numeric: tabular-nums; }
.badge .hi { width: 12px; height: 12px; }
.peek { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 40px 12px 10px; color: #fff; font-size: 12px; line-height: 1.4; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .34) 55%, transparent); opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .3s var(--ease); pointer-events: none; }
.peek span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .peek, .card:focus-visible .peek { opacity: 1; transform: none; }
/* the hover action: copy the save's id to reference it in Claude */
.fab { position: absolute; top: 8px; right: 8px; z-index: 2; height: 26px; padding: 0 10px 0 8px; border: 0; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: #161616; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6); opacity: 0; transform: scale(.88); transition: opacity .18s, transform .25s var(--spring), background .15s, color .15s; }
.fab .hi { width: 14px; height: 14px; }
.fab:hover { background: #fff; }
.fab.done { color: var(--green); }
.card:hover .fab, .card:focus-within .fab, .lrow:hover .fab, .lrow:focus-within .fab { opacity: 1; transform: none; }
.cap { display: flex; align-items: baseline; gap: 8px; padding: 9px 2px 0; font-size: 13px; min-width: 0; }
.cap b { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap time { margin-left: auto; flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 3px; }
.cap time .hi { display: none; }

/* list view: an inset grouped list */
.grid.list { display: block; margin: 0 24px 32px; padding: 0; background: var(--group); border-radius: 12px; overflow: hidden; }
.lhead, .lrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) 170px 60px; gap: 14px; align-items: center; padding: 0 14px; }
.lhead { height: 32px; box-shadow: inset 0 -.5px 0 var(--line-2); }
.lhead span { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.lrow { position: relative; min-height: 60px; cursor: default; transition: background .12s; }
.lrow + .lrow::before { content: ""; position: absolute; top: 0; left: 84px; right: 14px; height: .5px; background: var(--line-2); }
.lrow:hover { background: var(--hover); }
.lrow:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.lrow .lt { width: 56px; height: 42px; border-radius: 7px; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 .5px var(--line-2); }
.lrow .lt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lrow .lmain { min-width: 0; }
.lrow .lmain b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .lmain span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .lsrc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow time { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.lrow .fab { top: 50%; right: 14px; margin-top: -13px; background: var(--track-2); color: var(--ink); }

.card.fresh { animation: cardIn .7s var(--ease) both; }
.card.fresh .media { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card); }
@keyframes cardIn { from { opacity: 0; filter: blur(10px); transform: translateY(-6px) scale(.97); } }

.empty { text-align: center; color: var(--muted); padding: 72px 20px; max-width: 440px; margin: 0 auto; }
.empty .hi { width: 30px; height: 30px; margin: 0 auto 12px; color: var(--faint); }
.empty h2 { color: var(--ink); font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.empty p { margin: 0; }
.empty ol { text-align: left; display: inline-block; margin: 14px 0 0; padding-left: 20px; line-height: 1.9; }

/* ---------- menus: like Apple's newer popovers (Control Center, the Wi-Fi menu) — a soft grey row under the pointer;
   blue only marks the choice (the tick). The user didn't want solid blue rows (2026-11-12). ---------- */
.menu { position: fixed; z-index: 50; min-width: 220px; padding: 5px; background: color-mix(in srgb, var(--raised) 88%, transparent); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border-radius: 12px; box-shadow: var(--shadow-pop); animation: menuIn .16s var(--ease) both; }
@keyframes menuIn { from { opacity: 0; transform: scale(.98); } }
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 26px; padding: 0 9px; border: 0; background: transparent; border-radius: 7px; font-size: 13px; color: var(--ink); text-align: left; outline: none; }
.menu button > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu button .hi { width: 16px; height: 16px; color: var(--ink-2); }
.menu button:hover, .menu button:focus-visible { background: var(--hover-2); }
.menu button.danger { color: var(--red); }
.menu button.danger .hi { color: var(--red); }
.menu button.danger:hover, .menu button.danger:focus-visible { background: var(--red-soft); }
.menu button .tick { width: 15px; height: 15px; color: var(--accent); margin-left: auto; }
.menu .sp { width: 16px; flex: none; }
.menu .sep { height: .5px; background: var(--line-3); margin: 5px 9px; }
.menu .label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 9px 3px; }

/* ---------- overlays ---------- */
.detail-wrap, .sheet-wrap, .modal-wrap { position: fixed; inset: 0; z-index: 20; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .2); animation: fade .25s ease both; }
@media (prefers-color-scheme: dark) { .scrim { background: rgba(0, 0, 0, .4); } }
@keyframes fade { from { opacity: 0; } }
.ibtn { width: 30px; height: 30px; border-radius: 999px; border: 0; background: var(--track); color: var(--ink-2); display: grid; place-items: center; flex: none; transition: background .15s, color .15s, transform .12s var(--ease); }
.ibtn .hi { width: 16px; height: 16px; }
.ibtn:hover:not(:disabled) { color: var(--ink); background: var(--track-2); }
.ibtn:active:not(:disabled) { transform: scale(.94); }
.ibtn:disabled { opacity: .35; }
.ibtn.done { color: var(--green); }
.ibtn.danger:hover:not(:disabled) { color: #fff; background: var(--red); }

/* ---------- a save, opened: a window with an inspector ---------- */
/* It takes the whole window (2026-11-13: the floating card on a grey scrim read as a second window behind the traffic lights). */
.detail { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; background: var(--window); overflow: hidden; animation: detailIn .3s var(--ease) both; }
@keyframes detailIn { from { opacity: 0; transform: scale(.992); } }
.detail-wrap .scrim { display: none; }
/* The traffic lights sit over the stage's top-left: a title-bar strip there drags the window, and the media starts below it. */
html.app .stage::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 1; -webkit-app-region: drag; }
.stage-tools, .stage-tools button { -webkit-app-region: no-drag; } /* later in the page than the strip, so they cut holes in it */
html.app .viewer { padding-top: 52px; }
.info-head { -webkit-app-region: drag; }
.info-head button, .info-head .who { -webkit-app-region: no-drag; }
.stage { position: relative; background: var(--well); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.viewer { position: relative; flex: 1; min-height: 0; display: flex; padding: 28px; }
.viewer > img, .viewer > video { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--line-2), 0 20px 50px -24px rgba(0, 0, 0, .4); animation: lbIn .3s var(--ease) both; }
.viewer > img { cursor: zoom-in; }
.viewer .ph { margin: auto; color: var(--faint); }
.stage-tools { position: absolute; top: 10px; right: 14px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.stage:hover .stage-tools, .stage-tools:focus-within { opacity: 1; }
.thumbs { position: relative; flex: none; display: flex; gap: 8px; justify-content: safe center; padding: 0 20px 18px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { flex: none; height: 44px; min-width: 44px; max-width: 110px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--raised); opacity: .55; box-shadow: 0 0 0 .5px var(--line-2); transition: opacity .15s, box-shadow .2s, transform .25s var(--spring); }
.thumbs button:hover { opacity: .9; }
.thumbs button.on { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); }
/* Whole image, never cropped: each thumb takes its picture's own shape (very wide ones letterbox at 110px). */
.thumbs img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }

.info { display: flex; flex-direction: column; min-height: 0; min-width: 0; box-shadow: inset .5px 0 0 var(--line-2); background: var(--side); }
.info-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; }
.av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--track-2); }
.info-head .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.info-head .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-head .who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-head .tools { display: flex; gap: 6px; }
.info-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 16px 26px; display: flex; flex-direction: column; gap: 16px; }
.info-body > * { flex-shrink: 0; }
.why { display: flex; flex-direction: column; gap: 6px; }
.why > span { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.why > span small { font-size: 11.5px; font-weight: 400; color: var(--faint); }
.why textarea { border: 0; outline: none; resize: none; background: var(--raised); color: var(--ink); font-size: 13px; line-height: 1.5; padding: 10px 12px; width: 100%; border-radius: 10px; min-height: 60px; overflow: hidden; box-shadow: var(--shadow-card); transition: box-shadow .15s; }
.why textarea:focus { box-shadow: 0 0 0 .5px var(--line-3), 0 0 0 3.5px var(--focus); }
.why textarea::placeholder { color: var(--faint); }
/* the inspector's facts: a grouped Form section */
.props { display: grid; grid-template-columns: 88px minmax(0, 1fr); margin: 0; font-size: 13px; background: var(--raised); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); }
.props dt, .props dd { padding: 7px 12px; min-height: 36px; box-shadow: inset 0 .5px 0 var(--line-2); }
.props dt:first-of-type, .props dd:first-of-type { box-shadow: none; }
.props dt { color: var(--muted); display: flex; align-items: center; font-size: 12.5px; padding-right: 0; }
.props dd { margin: 0; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; overflow-wrap: anywhere; color: var(--ink); }
.props a { color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; font-weight: 500; }
.props a .hi { width: 13px; height: 13px; color: var(--muted); }
.props a:hover { text-decoration: underline; }
.props .sub { color: var(--muted); }
.idrow { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.idrow code { flex: 1; min-width: 0; background: none; padding: 0; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idrow .ibtn { width: 26px; height: 26px; }
.idrow .ibtn .hi { width: 14px; height: 14px; }
.props textarea { width: 100%; border: 0; outline: none; resize: none; background: transparent; padding: 3px 6px; margin: -3px -6px; width: calc(100% + 12px); border-radius: 6px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; overflow: hidden; transition: background .15s, box-shadow .15s; }
.props textarea:hover { background: var(--hover); }
.props textarea:focus { background: var(--raised); box-shadow: 0 0 0 .5px var(--line-3), 0 0 0 3.5px var(--focus); color: var(--ink); }
/* tag chips: capsules */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { height: 24px; border: 0; background: var(--track); color: var(--ink-2); border-radius: 99px; padding: 0 10px; font-size: 12px; font-weight: 500; transition: background .15s, color .15s, transform .2s var(--spring); }
.chip:hover { color: var(--ink); }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.chips:not(.all) .chip[aria-pressed="false"] { display: none; }
.chips .chip.edit { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 .5px var(--line-3); padding: 0 9px 0 6px; display: inline-flex; align-items: center; gap: 3px; }
.chips .chip.edit .hi { width: 13px; height: 13px; }
.tsel, .tpick { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px 0 4px; margin: -4px 0 -4px -4px; border-radius: 7px; min-width: 0; max-width: 100%; transition: background .15s; }
.tsel:hover { background: var(--hover); }
.tsel:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.tsel .stile, .tpick .stile { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--raised); color: var(--ink-2); }
.tsel .stile .hi, .tpick .stile .hi { width: 14px; height: 14px; }
.tsel .tname, .tpick .tname { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tsel > .hi, .tpick > .hi { width: 13px; height: 13px; color: var(--muted); }
.tsel select, .tpick select { position: absolute; inset: 0; width: 100%; opacity: 0; font: inherit; }
.more { background: var(--raised); border-radius: 10px; padding: 0 12px; box-shadow: var(--shadow-card); }
.more + .more { margin-top: -10px; }
.more summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 38px; user-select: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary .cap-label { flex: 1; color: var(--ink); font-size: 13px; font-weight: 400; }
.more summary .hi { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease); transform: rotate(-90deg); }
.more[open] summary .hi { transform: none; }
.more summary em { font-style: normal; font-size: 12px; color: var(--muted); }
.more p, .more blockquote { margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.more blockquote { white-space: pre-wrap; padding-left: 10px; border-left: 2px solid var(--line-2); }
.stills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0 0 12px; }
.stills button { padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: var(--ar, 16 / 10); background: var(--well); cursor: zoom-in; box-shadow: inset 0 0 0 .5px var(--line-2); transition: transform .25s var(--spring); }
.stills img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- the taste sheet (rules): a floating inspector ---------- */
.sheet { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(440px, calc(100vw - 16px)); background: var(--side); border-radius: 18px; box-shadow: 0 0 0 .5px var(--line-3), 0 30px 80px -24px rgba(0, 0, 0, .45); display: flex; flex-direction: column; overflow: hidden; animation: sheetIn .38s var(--ease) both; }
@keyframes sheetIn { from { transform: translateX(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 0; color: var(--muted); font: 500 12px "SF Mono", ui-monospace, Menlo, monospace; cursor: copy; }
.cmd .hi { width: 12px; height: 12px; opacity: 0; transition: opacity .15s; }
.cmd:hover { color: var(--accent-ink); }
.cmd:hover .hi { opacity: 1; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.sheet-body > * { flex-shrink: 0; }
.sheet-body h3 { margin: 0 0 7px 4px; display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; }
.sheet-body h3 em { font-size: 12px; font-weight: 400; font-style: normal; color: var(--muted); }
.sheet-body textarea { width: 100%; border: 0; outline: none; resize: none; background: var(--raised); color: var(--ink); font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); transition: box-shadow .15s; }
.sheet-body textarea:focus { box-shadow: 0 0 0 .5px var(--line-3), 0 0 0 3.5px var(--focus); }
/* stat tiles, like the Mizu popover */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats .stat { padding: 10px 12px; border-radius: 12px; }
.mini-stats b { display: block; margin-top: 6px; font-size: 22px; line-height: 1.05; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rulelist { list-style: none; margin: 0; padding: 0; counter-reset: r; background: var(--raised); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); }
.rulelist li { counter-increment: r; position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 9px 12px 9px 10px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.rulelist li + li::before { content: ""; position: absolute; top: 0; left: 42px; right: 0; height: .5px; background: var(--line-2); }
.rulelist li::after { content: counter(r); grid-column: 1; grid-row: 1; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--track); font-variant-numeric: tabular-nums; }
.avoid { margin: 0; padding: 10px 12px; list-style: none; display: flex; flex-direction: column; gap: 7px; background: var(--raised); border-radius: 10px; box-shadow: var(--shadow-card); }
.avoid li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.avoid li::before { content: ""; position: absolute; left: 2px; top: 8.5px; width: 7px; height: 1.5px; background: var(--red); border-radius: 2px; }
.ctx-empty { font-size: 13px; color: var(--muted); padding: 18px; border-radius: 10px; border: 1px dashed var(--line-3); text-align: center; }
.sheet-foot { display: flex; align-items: center; gap: 14px; padding: 12px 14px 14px 18px; box-shadow: inset 0 .5px 0 var(--line-2); }
.meter { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.bar { height: 4px; border-radius: 99px; background: var(--track); margin-top: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.rules-text { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin: 0 0 12px; }
.rules-text h4 { font-size: 13px; font-weight: 600; margin: 16px 0 6px; color: var(--ink); }
.rules-text h4:first-child { display: none; }
.rules-text h5 { font-size: 13px; margin: 12px 0 4px; color: var(--ink); }
.rules-text p { margin: 6px 0; }
.rules-text p:has(> b:first-child) { margin-top: 12px; }
.rules-text b { color: var(--ink); font-weight: 600; }
.rules-text ul { margin: 6px 0; padding-left: 18px; }
.rules-text li { margin: 3px 0; }
.rules-text hr { border: 0; border-top: .5px solid var(--line-2); margin: 12px 0; }
.rules-text i { color: var(--muted); font-style: normal; font-size: 12.5px; }

/* ---------- new taste: a sheet ---------- */
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); background: var(--window); border-radius: 18px; box-shadow: 0 0 0 .5px var(--line-3), 0 40px 100px -24px rgba(0, 0, 0, .45); padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: pop .34s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.97); } }
.modal h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.modal p { margin: -6px 0 4px; font-size: 13px; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.modal input { width: 100%; height: 30px; background: var(--raised); border: 0; border-radius: 8px; padding: 0 10px; outline: none; font-size: 13px; color: var(--ink); box-shadow: 0 0 0 .5px var(--line-3), 0 .5px 1px rgba(0, 0, 0, .05); transition: box-shadow .15s; }
.modal input:focus { box-shadow: 0 0 0 .5px var(--accent), 0 0 0 3.5px var(--focus); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(10, 10, 11, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #f4f4f4; animation: fade .2s ease both; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 20px; }
html.app .lb-bar { padding-left: 92px; -webkit-app-region: drag; } /* clear of the traffic lights */
html.app .lb-tools { -webkit-app-region: no-drag; }
.lb-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.lb-title b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-title span { font-size: 12px; color: #9a9a9a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-tools { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14); backdrop-filter: blur(12px); }
.lb-tools button { height: 28px; min-width: 28px; padding: 0 11px; border: 0; border-radius: 99px; background: transparent; color: #e9e9e9; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; }
.lb-tools button[hidden] { display: none; }
.lb-tools button:hover { background: rgba(255, 255, 255, .12); }
.lb-tools button.icon { padding: 0; }
.lb-tools .hi { width: 16px; height: 16px; }
.lb-stage { position: absolute; inset: 56px 72px 96px; display: flex; overflow: hidden; }
.lightbox.single .lb-stage { inset: 56px 24px 24px; }
.lb-stage > img, .lb-stage > video { flex: none; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 10px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .08); animation: lbIn .28s var(--ease) both; }
.lb-stage > img { cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lb-stage.zoomed { overflow: auto; }
.lb-stage.zoomed > img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; animation: none; }
@keyframes lbIn { from { opacity: 0; transform: scale(.985); } }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #f4f4f4; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14); backdrop-filter: blur(12px); transition: background .15s, opacity .15s; }
.lb-nav .hi { width: 18px; height: 18px; }
.lb-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.lb-nav:disabled { opacity: .25; }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lightbox.single .lb-nav, .lightbox.single .lb-strip { display: none; }
.lb-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; display: flex; align-items: center; justify-content: safe center; gap: 6px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.lb-strip button { flex: none; height: 50px; min-width: 50px; max-width: 120px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #1c1c1e; opacity: .45; box-shadow: 0 0 0 2px transparent; transition: opacity .15s, box-shadow .2s; }
.lb-strip button:hover { opacity: .85; }
.lb-strip button.on { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); }
.lb-strip img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }

/* ---------- toast: a HUD capsule ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(30, 30, 32, .86); color: #f4f4f4; padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 500; backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 16px 36px -12px rgba(0, 0, 0, .5); z-index: 60; animation: toastIn .45s var(--ease) both; max-width: calc(100vw - 32px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.96); } }

/* ---------- icon picker: a popover ---------- */
.icon-picker { position: absolute; left: 14px; top: 50px; z-index: 15; width: 312px; background: color-mix(in srgb, var(--raised) 90%, transparent); backdrop-filter: blur(24px) saturate(1.8); border-radius: 14px; padding: 10px; box-shadow: var(--shadow-pop); animation: menuIn .18s var(--ease) both; }
.pk-sec { font-size: 11px; font-weight: 600; color: var(--muted); margin: 2px 4px 8px; }
.pk-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.pk-i { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); display: grid; place-items: center; transition: background .15s, color .15s, transform .2s var(--spring); }
.pk-i .hi { width: 18px; height: 18px; }
.pk-i:hover { background: var(--hover); }
.pk-i.on { background: var(--track-2); color: var(--ink); }

/* ---------- recent saves: one inset grouped section per day ---------- */
.rlist { margin: 0 24px 32px; display: flex; flex-direction: column; gap: 18px; }
.rtabs { display: flex; align-items: center; gap: 12px; padding: 0 24px 16px; }
.rgroup { padding: 0 4px 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.rbox { background: var(--group); border-radius: 12px; overflow: hidden; }
.rrow { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) 200px; gap: 14px; align-items: center; padding: 10px 14px; cursor: default; transition: background .15s; }
.rrow + .rrow::before { content: ""; position: absolute; top: 0; left: 84px; right: 14px; height: .5px; background: var(--line-2); }
.rrow:hover { background: var(--hover); }
.rrow:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.rrow.fresh { animation: rowFresh 2.4s var(--ease); }
@keyframes rowFresh { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.rrow .lt { width: 56px; height: 42px; border-radius: 7px; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 .5px var(--line-2); }
.rrow .lt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rmain { min-width: 0; }
.rwho { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 13px; }
.rwho b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwho span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwho time { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.rmain p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbadges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rb { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11.5px; font-weight: 500; height: 22px; padding: 0 9px; border-radius: 99px; background: var(--track); color: var(--muted); border: 0; }
.rb .hi { width: 12px; height: 12px; }
.rb.ok { color: var(--green); background: var(--green-soft); }
.rb.warn { color: var(--amber); background: var(--amber-soft); }
.rb.act { color: var(--accent-ink); background: var(--accent-soft); transition: filter .15s, transform .1s; }
.rb.act:hover { filter: brightness(.96); }
.rb.act:active { transform: scale(.97); }
/* re-file: a pop-up button */
.tpick { height: 28px; padding: 0 26px 0 4px; margin: 0; border-radius: 999px; background: var(--track); justify-self: end; }
.tpick:hover { background: var(--track-2); }
.tpick:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.tpick .stile { border-radius: 99px; width: 20px; height: 20px; }
.tpick > .hi { position: absolute; right: 9px; top: 50%; margin-top: -6.5px; }
.tpick .tname { font-size: 12.5px; }

/* ---------- connect + settings: System Settings-style grouped sections ---------- */
.view.pad { padding: 0 24px 32px; }
.panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.card2 { position: relative; background: var(--group); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.card2.hero { grid-column: 1 / -1; }
.card2 h3 { margin: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card2 p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.card2 .status { margin-left: auto; }
.card2 details summary { font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; height: 22px; padding: 0 9px; border-radius: 99px; background: var(--track); color: var(--muted); white-space: nowrap; }
.status .hi { width: 12px; height: 12px; }
.status.ok { background: var(--green-soft); color: var(--green); }
.code { position: relative; font: 11.5px/1.55 "SF Mono", ui-monospace, Menlo, monospace; background: var(--raised); border-radius: 8px; padding: 10px 42px 10px 12px; white-space: pre-wrap; word-break: break-all; color: var(--ink-2); margin: 0; max-height: 220px; overflow: auto; box-shadow: var(--shadow-card); }
.code button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 99px; border: 0; background: var(--track); color: var(--muted); display: grid; place-items: center; }
.code button .hi { width: 14px; height: 14px; }
.code button:hover { color: var(--ink); }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); line-height: 1.75; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alist { display: grid; gap: 2px; }
.alist .arow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 3px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); }
.alist .arow:last-of-type { border-bottom: 0; }
.alist .arow b { font-weight: 500; }
.alist .row { margin-top: 8px; }
.prefs { max-width: 720px; }
.prefs h4 { margin: 24px 0 8px 4px; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.prefs h4:first-child { margin-top: 0; }
.prefs .item { position: relative; display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 10px 14px; background: var(--group); }
.prefs .item + .item::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: .5px; background: var(--line-2); }
.prefs h4 + .item { border-radius: 12px 12px 0 0; }
.prefs .item:has(+ h4), .prefs .item:last-child { border-radius: 0 0 12px 12px; }
.prefs h4 + .item:has(+ h4), .prefs h4 + .item:last-child { border-radius: 12px; }
.prefs .item div { flex: 1; min-width: 0; }
.prefs .item b { display: block; font-weight: 400; }
.prefs .item small { color: var(--muted); font-size: 12px; }
/* macOS switch */
.switch { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--track-2); position: relative; flex: none; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06); transition: width .2s var(--ease), left .32s var(--spring); }
.switch:active::after { width: 22px; }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 18px; }
.switch:checked:active::after { left: 14px; }
.ok-text { color: var(--green); font-weight: 500; font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; }
.ok-text .hi { width: 13px; height: 13px; }

@media (max-width: 1080px) { .detail { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 46%) minmax(0, 1fr); } .info { box-shadow: inset 0 .5px 0 var(--line-2); } }
@media (max-width: 900px) { .lhead, .lrow { grid-template-columns: 50px minmax(0, 1fr) 60px; } .lhead span:nth-child(3), .lrow .lsrc { display: none; } .rrow { grid-template-columns: 56px minmax(0, 1fr); } .tpick { grid-column: 2; justify-self: start; } #sortLabel { display: none; } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- 2026-11-13: all saves, global search, tags, Recent as a grid ---------- */
.nav-btn em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* which taste a card is in, in All saves and search */
.cap .ctaste { margin-left: auto; flex: none; max-width: 52%; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* tag shortcuts under the title */
.taghints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 28px 16px; margin-top: -6px; }
.taghints > span { font-size: 12px; font-weight: 500; color: var(--muted); margin-right: 4px; }
.taghints .chip { display: inline-flex; align-items: center; gap: 5px; }
.taghints .chip em, .tagchips .chip em { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* tags on an opened save: capsules you can click to search */
.tagdd { display: block !important; }
.tagchips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0; }
.tagchips:not(.all) .chip.tag:nth-child(n + 15) { display: none; }
.tagchips .chip.tag { height: 22px; padding: 0 8px; font-size: 11.5px; font-weight: 500; }
.tagchips .chip.tag:hover { background: var(--accent-soft); color: var(--accent-ink); }
.tagchips .chip.tag.first { color: var(--ink); background: var(--track-2); }
.tagchips .chip.edit { height: 22px; font-size: 11.5px; display: inline-flex; align-items: center; gap: 3px; padding: 0 9px 0 6px; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 .5px var(--line-3); }
.tagchips .chip.edit .hi { width: 13px; height: 13px; }
.tagchips .chip.edit[data-moretags] { padding: 0 9px; }
.tagdd textarea { width: 100%; }
/* a video that didn't download */
.mfail { margin: auto; max-width: 360px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mfail > .hi { width: 30px; height: 30px; color: var(--faint); margin-bottom: 4px; }
.mfail h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.mfail p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; }
.mfail-btns { display: flex; gap: 8px; }
.viewer .ph { display: inline-flex; align-items: center; gap: 6px; }
.ph.lost { max-width: 34ch; text-align: center; line-height: 1.5; font-size: 13px; }
.lb-stage .ph { margin: auto; color: rgba(255, 255, 255, .6); }
.viewer .ph .hi { width: 15px; height: 15px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card .ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.card .ph .hi { width: 22px; height: 22px; }
/* Recent as a picture grid, one group per day */
.rdays { display: flex; flex-direction: column; gap: 8px; }
.rday .rgroup { margin: 0; padding: 4px 28px 10px; display: flex; align-items: baseline; gap: 7px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.rday .rgroup em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.rgrid { padding-bottom: 18px; }
.rtabs { padding: 0 24px 12px; }
.card .cap .tpick { margin-left: auto; flex: 0 1 auto; min-width: 0; max-width: 60%; height: 24px; padding: 0 22px 0 3px; gap: 5px; }
.card .cap .tpick .stile { width: 18px; height: 18px; }
.card .cap .tpick .stile .hi { width: 12px; height: 12px; }
.card .cap .tpick .tname { font-size: 12px; }
.card .cap .tpick > .hi { right: 7px; width: 11px; height: 11px; margin-top: -5.5px; }
.card .cap:has(.tpick) { align-items: center; padding-top: 7px; }
.sugg { position: absolute; left: 8px; bottom: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; border: 0; border-radius: 99px; font: inherit; font-size: 11.5px; font-weight: 500;
  color: var(--accent-ink); background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6); }
.sugg .hi { width: 12px; height: 12px; }
.sugg:hover { background: #fff; }
