/* Studio admin (/admin). One page, one script (admin.js); the address after # says which screen is open. */
/* The design system (2026-11-23, Fabrizio: "it doesnt feel like a platform that has been very well thought of for design
   … I want the design to feel expensive and intuitive"). Quiet surfaces, one border colour, one radius per kind of
   thing, white fields with a thin border. Then, the same day: "now it feels like its lost a bit of my branding since it
   no longer has my colors". So his brand carries it: his logo in the bar, the page in his mist, his yellow for what is
   chosen, active, a draft, and the ring around a field being typed in; ink for what to do; his wide letters for the
   titles. A new screen uses these tokens and the components below; it does not bring colours or radii of its own. */
:root {
  --yellow: #f7ca4d; --yellow-deep: #e5b52f; --ink: #242524; --ink-2: #3b3c3a; --graphite: #5d5e5c; --muted: #6a6b67; --mist: #f0f0ee;
  --bg: #f0f0ee;          /* the page: his mist */
  --surface: #fff;        /* cards, fields */
  --sunken: #f7f7f5;      /* a quiet area inside a card: a list row, a figure */
  --hover: #f0f0ed;
  --line: #e5e5e0;        /* card edges and dividers */
  --line-2: #858682;      /* field edges and tick boxes: 3:1 on white and on the page, so a field is seen as one (WCAG 1.4.11) */
  --line-3: #5d5e5c;      /* a field under the pointer */
  --line-soft: #d6d6d0;   /* the edge of a white button, a chip */
  --line-hover: #b9b9b3;  /* a card or a button under the pointer */
  --rule: #d9d9d6;
  --ok: #1f7a4a; --ok-bg: #e6f4ec; --warn: #b4441b; --warn-bg: #fcf1ec; --warn-line: #f1d3c6; --info: #1c4f9c; --info-bg: #e9f0fb;
  --yellow-tint: #fdf4d6; /* a chosen card, a quiet yellow area */
  --ring: 0 0 0 1px var(--ink), 0 0 0 4px rgba(247, 202, 77, .6);  /* an ink edge (seen on white) and his yellow around it */
  --shadow-1: none;       /* cards and fields lie flat on the page: an edge, no shadow */
  --shadow-2: 0 10px 30px -12px rgba(20, 20, 18, .22), 0 2px 6px -2px rgba(20, 20, 18, .06);
  --r-field: 8px; --r-btn: 8px; --r-card: 12px; --r-sm: 6px; --r-dialog: 16px;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 120px; scroll-padding-bottom: 110px; }
body { margin: 0; font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hidden, [hidden] { display: none !important; }
/* The page's title keeps the brand's wide letters; everything under it is set at the normal width, so a screen reads
   calmly and only its name stands out */
h1, h2 { margin: 0; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; font-stretch: 118%; letter-spacing: -0.025em; line-height: 1.1; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 750; font-stretch: 112%; }
h3 { margin: 10px 0 0; font-size: 15px; font-weight: 700; letter-spacing: -0.005em; }
h3 .meta { font-weight: 500; margin-left: 6px; }
p { margin: 0; }
/* money and counts line up */
.amt, .totals, .stat strong, .item input[type=number], .facts dd { font-variant-numeric: tabular-nums; }

/* Buttons: ink is the thing to do, a white one with a thin edge is the other choices, yellow is what reaches a client */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--field-h); padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 15px; font-weight: 650; letter-spacing: -0.005em; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-1); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(.5px); }
.btn.line { background: var(--surface); color: var(--ink); border-color: var(--line-soft); }
.btn.line:hover { background: var(--sunken); border-color: var(--line-hover); color: var(--ink); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow-deep); color: var(--ink); }
.btn.yellow:hover { background: #f4c138; border-color: #d9a823; }
.btn.sm { min-height: var(--field-sm); padding: 0 12px; font-size: 14px; }
.btn.danger { background: var(--surface); color: var(--warn); border-color: var(--warn-line); }
.btn.danger:hover { background: var(--warn-bg); border-color: #e6b8a5; color: var(--warn); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.text-btn { background: none; border: 0; padding: 4px 0; font-weight: 650; text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.text-btn:hover { text-decoration-color: currentColor; }
.text-btn.danger { color: var(--warn); text-decoration-color: var(--warn-line); }

/* Sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--yellow); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 32px; display: grid; gap: 16px; box-shadow: 0 30px 60px -30px rgba(36, 37, 36, .45); }
.login-card form { display: grid; gap: 14px; margin-top: 12px; }
.login-card summary { cursor: pointer; font-weight: 600; color: var(--graphite); }
.login h1 { font-size: 34px; }
.login p { color: var(--graphite); }
/* A field's name, with its hint on the same line ("Note optional", "Tax % 0 for none") and the field under them. The
   hint used to take a line of its own, so the fields of one row stood at different heights (2026-11-16: "amount, how,
   and date, they are not even correctly aligned"). */
label, .fld { font-weight: 600; font-size: 14px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 7px; min-width: 0; color: var(--ink); }
:is(label, .fld) > :is(input, select, textarea, .pickf, .unitf, .pair, .ferr, div, ul) { flex: 1 1 100%; min-width: 0; }
label small, .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
/* Every one-line field is the same height, whatever the browser: Safari draws a select and a date field at heights of
   their own unless told, and a row of fields then does not line up. White, with a thin edge that darkens under the
   pointer and a soft ring when typed in. */
/* 42 px with a mouse, 48 with a finger; text 15 px, and 16 on a touch screen (an iPhone zooms into anything smaller) */
:root { --field-h: 42px; --field-sm: 36px; --field-text: 15px; }
@media (pointer: coarse) { :root { --field-h: 48px; --field-sm: 44px; --field-text: 16px; } }
input[type=password], input[type=search], input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=time], input[type=number], textarea, select { width: 100%; border: 1px solid var(--line-2); background-color: var(--surface); border-radius: var(--r-field); padding: 10px 14px; box-shadow: inset 0 1px 1px rgba(20, 20, 18, .03); transition: border-color .15s, box-shadow .15s, background-color .15s; }
input[type=password], input[type=search], input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=time], input[type=number], select { height: var(--field-h); padding-top: 0; padding-bottom: 0; }
:is(input, textarea, select):hover { border-color: var(--line-3); }
::placeholder { color: #747571; opacity: 1; }
select { -webkit-appearance: none; appearance: none; padding-right: 40px; text-overflow: ellipsis; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 6 6.25 10.5 1.75' fill='none' stroke='%235d5e5c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 11px 7px; }
select:disabled, input:disabled, textarea:disabled, input[readonly] { cursor: default; background-color: var(--sunken); color: var(--graphite); }
/* Safari (iPhone, iPad, Mac): a date or time field is otherwise centred, of its own height, and can collapse when empty */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type=date]::-webkit-datetime-edit, input[type=time]::-webkit-datetime-edit { padding: 0; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input[type=date], input[type=time] { padding-top: calc((var(--field-h) - 24px) / 2); padding-bottom: calc((var(--field-h) - 24px) / 2); line-height: 22px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); background-color: var(--surface); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 48px; line-height: 1.45; }
label input, label select, label textarea { font-weight: 400; }
input, select, textarea { font-size: var(--field-text); }
.err { color: var(--warn); font-weight: 600; min-height: 1.4em; }
/* Tick boxes and round choices: drawn, the same in every browser */
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--line-2); background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; transition: background-color .12s, border-color .12s, box-shadow .12s; }
input[type=checkbox] { border-radius: 5px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]::after { content: ''; width: 9px; height: 5px; margin-top: -2px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .12s; }
input[type=radio]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .12s; }
:is(input[type=checkbox], input[type=radio]):checked { background: var(--yellow); border-color: var(--ink); }
input[type=checkbox]:checked::after { transform: rotate(-45deg) scale(1); }
input[type=radio]:checked::after { transform: scale(1); }
:is(input[type=checkbox], input[type=radio]):hover { border-color: var(--graphite); }
:is(input[type=checkbox], input[type=radio]):focus-visible { outline: none; box-shadow: var(--ring); }
:is(input[type=checkbox], input[type=radio]):disabled { opacity: .45; cursor: default; }
@media (pointer: coarse) { input[type=checkbox], input[type=radio] { width: 20px; height: 20px; } }

