/* Get Me: warm paper, one pink. Phone first, one column.
   Tokens first (light, then dark), then layout, components and motion. */
:root {
  /* Pink Files: cream paper, aubergine ink, flat baby pink, one cherry. Raw tokens first
     (the dark blocks below only restate these); the app's older names follow as aliases. */
  --paper: #F7F2EB; --sheet: #FCFAF6; --band: #EFE8DE; --pink: #F6DCE3; --greige: #E2D8CD; --sage: #DDE1D3;
  --ink: #2A1B1E; --ink-2: #665558; --wine: #9C1C3C; --rule: #D6D0CA; --dash: #A59C99;
  --danger: #A8321A; --over: #8A4513; --ink-press: #170D0F;
  --tape-bg: #F6DCE3; --tape-ink: #2A1B1E; --tape-done-bg: #2A1B1E; --tape-done-ink: #F7F2EB;
  --scrim: rgba(42, 27, 30, .42);
  /* letter faces, picked by a hash of the person id (app.js avatar(): .face-1 to .face-4) */
  --face-1: #2A1B1E; --face-2: #6E4B55; --face-3: #7A5C4D; --face-4: #5C5A3F; --face-1-ink: #F7F2EB; --face-ink: #F7F2EB;
  /* folder tints: one flat paper per folder theme; --tint is the current folder's */
  --tint-classic: #F6DCE3; --tint-sage: #DDE1D3; --tint-sky: #D6DEE2; --tint-lavender: #DED7E4; --tint-butter: #EFE3C2; --tint-clay: #E8D2C3;
  --tint: var(--tint-classic);
  /* the app's older names, mapped onto the palette (rules still use them) */
  --bg: var(--paper); --surface: var(--sheet); --raised: var(--sheet); --line: var(--rule);
  --field-line: var(--ink); /* every control's own edge is ink */
  --soft: var(--band); --fg: var(--ink); --muted: var(--ink-2);
  --accent: var(--ink); --accent-ink: var(--paper); --accent-text: var(--ink);
  --accent-soft: var(--tint); --accent-soft-fg: var(--ink); --accent-shadow: transparent;
  --open-bg: var(--band); --open-fg: var(--ink);
  --claim-bg: var(--pink); --claim-fg: var(--ink);
  --later-bg: var(--band); --later-fg: var(--ink);
  --bought-bg: var(--band); --bought-fg: var(--ink);
  --sticker: none; --sheet-shadow: none; --backdrop: var(--scrim); --img-ring: transparent;
  --tile-s: 30%; --tile-l: 88%; --tile-fg-l: 30%;
  --over-bg: transparent; --over-fg: var(--over);
  --danger-ink: var(--paper);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Courier Prime", "Courier New", ui-monospace, monospace;
  --f-display: var(--font-display); --f-body: var(--font-body); --f-label: var(--font-label);
  --ease: ease-out; --spring: ease-out;
  --t-press: 120ms; --t-ui: 120ms; --t-sheet: 240ms;
  --r-sm: 2px; --r-md: 2px; --r-lg: 4px; --r-xl: 6px; --r-pill: 2px;
  /* spacing and type scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --gutter: 20px;
  --fs-title: 36px; --fs-h2: 19px; --fs-body: 15px; --fs-meta: 13px; --fs-micro: 12px;
  --nav-h: 60px; --sticker-rot: -3deg;
  /* the two arrows, as masks (see .go, .pill-act): right inside the app, up-right for the shop */
  --ico-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9.5 3.5 14 8l-4.5 4.5'/%3E%3C/svg%3E");
  --ico-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1D1516; --sheet: #261C1E; --band: #2F2426; --pink: #4A2F39; --greige: #3A2E2D; --sage: #30332B;
    --ink: #F3EAE2; --ink-2: #BFB0AB; --wine: #F2A3B6; --rule: #3F3737; --dash: #736A68;
    --danger: #F29A84; --over: #E8B07A; --ink-press: #DCD2CA;
    --tape-done-bg: #F3EAE2; --tape-done-ink: #1D1516; --scrim: rgba(0, 0, 0, .6);
    --face-1: #F3EAE2; --face-1-ink: #1D1516; --face-ink: #F3EAE2;
    --tint-classic: #4A2F39; --tint-sage: #2C382B; --tint-sky: #24353F; --tint-lavender: #372E48; --tint-butter: #40371A; --tint-clay: #4A2D20;
    --tile-s: 30%; --tile-l: 28%; --tile-fg-l: 86%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1D1516; --sheet: #261C1E; --band: #2F2426; --pink: #4A2F39; --greige: #3A2E2D; --sage: #30332B;
  --ink: #F3EAE2; --ink-2: #BFB0AB; --wine: #F2A3B6; --rule: #3F3737; --dash: #736A68;
  --danger: #F29A84; --over: #E8B07A; --ink-press: #DCD2CA;
  --tape-done-bg: #F3EAE2; --tape-done-ink: #1D1516; --scrim: rgba(0, 0, 0, .6);
  --face-1: #F3EAE2; --face-1-ink: #1D1516; --face-ink: #F3EAE2;
  --tint-classic: #4A2F39; --tint-sage: #2C382B; --tint-sky: #24353F; --tint-lavender: #372E48; --tint-butter: #40371A; --tint-clay: #4A2D20;
  --tile-s: 30%; --tile-l: 28%; --tile-fg-l: 86%;
  color-scheme: dark;
}

/* ---- base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.5; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
body.sheet-open { overflow: hidden; }
@media (max-width: 379px) { :root { --gutter: 16px; } }
.app { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
/* headings that take focus after a screen change: the screen reader reads them, no ring */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.ico { flex: none; display: block; }
/* first paint, before app.js takes over (index.html) */
.boot { display: flex; flex-direction: column; gap: 16px; }
.boot .brand-row { min-height: 52px; padding: 0; } /* same spot as the logo bar */
.boot .list { gap: 12px; }
.skel { display: block; height: 12px; border-radius: 0; background: var(--band); }
.skel.w1 { width: 80%; height: 14px; }
.skel.w2 { width: 45%; }
.item.is-skeleton .thumb { background: var(--soft); }
.item.is-skeleton .item-main { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.boot .item { min-height: 100px; }
/* The boot placeholder looks like Home's tiles (signing in always lands on Home). */
.boot-tile { display: flex; flex-direction: column; gap: 10px; width: 100%; padding-top: 22px; }
.boot-tile .boot-pic { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.boot .thumb { background: var(--soft); }
.boot .item-main { gap: 10px; padding-top: 6px; }
.muted { color: var(--muted); margin: 0; }
p { margin: 0; }

h1, h2, h3 { margin: 0; }
.display, .brand {
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); line-height: 1.02; letter-spacing: -0.015em;
}
h2 { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
/* the typewriter voice: tiny caps references, counts, values. Never a sentence. */
.label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.label.is-ink { color: var(--ink); }
.label.is-ref { color: var(--wine); }
/* a helper note: Fraunces italic, no box, no icon */
.note-line { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 14px; line-height: 1.45; color: var(--ink-2); max-width: 32ch; }
.sub { margin: 0; color: var(--muted); font-size: var(--fs-meta); }

/* ---- sign in / onboarding ---- */
.hero { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
/* the logo (brand.svg): "get" is the text colour, "me" the icon's pink in every theme */
.lockup { display: inline-flex; flex: none; color: var(--fg); }
.lockup-art { display: block; }
.brand .lockup { vertical-align: top; }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 30ch; text-wrap: pretty; }
.hero-art { color: var(--muted); display: flex; justify-content: center; margin: -4px 0 -8px; }
.hero-art .doodle { width: 200px; height: 150px; }
.link-row { display: flex; flex-direction: column; align-items: flex-start; margin: -6px 0 -8px; }
.link-row .btn-link { min-height: 44px; }
.link-row .btn-link:first-child:not(:last-child) { color: var(--muted); }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head h2 label { cursor: inherit; }
.step {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-soft-fg); font-weight: 700; font-size: var(--fs-meta);
}
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-meta); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- cards, panels, fields ---- */
.card { background: none; border: 0; border-radius: 0; } /* paper, not boxes */
.card.item, .folder-card:not(.new) { box-shadow: var(--sticker); }
.panel { padding: 0; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field-wrap > label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.field-row { display: flex; gap: 8px; }
.field-row > .field { flex: 1; min-width: 0; }
.field {
  width: 100%; min-height: 46px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent;
  padding: 0; font-size: 16px; color: var(--ink); transition: border-color var(--t-press) ease-out, box-shadow var(--t-press) ease-out;
}
textarea.field { padding: 10px 0; resize: vertical; line-height: 1.45; font: inherit; font-size: 16px; }
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus { outline: none; border-bottom-color: var(--wine); box-shadow: 0 1px 0 var(--wine); }
.field[aria-invalid="true"] { border-bottom-color: var(--danger); }
/* a line chevron (two thin strokes), like the rows' chevron icon, never a filled triangle */
select.field { appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-image: linear-gradient(45deg, transparent calc(50% - .8px), var(--muted) calc(50% - .8px), var(--muted) calc(50% + .8px), transparent calc(50% + .8px)), linear-gradient(135deg, transparent calc(50% - .8px), var(--muted) calc(50% - .8px), var(--muted) calc(50% + .8px), transparent calc(50% + .8px));
  background-position: calc(100% - 9px) 20px, calc(100% - 3px) 20px; background-size: 6px 6px; background-repeat: no-repeat; }
input[type="date"].field { padding-right: 0; }
.code-field { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }

/* ---- buttons ---- */
.btn {
  min-height: 50px; padding: 0 18px; border-radius: 2px; font-weight: 600; font-size: 15px; letter-spacing: .01em; text-align: left;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; border: none;
  transition: transform var(--t-press) ease-out, background var(--t-press) ease-out;
}
/* the words start at the left; an icon (the shop arrow) goes to the right end */
.btn:not(.star) > .ico { order: 2; }
.btn-primary { background: var(--ink); color: var(--paper); } /* one per view */
.btn-primary:active { background: var(--ink-press); transform: translateY(1px); }
.btn-primary.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); flex: none; }
.btn-secondary:active { background: var(--band); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: progress; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); } /* never filled */
.btn-danger:active { background: var(--band); }
.btn-link, .btn-ghost {
  min-height: 44px; padding: 0; background: none; border: none; color: var(--ink); font-weight: 500; font-size: 15px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.btn-link:active, .btn-ghost:active { text-decoration-thickness: 2px; }
/* .go: a forward action. A thin arrow after the words (right end of a button, 6px after a link);
   .go.up is the shop arrow. Drawn as a mask, so it follows the text colour and adds no markup. */
.go::after {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--ico-arrow) center / contain no-repeat; mask: var(--ico-arrow) center / contain no-repeat;
  transition: transform var(--t-press) ease-out;
}
.go.up::after { -webkit-mask-image: var(--ico-arrow-up); mask-image: var(--ico-arrow-up); }
.btn-link.go, .btn-ghost.go { display: inline-flex; align-items: center; gap: 6px; }
.btn-link.go::after, .btn-ghost.go::after { width: 14px; height: 14px; }
.btn-link.go:active::after, .btn-ghost.go:active::after { transform: translateX(3px); }
.btn-link.center { align-self: flex-start; }
.btn-ghost.small { font-size: 14px; position: relative; }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 2px; border: none; background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.icon-btn:active { background: var(--band); }

/* ---- header ---- */
.top { display: flex; flex-direction: column; gap: 6px; }
.top.is-wrapped .setup-line { margin-top: 10px; } /* a two-line name (app.js markWrapped) */
.top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.folder-btn {
  display: inline-flex; align-items: center; max-width: 100%; min-width: 0; min-height: 44px; padding: 0; margin: -4px 0 -2px;
  background: none; border: none; text-align: left; border-radius: var(--r-sm);
}
.folder-name {
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); letter-spacing: -0.015em;
  /* up to two lines at every width (it is the page heading), then an ellipsis. The clamp clips at
     the box, so the lines are tall enough for g, y and p; the negative margins take the slack back. */
  line-height: 1.2; margin: -.09em 0;
  overflow: hidden; min-width: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* the faces pill: who is in, and the door to Folder › People */
.people-btn {
  flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border-radius: 2px;
  background: none; border: 0; color: var(--ink); white-space: nowrap;
}
.people-btn:active { opacity: .7; }
.people-btn.is-faces .people-label:empty { display: none; }
.people-label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.people-btn.is-solo .people-label, .people-btn.is-private .people-label { color: var(--fg); }
.people { position: relative; display: inline-flex; align-items: center; }
.people .avatar { width: 28px; height: 28px; font-size: 13px; border: 0; box-shadow: 0 0 0 2px var(--paper); margin-left: -8px; }
.people .avatar:first-child { margin-left: 0; }
.avatar.add-person { background: var(--band); color: var(--ink); }
.avatar.add-person .ico { width: 16px; height: 16px; }
.avatar.more-count { background: var(--band); color: var(--ink-2); font: 400 11px/1 var(--font-label); }
/* a face with a small lock: members are private */
.lock-face { position: relative; display: inline-flex; flex: none; }
.lock-badge {
  position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink-2);
}
.lock-badge .ico { width: 10px; height: 10px; }
.lock-face .avatar.md + .lock-badge { width: 20px; height: 20px; right: -3px; bottom: -2px; }
.lock-face .avatar.md + .lock-badge .ico { width: 12px; height: 12px; }
.pill-lock { position: relative; right: auto; bottom: auto; margin: 16px 0 0 -10px; }
/* the setup line: how this folder is set up, one quiet line under the name */
.setup-line {
  display: flex; align-items: center; align-self: flex-start; max-width: 100%; min-height: 32px; padding: 2px 0; margin: -2px 0 -2px;
  border: none; background: none; text-align: left; color: var(--ink-2); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; border-radius: 2px;
  overflow-x: clip; overflow-y: visible; overflow-clip-margin: 0;
}
/* each part leads with its dot (3px + 6px each side); the row is pulled left by that much, so the
   dot of a part that starts a line is clipped away by .setup-line */
