/* Antic Didone (SIL Open Font License), served from here rather than from
   Google, so visitors' addresses don't go to Google. Used for album titles. */
@font-face {
  font-family: "Antic Didone";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("antic-didone.woff2") format("woff2");
}

:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --text: #1d1b19;
  --muted: #6f6a64;
  --line: #e3dfd9;
  --accent: #1d1b19;
  --accent-text: #ffffff;
  --logo-filter: brightness(0); /* adaptive logo: black */
  --heart: #e0245e;
  --ok: #2f7d4f;
  --danger: #b3261e;
  --radius: 10px;
  --brand: #501520;      /* burgundy: the main button, the menu's underline, progress */
  --brand-line: #501520; /* lines and text in it; lighter in dark mode */
  /* Avenir comes with Apple devices (it can't be served from here: it isn't free);
     elsewhere the system font takes over. */
  --font: "Avenir Next", Avenir, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --theme-sun: none;  /* the switch shows a moon in light mode, a sun in dark */
  --theme-moon: inline;
  color-scheme: light;
}
/* Dark when the device prefers it, unless the visitor picked light with the
   theme switch (data-theme on <html>); or when they picked dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312;
    --surface: #1e1c1b;
    --text: #efebe6;
    --muted: #a49d95;
    --line: #34312e;
    --accent: #efebe6;
    --accent-text: #141312;
    --brand-line: #d6a3ad;
    --logo-filter: brightness(0) invert(1); /* adaptive logo: white */
    --heart: #ff4d7d;
    --ok: #63c28b;
    --danger: #ff8a80;
    --theme-sun: inline;
    --theme-moon: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141312;
  --surface: #1e1c1b;
  --text: #efebe6;
  --muted: #a49d95;
  --line: #34312e;
  --accent: #efebe6;
  --accent-text: #141312;
  --brand-line: #d6a3ad;
  --logo-filter: brightness(0) invert(1);
  --heart: #ff4d7d;
  --ok: #63c28b;
  --danger: #ff8a80;
  --theme-sun: inline;
  --theme-moon: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: 1.3rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0 0 .4rem; }
.eyebrow a { text-decoration: none; }
.album-date { color: var(--text); margin: .25rem 0 0; }

/* ---------- Forms & buttons ---------- */
.stack { display: grid; gap: 1rem; }
.stack > p { margin: 0; }
.stack > h2 { margin: 0; }
.stack > .section-break { margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
label { display: grid; gap: .35rem; font-weight: 500; }
label small { font-weight: 400; color: var(--muted); }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
/* The explanation of a tick box goes on its own line, under the option. */
label.check { flex-wrap: wrap; }
label.check small { flex-basis: 100%; margin-top: -.25rem; padding-left: 1.6rem; }
input, textarea {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; width: 100%;
}
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--heart); outline-offset: 2px;
}
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { white-space: nowrap; padding: .6rem .5rem .6rem .75rem; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); background: var(--surface); }
.prefix-input input { border-radius: 0 8px 8px 0; }

button, .button {
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; white-space: nowrap;
}
button.primary, .button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; border-radius: 0; }
.danger-link { color: var(--danger); background: none; border: 0; padding: 0; text-decoration: underline; }

