:root {
  --accent: #8a6a4f;
  --bg: #ffffff;
  --surface: #f6f4f0;
  --ink: #1f1d1a;
  --muted: #6f6a63;
  --line: #e6e2db;
  --error: #b3261e;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --row: 280px;
  --gap: 8px;
}
@media (max-width: 700px) { :root { --row: 150px; --gap: 4px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; margin: 0; }
.error { color: var(--error); font-size: 14px; margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font: 400 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; border-radius: 0; transition: opacity .2s;
}
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.85); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); opacity: 1; }

/* ---------- hero: the gallery cover, in one of the designs listed in COVER_LAYOUTS (lib/app.php) ---------- */
.hero { position: relative; min-height: 88vh; min-height: 88svh; display: grid; background: #2a2724; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%); }
.hero-media img[src=""] { visibility: hidden; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.45)); }
.hero-inner { position: relative; place-self: center; padding: 24px 16px; text-align: center; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); }
.hero-sub { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 8px 0 32px; }
.hero h1 + .btn { margin-top: 28px; }

.hero-left .hero-inner { place-self: end start; text-align: left; padding: clamp(24px, 6vw, 72px); }
.hero-left .hero-media::after { background: linear-gradient(15deg, rgba(0,0,0,.6), rgba(0,0,0,.05) 65%); }
.hero-frame::after { content: ""; position: absolute; inset: clamp(12px, 2.5vw, 28px); border: 1px solid rgba(255,255,255,.8); pointer-events: none; }
/* Frame: studio name at the top of the keyline, title and a plain "View gallery" link near the bottom. */
.hero-frame .hero-inner { place-self: stretch; display: flex; flex-direction: column; align-items: center; padding: calc(clamp(12px, 2.5vw, 28px) + clamp(40px, 9vh, 110px)) 24px calc(clamp(12px, 2.5vw, 28px) + clamp(32px, 7vh, 90px)); }
.hero-frame .eyebrow { margin-bottom: auto; }
.hero-frame h1 { font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(32px, 5.5vw, 66px); }
.hero-frame .hero-sub { margin-bottom: 0; }
.hero-frame .hero-inner .btn-ghost { margin-top: clamp(28px, 6vh, 64px); padding: 4px 2px; border: 0; border-bottom: 1px solid rgba(255,255,255,.85); }
.hero-frame .hero-inner .btn-ghost:hover { background: none; opacity: .8; }

/* Light designs: dark title on a plain background beside or below the photo. */
.hero-classic, .hero-split, .hero-novel, .hero-minimal { background: var(--bg); color: var(--ink); }
.hero-classic .hero-media, .hero-split .hero-media, .hero-novel .hero-media { position: relative; inset: auto; }
.hero-classic .hero-media::after, .hero-split .hero-media::after, .hero-novel .hero-media::after { display: none; }
:is(.hero-classic, .hero-split, .hero-novel, .hero-minimal) .btn-ghost { border-color: var(--ink); color: var(--ink); }
:is(.hero-classic, .hero-split, .hero-novel, .hero-minimal) .btn-ghost:hover { background: var(--surface); }
.hero-classic { min-height: 0; grid-template-rows: 72vh auto; grid-template-rows: 72svh auto; }
.hero-classic .hero-inner { padding: 32px 16px 40px; }
.hero-split { grid-template-columns: 1fr 1fr; background: var(--surface); }
.hero-split .hero-inner { padding: 48px clamp(24px, 5vw, 64px); }
.hero-novel { grid-template-columns: 1fr 1fr; padding: clamp(24px, 5vw, 64px); gap: clamp(24px, 5vw, 64px); }
.hero-novel .hero-inner { order: -1; }
/* Split and Novel suit portrait covers: on wide screens the half-width photo grows to about 4:5, up to 1.15 screens tall. */
.hero-split, .hero-novel { min-height: clamp(88vh, 62.5vw, 115vh); min-height: clamp(88svh, 62.5vw, 115svh); }
.hero-minimal { min-height: 0; padding: clamp(48px, 9vw, 110px) 0; border-bottom: 1px solid var(--line); }
.hero-minimal .hero-media { display: none; }
@media (max-width: 700px) {
  .hero-split, .hero-novel { grid-template-columns: 1fr; grid-template-rows: 64vh auto; grid-template-rows: 64svh auto; }
  .hero-novel { padding: 16px 16px 0; gap: 0; }
  .hero-novel .hero-inner { order: 0; }
  .hero-split .hero-inner, .hero-novel .hero-inner { padding: 32px 16px 40px; }
}