.setup-parts { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; margin-left: -15px; min-width: 0; }
.setup-part { display: inline-flex; align-items: center; gap: 5px; }
.setup-part .ico { display: none; } /* words, not icons */
.setup-part.is-role { color: var(--ink-2); }
.setup-dot { flex: none; margin: 0 1px 0 6px; font-size: 0; overflow: hidden; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-2); }
.setup-go { width: 12px; height: 12px; margin-left: 4px; color: var(--ink); }
.setup-line:active { opacity: .7; }
/* small phones: the folder name gets the room */
@media (max-width: 379px) {
  .folder-name { font-size: 30px; }
}

.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 500; font-size: 16px; line-height: 1;
  background: var(--face-1); color: var(--face-1-ink);
}
.avatar.face-2 { background: var(--face-2); color: var(--face-ink); }
.avatar.face-3 { background: var(--face-3); color: var(--face-ink); }
.avatar.face-4 { background: var(--face-4); color: var(--face-ink); }
.avatar.md { width: 40px; height: 40px; font-size: 18px; }
.avatar.xs { width: 20px; height: 20px; font-size: 11px; }
/* someone whose name is hidden from me: one plain face for all of them */
.avatar.anon { background: var(--band); color: var(--ink-2); border: 1px dashed var(--dash); }
.avatar.anon .ico { width: 50%; height: 50%; }


/* ---- tabs and the chip row ---- */
.filters { display: flex; flex-direction: column; gap: 4px; margin-top: -8px; }
.filters + .list { margin-top: -8px; }
.tabs { display: flex; gap: 28px; min-height: 48px; align-items: stretch; border-bottom: 1px solid var(--rule); }
.tab {
  position: relative; min-height: 48px; padding: 0; margin-bottom: -1px; border: none; background: none;
  font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 0; transition: color var(--t-press) ease-out;
}
.tab .count { font: 400 11px/1 var(--font-label); letter-spacing: .06em; margin-left: 4px; position: relative; top: -7px; color: inherit; font-variant-numeric: tabular-nums; } /* a superscript */
.tab[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); } /* an ink bar as wide as word + count, on the rule */
.tab[aria-pressed="true"] .count { opacity: 1; }
.tab-ul { display: none; }

.chips {
  position: relative; display: flex; align-items: center; gap: 20px; min-height: 44px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chips-div { flex: none; width: 1px; height: 16px; background: var(--rule); margin: 0; }
.fchip {
  flex: none; scroll-snap-align: start; position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none;
  font-weight: 500; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: color var(--t-press) ease-out;
}
.fchip .ico { width: 16px; height: 16px; color: inherit; }
.fchip .avatar { margin-left: 0; }
.fchip-when { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* the dot between a chip's name and countdown: the chip's gap on both sides, a touch tighter */
.sep-dot { margin: 0 -2px; }
.fchip .sep-dot { color: var(--ink-2); }
.fchip[aria-pressed="true"] .sep-dot { color: var(--ink); }
.fchip[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.fchip[aria-pressed="true"]::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--wine); } /* the picked one: a cherry dot */
.fchip[aria-pressed="true"] .ico, .fchip[aria-pressed="true"] .fchip-when { color: var(--ink); }
.fchip.more { padding: 0; }
.fchip.more .ico { width: 18px; height: 18px; }
.fchip:active { color: var(--ink); }

/* ---- items ---- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 0 0; }
.group-head:first-child { padding-top: 4px; }
.group-name { font-size: 18px; line-height: 1.35; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-when { flex: none; color: var(--muted); font-size: var(--fs-meta); font-weight: 600; font-variant-numeric: tabular-nums; }
.group-head.soon .group-when { color: var(--accent-text); }
.sprig { flex: none; color: var(--muted); align-self: center; margin: -4px 0 0 -2px; }

.item { position: relative; padding: 12px; display: flex; gap: 12px; align-items: flex-start; }
.card-hit {
  position: absolute; inset: 0; z-index: 0; border: none; background: none; padding: 0; margin: 0; border-radius: inherit; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.card-hit:focus-visible { outline-offset: 2px; }
.item:has(.card-hit:active) { background: color-mix(in srgb, var(--surface) 92%, var(--fg)); }
/* the text is for reading; taps go through to the card, except the pill and Add a name */
.thumb-box, .item-main { position: relative; pointer-events: none; }
.pill-act, .name-it { pointer-events: auto; z-index: 1; }
.thumb-box { flex: none; width: 76px; }
.thumb {
  width: 76px; height: 76px; border-radius: 0; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--band); color: var(--ink);
}
/* no picture: one of four flat papers (app.js thumb(): .tone-1 to .tone-4) and a fine plate line */
.thumb.tone-2 { background: var(--pink); }
.thumb.tone-3 { background: var(--greige); }
.thumb.tone-4 { background: var(--sage); }
.thumb:not(.has-img):not(.has-photo)::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--ink); opacity: .18; pointer-events: none; }
.thumb-letter { font-family: var(--font-display); font-weight: 500; font-size: 30px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--soft); }
.thumb.is-loading .thumb-letter { opacity: .45; }
.thumb.is-loading { animation: thumb-wait 900ms ease-in-out infinite alternate; }
@keyframes thumb-wait { from { opacity: 1; } to { opacity: .55; } }
/* the status sticker sits over the picture's bottom edge */
.sticker-on-thumb {
  position: absolute; left: -6px; bottom: 10px; z-index: 1; max-width: calc(100% + 12px); white-space: normal;
  --stk-x: 0px; transform: translateX(var(--stk-x)) rotate(var(--sticker-rot)); transform-origin: left center;
}
/* "Someone’s on it" is longer than most names: a little more room, a touch smaller */
.sticker-on-thumb.hid .stk-ico { width: 10px; height: 10px; margin-right: 0; }
.chip.sticker-on-thumb.pop { animation: sticker-pop 320ms var(--spring); }
@keyframes sticker-pop { 0% { transform: translateX(var(--stk-x)) rotate(var(--sticker-rot)) scale(.92); } 60% { transform: translateX(var(--stk-x)) rotate(var(--sticker-rot)) scale(1.08); } 100% { transform: translateX(var(--stk-x)) rotate(var(--sticker-rot)) scale(1); } }
.item.is-loading .item-title { color: var(--muted); }
.item-main { flex: 1; min-width: 0; min-height: 76px; display: flex; flex-direction: column; gap: 1px; }
.item-title {
  font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--fg); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: var(--fs-meta); line-height: 1.35; color: var(--muted); white-space: nowrap; }
.item-meta .price { flex: none; color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; }
.item-meta .site { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.item-meta .price + .site::before { content: "·"; margin-right: 6px; }
.folder-tag {
  flex: 0 1 auto; min-width: 0; padding: 1px 8px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted);
  font-size: 11px; font-weight: 700; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note {
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--fg); opacity: .8;
 white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.name-it {
  position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0;
  border: none; background: none; color: var(--accent-text); font-weight: 600; font-size: var(--fs-meta);
}
.name-it::after { content: ""; position: absolute; inset: -9px -6px; }
.name-it .ico { width: 15px; height: 15px; }
.item-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 1px; min-height: 26px; }
.by { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-micro); min-width: 0; white-space: nowrap; }
.by .avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.by span:last-child { overflow: hidden; text-overflow: ellipsis; }
.by .by-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.by .by-age { flex: none; margin-left: -6px; white-space: pre; overflow: visible; }
/* small phones: the name (or "Someone") matters more than the age, which the item sheet shows */
@media (max-width: 379px) { .item-foot .by .by-age { display: none; } }
.pill-act {
  position: relative; flex: none; margin: -13px 0 -13px auto; min-height: 44px; padding: 0 0 0 12px; border: 0; border-radius: 0; background: none;
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.pill-act::after {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--ico-arrow) center / contain no-repeat; mask: var(--ico-arrow) center / contain no-repeat;
  transition: transform var(--t-press) ease-out;
}
.pill-act:active { text-decoration-thickness: 2px; }
.pill-act:active::after { transform: translateX(3px); }
.pill-act.release { color: var(--ink-2); font-weight: 500; } /* quiet: they got it themselves */
.pill-act.release::after { content: none; }

.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 0; border-radius: 0;
  font: 700 11px/14px var(--font-label); text-transform: uppercase; letter-spacing: .08em;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.open { background: var(--open-bg); color: var(--open-fg); }
.chip.claimed { background: var(--tape-bg); color: var(--tape-ink); } /* a strip of pink tape */
.chip.later { background: var(--later-bg); color: var(--later-fg); }
.chip.bought { background: var(--tape-done-bg); color: var(--tape-done-ink); } /* the same strip in ink */
.chip.stamp { transform: rotate(-2deg); }
/* bought: strike the name and calm the picture, keep the text readable */
.item.is-bought .thumb { filter: grayscale(.6); opacity: .7; }
.item.is-bought .item-title { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); }

/* item sheet: detail first */
.item-detail { display: flex; flex-direction: column; gap: 16px; }
.detail-pic { position: relative; }
.thumb.big { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 35vh; border-radius: 0; }
.thumb.big .thumb-letter { font-size: 56px; }
.thumb.big:not(.has-img) { aspect-ratio: auto; height: 72px; } /* a letter tile needs little room: a picture-less link is a slim band */
.thumb.big:not(.has-img) .thumb-letter { font-size: 34px; }
a.btn { text-decoration: none; }
.detail-pic .sticker-on-thumb { left: -6px; bottom: 14px; padding: 5px 10px; font-size: 12px; line-height: 16px; max-width: calc(100% + 12px); }
.detail-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.detail-meta { font-size: 15px; }
.detail-note {
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere;

}
.detail-by { display: flex; align-items: center; flex-wrap: nowrap; gap: 0 6px; color: var(--muted); font-size: var(--fs-meta); line-height: 1.5; }
.detail-by .avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.detail-by strong { color: var(--fg); font-weight: 700; }
.detail-by > span { min-width: 0; }
.detail-folder { margin-left: -6px; }
.detail-date { display: flex; padding-top: 4px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-pair .btn-secondary { flex: initial; }
.sheet-body.is-edit { gap: 14px; }

/* add sheet: folder picker, optional fields */
.field-label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.add-to { display: flex; flex-direction: column; gap: 8px; margin-top: -6px; }
.add-to-line { color: var(--muted); font-size: 14px; margin-top: -14px; }
.to-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 0 12px 0 14px;
  border-radius: var(--r-pill); border: 1.5px solid var(--field-line); background: var(--raised); color: var(--fg); font-weight: 700; font-size: 14px;
}
.to-pre { color: var(--muted); font-weight: 600; }
.to-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform var(--t-ui) var(--ease); }
.to-chip[aria-expanded="true"] .to-chev { transform: rotate(180deg); }
.to-list { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--raised); }
.to-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px; border-radius: var(--r-md); cursor: pointer; font-weight: 600; }
.to-row:has(input:checked) { background: var(--accent-soft); color: var(--accent-soft-fg); }
.to-row:has(input:checked) .folder-ico { background: var(--surface); color: var(--accent-text); }
.to-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.to-row .folder-ico { width: 34px; height: 34px; }
.to-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-form { gap: 16px; }
.add-name-link { align-self: flex-start; min-height: 32px; margin: -10px 0 -4px; font-size: 14px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.add-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.add-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border-radius: var(--r-pill);
  border: 1.5px dashed var(--field-line); background: transparent; color: var(--fg); font-weight: 600; font-size: 14px;
}
.add-toggle::after { content: ""; position: absolute; inset: -4px 0; } /* 44px touch target */
.add-toggle .ico { width: 16px; height: 16px; color: var(--muted); }
.add-toggle:active { transform: translateY(1px); background: var(--soft); }
.date-pick { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }

/* the first paint in index.html still uses the old row markup */
.boot .item-row { display: flex; gap: 12px; flex: 1; }
.boot .thumb { flex: none; }

.pill {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 2px; border: 1px solid var(--ink); background: none;
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; position: relative;
}
.pill .avatar { margin-left: -6px; }
.pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---- empty states ---- */
.empty { text-align: left; padding: 40px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.empty .doodle { display: none; } /* no illustration: the title does the work */
.doodle-accent { fill: var(--wine); }
.empty-title { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.12; letter-spacing: -0.01em; }
.empty-body { color: var(--ink-2); max-width: 30ch; }
.empty p { text-wrap: pretty; }
.empty .btn { margin-top: 4px; }
.empty.small { padding: 16px 0; }
.empty.small .doodle { width: 100px; height: 75px; }

/* ---- app bar: bottom bar on phones, top bar from 900px ---- */
body.has-nav { padding-top: env(safe-area-inset-top, 0px); padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom, 0px)); }
.nav {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: var(--paper); border-top: 1px solid var(--ink); display: flex; justify-content: center;
}
/* Phones: the page scrolls as any page does, so Safari's toolbar shrinks and its own pull-to-refresh works (Huz,
   2026-12-02). While the toolbar shrinks or grows, and while the page stretches at its ends, the bar can sit a moment
   above the screen's bottom edge: its colour carries on below it, so the page never shows through that gap. */
@media (max-width: 899px) {
  .nav::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 120px; background: inherit; pointer-events: none; }
}
.nav-inner { display: flex; align-items: stretch; width: 100%; max-width: 560px; }
.nav-brand, .nav-add-label { display: none; }
.nav-slot {
  flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; color: var(--ink-2); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 16px; line-height: 1.2;
  -webkit-user-select: none; user-select: none; border-radius: 0;
}
.nav-slot .ico { display: none; } /* words, not icons */
.nav-slot[aria-current="page"] { color: var(--ink); }
.nav-slot[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 24px; height: 3px; margin-left: -12px; background: var(--ink); } /* hangs from the top rule */
.nav-ul { display: none; }
.nav-slot:active { color: var(--ink); }
.nav-avatar { display: inline-flex; }
.nav-avatar .avatar { width: 28px; height: 28px; font-size: var(--fs-micro); }
.nav-you .nav-label { margin-bottom: 7px; } /* lines up with the labels that carry an underline */
.nav-add { flex: 0 0 76px; }
.nav-plus {
  width: 52px; height: 52px; border-radius: 2px; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 4px var(--paper); /* a flat cut-out ring */
  display: inline-flex; align-items: center; justify-content: center; transform: translateY(-14px);
  transition: background var(--t-press) ease-out;
}
.nav-plus .ico { display: block; width: 20px; height: 20px; }
.nav-add:active .nav-plus { background: var(--ink-press); }
/* phones: the ring follows the round button, not the whole nav slot (900px+ resets it) */
.nav-add:focus-visible { outline: none; }
.nav-add:focus-visible .nav-plus { outline: 2px solid var(--wine); outline-offset: 6px; }