/* Top bar: always there, so every screen is one click from every other */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px var(--gutter) 0; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.top-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-stretch: 115%; font-size: 18px; text-decoration: none; }
.top-brand img { display: block; height: 34px; width: auto; }
.top-brand span { font-size: 11px; font-weight: 750; font-stretch: 100%; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); border: 1px solid rgba(247, 202, 77, .45); border-radius: 999px; padding: 2px 8px; }
/* Search everything */
.find { position: relative; flex: 1 1 220px; max-width: 460px; margin: 0 auto; }
.find input[type=search] { background: rgba(255, 255, 255, .1); color: #fff; height: var(--field-sm); padding: 0 16px; border-radius: var(--r-field); border-color: rgba(255, 255, 255, .14); box-shadow: none; }
.find input[type=search]:hover { border-color: rgba(255, 255, 255, .28); }
.find input::placeholder { color: rgba(255, 255, 255, .65); }
.find input:focus { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 0 0 3px rgba(247, 202, 77, .55); }
.find-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; color: var(--ink); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-2); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; }
.find-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.find-list a:hover, .find-list a:first-child { background: var(--hover); }
.find-list .kind { flex: none; width: 70px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); }
.find-list strong { display: block; overflow-wrap: anywhere; }
.find-list small { display: block; color: var(--graphite); font-size: 13px; overflow-wrap: anywhere; }
.find-list .amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.find-list p { padding: 12px; color: var(--graphite); }
.top-end { display: flex; gap: 8px; margin-left: auto; }
.top .btn.line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.top .btn.line:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); color: #fff; }
.nav { order: 3; flex-basis: 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 0; }
.nav::-webkit-scrollbar { display: none; }
/* where the menu is wider than the screen (a tablet held upright, a phone) its right edge fades: there is more to the side */
@media (max-width: 960px) { .nav { padding-right: 36px; -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 36px), transparent); } }
/* a finger needs more room than a mouse */
@media (pointer: coarse) { .text-btn { padding: 10px 0; } .top .btn.sm { min-height: 40px; } }
.nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; font-size: 14.5px; border-radius: 10px 10px 0 0; font-weight: 600; text-decoration: none; color: rgba(255, 255, 255, .72); transition: color .15s; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--yellow); }
.badge { background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 12px; line-height: 20px; min-width: 20px; text-align: center; font-weight: 750; }

main { max-width: 1240px; margin: 0 auto; padding: 22px var(--gutter) 96px; min-height: 70vh; }
/* Every screen is a column of blocks (the heading, notes, panels, folded panels, rows of buttons) with one gap between
   them. Each block used to bring its own margin, or none: some stood 28 px apart, some 16, some touched (2026-11-16:
   "sometimes there are gaps between the messages and sometimes there are not"). */