/* ---------- toolbar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 3vw, 32px); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.bar-title { font: 400 15px var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; background: none; color: var(--ink);
  font: 400 14px var(--sans); text-decoration: none; cursor: pointer; border-radius: 999px;
}
.tool:hover, .tool.on { background: var(--surface); }
.tool.on .ico svg { fill: var(--accent); stroke: var(--accent); }
.tool-accent { color: var(--accent); border: 1px solid var(--accent); }
.tool .count:not(:empty) { background: var(--accent); color: #fff; border-radius: 999px; min-width: 20px; padding: 0 6px; font-size: 12px; line-height: 20px; text-align: center; }
.ico, .lb-btn, .tile-heart { display: inline-grid; place-items: center; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  .bar-title { font-size: 13px; letter-spacing: .06em; }
  .tool .label { display: none; }
  .tool-accent { font-size: 13px; padding: 6px 10px; }
}

/* ---------- justified grid (keeps photo order, fills each row edge to edge) ---------- */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); padding: var(--gap) clamp(var(--gap), 2vw, 24px) 48px; }
.grid::after { content: ''; flex-grow: 999999; }
.tile { position: relative; margin: 0; flex: var(--r) 1 calc(var(--r) * var(--row)); background: var(--surface); overflow: hidden; }
.tile-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: var(--r); }
.tile-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-open img { transform: scale(1.02); }
.tile-heart {
  position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.28); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s;
}
.tile:hover .tile-heart, .tile-heart.on, .tile-heart:focus-visible { opacity: 1; }
.tile-heart.on svg, .lb-btn.on svg { fill: currentColor; }
.tile-heart.on { color: #fff; background: var(--accent); }
@media (hover: none) { .tile-heart { opacity: 1; background: rgba(0,0,0,.2); } }
.grid-notice { text-align: center; color: var(--muted); padding: 48px 16px; margin: 0; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #fff; color: var(--ink); display: grid; grid-template: auto 1fr / 64px 1fr 64px; }
.lb-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.lb-name { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-actions { display: flex; align-items: center; gap: 4px; }
.lb-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(127,127,127,.18); }
.lb-btn.on { color: var(--accent); }
.lb-buy { width: auto; padding: 0 16px; white-space: nowrap; border-radius: 999px; border: 1px solid currentColor; font: 400 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.lb-stage { grid-area: 2 / 2; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 8px 0 24px; }
.lb-img { max-width: 100%; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); object-fit: contain; user-select: none; }
.lb-nav { grid-row: 2; border: 0; background: none; color: var(--muted); cursor: pointer; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-nav svg { width: 32px; height: 32px; }
.lb-nav:hover { color: var(--ink); }
@media (max-width: 700px) {
  .lightbox { grid-template: auto 1fr / 0 1fr 0; }
  .lb-nav { display: none; }
  .lb-stage { padding: 0; }
}

/* ---------- dialogs ---------- */
.modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; padding: 24px; background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-cart { width: min(560px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(20,18,16,.55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal h2 { font-size: 30px; }
.stack { display: grid; gap: 14px; }
.stack p { margin: 0; }
label { display: grid; gap: 4px; font-size: 14px; }
input, textarea, select { font: 300 16px var(--sans); padding: 10px 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row label.row { display: flex; }
.qty-input { width: 72px; }
.buy-photo { display: flex; align-items: center; gap: 12px; }
.buy-photo img { width: 72px; height: 72px; object-fit: cover; }
.options { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.options legend { font-family: var(--serif); font-size: 20px; margin-bottom: 4px; }
.option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.option input { width: auto; accent-color: var(--accent); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }

.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; }
.cart-desc { display: grid; gap: 2px; font-size: 14px; min-width: 0; }
.cart-desc strong { font-weight: 400; }
.cart-desc .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; }
.stepper button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 0; margin: 16px 0 8px; font-size: 15px; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { font-weight: 500; font-size: 17px; padding-top: 6px; border-top: 1px solid var(--line); }
.paypal-box { margin-top: 16px; min-height: 48px; }
.cart > .fine { margin-bottom: 4px; }

.to-top {
  display: none; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.12); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
@media (max-width: 1024px), (hover: none) { .to-top { display: grid; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; font-size: 14px; max-width: calc(100vw - 32px);
  transition: opacity .5s, transform .5s;
}
.toast.out { opacity: 0; transform: translate(-50%, 8px); }

/* ---------- PIN gate, home, footer ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--surface); }
.gate-card { width: min(420px, 100%); background: var(--bg); padding: 40px 32px; display: grid; gap: 14px; text-align: center; }
.gate-card h1 { font-size: 40px; }
.gate-card .gate-title { font: 300 36px/1.2 var(--sans); }
.gate-card p { margin: 0; }
.gate-card .btn { margin-top: 10px; }
.gate-link { font-size: 13px; color: var(--muted); }
.gate-card label { text-align: left; margin-top: 8px; }
.gate-card input { text-align: center; letter-spacing: .3em; font-size: 20px; }

.site-head { padding: 28px 16px 24px; text-align: center; border-bottom: 1px solid var(--line); }
/* Site name and tagline, styled like the main site's header. The negative margin re-centres text with trailing letter spacing. */
.brand { font: 600 20px/1.3 var(--sans); color: #50565e; text-transform: uppercase; letter-spacing: 7.5px; margin-right: -7.5px; text-decoration: none; }
.tagline { margin: 10px -.32em 0 0; font: 300 13px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 640px) { .brand { font-size: 14px; letter-spacing: 3.5px; margin-right: -3.5px; } .tagline { font-size: 10px; letter-spacing: .26em; margin-right: -.26em; } }
.home { max-width: 1200px; margin: 0 auto; padding: 40px 16px 64px; }
.home h1 { font-size: 44px; text-align: center; margin-bottom: 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card { text-decoration: none; display: grid; gap: 6px; }
.card img { aspect-ratio: 1; width: 100%; object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%); }
.card-title { font: 400 22px/1.25 var(--sans); }
.featured .card-title, .gallery-item .card-title { font-size: 14px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-top: 6px; }
.card-sub { font-size: 13px; color: var(--muted); }
.site-foot { text-align: center; padding: 32px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.site-foot a { text-decoration: none; }

/* ---------- admin ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.admin { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 40px; }
.admin h2 { font-size: 34px; margin-bottom: 12px; }
.admin h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 16px 0 8px; }
.admin p { margin: 0 0 8px; }
.admin-msg { background: var(--surface); padding: 10px 14px; border-left: 3px solid var(--accent); }
.admin-card { border: 1px solid var(--line); padding: 16px; margin-bottom: 12px; display: grid; gap: 12px; }
.admin-card.status-new { border-left: 3px solid var(--accent); }
.admin-card.status-shipped, .admin-card.status-cancelled { opacity: .7; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-row select { width: auto; padding: 6px 10px; font-size: 14px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
@media (max-width: 700px) { .admin-cols { grid-template-columns: 1fr; } }
.admin .label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.admin-items { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.admin code { font-size: 13px; }
.admin .copy { font-size: 13px; font-family: ui-monospace, Menlo, monospace; background: var(--surface); cursor: copy; }
.admin .csv-link { font-size: 13px; }
.admin .ok { color: #2e7d32; }
.admin .note { background: var(--surface); padding: 8px 12px; font-size: 14px; }
.admin-gallery { grid-template-columns: 160px 1fr; align-items: start; }
.admin-gallery img { width: 160px; aspect-ratio: 1; object-fit: cover; }
.admin-fields { display: grid; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: flex; align-items: center; gap: 6px; }
.checks input { width: auto; accent-color: var(--accent); }
.admin-fields .btn { justify-self: start; }
@media (max-width: 600px) { .admin-gallery { grid-template-columns: 1fr; } }
.admin-head { position: sticky; top: 0; z-index: 5; background: var(--bg); gap: 12px; flex-wrap: wrap; }
.admin-nav { display: flex; gap: 18px; font-size: 14px; }
.admin-nav a { text-decoration: none; color: var(--muted); }
.admin-nav a:hover { color: var(--ink); }
.admin section { scroll-margin-top: 90px; }

/* prices editor */
.price-head, .price-row { display: grid; grid-template-columns: 1fr 1.5fr 1.5fr 110px auto; gap: 8px; align-items: center; }
.price-head { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.price-rows { display: grid; gap: 8px; }
.price-row input { padding: 8px 10px; font-size: 15px; }
.price-row label { gap: 2px; }
.m-label { display: none; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.row-tools { display: flex; gap: 2px; }
.row-tools button { width: 32px; height: 36px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; color: var(--muted); }
.row-tools button:hover { color: var(--ink); border-color: var(--muted); }
.row-tools [data-move=remove]:hover { color: var(--error); border-color: var(--error); }
.add-product { justify-self: start; }
.price-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-card > .btn { justify-self: start; }
@media (max-width: 760px) {
  .price-head { display: none; }
  .price-row { grid-template-columns: 1fr 1fr; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .m-label { display: block; }
  .price-row .f-name, .price-row .f-whcc { grid-column: 1 / -1; }
  .row-tools { align-self: end; }
  .price-settings { grid-template-columns: 1fr; }
}
.pin-input { text-align: center; letter-spacing: .3em; font-size: 20px; }

/* gallery list and new-gallery form */
.gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.gallery-item { display: grid; align-content: start; gap: 4px; text-decoration: none; font-size: 13px; }
.gallery-item img, .no-cover { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%); background: var(--surface); }
.no-cover { display: grid; place-items: center; color: var(--muted); }
.gallery-item .card-title { line-height: 1.4; }
.gallery-item:hover img { opacity: .9; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.slug-field { display: flex; align-items: center; border: 1px solid var(--line); background: #fff; padding-left: 10px; font-size: 14px; }
.slug-field .muted { white-space: nowrap; }
.slug-field input { border: 0; padding-left: 2px; min-width: 0; }
.danger { border-color: #e8c3bf; }
.btn-danger { background: var(--error); border-color: var(--error); justify-self: start; }
.danger-text { color: var(--error); }

/* gallery editor */
.admin-wide { max-width: 1280px; gap: 20px; }
.admin-head .back { font-size: 20px; }
.tabs a { padding: 6px 2px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.ed-title { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.ed-title h2 { margin: 0; }
.ed-title a { font-size: 14px; }
.ed-bar { margin-bottom: 12px; }
.ed-bar .btn input { display: none; }
.dropzone { border: 1px dashed var(--line); padding: 18px; text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 16px; transition: background .2s, border-color .2s; }
.dropzone.over { background: var(--surface); border-color: var(--accent); color: var(--ink); }
.upload-status { border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 12px 16px; margin-bottom: 16px; display: grid; gap: 8px; font-size: 14px; }
.upload-status progress { width: 100%; height: 6px; accent-color: var(--accent); }
.error-list { margin: 0; padding-left: 18px; color: var(--error); }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ed-tile { position: relative; margin: 0; display: grid; gap: 4px; }
.ed-img { position: relative; aspect-ratio: 1; background: var(--surface); }
.ed-img img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.ed-tile figcaption { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.ed-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { background: var(--accent); color: #fff; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; flex-shrink: 0; }
.ed-more { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; font-size: 18px; line-height: 1; opacity: 0; transition: opacity .15s; }
.ed-tile:hover .ed-more, .ed-more:focus-visible { opacity: 1; }
@media (hover: none) { .ed-more { opacity: 1; } }
/* Selecting photos to delete several at once. */
.ed-check { position: absolute; z-index: 1; top: 6px; left: 6px; width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; opacity: 0; transition: opacity .15s; }
.ed-tile:hover .ed-check, .ed-check:focus-visible, .selecting .ed-check { opacity: 1; }
.selecting .ed-tile { cursor: pointer; }
.ed-tile.picked .ed-check { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 12l5 5 9-10%27/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--accent); }
.ed-tile.picked .ed-img { outline: 3px solid var(--accent); outline-offset: -3px; }
.select-bar { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); font-size: 14px; }
.select-bar [data-select-count] { margin-right: auto; font-weight: 500; }
.select-bar button:disabled { opacity: .4; cursor: default; }
@media (hover: none) { .ed-check { opacity: 1; } }
.photo-menu { position: absolute; z-index: 30; min-width: 190px; background: var(--bg); box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px 0; display: grid; }
.photo-menu button { border: 0; background: none; text-align: left; padding: 9px 16px; font: 400 14px var(--sans); cursor: pointer; color: inherit; }
.photo-menu button:hover, .photo-menu button:focus-visible { background: var(--surface); outline: none; }

/* cover designer */
.cover-ed { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .cover-ed { grid-template-columns: 1fr; } }
.cover-controls { display: grid; gap: 10px; }
.cover-controls h3 { margin: 4px 0 0; }
.cover-controls .tool { justify-self: start; }
.focal { position: relative; justify-self: start; cursor: crosshair; touch-action: none; user-select: none; }
.focal img { max-height: 300px; width: auto; pointer-events: none; }
.focal-dot { position: absolute; left: var(--fx); top: var(--fy); width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.focal img[hidden] + .focal-dot { display: none; }
.layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lt { display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; background: none; cursor: pointer; font: 400 12px var(--sans); color: var(--ink); }
.lt.on { border-color: var(--accent); }
.lt:hover:not(.on) { border-color: var(--line); }
.lt-box { position: relative; display: grid; aspect-ratio: 16 / 10; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.lt-img { position: absolute; inset: 0; background: var(--cover, none) var(--fx, 50%) var(--fy, 50%) / cover no-repeat, #cfc8be; }
.lt-txt { position: relative; place-self: center; width: 40%; height: 4px; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.4); }
.lt-left .lt-txt { place-self: end start; margin: 0 0 12% 10%; }
.lt-frame .lt-box::after { content: ''; position: absolute; inset: 5px; border: 1px solid #fff; }
.lt-frame .lt-txt { place-self: end center; margin-bottom: 16%; }
.lt-frame .lt-img::after { content: ''; position: absolute; top: 18%; left: 40%; width: 20%; height: 2px; background: #fff; }
.lt-classic .lt-box, .lt-split .lt-box, .lt-novel .lt-box, .lt-minimal .lt-box { gap: 0; }
.lt-classic .lt-txt, .lt-split .lt-txt, .lt-novel .lt-txt, .lt-minimal .lt-txt { background: var(--ink); box-shadow: none; }
.lt-classic .lt-box { grid-template-rows: 70% 1fr; }
.lt-classic .lt-img, .lt-split .lt-img, .lt-novel .lt-img { position: relative; inset: auto; }
.lt-split .lt-box { grid-template-columns: 1fr 1fr; background: var(--surface); }
.lt-split .lt-txt, .lt-novel .lt-txt { width: 60%; }
.lt-novel .lt-box { grid-template-columns: 1fr 1fr; padding: 7%; gap: 7%; }
.lt-novel .lt-txt { order: -1; }
.lt-minimal .lt-img { display: none; }
.pv-toggle { display: flex; gap: 4px; }
.pv-stage { position: relative; overflow: hidden; background: var(--surface); margin-top: 10px; }
.pv-stage iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.pv-stage.mobile iframe { box-shadow: 0 0 0 8px #1f1d1a; border-radius: 2px; }
.pv-stage.mobile { padding: 0; background: none; }
.modal-wide { width: min(980px, calc(100vw - 32px)); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 70vh; overflow: auto; }
.pick-grid button { border: 3px solid transparent; padding: 0; background: var(--surface); cursor: pointer; aspect-ratio: 1; }
.pick-grid button.on, .pick-grid button:hover { border-color: var(--accent); }
.pick-grid img { width: 100%; height: 100%; object-fit: cover; }
.badge-home { background: var(--ink); }
.home-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.home-item { margin: 0; display: grid; align-content: start; gap: 6px; }
.home-item img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface); }
.home-item[draggable] img { cursor: grab; }
.home-item.dragging { opacity: .35; }
.home-item { position: relative; }
.home-item.drop-before::before, .home-item.drop-after::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.home-item.drop-before::before { left: -10px; }
.home-item.drop-after::after { right: -10px; }
.home-item figcaption { display: grid; gap: 6px; font-size: 13px; }
.home-item figcaption a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-summary { border: 1px solid var(--line); background: #fff; padding: 6px 8px; font: 400 13px var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
.cat-summary:hover { border-color: var(--muted); }
/* Category chips (assets/cat-picker.js): tick one or more. */
.field-label { font-size: 14px; margin-bottom: 6px; }
.cat-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: 400 13px var(--sans); color: var(--ink); cursor: pointer; }
.cat-chip:hover { border-color: var(--muted); }
.cat-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-chip.on::before { content: "✓ "; }
.cat-new { border-style: dashed; color: var(--muted); }
.cat-picker .cat-new-input { width: 160px; padding: 5px 12px; font-size: 13px; border-radius: 999px; }

/* ---------- home page portfolio ---------- */
.home { max-width: 1400px; }
.cat-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; margin: 8px 0 36px; }
.cat-filter button { border: 0; border-bottom: 1px solid transparent; background: none; padding: 4px 2px; cursor: pointer;
  font: 300 11.2px var(--sans);   /* the admin tabs (14px) less .2em */
   letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.cat-filter button:focus:not(:focus-visible) { outline: none; }   /* no box after a mouse click; keyboard users still get one */
.cat-filter button:hover { color: var(--ink); }
.cat-filter button.on { color: var(--ink); border-color: var(--ink); }
.portfolio { display: flex; flex-wrap: wrap; gap: var(--gap); }   /* same justified rows as a gallery */
.portfolio::after { content: ''; flex-grow: 999999; }
.pf { display: block; flex: var(--r) 1 calc(var(--r) * var(--row)); aspect-ratio: var(--r); cursor: zoom-in; background: var(--surface); overflow: hidden; }
.pf img { width: 100%; height: 100%; object-fit: cover; }
.pf:hover img { opacity: .92; }
@media (max-width: 700px) { .cat-filter { gap: 6px 20px; } }
.featured { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.featured h2 { font-size: 36px; text-align: center; margin-bottom: 28px; }
.home-note { text-align: center; font-size: 14px; margin: 56px 0 0; }
.home-upload { margin: 12px 0 20px; }
.home-upload.over { border-color: var(--accent); background: var(--surface); }
.home-upload-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.home-upload-row > div:first-child { flex: 1 1 240px; }
.home-upload .btn input { display: none; }

/* Dashboard sections in the top navigation */
.admin .sub-h { margin-top: 40px; }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.admin-nav a { white-space: nowrap; }
@media (max-width: 640px) {
  .admin-nav.tabs { order: 3; width: 100%; overflow-x: auto; gap: 16px; scrollbar-width: none; }
}

/* Vertical grid: columns of equal width (about 300px), photos keep their shape (a gallery's .grid or the home .portfolio).
   Masonry: the same idea with up to three large columns. assets/masonry.js sets --cols and each photo's row span. */
.grid-vertical, .grid-masonry { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-auto-rows: 1px; column-gap: var(--gap); row-gap: 0; align-items: start; }
.grid-vertical::after, .grid-masonry::after { content: none; }
:is(.grid-vertical, .grid-masonry) > :is(.tile, .pf) { display: block; width: 100%; aspect-ratio: var(--r); margin: 0; }

/* Grid style picker on the admin pages */
.grid-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 420px; margin-bottom: 8px; }
.gs { display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; cursor: pointer; font: 400 13px var(--sans); color: var(--ink); }
.gs-box { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 2; border: 1px solid var(--line); background: #fff; }
.gs-box svg { width: 34px; height: 34px; fill: var(--ink); }
.gs.on .gs-box { border: 2px solid var(--accent); }
.gs:hover:not(.on) .gs-box { border-color: var(--muted); }

/* ---------- gallery editor: Pixieset-style sidebar (cover, section icons, pages) ---------- */
.ed-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 24px 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.ed-back { font-size: 30px; line-height: 1; text-decoration: none; color: var(--muted); padding: 4px 10px; }
.ed-back:hover { color: var(--ink); }
.ed-name { display: grid; min-width: 0; }
.ed-name strong { font-weight: 400; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-name a { font-size: 13px; color: var(--muted); text-decoration: none; }
.ed-name a:hover { color: var(--ink); }
.pill { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.ed-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ed-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 72px); }
.ed-side { position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px); overflow: auto; border-right: 1px solid var(--line); background: var(--bg); }
.ed-cover { display: block; }
.ed-cover img, .ed-cover .no-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ed-cover:hover img { opacity: .92; }
.ed-icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; border-bottom: 1px solid var(--line); }
.ed-icons a { display: grid; place-items: center; padding: 14px 0 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.ed-icons a:hover { color: var(--ink); }
.ed-icons a.on { color: var(--ink); border-color: var(--accent); }
.ed-icons svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.side-label { margin: 0; padding: 18px 20px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.ed-sub a { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px; font-size: 15px; text-decoration: none; color: var(--ink); }
.ed-sub a:hover { background: var(--surface); }
.ed-sub a.on { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.ed-sub a.danger-text { color: var(--error); }
.ed-main.admin { max-width: none; margin: 0; padding: 28px 36px 64px; gap: 20px; align-content: start; min-width: 0; }
.ed-main > *, .ed-settings > * { min-width: 0; }   /* wide activity tables scroll inside their box instead of widening the page */
.ed-main h2 { font-size: 30px; margin-bottom: 16px; }
.ed-main .ed-bar h2 { margin: 0; }
.ed-count { font-family: var(--sans); font-size: 16px; }
.ed-main [data-panel^="settings/"] { max-width: 640px; display: grid; gap: 16px; }
.ed-main [data-panel^="settings/"] .btn { justify-self: start; }
.admin-fields label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 16px; }
.admin-fields label.check input { width: auto; accent-color: var(--accent); }
.admin-fields .fine { margin: -2px 0 10px; }
.link-field { display: flex; gap: 8px; }
.link-field input { font-size: 14px; background: var(--surface); }
.seg { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.seg button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 8px 0; margin-bottom: -1px; font: 400 14px var(--sans); color: var(--muted); cursor: pointer; }
.seg button.on { color: var(--ink); border-color: var(--accent); }
.act-table { overflow-x: auto; }
.admin > .tab { min-width: 0; }   /* lets wide tables scroll inside the page on phones instead of widening it */
/* Favorite activity: client list, and a details panel that slides in from the right */
.fav-table tbody tr { cursor: pointer; }
.fav-table tbody tr:hover, .fav-table tbody tr:focus-visible { background: var(--surface); outline: none; }
.fav-table th { white-space: nowrap; }
.fav-list { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.fav-list > * { flex: none; }
.fav-list img { width: 48px; height: 48px; object-fit: cover; }
.drawer {
  margin: 0 0 0 auto; width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  border: 0; padding: 28px 32px; background: var(--bg); color: var(--ink); box-shadow: -10px 0 40px rgba(0,0,0,.15);
  overflow-y: auto;
}
.drawer[open] { animation: drawer-in .25s ease; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer::backdrop { background: rgba(20,18,16,.3); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 28px; margin: 0; }
.drawer-head .ico { width: 36px; height: 36px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.drawer-head .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawer-actions a, .drawer-actions button { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--accent); text-decoration: none; cursor: pointer; }
.drawer-actions a:hover, .drawer-actions button:hover { text-decoration: underline; }
.drawer-facts { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 20px 0; font-size: 14px; }
.drawer-facts dt { color: var(--muted); }
.drawer-facts dd { margin: 0; overflow-wrap: anywhere; }
.drawer-sort { text-align: right; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.fav-photos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fav-photos li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; font-size: 14px; }
.fav-photos img { display: block; width: 112px; height: 112px; object-fit: cover; }
.fav-gone { display: grid; place-items: center; width: 112px; height: 112px; background: var(--surface); color: var(--muted); font-size: 12px; }
@media (max-width: 600px) {
  .drawer { padding: 20px 16px; }
  .drawer-facts { grid-template-columns: 110px 1fr; }
  .fav-photos li { grid-template-columns: 80px 1fr; }
  .fav-photos img, .fav-gone { width: 80px; height: 80px; }
}
.act-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.act-table th { text-align: left; font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.act-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 860px) {
  .ed-head { height: auto; min-height: 64px; flex-wrap: wrap; padding: 8px 12px; }
  .ed-layout { grid-template-columns: 1fr; }
  .ed-side { position: static; height: auto; border-right: 0; }
  .ed-cover img, .ed-cover .no-cover { aspect-ratio: 3 / 1; }
  .ed-sub { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .ed-sub[hidden] { display: none; }
  .ed-sub .side-label { display: none; }
  .ed-sub a { white-space: nowrap; padding: 12px 14px; }
  .ed-sub a.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .ed-main.admin { padding: 20px 16px 48px; }
}

/* Share dialog on the gallery page */
.share-link { display: flex; background: var(--surface); padding: 6px; gap: 6px; }
.share-link input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15px; }
.share-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; padding-top: 8px; }
.share-apps a, .share-apps button { display: grid; justify-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; text-decoration: none; color: var(--muted); font: 300 13px var(--sans); }
.share-apps a:hover, .share-apps button:hover { color: var(--ink); }
.share-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #5f5b56; color: #fff; }
.share-apps a:hover .share-ico, .share-apps button:hover .share-ico { background: var(--ink); }
.share-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 420px) { .share-apps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Share › Email client: the form on the left, a live preview of the email on the right ---------- */
.share { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 620px); gap: 32px; align-items: start; }
.share-form label { display: grid; gap: 6px; font-size: 14px; }
.share-form textarea { resize: vertical; min-height: 220px; font: inherit; line-height: 1.5; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: -6px; }
.share-row .tool { padding-left: 0; }
.share-pins { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.share-pins label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-ghost-dark { background: transparent; color: var(--accent); }
.share-preview { position: sticky; top: 92px; }
.share-preview iframe { display: block; width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 1px solid var(--line); background: #fff; }
@media (max-width: 1100px) {
  .share { grid-template-columns: 1fr; }
  .share-preview { position: static; }
  .share-preview iframe { height: 760px; }
}
.share-pins input { width: auto; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.admin-card.danger label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; }
.admin-card.danger label.check input { width: auto; margin-top: 3px; }
.inline-check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.inline-check input { width: auto; }
.closes-note { margin: 0; padding: 14px 16px 0; text-align: center; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.fav-note { display: block; margin-top: 4px; color: var(--muted); font-style: italic; }
/* Sections bar above the photos in the gallery editor */
.set-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.set-chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: none; font: 400 14px var(--sans); color: var(--ink); cursor: pointer; }
.set-chip.on { border-color: var(--accent); background: var(--surface); }
.tool-select { width: auto; padding: 7px 10px; font-size: 14px; border-radius: 999px; }
.set-tabs { margin: 24px 16px 20px; }
/* Notifications bell (admin) */
.admin-head-end { display: flex; align-items: center; gap: 6px; }
.bell { position: relative; }
.bell summary { list-style: none; position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.bell summary::-webkit-details-marker { display: none; }
.bell summary:hover, .bell[open] summary { background: var(--surface); }
.bell summary svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font: 600 10px/17px var(--sans); text-align: center; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 8px 0; background: var(--bg); box-shadow: 0 10px 34px rgba(0,0,0,.16); text-align: left; }
.bell-head { margin: 0; padding: 8px 16px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bell-menu ul { list-style: none; margin: 0; padding: 0; }
.bell-menu li a { display: grid; gap: 2px; padding: 10px 16px; font-size: 14px; line-height: 1.35; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.bell-menu li a:hover { background: var(--surface); }
.bell-menu li .muted { font-size: 12px; }
.bell-menu form { padding: 8px 10px 0; border-top: 1px solid var(--line); }
.bell-empty, .bell-foot { margin: 0; padding: 8px 16px; }
.ed-icons a { position: relative; }
.ed-icons .dot { position: absolute; top: 10px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ed-sub .count, .card-title .count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: #fff; font: 600 11px/18px var(--sans); letter-spacing: 0; text-align: center; vertical-align: middle; text-transform: none; }
.new-pill { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; }
/* The section bar and selection bar stay in view under the editor header while scrolling the photos. */
.photo-tools { position: sticky; top: 72px; z-index: 5; margin: 0 -8px 4px; padding: 10px 8px 2px; background: var(--bg); }
.photo-tools .set-bar { margin-bottom: 8px; }
@media (max-width: 860px) {
  .ed-head { position: static; }   /* its height varies on phones, so it scrolls away and the tools stick to the top */
  .photo-tools { top: 0; }
}
/* Drag-to-select box in the gallery editor */
.marquee { position: absolute; z-index: 30; border: 1px solid var(--accent); background: rgba(138, 106, 79, .12); pointer-events: none; }
.ed-grid img { -webkit-user-drag: none; user-select: none; }
.ed-grid figcaption { user-select: none; }
body.dragging-select { user-select: none; cursor: crosshair; }
.defaults-card summary { cursor: pointer; font-size: 15px; }
.defaults-card[open] summary { margin-bottom: 12px; }
.short-input { width: 90px; }
/* Print crop: the photo with a draggable frame in the print's shape; outside the frame is darkened */
.crop-wrap { position: relative; margin: 0 auto; overflow: hidden; background: var(--surface); touch-action: none; }
.crop-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.crop-frame { position: absolute; box-shadow: 0 0 0 9999px rgba(20, 18, 16, .5); outline: 2px solid #fff; cursor: grab; }
.crop-frame:active { cursor: grabbing; }
.crop-frame.fixed { cursor: default; box-shadow: none; }
.crop-note { margin-top: 6px; }
.cart-line img { width: 64px; height: auto; max-height: 80px; }
.crop-thumb { float: left; width: 64px; height: auto; margin: 0 12px 6px 0; border: 1px solid var(--line); }
.admin-items li { overflow: hidden; }
/* Print order details panel: the status picker, and each print shown with the client's crop */
.order-status { padding: 16px 0 0; }
.order-status label { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.order-status select { width: auto; }
.order-prints img { height: auto; max-height: 140px; }
.order-prints code { font-size: 13px; }
/* Download activity: a "ZIP" tile stands in for whole-gallery and favorites downloads */
.dl-zip { display: grid; place-items: center; width: 48px; height: 48px; background: var(--surface); color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.fav-photos .dl-zip { width: 112px; height: 112px; }
@media (max-width: 600px) { .fav-photos .dl-zip { width: 80px; height: 80px; } }
/* Print price lists: pick a list, then edit it */
.price-lists { flex-wrap: wrap; row-gap: 0; margin-bottom: 4px; }
.price-use { margin: 12px 0 8px; }
.price-list-tools { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.price-list-tools form { margin: 0; }
.list-name { max-width: 360px; }