/* ---- Home and Mine ---- */
.screen-head { padding-top: 4px; }
.screen-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); line-height: 1.02; letter-spacing: -0.015em; }
.home-brand .brand-row { padding-top: 4px; }
/* One logo per screen: the app bar's (phones: .app-top; desktop: the top nav). Home keeps only
   its gear, at the right end of the Folders line. */
.app-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0; }
.app-top::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; margin-left: -50vw; height: 1px; background: var(--rule); } /* the hairline runs edge to edge */
.app-top-brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-radius: 2px; }
.nav .gear-btn { display: none; } /* phones: the gear is in the logo bar */
.gear-btn[aria-current="page"] { color: var(--accent); }
.home-brand { display: none; } /* the logo bar carries the logo; Home starts at Folders */
/* The gear (Folder settings) at the top right of Home and You. */
.screen-head.has-gear { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gear-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -11px; border-radius: 2px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.gear-btn .ico { width: 22px; height: 22px; }
.gear-btn:active { background: var(--band); }
.you-screen { display: grid; gap: 18px; padding-bottom: 24px; }
.settings-folders { display: grid; gap: 18px; }
.settings-head { display: flex; align-items: center; gap: 6px; }
.icon-back { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -12px; border: 0; border-radius: 2px; background: none; color: inherit; cursor: pointer; }
.icon-back:active { background: var(--band); }
/* the folder screen's ‹ Home (phones only; desktop has Home in the top bar) */
.folder-back { flex: none; margin: -4px -16px -2px -14px; }
.top-row:has(.folder-back) { justify-content: flex-start; }
.top-row:has(.folder-back) > .people-btn { margin-left: auto; }
@media (min-width: 900px) { .folder-back { display: none; } }
.icon-back .ico { width: 24px; height: 24px; }
.sparkle { flex: none; color: var(--muted); margin: -14px 0 0 -4px; }
.section-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
  font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink);
}
.home { display: flex; flex-direction: column; gap: 22px; }
.row-chev { flex: none; color: var(--ink); transform: rotate(-90deg); width: 16px; height: 16px; align-self: center; }