#view, .stack, .pf-lock { display: flex; flex-direction: column; gap: 16px; }
:is(#view, .stack, .pf-lock) > * { margin-top: 0; margin-bottom: 0; }
:is(#view, .stack, .pf-lock) > :is(.btn, .back, a.text-btn, button.text-btn) { align-self: flex-start; }
#view > .page-head { margin-bottom: 4px; }
:is(#view, .stack, .pf-lock) > .sec-head { margin-top: 12px; margin-bottom: -6px; }
:is(#view, .stack, .pf-lock) > .sec-head:first-child { margin-top: 0; }
#view > .wait { padding: 60px 0; }
.wait { padding: 60px 0; text-align: center; color: var(--graphite); }

/* Head of every screen: Back, title, the main things to do */
.page-head { display: grid; gap: 10px; margin-bottom: 20px; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-left: -10px; padding: 0 12px 0 10px; border-radius: var(--r-sm); background: transparent; color: var(--graphite); font-size: 14.5px; font-weight: 600; text-decoration: none; border: 0; transition: background-color .15s, color .15s; }
.back:hover { background: rgba(36, 37, 36, .06); color: var(--ink); }
.page-title { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
@media (min-width: 1100px) { .page-title .row { margin-left: auto; } }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row select { width: auto; height: var(--field-sm); padding-left: 12px; padding-right: 36px; background-position: right 13px center; }
.meta { color: var(--graphite); font-size: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }

.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.bar input[type=search] { max-width: 320px; margin-left: auto; height: var(--field-sm); padding-left: 38px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.75' fill='none' stroke='%237c7d79' stroke-width='1.5'/%3E%3Cpath d='m10.6 10.6 3.4 3.4' stroke='%237c7d79' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 13px center / 15px 15px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-soft); background: var(--surface); border-radius: 999px; min-height: 34px; padding: 0 13px; font-weight: 600; cursor: pointer; font-size: 13.5px; color: var(--graphite); transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--line-hover); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip small { opacity: .7; font-size: 12px; margin-left: 3px; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .chip { min-height: 40px; } }

.list { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; display: grid; gap: 10px; box-shadow: var(--shadow-1), inset 3px 0 0 transparent; min-width: 0; }
.card.s-new, .card.s-pending { box-shadow: var(--shadow-1), inset 3px 0 0 var(--yellow); }
.card.s-booked, .card.s-approved { box-shadow: var(--shadow-1), inset 3px 0 0 var(--ok); }
.card.s-off { opacity: .75; }
.card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.card-head strong { font-size: 17px; font-weight: 700; }
.msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.stars { color: #a87400; letter-spacing: 2px; }
.empty { background: var(--surface); border: 1px dashed var(--line-soft); border-radius: var(--r-card); padding: 40px 20px; text-align: center; color: var(--graphite); display: grid; gap: 14px; justify-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 8px; z-index: 50; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-2); opacity: 0; transition: opacity .2s, translate .2s; pointer-events: none; max-width: calc(100vw - 24px); text-align: center; }
.toast.show { opacity: 1; translate: -50% 0; }
@media (min-width: 641px) and (min-height: 561px) { body:has(.actbar) .toast { bottom: 96px; } }

/* Rows that open something: clients, contracts, invoices */
.rows { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); overflow: hidden; }
.rowlink { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 16px; align-items: center; padding: 14px 20px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background-color .12s; }
.rowlink:last-child { border-bottom: 0; }
.rowlink:hover { background: var(--sunken); }
.rowlink strong { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.rowlink .meta { grid-column: 1; overflow-wrap: anywhere; }
.rowlink .end { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 12px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.rowlink .end::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 2px 0 2px; border-right: 1.6px solid var(--muted); border-top: 1.6px solid var(--muted); transform: rotate(45deg); }
.rowlink.with-img { grid-template-columns: 84px minmax(0, 1fr) auto; }
.rowlink.with-img img, .rowlink.with-img .noimg { grid-row: 1 / span 2; width: 84px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--mist); display: block; }
.rowlink.with-img strong, .rowlink.with-img .meta { grid-column: 2; }
.rowlink.with-img .end { grid-column: 3; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; line-height: 18px; font-weight: 650; letter-spacing: .005em; background: #ececE8; color: var(--graphite); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill.live, .pill.signed, .pill.paid { background: var(--ok-bg); color: var(--ok); }
.pill.draft { background: var(--yellow); color: var(--ink); }
.pill.draft::before { background: var(--ink); opacity: .8; }
.pill.sent { background: var(--info-bg); color: var(--info); }
.pill.overdue { background: var(--warn-bg); color: var(--warn); }
/* opened or not: a mark of its own, read at a glance */
.seen { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 1px 8px 1px 7px; border-radius: 999px; border: 1px solid var(--line-soft); font-size: 12px; font-weight: 650; color: var(--graphite); white-space: nowrap; vertical-align: 1px; }
.seen::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b5b5b0; }
.seen.yes { border-color: transparent; background: #dff3e6; color: var(--ok); }
:is(.meta, small) > .seen { margin: 0 3px; }
:is(.meta, small) > .seen:first-child { margin-left: 0; }
.seen.yes::before { background: var(--ok); }
/* where a contract or invoice that is out stands: sent, opened, reminders */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; margin: 0; }
.facts > div { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.facts dt { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.facts dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
/* opened or not, as a coloured dot before the date: a date in a pill broke inside it on a tablet */
.facts dd.yes, .facts dd.no { display: flex; align-items: baseline; gap: 7px; }
.facts dd.yes { color: var(--ok); }
.facts dd.no { color: var(--graphite); }
.facts dd.yes::before, .facts dd.no::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); transform: translateY(-1px); }
.facts dd.no::before { background: #b5b5b0; }
/* A line with a button of its own (Remind, Done): one card, the button inside it, at the right on a wide screen and
   under the words on a phone (it used to squeeze the words to a word a line, and stick out of the screen) */
.todo li.has-act, .todo li.job { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding-right: 10px; transition: background-color .12s, border-color .12s; }
.todo li.has-act:hover, .todo li.job:hover { background: var(--surface); border-color: var(--line-hover); }
.todo li.has-act > a, .todo li.job > a:first-child { flex: 1 1 280px; min-width: 0; background: transparent; }
.todo li.has-act > .btn, .todo li.job > .btn { flex: none; margin-left: auto; }
@media (max-width: 640px) {
  .todo li.has-act, .todo li.job { padding: 0 0 10px; }
  .todo li.has-act > a, .todo li.job > a:first-child { flex-basis: 100%; }
  .todo li.has-act > .btn, .todo li.job > .btn { margin: 0 0 0 12px; }
}
.todo small .seen { margin-right: 2px; }
.item .lab { display: contents; }
.item .lab small { display: none; }

/* Home */
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); padding: 22px; display: grid; gap: 14px; min-width: 0; }
.panel > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel > h2 .meta, .panel > h2 a { font-size: 13.5px; font-weight: 500; letter-spacing: 0; }
.panel > h2, details.foldp > summary h2 { line-height: 1.2; }
:is(h1, h2, h3) :is(.meta, small) { line-height: 1.4; }
.panel.wide { grid-column: 1 / -1; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.todo a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); text-decoration: none; transition: background-color .12s, border-color .12s; }
.todo a:hover { background: var(--surface); border-color: var(--line-hover); }
.todo li.has-act > a, .todo li.job > a { border: 0; }
.todo a > span:not(.num):not(.amt) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.todo a::after { content: ''; flex: none; width: 7px; height: 7px; margin-right: 2px; border-right: 1.6px solid var(--muted); border-top: 1.6px solid var(--muted); transform: rotate(45deg); }
.todo .num { flex: none; min-width: 28px; height: 28px; border-radius: 999px; background: var(--yellow); display: grid; place-items: center; font-weight: 750; font-size: 14px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.todo small { display: block; color: var(--graphite); font-size: 13.5px; }
.todo .amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.stat { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.stat strong { display: block; order: 2; font-size: clamp(20px, 2.3vw, 26px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { order: 1; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat.warn strong { color: var(--warn); }
.stats.flat .stat { background: var(--surface); box-shadow: var(--shadow-1); }
.acts { list-style: none; margin: 0; padding: 0; display: grid; }
.acts li { display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.acts li:first-child { border-top: 0; }
.acts a { text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.acts a:hover { text-decoration: underline; }
.acts .meta { flex: none; }
.acts .act-end { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.seen.bad { border-color: transparent; background: #fbe3df; color: #a1321f; }
.seen.bad::before { background: #c2412b; }
.seen.warn { border-color: transparent; background: #fdf1cf; color: #7a5600; }
.seen.warn::before { background: #d39b00; }
@media (max-width: 640px) { .acts li { flex-wrap: wrap; row-gap: 4px; } .acts .act-end { width: 100%; justify-content: flex-start; } }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.check-list li::before { content: '!'; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.check-list li.done::before { content: '✓'; background: #dff3e6; color: var(--ok); }
code { background: var(--sunken); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 13.5px; overflow-wrap: anywhere; }

/* Forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; align-items: end; }
.form .wide { grid-column: 1 / -1; }
/* a form of one column is as wide as its answers need, not the whole screen */
.foldp-in > form.stack, .foldp-in > .stack > form.stack { max-width: 720px; }
.foldp-in > form.form { max-width: 960px; }
@media (max-width: 640px) { .totals { justify-self: stretch; min-width: 0; } }
/* A choice among a few, each card saying what it means (When they pay): the whole card is the button, its round mark
   stays, the chosen one has an ink edge. Better than a dropdown for four options (every option is in sight). */
fieldset.fset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.fset > legend { padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; }
label.rcard { position: relative; display: block; cursor: pointer; font-weight: 400; }
.rcard > input { position: absolute; top: 15px; left: 14px; }
.rcard > span { display: grid; gap: 2px; height: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--line-soft); border-radius: var(--r-field); background: var(--surface); transition: border-color .12s, box-shadow .12s, background-color .12s; }
.rcard strong { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.rcard small { font-size: 13px; line-height: 1.35; color: var(--graphite); }
.rcard:hover > span { border-color: var(--line-hover); }
.rcard > input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--yellow-tint); }
.rcard > input:focus-visible + span { box-shadow: var(--ring); }
/* Two or three short choices side by side, in one track (% of total | $) */
.seg { display: inline-flex; gap: 2px; padding: 3px; height: var(--field-h); background: var(--hover); border-radius: var(--r-btn); }
.seg label { position: relative; display: flex; align-items: stretch; font-weight: 600; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; padding: 0 12px; border-radius: 6px; font-size: 14px; color: var(--graphite); white-space: nowrap; transition: background-color .12s, color .12s; }
.seg input:checked + span { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 18, .12); }
.seg input:focus-visible + span { box-shadow: var(--ring); }
.fld > label { font-weight: 600; }
/* The buttons of a long form stay in view at the bottom of the screen while it is being filled in, and say when
   something typed is not saved yet (a phone keeps them where they are: there they would cover the form) */
.actbar { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 6; margin: 6px -12px 0; padding: 10px 12px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px -14px rgba(20, 20, 18, .3); }
.actbar .dirty { order: 99; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--graphite); }
.actbar .dirty[hidden] { display: none !important; }
.actbar .dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow-deep); }
@media (max-width: 640px), (max-height: 560px) { .actbar { position: static; margin: 4px 0 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none; } .actbar .dirty { flex-basis: 100%; margin-left: 0; } }
/* A tick box (or a choice) and its words; a grey line about it goes under the words, not squeezed beside them */
label.check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 2px; font-weight: 500; font-size: 15px; cursor: pointer; }
label.check > .meta { grid-column: 2; font-weight: 400; font-size: 13.5px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); padding: 14px 18px; margin-bottom: 12px; display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; line-height: 1.5; font-size: 15px; }
:is(.panel, .foldp-in, .form, .folds, .bkf, .newc) > .note { margin-bottom: 0; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); box-shadow: inset 3px 0 0 var(--warn); }
.note.in { background: var(--sunken); box-shadow: none; margin: 0; }
.note input[type=number] { width: 84px; height: var(--field-sm); padding: 0 10px; }
.note input[type=text], .note input[type=email] { flex: 1 1 220px; width: auto; min-width: 0; height: var(--field-sm); padding: 0 12px; }
.note .meta { flex-basis: 100%; }
:is(.note, .pf-sec) .btn.sm { min-height: var(--field-sm); }
label.inline-sel { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; font-weight: 600; }
label.inline-sel select { width: auto; height: 36px; padding-left: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 26px 0 10px; }
.sec-head h2 small { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.quiet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; color: var(--graphite); }

/* Gallery screen */
.gal-top { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.gal-cover { width: 132px; aspect-ratio: 3 / 2; object-fit: contain; background: var(--mist); border-radius: 10px; display: block; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.people li { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.people strong { overflow-wrap: anywhere; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 6px; max-height: 460px; overflow-y: auto; padding: 6px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; }
.th { position: relative; padding: 0; border: 0; background: #ddd; aspect-ratio: 1; cursor: pointer; overflow: hidden; border-radius: 6px; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th.fav::after { content: '\2665\FE0E'; position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 13px; }
.th.cover { outline: 4px solid var(--ink); outline-offset: -4px; }
.th.cover::before { content: 'Cover'; position: absolute; left: 4px; top: 4px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; z-index: 1; }
.thumbs.favonly .th:not(.fav) { display: none; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }

/* Contract and invoice screens */
.doc-body { min-height: 380px; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.6; }
.fields { display: flex; flex-wrap: wrap; gap: 6px; }
.fields button { border: 1px solid var(--line); background: var(--sunken); border-radius: 6px; padding: 3px 8px; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; cursor: pointer; }
.fields button:hover { background: var(--yellow); }
.steps { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--graphite); }
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done::before { content: '✓ '; color: var(--ok); }
.record { background: var(--ok-bg); border: 1px solid #cfe8da; border-radius: 14px; padding: 16px 18px; display: grid; gap: 4px; }
.record strong { font-size: 17px; font-weight: 700; }
.record img { max-width: 260px; max-height: 90px; background: #fff; border-radius: 8px; margin-top: 6px; }
.record code { font-size: 13px; overflow-wrap: anywhere; }
.paper { white-space: pre-wrap; overflow-wrap: anywhere; font-family: Georgia, 'Times New Roman', serif; line-height: 1.6; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; max-height: 520px; overflow-y: auto; }
/* Price lines: a table of fields, its column names small above it; the amount of each line read-only at the right */
.items { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 84px 128px 108px 34px; gap: 8px; align-items: center; }
.item.head { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; padding: 0 2px; }
.item.head > :nth-child(4) { text-align: right; }
.item .amt { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.item input { height: 44px; padding: 0 12px; }
.item input[type=number] { text-align: right; }
.item .x { width: 34px; height: 34px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; transition: background-color .12s, color .12s; }
.item .x:hover { background: var(--warn-bg); color: var(--warn); }
/* The totals: a small statement at the right, the total in bold under a thin rule */
.totals { justify-self: end; min-width: min(100%, 300px); display: grid; grid-template-columns: auto auto; gap: 6px 0; font-variant-numeric: tabular-nums; text-align: right; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 15px; color: var(--graphite); }
.totals > :nth-child(odd) { text-align: left; }
.totals > :nth-child(even) { padding-left: 28px; color: var(--ink); }
.totals .big { font-size: 19px; font-weight: 800; font-stretch: 112%; color: var(--ink); letter-spacing: -0.01em; border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 4px; }
.pay-form { display: grid; grid-template-columns: minmax(110px, 150px) minmax(130px, 170px) minmax(150px, 190px) minmax(0, 1fr); gap: 14px 12px; align-items: end; }
.pay-form .wide { grid-column: 1 / -1; }
.pay-form .row { gap: 10px 18px; }
.pays { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pays li { display: flex; gap: 6px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.tpl { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.tpl:first-of-type { border-top: 0; padding-top: 0; }
/* Every other fold (a template, a group of packages, "Record an answer …"): the same small chevron, never the browser's
   own triangle */
:is(details.tpl, details.mini, .login-card details) > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
:is(details.tpl, details.mini, .login-card details) > summary::-webkit-details-marker { display: none; }
:is(details.tpl, details.mini, .login-card details) > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 3px 0 2px; border-right: 1.6px solid var(--graphite); border-bottom: 1.6px solid var(--graphite); transform: rotate(-45deg); transition: transform .15s; }
:is(details.tpl, details.mini, .login-card details)[open] > summary::before { transform: rotate(45deg); }
.tpl summary { font-weight: 650; padding: 4px 0; }

@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .pay-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 359px) { .pay-form { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .bar input[type=search] { max-width: none; margin-left: 0; }
  .card, .panel { padding: 16px; }
  .form { grid-template-columns: 1fr; }
  .gal-top { grid-template-columns: 88px minmax(0, 1fr); } .gal-cover { width: 88px; }
  .page-title .row { margin-left: 0; flex-basis: 100%; }
  .page-title .row > .btn, .quick > .btn, .row.wide > .btn, .pay-form .row > .btn { flex: 1 1 auto; }
  .rowlink { padding: 12px 14px; }
  .rowlink.with-img { grid-template-columns: 64px minmax(0, 1fr) auto; } .rowlink.with-img img, .rowlink.with-img .noimg { width: 64px; }
  .item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; padding-bottom: 10px; border-bottom: 1px solid var(--mist); }
  .item > :first-child { grid-column: 1 / -1; }
  .item.head, .item .amt { display: none; }
  .item .lab { display: grid; gap: 3px; min-width: 0; }
  .item .lab small { display: block; font-size: 13px; font-weight: 700; color: var(--graphite); }
  .item .x { align-self: end; margin-bottom: 6px; }
  .top-end .btn { min-height: 32px; padding: 0 10px; }
  .top-brand span { display: none; }
  .find { order: 2; flex-basis: 100%; max-width: none; }
  .btn { white-space: normal; text-align: center; padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 480px) { .gal-top { grid-template-columns: minmax(0, 1fr); } }

/* Pay to unlock, and the payment plan on an invoice */
.th.held img { opacity: .35; }
.th.held::after { content: 'Locked'; position: absolute; right: 4px; top: 4px; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; }
.th.held.fav::after { content: '\2665\FE0E  Locked'; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.end .pill + .pill { margin-left: 6px; }

/* Bookings: the details form inside a contract, what was accepted, and the small forms that record an answer */
/* "Are you sure?": its own window, before anything that reaches a client or cannot be taken back */
.sure { border: 1px solid var(--line); border-radius: var(--r-dialog); padding: 26px; width: min(500px, calc(100vw - 32px)); box-shadow: 0 30px 70px -20px rgba(20, 20, 18, .45); color: var(--ink); }
.sure::backdrop { background: rgba(28, 29, 28, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sure h2 { font-size: 21px; font-weight: 800; font-stretch: 112%; line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 10px; }
.sure p { margin: 0 0 10px; color: var(--graphite); overflow-wrap: anywhere; }
.sure .row { margin-top: 20px; justify-content: flex-end; }
.sure .btn:disabled { opacity: .45; }
/* Fields that read what is typed: a date with its calendar button, a number with its unit, the note under a field */
.pickf, .unitf { position: relative; display: flex; align-items: center; }
.pickf input[type=text], .unitf input { flex: 1; min-width: 0; }
.pickf input[type=text] { padding-right: 52px; }
.calb { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: flex; }
.pickf .btn.cal-btn { width: 36px; min-height: 0; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--graphite); box-shadow: none; }
.pickf .btn.cal-btn:hover { background: var(--hover); color: var(--ink); }
.calb .cal { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.unitf > span { position: absolute; right: 14px; color: var(--muted); font-weight: 400; font-size: 15px; white-space: nowrap; pointer-events: none; }
.unitf > span:first-child { right: auto; left: 14px; }
.unitf > input:not(:last-child) { padding-right: 84px; }
.unitf > span:first-child + input { padding-left: 28px; }
.ferr { display: block; margin-top: 6px; color: var(--warn); font-weight: 600; }
.ferr.soft { color: var(--graphite); }
[aria-invalid=true] { border-color: var(--warn) !important; }
/* The booking's fields: part of the form itself, a thin rule and a heading between its parts (no box inside the box) */
.bkf { padding: 0; border-radius: 0; background: transparent; }
.bkf .bk-h { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
/* A new client typed right in a contract's or an invoice's form */
.newc { padding: 16px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
/* The parts of a form that are rarely needed: folded until asked for, or until they hold something */
/* a folded part of a form: a row with a chevron, not the browser's own triangle */
details.fold > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; padding: 14px 0 2px; border-top: 1px solid var(--line); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ''; flex: none; align-self: center; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 1.6px solid var(--graphite); border-bottom: 1.6px solid var(--graphite); transform: rotate(-45deg); transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary:hover { color: var(--ink); }
details.fold > summary .meta { font-weight: 400; font-size: 13.5px; margin-left: 0; color: var(--muted); }
details.fold[open] > summary { margin-bottom: 14px; }
/* Whole panels that are closed until asked for (fold() in admin.js): a name and where it stands, on one line */
.folds { display: grid; gap: 8px; }
details.foldp { display: block; padding: 0; }
details.foldp > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 3px 14px; padding: 16px 22px; cursor: pointer; list-style: none; border-radius: var(--r-card); transition: background-color .12s; }
details.foldp > summary:hover { background: var(--sunken); }
details.foldp > summary::-webkit-details-marker { display: none; }
details.foldp > summary h2 { font-size: 16px; font-weight: 650; }
details.foldp > summary::after { content: ''; grid-column: 3; grid-row: 1; width: 8px; height: 8px; margin: -5px 4px 0 2px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.foldp[open] > summary::after { transform: rotate(-135deg); margin-top: 5px; }
.foldp-say { min-width: 0; color: var(--muted); font-size: 13.5px; text-align: right; overflow-wrap: anywhere; }
/* on a phone: where it stands goes under the name, and the arrow stays at the right */
@media (max-width: 640px) {
  details.foldp > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  details.foldp > summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .foldp-say { grid-column: 1; text-align: left; }
  .foldp-in { padding: 2px 16px 16px; }
}
.foldp-say.warn { color: var(--ink); font-weight: 700; }
.foldp-say.warn::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--yellow); }
.foldp-in { display: grid; gap: 14px; padding: 4px 22px 22px; min-width: 0; }
details.foldp[open] > .foldp-in { border-top: 1px solid var(--line); padding-top: 18px; }
.tpl summary .meta { font-weight: 500; margin-left: 4px; }
.tpl > .rows { margin-top: 2px; }
.tpl .rowlink { background: var(--sunken); }
.row .keep-name { width: auto; flex: 1 1 240px; min-width: 0; height: var(--field-sm); padding: 0 12px; }
.kv { display: grid; grid-template-columns: minmax(130px, 34%) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { font-weight: 500; color: var(--graphite); }
.kv dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
details.mini { margin-top: 8px; }
details.mini summary { cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; }
details.mini summary:hover { text-decoration-color: currentColor; }
details.mini .form { margin-top: 10px; padding: 16px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.todo li.job.done { opacity: .6; }
/* a client's own withdrawal: their photos on the website, on a line of its own under the job */
.todo li.job .job-photos { order: 3; flex-basis: 100%; display: block; background: none; padding: 0 12px 8px; font-size: 14px; font-weight: 700; color: var(--warn); }
@media (max-width: 640px) { .todo li.job .job-photos { order: 0; } }
.todo li.job .job-photos::after { content: none; }
.todo li.job .job-photos:hover { background: none; text-decoration: underline; }
/* Portfolio → Photos of <client> */
.pf-card.pf-gone { opacity: .55; }
.pf-cl-alt { margin: 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.people li > .row { flex: none; }
/* a web address or a long word in a list line breaks instead of pushing the line out of a small screen */
.people li > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 400px) { .row > .btn { white-space: normal; text-align: center; max-width: 100%; } }

/* "Opens another site" arrow and the small "play" triangle. Drawn, not typed: as characters (\2197, \25B6) iPads and
   iPhones replace them with colored emoji. */
.ext { display: inline-block; width: .62em; height: .62em; margin-left: .16em; vertical-align: .03em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 1.6h7.2v7.2M10.4 1.6 1.6 10.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 1.6h7.2v7.2M10.4 1.6 1.6 10.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.play-ico { display: inline-block; width: 0; height: 0; border-style: solid; border-width: .42em 0 .42em .7em; border-color: transparent transparent transparent currentColor; }

/* A client's own picture (they add it on their page): round, in the list and on their page; their initial when there is none */
.rowlink.with-face { grid-template-columns: 44px minmax(0, 1fr) auto; }
.rowlink.with-face img, .rowlink.with-face .face { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--mist); display: grid; place-items: center; font-weight: 800; color: var(--graphite); }
.rowlink.with-face strong, .rowlink.with-face .meta { grid-column: 2; }
.rowlink.with-face .end { grid-column: 3; }
.cl-self { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cl-self img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }

/* Calendar: a month of days; a booking is a link to its contract, what is only on his Google Calendar is plain text */
.cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 13px; font-weight: 700; color: var(--graphite); padding: 0 6px 2px; }
.cal-day { min-height: 98px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-num { font-weight: 650; font-size: 13px; padding: 0 2px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { color: var(--ink); }
.cal-num small { display: none; font-weight: 600; font-size: 13px; color: var(--graphite); }
.cal-item { display: grid; padding: 4px 8px; border-radius: 6px; background: #fff; font-size: 13px; line-height: 1.25; text-decoration: none; min-width: 0; border-left: 3px solid var(--rule); box-shadow: var(--shadow-1); }
.cal-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item span { color: var(--graphite); font-size: 12px; overflow-wrap: anywhere; }
.cal-item b { color: var(--warn); }
.cal-item.confirmed { border-left-color: var(--ok); }
.cal-item.hold { border-left-color: var(--yellow); }
.cal-item.draft { border-left-style: dashed; border-left-color: var(--graphite); }
.cal-item.g { background: transparent; border-left-color: #8fa9d6; }
a.cal-item:hover { box-shadow: 0 0 0 2px var(--ink); }
.cal-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 5px 0 12px; background: var(--graphite); }
.cal-key.confirmed { background: var(--ok); }
.cal-key.hold { background: var(--yellow); }
.cal-key.g { background: #8fa9d6; }
.cal-none { text-align: center; padding: 8px 0; }
@media (max-width: 760px) {
  /* a list of the days that have something, instead of a grid too narrow to read */
  .cal { grid-template-columns: 1fr; gap: 6px; }
  .cal-head, .cal-pad, .cal-day.free { display: none; }
  .cal-day { min-height: 0; position: relative; padding: 8px 8px 8px 72px; }
  .cal-num { position: absolute; left: 10px; top: 12px; }
  .cal-num small { display: inline; }
  .cal-item strong { white-space: normal; }
  .cal-key { margin-left: 8px; }
}
/* The narrowest phones: the name, "Website" and "Log out" stay on one line */
@media (max-width: 380px) { .top-brand { font-size: 16px; } .top-in { column-gap: 8px; } .top-end { gap: 6px; } .top-end .btn { padding: 0 8px; } }

/* A choice among a few, each with a line about what it means (Move the date, Cancel the booking) */
.choices { display: grid; gap: 10px; }
.choices .check { align-items: start; }
.choices .check input[type=radio], .choices .check input[type=checkbox] { margin-top: 2px; }

/* Who a contract, an invoice or a gallery is for: named above its title, a link to their page (2026-10-17: "i feel
   like i have to look for the specific client sometimes, as opposed to the shoot") */
.who { justify-self: start; font-size: 17px; font-weight: 700; text-decoration: none; color: var(--graphite); }
.who:hover { color: var(--ink); text-decoration: underline; }
.rowlink strong .dim { color: var(--graphite); font-weight: 500; }
/* A list under small headings: Coming up, No date, Past … */
h2.grp { font-size: 15px; font-stretch: 110%; color: var(--graphite); margin: 22px 0 8px 4px; }
h2.grp:first-child { margin-top: 0; }
h2.grp small { font-weight: 600; font-stretch: 100%; margin-left: 4px; }

/* One job in four steps (jobLine in admin.js): contract, payment, shoot, gallery */
.jobline { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; counter-reset: js; }
.jobline a { position: relative; display: grid; gap: 2px; align-content: start; height: 100%; padding: 13px 14px 13px 46px; border-radius: 14px; background: var(--surface); text-decoration: none; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .12s; }
.jobline a:hover { border-color: var(--line-hover); }
.jobline .here a { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), inset 0 3px 0 var(--yellow); }
.jobline a::before { counter-increment: js; content: counter(js); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--mist); color: var(--graphite); }
.jobline .js-k { font-weight: 700; font-size: 14.5px; }
.nobr { white-space: nowrap; }
.jobline .js-s { font-size: 13.5px; color: var(--graphite); overflow-wrap: anywhere; }
/* done: a tick drawn, not typed (no emoji on phones) */
.jobline .s-done a::before { content: ''; background: var(--ok); }
.jobline .s-done a::after { content: ''; position: absolute; left: 21px; top: 17px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.jobline .s-wait a::before { background: #e3ecfb; color: #1c4f9c; }
.jobline .s-now a::before { background: var(--yellow); color: var(--ink); }
.jobline .s-now .js-s { color: var(--ink); font-weight: 600; }
.jobline .s-off a { background: transparent; border-style: dashed; box-shadow: none; }
.jobline .s-off .js-k, .jobline .s-off .js-s { color: var(--graphite); }
@media (max-width: 760px) { .jobline { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } .jobline li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 380px) { .jobline { grid-template-columns: 1fr; } }

/* Home: the shoots coming up, the day first */
.todo.soon a { gap: 14px; }
.todo.soon a > span.when { flex: none; min-width: 108px; white-space: nowrap; font-weight: 800; }
.todo.soon a > span.pill { flex: none; }
.todo.soon .when small { font-weight: 500; }
@media (max-width: 640px) {
  .todo.soon a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; }
  .todo.soon a > * { grid-column: 1; }
  .todo.soon a > span.pill { justify-self: start; }
  .todo.soon a::after { grid-column: 2; grid-row: 1 / span 3; }
}
/* On a phone a row's status and amount go under its words, so the client's name and the shoot keep the width */
@media (max-width: 640px) {
  .rowlink .end { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; text-align: left; flex-wrap: wrap; }
  .rowlink .end::after { margin-left: auto; }
  .rowlink.with-img .end, .rowlink.with-face .end { grid-column: 2 / -1; }
  .rowlink .end:empty, .rowlink.with-face .end:empty { grid-column: -2; grid-row: 1 / span 2; }
}

/* Portfolio: the photos of the public site (admin.js, "Portfolio"). Nothing is cropped in a photo's box, except where
   the website itself crops (the home page's rows: 4:3 and 4:5), so he sees what visitors see. Fields are 16 px: an
   iPhone zooms the whole page into a smaller one. */
.pf-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pf-entry { background: var(--surface); border-radius: var(--r-card); padding: 14px; display: grid; gap: 6px; text-decoration: none; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .12s; }
.pf-entry:hover { border-color: var(--line-hover); }
.pf-entry strong { font-size: 17px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.pf-entry-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 4px; }
.pf-entry-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--mist); display: block; }
.pf-find { margin: 0 0 6px; }
.pf-find input { width: 100%; font-size: 16px; padding: 0 16px; }
.pf-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; margin-top: 10px; }
.pf-hit { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 6px; text-decoration: none; }
.pf-hit:hover { outline: 2px solid var(--ink); }
.pf-hit img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--mist); }
.pf-hit span { font-size: 14px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.pf-hit small { display: block; color: var(--graphite); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 16px; min-height: 64px; }
.pf-grid.pf-over { background: #fbf1cf; outline: 2px dashed var(--yellow); }
.pf-card, .pf-spot { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-card > .pf-acts, .pf-spot > .pf-acts { margin-top: auto; }
.pf-card[draggable="true"] { cursor: grab; }
.pf-card.cover { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.chip[aria-pressed="true"] small { color: var(--yellow); opacity: 1; }
.pf-card.pf-over { box-shadow: -7px 0 0 -2px var(--yellow); }
.pf-card.pf-dragging { opacity: .35; }
.pf-card.pf-flash { animation: pfflash 2.4s ease-out 1; }
@keyframes pfflash { 0%, 40% { border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow); } 100% { box-shadow: none; } }
.pf-img { position: relative; aspect-ratio: 1; background: var(--mist); border-radius: 8px; overflow: hidden; }
.pf-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pf-img.wide { aspect-ratio: 4 / 3; } .pf-img.wide img { object-fit: cover; }
.pf-img.tall { aspect-ratio: 4 / 5; } .pf-img.tall img { object-fit: cover; }
.pf-tag { position: absolute; left: 6px; bottom: 6px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.pf-tag.dark { background: var(--ink); color: #fff; left: auto; right: 6px; }
/* hidden on the website, kept here */
.pf-tag.hid { background: #fff; color: var(--graphite); border: 1.5px solid #c9c9c5; }
.pf-card.pf-off .pf-img img { opacity: .4; filter: grayscale(1); }
.pf-handle { position: absolute; left: 6px; top: 6px; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: grab; touch-action: none; display: grid; place-items: center; padding: 0; }
.pf-handle span { width: 14px; height: 20px; background: radial-gradient(circle, var(--ink) 2px, transparent 2.5px) 0 0 / 7px 7px; }
.pf-handle:active { cursor: grabbing; }
.pf-star { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-size: 19px; line-height: 1; cursor: pointer; color: #b9b9b5; padding: 0; }
.pf-star[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.pf-card textarea, .pf-spot textarea { width: 100%; resize: none; overflow: hidden; font-size: 16px; line-height: 1.35; padding: 8px 10px; min-height: 64px; }
.pf-card textarea.short, .pf-spot textarea.short { border-color: var(--yellow); background: #fffbea; }
.pf-card textarea.pf-writing, .pf-spot textarea.pf-writing { background: linear-gradient(90deg, #fff, #f6f0dc, #fff) 0 0 / 200% 100%; animation: pfwrite 1.4s linear infinite; }
@keyframes pfwrite { to { background-position: -200% 0; } }
.pf-aiw { font-size: 13px; line-height: 1.3; color: var(--graphite); min-height: 0; }
.pf-aiw:empty { display: none; }
.pf-aiw.done { color: var(--ok); }
.pf-aiw.failed { color: var(--warn); }
.pf-used { font-size: 13px; line-height: 1.3; color: var(--graphite); }
.pf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pf-acts .btn.sm { min-height: 40px; }
.pf-more { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-btn); border: 1px solid var(--line-soft); background: var(--surface); font-weight: 650; font-size: 14.5px; cursor: pointer; }
.pf-more:hover { border-color: var(--line-hover); background: var(--sunken); }
.pf-more span { width: 16px; height: 4px; background: radial-gradient(circle, var(--ink) 2px, transparent 2.5px) 0 0 / 6px 4px; }
.pf-ghost { position: fixed; z-index: 50; width: 92px; height: 92px; object-fit: cover; border-radius: 12px; pointer-events: none; transform: translate(-50%, -110%); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); border: 3px solid #fff; }
.pf-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pf-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pf-sec input { flex: 1 1 240px; min-width: 0; font-weight: 700; font-size: 17px; height: var(--field-sm); padding: 0 12px; }
.pf-sec small { color: var(--graphite); font-weight: 600; }
.pf-empty { grid-column: 1 / -1; padding: 18px 8px; text-align: center; }
.pf-add { cursor: pointer; }
.pf-spots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .pf-spots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the home page's rows: a large picture and three small ones, four a row wherever they fit */
.pf-rowspots { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
.pf-rowspots { margin-bottom: 6px; }
.pf-spot-l { font-weight: 800; font-size: 15px; }
.pf-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pf-pickrow { display: flex; align-items: center; gap: 10px; background: var(--mist); border-radius: 999px; padding: 6px 8px 6px 6px; }
.pf-pickrow img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: #ddd; }
.pf-pickrow span { flex: 1; font-weight: 600; min-width: 0; }
.pf-bar { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 8px 10px 8px 20px; box-shadow: var(--shadow-2); }
.pf-bar > span { flex: 1 1 auto; }
.pf-bar .btn.line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); box-shadow: none; }
.pf-bar .btn.line:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pf-lock[inert] { opacity: .55; }
#pf-bar:empty { display: none; }
/* the "More" choices of a photo: a box in the middle on a computer, a sheet from the bottom on a phone */
dialog.pf-menu { border: 0; padding: 0; border-radius: 20px; width: min(400px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
dialog.pf-menu::backdrop, dialog.pf-pickd::backdrop { background: rgba(36, 37, 36, .45); }
.pf-menu-in { display: grid; gap: 4px; padding: 12px; }
.pf-menu-h { display: flex; gap: 10px; align-items: center; padding: 4px 4px 10px; border-bottom: 2px solid var(--mist); margin-bottom: 4px; }
.pf-menu-h img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; background: var(--mist); }
.pf-menu-h span { font-size: 14px; line-height: 1.3; color: var(--graphite); min-width: 0; overflow-wrap: anywhere; }
.pf-menu-b { text-align: left; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font-weight: 700; font-size: 16px; cursor: pointer; }
.pf-menu-b:hover, .pf-menu-b:focus-visible { background: var(--mist); }
.pf-menu-b.danger { color: var(--warn); }
.pf-menu-b.quiet { color: var(--graphite); text-align: center; }
.pf-menu-note { font-size: 14px; color: var(--graphite); padding: 8px 14px; line-height: 1.4; }
/* choosing a photo for one of the home page's places */
dialog.pf-pickd { border: 0; padding: 0; border-radius: 20px; width: min(900px, calc(100vw - 24px)); height: min(720px, calc(100vh - 40px)); background: #fff; }
.pf-pick { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; height: 100%; padding: 16px; }
.pf-pick-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.pf-pick input { width: 100%; font-size: 16px; padding: 0 16px; }
.pf-pick-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; padding: 2px; }
.pf-pk { border: 3px solid transparent; border-radius: 12px; background: var(--mist); padding: 0; cursor: pointer; text-align: left; overflow: hidden; display: grid; }
.pf-pk img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pf-pk span { font-size: 12px; line-height: 1.25; padding: 4px 6px 0; margin-bottom: 6px; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-pk.on { border-color: var(--ink); }
.pf-pk:hover { border-color: var(--yellow); }
ol.steps { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; }
/* numbered steps inside a line of Settings → Connections: ordinary numbered lines, not more check-list items */
.check-list ol.steps { list-style: decimal; }
.check-list ol.steps li { display: list-item; }
.check-list ol.steps li::before { content: none; }
/* Portfolio → an album → "From a client gallery": the galleries, then a gallery's photos to tick */
.pf-gald .pf-pick { display: flex; flex-direction: column; }
.pf-gald .pf-pick > * { flex: none; }
.pf-gald .pf-gal-list, .pf-gald .pf-gal-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pf-gal-list { display: grid; grid-auto-rows: max-content; gap: 6px; align-content: start; padding: 2px; }
.pf-gal-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pf-gal-row > .pf-gal { flex: 1 1 auto; }
.pf-gal-row.off > .pf-gal { opacity: .55; }
.pf-gal-hide { flex: none; font-size: 14px; min-height: 40px; padding: 0 6px; }
.pf-gal-more { margin: 6px 2px 0; }
.pf-gal { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px; cursor: pointer; min-width: 0; color: inherit; font: inherit; }
.pf-gal[hidden] { display: none; }
.pf-gal:hover, .pf-gal:focus-visible { border-color: var(--line-hover); background: var(--sunken); }
.pf-gal:disabled { opacity: .6; cursor: progress; }
.pf-gald img.gone { visibility: hidden; }
.pf-gal img, .pf-gal .noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--mist); }
.pf-gal > span { display: grid; gap: 2px; min-width: 0; }
.pf-gal strong { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.pf-gal small { color: var(--graphite); font-size: 13px; }
.pf-promo { font-size: 13px; font-weight: 700; color: var(--graphite); }
.pf-promo.ok { color: var(--ok); }
.pf-promo.warn { color: var(--warn); }
.pf-gald h2 { margin: 2px 0 4px; overflow-wrap: anywhere; }
.pf-gal-note { margin: 0; font-size: 13px; }
.pf-gal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pf-gp { position: relative; }
.pf-gp.on { border-color: var(--ink); }
.pf-gp:disabled { opacity: .55; cursor: default; border-color: transparent; }
.pf-gp .pf-tick { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 2px solid var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 15px; line-height: 1; }
.pf-gp.on .pf-tick { background: var(--yellow); }
.pf-gp.on .pf-tick::after { content: '✓'; }
.pf-gp:disabled .pf-tick { display: none; }
.pf-gp-s { position: absolute; left: 4px; right: 4px; bottom: 4px; background: rgba(36, 37, 36, .88); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-gal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 2px solid var(--mist); padding-top: 10px; padding-bottom: env(safe-area-inset-bottom); }
.pf-gal-foot .btn { flex: none; }

/* Portfolio → Films: one card a film (its cover 16:9), and the frame chooser */
.pf-films { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 16px; }
.pf-films.pf-over { background: #fbf1cf; outline: 2px dashed var(--yellow); }
.pf-film .pf-img { aspect-ratio: 16 / 9; background: #1a1a1a; }
.pf-film .pf-img img { object-fit: cover; }
.pf-film .pf-tag.dark { max-width: calc(100% - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-ff { display: grid; gap: 4px; font-weight: 700; font-size: 14px; min-width: 0; }
.pf-ff small { font-weight: 500; color: var(--graphite); }
.pf-ff input, .pf-ff select { height: var(--field-sm); padding: 0 12px; min-width: 0; }
.pf-ff select { padding-right: 38px; background-position: right 14px center; }
.pf-ff .short { border-color: var(--yellow); background-color: #fffbea; }
.pf-fsend { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(36, 37, 36, .88); color: #fff; font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.pf-fsend.err { background: var(--warn); }
.pf-fhint { margin: 12px 0 0; }
.pf-menu-h.wide img { width: 92px; height: 52px; }
dialog.pf-framesd { border: 0; padding: 0; border-radius: 20px; width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: #fff; overflow-y: auto; }
dialog.pf-framesd::backdrop { background: rgba(36, 37, 36, .55); }
.pf-fr { display: grid; gap: 12px; padding: 16px; }
.pf-fr h2 { margin: 0; }
.pf-fv { position: relative; aspect-ratio: 16 / 9; max-height: 56vh; background: #111; border-radius: 12px; overflow: hidden; }
.pf-fv video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pf-fv-say { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; color: #fff; font-weight: 700; text-align: center; }
.pf-fv-say[hidden] { display: none; }
.pf-fr-range { width: 100%; height: 36px; margin: 0; accent-color: var(--ink); padding: 0; background: none; }
.pf-fr-ctl, .pf-fr-do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-fr-t { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-fr-now { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; align-items: start; border-top: 2px solid var(--mist); padding-top: 12px; }
.pf-fr-now figure { margin: 0; display: grid; gap: 4px; }
.pf-fr-now img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--mist); display: block; }
.pf-fr-now figcaption { font-size: 14px; color: var(--graphite); }
.pf-fr-now p { margin: 0; }
@media (max-width: 640px) {
  dialog.pf-framesd { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pf-fr { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .pf-fv { max-height: 42vh; }
  .pf-fr-do .btn { flex: 1 1 100%; }
  .pf-fr-now { grid-template-columns: minmax(0, 1fr); }
  .pf-fr-t { flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pf-card, .pf-spot { padding: 6px; }
  .pf-spots, .pf-rowspots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pf-bar { border-radius: 20px; padding: 10px 12px; }
  .pf-bar-say { display: none; }
  .pf-more { padding: 0 12px; }
  dialog.pf-menu { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.pf-pickd { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pf-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 340px) { .pf-grid, .pf-spots, .pf-rowspots { grid-template-columns: minmax(0, 1fr); } }
/* A special agreement: which of his standard sections to attach */
.secall { font-weight: 600; margin-top: 8px; }
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 18px; margin-top: 6px; }
.secs label.check { font-weight: 500; align-items: flex-start; }
/* The people of a client, and who a send goes to */
.person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.person .x { width: 34px; height: 34px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.person .x:hover { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 640px) { .person { grid-template-columns: minmax(0, 1fr) 36px; padding-bottom: 8px; border-bottom: 1px solid var(--mist); } .person input { grid-column: 1; } .person .x { grid-column: 2; grid-row: 1; } }
.sure-to { margin-top: 6px; display: grid; gap: 8px; }
.sure-to label.check { align-items: flex-start; font-weight: 600; }
.sure-to label.check span { min-width: 0; overflow-wrap: anywhere; }