.error { margin: 0; padding: .7rem .9rem; border-radius: 8px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.notice { position: relative; margin: 0 0 1rem; padding: .7rem 2.6rem .7rem .9rem; border-radius: 8px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.notice-close {
  position: absolute; top: 50%; right: .4rem; transform: translateY(-50%);
  width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; opacity: .7;
}
.notice-close:hover, .notice-close:focus-visible { opacity: 1; background: color-mix(in srgb, var(--ok) 16%, transparent); }
.empty { color: var(--muted); padding: 3rem 0; text-align: center; }
.delivered-title { text-align: center; padding: clamp(2rem, 5vw, 3.5rem) 16px clamp(1.25rem, 3vw, 2rem); }
.delivered-title h2 { margin: 0; font-weight: 400; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.delivered-title p { margin: .5rem 0 0; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.75rem); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---------- Centered pages: home, gate, login ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.card.narrow { width: 100%; max-width: 26rem; }
.card.narrow h2 { margin-top: .5rem; font-size: 1.1rem; }
.intro { color: var(--muted); white-space: pre-line; }
.contact { margin: 1.5rem 0 0; color: var(--muted); font-size: .9rem; white-space: pre-line; border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---------- Album page ---------- */
.album-page { --page-pad: clamp(1rem, 3vw, 2.5rem); padding: 0 var(--page-pad) 4rem; }
/* Cover: the chosen photo across the whole screen under a dark layer, with
   the logo, title, date and the slideshow's play button in the middle, and
   an arrow down. White in the dark theme too: it sits on the photo. */
.album-cover {
  position: relative; margin: 0 calc(-1 * var(--page-pad));
  height: 100vh; height: 100svh; min-height: 24rem; overflow: hidden; background: #000;
}
.album-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; } /* on black: a little darker */
.album-cover-text {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 3rem 1.5rem; color: #fff; /* white on the dark layer, in both themes */
  background: linear-gradient(to bottom, rgb(0 0 0 / .18), rgb(0 0 0 / .08) 40%, rgb(0 0 0 / .5));
}
.cover-title { display: flex; flex-direction: column; align-items: center; }
.cover-logo { width: auto; max-width: min(18rem, 60vw); height: clamp(3.5rem, 8vh, 5.5rem); object-fit: contain; margin-bottom: clamp(1.5rem, 5vh, 3rem); }
.cover-logo.adaptive { filter: brightness(0) invert(1); } /* white: it sits on the dark layer */
.album-cover-text h1 { margin: 0; font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 1; letter-spacing: .01em; color: #fff; text-shadow: 0 2px 24px rgb(0 0 0 / .3); }
.album-title h1 { font-family: "Antic Didone", var(--serif); font-weight: 400; }
.album-cover-text .album-date { margin: 1rem 0 0; color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .18em; opacity: .9; }
.cover-down { position: absolute; bottom: 2rem; left: 50%; translate: -50% 0; width: 2.5rem; color: #fff; line-height: 0; opacity: .85; }
.cover-down:hover { opacity: 1; }
.cover-down svg { width: 100%; height: auto; }
.album-head.has-cover { padding-top: 1.25rem; }
.album-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding: 2.5rem 0 1.25rem; }
.preview-note { margin: 0; color: var(--muted); font-size: .9rem; }
/* "Selecting as …" in the top right corner: a pill like the switches next to it. */
.who {
  display: inline-flex; align-items: center; gap: .3em; height: 2.25rem; margin: 0; padding: 0 .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: .85rem; white-space: nowrap;
}
.who strong { color: var(--text); font-weight: 500; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.who .link { color: var(--text); }
@media (max-width: 600px) {
  .who-label { display: none; } /* just the address and "Not you?" */
  .who strong { max-width: 9rem; }
}

/* The bar at the top: logo left, sections in the middle, menu right. */
.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem;
  min-height: 3.75rem; padding: .5rem var(--page-pad, 0); margin: 0 calc(-1 * var(--page-pad, 0)) 1.5rem; /* the screen's full width */
  background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-logo { justify-self: start; display: block; line-height: 0; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.bar-logo img { height: 2.4rem; width: auto; max-width: 30vw; object-fit: contain; }
.bar-logo img.adaptive { filter: var(--logo-filter); }
.toolbar .section-nav { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.toolbar .section-nav::-webkit-scrollbar { display: none; }
.toolbar .section-nav a { white-space: nowrap; }
/* The selection status at the top of the ☰ menu. */
.menu-status { display: grid; gap: .3rem; padding: .55rem .7rem .7rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); }
.menu-status .count { display: inline-flex; align-items: center; gap: .35rem; }
.menu-status .count strong { font-weight: 600; }
.menu-status .locked { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; white-space: normal; max-width: 18rem; }
/* Right of the bar: the slideshow button and the ☰ menu. */
.bar-right { justify-self: end; display: flex; align-items: center; gap: .5rem; }
.slideshow-btn { height: 2.5rem; padding: 0 1rem; border-radius: 8px; gap: .45rem; }
.toolbar-menu { position: relative; }
@media (max-width: 600px) {
  /* Phones: logo and menu on the first line, the sections scroll below them. */
  .toolbar { grid-template-columns: 1fr auto; }
  .toolbar .section-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: .5rem 1.5rem; }
  .bar-right { grid-column: 2; grid-row: 1; }
  .slideshow-btn { padding: 0 .8rem; }
  .slideshow-label { display: none; } /* just ▶ on a phone */
}
.menu-btn { width: 2.5rem; height: 2.5rem; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.burger, .burger::before, .burger::after { display: block; width: 1.1rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu-btn[aria-expanded="true"] .burger { background: transparent; }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.menu-panel {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 20; width: max-content; min-width: 16rem; max-width: calc(100vw - 2rem);
  display: grid; padding: .35rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 30px rgb(0 0 0 / .15);
}
.menu-panel[hidden], label.check[hidden], form[hidden], p[hidden] { display: none; }
.menu-panel form { margin: 0; }
/* Every item starts with a 1.1rem slot (the tick box or an icon), so all
   texts line up; the download choices below line up with them too. */
.menu-panel { --mi-pad: .7rem; --mi-icon: 1.1rem; --mi-gap: .6rem; }
.menu-item {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--mi-gap); width: 100%; padding: .6rem var(--mi-pad); border: 0; border-radius: 7px;
  background: none; color: var(--text); font: inherit; font-weight: 400; text-align: left; cursor: pointer;
}
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--bg); }
.menu-item:disabled { opacity: .45; cursor: not-allowed; }
.menu-item .mi-icon, .menu-item input[type="checkbox"] { flex: none; width: var(--mi-icon); height: var(--mi-icon); margin: 0; }
.menu-panel label.menu-item { gap: var(--mi-gap); flex-wrap: nowrap; } /* beats the general label.check */
.tile.kept .heart { cursor: default; }
.gallery.delivered .heart, .lightbox.delivered #lb-heart { display: none; } /* nothing to select once delivered */
.menu-status .price { margin: .3rem 0 0; }
.menu-hint { margin: -0.25rem 0 0.25rem; padding: 0 var(--mi-pad) 0 calc(var(--mi-pad) + var(--mi-icon) + var(--mi-gap)); max-width: 20rem; }
.menu-item .chevron { margin-left: auto; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; opacity: .6; }
.menu-item[aria-expanded="true"] .chevron { transform: rotate(-135deg); }
/* Inside the menu, the download choices fold open under their item. */
/* The line runs under the middle of the icon; the choices' text starts where the items' text does. */
.dl-inmenu .dl-menu {
  position: static; transform: none; min-width: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; color: var(--text);
  margin: 0 0 .2rem calc(var(--mi-pad) + var(--mi-icon) / 2 - 1px); border-left: 2px solid var(--line);
}
.dl-inmenu .dl-choices a, .dl-inmenu .dl-pin { padding-left: calc(var(--mi-icon) / 2 - 1px + var(--mi-gap)); }
.dl-inmenu .dl-choices a:hover, .dl-inmenu .dl-choices a:focus-visible { background: var(--bg); }
.dl-inmenu .dl-choices small { color: var(--muted); }
.dl-inmenu .dl-pin label { color: var(--text); }
.dl-inmenu .dl-pin input { background: var(--bg); color: var(--text); border-color: var(--line); }
.dl-inmenu .dl-pin-error { color: var(--danger); }

/* Masonry columns: every photo keeps its own shape (--r = width/height).
   gallery.js places each tile in the shortest column, so the order reads
   left to right. Without JS, plain CSS columns are the fallback. */
.grid {
  --gap: 5px; /* thin lines between the photos */
  list-style: none; margin: 0; padding: 0;
  column-count: 3; column-gap: var(--gap);
}
@media (max-width: 600px) { .grid { column-count: 1; } } /* phones: one column, big photos */
.gallery.only-mine .tile:not(.selected) { display: none; }
.gallery.only-mine .photo-section.none-mine { display: none; }
/* Sections on the album page */
.photo-section + .photo-section { margin-top: 3rem; }
.section-title { margin: 0 0 1.25rem; text-align: center; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); scroll-margin-top: 5rem; }
.photo-section { scroll-margin-top: 5rem; } /* below the sticky toolbar when jumped to */
/* Section links as a menu: words side by side, the current one underlined. */
.section-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; }
.section-nav a {
  padding: .25rem 0; color: var(--muted); text-decoration: none; letter-spacing: .02em;
  background: linear-gradient(currentColor, currentColor) no-repeat center bottom / 0 1.5px;
  transition: color .15s ease, background-size .25s ease;
}
.section-nav a:hover, .section-nav a:focus-visible, .section-nav a[aria-current="true"] { color: var(--text); background-size: 100% 1.5px; }
@media (prefers-reduced-motion: reduce) { .section-nav a { transition: none; } }
.tile {
  --r: 1.5;
  position: relative; overflow: hidden; background: var(--line);
  aspect-ratio: var(--r); width: 100%;
  break-inside: avoid; margin-bottom: var(--gap);
}
.grid.masonry, .admin-grid.masonry { columns: auto; position: relative; }
.grid.masonry .tile, .admin-grid.masonry .admin-tile { position: absolute; margin: 0; }
.tile .open { all: unset; cursor: zoom-in; display: block; width: 100%; height: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
/* The bar along the bottom: heart and download, on hover; a chosen photo
   keeps it, with its heart filled. Touch screens show it always. */
.tile-bar {
  position: absolute; left: 6px; right: 6px; bottom: 6px; height: 2.75rem;
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  background: rgb(0 0 0 / .42); color: #fff;
  opacity: 0; transition: opacity .2s ease;
}
.tile:hover .tile-bar, .tile:focus-within .tile-bar, .tile.selected .tile-bar { opacity: 1; }
@media (hover: none) { .tile-bar { opacity: 1; } }
.tile:not([data-original]) .tile-bar:not(:has(.heart)), .gallery.delivered .tile:not([data-original]) .tile-bar { display: none; } /* nothing to show */
.tile-bar .heart, .tile-dl {
  all: unset; cursor: pointer; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; color: #fff;
}
.tile-bar .heart[aria-pressed=true] { background: none; color: #fff; }
.tile-bar .heart:disabled { cursor: default; opacity: .7; }
.tile-dl svg { width: 1.35rem; height: 1.35rem; }
.tile:not([data-original]) .tile-dl { display: none; }
.tile .others {
  position: absolute; left: .4rem; top: .4rem; max-width: calc(100% - .8rem);
  font-size: .75rem; padding: .15rem .5rem; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Heart */
.heart {
  position: absolute; right: .4rem; bottom: .4rem;
  width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); border: 0; color: #fff;
}
.heart:disabled { opacity: .7; }
.heart-icon { display: inline-block; width: 1.25rem; height: 1.25rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.5 1.1 5.3 3 1.8-1.9 3.2-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z' fill='none' stroke='black' stroke-width='2'/%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 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.5 1.1 5.3 3 1.8-1.9 3.2-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.heart[aria-pressed=true] { color: var(--heart); background: #fff; }
.heart[aria-pressed=true] .heart-icon, .heart-icon.on {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.5 1.1 5.3 3 1.8-1.9 3.2-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.5 1.1 5.3 3 1.8-1.9 3.2-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
}
.heart-icon.on { color: var(--heart); }
.heart.pop .heart-icon { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #0b0b0b; color: #f2f2f2; display: grid; grid-template-rows: 1fr auto; }
.lightbox[hidden] { display: none; }
.lightbox #lb-img { width: 100%; height: 100%; object-fit: contain; padding: max(env(safe-area-inset-top, 0px), 1rem) 3.5rem 0; min-height: 0; }
.lb-bar { padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px)); display: grid; gap: .35rem; text-align: center; }
.lb-filename { margin: 0; font-size: .8rem; color: #999; overflow-wrap: anywhere; }
.lb-filename:empty { display: none; }
.lb-others { margin: 0; font-size: .85rem; color: #bbb; }
.lb-others:empty { display: none; }
.lb-actions { display: flex; justify-content: center; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lb-btn { background: rgba(255,255,255,.1); color: #f2f2f2; border-color: rgba(255,255,255,.18); }
.lb-btn[hidden] { display: none; }
/* Download: a button with a small menu above it. */
.dl { position: relative; }
.dl-menu {
  position: absolute; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%); z-index: 20;
  min-width: 16rem; padding: .4rem; border-radius: 10px; text-align: left;
  background: #1f1f1f; border: 1px solid rgba(255,255,255,.15); box-shadow: 0 8px 30px rgb(0 0 0 / .5); color: #f2f2f2;
}
.dl-choices { display: grid; gap: .15rem; }
.dl-choices a { display: grid; gap: .1rem; padding: .55rem .7rem; border-radius: 7px; color: inherit; text-decoration: none; }
.dl-choices a:hover, .dl-choices a:focus-visible { background: rgba(255,255,255,.1); }
.dl-choices small { color: #aaa; font-size: .8rem; }
.dl-pin { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .5rem; padding: .4rem; }
.dl-pin label { color: #ddd; font-size: .85rem; }
.dl-pin input { letter-spacing: .2em; background: #111; color: #fff; border-color: rgba(255,255,255,.25); }
.dl-pin-error { grid-column: 1 / -1; margin: 0; color: #ff8a80; font-size: .85rem; }
.dl-menu[hidden], .dl-pin[hidden], .dl-choices[hidden], .dl-pin-error[hidden] { display: none; }
.pin-input { max-width: 10rem; letter-spacing: .15em; }
.heart.big { position: static; width: 3rem; height: 3rem; background: rgba(255,255,255,.12); }
.heart.big[aria-pressed=true] { background: #fff; }
.lb-pos { color: #999; font-size: .85rem; min-width: 4rem; }
.lb-nav, .lb-close { position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; border-radius: 50%; width: 3rem; height: 3rem; font-size: 1.8rem; padding: 0; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: .5rem; }
.lb-nav.next { right: .5rem; }
.lb-close { top: calc(.5rem + env(safe-area-inset-top, 0px)); right: .5rem; }
@media (max-width: 600px) {
  .lightbox #lb-img { padding: 3.5rem 0 0; }
  .lb-nav { top: auto; bottom: 5.5rem; transform: none; }
}

/* ---------- Admin ---------- */
.adminbar { display: flex; justify-content: space-between; align-items: center; padding: .9rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.adminbar .brand { text-decoration: none; font-weight: 600; }
.adminbar .brand span { color: var(--muted); font-weight: 400; }
.admin { margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; display: grid; gap: 1.25rem; }
.narrow-admin { max-width: 40rem; }
.admin > p { margin: 0; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; align-items: start; }
.tag { display: inline-block; font: 500 .75rem/1 var(--font); padding: .3rem .55rem; border-radius: 999px; background: var(--line); color: var(--muted); vertical-align: middle; }
.tag.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tag.new { background: color-mix(in srgb, var(--heart) 16%, transparent); color: var(--heart); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.list th { font-size: .8rem; color: var(--muted); font-weight: 500; }
.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .nowrap { white-space: nowrap; }
.list th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .3em; }
.list th button.sort:hover { color: var(--text); }
.list th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.list th button.sort::after { content: "↕"; opacity: .35; font-size: .9em; }
.list th[aria-sort="ascending"] button.sort::after { content: "↑"; opacity: 1; }
.list th[aria-sort="descending"] button.sort::after { content: "↓"; opacity: 1; }
.list th[aria-sort="ascending"], .list th[aria-sort="descending"] { color: var(--text); }
.list tfoot td { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

.selections { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.selections li { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.selections li:last-child { border-bottom: 0; }

.upload { margin-bottom: 1rem; display: grid; gap: .75rem; }
.dropzone { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; font-weight: 400; }
.dropzone.over { border-color: var(--heart); background: color-mix(in srgb, var(--heart) 6%, transparent); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { position: relative; height: 1.6rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .2s; }
.progress .label { position: relative; display: block; text-align: center; font-size: .8rem; line-height: 1.6rem; mix-blend-mode: difference; color: #fff; }
.upload-controls { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: .5rem; }
.upload-controls[hidden] { display: none; }
.upload-errors { margin: 0; padding-left: 1.2rem; color: var(--danger); }
.upload-errors:empty { display: none; }

.admin-grid { list-style: none; margin: 0; padding: 0; column-count: 4; column-gap: .75rem; }
@media (max-width: 900px) { .admin-grid { column-count: 3; } }
@media (max-width: 600px) { .admin-grid { column-count: 2; } }
.admin-tile { --r: 1.5; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: grid; break-inside: avoid; margin-bottom: .75rem; }
.admin-grid:not(.readonly, .final-grid) .admin-tile { cursor: grab; }
.admin-tile.dragging { opacity: .35; }
.admin-tile img { aspect-ratio: var(--r); object-fit: cover; width: 100%; }
.admin-tile a { display: block; }
.admin-tile-body { padding: .5rem; display: grid; gap: .4rem; font-size: .85rem; }
.admin-tile .filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.admin-tile input { padding: .35rem .5rem; font-size: .85rem; }
.selected-by { color: var(--heart); }
.actions-row { display: flex; gap: 1rem 2rem; flex-wrap: wrap; align-items: center; }
.clear-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.filenames { margin-bottom: .75rem; }

/* ---------- Logo (home, album password page, settings preview) ---------- */
.logo { display: block; height: var(--logo-h, 96px); width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 1rem; }
.logo.adaptive { filter: var(--logo-filter); }
.logo + h1 { text-align: center; }
.adminnav { display: flex; align-items: center; gap: 1.25rem; }
.adminnav form { margin: 0; }
.logo-preview { display: grid; place-items: center; min-height: 8rem; padding: 1.25rem; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg); }
.logo-preview .logo { margin: 0; }
.range-row { display: flex; align-items: center; gap: .75rem; }
.range-row input[type=range] { flex: 1; padding: 0; accent-color: var(--accent); }
.range-row output { min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Light/dark and NL/EN switches (top right) ---------- */
.theme-toggle, .lang-toggle {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover, .lang-toggle:hover { border-color: var(--muted); }
/* The language switch: a round flag that widens on hover/focus to say
   "Set language to: EN". The label stays in the page for screen readers. */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 2.25rem; padding: 0 .5rem; gap: 0;
  font-size: .8rem; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: padding .2s ease, gap .2s ease, transform .2s ease, box-shadow .2s ease;
}
.lang-toggle .flag { width: 1.15rem; height: 1.15rem; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line); }
.lang-toggle .lang-label { display: inline-block; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .25s ease, opacity .2s ease; }
.lang-toggle:hover, .lang-toggle:focus-visible { padding: 0 .85rem 0 .6rem; gap: .5rem; transform: scale(1.06); box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.lang-toggle:hover .lang-label, .lang-toggle:focus-visible .lang-label { max-width: 12rem; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lang-toggle, .lang-toggle .lang-label { transition: none; } }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .sun { display: var(--theme-sun); }
.theme-toggle .moon { display: var(--theme-moon); }
.theme-float { position: absolute; top: calc(.75rem + env(safe-area-inset-top, 0px)); right: .75rem; z-index: 6; display: flex; gap: .5rem; }

/* ---------- Download deterrents (albums without "allow downloads") ---------- */
/* The cover is above the gallery, so it's matched through body:has(). */
[data-protect] img, [data-protect] ~ .lightbox img, [data-protect] ~ .slideshow img, body:has([data-protect]) .album-cover img {
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; /* iOS: no "Save to Photos" on long press */
}
body.shielded [data-protect] img, body.shielded [data-protect] ~ .lightbox img, body.shielded [data-protect] ~ .slideshow img, body.shielded:has([data-protect]) .album-cover img {
  filter: blur(28px) grayscale(.5); transition: filter .08s;
}
@media print {
  body:has([data-protect]) .grid, body:has([data-protect]) .lightbox, body:has([data-protect]) .slideshow, body:has([data-protect]) .album-cover img { display: none !important; }
  body:has([data-protect])::after { content: "Printing the photos is not available for this album."; display: block; padding: 2rem; }
}

/* ---------- Watermark settings ---------- */
.wm-preview { border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); aspect-ratio: 3 / 2; }
.wm-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wm-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; width: 100%; }

/* ---------- Email: templates and signature ---------- */
.placeholders { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; display: grid; gap: .2rem; }
.placeholders code { color: var(--text); }
.template-item { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
.template-item summary { cursor: pointer; }
.template-item[open] summary { margin-bottom: .75rem; }
/* The signature preview is shown as in an email: on white, in black. */
.card-inset { margin-top: .35rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: #fff; color: #111; border: 1px solid var(--line); overflow-x: auto; color-scheme: light; }
.card-inset a { color: inherit; }
.field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.field-pair input[type="color"], input.color-input { width: 4rem; height: 2.4rem; padding: .15rem; }

/* ---------- Rich-text editor (textarea.rich, built by admin.js) ---------- */
.field { display: grid; gap: .35rem; }
.field > label { font-weight: 500; }
.field > small { color: var(--muted); }
.rich-editor { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.rich-editor:focus-within { border-color: var(--muted); }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.rich-toolbar button { min-width: 2.1rem; height: 2rem; padding: 0 .55rem; font-size: .85rem; border-radius: 6px; background: transparent; border: 1px solid transparent; color: var(--text); }
.rich-toolbar button:hover { border-color: var(--line); background: var(--surface); }
.rich-toolbar button[aria-pressed="true"] { background: var(--surface); border-color: var(--muted); }
.rich-area { min-height: 14rem; max-height: 32rem; overflow-y: auto; padding: .75rem .9rem; line-height: 1.5; outline: none; }
.rich-area p { margin: 0 0 .9em; }
.rich-area ul, .rich-area ol { margin: 0 0 .9em; padding-left: 1.5rem; }
.rich-area a { color: var(--accent); }

/* A card that folds open: <details class="card collapsible"><summary><h2>… */
.collapsible > summary { display: flex; align-items: center; gap: .75rem; cursor: pointer; list-style: none; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary h2 { margin: 0; }
.collapsible > summary::after { content: ""; margin-left: auto; width: .55rem; height: .55rem; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; }
.collapsible[open] > summary::after { transform: rotate(-135deg); }
.collapsible[open] > summary { margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) { .collapsible > summary::after { transition: none; } }
.tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.tile-actions form { margin: 0; }
.admin-tile.is-cover { outline: 2px solid var(--ok); outline-offset: -2px; }

/* ---------- Footer under the album page ---------- */
.site-footer { margin-top: 4rem; padding: 2.5rem 0 1rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); display: grid; gap: 20px; justify-items: center; }
.site-footer p { margin: 0; }
.footer-name { font-family: var(--font); font-size: 1.25rem; color: var(--text); }
.footer-logo { height: 3rem; width: auto; max-width: 60vw; object-fit: contain; margin-bottom: 2.4rem; }
.footer-logo.adaptive { filter: var(--logo-filter); }
.site-footer .legal-links { margin: 0; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .6rem; }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover, .footer-contact a:focus-visible { color: var(--text); text-decoration: underline; }
.footer-socials { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.footer-socials a { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); color: var(--text); transition: border-color .15s ease, background .15s ease; }
.footer-socials a:hover, .footer-socials a:focus-visible { border-color: var(--muted); background: var(--surface); }
.footer-socials svg { width: 1.15rem; height: 1.15rem; }

/* ---------- Sections (admin) ---------- */
.sections-box { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.sections-box summary { cursor: pointer; }
.sections-box[open] summary { margin-bottom: .75rem; }
.sections-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .4rem; }
.section-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.section-row input { flex: 1 1 12rem; }
.icon-btn { width: 2.1rem; height: 2.1rem; padding: 0; border-radius: 50%; }
.upload-section { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-weight: 400; }
.upload-section select { width: auto; }
.group-title { margin: 1.5rem 0 .6rem; font-size: 1.05rem; }
.group-title:first-child { margin-top: .5rem; }
.sections-list li { display: grid; gap: .3rem; }
/* A shoot type's paying settings, folded under its row. */
.type-paying { margin: 0 0 .4rem; }
.type-paying > summary { cursor: pointer; color: var(--muted); }
.type-paying > form { margin-top: .6rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); }
input.narrow { width: 6rem; flex: none; }
.bundles { border: 0; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bundles legend { padding: 0; font-weight: 600; }
.bundle-row { display: flex; align-items: center; gap: .5rem; }
.section-delete summary { cursor: pointer; width: max-content; list-style: none; }
.section-delete summary::-webkit-details-marker { display: none; }
.section-delete-options { display: grid; gap: .5rem; margin-top: .4rem; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; }
label.inline { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 400; }
label.inline select { width: auto; }
/* An empty section: a place to drop photos. */
.admin-grid:not(:has(.admin-tile)) { min-height: 5.5rem; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; }
.admin-grid:not(:has(.admin-tile))::before { content: attr(data-empty); color: var(--muted); font-size: .9rem; }
.dragging-photo .admin-grid { outline: 1px dashed transparent; }
.dragging-photo .admin-grid:hover { outline-color: var(--muted); outline-offset: 4px; }

/* Ticking photos to move several at once */
.admin-tile { position: relative; }
.tile-check {
  position: absolute; top: .4rem; left: .4rem; z-index: 2; display: grid; place-items: center;
  width: 1.8rem; height: 1.8rem; border-radius: 6px; background: rgb(255 255 255 / .85); box-shadow: 0 1px 4px rgb(0 0 0 / .2); cursor: pointer;
}
.tile-check input { margin: 0; }
.admin-tile:not(.picked) .tile-check { opacity: 0; transition: opacity .15s ease; }
/* Show the tick boxes on hover, and all of them once one is ticked. */
.admin-tile:hover .tile-check, .admin-tile .tile-check:focus-within, #admin-groups:has(.picked) .tile-check { opacity: 1; }
.admin-tile.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
#admin-groups .admin-tile img { cursor: pointer; } /* a click on the photo ticks it */
.select-group { margin-left: .5rem; font-weight: 400; }
.bulk-bar {
  position: sticky; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 10; margin: 1rem auto 0; width: max-content; max-width: 100%;
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; padding: .6rem .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 30px rgb(0 0 0 / .18);
}
.bulk-bar[hidden] { display: none; }
@media (hover: none) { .admin-tile .tile-check { opacity: 1; } } /* touch screens: always show the tick boxes */
/* Uploading files that are already in the album */
.upload-dupes { margin: .75rem 0; padding: .8rem 1rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.upload-dupes[hidden] { display: none; }
.upload-dupes p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }


/* ---------- Slideshow (full screen) ---------- */
.slideshow { --slide: 5s; --fade: 1.4s; position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; overflow: hidden; }
.slideshow[hidden] { display: none; }
.ss-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity var(--fade) ease-in-out;
}
.ss-img.on { opacity: 1; }
/* A slow zoom while a photo shows ("Ken Burns"), paused with the slideshow. */
.ss-img.zoom { animation: ss-zoom calc(var(--slide) + var(--fade)) ease-out forwards; }
@keyframes ss-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }

.ss-bar {
  position: absolute; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(32rem, calc(100% - 2rem)); display: flex; align-items: center; gap: .9rem;
  padding: .55rem .9rem .55rem .55rem; border-radius: 999px;
  background: rgb(0 0 0 / .45); backdrop-filter: blur(10px);
  transition: opacity .4s ease;
}
.ss-pause { flex: none; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 50%; border: 0; background: rgb(255 255 255 / .15); color: #fff; }
.ss-pause:hover, .ss-pause:focus-visible { background: rgb(255 255 255 / .28); }
.ss-pause svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.ss-pause .i-play, .slideshow.paused .ss-pause .i-pause { display: none; }
.slideshow.paused .ss-pause .i-play { display: block; }
.ss-progress { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .25); overflow: hidden; }
.ss-fill { height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
/* Pausing stops the bar and the zoom where they are. */
.slideshow.paused .ss-fill, .slideshow.paused .ss-img { animation-play-state: paused; }
.ss-pos { flex: none; font-size: .85rem; font-variant-numeric: tabular-nums; color: rgb(255 255 255 / .8); min-width: 3.5rem; text-align: right; }
.ss-close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem;
  width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; border: 0;
  background: rgb(0 0 0 / .45); color: #fff; font-size: 1.7rem; line-height: 1; transition: opacity .4s ease;
}
/* While the mouse rests the close button fades out and the bar dims. */
.slideshow.idle { cursor: none; }
.slideshow.idle .ss-close { opacity: 0; }
.slideshow.idle:not(.paused) .ss-bar { opacity: .35; }
@media (prefers-reduced-motion: reduce) {
  .slideshow { --fade: .3s; }
  .ss-img.zoom { animation: none; }
}

/* ---------- Overview ---------- */
.overview { width: 100%; border-collapse: collapse; }
.overview th, .overview td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.overview .num { text-align: right; font-variant-numeric: tabular-nums; }
.overview .album-rows > td { padding-top: 0; }
.overview.albums { margin: .4rem 0 .6rem; font-size: .92em; }
.overview.albums th, .overview.albums td { padding: .35rem .5rem; }
@media (max-width: 640px) { .overview { display: block; overflow-x: auto; } }

/* A rule inside a card, in the theme's line colour. */
.card hr { border: 0; border-top: 1px solid var(--line); margin: .25rem 0; }

/* The cover's arrow glides down to the photos. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- The ☰ menu, in a quiet style ----------
   Square, a thin line around it and no shadow; grey text that darkens on
   hover, thin icons; the selection count at the bottom under a thin line;
   the button two thin lines that turn into a thin cross. */
.menu-btn { border: 0; background: none; color: var(--muted); }
.menu-btn:hover { color: var(--text); background: none; }
.burger { width: 1.5rem; height: 0; background: transparent; }
.burger::before, .burger::after { width: 1.5rem; height: 1px; border-radius: 0; }
.burger::before { top: -4px; }
.burger::after { top: 4px; }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::after { transform: translateY(-4px) rotate(-45deg); }
.menu-panel {
  --mi-pad: 0; --mi-gap: .85rem;
  top: calc(100% + .75rem); min-width: 18rem; padding: 1rem 1.5rem;
  border-radius: 0; box-shadow: none; border: 1px solid var(--line);
}
.menu-item { padding: .7rem 0; border-radius: 0; color: var(--muted); font-size: .9rem; letter-spacing: .01em; }
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: none; color: var(--text); }
.menu-item .mi-icon { stroke-width: 1.4; }
.menu-status {
  order: 99; margin: .5rem 0 0; padding: 1rem 0 .25rem;
  border-bottom: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.menu-status .count { display: flex; align-items: center; gap: .5rem; }
.menu-status .count .heart-icon { order: 2; color: var(--muted); }
.menu-status .count strong { order: 1; margin-left: auto; font-weight: 400; }
.dl-inmenu .dl-choices a { border-radius: 0; }
.dl-inmenu .dl-choices a:hover, .dl-inmenu .dl-choices a:focus-visible { background: none; color: var(--text); }
/* The slideshow button in the same quiet style: no box, grey text that
   darkens on hover, a thin play sign. */
.slideshow-btn {
  border: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; padding: 0 .9rem; height: 2.25rem;
  color: var(--muted); font-size: .9rem; font-weight: 400; letter-spacing: .01em;
}
.slideshow-btn:hover, .slideshow-btn:focus-visible { background: none; color: var(--text); border-color: var(--muted); }
.slideshow-btn > span[aria-hidden] { font-size: .75em; }

/* ---------- The bar's actions, side by side ----------
   Each a thin icon and grey text that darkens on hover; on a phone only
   the icon. A quiet status line runs under the bar. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bar-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: nowrap; justify-content: flex-end; } /* all on one line */
.bar-actions form { margin: 0; }
.bar-btn {
  display: inline-flex; align-items: center; gap: .45rem; height: 2.25rem; padding: 0;
  border: 0; border-radius: 0; background: none; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 400; letter-spacing: .01em; cursor: pointer; white-space: nowrap;
}
.bar-btn:hover:not(:disabled), .bar-btn:focus-visible { color: var(--text); background: none; }
.bar-btn:disabled { opacity: .4; cursor: not-allowed; }
.bar-icon { width: 1.15rem; height: 1.15rem; flex: none; }
.bar-count { font-variant-numeric: tabular-nums; }
#only-mine[aria-pressed="true"] { color: var(--text); }
#only-mine[aria-pressed="true"] .bar-icon { fill: currentColor; }
/* The download choices fold out under the button. */
.dl-bar { position: relative; }
.dl-bar .dl-menu {
  position: absolute; top: calc(100% + .6rem); bottom: auto; right: 0; left: auto; transform: none; z-index: 20;
  min-width: 17rem; padding: .75rem 1rem; border-radius: 0; box-shadow: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.dl-bar .dl-choices a { border-radius: 0; padding: .55rem 0; }
.dl-bar .dl-choices a:hover, .dl-bar .dl-choices a:focus-visible { background: none; color: var(--muted); }
.dl-bar .dl-choices small { color: var(--muted); }
.dl-bar .dl-pin label { color: var(--text); }
.dl-bar .dl-pin input { background: var(--bg); color: var(--text); border-color: var(--line); }
.dl-bar .dl-pin-error { color: var(--danger); }
/* Where the selection stands: a small box under "My selection", shown on
   hover or keyboard focus. Once delivered it simply stays under the bar. */
.mine-wrap { position: relative; display: flex; align-items: center; }
.bar-status {
  position: absolute; top: calc(100% + .6rem); right: 0; z-index: 20; width: max-content; max-width: min(24rem, 90vw);
  display: grid; gap: .35rem; padding: .75rem 1rem; color: var(--muted); font-size: .85rem; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line);
  visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility .15s;
}
.mine-wrap:hover .bar-status:not(.under), .mine-wrap:focus-within .bar-status:not(.under) { visibility: visible; opacity: 1; }
.bar-status.under { visibility: visible; opacity: 1; border: 0; background: none; padding: .25rem 0; }
.bar-status:not(:has(> :not(.sr-only))) { display: none; }
@media (max-width: 760px) {
  .bar-actions .bar-label { display: none; } /* icons only */
  .bar-actions { gap: .25rem 1rem; }
}
/* One line for the whole bar: the side columns take what they need, the
   section links get the rest (and scroll if they don't fit). */
@media (min-width: 601px) {
  .toolbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .toolbar .section-nav { justify-self: center; }
}
.bar-right { flex-wrap: nowrap; gap: 1.25rem; }
@media (max-width: 1100px) { .bar-actions .bar-label { display: none; } } /* narrower: icons only */
.bar-btn.icon-only .bar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* the name shows on hover */
.field-note { margin: 0; display: grid; gap: .15rem; }
.footer-legal { margin: 0; color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; }
.legal-links { margin: .5rem 0 0; font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; }
.legal-links a { color: inherit; }
/* The panel before paying: amount, the box to tick, the terms, pay. */
#submit-form { position: relative; }
.pay-consent {
  position: absolute; top: calc(100% + .6rem); right: 0; z-index: 20; width: min(24rem, 90vw);
  display: grid; gap: .75rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); font-size: .9rem;
}
.pay-consent[hidden] { display: none; }
.pay-consent .pay-amount { margin: 0; }
.pay-consent label.check { display: flex; flex-direction: row; align-items: flex-start; gap: .6rem; color: var(--text); font-weight: 400; }
.pay-consent label.check input { margin-top: .2rem; flex: none; }
.pay-consent .legal-links { justify-content: flex-start; margin: 0; }
/* Email page: the signature and the payment confirmation side by side, half each. */
.email-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .email-cols { grid-template-columns: 1fr; } }
.placeholders.inline { display: flex; flex-wrap: wrap; gap: .2rem .4rem; padding-left: 0; font-size: .8rem; }
/* Narrow screens: the bar's pop-up panels (paying, the download choices,
   where the selection stands) would run off the edge under their button,
   so they open right under the bar, across its width, instead: their
   wrappers stop being their reference, the sticky bar takes over. */
@media (max-width: 600px) {
  .mine-wrap, .dl-bar, #submit-form { position: static; }
  .pay-consent, .dl-bar .dl-menu, .bar-status:not(.under) {
    position: absolute; top: calc(100% + .25rem); left: 0; right: 0; width: auto; max-width: none; z-index: 30;
    box-shadow: 0 8px 30px rgb(0 0 0 / .15);
  }
}
/* The consent: box and "I agree to the terms" on one line, the rest under
   it; all of it one label, so clicking anywhere ticks the box. */
.consent-label { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; align-items: baseline; cursor: pointer; color: var(--text); font-weight: 400; }
.consent-label input { margin: 0; align-self: center; }
.consent-lead { font-weight: 500; }
.consent-rest { grid-column: 2; color: var(--muted); }
/* The admin bar shows the logo top left; Settings previews the favicon. */
.adminbar .brand { display: inline-flex; align-items: center; gap: .4rem; }
.brand-logo { height: 1.9rem; width: auto; max-width: 12rem; object-fit: contain; }
.brand-logo.adaptive { filter: var(--logo-filter); }
.favicon-preview { width: 2rem; height: 2rem; object-fit: contain; border: 1px solid var(--line); }

/* ---------- Admin menu: buttons; on a phone a ☰ dropdown ---------- */
.adminbar { position: relative; gap: 1rem; }
.adminnav { gap: .4rem; }
.nav-btn {
  display: inline-flex; align-items: center; height: 2.75rem; padding: 0 .85rem; margin: 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted);
  font: inherit; font-size: .92rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nav-btn:hover, .nav-btn:focus-visible { color: var(--text); background: none; }
.nav-btn[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--brand-line); }
.nav-signout { color: var(--muted); }
.nav-toggles { display: inline-flex; align-items: center; gap: .4rem; margin-left: .4rem; }
.adminnav-toggle { display: none; }
@media (max-width: 760px) {
  .adminnav-toggle {
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
    border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text);
  }
  .adminnav-toggle[aria-expanded="true"] .burger { background: transparent; }
  .adminnav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
  .adminnav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }
  .adminnav {
    display: grid; gap: .4rem; position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
    padding: .75rem clamp(1rem, 3vw, 2rem) 1rem; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 30px rgb(0 0 0 / .12);
  }
  .js-adminnav .adminnav:not(.open) { display: none; }
  .adminnav .nav-btn, .adminnav form, .adminnav form .nav-btn { width: 100%; justify-content: flex-start; height: 2.75rem; }
  .nav-toggles { margin: .3rem 0 0; }
}

/* ---------- The start page ---------- */
.start { max-width: 1280px; display: flex; flex-direction: column; gap: clamp(72px, 10vw, 144px); padding-top: clamp(40px, 6vw, 80px); padding-bottom: 160px; }
.start h2 { font-family: var(--font); font-size: 2rem; font-weight: 600; line-height: 1.2; margin: 0; }
.start-hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: calc(-1 * clamp(24px, 10vw - 56px, 88px)); }
.start-hello h1 { margin: 0 0 .35rem; font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 2.75rem); line-height: 1.1; }
.start-hello p { margin: 0; }
.button.accent { display: inline-flex; align-items: center; gap: .5rem; height: 2.75rem; padding: 0 1.4rem;
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; text-decoration: none; }
.button.accent:hover { filter: brightness(1.15); }
.start-section { display: flex; flex-direction: column; gap: 1rem; }
.start-sub { margin: -.5rem 0 0; }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.todo-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-decoration: none; }
.todo-card:hover { border-color: var(--muted); }
.todo-kind { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.todo-count { font-family: "Antic Didone", var(--serif); font-size: 2.5rem; line-height: 1; margin-bottom: 1.1rem; }
.todo-title { font-weight: 600; }
.todo-detail { color: var(--muted); font-size: .9rem; }
.start-filters { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); }
.status-filters { display: flex; flex-wrap: wrap; gap: .1rem; }
.status-filters a { display: inline-flex; align-items: center; gap: .35rem; height: 2.6rem; padding: 0 .75rem; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .9rem; }
.status-filters a:hover { color: var(--text); }
.status-filters a[aria-current] { color: var(--text); font-weight: 600; border-bottom-color: var(--brand-line); }
.status-filters a span { color: var(--muted); font-weight: 400; }
.type-filter { display: flex; align-items: center; gap: .5rem; padding-bottom: .4rem; margin: 0; }
.type-filter label { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; color: var(--muted); font-weight: 400; }
.type-filter select { width: auto; padding: .4rem .6rem; }
.js .no-js-only { display: none; }
.album-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.album-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); text-decoration: none; }
.album-card:hover { border-color: var(--muted); }
.album-card-image { position: relative; aspect-ratio: 3 / 2; background: var(--line); }
.album-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-card-tags { position: absolute; right: .8rem; bottom: .8rem; display: flex; gap: .35rem; }
.album-card-tags span { padding: .3rem .6rem; font-size: .75rem; font-weight: 600; }
.tag-step { background: #fff; color: #1d1b19; }
.tag-closes { background: var(--brand); color: #fff; }
.album-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.15rem; }
.album-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.album-card-head strong { font-size: 1.05rem; }
.album-card-head time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.step-bar { display: flex; gap: 3px; margin-top: .35rem; }
.step-bar span { flex: 1; height: 3px; background: var(--line); }
.step-bar span.on { background: var(--brand-line); }
.start-month { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem; }
.start-month h2 { font-size: 1.5rem; }
.start-month p { margin: 0; display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; }
.start-month .big { font-family: "Antic Didone", var(--serif); font-size: 1.9rem; line-height: 1; color: var(--text); }

/* ---------- The Albums page ---------- */
.albums-page { max-width: 1280px; display: flex; flex-direction: column; gap: 2rem; padding-top: clamp(40px, 6vw, 80px); padding-bottom: 160px; }
.albums-page .start-hello { margin-bottom: 0; }
.albums-tools { display: flex; flex-direction: column; gap: .9rem; }
.albums-search { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; }
.search-field { flex: 1 1 320px; display: flex; align-items: center; gap: .6rem; height: 2.75rem; margin: 0; padding: 0 .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-weight: 400; }
.search-field input { flex: 1; min-width: 0; border: 0; padding: 0; background: none; outline: 0; }
.search-field:focus-within { border-color: var(--muted); }
.type-pick { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; color: var(--muted); font-weight: 400; }
.type-pick select { width: auto; height: 2.75rem; padding: 0 .6rem; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.view-switch a { display: grid; place-items: center; width: 2.75rem; height: 2.65rem; color: var(--text); }
.view-switch a[aria-current] { background: var(--accent); color: var(--accent-text); }
.albums-tools .status-filters { border-bottom: 1px solid var(--line); }
.album-year { display: flex; flex-direction: column; gap: .9rem; }
.album-year h2 { margin: 0; display: flex; align-items: baseline; gap: .75rem; font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: 2rem; }
.album-year h2 span { font-family: var(--font); font-size: .9rem; color: var(--muted); }
.album-rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.album-row { position: relative; display: grid; align-items: center; gap: 1.25rem; padding: .75rem 1.25rem;
  grid-template-columns: 72px minmax(10rem, 2fr) 9rem minmax(7rem, 1fr) minmax(10rem, 1.3fr) 6rem minmax(10rem, 1fr); }
.album-row + .album-row { border-top: 1px solid var(--line); }
.album-row:hover { background: color-mix(in srgb, var(--surface) 92%, var(--text)); }
.album-row-thumb { width: 72px; height: 48px; background: var(--line); border-radius: 4px; overflow: hidden; }
.album-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-row-title { display: flex; flex-direction: column; min-width: 0; }
.album-row-title strong, .album-row-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-row-date, .album-row-type, .album-row-photos { font-size: .9rem; }
.album-row-photos { text-align: right; color: var(--muted); }
.album-row-status { display: flex; flex-direction: column; gap: .4rem; }
.album-row-status .status-name { font-size: .85rem; font-weight: 600; }
.album-row-status .step-bar { width: 8rem; margin: 0; }
/* The title's link covers the whole row or card; the copy button stays above it. */
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; }
.album-card { position: relative; }
.album-row.inactive .status-name, .album-card.inactive .tag-step { color: var(--muted); }
.album-row.inactive .step-bar span.on, .album-card.inactive .step-bar span.on { background: var(--muted); }
.album-password { position: relative; z-index: 1; font-size: .85rem; color: var(--muted); min-height: 1.75rem; display: flex; align-items: center; }
.pw-shown { display: none; align-items: center; gap: .5rem; }
.pw-shown code { color: var(--text); }
.album-row:hover .pw-hidden, .album-row:focus-within .pw-hidden, .album-card:hover .pw-hidden, .album-card:focus-within .pw-hidden { display: none; }
.album-row:hover .pw-shown, .album-row:focus-within .pw-shown, .album-card:hover .pw-shown, .album-card:focus-within .pw-shown { display: inline-flex; }
@media (hover: none) { .pw-hidden { display: none; } .pw-shown { display: inline-flex; } }
.copy-pw { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.copy-pw.copied { border-color: var(--ok); color: var(--ok); }
.albums-storage { margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .9rem; }
@media (max-width: 760px) {
  .album-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: .35rem .9rem; padding: .75rem 1rem; }
  .album-row-thumb { grid-row: span 3; width: 64px; height: 64px; }
  .album-row-date, .album-row-type, .album-row-photos { display: none; }
  .album-row-status { grid-column: 2; }
  .album-row .album-password { grid-column: 2 / -1; }
}

/* ---------- Settings: a column with title and menu, cards beside it ---------- */
.settings { max-width: 1280px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(1rem, 3vw, 2.5rem) 160px;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 3rem; }
.settings-side { flex: 1 1 220px; max-width: 260px; position: sticky; top: 2rem; display: flex; flex-direction: column; gap: 2rem; }
.settings-back { display: inline-flex; align-self: flex-start; align-items: center; gap: .35rem; margin: 0 0 -1rem; color: var(--muted); text-decoration: none; font-size: .9rem; }
.settings-back:hover { color: var(--text); }
.settings-head h1 { margin: 0; font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: 2.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: block; padding: .45rem .75rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .9rem; }
.settings-nav a:not(.sub) + a:not(.sub), .settings-nav a.sub + a:not(.sub) { margin-top: .6rem; }
.settings-nav a:hover { color: var(--text); }
.settings-nav a.on { color: var(--text); font-weight: 600; border-left-color: var(--brand-line); }
.settings-nav a.sub { padding-left: 1.5rem; font-size: .82rem; }
.settings-main { flex: 999 1 560px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 2rem; }
.settings-stack { display: flex; flex-direction: column; gap: 2rem; margin: 0; }
.settings-card { display: flex; flex-direction: column; gap: 1.25rem; margin: 0; padding: 2rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 2rem; }
.settings-card h2 { margin: 0; font-family: var(--font); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.settings-card .lead { margin: -.75rem 0 0; color: var(--muted); font-size: .9rem; }
.settings-card .card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.settings-card .card-head .lead { margin-top: .5rem; }
.settings-card .card-head .button { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.settings-card .field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.settings-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0; }
.js .form-save { display: none; }
.brand-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.image-drop { display: grid; place-items: center; min-height: 120px; padding: 1rem; background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; }
.favicon-drop .favicon-preview { width: 3rem; height: 3rem; }
.file-button { display: inline-flex; align-items: center; width: max-content; height: 2.5rem; padding: 0 1rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); font-weight: 400; font-size: .9rem; cursor: pointer; }
.file-button:hover { border-color: var(--muted); }
.file-button input[type=file] { width: 0; height: 0; opacity: 0; position: absolute; }
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-rows { display: flex; flex-direction: column; }
.legal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 0; margin: 0; }
.legal-row + .legal-row { border-top: 1px solid var(--line); }
.legal-name { display: flex; flex-direction: column; gap: .15rem; }
.legal-actions { display: flex; align-items: center; gap: .5rem; }
.type-list { display: flex; flex-direction: column; overflow-x: auto; }
.type-row { position: relative; display: grid; grid-template-columns: minmax(10rem, 1.5fr) minmax(7rem, 1fr) minmax(9rem, 1fr) minmax(8rem, 1fr) auto;
  align-items: center; gap: 1rem; min-width: 640px; padding: .9rem .25rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.type-row:not(.type-head):hover { background: color-mix(in srgb, var(--surface) 94%, var(--text)); }
.type-head { padding-top: 0; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.type-name { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .5rem; }
.type-name small { flex-basis: 100%; }
.type-move { position: relative; z-index: 1; display: flex; gap: .25rem; margin: 0; }
.pill { display: inline-flex; align-items: center; height: 1.35rem; padding: 0 .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: color-mix(in srgb, var(--brand-line) 14%, transparent); color: var(--brand-line); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.choices.stacked { grid-template-columns: minmax(0, 1fr); }
.choice { display: flex; gap: .75rem; align-items: flex-start; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px;
  font-weight: 400; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand-line); background: color-mix(in srgb, var(--brand-line) 6%, var(--surface)); }
.choice input { margin-top: .2rem; accent-color: var(--brand); }
.choice strong { display: block; margin-bottom: .15rem; }
.choice span span { color: var(--muted); font-size: .9rem; }
.bundle-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.link-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem .25rem; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none; }
.link-list a:hover { background: color-mix(in srgb, var(--surface) 94%, var(--text)); }
.link-list a > span { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.link-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signature-grid, .watermark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.chip { display: inline-flex; align-items: center; height: 1.75rem; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: .8rem; color: var(--brand-line); }

/* The save bar: across the bottom of the screen, in burgundy, hard to miss. */
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--brand); color: #fff; box-shadow: 0 -12px 32px rgb(80 21 32 / .28); }
.savebar[hidden] { display: none; }
.savebar-inner { max-width: 1280px; margin: 0 auto; padding: 1.1rem clamp(1rem, 3vw, 2.5rem); display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem; }
.savebar-text { display: flex; align-items: center; gap: .9rem; }
.savebar-text > span:last-child { display: flex; flex-direction: column; gap: .1rem; }
.savebar-text strong { font-size: 1rem; }
.savebar-text > span:last-child span { font-size: .9rem; color: rgb(255 255 255 / .8); }
.savebar-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgb(255 255 255 / .16); }
.savebar-actions { display: flex; gap: .6rem; }
.savebar-cancel { height: 3rem; padding: 0 1.25rem; border: 1px solid rgb(255 255 255 / .45); border-radius: 8px; background: none; color: #fff; }
.savebar-save { height: 3rem; padding: 0 1.75rem; border: 0; border-radius: 8px; background: #fff; color: var(--brand); font-weight: 700; }
.savebar-save:disabled { opacity: .6; }
.has-savebar .settings { padding-bottom: 220px; }

@media (max-width: 760px) {
  .settings { gap: 1.5rem; }
  .settings-side { position: static; max-width: none; gap: 1rem; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; gap: .25rem; }
  .settings-nav a { border-left: 0; border-bottom: 2px solid transparent; padding: .5rem .6rem; }
  .settings-nav a.on { border-bottom-color: var(--brand-line); }
  .settings-nav a.sub { display: none; }
  .settings-nav a:not(.sub) + a:not(.sub), .settings-nav a.sub + a:not(.sub) { margin-top: 0; }
  .settings-card { padding: 1.25rem; }
}
.settings [hidden] { display: none !important; }
.choice input[type=radio] { width: auto; flex: none; }
.settings-card .field > .danger-link, .settings-card .field > .file-button { align-self: flex-start; }
.notice-text { color: var(--ok); }
.error-text { color: var(--danger); }
.settings-foot form { margin: 0; }
.test-send { flex: 1; display: flex; align-items: center; gap: .9rem; min-width: 0; }
.test-send .button { flex: none; }

/* In the admin the rounded buttons wear the burgundy of "New album". */
:is(.admin, .settings) :is(.button, button.primary, .button.primary):not(.accent) {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
:is(.admin, .settings) :is(.button, button.primary):not(.accent):hover { filter: brightness(1.15); }
:is(.admin, .settings) :is(.button, button.primary):disabled { filter: none; }
.settings-card .card-head { flex-wrap: nowrap; }
.settings-card .card-head > div { flex: 1; min-width: 0; }
.settings-card .card-head > .button { flex: none; }

/* ---------- An album's page: the album on the left, its tabs on the right ---------- */
.admin-album .settings-side { max-width: 280px; gap: 1.4rem; }
.admin-album .settings-main { max-width: none; }
.admin-album .settings-head h1 { font-size: 2.25rem; }
.admin-album .settings-head .small { display: block; margin-top: .35rem; }
.album-side-cover { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: var(--line); }
.album-side-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-side-status { display: flex; flex-direction: column; }
.album-side-status .status-name { font-size: .85rem; font-weight: 600; }
.album-side-status .step-bar { margin: 0; }
.album-side-status.inactive .status-name { color: var(--muted); }
.album-side-status.inactive .step-bar span.on { background: var(--muted); }
.album-side-actions { display: flex; gap: .5rem; margin-top: 2.5rem; }
.album-side-actions .button { flex: 1 1 0; min-width: 0; justify-content: center; gap: .45rem; padding-inline: .6rem; }
.album-side-rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
:is(.admin, .settings) .button.ghost:not(.accent):not(.primary) { background: var(--surface); color: var(--brand-line); border-color: var(--brand-line); }
.admin-album .settings-nav a { display: flex; justify-content: space-between; gap: .5rem; }
.admin-album .settings-nav a span { color: var(--muted); font-weight: 400; font-size: .82rem; }
.admin-album .settings-nav a + a { margin-top: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 10px; }
.stat b { font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .82rem; }
.person-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .9rem .25rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.muted-pill { background: var(--bg); color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); border-radius: 10px; }
.checklist li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.checklist li::before { content: ""; flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); }
.checklist li.done::before { content: "✓"; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .8rem; }
/* The album's steps in its left column: the step it is at stands out. */
.side-steps { padding: .85rem 1rem; gap: .45rem; }
.side-steps li { font-size: .85rem; color: var(--muted); }
.side-steps li.done { color: var(--text); }
.side-steps li.current { font-weight: 600; }
.side-steps li::before { width: 1.15rem; height: 1.15rem; }
.album-side-status.inactive .side-steps { opacity: .55; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.danger-zone h2 { color: var(--danger); }
.danger-button { display: inline-flex; align-items: center; height: 2.5rem; padding: 0 1.1rem; border: 1px solid var(--danger); border-radius: 999px; color: var(--danger); text-decoration: none; }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
/* The album's on/off settings as switches. */
.album-settings label.check { position: relative; display: block; padding: 1rem 3.5rem 1rem 0; border-top: 1px solid var(--line); font-weight: 600; }
.album-settings label.check small { display: block; font-weight: 400; margin-top: .15rem; }
.album-settings label.check input[type=checkbox] { appearance: none; position: absolute; right: 0; top: 1rem; width: 2.75rem; height: 1.6rem; margin: 0;
  border-radius: 999px; background: var(--line); cursor: pointer; transition: background .15s; }
.album-settings label.check input[type=checkbox]::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: left .15s; }
.album-settings label.check input[type=checkbox]:checked { background: var(--brand); }
.album-settings label.check input[type=checkbox]:checked::after { left: 1.35rem; }
.album-settings label.check input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
.album-settings label.check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-album .admin-grid { margin-top: .5rem; }
@media (max-width: 760px) {
  .admin-album .settings-side { max-width: none; }
  .album-side-cover { display: none; }
}
.admin-album { max-width: calc(1280px + 2 * clamp(1rem, 3vw, 2.5rem)); }
.admin-album .settings-side { flex: 0 0 280px; }
@media (max-width: 760px) { .admin-album .settings-side { flex: 1 1 100%; } }

/* The Photos tab: sections as buttons, actions on the photo. */
.section-pills { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sec-pill { display: inline-flex; align-items: center; gap: .4rem; height: 2.15rem; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; text-decoration: none; cursor: pointer; list-style: none; }
.sec-pill::-webkit-details-marker { display: none; }
.sec-pill span { color: var(--muted); }
.sec-pill.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.sec-pill.on span { color: inherit; opacity: .7; }
.sec-add { border-style: dashed; color: var(--muted); }
.section-manage { margin: 0; padding: 0; border: 0; background: none; }
.section-manage[open] { flex-basis: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.section-manage[open] > .sec-add { margin-bottom: .75rem; }
.js .upload-section { display: none; }
.admin-tile { position: relative; }
.cover-badge { position: absolute; z-index: 2; left: .5rem; top: .5rem; padding: .2rem .65rem; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 600; pointer-events: none; }
.admin-album .admin-tile .admin-tile-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: .35rem;
  padding: 1.5rem .5rem .5rem; background: linear-gradient(transparent, rgb(0 0 0 / .55)); opacity: 0; transition: opacity .15s; }
.admin-album .admin-tile:hover .admin-tile-body, .admin-album .admin-tile:focus-within .admin-tile-body { opacity: 1; }
.admin-album .admin-tile .filename { color: #fff; font-size: .72rem; }
.admin-album .admin-tile .tile-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.admin-album .admin-tile .tile-actions form { margin: 0; }
.tile-btn { height: 1.75rem; padding: 0 .6rem; border: 0; border-radius: 999px; background: rgb(255 255 255 / .92); color: #1d1b19; font-size: .72rem; }
.tile-btn.danger-text { color: var(--danger); }
.admin-album .admin-grid.readonly .admin-tile-body { position: static; opacity: 1; background: none; padding: .4rem 0 0; }
.admin-album .admin-grid.readonly .filename { color: var(--muted); }
@media (hover: none) { .admin-album .admin-tile .admin-tile-body { opacity: 1; } }
/* The Selection tab's photos. */
.pill-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.photo-sets { margin-bottom: -.5rem; }
.photo-sets .sec-pill { font-size: 1rem; padding: .5rem 1.1rem; }
.sec-pill.disabled { opacity: .45; cursor: not-allowed; }
.chosen-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.chosen-grid li { aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--line); }
.chosen-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chosen-block + .chosen-block { margin-top: 1rem; }
.js .chosen-block + .chosen-block { margin-top: 0; }

/* ---------- Overview: a year in numbers ---------- */
.overview-page { max-width: 1280px; display: flex; flex-direction: column; gap: 2rem; padding-top: clamp(40px, 6vw, 80px); padding-bottom: 160px; }
.overview-page .start-hello { margin-bottom: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.kpi b { font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: 2.5rem; line-height: 1; }
.kpi-label { font-weight: 600; font-size: .9rem; }
.kpi-compare { color: var(--muted); font-size: .82rem; }
.month-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .6rem; align-items: end; height: 240px; }
.month { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .35rem; height: 100%; min-width: 0; }
.month-amount { font-size: .72rem; color: var(--text); white-space: nowrap; }
.month-bar { width: 100%; max-width: 44px; background: var(--brand-line); border-radius: 4px 4px 0 0; }
.month-name { font-size: .75rem; color: var(--muted); padding-top: .35rem; border-top: 1px solid var(--line); width: 100%; text-align: center; }
.table-scroll { overflow-x: auto; }
.otype-row, .oalbum-row { display: grid; align-items: center; gap: 1rem; padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--text); text-decoration: none; }
.otype-row { grid-template-columns: minmax(9rem, 1.4fr) 5rem 7rem 7rem 7rem minmax(9rem, 1fr); min-width: 760px; }
.oalbum-row { grid-template-columns: minmax(10rem, 1.6fr) 8rem 8rem 5rem 4.5rem 6rem 5.5rem; min-width: 820px; }
:is(.otype-row, .oalbum-row).head { padding-top: 0; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
a:is(.otype-row, .oalbum-row):hover { background: color-mix(in srgb, var(--surface) 94%, var(--text)); }
.otype-row.on { background: color-mix(in srgb, var(--brand-line) 6%, var(--surface)); }
.num { text-align: right; }
.share-bar { display: flex; align-items: center; gap: .5rem; }
.share-bar > span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.share-bar > span > span { display: block; height: 100%; background: var(--brand-line); }
.share-bar small { width: 2.5rem; text-align: right; color: var(--muted); }
@media (max-width: 760px) { .month-amount { display: none; } }

/* The curator seeing an album as its client: a bar on top, nothing to change. */
.view-only-bar { position: relative; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .7rem clamp(1rem, 3vw, 2.5rem); background: var(--brand); color: #fff; font-size: .9rem; }
.view-only-bar a { color: #fff; font-weight: 600; }

/* Signing out: a round button beside the language and theme switches. */
.signout-form { display: inline-flex; margin: 0; }
.theme-toggle.signout svg { width: 1.05rem; height: 1.05rem; }
.settings-card fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.settings-card fieldset.field legend { padding: 0; margin-bottom: .5rem; font-weight: 600; font-size: .9rem; }

/* ---------- The admin on a phone ---------- */
.btn-icon { flex: none; }
.album-side-actions .btn-icon { display: block; }
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: block; } }
@media (max-width: 760px) {
  /* Swipeable round buttons for the settings' and an album's parts. */
  .settings-nav, .admin-album .settings-nav { flex-direction: row; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * clamp(1rem, 3vw, 2.5rem)); padding: 0 clamp(1rem, 3vw, 2.5rem) .25rem; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a, .admin-album .settings-nav a { flex: none; display: inline-flex; align-items: center; gap: .35rem; height: 2.4rem; padding: 0 1rem;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; margin: 0 !important; }
  .settings-nav a.on, .admin-album .settings-nav a.on { background: var(--text); border-color: var(--text); color: var(--surface); border-bottom-color: var(--text); }
  .settings-nav a.on span { color: inherit; opacity: .7; }
  .settings-head h1 { font-size: 2rem; }
  .settings { padding-top: 1.5rem; }

  /* An album: a compact head (small cover, title, status, two icon buttons). */
  .admin-album .settings-side { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: .5rem .85rem; }
  .admin-album .album-side-cover { display: block; grid-row: span 2; width: 64px; height: 64px; aspect-ratio: auto; border-radius: 8px; }
  .admin-album .settings-head { min-width: 0; }
  .admin-album .settings-head h1 { font-size: 1.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-album .settings-head .small { margin-top: .15rem; }
  .admin-album .album-side-status { grid-column: 2; }
  .admin-album .album-side-actions { grid-column: 3; grid-row: 1 / span 2; flex-direction: row; gap: .4rem; }
  .admin-album .album-side-actions .button { width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%; }
  .admin-album .album-side-actions .btn-icon { display: block; }
  .admin-album .album-side-actions .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin-album .settings-nav { grid-column: 1 / -1; margin-top: .5rem; }
  .admin-album .album-side-rule { display: none; }
  .admin-album .album-side-actions { margin-top: 0; }
  .admin-album .album-side-actions .button { flex: none; }
  .admin-album .settings-main > .settings-back { display: none; }
  .admin-album .settings-card { padding: 1.1rem; }

  /* Wide tables become small cards: the name, then label and value. */
  .type-list, .table-scroll { overflow: visible; }
  .type-row, .otype-row, .oalbum-row { min-width: 0; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; padding: 1rem .25rem; }
  :is(.type-row, .otype-row, .oalbum-row).head, .type-row.type-head { display: none; }
  .type-row > .type-name, .otype-row > strong, .oalbum-row > strong { grid-column: 1 / -1; font-size: 1rem; }
  [data-label]::before { content: attr(data-label); display: block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .otype-row .num, .oalbum-row .num { text-align: left; }
  .otype-row .share-bar { grid-column: 1 / -1; flex-wrap: wrap; }
  .otype-row .share-bar::before { flex-basis: 100%; }
  .type-row .type-move { grid-column: 1 / -1; justify-content: flex-end; }

  /* Start, Albums, Statistics: a little less air. */
  .start, .albums-page, .overview-page { padding-top: 1.5rem; gap: 2.5rem; }
  .start-hello h1 { font-size: 2rem; }
  .start-filters { border-bottom: 0; }
  .status-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); width: 100%; }
  .status-filters a { flex: none; }
  .kpi { padding: 1.1rem; }
  .kpi b { font-size: 2rem; }
  .savebar-inner { padding: .8rem 1rem; }
  .savebar-text > span:last-child span { display: none; }
  .savebar-actions { width: 100%; }
  .savebar-actions button { flex: 1; height: 2.75rem; }
}
@media (max-width: 760px) {
  .settings-card .card-head { flex-wrap: wrap; }
  .settings-card .card-head > div { flex-basis: 100%; }
}
@media (max-width: 760px) { .start-hello { margin-bottom: 0; } }

/* Photos on a touch screen: a photo's buttons show once it's tapped (ticked). */
@media (hover: none) {
  .admin-album .admin-grid:not(.readonly) .admin-tile .admin-tile-body { opacity: 0; pointer-events: none; }
  .admin-album .admin-grid:not(.readonly) .admin-tile.picked .admin-tile-body { opacity: 1; pointer-events: auto; }
}
/* The selection bar on a phone: a sheet across the bottom, not a pill. */
@media (max-width: 760px) {
  .bulk-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; width: auto; max-width: none; margin: 0;
    display: grid; grid-template-columns: 1fr auto; gap: .6rem; padding: .9rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
  .bulk-bar #bulk-count { align-self: center; }
  .bulk-bar #bulk-clear { justify-self: end; order: -1; grid-column: 2; grid-row: 1; }
  .bulk-bar label.inline { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; margin: 0; }
  .bulk-bar label.inline select { flex: 1; width: auto; }
  .bulk-bar button.primary, .bulk-bar #bulk-delete { height: 2.75rem; }
  .bulk-bar button.primary { grid-column: 1; }
  .bulk-bar #bulk-delete { grid-column: 2; }
  .admin-album #photos { padding-bottom: 12rem; } /* room to scroll past the sheet */
}

/* Email templates: a tab per kind, each template a card with the start of its email. */
.tpl-tabs { margin-top: -.25rem; }
.tpl-pane { display: flex; flex-direction: column; gap: 1rem; }
.tpl-pane > p { margin: -.25rem 0 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tpl-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; background: var(--surface);
  transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(29, 27, 25, .08); }
.tpl-mail { position: relative; display: flex; flex-direction: column; gap: .35rem; height: 8.25rem; padding: 1.1rem 1.1rem 0; overflow: hidden; background: var(--bg); }
.tpl-mail::after { content: ""; position: absolute; inset: auto 0 0; height: 3rem; background: linear-gradient(transparent, var(--bg)); }
.tpl-mail strong { font-size: .82rem; }
.tpl-mail span { font-size: .78rem; line-height: 1.55; color: var(--muted); }
.tpl-meta { display: flex; flex-direction: column; gap: .25rem; padding: .9rem 1.1rem 1rem; }
.tpl-name { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .5rem; }
.tpl-name strong { font-size: .95rem; }
.tpl-name .pill { flex: none; }
.tpl-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 12.5rem; border: 1.5px dashed var(--line); border-radius: 12px;
  color: var(--brand); font-weight: 600; text-decoration: none; }
.tpl-add:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.tpl-new { flex: none; display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.js .tpl-new[hidden], .js .tpl-pane[hidden] { display: none; }

/* ---------- Photo albums ---------- */
/* A spread: two facing pages, with the fold in the middle. */
.spread-img { position: relative; display: block; aspect-ratio: 2 / 1; background: var(--bg); border-radius: 3px; overflow: hidden; }
.spread-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spread-img::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 0 0 / .12), rgb(255 255 255 / .35), rgb(0 0 0 / .12)); }
/* The curator's Photo albums tab. */
.new-book { position: relative; }
.new-book > summary { list-style: none; cursor: pointer; }
.new-book > summary::-webkit-details-marker { display: none; }
.new-book[open] > form { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; width: min(22rem, 80vw); padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .12); }
.book-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .85rem; }
.book-card { display: flex; gap: .9rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.book-card:hover { border-color: var(--brand); }
.book-card.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.book-card .spread-img { flex: none; width: 7.5rem; }
.book-card-text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.ok-pill { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.warn-pill { background: #fdf0dc; color: #8a5a12; }
.bad-pill { background: #fbe3e1; color: #9b2a1f; }
/* A photo album's details, and its order sheet. */
.album-details { display: flex; flex-direction: column; gap: 1.25rem; }
.details-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.9rem 1.25rem; margin: 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; }
.details-group legend { padding: 0 .4rem; font-weight: 600; }
.details-group > p { grid-column: 1 / -1; margin: 0; }
.details-group label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--muted); }
.details-group label input, .details-group label select, .details-group label textarea { font: inherit; font-size: .95rem; color: var(--text); }
.details-group label:has(textarea) { grid-column: 1 / -1; }
.details-stack { grid-template-columns: minmax(0, 32rem); }
.details-radio { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: 0; padding: 0; border: 0; }
.details-radio legend { width: 100%; padding: 0; margin-bottom: .2rem; font-size: .85rem; color: var(--muted); }
.details-radio label { flex-direction: row; align-items: center; gap: .4rem; color: var(--text); font-size: .95rem; white-space: nowrap; }
.material-links { color: var(--muted); }
.box-fields { display: flex; flex-direction: column; gap: .9rem; }
.box-fields[hidden], .box-fields [hidden] { display: none; }
.details-fixed-list { grid-column: 1 / -1; }
.details-fixed { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); }
.details-fixed strong { color: var(--text); font-size: .95rem; }
.details-cover { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; font-size: .9rem; }
.details-cover > div { display: contents; }
.details-cover dt { color: var(--muted); font-weight: 600; }
.details-cover dd { margin: 0; color: var(--text); }
.order-sheet { display: flex; flex-direction: column; gap: .75rem; }
.order-head { display: flex; flex-direction: column; gap: .6rem; }
.order-head p { margin: 0; }
.order-book { display: flex; flex-direction: column; gap: .6rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.order-book h3 { margin: 0; font-size: 1.15rem; }
.order-book h4 { margin: .6rem 0 0; font-size: .95rem; }
@media print { .order-book { break-inside: avoid-page; } }
.order-lines { margin: 0; border-top: 1px solid var(--line); }
.order-lines > div { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 1rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.order-lines dt { color: var(--muted); font-size: .9rem; }
.order-lines dd { margin: 0; display: flex; align-items: center; gap: .5rem; }
.order-lines dd span { white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-button { flex: none; width: 1.9rem; height: 1.9rem; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; }
.copy-button.copied { border-color: var(--ok); color: var(--ok); }
/* Printed, the order is only its photo albums' orders. */
@media print {
  body:has(.order-sheet) :is(.adminbar, .album-side, .settings-main > :not(.order-sheet), .order-sheet > .card-head, .order-head .row-actions, .order-head form, .copy-button) { display: none !important; }
  body:has(.order-sheet) { background: #fff; color: #000; }
  body:has(.order-sheet) .settings { display: block; padding: 0; margin: 0; max-width: none; }
  body:has(.order-sheet) .settings-main { padding: 0; margin: 0; max-width: none; }
  .order-sheet { padding: 0; border: 0; box-shadow: none; background: none; }
  .order-book { padding-top: 0; border-top: 0; }
  .order-book + .order-book { break-before: page; }
  .order-lines > div { grid-template-columns: 14rem 1fr; padding: .3rem 0; }
  .order-lines dt, .order-lines dd { color: #000; font-size: 10pt; }
  .order-book h3 a { color: #000; text-decoration: none; }
}

/* The embossing fonts on the album formats' page. */
.font-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.font-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 11rem; align-items: center; gap: .75rem; margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.font-name { display: flex; flex-direction: column; min-width: 0; }
.font-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-row > .pill { justify-self: start; }
.font-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; }
.font-actions form { margin: 0; }
.font-actions .button { cursor: pointer; height: 1.9rem; padding: 0 .85rem; font-size: .82rem; }
@media (max-width: 560px) { .font-row { grid-template-columns: minmax(0, 1fr) auto; } .font-row > .pill { display: none; } .font-actions { gap: .5rem; } }
/* Importing album formats: the form, then what the file does. */
.import-form { display: flex; flex-direction: column; gap: 1rem; }
.import-form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; }
.import-counts { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.import-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.import-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1.2fr) minmax(0, 1.6fr); gap: .25rem 1rem; align-items: baseline; padding: .6rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.import-row .pill { justify-self: start; }
.import-row > span > small { display: block; margin-top: .1rem; }
.import-row.same { color: var(--muted); }
@media (max-width: 700px) { .import-row { grid-template-columns: 1fr; } }
.book-status { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .85rem 1rem; background: var(--bg); border-radius: 10px; font-size: .9rem; }
.book-status form { margin: 0 0 0 auto; }
.by-hand > summary { list-style: none; cursor: pointer; }
:is(.admin, .settings) .by-hand > summary.button.ghost:not(.accent):not(.primary) { background: transparent; } /* outline only, also on the status bar */
.by-hand > summary::-webkit-details-marker { display: none; }
.by-hand[open] > form { margin-top: .75rem; max-width: 32rem; }
.book-status .by-hand { margin-left: auto; }
.book-status .by-hand[open] { flex-basis: 100%; margin-left: 0; }
.book-status .by-hand form { margin: .75rem 0 0; }
.hand-note { white-space: pre-line; margin: .5rem 0; padding: .6rem .85rem; border-left: 3px solid var(--line); color: var(--muted); font-size: .9rem; }
.book-status .hand-note { flex-basis: 100%; margin: 0; }
.book-work { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
.spread-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.spread-tile { display: flex; flex-direction: column; gap: .35rem; color: inherit; text-decoration: none; }
.spread-tile.on .spread-img { outline: 3px solid var(--brand); outline-offset: 2px; }
.note-badge { position: absolute; right: .35rem; top: .35rem; z-index: 1; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .75rem; }
.note-badge.done { background: var(--ok); }
.spread-notes { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.spread-notes form { margin: 0; }
.note-bubble { display: flex; flex-direction: column; gap: .4rem; padding: .85rem; border-radius: 10px; background: var(--bg); font-size: .92rem; line-height: 1.5; white-space: pre-line; }
.note-bubble.general { border: 1px solid var(--line); background: none; }
.note-head { display: flex; justify-content: space-between; gap: .5rem; }
.book-edit { border-top: 1px solid var(--line); padding-top: .75rem; }
.book-edit > form { margin-top: .75rem; max-width: 28rem; }
@media (max-width: 900px) { .book-work { grid-template-columns: 1fr; } .spread-notes { position: static; } }

/* The client's gallery: the photo albums above the photos; the cover is half as high then. */
.book-block { max-width: 70rem; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 0 0; }
.section-title { margin: 0 0 1.1rem; text-align: center; font-weight: 400; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.book-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.book-card-client { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.book-card-client:hover { border-color: var(--brand); }
.book-card-top { display: flex; align-items: center; gap: 1.2rem; }
.book-card-top .spread-img { flex: none; width: 10rem; box-shadow: 0 10px 24px rgb(29 27 25 / .16); }
.book-card-client .book-card-text strong { font-size: 1.1rem; }
.book-open { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .95rem; text-align: center; }
.book-open.outline { background: none; color: var(--brand); border: 1px solid var(--brand); }
.book-card-client:hover .book-open { filter: brightness(1.08); }

/* The browsing page. */
.book-page { min-height: 100vh; }
.book-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .85rem clamp(6.5rem, 9vw, 8rem) .85rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.book-bar-title { display: flex; align-items: center; gap: .4rem 1rem; min-width: 0; }
.book-bar-name { display: flex; flex-direction: column; gap: .1rem; min-width: 0; margin-left: 20px; }
.book-bar-title .bar-logo img { height: 2.6rem; width: auto; vertical-align: middle; }
.book-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.book-bar-actions form { margin: 0; }
.book-main { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; min-height: calc(100vh - 4rem); }
.book-stage { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.5rem; min-width: 0; }
.book-views { align-self: center; display: inline-flex; gap: .25rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.seg { display: inline-flex; align-items: center; gap: .5rem; height: 2.25rem; padding: 0 1rem; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; }
.seg.on { background: var(--line); color: var(--text); }
.book-one { display: flex; flex-direction: column; gap: 1rem; }
.book-one[hidden], .book-all[hidden] { display: none; }
.book-spread-row { display: flex; align-items: center; gap: 1rem; }
.book-spread { position: relative; flex: 1; margin: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 24px 48px rgb(29 27 25 / .2); background: var(--bg); }
.book-spread img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.book-spread::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 0 0 / .14), rgb(255 255 255 / .4), rgb(0 0 0 / .14)); }
.book-arrow { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); line-height: 0; cursor: pointer; color: inherit; }
.book-arrow svg { display: block; }
.book-pos { text-align: center; margin: 0; }
.book-strip { display: flex; gap: .75rem; overflow-x: auto; padding: .4rem .25rem; }
.book-thumb { position: relative; flex: none; width: 6.5rem; padding: 0; border: 0; background: none; cursor: pointer; opacity: .7; }
.book-thumb img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 2px; }
.book-thumb.on { opacity: 1; }
.book-thumb.on img { outline: 2px solid var(--brand); outline-offset: 2px; }
.book-dot { position: absolute; right: -.25rem; top: -.25rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.book-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.4rem 1.1rem; }
.book-cell { display: flex; flex-direction: column; align-items: stretch; width: 100%; height: auto; padding: 0; border: 0; border-radius: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.book-cell .spread-img { box-shadow: 0 8px 20px rgb(29 27 25 / .14); }
.book-cell-label { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .85rem; }
.book-cell-note { color: var(--brand); font-weight: 600; }
.book-side { display: flex; flex-direction: column; gap: .9rem; padding: 1.75rem 1.5rem; background: var(--surface); border-left: 1px solid var(--line); }
.book-side p { margin: .25rem 0 0; }
.book-side hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.book-side textarea { width: 100%; font: inherit; }
.note-reply { display: flex; flex-direction: column; gap: .25rem; padding: .75rem .9rem; border-radius: 10px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); font-size: .9rem; white-space: pre-line; }
.note-reply[hidden] { display: none; }
.book-done { margin-top: auto; display: flex; flex-direction: column; gap: .35rem; padding: 1rem; background: var(--bg); border-radius: 12px; font-size: .9rem; }
@media (max-width: 900px) {
  .book-main { grid-template-columns: 1fr; }
  .book-side { border-left: 0; border-top: 1px solid var(--line); }
  .book-arrow { display: none; }
}
.book-parts { margin-top: .25rem; }
.book-cover-edit { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1.25rem; }
.cover-forms { flex: 1 1 18rem; display: flex; flex-direction: column; gap: .5rem; }
.cover-forms .upload, .cover-forms .dropzone { height: 100%; }
.cover-forms .dropzone { display: grid; place-items: center; min-height: 8rem; }
.cover-forms #cover-form { flex: 1; }
.cover-img { display: grid; place-items: center; width: 14rem; aspect-ratio: 1 / 1; background: var(--bg); border-radius: 4px; overflow: hidden; box-shadow: 0 10px 24px rgb(29 27 25 / .14); }
.cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spread-img.is-cover { aspect-ratio: 1 / 1; }
.spread-img.is-cover::after { content: none; } /* a cover has no fold */
.book-settings { max-width: 28rem; }
.book-delete { padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: 12px; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.book-delete h3 { margin: 0; color: var(--danger); font-size: 1rem; }
.feedback-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; align-items: start; }
.feedback-panels .spread-notes { position: static; scroll-margin-top: 1.5rem; }
.note-bubble .handled { color: var(--ok); }
/* A gallery's steps, on its settings tab: like the old checklist, small and without lines. */
.progress-steps { list-style: none; margin: 0; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); border-radius: 10px; }
.progress-steps li { display: grid; grid-template-columns: 1.4rem 11rem 1fr; align-items: center; gap: .75rem; font-size: .9rem; color: var(--muted); }
.progress-steps li::before { content: ""; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); }
.progress-steps li.done { color: var(--text); }
.progress-steps li.done::before { content: "✓"; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .8rem; }
.progress-steps li.current .progress-name { font-weight: 600; }
.progress-steps li > .small { font-size: .8rem; }
@media (max-width: 600px) { .progress-steps li { grid-template-columns: 1.4rem 1fr; } .progress-steps li > .small { grid-column: 2; } }
.card-head > div:first-child { flex: 1; min-width: 0; }
.settings-card .card-head > .card-head-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.progress-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.progress-tag { font-weight: 400; font-size: .75rem; }
.progress-tag strong { font-weight: 600; }
/* A photo album's feedback log: the client's notes and the photographer's replies. */
.note-log { display: flex; flex-direction: column; gap: .5rem; }
.note-log:empty { display: none; }
.log-entry { display: flex; flex-direction: column; gap: .3rem; padding: .7rem .85rem; border-radius: 10px; background: var(--bg); font-size: .9rem; line-height: 1.5; white-space: pre-line; }
.log-entry.curator { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); margin-left: 1.25rem; }
.log-entry form { margin: 0; }
.log-entry .handled { color: var(--ok); }
.note-log[hidden] { display: none; }
.general-log { margin-bottom: 1rem; }
/* The cover on the browsing page: one page, as high as a spread, without a fold. */
.book-spread.is-cover { background: none; box-shadow: none; overflow: visible; }
.book-spread.is-cover::after { content: none; }
.book-spread.is-cover img { width: 50%; margin: 0 auto; border-radius: 4px; box-shadow: 0 24px 48px rgb(29 27 25 / .2); }
.book-thumb.is-cover img { width: 50%; margin: 0 auto; aspect-ratio: 1 / 1; }
.spread-img.cover-page { background: none; box-shadow: none; }
.spread-img.cover-page::after { content: none; }
.spread-img.cover-page img { width: 50%; margin: 0 auto; box-shadow: 0 8px 20px rgb(29 27 25 / .14); }
/* The welcome page: the client chooses between the photos and their photo albums. */
.welcome-head { display: flex; align-items: center; padding: 1.1rem 0; }
.welcome-title { text-align: center; padding: 2.5rem 0 2.5rem; }
.welcome-title p { margin: 0; }
.welcome-title > .muted { font-size: 1rem; }
.welcome-title h1 { margin: .85rem 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.75rem, 6vw, 5rem); line-height: 1; }
.welcome-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; max-width: 75rem; margin: 0 auto; padding-bottom: 5rem; }
.welcome-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.welcome-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgb(29 27 25 / .12); }
.welcome-pic { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.welcome-pic img { width: 100%; height: 100%; object-fit: cover; }
.welcome-pic.book img { width: 58%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 3px; box-shadow: 0 14px 30px rgb(29 27 25 / .22); }
.welcome-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem 1.4rem; flex: 1; }
.welcome-body h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.65rem; }
.welcome-status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.welcome-go { display: inline-flex; align-items: center; justify-content: center; height: 2.75rem; margin-top: auto; border-radius: 999px; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 600; }
.welcome-body .muted + .welcome-go, .welcome-status + .welcome-go { margin-top: .75rem; }
.welcome-go.outline { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
@media (max-width: 600px) {
  .welcome-title { padding: 1.5rem 0; }
  .welcome-tiles { grid-template-columns: 1fr; }
}
.welcome-page { --page-pad: clamp(1rem, 3vw, 2.5rem); padding: 0 var(--page-pad); }
.welcome-page .view-only-bar, .album-page .view-only-bar { margin: 0 calc(-1 * var(--page-pad)); } /* the full width, as on the photo album */
/* ← Overview: back to the welcome page, a button under the bar, on the left. */
.back-row { margin: -.5rem 0 1.5rem; }
.back-btn { display: inline-flex; align-items: center; gap: .4rem; height: 2.4rem; padding: 0 1rem; font-size: .9rem; text-decoration: none; background: transparent; }
.book-back { margin: 0; align-self: flex-start; }
/* The left column: the gallery's steps folded into one line once a photo album is under way. */
.side-fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: 0; margin: 0; text-align: left; }
.side-fold summary > ol { flex: 1; margin: 0; }
.side-fold summary::-webkit-details-marker { display: none; }
.side-fold summary::after { content: "▾"; color: var(--muted); font-size: 1.8rem; transition: transform .2s; }
.side-fold[open] summary::after { transform: rotate(180deg); }
.side-fold > ol { margin-top: 0; padding-top: 0; padding-left: 1rem; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 5px 5px; }
/* Approving the design: the green yes. */
.approve-btn, button.primary.approve-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.approve-btn:hover { filter: brightness(1.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .approve-btn { color: #0f2418; } }
:root[data-theme="dark"] .approve-btn { color: #0f2418; }
/* Settings → Music: the tracks, uploading one, the default per shoot type. */
.track-list { display: flex; flex-direction: column; }
.track-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1.6fr) 6rem 4rem minmax(0, 1fr); align-items: center; gap: .9rem; padding: .8rem .25rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.track-head { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.track-item > summary { list-style: none; cursor: pointer; }
.track-item > summary::-webkit-details-marker { display: none; }
.track-item[open] > summary { border-bottom-color: transparent; }
.track-title { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.track-play { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); cursor: pointer; }
.track-play.on { background: var(--brand); color: #fff; }
.track-edit { display: flex; flex-direction: column; gap: 1rem; }
.track-item .track-edit { padding: .5rem .25rem 1.5rem 3.4rem; border-bottom: 1px solid var(--line); }
.track-edit label { display: flex; flex-direction: column; gap: .35rem; }
.track-bpm { display: flex; align-items: flex-end; gap: .75rem; }
.track-bpm label { flex: 0 1 10rem; }
.track-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.track-drop { position: relative; display: grid !important; place-items: center; min-height: 6rem; padding: 1rem; border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; cursor: pointer; }
.track-drop.over { border-color: var(--brand); color: var(--brand); }
.track-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.defaults-list { display: flex; flex-direction: column; gap: .75rem; }
.defaults-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.4fr) minmax(0, 1.2fr); align-items: center; gap: .75rem; }
@media (max-width: 700px) {
  .track-row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .track-row > :nth-child(4), .track-row > :nth-child(5) { display: none; }
  .track-item .track-edit { padding-left: .25rem; }
  .defaults-row { grid-template-columns: 1fr; }
}
/* Settings → Album formats: a row per print lab and per format, its form below it when opened. */
.format-row { grid-template-columns: minmax(0, 1.6fr) 7rem minmax(0, 1.2fr) 6rem; }
.lab-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 8rem; }
.format-item .track-edit { padding-left: .25rem; }
.format-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; margin: 0; padding: 0; border: 0; }
.format-fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .format-fields, .format-fields.four { grid-template-columns: 1fr 1fr; } }
.format-fields legend { grid-column: 1 / -1; padding: 0; font-weight: 600; font-size: .9rem; }
.new-lab { margin-top: .75rem; }
.new-lab > summary { list-style: none; cursor: pointer; display: inline-flex; }
.new-lab > summary::-webkit-details-marker { display: none; }
.new-lab[open] > form { margin-top: .75rem; }
@media (max-width: 700px) {
  .format-row, .lab-row { grid-template-columns: minmax(0, 1fr) auto; }
  .format-row > :nth-child(3), .format-row > :nth-child(4), .lab-row > :nth-child(3) { display: none; }
}
/* The slideshow's sound button and the track's credit line. */
.ss-sound .i-off, .slideshow.muted .ss-sound .i-on { display: none; }
.slideshow.muted .ss-sound .i-off { display: block; }
.ss-sound svg { fill: currentColor; }
.ss-credit { position: absolute; left: 1.25rem; bottom: 4.25rem; margin: 0; font-size: .75rem; color: rgb(255 255 255 / .6); transition: opacity .4s; }
.slideshow.idle .ss-credit { opacity: .5; }
/* The Slideshow tab: the tracks to choose from, the tempo, the photos. */
.ss-tracks { display: flex; flex-direction: column; }
.ss-track { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 6rem 4rem; align-items: center; gap: .9rem; padding: .7rem .6rem; border-radius: 10px; cursor: pointer; font-size: .9rem; }
.ss-track > input { position: absolute; opacity: 0; pointer-events: none; }
.ss-track > span:nth-of-type(1), .ss-track > span:nth-of-type(2) { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ss-track:has(input:checked) { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); outline: 1px solid var(--brand); }
.ss-track:has(input:focus-visible) { outline: 2px solid var(--brand); }
.ss-track-none { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--muted); }
.ss-tempo { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; }
.ss-tempo .sec-pill { cursor: pointer; }
.ss-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; }
.ss-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--bg); }
.ss-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.ss-photo input { position: absolute; opacity: 0; }
.ss-check { position: absolute; top: .35rem; right: .35rem; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #fff; background: rgb(0 0 0 / .25); color: transparent; font-size: .75rem; }
.ss-photo:has(input:checked) .ss-check { background: var(--brand); color: #fff; }
.ss-photo:has(input:checked) { outline: 3px solid var(--brand); outline-offset: -3px; }
.ss-photo:has(input:focus-visible) { outline: 3px solid var(--brand); }
.ss-save { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; }
@media (max-width: 700px) { .ss-track { grid-template-columns: 2.5rem minmax(0, 1fr) auto; } .ss-track > span:last-child { display: none; } }
/* The cover's big play button for the slideshow, under the title. */
.cover-play { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 2.5rem auto 0; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.cover-play-ring { display: inline-flex; align-items: center; gap: .9rem; height: 4rem; padding: 0 1.9rem 0 1.4rem; border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .9); background: rgb(255 255 255 / .14); backdrop-filter: blur(6px); color: #fff; transition: transform .2s, background .2s, color .2s; }
.cover-play-ring svg { flex: none; }
.cover-play:hover .cover-play-ring, .cover-play:focus-visible .cover-play-ring { transform: scale(1.06); background: #fff; color: #501520; }
.cover-play:focus-visible { outline: none; }
.cover-play-label { font-size: 1rem; font-weight: 600; }
.cover-play-meta { font-size: .8rem; opacity: .75; }
@media (max-width: 640px) { .cover-play { margin-top: 1.5rem; } .cover-play-ring { height: 3.4rem; padding: 0 1.4rem 0 1.1rem; } }
.settings-card .card-head > .card-head-side.ss-pick { flex-direction: row; align-items: center; }
/* Settings → Security and the code step at sign-in. */
.security-setup { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.qr-box { padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr-box .qr { display: block; width: 100%; height: auto; }
.setup-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .6rem; line-height: 1.5; }
.secret { display: inline-block; margin-top: .3rem; padding: .2rem .5rem; border-radius: 6px; background: var(--bg); font-size: .85rem; letter-spacing: .05em; word-break: break-all; }
.security-form { max-width: 26rem; }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-box { display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem; border: 1px solid var(--brand); border-radius: 12px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.recovery-box p { margin: 0; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: .4rem 2rem; margin: .25rem 0; padding-left: 1.4rem; font-size: 1rem; }
.recovery-box .button { align-self: flex-start; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
@media (max-width: 700px) { .security-setup { grid-template-columns: 1fr; } .qr-box { max-width: 14rem; } }
/* The admin's sign-in: the chosen photo on the left, the logo and the form on the right. */
.login-page { margin: 0; }
.login-split { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(22rem, 1fr); }
.login-photo { position: absolute; inset: 0; overflow: hidden; background: #000; } /* the whole screen: it runs on behind the form */
.login-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-photo[data-empty] { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 55%, #8a7e70), #5f6f68); }
.login-panel { position: relative; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem; padding: 3rem clamp(1.25rem, 5vw, 4rem); background: color-mix(in srgb, var(--bg) 80%, transparent); text-align: center; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.login-brand .eyebrow { margin: 0; }
.login-logo { width: auto; max-width: min(18rem, 70vw); height: var(--logo-h, 4.5rem); object-fit: contain; } /* the logo size from Settings */
.login-logo.adaptive { filter: var(--logo-filter); }
.login-name { font-family: "Antic Didone", var(--serif); font-size: 2.2rem; }
.login-panel h1 { margin: 0; font-family: "Antic Didone", var(--serif); font-weight: 400; font-size: clamp(2rem, 3vw, 2.6rem); }
.login-lead { margin: -.6rem 0 0; max-width: 32ch; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: 1.1rem; width: 100%; max-width: 22rem; text-align: left; }
.login-form label:not(.check) { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .9rem; }
.login-form .primary { height: 3rem; border-radius: 999px; margin-top: .3rem; background: var(--brand); border-color: var(--brand); color: #fff; } /* the theme colour */
.login-form .primary:hover { filter: brightness(1.15); }
.login-panel .small { margin: 0; }
.login-photo-drop { aspect-ratio: 4 / 5; max-width: 9rem; }
.login-photo-preview { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
@media (max-width: 760px) {
  .login-split { grid-template-columns: 1fr; }
  .login-panel { grid-column: 1; }
}
.login-form h2 { margin: 0; font-size: 1.1rem; text-align: center; }
.login-form small { font-weight: 400; font-size: .8rem; }
.login-contact { position: absolute; left: 0; right: 0; bottom: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.5rem; margin: 0; padding: 0 1rem; color: var(--muted); font-size: .85rem; }
.login-contact a { color: inherit; }
.login-panel .legal-links { margin: 0; }
.ss-top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.ss-on { display: flex; align-items: center; gap: .9rem; cursor: pointer; min-width: 0; flex: 1 1 22rem; }
.ss-on span { display: flex; flex-direction: column; gap: .2rem; }
.ss-top .ss-save { flex: 0 1 auto; flex-direction: column; align-items: center; gap: .4rem; text-align: center; } /* the hint under the button */
/* A checkbox drawn as a switch: a track with a knob that slides over. */
input.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.9rem; height: 1.65rem; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s; }
input.switch::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s; }
input.switch:checked { background: var(--brand); }
input.switch:checked::after { transform: translateX(1.25rem); }
input.switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }
/* A shoot type's reminders: a tick box, then the days. */
.remind-row { display: flex; flex-direction: column; gap: .4rem; padding-block: .25rem; }
.remind-days { display: flex; align-items: center; gap: .5rem; padding-left: 1.6rem; font-weight: 400; }
.remind-days input { width: 4.5rem; }
.remind-row small { padding-left: 1.6rem; }
label.check.check-text { align-items: flex-start; flex-wrap: nowrap; } /* the text beside the box, wrapping in itself */
label.check.check-text input { flex: none; margin-top: .25rem; }
label.check.check-text span { min-width: 0; }
.tpl-row { grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr); }
@media (max-width: 700px) { .tpl-row { grid-template-columns: 1fr; } }

/* ---------- The designer: a photo album designed in the app ---------- */
.designer-body { background: var(--bg); }
.designer { min-height: 100vh; display: flex; flex-direction: column; }
.designer-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding: .75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.designer-back { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; color: var(--brand-line); }
.designer-title { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.designer-title h1 { margin: 0; font-size: 1.25rem; }
.designer-title .muted { font-size: .85rem; }
.designer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.designer-tools .button { height: 2.5rem; }
.designer-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.designer-toggle.on { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.icon-button { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); cursor: pointer; }
.icon-button:disabled { opacity: .4; cursor: default; }
.designer-status { min-width: 5rem; }
.designer-status.bad { color: var(--danger); }
.designer-send { display: inline-flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.designer-send { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: .5rem; }
.designer-send-col { display: inline-flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.designer-send .button { height: 2.5rem; }
.designer-sent { margin: 1rem 1.5rem 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.designer-sent-actions { display: inline-flex; align-items: center; gap: 1rem; }
.designer-dialog { max-width: 30rem; width: calc(100% - 2rem); padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgb(0 0 0 / .2); }
.designer-dialog::backdrop { background: rgb(0 0 0 / .35); }
.designer-dialog h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.designer-dialog p { margin: 0 0 .6rem; }
.designer-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.designer-send .button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.designer-readonly { margin: 1rem 1.5rem 0; }
.designer-body-grid { flex: 1 1 auto; display: flex; flex-wrap: wrap; min-height: 0; }
.designer-main { flex: 999 1 40rem; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.25rem 1.5rem 0; }
.designer-side { flex: 1 1 21rem; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--surface); border-left: 1px solid var(--line); }
.designer-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.designer-section-head h2 { margin: 0; font-family: var(--font); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.designer-templates { display: flex; flex-direction: column; gap: .6rem; }
/* The templates on the right, two abreast, More at the end. Room round
   them for a template's hide button. */
.designer-templates[hidden], .designer-crop[hidden] { display: none; }
.designer-crop { display: flex; flex-direction: column; gap: 1rem; }
.designer-template-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); justify-items: center; align-items: center; gap: .75rem .5rem; padding: 8px 2px; }
.designer-template-list > p, .designer-template-list > .dz-more { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
.dz-more { white-space: nowrap; }
.dz-chip { position: relative; display: inline-flex; }
.dz-chip-pick { padding: 4px; background: transparent; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.dz-chip.on .dz-chip-pick { border-color: var(--brand-line); }
.dz-chip-pick:disabled { cursor: default; }
.dz-chip-hide { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; }
.dz-chip:hover .dz-chip-hide, .dz-chip-hide:focus-visible { display: inline-flex; }
.dz-mini { position: relative; display: block; overflow: hidden; background: #fff; }
.dz-mini-frame { position: absolute; box-sizing: border-box; border: 1px solid #fff; background: #cfc6ba; }
.dz-mini-fold { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgb(80 21 32 / .45); pointer-events: none; }
.dz-more { display: inline-flex; align-items: center; gap: .4rem; height: 3rem; }
.dz-more small { font-weight: 400; }
.designer-stage { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1.75rem 1rem; background: color-mix(in srgb, var(--line) 55%, var(--bg)); border-radius: 12px; }
.designer-stage-row { width: 100%; display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.designer-spread { position: relative; flex: none; background: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .14); }
.designer-spread.drop, .designer-new.drop { outline: 3px dashed var(--brand-line); outline-offset: 4px; }
.dz-frame { position: absolute; overflow: hidden; background: #e9e4dd; cursor: pointer; }
.dz-frame img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.dz-frame.on, .dz-frame.drop { z-index: 2; }
.dz-frame.on::after, .dz-frame.drop::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 3px solid var(--brand-line); pointer-events: none; }
.dz-frame.drop::after { border-style: dashed; }
.dz-frame.empty { background: repeating-linear-gradient(45deg, #f3eee8, #f3eee8 8px, #e9e2d9 8px, #e9e2d9 16px); }
.dz-frame:focus-visible { outline: 3px solid var(--brand-line); outline-offset: -3px; }
.dz-empty-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .5rem; font-size: .75rem; color: #6a3d10; text-align: center; }
.dz-badge { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: #c26a12; border-radius: 999px; color: #fff; }
.dz-guide { position: absolute; pointer-events: none; box-sizing: border-box; }
.dz-guide.trim { border: 1px solid red; }
.dz-guide.safe { border: 1px dashed rgb(30 110 160 / .8); }
.dz-guide.fold { top: 0; bottom: 0; width: 0; border-left: 2px dashed rgb(80 21 32 / .85); }
.dz-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--muted); font-size: .9rem; pointer-events: none; padding: 0 1.5rem; text-align: center; }
.designer-new { width: 9.5rem; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .75rem; background: rgb(255 255 255 / .5); border: 2px dashed #b9b2a8; border-radius: 6px; color: var(--muted); font: inherit; font-size: .85rem; text-align: center; cursor: pointer; }
.designer-new strong { color: var(--text); }
.designer-new[hidden] { display: none; }
.designer-photos { display: flex; flex-direction: column; gap: .75rem; padding-bottom: 0; }
.designer-photos .pill-tabs { margin: 0; }
.designer-unused { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; font-size: .9rem; cursor: pointer; }
.designer-unused input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.designer-strip { display: flex; flex-wrap: wrap; gap: .5rem; max-height: 22rem; overflow-y: auto; }
.designer-grip { display: none; }
/* On a screen big enough, the designer fills the window: the photo strip
   takes the room left under the stage and scrolls on its own, as do the
   main column and the right side when the room runs out. */
@media (min-width: 900px) and (min-height: 560px) {
  .designer { height: 100vh; min-height: 0; }
  .designer-body-grid { flex-wrap: nowrap; overflow: hidden; }
  .designer-main { overflow-y: auto; }
  .designer-side { overflow-y: auto; }
  .designer-photos { position: relative; flex: 1 0 13rem; min-height: 0; }
  .designer.photos-open .designer-spreads { display: none; }
  .designer-grip { position: absolute; top: .25rem; left: 50%; translate: -50% 0; width: 5rem; height: 1.25rem; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: ns-resize; touch-action: none; }
  .designer-grip span { width: 2.5rem; height: 4px; border-radius: 999px; background: #cfc6ba; }
  .designer-grip:hover span, .designer-grip:focus-visible span { background: var(--brand-line); }
  .designer-strip { flex: 1 1 0; min-height: 6rem; max-height: none; align-content: flex-start; }
}
.dz-tile { position: relative; flex: none; height: 84px; padding: 0; overflow: hidden; background: var(--line); border: 0; border-radius: 4px; cursor: grab; }
.dz-tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.dz-tile.used img { opacity: .45; }
.dz-tile.picked { outline: 3px solid var(--brand-line); outline-offset: 2px; }
.dz-tile.picked img { opacity: 1; }
.designer-picked { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-size: .85rem; }
.designer-picked[hidden] { display: none; }
.designer-picked .button { height: 2.25rem; padding: 0 .9rem; font-size: .85rem; }
.dz-clear { padding: 0; background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.dz-tile:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; }
.dz-used { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; background: var(--brand); border-radius: 999px; color: #fff; }
.dz-side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.dz-side-head h2 { margin: 0; font-size: 1.15rem; }
.dz-side-head .muted { display: block; }
.dz-warnings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.dz-warn { display: flex; align-items: center; gap: .5rem; padding: .5rem .65rem; background: var(--bg); border-radius: 8px; font-size: .85rem; }
.dz-warn .dot { width: 8px; height: 8px; flex: none; border-radius: 999px; background: #b9b2a8; }
.dz-warn.bad { background: #fbf1e6; color: #6a3d10; }
.dz-warn.bad .dot { background: #c26a12; }
/* The spreads above the stage, one row to scroll through sideways. */
.designer-spreads { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
/* The warnings and Delete on the heading's line, to the right. */
.designer-spreads .designer-section-head { align-items: center; }
.dz-spreads-end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; }
.dz-spreads-end:empty { display: none; }
.dz-spreads-end .dz-warnings { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.dz-spreads-end .dz-warn { padding: .3rem .6rem; }
.dz-overview { position: relative; margin: 0; padding: 6px 6px 10px; list-style: none; display: flex; flex-wrap: nowrap; gap: .75rem; overflow-x: auto; }
.dz-overview li { flex: none; width: 120px; display: flex; flex-direction: column; gap: .25rem; padding: 0; margin: 0; border: 0; }
.dz-overview li.drop button { outline: 3px dashed var(--brand-line); outline-offset: 2px; }
.dz-overview button { position: relative; display: block; width: 100%; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; cursor: pointer; }
.dz-overview li.on button { outline: 3px solid var(--brand-line); outline-offset: 1px; border-color: transparent; }
.dz-overview li.empty button { border: 2px dashed #cfc6ba; }
.dz-thumb { position: relative; display: block; max-width: 100%; }
.dz-dot { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 999px; background: #c26a12; box-shadow: 0 0 0 2px #fff; }
/* The free editor: the spread outlined, a frame's grips, the lines it
   snaps to, and the panel on the right. */
.designer-edit-badge { margin: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; background: var(--brand); border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 600; }
.designer-edit-badge[hidden] { display: none; }
.designer.editing .designer-spread { box-shadow: 0 10px 30px rgb(0 0 0 / .14), 0 0 0 2px var(--brand-line); }
.designer.editing .dz-frame { cursor: move; touch-action: none; }
.dz-handle { position: absolute; z-index: 5; width: 10px; height: 10px; margin: -5px 0 0 -5px; box-sizing: border-box; background: #fff; border: 2px solid var(--brand-line); border-radius: 2px; touch-action: none; }
.dz-handle.nw, .dz-handle.se { cursor: nwse-resize; }
.dz-handle.ne, .dz-handle.sw { cursor: nesw-resize; }
.dz-handle.n, .dz-handle.s { cursor: ns-resize; }
.dz-handle.e, .dz-handle.w { cursor: ew-resize; }
.dz-group-box { position: absolute; z-index: 4; box-sizing: border-box; border: 1px dashed var(--brand-line); pointer-events: none; }
.dz-snap { position: absolute; z-index: 4; pointer-events: none; }
.dz-snap.x { top: 0; bottom: 0; width: 0; border-left: 1px solid #d4366b; }
.dz-snap.y { left: 0; right: 0; height: 0; border-top: 1px solid #d4366b; }
.dz-snap-label { position: absolute; z-index: 6; padding: 1px 6px; background: #d4366b; border-radius: 999px; color: #fff; font-size: 10px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.dz-snap-label.x { top: 4px; translate: 4px 0; }
.dz-snap-label.y { left: 4px; translate: 0 4px; }
.dz-cut { position: absolute; left: 6px; top: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #c26a12; border-radius: 999px; color: #fff; font-size: .7rem; font-weight: 600; pointer-events: none; }
.dz-empty-note.free { color: var(--muted); }
.designer-editor { display: flex; flex-direction: column; gap: 1rem; }
.designer-editor[hidden] { display: none; }
.dz-add-frame { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.dz-edit-frame { display: flex; flex-direction: column; gap: .75rem; padding: .9rem; background: var(--bg); border-radius: 12px; }
.dz-edit-frame-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.dz-edit-frame-head h3 { margin: 0; font-size: .95rem; }
.dz-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dz-num { display: flex; flex-direction: column; gap: .25rem; font-size: .75rem; color: var(--muted); }
.dz-num input { height: 2.25rem; box-sizing: border-box; padding: 0 .6rem; font-size: .9rem; }
.dz-edit-frame .row-actions .button { display: inline-flex; align-items: center; gap: .35rem; height: 2.25rem; }
.dz-edit-hint { margin: 0; padding: .9rem; background: var(--bg); border-radius: 12px; color: var(--muted); font-size: .85rem; }
.dz-own { display: flex; flex-direction: column; gap: .5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.dz-own .button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.dz-own .button.on svg { fill: currentColor; }
.dz-chip-like { position: absolute; left: 10px; bottom: 10px; z-index: 1; width: 18px; height: 18px; display: none; align-items: center; justify-content: center; padding: 0; background: #fff; border: 0; border-radius: 999px; box-shadow: 0 1px 3px rgb(0 0 0 / .25); color: #b3264a; cursor: pointer; }
.dz-chip-like.on svg { fill: currentColor; }
.dz-chip:hover .dz-chip-like, .dz-chip-like.on, .dz-chip-like:focus-visible { display: inline-flex; }
.dz-own-mark { position: absolute; left: 4px; bottom: 4px; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 999px; box-shadow: 0 1px 3px rgb(0 0 0 / .25); color: #b3264a; }
.dz-own-mark svg { fill: currentColor; }
.dz-free-note { margin: 0; display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .75rem; background: var(--bg); border-radius: 10px; color: var(--muted); font-size: .8rem; }
.dz-free-note[hidden] { display: none; }
.dz-free-note svg { flex: none; margin-top: 2px; }
/* The cover: a material's linen, its embossing, the panel on the right. */
.designer-cover-panel { display: flex; flex-direction: column; gap: .75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.designer-cover-panel[hidden] { display: none; }
.dz-cover-kinds { margin: 0; }
.dz-field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--muted); }
.dz-field input[type=text], .dz-field select { height: 2.4rem; box-sizing: border-box; font: inherit; font-size: .9rem; color: var(--text); }
.dz-material { background-color: #746c64; background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .025) 0 1px, transparent 1px 2px), repeating-linear-gradient(90deg, rgb(0 0 0 / .035) 0 1px, transparent 1px 2px); }
.dz-front { position: absolute; overflow: hidden; pointer-events: none; }
.dz-emboss { position: absolute; white-space: nowrap; }
.dz-emboss-text { text-align: center; }
.dz-emboss-design { -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.dz-emboss-file { display: flex; align-items: center; justify-content: center; border: 1px dashed rgb(255 255 255 / .6); color: rgb(255 255 255 / .8); font-size: .75rem; white-space: normal; text-align: center; }
.dz-finish-blind.dz-emboss-text { color: #5f5852; text-shadow: 0 1px 0 rgb(255 255 255 / .16), 0 -1px 0 rgb(0 0 0 / .35); }
.dz-finish-blind.dz-emboss-design { background: #5f5852; }
.dz-finish-gold { --foil: linear-gradient(180deg, #f1dc9a 0%, #c9a454 45%, #8f6d2c 60%, #d8bb6c 100%); }
.dz-finish-silver { --foil: linear-gradient(180deg, #f4f5f7 0%, #c4c6cc 45%, #8e9097 60%, #dcdde1 100%); }
.dz-finish-rose { --foil: linear-gradient(180deg, #f4cdbf 0%, #d6a08e 45%, #a46e5d 60%, #e3b5a5 100%); }
.dz-emboss-text:is(.dz-finish-gold, .dz-finish-silver, .dz-finish-rose) { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .3)); }
.dz-emboss-design:is(.dz-finish-gold, .dz-finish-silver, .dz-finish-rose) { background: var(--foil); }
.dz-cover-item.empty button { border-style: dashed; }
.dz-overview li.dz-cover-item { width: auto; }
.dz-overview li.dz-cover-item button { width: auto; }
/* The cover's choices as even tiles. */
.designer-cover-panel .pill-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.designer-cover-panel .pill-tabs .sec-pill { justify-content: center; text-align: center; white-space: normal; height: auto; min-height: 2.1rem; padding: .35rem .6rem; line-height: 1.2; }
.dz-finish-uv-white.dz-emboss-text { color: #f4f2ee; }
.dz-finish-uv-black.dz-emboss-text, .dz-finish-uv-design.dz-emboss-text { color: #161412; }
.dz-finish-uv-white.dz-emboss-design { background: #f4f2ee; }
.dz-finish-uv-black.dz-emboss-design, .dz-finish-uv-design.dz-emboss-design { background: #161412; }

/* The client's feedback on the right of the designer. */
.designer-feedback { display: flex; flex-direction: column; gap: .6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.designer-feedback[hidden] { display: none; }
.designer-feedback h3 { margin: .4rem 0 0; font-size: .85rem; }
.dz-fb-fold { display: inline-flex; align-items: center; gap: .3rem; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; }
.dz-fb-fold h2 { margin: 0; }
.dz-fb-head { align-items: center; }
/* Open, much feedback scrolls on its own, the templates below in reach. */
.dz-fb-body { display: flex; flex-direction: column; gap: .6rem; max-height: 45vh; overflow-y: auto; padding-right: 4px; }
.dz-fb-open { padding: 1px 8px; background: var(--brand); border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 600; }
.designer-feedback .designer-section-head .dz-clear { margin-left: auto; font-size: .8rem; }
.dz-fb-log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.dz-fb-msg { margin: 0; padding: .6rem .75rem; background: #fbf1e6; border-radius: 10px; font-size: .85rem; }
.dz-fb-msg.curator { margin-left: 1.5rem; background: var(--bg); }
.dz-fb-msg.handled { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.dz-fb-msg p { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dz-fb-meta { font-size: .72rem; color: var(--muted); }
.dz-fb-handled { display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .8rem; cursor: pointer; }
.dz-fb-handled input { width: 1rem; height: 1rem; accent-color: var(--brand); }
.dz-fb-reply { display: flex; flex-direction: column; gap: .4rem; }
.dz-fb-reply textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .85rem; }
.dz-fb-reply .button { align-self: flex-start; height: 2.25rem; }
.dz-fb-older summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
.dz-fb-older[open] { display: flex; flex-direction: column; gap: .5rem; }
.dz-fb-spreads ul { margin: .4rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.dz-fb-spreads li { margin: 0; padding: 0; }
.dz-fb-go { display: inline-flex; align-items: center; gap: .4rem; padding: 0; background: none; border: 0; color: var(--brand-line); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
.dz-fb-dot { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; background: var(--brand); border-radius: 999px; color: #fff; box-shadow: 0 0 0 2px #fff; }
.dz-cropbox { position: relative; max-width: 100%; overflow: hidden; border-radius: 4px; background: var(--line); }
.dz-cropbox img { width: 100%; height: 100%; display: block; }
.dz-crop { position: absolute; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 999px rgb(0 0 0 / .45); cursor: move; touch-action: none; }
.readonly .dz-crop { cursor: default; }
.dz-zoom { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .9rem; }
.dz-zoom input { width: 100%; accent-color: var(--brand); }
.dz-stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dz-stats div { padding: .6rem .75rem; background: var(--bg); border-radius: var(--radius); }
.dz-stats div.warn { background: #fbf1e6; color: #6a3d10; }
.dz-stats dt { font-size: .75rem; color: var(--muted); }
.dz-stats .warn dt { color: inherit; }
.dz-stats dd { margin: .15rem 0 0; font-weight: 600; }
.dz-note { display: flex; gap: .5rem; align-items: flex-start; margin: 0; padding: .6rem .75rem; background: #fbf1e6; border-radius: var(--radius); color: #6a3d10; font-size: .85rem; }
.dz-note svg { flex: none; margin-top: 2px; }
.designer-open { flex: none; }
/* Starting a design: the album format and the photo gap. */
.designer-setup-main { width: 100%; max-width: 56rem; box-sizing: border-box; margin: 0 auto; padding: 2.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; }
.designer-setup-main h2 { font-size: 1.75rem; }
.designer-setup-form { display: flex; flex-direction: column; gap: 1.25rem; }
.designer-setup-form h3 { margin: 0 0 .5rem; font-size: 1rem; }
.format-choice { margin: 0 0 1rem; padding: 0; border: 0; }
.format-choice legend { padding: 0 0 .5rem; font-weight: 600; color: var(--muted); font-size: .85rem; }
.format-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.format-option { position: relative; display: flex; align-items: center; gap: .9rem; padding: .9rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.format-option:has(input:checked) { border-color: var(--brand-line); }
.format-option input { position: absolute; opacity: 0; }
.format-option:has(input:focus-visible) { outline: 3px solid var(--brand-line); outline-offset: 2px; }
.format-shape { flex: none; width: 56px; max-height: 40px; background: linear-gradient(90deg, transparent calc(50% - 1px), #b9b2a8 calc(50% - 1px), #b9b2a8 50%, transparent 50%), #ebe7e1; border: 1px solid #cfc6ba; }
.format-text { display: flex; flex-direction: column; gap: .1rem; }
.format-text small { font-size: .8rem; }
.gap-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.gap-field input { width: 5rem; text-align: right; }
@media (max-width: 700px) {
  .designer-top, .designer-main { padding-left: 1rem; padding-right: 1rem; }
  .designer-new { width: 7rem; }
}

/* A choice of two or three, as radio buttons on a line. */
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; padding: 0; border: 0; }
.choice-row legend { width: 100%; padding: 0; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.choice-row label { display: flex; flex-direction: row; align-items: center; gap: .45rem; font-weight: 400; }
.choice-row input[type=radio] { width: auto; flex: none; margin: 0; accent-color: var(--brand); }
.new-book .choice-row { flex-direction: column; }

/* An album type's sizes, and the rows for new ones. */
.atype-row, .size-row { grid-template-columns: minmax(10rem, 1.2fr) minmax(0, 2fr) minmax(6rem, .6fr); }
.lab-row { grid-template-columns: minmax(10rem, 1.2fr) minmax(0, 2fr) minmax(6rem, .6fr); }
.type-name-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.type-name-form .track-actions { margin: 0; }
.type-name-form .button { height: 2.5rem; }
@media (max-width: 560px) { .type-name-form { grid-template-columns: 1fr; } }
.type-edit { display: flex; flex-direction: column; gap: 1rem; }
.size-list { margin: 0; }
.size-rows { width: 100%; border-collapse: collapse; }
.size-rows th { padding: 0 .4rem .3rem 0; text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); }
.size-rows td { padding: 0 .4rem .4rem 0; }
.new-size > summary { display: inline-flex; }

/* One field of the album details. */
.detail-field { display: flex; flex-direction: column; gap: .25rem; }
.detail-field[hidden] { display: none; }
.details-label { font-weight: 600; font-size: .9rem; }
/* The album's facts side by side. */
.details-group.details-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem 1.5rem; align-items: start; }
.details-facts > legend { grid-column: 1 / -1; }
.details-facts .details-fixed { display: flex; flex-direction: column; gap: .15rem; }

/* The details talk's list of photo albums. */
.plain-list { margin: .3rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }

/* The designer isn't for a phone: there it says so instead. */
.designer-phone { display: none; }
@media (max-width: 760px) {
  .designer-body .designer { display: none; }
  .designer-phone { display: flex; flex-direction: column; gap: .75rem; max-width: 28rem; margin: 2rem auto; padding: 0 16px; }
  .designer-phone h1 { margin: 0; font-size: 1.4rem; }
}