/* ---- Home (Pink Files): Coming up tickets, folder tiles with a two-picture collage ---- */
.coming-title { position: relative; margin: 6px 0 20px; padding-right: 36px; }
.coming-title em { font-style: italic; color: var(--wine); }
.coming-title::after { content: attr(data-count); position: absolute; right: 0; bottom: 4px; font-style: normal; font: 400 11px/1.3 var(--font-label); letter-spacing: .1em; color: var(--ink-2); }
.coming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* a ticket: the date on the stub, a dashed tear line, two punched notches */
.coming-row {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) 30px; align-items: center; width: 100%; min-height: 68px;
  padding: 0; border: 0; border-radius: 4px; background: var(--band); color: var(--ink); text-align: left; cursor: pointer;
}
.coming-row.soon { background: var(--pink); }
.coming-row::before, .coming-row::after { content: ""; position: absolute; left: 58px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); }
.coming-row::before { top: -6px; }
.coming-row::after { bottom: -6px; }
.coming-row:active { transform: translateY(1px); }
.coming-badge { display: block; text-align: center; }
.coming-day { display: block; font: 500 24px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.coming-mon { display: block; margin-top: 3px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.coming-main { display: block; min-width: 0; align-self: stretch; border-left: 1px dashed var(--dash); padding: 10px 0 10px 14px; }
.coming-name > span:first-child { display: block; margin-bottom: 3px; font: 500 17px/1.2 var(--font-display); overflow-wrap: anywhere; }
.coming-when, .coming-sub { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.coming-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coming-dot { display: none; }
.coming-folder::before { content: " · "; white-space: pre; }
.coming-mine { display: block; }
.coming-go { width: 14px; height: 14px; }
@media (max-width: 379px) { .coming-mine .wide-only { display: none; } }

.section-label[data-count]::after { content: attr(data-count); color: var(--ink-2); }
.home-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 28px; align-items: start; }
.home-grid > li { min-width: 0; }
.home-grid > li:nth-child(even) { margin-top: 20px; } /* the right column hangs 20px lower */
.folder-card { display: block; width: 100%; min-width: 0; padding: 0; color: var(--ink); text-decoration: none; text-align: left; }
.folder-card::before { content: attr(data-no); display: block; margin-bottom: 8px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--wine); }
.folder-card:active .mosaic, .folder-card.new:active .new-plus { transform: translateY(1px); }
/* the collage: the newest wish on the folder's tint, the next one overlapping it on a paper mat */
.mosaic { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--tint); }
.mosaic > .thumb { position: absolute; left: 8%; top: 8%; width: 58%; height: auto; aspect-ratio: 4 / 5; }
.mosaic > .thumb ~ .thumb { left: auto; top: auto; right: 8%; bottom: 8%; width: 44%; box-shadow: 0 0 0 3px var(--sheet); transform: rotate(2deg); }
.mosaic > .thumb ~ .thumb ~ .thumb { display: none; }
.mosaic.one > .thumb { width: 70%; }
.mosaic.is-cover > .thumb { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.mosaic .thumb-letter { font-size: 26px; }
/* the folder's next date, a strip of tape hanging off the picture's left edge */
.folder-when {
  position: absolute; left: -6px; bottom: 10px; z-index: 1; max-width: calc(100% - 4px); gap: 4px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 0 0 2px var(--paper); transform: rotate(var(--sticker-rot)); transform-origin: left center; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.folder-when.soon { background: var(--tape-done-bg); color: var(--tape-done-ink); } /* the ink strip: it stands out on any folder tint */
.folder-when-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.folder-when .sep-dot { margin: 0 -1px; }
.folder-when-full { display: none; }
/* small phones: a long date name is not cut; the sticker says only "in 12 days" on one line */
@media (max-width: 379px) {
  .folder-when.long .folder-when-name, .folder-when.long .sep-dot, .folder-when.long .folder-when-short { display: none; }
  .folder-when.long .folder-when-full { display: inline; }
}
.folder-card-body { display: block; min-width: 0; margin-top: 10px; }
.folder-card-name {
  font: 500 19px/1.15 var(--font-display);
  overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.folder-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; margin-top: 4px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.folder-card-count { font-variant-numeric: tabular-nums; }
.folder-card-private { display: inline-flex; align-items: center; gap: 4px; }
.folder-card-private .ico { width: 12px; height: 12px; }
.folder-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-height: 24px; }
.folder-card-role { flex: 1 1 auto; min-width: 0; font: 400 13px/1.45 var(--font-body); color: var(--ink-2); }
.face-stack { display: inline-flex; align-items: center; flex: none; }
.face-stack .avatar { width: 20px; height: 20px; font-size: 11px; border: 0; margin-left: -3px; box-shadow: 0 0 0 2px var(--paper); }
.face-stack .avatar:first-child { margin-left: 0; }
.face-stack .avatar.is-me { background: var(--ink); color: var(--bg); } /* me first, in ink */
.face-stack[data-more]::after { content: attr(data-more); margin-left: 7px; font: 400 11px/1.3 var(--font-label); letter-spacing: .1em; color: var(--ink-2); }
/* New folder: an empty dashed frame the size of a collage, the words under it */
.folder-card.new { padding-top: 22px; border: 0; border-radius: 0; background: none; cursor: pointer; }
.folder-card.new::before { content: none; }
.new-plus { display: flex; align-items: flex-end; width: 100%; aspect-ratio: 4 / 5; padding: 14px; border: 1px dashed var(--dash); color: var(--ink); }
.new-plus .ico { width: 20px; height: 20px; }
.new-label { display: block; margin-top: 10px; font: 500 19px/1.15 var(--font-display); color: var(--ink); }
.new-sub { display: block; margin-top: 4px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
@media (min-width: 600px) and (max-width: 1199px) {
  .home-grid > li:nth-child(even) { margin-top: 0; }
  .home-grid > li:nth-child(3n + 2) { margin-top: 20px; }
}
@media (min-width: 900px) {
  /* DesktopHome: the title at the left, the tickets stacked at the right, both on one baseline */
  .coming { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34%); column-gap: 32px; align-items: end; padding-top: 28px; }
  .coming-title { margin: 0 0 8px; padding-right: 0; }
  .coming-title::after { content: none; }
  .coming-title::before { content: attr(data-long); display: block; margin-bottom: 14px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
  .home-grid { column-gap: 16px; row-gap: 40px; }
  .home-grid > li:nth-child(n) { margin-top: 0; }
  .folder-card-name, .new-label { font-size: 22px; }
  .home-folders[data-foot]::after { content: attr(data-foot); display: block; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--rule); text-align: right; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
}
@media (min-width: 900px) and (max-width: 1199px) { .home-grid > li:nth-child(3n + 2) { margin-top: 20px; } }
@media (min-width: 1200px) { .home-grid > li:nth-child(even) { margin-top: 20px; } }
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }

/* Mine */
.mine-tabs { margin-top: -6px; }
.mine { display: flex; flex-direction: column; gap: 24px; }
.mine-group { display: flex; flex-direction: column; gap: 10px; }
.mine-group.is-dim .item { opacity: .72; }
.mine-sub-h { margin: 8px 2px 0; font-size: var(--fs-meta); font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.mine-head { font-size: var(--fs-h2); display: flex; }
.mine-head-link, .mine-head-text { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; color: var(--fg); text-decoration: none; margin-bottom: -6px; }
.mine-head-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-head .count { line-height: 1; padding-top: 3px; color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mine-head .avatar.xs { width: 28px; height: 28px; font-size: 12px; font-family: var(--font-body); }
.mine-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--muted); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; margin: -8px 0 -6px; }
.mine-sum b { color: var(--fg); font-weight: 700; }
.mine-dot { width: 3px; height: 3px; border-radius: 9px; background: var(--field-line); }
.mine-sum[hidden] { display: none; }
.mine-person { align-items: center; flex-wrap: wrap; gap: 0 10px; }
.mine-person .lock-face .avatar, .mine-person .lock-face { flex: none; }
.mine-when { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
.mine-when.is-soon { color: var(--accent-text); }
.mine-when em { font-family: var(--font-display); font-style: italic; font-weight: 600; }
.mine-budgets { display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.mine-budget { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; line-height: 1.35; color: var(--fg); }
.mine-budget + .mine-budget { border-top: 1px solid var(--line); }
.mine-budget .ico { flex: none; width: 18px; height: 18px; color: var(--muted); }
.mine-budget-text { min-width: 0; overflow-wrap: anywhere; }
.mine-budget b { font-weight: 600; }
.mine-over { color: var(--over-fg); font-weight: 700; }
.mine-note { color: var(--muted); font-size: var(--fs-meta); margin: -8px 0; }
.folder-tag.date-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-soft-fg); }
.folder-tag.date-tag .ico { flex: none; width: 12px; height: 12px; }
.folder-tag.date-tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mine-more { align-self: center; color: var(--muted); min-height: 44px; margin: -12px 0; }

/* ---- bottom sheets ---- */
/* --kb / --kb-top: the iPhone keyboard's height and how far iOS scrolled the view (app.js,
   watchKeyboard); 0 wherever the page itself shrinks for the keyboard. */
.sheet-layer { position: fixed; inset: 0; top: var(--kb-top, 0px); bottom: var(--kb, 0px); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet-layer.closing { pointer-events: none; }
.backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity var(--t-sheet) var(--ease); }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100% - 40px - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--sheet); border-radius: 6px 6px 0 0;
  padding: 0 var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform var(--t-sheet) var(--ease);
}
.sheet:focus { outline: none; }
.sheet-layer.open .backdrop { opacity: 1; }
.sheet-layer.open .sheet { transform: none; }
.grab { width: 28px; height: 2px; background: var(--ink); opacity: .3; margin: 8px auto 0; }
/* the title and X stay at the top of a long sheet (X always closes it) */
.sheet-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 0 0 16px; padding: 14px 0 12px;
  position: sticky; top: 0; z-index: 4; background: var(--sheet); border-bottom: 1px solid var(--rule);
}
.sheet { scroll-padding-top: 72px; }
.sheet-title { font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* the X never makes the head taller than the title, so a sub-line sits right under the title */
.sheet-close { margin: 0 -12px -8px 0; }
.sheet-body { display: flex; flex-direction: column; gap: 20px; }
.sheet-sub { color: var(--ink-2); margin-top: -8px; text-wrap: pretty; }
.sheet[data-kind="item"] .sheet-title { -webkit-line-clamp: 4; } /* a product's full name shows nowhere else */
.sheet-section { display: flex; flex-direction: column; gap: 10px; }
.sheet-section + .sheet-section { border-top: 1px solid var(--line); padding-top: 18px; }
.sheet-label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.paste-btn { padding: 0 14px; }
.paste-btn .ico { width: 18px; height: 18px; }
.help { color: var(--ink-2); font-size: 13px; line-height: 1.45; }

.row-list { display: flex; flex-direction: column; margin: 0; }
.row-btn {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0; border: none; border-bottom: 1px solid var(--rule); background: none; border-radius: 0;
  font-weight: 500; font-size: 15px; text-align: left; color: var(--ink); text-decoration: none; width: 100%;
}
.row-btn .ico { color: var(--ink); }
.row-btn > .ico:not(.row-chev):not(.row-ext):not(.row-end) { display: none; } /* rows carry words, not icons */
.row-btn:active { background: var(--soft); }
.row-btn.danger, .row-btn.danger .ico { color: var(--danger); }

.people-list, .folder-list, .occ-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.person, .occ-row { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.person-main, .folder-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-name .you { color: var(--ink-2); font-weight: 400; }
.person-sub { color: var(--muted); font-size: var(--fs-meta); line-height: 1.35; }
.role-text { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); flex: none; }
/* the inline confirm row: one sentence, Cancel and a named button */
.inline-confirm {
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin: 6px 0; border-radius: 2px;
  background: var(--band); box-shadow: inset 2px 0 0 var(--ink);
}
.inline-confirm.is-danger { box-shadow: inset 2px 0 0 var(--danger); }
.fgroup-box > .inline-confirm { margin: 8px 0 12px; }
.confirm-text { font-size: 14px; line-height: 1.4; color: var(--fg); }
.confirm-text em { font-family: var(--font-display); font-weight: 500; font-style: italic; }
.confirm-btns { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.confirm-btns .btn.small { padding: 0 12px; }
.role-select {
  flex: none; min-height: 44px; width: 124px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background-color: transparent; font-weight: 500; font-size: 14px;
  padding: 0 24px 0 0; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent calc(50% - .8px), var(--ink) calc(50% - .8px), var(--ink) calc(50% + .8px), transparent calc(50% + .8px)), linear-gradient(135deg, transparent calc(50% - .8px), var(--ink) calc(50% - .8px), var(--ink) calc(50% + .8px), transparent calc(50% + .8px));
  background-position: calc(100% - 9px) 18px, calc(100% - 3px) 18px; background-size: 6px 6px; background-repeat: no-repeat;
}
.role-select:focus { outline: none; border-bottom-color: var(--wine); box-shadow: 0 1px 0 var(--wine); }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; }
.switch-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.switch {
  flex: none; appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 2px; margin: 0 0 0 36px; position: relative; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; transition: background var(--t-press) ease-out;
}
/* off: outlined track, darker knob (both 3:1); on: filled pink, light knob */
.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 1px; background: var(--ink);
  transition: transform var(--t-press) ease-out, background var(--t-press) ease-out;
}
/* the state word, left of the track (decorative: the switch already says on or off) */
.switch::after {
  content: "OFF"; content: "OFF" / ""; position: absolute; right: calc(100% + 9px); top: 50%; transform: translateY(-50%);
  font: 400 11px/1 var(--font-label); letter-spacing: .1em; color: var(--ink-2); pointer-events: none;
}
.switch:checked { background: var(--ink); }
.switch:checked::before { background: var(--paper); transform: translateX(18px); }
.switch:checked::after { content: "ON"; content: "ON" / ""; color: var(--ink); }
.switch:focus-visible { outline-offset: 3px; }
.link-access { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.link-access .switch-text { cursor: pointer; }
.link-access .person-name { white-space: normal; overflow: visible; line-height: 1.3; }
.more-opts { border-radius: var(--r-md); }
.more-sum {
  list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; cursor: pointer;
  color: var(--ink); font-weight: 500; font-size: 15px; border-radius: 2px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.more-sum::-webkit-details-marker { display: none; }
.more-sum .chev { width: 18px; height: 18px; transition: transform var(--t-ui) var(--ease); }
.more-opts[open] .more-sum .chev { transform: rotate(180deg); }
.code-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0 8px; }
.code-label { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.code { font-family: var(--font-label); font-weight: 700; font-size: 20px; letter-spacing: .14em; user-select: all; -webkit-user-select: all; }


.occ-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; min-height: 52px; justify-content: center;
  padding: 4px 6px; margin: 0 -6px; border: none; background: none; text-align: left; border-radius: var(--r-sm);
}
.occ-main .person-name { max-width: 100%; }
.occ-main:active { background: var(--soft); }
/* a passed date reads from its quieter colours, not from fading (opacity took it under 3:1) */
.occ-row.past .person-name { color: var(--muted); }
.occ-badge {
  flex: none; width: 48px; height: 52px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-soft-fg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.occ-row.past .occ-badge { background: var(--soft); color: var(--muted); }
.occ-day { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.occ-mon { font: 400 11px/1 var(--font-label); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- toast ----
   Pages: bottom left, level with the + button and never over it.
   Sheets: bottom centre, over the sheet, never across its title. */
#toast {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper);
  padding: 0 4px 0 14px; min-height: 48px; border-radius: 2px; font-weight: 500; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
#toast > span { flex: 1; padding: 12px 10px 12px 0; }
.toast-act { flex: none; min-height: 44px; padding: 0 10px; border-radius: 2px; border: none; background: none; color: var(--paper); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#toast:not(:has(.toast-act)) { padding-right: 14px; }
#toast:not(:has(.toast-act)) > span { padding-right: 0; }
body.has-nav:not(.sheet-open) #toast { bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px)); }
.sheet-open #toast { bottom: calc(16px + var(--kb, 0px) + env(safe-area-inset-bottom, 0px)); }
/* the keyboard covers the home bar: the sheet needs no room for it */
.kb-open .sheet { padding-bottom: 20px; }
/* taps on the message go through (a retry is never blocked); only its button takes them */
#toast { pointer-events: none; }
#toast .toast-act { pointer-events: auto; }

/* ---- invite, welcome and the small sheets (Folder menu, Share, You) ---- */
.link-row .btn-link.muted-link, .btn-link.muted-link { color: var(--muted); font-weight: 500; }

.welcome {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px 12px 14px; margin-top: -6px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
}
.welcome-art { flex: none; color: var(--muted); padding-top: 4px; }
.welcome-art .sparkle { margin: 0; }
.welcome-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.welcome-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.welcome-title em { font-style: italic; }
.welcome-body { color: var(--muted); font-size: 14px; line-height: 1.4; }
.welcome-body strong { color: var(--fg); font-weight: 700; }
.tab-note { grid-column: 1 / -1; margin: 0 0 2px; color: var(--muted); font-size: var(--fs-meta); }
.welcome-rule { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.welcome-x { margin: -6px 0 -6px 0; width: 36px; height: 36px; }

.surprise-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: -8px; padding: 0;
  font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.surprise-note .ico { display: none; }
.sheet-section .surprise-line, .item-detail ~ .surprise-note, .status-wrap .surprise-note { margin-top: 0; }
.status-wrap { display: flex; flex-direction: column; gap: 10px; }
/* item sheet: the status block (the main action), like a small card */
.status-block { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--line); }
.status-block:empty { display: none; }
.status-btns { display: flex; gap: 10px; align-items: center; }
/* The wisher's star: Top pick on the card and the toggle in the item sheet. */
.top-pick { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 4px; font: 700 11px/14px var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--wine); }
.top-pick .ico { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.status-btn.star { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.status-btn.star .ico { width: 18px; height: 18px; }
.status-btn.star[aria-pressed="true"] { color: var(--accent-text, var(--accent)); border-color: currentColor; }
.status-btn.star[aria-pressed="true"] .ico { fill: currentColor; }
.status-quiet { min-height: 44px; padding: 0; color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--fg); }
.status-line .ico { flex: none; width: 20px; height: 20px; color: var(--accent-text); }
.status-note { color: var(--muted); font-size: var(--fs-meta); line-height: 1.4; }
.status-line + .status-note { margin-top: -6px; }
.status-block > .surprise-note { margin-top: 0; }
.status-block > .inline-confirm { margin: 0; }
/* Hide my name: a switch row in the status block, or one quiet line */
.hide-name { min-height: 48px; }
.hide-name .row-lead { flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.hide-name .row-lead .ico { width: 18px; height: 18px; }
.hide-name .person-name { white-space: normal; }
.hide-name .person-sub em, .status-note em { font-family: var(--font-display); font-weight: 600; font-style: italic; }
.btn-wide { width: 100%; }
.detail-cur { color: var(--muted); font-size: var(--fs-meta); line-height: 1.35; }
.for-read { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; }
.stk-ico { width: 10px; height: 10px; margin-right: 0; flex: none; }
.sticker-on-thumb > span:not(.visually-hidden) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#toast em { font-style: italic; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide-name-note { display: flex; align-items: flex-start; gap: 8px; padding: 0; font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.hide-name-note .ico { display: none; }
.invite-title em { font-style: italic; overflow-wrap: anywhere; }
.row-ext { flex: none; color: var(--muted); width: 18px; height: 18px; margin-left: auto; }
.row-btn .row-chev { margin-left: auto; }
.row-ico { display: none; }
.switch-row .person-sub { font-size: 12.5px; }
.me-foot { display: flex; flex-direction: column; align-items: center; margin-top: -8px; }
.me-foot .inline-confirm { align-self: stretch; }
.quiet-danger { color: var(--danger); font-weight: 500; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.help-steps { display: flex; flex-direction: column; gap: 12px; }
.help-steps strong { color: var(--fg); }

/* ---- a sheet opened from another sheet: ‹ Back ---- */
.sheet-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sheet-back {
  position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0; margin: -6px 0 2px;
  border: none; background: none; color: var(--ink); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; border-radius: 2px;
}
.sheet-back::after { content: ""; position: absolute; inset: -8px -8px -8px 0; } /* 44px touch target */
.sheet-back .ico { width: 14px; height: 14px; }
.sheet-back:active { text-decoration-thickness: 2px; }

/* ---- the Folder sheet: grouped rows ---- */
.folder-cover.sheet-strip { height: 72px; margin: 0 0 14px; display: flex; align-items: center; justify-content: center; color: var(--accent-soft-fg); }
.sheet-strip .sparkle { width: 40px; height: 34px; }
.folder-sheet .sheet-head { margin-bottom: 10px; }
.folder-sheet .sheet-title { font-size: 23px; }
.folder-sheet .sheet-body { gap: 18px; }
.first-visit { display: flex; align-items: center; gap: 8px; margin-top: -6px; color: var(--accent-text); font-size: var(--fs-meta); font-weight: 600; }
.first-visit .sparkle { flex: none; width: 22px; height: 19px; }
.fgroup { display: flex; flex-direction: column; gap: 0; }
.fgroup-h { display: flex; align-items: baseline; gap: 6px; padding: 0 0 10px; border-bottom: 1px solid var(--rule); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.fgroup-lock { display: inline-flex; }
.fgroup-lock .ico { width: 14px; height: 14px; }
.fgroup-box { border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; } /* rows on hairlines, no box */
.fgroup-note { padding: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.fgroup > .surprise-note { margin-top: 0; }
.invite-btn { align-self: stretch; }
.srow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 0; margin: 0;
  border: none; border-radius: 0; background: none; text-align: left; color: var(--ink); font-size: 15px; cursor: default;
}
button.srow, label.srow { cursor: pointer; }
button.srow:active, label.srow:active, a.srow:active { background: var(--band); box-shadow: calc(-1 * var(--gutter)) 0 0 var(--band), var(--gutter) 0 0 var(--band); } /* the pressed row bleeds to both edges */
.fgroup-box > * + * { border-top: 1px solid var(--line); }
.fgroup-box > .inline-confirm { border-top: none; }
.srow .row-lead { flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.row-lead:has(> .ico:only-child) { display: none; } /* rows carry words, not icons (a folder swatch or a face stays) */
.srow .row-lead .ico { width: 18px; height: 18px; }
.srow.danger .row-title { color: var(--danger); }
.srow .row-title em { font-family: var(--font-display); font-weight: 500; font-style: italic; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.row-title .you { color: var(--ink-2); font-weight: 400; }
.row-sub { color: var(--ink-2); font-size: 13px; font-weight: 400; line-height: 1.45; max-width: 34ch; }
.row-sub:empty { display: none; }
.row-sub.is-saved, .row-value.is-saved { color: var(--bought-fg); font-weight: 600; }
.row-value { flex: 1; min-width: 0; text-align: right; color: var(--ink-2); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text + .row-value { flex: none; max-width: 45%; }
.row-end { flex: none; width: 16px; height: 16px; color: var(--ink); transition: transform var(--t-press) ease-out; }
.row-end.is-up { transform: rotate(180deg); }
.srow .switch { margin-left: 36px; } /* room for the state word */
.rename-form { display: block; }
.rename-form .field-row { width: 100%; }
.person-row .avatar.md { flex: none; }
.sub-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--soft); }
/* A row's icon tile on the soft box: the surface colour, so it shows as a tile like everywhere else. */
.sub-box .switch-row { min-height: 44px; }
.sub-box .row-btn { min-height: 44px; padding: 0 2px; margin: -4px 0; width: auto; align-self: flex-start; }
.sub-box .row-btn:active { background: none; opacity: .7; }
.sub-box .help { font-size: var(--fs-meta); }
.sub-head { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.box-btns { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.field-err { color: var(--danger); font-size: 13px; margin-top: 6px; } /* --danger passes 4.5:1 on paper, sheet, band and pink, light and dark */
.field-err:empty { display: none; }
.budget-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.quiet-link { color: var(--muted); }
.role-opts { display: flex; flex-direction: column; gap: 2px; }
.role-opt { display: flex; align-items: flex-start; gap: 12px; padding: 6px 2px; min-height: 44px; cursor: pointer; border-radius: var(--r-sm); }
.role-opt input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.role-opt-text { display: flex; flex-direction: column; min-width: 0; }
.role-opt-k { font-weight: 500; font-size: 15px; }
.role-opt-d { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.sub-box .code-line { align-items: center; padding: 0; }
.sub-box .code-line { align-items: stretch; gap: 8px; }
/* the code sits in an outlined field, the same height as Copy code beside it */
.sub-box .code {
  flex: 1; display: flex; align-items: center; min-width: 0; min-height: 44px; padding: 4px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: none; font-family: var(--font-label); font-weight: 700; font-size: 15px; letter-spacing: .08em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.2;
}
.sub-box .code-line .btn { flex: none; min-height: 44px; height: auto; }
.sub-box .code.is-link { font-size: 12.5px; letter-spacing: .02em; }
.folder-cover.cover-thumb { flex: none; width: 44px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); margin: 0; }
.cover-thumb .ico { width: 18px; height: 18px; }
.fchip.dates-chip { gap: 5px; }

.notice { padding: 12px 14px; border-radius: var(--r-md); background: var(--soft); font-size: 14px; }

/* ---- motion (only things people cause) ---- */
.confetti { position: fixed; z-index: 50; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 999px; pointer-events: none; animation: confetti 600ms var(--ease) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) scale(.6); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }
.chip.pop { animation: pop 320ms var(--spring); }
.chip.stamp.pop { animation: stamp 320ms var(--spring); }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes stamp { 0% { transform: rotate(-2deg) scale(.96); } 60% { transform: rotate(-2deg) scale(1.06); } 100% { transform: rotate(-2deg) scale(1); } }
.item.is-fresh { animation: drop-in 280ms var(--ease); }
@keyframes drop-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confetti { display: none; }
  .thumb.is-loading { animation: none; }
}

@media (min-width: 600px) {
  body { padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
  .sheet-layer { align-items: center; }
  .sheet { border-radius: 6px; max-width: 520px; max-height: calc(100% - 64px); }
  .sheet-head { padding-top: 22px; }
  .grab { display: none; } /* a centred dialog is not dragged */
}

/* desktop: the app bar is a sticky top bar */
@media (min-width: 900px) {
  :root { --gutter: 32px; --fs-title: 48px; --fs-body: 16px; }
  body.has-nav .app { max-width: 1016px; } /* DesktopHome: a 1080px column including the 32px gutters; sign-in, invite and the first-time screen keep 560px */
  body.has-nav { padding-top: 0; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  body.has-nav:not(.sheet-open) #toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .nav { position: sticky; top: 0; height: 64px; padding: 0; margin-bottom: 8px; border-top: none; background: var(--paper); }
  /* the bar's paper and its hairline run edge to edge; the links stay in the column */
  .nav::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav-inner { max-width: none; align-items: center; gap: 28px; }
  .nav-brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: 28px; color: var(--ink); text-decoration: none; border-radius: 2px; }
  .app-top { display: none; } /* the top bar carries the logo */
  .nav .gear-btn { display: inline-grid; flex: none; margin-left: -16px; order: 4; }
  /* Desktop order: Home, Mine, then Add a link and the gear at the right (phones: Home · + · Mine). */
  .nav-brand { order: 0; } #navHome { order: 1; } #navMine { order: 2; } .nav-add { order: 3; }
  .nav-slot { flex: none; min-height: 44px; }
  .nav-slot:hover { color: var(--ink); }
  .nav-slot[aria-current="page"]::before { content: none; }
  .nav-slot[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
  /* Add a link: the compact primary button, words only */
  .nav-add { flex: none; margin-left: auto; min-height: 40px; height: 40px; padding: 0 16px; border-radius: 2px; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: .01em; }
  .nav-add:hover { color: var(--paper); }
  .nav-add:active { background: var(--ink-press); transform: translateY(1px); }
  .nav-plus { display: none; }
  .nav-add:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
  .nav-add-label { display: inline; }
  .nav-add[hidden] ~ .gear-btn { margin-left: auto; }
  .sheet-title { font-size: 30px; }
}

/* desktop: the same cards as a grid, picture on top */
@media (min-width: 900px) {
  .list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .group-head { grid-column: 1 / -1; padding-top: 18px; }
  .filters + .list { margin-top: 4px; }
  .item { flex-direction: column; gap: 12px; padding: 12px 12px 14px; }
  .thumb-box { width: 100%; }
  .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  .thumb-letter { font-size: 64px; }
  .item-main { width: 100%; flex: 1; min-height: 0; gap: 3px; }
  .item-foot { padding-top: 8px; }
}
@media (min-width: 600px) {
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
}
@media (min-width: 1200px) {
  .list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- budget per gift ---- */
.over-note { flex: none; color: var(--over-fg); font-weight: 600; font-size: var(--fs-micro); }
.item-meta .price + .over-note::before, .item-meta .over-note + .site::before { content: "·"; margin-right: 6px; color: var(--muted); font-weight: 400; }
/* over the budget: full contrast, a small clay tag in the meta line */
.over-tag { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--over-bg); color: var(--over-fg); font-size: 11.5px; font-weight: 700; line-height: 1; }
.budget-row .cur-select { flex: none; width: 112px; }
@media (max-width: 379px) { .budget-row .cur-select { width: 96px; padding: 0 10px; } .budget-row .field { padding: 0 10px; } }

/* ---- settings rows, Folder settings, New folder rules ---- */

.setting-rows { display: flex; flex-direction: column; gap: 4px; }
/* A select in a settings row reads as the row's quiet value ("£ GBP ⌄"), like Budget per gift:
   no box, sized to its words, so the row's label keeps the room. */
.setting-select > select, .rules-box .srow > select {
  flex: none; width: auto; max-width: 48%; min-height: 44px; margin-right: -6px; padding: 0 28px 0 6px;
  border: none; border-radius: 2px; background-color: transparent; color: var(--ink-2); font: 400 11px var(--font-label); text-transform: uppercase; letter-spacing: .1em;
  text-align: right; text-align-last: right; appearance: none; -webkit-appearance: none;
  background-image: var(--select-chev);
  background-position: right 6px center; background-size: 14px 14px; background-repeat: no-repeat;
}
.setting-select > select:focus, .rules-box .srow > select:focus { outline: none; border-color: transparent; color: var(--fg); }
.setting-select > select:focus-visible, .rules-box .srow > select:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
@media (max-width: 360px) {
  .setting-select, .srow.switch-row { gap: 10px; }
}
.person-sub.is-saved { color: var(--bought-fg); font-weight: 600; }
.me-profile { display: flex; align-items: flex-end; gap: 14px; }
.me-photo { flex: none; padding-bottom: 2px; }
.me-photo .avatar { width: 48px; height: 48px; font-size: 19px; }
.me-name { flex: 1; min-width: 0; }
.theme-seg { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); } /* three words, an ink bar under the picked one */
.theme-opt { position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: -1px; font-weight: 500; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.theme-opt .ico { display: none; }
.theme-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.theme-opt:has(input:checked) { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 2px; }
.theme-seg + .help { margin-top: -4px; }
.rules-opts { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0 14px; background: var(--surface); }
.rules-sum { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 0; cursor: pointer; }
.rules-sum::-webkit-details-marker { display: none; }
.rules-sum-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rules-title { font-weight: 600; font-size: 14px; color: var(--fg); }
.rules-line { color: var(--muted); font-size: var(--fs-meta); line-height: 1.35; }
.rules-sum .chev { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform var(--t-ui) var(--ease); }
.rules-opts[open] .rules-sum .chev { transform: rotate(180deg); }
.rules-box { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 14px; border-top: 1px solid var(--line); }
.rules-box .switch-row .person-sub { font-size: 12.5px; }
.rules-box .link-access .role-select { width: 124px; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.date-row .hide-name, .rules-box .hide-name { min-height: 40px; }
.new-help { text-align: center; margin-top: -6px; font-size: var(--fs-meta); }
.empty .btn + .btn { margin-top: 4px; }

/* ---- photos: profile photos over the letter, folder covers ---- */
.avatar { position: relative; overflow: hidden; }
.avatar .photo, .thumb .photo, .folder-cover .photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit;
  background: var(--soft);
}
.avatar.has-photo { color: transparent; }
.mosaic.is-cover .thumb.has-photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--img-ring); pointer-events: none; }
.folder-cover { position: relative; flex: none; height: 96px; border-radius: var(--r-lg); overflow: hidden; background: var(--accent-soft); margin-bottom: -2px; }
.folder-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--img-ring); pointer-events: none; }
@media (min-width: 700px) { #folderCover { height: 140px; } }

/* Settings: the photo button, with a small camera sticker */
.me-photo { position: relative; padding: 0 0 2px; border: none; background: none; border-radius: 999px; align-self: flex-start; margin-top: 22px; }
.me-photo .avatar { width: 56px; height: 56px; font-size: 21px; }
.me-photo-badge {
  position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); box-shadow: 0 0 0 2px var(--paper);
}
.me-photo-badge .ico { width: 12px; height: 12px; }
.me-photo:active { transform: translateY(1px); }
.me-name-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.photo-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: -8px; }
.photo-acts[hidden] { display: none; }
.photo-acts .row-sub { font-size: var(--fs-meta); }
.danger-text { color: var(--danger); }
.me-name-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.name-saved { text-align: right; }
.danger-link { color: var(--danger); font-weight: 600; min-height: 44px; }
.help-apps > summary { list-style: none; }
.help-apps > summary::-webkit-details-marker { display: none; }
.help-apps[open] > summary .row-end { transform: rotate(180deg); }
.help-apps .help-steps { padding: 0 14px 14px 58px; }
a.srow { text-decoration: none; cursor: pointer; }
.feedback-form { gap: 10px; }
.feedback-row { display: flex; align-items: center; gap: 12px; }
.feedback-row .feedback-note { flex: 1; min-width: 0; margin: 0; }
.feedback-note.is-saved { color: var(--bought-fg); font-weight: 600; }
.defaults-box .srow { padding: 8px 0; min-height: 48px; background: none; }
.defaults-box > .srow + .srow { border-top: 1px solid var(--line); }
.defaults-box .help { margin: 0; }

/* Folder settings › Look: colour swatches and the cover */
.srow.look-row { flex-direction: column; align-items: stretch; gap: 6px; }
.look-head { display: flex; align-items: baseline; gap: 8px; }
.look-head .row-value { text-align: right; }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 360px; }
.swatch { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; border-radius: 2px; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
/* Soft pastel dots (the folder's tint, a little deeper), ringed by the accent: calm next to the rows. */
.swatch-dot { width: 100%; height: 32px; background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink); } /* a flat square of the folder's tint */
.swatch:has(input:checked) .swatch-dot { box-shadow: inset 0 0 0 1px var(--ink), 0 5px 0 -2px var(--sheet), 0 7px 0 -2px var(--ink); } /* the picked one: an ink bar under it */
.swatch:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 1px; }
.cover-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cover-opt { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: var(--r-md); background: none; }
.cover-opt .thumb { width: 100%; height: auto; aspect-ratio: 1; border-radius: 11px; }
.cover-opt[aria-pressed="true"] { border-color: var(--ink); }
.cover-tile { aspect-ratio: 1; border: 1.5px dashed var(--field-line); color: var(--muted); }
.cover-tile[aria-pressed="true"] { border-style: solid; border-width: 2px; color: var(--fg); }
.cover-tile-in { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: 6px; font-weight: 600; font-size: var(--fs-meta); text-align: center; }
.cover-tile-in .ico { width: 22px; height: 22px; }
.cover-opt:active { transform: translateY(1px); }

/* A themed folder: its collage on Home sits on the folder's tint (.mosaic uses --tint) */

/* ---- Add a link: sub-line, To swatches, the live preview, + Details ---- */
.add-sub { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.4; }
.add-sub[hidden] { display: none; }
.add-sub-line { display: flex; align-items: flex-start; gap: 6px; }
.add-sub-line .ico { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.add-sub em { font-style: italic; font-weight: 600; color: var(--fg); }
.folder-cover.to-swatch { flex: none; width: 12px; height: 12px; border-radius: 0; margin: 0; background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink); } /* a folder's 12px square of its tint */
.folder-cover.to-swatch.has-photo { background: var(--band); }
.to-swatch-slot { display: inline-flex; }
.to-row .to-swatch { width: 12px; height: 12px; }
.add-preview { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--raised); margin-top: -4px; }
.add-preview[hidden] { display: none; }
.add-preview .thumb { width: 52px; height: 52px; flex: none; aspect-ratio: 1; }
.add-preview .thumb-letter { font-size: 22px; }
.add-preview-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.add-preview-title { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-preview .item-meta .over-tag + .site::before { content: "·"; margin-right: 6px; }
.add-details-btn { align-self: flex-start; }
.add-details-btn[hidden] { display: none; }
.add-details-hint { color: var(--muted); font-weight: 500; }
.add-details-hint:empty { display: none; }
.add-details { display: flex; flex-direction: column; gap: 16px; margin-top: -4px; }
.add-details[hidden] { display: none; }
.field-hint { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: var(--fs-meta); line-height: 1.4; }
.field-hint .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.field-hint[hidden], .field-wrap[hidden] { display: none; }
#forHint:empty { margin: 0; }


/* ---- New folder: preset chips with a second line, the setup line box, rules in groups ---- */
.new-lead .btn-link { min-height: 32px; margin: -4px 0; padding: 0; font-size: inherit; }
/* five chips as 2 + 3 (never one alone on the last row) */
.preset-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: -4px; }
.preset-chips > .preset-chip { grid-column: span 2; min-width: 0; }
.preset-chips > .preset-chip:nth-child(-n+2) { grid-column: span 3; }
.preset-chips > .preset-chip:nth-child(n+3) { padding: 6px 9px; }
.preset-chips > .preset-chip:nth-child(n+3) .preset-name { font-size: 13.5px; }
.fchip.preset-chip { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; min-height: 48px; padding: 6px 14px; border-radius: 16px; white-space: normal; text-align: left; box-shadow: var(--sticker); }
.fchip.preset-chip::after { inset: 0; }
.preset-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.preset-sub { font-weight: 500; font-size: 12px; line-height: 1.25; color: var(--muted); }
.fchip.preset-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent-soft-fg); }
.fchip.preset-chip[aria-pressed="true"] .preset-sub { color: var(--accent-soft-fg); }
/* small phones: presets in rows of two (2 + 2 + 1), so a name never breaks word by word */
@media (max-width: 379px) {
  .preset-chips > .preset-chip, .preset-chips > .preset-chip:nth-child(-n+2) { grid-column: span 3; }
  .preset-chips > .preset-chip:nth-child(n+3) { padding: 6px 12px; }
  .preset-chips > .preset-chip:nth-child(n+3) .preset-name { font-size: inherit; }
}
@media (max-width: 359px) {
  .budget-row .cur-select { width: 84px; padding: 0 8px; }
  .budget-row .field { padding: 0 8px; }
}
.rules-opts { border: none; padding: 0; background: none; display: flex; flex-direction: column; gap: 8px; }
.rules-sum { align-items: flex-start; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md); background: var(--soft); }
.rules-sum .setup-line { flex: 1; min-width: 0; margin: 0; min-height: 0; padding: 0; }
.rules-toggle { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 22px; color: var(--accent-text); font-weight: 700; font-size: 14px; }
.rules-toggle .chev { color: var(--accent-text); }
.rules-box { gap: 8px; padding: 8px 0 4px; border-top: none; }
.rules-box .fgroup-h { margin-top: 6px; }
.field-srow { align-items: flex-start; }
.field-srow .row-text { gap: 10px; }
.field-srow .row-lead { margin-top: -2px; }
.date-fields { display: flex; flex-direction: column; gap: 8px; }
.date-fields .date-row { display: flex; flex-wrap: wrap; gap: 8px; }
.date-fields .date-row .field { flex: 1 1 96px; min-width: 0; }
/* a native date input needs about 150px for "mm/dd/yyyy" and its calendar icon: it wraps under the name when narrower */
.date-fields .date-row .field[type="date"] { flex: 1 1 150px; min-width: 150px; }
.yearly-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.yearly-row .row-title { font-weight: 500; }
.new-folder-form .new-help { text-align: center; margin-top: -6px; }

/* ---- the invite card (signed out, with an invite link) ---- */
/* ---- signed-out pages on the pink page: Sign in, Make an account, Check your email, the
   invite ticket and the first-time screen. A header with .auth-head turns the page pink. ---- */
body:has(.auth-head) {
  --bg: var(--pink); --rule-pink: color-mix(in srgb, var(--ink) 16%, var(--pink));
  background: var(--pink);
  padding-top: calc(28px + env(safe-area-inset-top, 0px)); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
body:has(.auth-head) .app { gap: 0; min-height: calc(100vh - 38px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
@supports (min-height: 100dvh) { body:has(.auth-head) .app { min-height: calc(100dvh - 38px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
.auth-head { padding-top: 0; gap: 0; }
.auth-head .brand-row { align-items: flex-end; justify-content: space-between; gap: 12px; }
.auth-head .brand { font-size: 0; line-height: 0; }
.auth-ref { padding-bottom: 13px; white-space: nowrap; }
.auth-head .hero-sub { color: var(--ink); font-size: 15px; line-height: 1.5; max-width: 34ch; }
/* Sign in: the tagline, one sentence a line, with the figure beside its short last line */
.auth-fig { position: relative; margin-top: 30px; padding-bottom: 50px; }
.auth-head.has-fig .hero-sub { max-width: 13em; font: 400 28px/1.12 var(--font-display); letter-spacing: -0.01em; text-wrap: wrap; }
.auth-head.has-fig .hero-line { display: block; }
.gift-fig { position: absolute; right: -20px; bottom: 0; display: block; overflow: visible; color: var(--ink); pointer-events: none; }
.auth-fig-cap { margin-top: 8px; }
.script-word { font-style: italic; font-weight: 400; color: var(--wine); }
.auth-panel { gap: 0; margin: 44px 0 28px; }
.auth-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-title); line-height: 1.02; letter-spacing: -0.015em; }
.auth-panel > form { margin-top: 26px; gap: 20px; }
.auth-panel > form > .btn { margin-top: 4px; }
.auth-panel > form > .field-err { margin-top: -10px; }
.auth-panel .link-row { margin: 12px 0 0; }
.auth-panel .link-row .btn-link:first-child:not(:last-child) { color: var(--ink); }
.auth-text { margin-top: 16px; max-width: 34ch; color: var(--ink); }
.auth-text + .auth-text { margin-top: 8px; }
.auth-text em { font-family: var(--font-display); font-style: italic; overflow-wrap: anywhere; }
.auth-panel > .btn-link { align-self: flex-start; margin-top: 12px; }
/* the foot: the other way in, on a hairline, with the page number */
.auth-switch { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--rule-pink); display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.auth-folio { margin-left: auto; padding-left: 8px; }
/* the invite: an admission ticket, perforated at both ends and torn across the middle; the form
   below it (.auth-panel.is-stub) is the same piece of paper */
.auth-head.is-invite .hero-sub { margin-top: 6px; max-width: calc(100% - 92px); color: var(--ink-2); }
.invite-card {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 18px 0 0; padding: 22px 20px 0;
  background: var(--sheet); color: var(--ink); border: 0; border-radius: 4px 4px 0 0; transform: none;
}
.invite-card::before, .auth-panel.is-stub::after, .onboard-panel.is-ticket::before, .onboard-panel.is-ticket::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; pointer-events: none;
  background: radial-gradient(circle at 6px 0, var(--pink) 4px, transparent 4.5px) 50% 0 / 12px 5px repeat-x; /* punched holes, not a blend */
}
.auth-panel.is-stub::after, .onboard-panel.is-ticket::after { top: auto; bottom: 0; background-image: radial-gradient(circle at 6px 5px, var(--pink) 4px, transparent 4.5px); }
/* the screen's one tilted thing: a sage plate with the bow, stuck across the ticket's corner (a 3px mat, no shadow) */
.invite-plate { position: absolute; z-index: 1; right: -6px; top: -60px; width: 72px; height: 90px; background: var(--sage); box-shadow: 0 0 0 3px var(--sheet); transform: rotate(2deg); color: var(--ink); pointer-events: none; }
.invite-plate::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--ink); opacity: .18; }
.invite-plate svg { position: absolute; left: 22%; top: 22%; width: 46%; height: auto; display: block; overflow: visible; }
.invite-ref { display: flex; flex-wrap: wrap; height: 1.3em; overflow: hidden; padding-right: 58px; white-space: nowrap; } /* "Admit one" drops off when the name is long */
.invite-ref-main { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--wine); }
.invite-ref-name:empty { display: none; }
.invite-ref-name::before, .invite-ref-admit::before { content: "\00b7"; margin: 0 .8em; }
.invite-tag { display: block; margin-top: 8px; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.02; letter-spacing: -0.015em; color: var(--ink); }
.invite-top { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.invite-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--band); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.invite-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.invite-face { flex: none; }
.invite-card .invite-title { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.2; letter-spacing: -0.005em; text-wrap: pretty; }
.invite-card .invite-title strong { font-weight: 400; }
.invite-card .invite-title em { font-style: normal; overflow-wrap: anywhere; }
.invite-body { margin-top: 8px; max-width: 30ch; font-size: 15px; line-height: 1.5; color: var(--ink); }
.invite-rules { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.invite-rules[hidden] { display: none; }
.invite-rule { display: inline-flex; align-items: baseline; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.invite-rule .ico { display: none; }
.invite-rule-sub { color: var(--ink-2); white-space: pre; }
.ticket-tear { display: block; position: relative; height: 0; margin: 18px -20px 0; border-top: 1px dashed var(--dash); }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -6.5px; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); }
.ticket-tear::after { left: auto; right: -6px; }
.invite-card .anon-join { min-height: 0; padding: 12px 0; }
.invite-card .anon-join:active { box-shadow: -20px 0 0 var(--band), 20px 0 0 var(--band); }
.auth-panel.is-stub { position: relative; margin: 0 0 20px; padding: 16px 20px 22px; background: var(--sheet); border-radius: 0 0 4px 4px; }
.auth-label { padding-bottom: 8px; border-bottom: 1px solid var(--rule); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.auth-panel.is-stub > form { margin-top: 12px; gap: 14px; }
.auth-panel.is-stub > form > .btn { margin-top: 6px; }
.auth-panel.is-stub > form > .field-err { margin-top: -6px; }
/* first time: name, then start or join */
.auth-head.is-onboard .display { margin-top: 34px; }
.auth-head.is-onboard .hero-sub { margin-top: 10px; }
.onboard-panel { position: relative; gap: 14px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule-pink); }
.onboard-panel h2 { font-weight: 400; }
.onboard-panel h2 em { font-style: italic; overflow-wrap: anywhere; }
.onboard-panel.is-ticket { padding: 24px 20px 22px; border-top: 0; border-radius: 4px; background: var(--sheet); }
.onboard-panel.is-ticket + .onboard-panel { border-top: 0; }
.onboard-panel .new-help { text-align: left; margin-top: 0; }
.onboard-panel .anon-join { min-height: 0; padding: 4px 0; }
.join-toggle { align-self: flex-start; margin: -6px 0 0; }
.onboard-out { margin: 24px 0 8px; }
@media (max-width: 379px) {
  .auth-head.has-fig .hero-sub { font-size: 25px; }
  .invite-card { padding-left: 16px; padding-right: 16px; }
  .ticket-tear { margin-left: -16px; margin-right: -16px; }
  .auth-panel.is-stub, .onboard-panel.is-ticket { padding-left: 16px; padding-right: 16px; }
  .invite-tag { font-size: 34px; }
}

/* ---- folder themes: each is one flat tint (light and dark values are the --tint-* tokens at the
   top). Classic is the app's own pink, spelled out so its swatch shows pink inside a folder that
   has another colour. ---- */
[data-folder-theme="classic"] { --tint: var(--tint-classic); --accent-soft: var(--tint-classic); }
[data-folder-theme="sage"] { --tint: var(--tint-sage); --accent-soft: var(--tint-sage); }
[data-folder-theme="sky"] { --tint: var(--tint-sky); --accent-soft: var(--tint-sky); }
[data-folder-theme="lavender"] { --tint: var(--tint-lavender); --accent-soft: var(--tint-lavender); }
[data-folder-theme="butter"] { --tint: var(--tint-butter); --accent-soft: var(--tint-butter); }
[data-folder-theme="clay"] { --tint: var(--tint-clay); --accent-soft: var(--tint-clay); }

/* A phone on its side (browser tabs; the installed apps are portrait-only): little height, so the
   cover shrinks, sheets sit at the bottom and scroll, and an item's picture leaves room for its words. */
@media (max-height: 500px) {
  #folderCover { height: 64px; }
  .sheet-layer { align-items: flex-end; }
  .sheet { max-height: calc(100% - 12px); overflow-y: auto; border-radius: 6px 6px 0 0; }
  .thumb.big { max-height: 38vh; width: auto; margin: 0 auto; }
}

/* ==== Folder screen and the item card (Pink Files). One block, after the shared rules it refines. ==== */
/* header: the setup line is a typewriter caption with its arrow; 44px to tap */
.setup-part .ico.setup-go { display: block; flex: none; position: relative; top: -1px; }
.setup-line { min-height: 44px; margin: -9px 0 -11px; }
.top.is-wrapped .setup-line { margin-top: 1px; }
.people .avatar { margin-left: -5px; }
#folderCover { border-radius: 0; height: 96px; margin-bottom: 0; }
#folderCover::after { content: none; }
@media (max-height: 500px) { #folderCover { height: 64px; } } /* a phone on its side keeps the list in view */

/* tabs sit on the rule; chips are words, dates are typewriter */
.filters { gap: 0; margin-top: 0; }
.filters + .list { margin-top: 0; }
.fchip.who .avatar { display: none; } /* the name is enough */
.fchip.who { min-width: 44px; justify-content: center; }
.fchip.date { gap: 0; padding-top: 3px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; }
.fchip.date .ico { display: none; }
.fchip.date .sep-dot { margin: 0 .7em; }
.fchip.date[aria-pressed="true"] { font-weight: 700; }
.fchip.date[aria-pressed="true"]::before { margin: -2px 6px 0 0; }
.fchip.date .fchip-when { font-weight: inherit; }
/* Dates: an underlined word and the arrow, like every other way onward */
.fchip.dates-chip { gap: 6px; color: var(--ink); font-weight: 500; }
.fchip.dates-chip .ico { display: none; }
.fchip.dates-chip span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.fchip.dates-chip::after {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--ico-arrow) center / contain no-repeat; mask: var(--ico-arrow) center / contain no-repeat;
}

/* the list: cards on hairlines, a date's run under its own small heading */
.list { gap: 0; }
.group-head { align-items: baseline; gap: 10px; padding: 22px 0 8px; border-bottom: 1px solid var(--rule); }
.group-head:first-child { padding-top: 6px; }
.group-name { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.3; }
.group-when, .group-head.soon .group-when { margin-left: auto; color: var(--ink-2); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; }
.group-head .sprig { display: none; }

.item { padding: 14px 0; gap: 14px; align-items: stretch; border-bottom: 1px solid var(--rule); }
.list > .item:first-child { padding-top: 0; }
.item:has(.card-hit:active) { background: var(--band); box-shadow: 0 0 0 0 transparent; }
.item .thumb-box { width: 104px; }
.item .thumb { width: 104px; height: 130px; align-items: flex-start; }
.item .thumb-letter { margin-top: 30px; font-weight: 400; font-size: 40px; line-height: 1; }
.item .thumb.has-img .thumb-letter { margin-top: 0; align-self: center; }
/* a typewriter caption on a picture-less plate (the shop), unless a sticker sits there */
.thumb-cap { display: none; }
.item .thumb:not(.has-img) .thumb-cap {
  display: block; position: absolute; left: 12px; right: 12px; bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
}
.item .thumb-box:has(.sticker-on-thumb) .thumb-cap { display: none; }
.item.is-skeleton .thumb::after { content: none; }
.item .item-main { min-height: 130px; gap: 0; }
.item.is-skeleton .item-main { justify-content: flex-start; gap: 10px; padding-top: 4px; }
.item .item-title { font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.2; }
.item .top-pick { align-self: flex-start; }
/* price · SHOP · £5 OVER */
.item .item-meta { gap: 0; margin-top: 6px; font-size: 14px; line-height: 1.2; color: var(--ink-2); }
.item .item-meta .price { font-weight: 600; color: var(--ink); }
.item .item-meta .site { order: 2; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.item .item-meta .over-tag {
  order: 3; display: inline; height: auto; padding: 0; border-radius: 0; background: none;
  font: 700 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .08em; color: var(--over);
}
.item .item-meta .price + .site::before { content: none; }
.item .item-meta .price ~ .site::before, .item .item-meta .over-tag::before {
  content: "·"; margin: 0 .45em; font: 400 14px/1 var(--font-body); letter-spacing: 0; color: var(--ink-2);
}
.item .note { margin-top: 6px; font-weight: 400; opacity: 1; color: var(--ink-2); }
.item .name-it { margin-top: 4px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.item .name-it .ico { display: none; }
.item .item-foot { min-height: 20px; padding-top: 10px; gap: 8px; }
.item .by { gap: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.item .by .avatar { display: none; } /* the name says who */
.item .by .by-name { font-weight: 500; color: var(--ink); }
.item .by .by-age { margin-left: 0; }
.item.is-bought .thumb { filter: none; opacity: .6; }
.item.is-bought .item-title { text-decoration-color: var(--ink-2); }

/* the folio under the list: the folder and how many, in typewriter */
.folio {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--rule);
  font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
}
.folio span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folio span:last-child { flex: none; }
.list > .item:last-child { border-bottom: 0; } /* the folio's rule (or the page's end) closes the list */

/* the one-time welcome: a flat strip with an ink edge */
.welcome { margin-top: 0; padding: 12px 4px 12px 14px; border: 0; border-left: 2px solid var(--ink); border-radius: 0; background: var(--band); }
.welcome-art { display: none; }
.welcome-title { font-weight: 500; }
.welcome-body, .welcome-rule { color: var(--ink-2); }
.welcome-x { width: 44px; height: 44px; margin: -8px 0; }

@media (max-width: 379px) {
  .item { gap: 12px; }
  .item .thumb-box { width: 88px; }
  .item .thumb { width: 88px; height: 110px; }
  .item .thumb-letter { margin-top: 24px; font-size: 34px; }
  .item .item-main { min-height: 110px; }
  .item .thumb:not(.has-img) .thumb-cap { left: 10px; right: 10px; bottom: 8px; }
}
/* desktop: the same cards as a grid, picture on top */
@media (min-width: 900px) {
  .list { column-gap: 24px; row-gap: 0; }
  .group-head { padding-top: 28px; margin-bottom: 14px; }
  .item, .list > .item:first-child, .list > .item:last-child { padding: 14px 0 16px; gap: 12px; border-bottom: 1px solid var(--rule); }
  .item .thumb-box { width: 100%; }
  .item .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; align-items: center; }
  .item .thumb-letter { margin-top: 0; font-size: 56px; }
  .item .item-main { min-height: 0; }
  .item .item-foot { padding-top: 14px; }
  .fchip.dates-chip { margin-left: auto; }
}

/* ---- Pink Files: Mine, Settings, the Folder sheet, New folder (screen rules; tokens only) ---- */
/* Mine: the summary as figures beside the title */
.mine-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.mine-top .mine-sum { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 20px; margin: 0 0 -6px auto; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.mine-top .mine-sum[hidden] { display: none; }
.mine-top .mine-dot { display: none; }
.mine-fig { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline; column-gap: 6px; text-align: right; }
.mine-fig b, .mine-top .mine-sum b { font: 500 26px/1 var(--font-display); color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
.mine-fig b:first-child { grid-column: 1 / -1; }
.mine-fig-pre { font: italic 400 14px/1 var(--font-display); color: var(--ink-2); }
.mine-fig-lab { grid-column: 1 / -1; margin-top: 6px; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); white-space: nowrap; }
/* Mine cards: the date (or folder) is a typewriter line above the footer, never squeezed beside it */
.mine .item-foot { flex-wrap: wrap; row-gap: 4px; }
.mine .item-foot .folder-tag, .mine .item-foot .folder-tag.date-tag { order: -1; flex: 0 0 100%; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink-2); font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; transform: none; }
.mine .item-foot .folder-tag .ico { display: none; }
.mine-budgets { background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
.mine-budget { padding: 10px 0; }
.mine-budget + .mine-budget { border-top: 1px solid var(--rule); }
.mine-more { align-self: flex-start; }
/* Bought: a flat band to the page edges under a typewriter heading with its count */
#mineBought { margin: 8px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 8px; background: var(--band); }
.mine-sub-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 12px; border-bottom: 1px solid var(--rule); }
.mine-sub-row .mine-sub-h { margin: 0; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.mine-group.is-dim .item { opacity: 1; }

/* Settings: Back as a typewriter word over the title, the photo at the title's right */
.settings-head { display: block; padding-right: 84px; }
.settings-head .icon-back { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 44px; margin: -8px 0 0 -4px; padding: 0 10px 0 0; }
.settings-head .icon-back .ico { width: 16px; height: 16px; }
.icon-back-word { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.you-screen { position: relative; }
.you-screen .me-profile { display: block; margin-top: 10px; }
.you-screen .me-photo { position: absolute; right: 0; bottom: calc(100% + 12px); margin: 0; padding: 0; }
.you-screen .me-photo .avatar { width: 64px; height: 64px; font-size: 26px; }
/* desktop: the photo sits left of the name, not at the far right of the column (audit B15) */
@media (min-width: 900px) {
  .you-screen .me-profile { display: flex; align-items: flex-end; gap: 16px; }
  .you-screen .me-photo { position: relative; right: auto; bottom: auto; }
  .you-screen .me-name-box { flex: 1; min-width: 0; }
}
.fgroup-h[data-count]::after { content: attr(data-count); margin-left: auto; }
#fsNewHead::after { content: "Start like this"; margin-left: auto; }
/* Your folders: swatch + index label, the name in the display face, the role as a label */
#fsFolders .fgroup-box { counter-reset: fs; }
#fsFolders .srow { counter-increment: fs; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 16px; column-gap: 12px; row-gap: 4px; align-items: center; padding: 14px 0; text-align: left; }
#fsFolders .srow::before { content: "No." counter(fs, decimal-leading-zero); grid-column: 2; grid-row: 1; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--wine); }
#fsFolders .row-lead { grid-column: 1; grid-row: 1 / 3; }
#fsFolders .row-text { display: contents; }
#fsFolders .row-title { grid-column: 2; grid-row: 2; font: 500 20px/1.2 var(--font-display); }
/* the folder's swatch: a 36px square of its tint, or its cover photo (was 12px, read as an empty box) */
#fsFolders .row-lead .folder-cover.to-swatch { width: 36px; height: 36px; }
#fsFolders .row-sub { grid-column: 3; grid-row: 1 / 3; max-width: none; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
#fsFolders .row-end { grid-column: 4; grid-row: 1 / 3; }

/* Sheets with a reference line over the title (Folder, New folder) */
.sheet-ref { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }
.sheet-ref + .sheet-head { padding-top: 6px; }
.folder-sheet .sheet-title { font-size: 28px; }
.sheet-sub.note-line { max-width: none; font-size: 15px; }
/* People: the role is a label at the right; my own switch sits under my name */
.folder-sheet .person-row:not(#privateRow) .row-text { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.folder-sheet .person-row:not(#privateRow) .row-sub { flex: 0 1 auto; max-width: 18ch; text-align: right; font: 400 11px/1.4 var(--font-label); text-transform: uppercase; letter-spacing: .1em; }
.folder-sheet .fgroup-box > label[for="meAnon"] { border-top: 0; padding-top: 0; padding-left: 52px; }
/* Look: one numbered strip of the six tints; the picked one stands on an ink bar */
.folder-sheet .swatches { gap: 0; max-width: none; margin-bottom: 8px; border: 1px solid var(--ink); counter-reset: sw; }
.folder-sheet .swatch { counter-increment: sw; min-height: 44px; border-radius: 0; }
.folder-sheet .swatch + .swatch { border-left: 1px solid var(--ink); }
.folder-sheet .swatch .swatch-dot, .folder-sheet .swatch:has(input:checked) .swatch-dot { height: 44px; box-shadow: none; }
.folder-sheet .swatch::after { content: counter(sw, decimal-leading-zero); position: absolute; left: 6px; bottom: 5px; font: 400 11px/1 var(--font-label); letter-spacing: .1em; color: var(--ink); pointer-events: none; }
.folder-sheet .swatch:has(input:checked)::before { content: ""; position: absolute; left: -1px; right: -1px; bottom: -8px; height: 3px; background: var(--ink); }

/* New folder: a small numbered plate beside the name, the note in the display italic */
.new-name-row { display: flex; align-items: flex-end; gap: 14px; }
.new-name-row .field-wrap { flex: 1; }
.new-plate { flex: none; display: flex; width: 68px; height: 84px; padding: 6px; background: var(--band); }
.new-plate-in { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; border: 1px solid var(--rule); }
.new-help.note-line, .new-folder-form .new-help.note-line { max-width: none; margin-top: 0; text-align: left; font-size: 15px; }
.folder-sheet .folder-cover.cover-thumb { border-radius: 0; }

/* ==== Pink Files: the item sheet and the Add a link sheet (kept together; overrides the older rules above) ==== */
/* the reference line over a sheet's title (app.js sheetRef); a sheet showing ‹ Back has none */
.sheet-ref { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; margin: 0 0 4px; }
.sheet-ref .top-pick { margin: 0; }
.sheet-ref .top-pick::before { content: "·"; font-weight: 400; margin-right: 3px; }
.sheet.has-back .sheet-ref { display: none; }
/* a reference line above the sticky head (Folder, New folder) keeps clear of the grab handle */
.sheet > .sheet-ref { margin-top: 20px; }

/* -- item sheet -- */
.sheet[data-kind="item"] .sheet-title { font-weight: 500; font-size: 22px; line-height: 1.18; }
.sheet[data-kind="item"] .sheet-head { margin-bottom: 20px; }
.sheet[data-kind="item"] .item-detail { gap: 10px; }
.detail-pic .thumb.big { width: 100%; height: auto; margin: 0; aspect-ratio: 4 / 3; max-height: 35vh; border-radius: 0; }
/* no picture: a wide plate, the letter up-left and a typewriter caption low-left */
.detail-pic .thumb.big:not(.has-img) { aspect-ratio: 16 / 9; height: auto; }
.detail-pic .thumb.big:not(.has-img) .thumb-letter { position: absolute; left: 22%; top: 16%; font-size: 64px; line-height: 1; }
.pic-cap { position: absolute; left: 12px; bottom: 10px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.detail-pic .thumb.has-img ~ .pic-cap { display: none; }
/* the caption line under the picture: price · SHOP at the left, who and when at the right */
.sheet[data-kind="item"] .detail-info { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding-top: 0; }
.sheet[data-kind="item"] .detail-info > * { flex: 1 1 100%; order: 3; }
.sheet[data-kind="item"] .detail-info > .detail-meta { flex: 0 1 auto; order: 1; font-size: 16px; flex-wrap: wrap; white-space: normal; }
.detail-meta .price { font-weight: 600; font-size: 16px; }
.detail-meta .site { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.detail-meta .over-tag + .site::before { content: "·"; margin-right: 6px; }
.sheet[data-kind="item"] .detail-info > .detail-by {
  flex: 0 1 auto; order: 2; display: block; font: 400 11px/1.5 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); overflow-wrap: anywhere;
}
.detail-by .avatar { display: none; }
.detail-by strong { font-weight: 700; color: var(--ink); }
.detail-folder { margin-left: 0; }
.detail-note { font-weight: 400; font-size: 17px; line-height: 1.4; color: var(--ink); margin-top: 6px; }
.detail-cur { font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.detail-date { padding-top: 0; margin: -6px 0 -10px; }
/* the status block: no box. A line saying where it stands, the one button, quiet links, italic notes */
.status-block { gap: 10px; margin-top: 4px; padding: 0; border: 0; border-radius: 0; background: none; }
.status-block > * { order: 2; }
.status-block > .status-line { order: 0; }
.status-block > .status-btns, .status-block > .inline-confirm { order: 1; }
.status-btns { flex-wrap: wrap; gap: 0 24px; align-items: center; }
.status-btns > .btn-primary, .status-btns > .btn-secondary { flex: 1 1 100%; min-width: 0; padding: 0 18px; white-space: normal; }
.status-btns > .btn-secondary + .btn-secondary { margin-top: 10px; }
.status-line { gap: 8px; font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); }
.status-line .ico { display: none; }
.status-line::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--wine); }
.status-line + .status-note { margin-top: -4px; }
.status-note { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 14px; line-height: 1.45; color: var(--ink-2); max-width: 32ch; text-wrap: balance; }
.status-note em { font-weight: 500; color: var(--ink); }
/* the wisher's star: the outlined button, star at the left of its words, a typewriter note at the right */
.status-btn.star { justify-content: flex-start; gap: 10px; }
.status-btn.star .ico { width: 16px; height: 16px; color: var(--wine); }
.status-btn.star[aria-pressed="true"] { background: var(--accent-soft); }
.status-btn.star:not([aria-pressed="true"])::after { content: "Sorts first"; margin-left: auto; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); white-space: nowrap; }
.status-btn.star[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.status-btn.star[aria-pressed="true"] .ico { fill: var(--wine); }
/* Open in shop: the outlined button under a gift's action; on my own wish, the first of the rows */
.sheet[data-kind="item"] .btn-wide .ico { width: 16px; height: 16px; }
.sheet[data-kind="item"] .btn-wide + .row-list { margin-top: -16px; }
.btn.as-row { min-height: 56px; padding: 0; border: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; font-weight: 500; }
.btn.as-row:active { background: var(--band); }
.sheet[data-kind="item"] .btn.as-row + .row-list { margin-top: -20px; }
.sheet[data-kind="item"] .row-list .row-btn:last-child { border-bottom: 0; }
.row-btn > .row-end { margin-left: auto; }
.row-btn[data-host]::after {
  content: attr(data-host); margin-left: auto; min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
}
.sheet[data-kind="item"] .row-btn.danger > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sheet-body.is-edit, .sheet-body.is-edit > .stack { gap: 20px; }

/* -- Add a link sheet -- */
.add-form { gap: 20px; }
.add-sub { font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: -6px; }
.add-sub-line .ico { display: none; }
.add-sub em { font-weight: 500; color: var(--ink); }
.add-to-line { font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: -8px; }
/* To: a hairline row (label, the folder's swatch and name, a chevron at the end) */
.add-to { gap: 0; margin-top: -12px; }
.to-chip {
  align-self: stretch; display: flex; gap: 8px; min-height: 48px; padding: 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  background: none; color: var(--ink); font-weight: 500; font-size: 15px; text-align: left;
}
.to-chip:active { background: var(--band); }
.to-pre { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-right: 4px; }
.to-chev { margin-left: auto; color: var(--ink); }
.to-list { gap: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.to-row { min-height: 48px; padding: 0; border-radius: 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.to-row:has(input:checked) { background: none; color: var(--ink); font-weight: 600; }
.to-row:active { background: var(--band); }
.to-row input { accent-color: var(--ink); }
/* Paste: an underlined typewriter word at the end of the Link field, on the same ink rule */
.add-form .field-row { gap: 0; }
.paste-btn { min-height: 46px; min-width: 44px; padding: 0 0 0 12px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.paste-btn > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.paste-btn .ico { display: none; }
.paste-btn:active { background: none; }
.paste-btn:active > span { text-decoration-thickness: 2px; }
/* the live preview: a small plate, a typewriter caption, the name in Fraunces, price · SHOP; closed by a hairline */
.add-preview { align-items: stretch; gap: 14px; margin: -6px 0 0; padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: none; }
.add-preview .thumb { width: 80px; height: 100px; aspect-ratio: auto; }
.add-preview .thumb-letter { font-size: 28px; }
.add-preview-main { gap: 4px; justify-content: flex-end; }
.add-preview-state { margin-bottom: auto; }
.add-preview-title { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.add-preview .item-meta { flex-wrap: wrap; white-space: normal; }
.add-preview .item-meta .price { font-weight: 600; font-size: 15px; }
.add-preview .item-meta .site { font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
/* + Details: a section label you can open ("+ DETAILS ... OPTIONAL"); once open, the same label heads the fields */
.add-toggle {
  align-self: stretch; display: flex; gap: 8px; min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: none;
  font: 400 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); text-align: left;
}
.add-toggle::after { content: "Optional"; position: static; inset: auto; margin-left: auto; flex: none; color: var(--ink-2); }
.add-toggle .ico { flex: none; width: 14px; height: 14px; color: var(--ink); }
.add-toggle:active { transform: none; background: var(--band); }
.add-details-hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--ink-2); }
.add-preview:not([hidden]) + .add-toggle, .add-preview:not([hidden]) ~ .add-details { margin-top: -20px; }
.add-details { gap: 20px; margin-top: 0; }
.add-details-head { margin: 0; padding: 15px 0 13px; }
/* Date and It's for: a label and its choices on one hairline row */
.pick-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; column-gap: 8px; min-height: 52px; margin-top: -20px; border-bottom: 1px solid var(--rule); }
/* the choices stay on one line and scroll sideways, out to the sheet's edge (like the folder's chip row) */
.pick-row > .date-pick { flex-wrap: nowrap; gap: 0 20px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 0 -4px; padding: 4px var(--gutter) 4px 4px; }
.pick-row > .date-pick::-webkit-scrollbar { display: none; }
.for-pick .fchip { font-size: 15px; }
.for-pick .fchip .avatar { display: none; }
.pick-row > .field-hint { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pick-row > .field-hint:not(:empty) { margin: -4px 0 12px; }
.pick-row > .field-hint .ico { display: none; }

/* ==== Pink Files: review round 2 (small fixes; each rule is scoped to its own piece) ==== */
/* the quiet select's chevron: the rows' 1.5px line chevron, in --ink-2 (light / dark) */
:root { --select-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23665558' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --select-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23BFB0AB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); } }
:root[data-theme="dark"] { --select-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23BFB0AB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); }
/* phones: wide empty paper between the logo bar and the screen title */
@media (max-width: 899px) { .top { padding-top: 12px; } .screen-head.mine-top { padding-top: 8px; } .coming-title { margin-top: 12px; } }
/* tab counts: two typewriter digits ("06"); the real number stays the text */
.tab .count { letter-spacing: .14em; margin-left: 5px; }
.tab .count.is-1::before { content: "0"; }
/* person chips: an even 20px rhythm from the left edge; the tap area stays 44px wide, unseen */
.fchip.who { min-width: 0; justify-content: flex-start; }
.fchip.who::after, .for-pick .fchip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: max(100% + 20px, 44px); transform: translateX(-50%); }
/* the chip row keeps room for a focus outline above and below (it scrolls sideways, so it clips) */
.chips { padding-top: 4px; padding-bottom: 4px; margin-top: -4px; margin-bottom: -4px; }
.date-pick .fchip:focus-visible { outline-offset: 1px; }
/* the setup line's separator: a typewriter middle dot, not a filled bullet (the box keeps its size) */
.setup-dot { position: relative; background: none; overflow: visible; }
.setup-dot::before { content: "·"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 400 11px/1 var(--font-label); letter-spacing: 0; color: var(--ink-2); }
/* one face in the pill is still a 44px target; the face stays flush right */
.people-btn { min-width: 44px; justify-content: flex-end; }
/* bought: the tape says it; no strike-through, the picture calmed */
.item.is-bought .item-title { text-decoration: none; }
/* Mine: the date (or folder) line sits right under the price; who and when stay at the bottom */
.mine .item-foot:has(> .folder-tag) { flex: 1; margin-top: 4px; padding-top: 0; align-content: space-between; }
/* tape on a card: at most two lines, whatever the name */
.sticker-on-thumb > span:not(.visually-hidden) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; text-overflow: clip; }
.item .thumb-box { align-self: flex-start; }
/* a preview still loading: the plate pulses, its caption waits */
.thumb.is-loading .thumb-cap { visibility: hidden; }
.mosaic > .thumb, .mosaic > .thumb img { border-radius: 0; }
/* Coming up: countdown · folder on at most two lines (a long folder name is cut on its own line) */
.coming-when::after { content: " · "; white-space: pre; }
.coming-folder::before { content: none; }
.coming-folder { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 379px) {
  /* "YOU'RE ON IT" on one strip over an 88px picture */
  .item .sticker-on-thumb { letter-spacing: .02em; padding: 4px 6px; }
  /* price · SHOP · £5 OVER may wrap; each part leads with its dot and the row hides the first 14px, so no line starts with one */
  .item .item-meta { flex-wrap: wrap; row-gap: 2px; margin-left: -14px; clip-path: inset(0 0 0 14px); }
  .item .item-meta .site { min-width: 6ch; max-width: 100%; }
  .item .item-meta > .price::before, .item .item-meta .price ~ .site::before, .item .item-meta .over-tag::before {
    content: "·"; display: inline-block; width: 14px; margin: 0; text-align: center; font: 400 14px/1 var(--font-body); letter-spacing: 0; color: var(--ink-2);
  }
}
/* desktop */
@media (min-width: 900px) {
  /* Settings: rows stay narrow enough to match a switch to its label; the title row and photo keep the column */
  .you-screen > * { max-width: 640px; }
  .you-screen > .screen-head, .you-screen > .screen-title { max-width: none; }
}
/* -- the Folder sheet -- */
/* the sub-line belongs to the title: the head's rule comes after it (back under the head once the sheet scrolls) */
.sheet[data-kind="folder"] .sheet-head { border-bottom-color: transparent; padding-bottom: 0; }
.sheet[data-kind="folder"].is-scrolled .sheet-head { border-bottom-color: var(--rule); }
.sheet[data-kind="folder"] #folderSub { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.sheet[data-kind="folder"] #folderSub:has(+ .first-visit) { padding-bottom: 0; border-bottom: 0; }
/* the one-time note: a second sentence of the italic sub-line, no doodle */
.first-visit { display: block; margin: -12px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--rule); font: italic 400 15px/1.35 var(--font-display); color: var(--ink-2); }
.first-visit > svg { display: none; }
/* People: the count at the right as two digits; air between the rule and the button; small faces */
.fgroup-h .fgroup-n { margin-left: auto; font-size: 0; letter-spacing: 0; }
.fgroup-h .fgroup-n::after { content: attr(data-n); font: 400 11px/1.3 var(--font-label); letter-spacing: .1em; color: var(--ink-2); }
.folder-sheet #sendInvite { margin-top: 12px; margin-bottom: 4px; }
.folder-sheet .person-row { min-height: 48px; padding: 10px 0; }
.folder-sheet .person-row .avatar.md { width: 28px; height: 28px; font-size: 13px; }
.folder-sheet .fgroup-box > label[for="meAnon"] { padding-left: 40px; }
/* a row that unfolds: the arrow turns down */
.row-end.row-arrow.is-up { transform: rotate(90deg); }
.row-end.row-plus.is-up { transform: rotate(45deg); } /* More settings: the plus turns to a cross */
/* New folder: the bow on the numbered plate; Join instead keeps a 44px target */
.new-plate-in { flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 0 8px; }
.new-plate-in .bow { display: block; width: 26px; height: auto; color: var(--ink); overflow: visible; }
.new-lead .btn-link { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
/* -- the item sheet -- */
/* no picture: the letter centred on the plate, clear of the caption low-left */
.detail-pic .thumb.big:not(.has-img) .thumb-letter { inset: 0; left: 0; top: 0; display: grid; place-items: center; padding-bottom: 18px; font-size: 72px; font-weight: 400; line-height: 1; }
/* price · SHOP at the left, ADDED BY at the right; over the budget on its own typewriter line */
.sheet[data-kind="item"] .detail-info > .detail-meta { display: grid; grid-template-columns: auto minmax(0, auto); justify-content: start; align-items: baseline; column-gap: 6px; row-gap: 2px; min-width: 0; }
.sheet[data-kind="item"] .detail-meta .site { order: 2; white-space: nowrap; }
.sheet[data-kind="item"] .detail-meta .site::before { content: none; }
.sheet[data-kind="item"] .detail-meta .price:has(~ .site)::after { content: "·"; margin-left: 6px; font-weight: 400; color: var(--ink-2); } /* the dot ends the price, so a wrapped shop line starts clean */
.sheet[data-kind="item"] .detail-meta .over-tag { order: 3; grid-column: 1 / -1; display: block; height: auto; padding: 0; border-radius: 0; background: none; font: 700 11px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .08em; color: var(--over-fg); white-space: normal; }
.sheet[data-kind="item"] .detail-info > .detail-by { margin-left: auto; }
/* Open in shop: the same 16px arrow box as the rows under it */
#openShop > .ico, .sheet[data-kind="item"] .row-btn > .row-end { flex: none; width: 16px; height: 16px; }
/* Add a link: FOUND IT sits right over the name, the text block centred beside the plate */
.add-preview-main { justify-content: center; }
.add-preview-state { margin-bottom: 0; }

/* Shop pictures always fill their frame, cropped from the centre (no white bars in any look). */
.thumb.has-img img { object-fit: cover; }

/* Settings › Appearance › Theme: one card per look, drawn with that look's own colours (hard-coded here,
   since only the chosen look's stylesheet is loaded). */
.look-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 12px 0 16px; }
.look-opt { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 44px; cursor: pointer; font-size: 12px; line-height: 1.25; color: var(--ink-2); }
.look-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.look-swatch { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.look-swatch-ink { position: absolute; left: 14%; right: 14%; top: 18%; height: 12%; background: var(--card-ink); }
.look-swatch-accent { position: absolute; left: 14%; right: 38%; top: 40%; bottom: 18%; background: var(--card-acc); }
.look-opt:has(input:checked) { color: var(--ink); font-weight: 600; }
.look-opt:has(input:checked) .look-swatch { box-shadow: inset 0 0 0 2px var(--ink); }
.look-opt:has(input:focus-visible) .look-swatch { outline: 2px solid var(--ink); outline-offset: 2px; }
[data-look-card="pink"] { --card-bg: #ECECEA; --card-ink: #141213; --card-acc: #F6D6E1; }
[data-look-card="mirror"] { --card-bg: #FCFCFC; --card-ink: #101010; --card-acc: #C3C5C7; }
[data-look-card="table"] { --card-bg: #5B0F1B; --card-ink: #F1EADC; --card-acc: #F3B6C6; }
[data-look-card="dotty"] { --card-bg: #F6F6F2; --card-ink: #141414; --card-acc: #E9A8BA; }
[data-look-card="edit"] { --card-bg: #F3EEE4; --card-ink: #17110E; --card-acc: #8A2B3F; }
@media (max-width: 379px) { .look-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The shop's name in a picture's lower-left corner (the design's photo caption), on a small paper
   tab so it reads on any photo. Not on covers, and not where a sticker or the tile's date sits. */
.thumb-shop { display: none; }
.thumb.has-img .thumb-shop {
  display: block; position: absolute; left: 6px; bottom: 6px; z-index: 2; max-width: calc(100% - 12px);
  padding: 2px 4px; background: var(--sheet, var(--surface)); color: var(--ink-2, var(--muted));
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none;
  font: 500 11px/1.1 var(--font-body); letter-spacing: .03em; text-transform: none; font-style: normal;
}
.thumb.big.has-img .thumb-shop { left: 10px; bottom: 10px; font-size: 12px; }
.thumb.is-loading .thumb-shop, .thumb-box:has(.sticker-on-thumb) .thumb-shop,
.mosaic.is-cover .thumb-shop, .folder-cover .thumb-shop, .cover-opt .thumb-shop,
.mosaic:has(.folder-when) > .thumb .thumb-shop,
.detail-pic:has(.sticker-on-thumb) .thumb-shop { display: none; } /* the sheet's sticker sits in that corner */

/* Add › Details: a small label over the fields, never a big heading on the preview (audit 2026-12-02, E4).
   The Edit's own label already is one. */
:root:not([data-look="edit"]) .sheet .section-label.add-details-head {
  margin: 6px 0 0; padding: 15px 0 13px; font: 600 12px/1.3 var(--font-label, var(--font-body)); text-transform: uppercase; letter-spacing: .06em !important;
}
/* an age ("1m", "2d") keeps its small letters inside a line a look sets in capitals (audit C17) */
.age { text-transform: none; }
.quiet-focus:focus, .quiet-focus:focus-visible { outline: none; box-shadow: none; }
