/* Vernier Selects — editorial gallery. Photos are the interface; chrome stays quiet. */
:root {
  --canvas: #F7F5F2; --ink: #141414; --muted: #6B6862; --line: #E4E0DA;
  --accent: #1F3A5F; --accent-ink: #fff; --surface: #fff;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: 8px; --row: 260px; --radius: 12px; --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root { --canvas: #0E0E0E; --ink: #EDEBE7; --muted: #9A968F; --line: #2A2826; --surface: #1A1918; --accent: #8FB3E0; --accent-ink: #0E0E0E; }
}
@media (max-width: 640px) { :root { --row: 150px; --gutter: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--canvas); color: var(--ink); font: 15px/1.5 var(--sans); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.filters { justify-self: end; display: flex; gap: 4px; align-self: center; }
.filters button { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.filters button[aria-selected="true"] { background: var(--ink); color: var(--canvas); }
.filters span { opacity: .6; margin-left: 2px; }

.send { background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 11px 18px; border-radius: var(--radius); font-weight: 600; white-space: nowrap; transition: opacity .18s; }
.send:disabled { opacity: .35; cursor: default; }
.send[hidden] { display: none; }
.ghost { padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }


/* Admin */
.is-admin { overflow-x: auto; }
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 20px 80px; }
.admin h1 { font: 500 30px/1.2 var(--serif); margin: 18px 0 14px; } .admin h1 small { font: 13px var(--sans); color: var(--muted); margin-left: 8px; }
.admin h2 { font: 500 20px var(--serif); margin: 28px 0 8px; }
.admin a { color: var(--accent); }
.admin-nav { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-nav a { color: var(--ink); text-decoration: none; font-weight: 600; } .admin-nav button { color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td, .admin-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table.small { font-size: 12px; }
/* Plain buttons in tables and action rows read as links. :where() keeps this at element specificity, so a
   button with its own class (.send, .danger-btn, .ghost) keeps its colours: filled ones stay readable. */
:where(.admin-table, .admin-actions) button { color: var(--accent); text-decoration: underline; padding: 0; }
.admin-settings { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-settings label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.admin-settings label.check { flex-direction: row; align-items: center; font-size: 14px; color: var(--ink); }
.admin input:not([type=checkbox]) { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--ink); min-width: 160px; }
.admin-login { max-width: 320px; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 12px; }
.admin-error { color: #B3412F; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); white-space: nowrap; }
/* Guest progress (GUEST_STATUS in bootstrap.php): Hasn't opened · Opened · Selecting · Sent · Changed since sending */
.s-sent { background: #DCEBDD; color: #23502A; } .s-changed { background: #F6E3C6; color: #6A4510; } .s-selecting { background: #DCE5F2; color: #1F3A5F; }
.s-opened { background: color-mix(in srgb, var(--accent) 7%, var(--line)); }
.mono { font-family: Menlo, Consolas, monospace; font-size: 13px; }
@media (max-width: 640px) { .filters button { padding: 6px 10px; } }
.admin-filters { justify-content: flex-start; margin-bottom: 12px; }
.admin-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.admin-thumbs figure { margin: 0; } .admin-thumbs figure[hidden] { display: none; }
.admin-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.admin-thumbs .is-on img { outline: 3px solid var(--accent); outline-offset: -3px; }
.admin-thumbs .is-off img { opacity: .55; }
.admin-thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-thumbs .is-on figcaption { color: var(--accent); font-weight: 600; }


/* Admin: self-serve */
.admin-nav .brand { font-weight: 600; }
.admin-nav .links { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.admin-nav .links a { color: var(--muted); font-weight: 400; } .admin-nav form { display: inline; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 16px 0 0; background: #DCEBDD; color: #23502A; }
.flash-error { background: #F6DAD3; color: #7A2A1C; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.empty-note { color: var(--muted); padding: 14px 0; }
.admin-settings.stacked { flex-direction: column; align-items: stretch; max-width: 520px; }
.admin-login label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.admin-table form.inline input { min-width: 140px; padding: 5px 8px; }
.admin-table form.inline button { text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; }
.add-guest { margin-top: 12px; } .add-guest input { min-width: 200px; } .add-guest button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; }
.ghost { display: inline-block; cursor: pointer; }
details.danger { margin: 14px 0; } details.danger summary { cursor: pointer; color: #B3412F; font-size: 14px; }
details.danger form { margin-top: 10px; padding: 14px; border: 1px solid #E8C4BC; border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
details.danger label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.danger-btn { background: #8A3B2E; color: #fff; text-decoration: none; padding: 9px 14px; border-radius: 8px; align-self: flex-start; }
details summary { cursor: pointer; }
.finish { display: flex; flex-direction: column; gap: 6px; } .finish form { display: flex; gap: 12px; align-items: center; }
.uploader { margin: 22px 0 8px; }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 26px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.drop strong { font: 500 20px var(--serif); } .drop p { margin: 8px 0; } .drop .buttons { display: flex; gap: 10px; justify-content: center; }
.plan { margin-top: 14px; } .plan .buttons { display: flex; gap: 10px; }
.progress { margin-top: 14px; } .progress .bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.admin-thumbs figure { position: relative; }
.admin-thumbs .remove { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .15s; }
.admin-thumbs figure:hover .remove, .admin-thumbs .remove:focus-within { opacity: 1; }
.admin-thumbs .remove button { background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; }
@media (hover: none) { .admin-thumbs .remove { opacity: 1; } }
details.removed { margin: 12px 0; font-size: 14px; } details.removed ul { margin: 8px 0; padding-left: 18px; }
details.confirm-send { display: inline-block; vertical-align: top; margin: 4px 10px 4px 0; }
details.confirm-send summary { display: inline-block; padding: 8px 14px; border: 1px solid var(--accent); color: var(--accent); border-radius: 8px; font-size: 14px; list-style: none; }
details.confirm-send summary::-webkit-details-marker { display: none; }
details.confirm-send[open] summary { background: var(--accent); color: var(--accent-ink); }
details.confirm-send form { margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 520px; background: var(--surface); }
details.confirm-send .buttons { display: flex; gap: 10px; margin: 8px 0 0; }
details.bulk-paste { margin: 12px 0; } details.bulk-paste form { margin-top: 8px; }
code.gallery-pw { font-size: 15px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); user-select: all; }
@media (max-width: 700px) {
  .admin-table { display: block; overflow-x: auto; }
  .admin-settings { flex-direction: column; align-items: stretch; }
  .admin-settings input:not([type=checkbox]):not([type=radio]), .admin-settings select, .admin-settings textarea { width: 100%; min-width: 0; box-sizing: border-box; }
  .admin-nav { flex-wrap: wrap; gap: 8px; }
  .admin-thumbs .remove { opacity: 1; }
}
.add-guest { flex-wrap: wrap; } .add-guest input { min-width: 0; flex: 1 1 160px; }
fieldset.which { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
fieldset.which legend { font-weight: 600; padding: 0 4px; } fieldset.which label { display: flex; gap: 8px; align-items: center; }
fieldset.which input { width: auto; min-width: 0; margin: 0; flex: none; }
fieldset.which label { justify-content: flex-start; text-align: left; width: 100%; } fieldset.which label input { flex: 0 0 auto; width: 16px; }
.staff-pick { position: absolute; top: 6px; left: 6px; }
.staff-pick button { background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.staff-pick button[aria-pressed="true"] { background: var(--accent); }
.admin-thumbs figcaption input { width: auto; min-width: 0; margin: 0 4px 0 0; vertical-align: middle; }
.move-bar { margin: 12px 0 4px; flex-wrap: wrap; } .move-bar select { min-width: 180px; }
.move-bar button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
fieldset.reminder-rules { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; flex-basis: 100%; }
fieldset.reminder-rules legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
fieldset.reminder-rules input[type=number] { width: 70px; min-width: 0; }
fieldset.reminder-rules label { flex-direction: row; align-items: center; gap: 8px; }
fieldset.limit-choice { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; flex-basis: 100%; }
fieldset.limit-choice legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
fieldset.limit-choice label { flex-direction: row; align-items: center; gap: 8px; }
fieldset.limit-choice input[type=number] { width: 80px; min-width: 0; }
fieldset.limit-choice input[type=radio] { width: auto; min-width: 0; margin: 0; }
.status.s-over { background: #FBE3E1; color: #9B2C22; }


/* Notes in the admin */
.status.s-retouch { background: #F6E3C6; color: #6A4510; font-weight: 600; }
.admin-thumbs .guest-note { margin: 4px 0 0; font-size: 12px; line-height: 1.35; color: var(--ink); white-space: normal; }
.admin-thumbs .guest-note.is-hidden { opacity: .6; }
.admin-thumbs .staff-note { margin-top: 4px; font-size: 12px; } .admin-thumbs .staff-note summary { color: var(--muted); }
.admin-thumbs .staff-note form { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.admin-thumbs .staff-note textarea { font: 12px/1.35 var(--sans); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #FFFBEA; color: #141414; resize: vertical; }
.admin-thumbs .staff-note button { align-self: flex-start; font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; }
.admin-actions label.check { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; margin-left: 6px; }
ul.sent-notes { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }

/* Printable picks sheet */
.is-print { background: #fff; color: #141414; font-size: 13px; }
.print-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 20px; border-bottom: 1px solid #E4E0DA; background: #F7F5F2; position: sticky; top: 0; }
.print-bar a { color: #1F3A5F; } .print-bar label { display: flex; gap: 6px; align-items: center; } .print-bar .send { margin-left: auto; }
.print-guest { max-width: 900px; margin: 0 auto; padding: 24px 20px; }
.print-guest h1 { font: 500 26px/1.2 var(--serif); margin: 0 0 4px; }
.print-meta { color: #6B6862; margin: 0 0 14px; } .print-empty { max-width: 900px; margin: 0 auto; padding: 0 20px 24px; }
.print-flag { color: #8A3B2E; font-weight: 600; }
.print-picks { width: 100%; border-collapse: collapse; }
.print-picks th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6B6862; border-bottom: 1.5px solid #141414; padding: 6px 8px; }
.print-picks td { padding: 6px 8px; border-bottom: 1px solid #DDD8D0; vertical-align: top; }
.print-picks tr { break-inside: avoid; }
.td-thumb { width: 72px; } .td-thumb img { width: 64px; height: 64px; object-fit: cover; display: block; border-radius: 3px; }
.print-retouch { display: inline-block; padding: 1px 6px; border: 1.5px solid #141414; border-radius: 4px; font-size: 11px; letter-spacing: .06em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print {
  @page { margin: 14mm; }
  .print-bar { display: none; }
  .print-guest { padding: 0; max-width: none; }
  .print-guest + .print-guest { break-before: page; }
  .is-print { font-size: 11pt; }
}

/* ═══ Guest pages: gallery, password and message pages ═══════════════════════════════════════
   Two looks share one set of markup: <html class="look-airy"> (bright and airy, the default) or
   <html class="look-dark">, chosen per event. Only custom properties differ between them.
   Fonts: Newsreader (titles) and Source Sans 3 (UI), Vernier Studio's brand fonts, served from
   assets/fonts/ (SIL Open Font License; the licences sit next to the files). */
@font-face { font-family: "VS Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "VS Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "VS Source Sans"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-sans-3-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "VS Source Sans"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-sans-3-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Contrast (WCAG AA): airy text #1F1D1B on #FAF8F5 15.9:1, secondary #6E6A66 5.1:1, white on the
   sage accent #66705E 5.2:1, accent as text on the page 4.9:1. Dark: #EDEBE7 on #0E0E0E 16.2:1,
   secondary #9A968F 6.6:1, #0E0E0E on #8FB3E0 8.9:1. */
:root.look-airy {
  color-scheme: light;
  --canvas: #FAF8F5; --surface: #FFFFFF; --ink: #1F1D1B; --muted: #6E6A66; --line: #E7E2DC;
  --accent: #66705E; --accent-ink: #FFFFFF; --warn: #9F2F22; --wash: #F1EEE8;
  --scrim: rgba(31,29,27,.32); --shadow: 0 8px 30px rgba(31,29,27,.10); --header: rgba(250,248,245,.94);
}
:root.look-dark {
  color-scheme: dark;
  --canvas: #0E0E0E; --surface: #1A1918; --ink: #EDEBE7; --muted: #9A968F; --line: #2E2C29;
  --accent: #8FB3E0; --accent-ink: #0E0E0E; --warn: #F08A7A; --wash: #1A1918;
  --scrim: rgba(0,0,0,.6); --shadow: 0 10px 40px rgba(0,0,0,.5); --header: rgba(14,14,14,.94);
}
:root[data-look] {
  --serif: "VS Newsreader", Georgia, serif; --sans: "VS Source Sans", system-ui, -apple-system, sans-serif;
  --radius: 2px; --edge: 20px; --gap: 6px; --cols: 4; --top-h: 68px; --ease: cubic-bezier(.2,.7,.2,1);
  --label: 600 11.5px/1.2 var(--sans);   /* small uppercase labels, with wide letter spacing */
}
@media (min-width: 1600px) { :root[data-look] { --cols: 5; } }
@media (max-width: 1199px) { :root[data-look] { --cols: 3; } }
@media (max-width: 760px) { :root[data-look] { --cols: 2; --edge: 10px; --gap: 4px; --top-h: 104px; } }
@media (prefers-reduced-motion: no-preference) { :root[data-look] { scroll-behavior: smooth; } }
[data-look] body { font: 16px/1.5 var(--sans); }
[data-look] .i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[data-look] .label, [data-look] .eyebrow { font: var(--label); letter-spacing: .2em; text-transform: uppercase; }

/* Buttons: one solid accent button, square corners, small letter-spaced capitals. */
[data-look] .send, [data-look] .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  border-radius: var(--radius); font: var(--label); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
[data-look] .send { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
[data-look] .send:disabled { opacity: .4; }
[data-look] .ghost { border: 1px solid var(--line); color: var(--ink); background: transparent; }
[data-look] .ghost .i { width: 18px; height: 18px; }
[data-look] .ghost:hover { border-color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--ink); }
.icon-btn[hidden] { display: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* Cover: the guest's first (or chosen) photo, full screen. */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #1F1D1B; color: #fff; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.18) 60%, rgba(0,0,0,.5) 100%); }
.cover-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 24px max(56px, calc(env(safe-area-inset-bottom) + 40px)); text-align: center; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.cover-studio { margin: 0 0 14px; font: var(--label); letter-spacing: .28em; text-transform: uppercase; opacity: .9; }
.cover-title { margin: 0; font: 400 clamp(34px, 6vw, 72px)/1.05 var(--serif); letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.cover-meta { margin: 14px 0 26px; font: 500 12px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .92; }
.cover-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 26px; border: 1px solid rgba(255,255,255,.85); color: #fff; text-decoration: none;
  font: var(--label); letter-spacing: .24em; text-transform: uppercase; text-shadow: none; transition: background .2s, color .2s; }
.cover-cta:hover, .cover-cta:focus-visible { background: #fff; color: #1F1D1B; }
@media (prefers-reduced-motion: no-preference) {
  .cover-img { animation: cover-in 1.2s var(--ease) both; }
  .cover-text { animation: cover-text-in .9s .25s var(--ease) both; }
}
@keyframes cover-in { from { opacity: 0; transform: scale(1.03); } }
@keyframes cover-text-in { from { opacity: 0; transform: translateY(12px); } }

/* Header: slim, sticky, no border until it's over photos. */
.top { position: sticky; top: 0; z-index: 15; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: var(--top-h); padding: 10px var(--edge); background: var(--header); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { min-width: 0; }
.top-title { margin: 0; font: 500 19px/1.2 var(--serif); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio { margin: 2px 0 0; font: 500 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
[data-look] .filters { justify-self: center; display: flex; gap: 2px; }
[data-look] .filters button { min-height: 44px; padding: 0 12px; border-radius: 0; font: var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid transparent; }
[data-look] .filters button[aria-selected="true"] { background: none; color: var(--ink); border-bottom-color: var(--ink); }
[data-look] .filters span { opacity: .7; margin-left: 3px; font-weight: 500; }
.top-tools { justify-self: end; display: flex; gap: 2px; }
.top-tools:empty { display: none; }
.meta-line { margin: 18px var(--edge) 18px; text-align: center; font: 500 12px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
@media (hover: none) { .help-btn { display: none; } }
@media (max-width: 760px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 6px var(--edge) 0; }
  [data-look] .filters { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
  [data-look] .filters button { padding: 0 10px; letter-spacing: .12em; }
  .top-title { font-size: 17px; }
  .meta-line { margin: 14px var(--edge); font-size: 11px; letter-spacing: .14em; }
}

/* Banners: quiet lines of text, not boxes. */
.banner { max-width: 760px; margin: 0 auto 18px; padding: 12px 18px; background: var(--wash); color: var(--ink); font-size: 15px; text-align: center; }
.banner[hidden] { display: none; }
@media (max-width: 760px) { .banner { margin: 0 var(--edge) 14px; } }
.pick-hint { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 2px 2px 18px; border-left: 2px solid var(--accent); }
.hint-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; color: var(--muted); }
.hint-close .i { width: 18px; height: 18px; }
/* "Preview as guest": a fixed strip so staff never mistake it for the live gallery. */
.preview-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 30; margin: 0; padding: 8px 14px; text-align: center;
  font: 600 13px/1.5 var(--sans); background: #8A3B2E; color: #fff; }
.is-preview { padding-top: 54px; } .is-preview .top { top: 54px; }
@media (min-width: 641px) { .is-preview { padding-top: 36px; } .is-preview .top { top: 36px; } }

/* Masonry grid: photos keep their shape. app.js places each tile in the shortest column (--cols);
   without it, plain CSS columns. */
.grid { columns: var(--cols); column-gap: var(--gap); padding: 0 var(--edge) 150px; }
.grid.is-masonry { columns: auto; position: relative; }
.tile { position: relative; margin: 0 0 var(--gap); break-inside: avoid; aspect-ratio: var(--r); background: var(--line); overflow: hidden; scroll-margin: calc(var(--top-h) + 12px) 0 120px; }
.grid.is-masonry .tile { position: absolute; margin: 0; aspect-ratio: auto; }
.tile[hidden] { display: none; }
.tile .open { display: block; position: relative; width: 100%; height: 100%; padding: 0; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.tile img.ready { opacity: 1; }
/* Hover (and picked tiles on touch screens): a soft shade along the bottom edge behind thin white icons. */
.tile .open::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; max-height: 120px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.5)); opacity: 0; transition: opacity .25s var(--ease); }
.tile-expand { position: absolute; left: 8px; bottom: 8px; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; opacity: 0; transition: opacity .25s var(--ease); pointer-events: none; }
.tile-expand .i { width: 20px; height: 20px; }
@media (hover: hover) {
  .tile:hover .open::after, .tile:focus-within .open::after { opacity: 1; }
  .tile:hover .tile-expand, .tile:focus-within .tile-expand { opacity: 1; }
  .tile.is-picked:hover .tile-expand, .tile.is-picked:focus-within .tile-expand { opacity: 0; } /* the note button sits there */
}
@media (hover: none) { .tile.is-picked .open::after { opacity: .85; } }
/* Picked: a thin accent line round the photo, drawn over it. */
.tile::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 2px var(--accent); opacity: 0; transition: opacity .2s; }
.tile.is-picked::before { opacity: 1; }
.tile .open:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
/* Pick button: a 44px tap target round a 30px circle. Not picked: a thin white ring. Picked: filled accent with a white tick. */
.pick { position: absolute; top: 4px; right: 4px; z-index: 2; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.pick .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.2); border: 1.5px solid #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 1px 6px rgba(0,0,0,.35);
  transition: transform .2s var(--ease), background .18s, border-color .18s; }
.pick .i { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; opacity: 0; }
.tile:hover .pick .dot, .pick:focus-visible .dot { background: rgba(0,0,0,.3); transform: scale(1.06); }
.pick:focus-visible { outline: none; } .pick:focus-visible .dot { outline: 2px solid #fff; outline-offset: 2px; }
.tile.is-picked .pick .dot { background: var(--accent); border-color: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.35); animation: pop .24s var(--ease); }
.tile.is-picked .pick .i { stroke: var(--accent-ink); opacity: 1; }
@keyframes pop { 0% { transform: scale(.7); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.is-locked .tile:not(.is-picked) .pick { display: none; }
.is-locked .pick { pointer-events: none; }
/* Note button on picked photos: thin white speech bubble, bottom-left (PROOF has the bottom-right). */
.note-btn { position: absolute; left: 2px; bottom: 2px; z-index: 2; min-width: 44px; height: 44px; padding: 0 6px; display: flex; align-items: center; justify-content: flex-start; gap: 6px; color: #fff; }
.note-btn[hidden] { display: none; }
.note-btn .dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.note-btn .i { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.note-btn.has-note .dot { background: rgba(255,255,255,.95); color: #1F1D1B; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.note-btn.has-note .i { filter: none; width: 17px; height: 17px; fill: currentColor; fill-opacity: .12; }
@media (hover: hover) { .tile:not(:hover):not(:focus-within) .note-btn:not(.has-note) { opacity: 0; } }
.note-flag { order: 2; font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 5px 7px; border-radius: var(--radius); background: #F2E6D3; color: #5E3D0E; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.note-flag[hidden] { display: none; }
.is-locked .note-btn { pointer-events: auto; }
.empty { text-align: center; color: var(--muted); margin: 10vh 24px 0; }

/* Selection tray: a floating white bar on desktop, a full-width bottom bar on phones. */
.tray { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 16px; min-width: min(580px, calc(100vw - 24px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: opacity .3s var(--ease), transform .3s var(--ease); }
.at-cover .tray { opacity: 0; pointer-events: none; transform: translate(-50%, 16px); }
.tray.nudge { animation: nudge .35s var(--ease); }
@keyframes nudge { 20%, 60% { transform: translateX(calc(-50% - 6px)); } 40%, 80% { transform: translateX(calc(-50% + 6px)); } }
.tray-thumbs { display: flex; gap: 4px; }
.tray-thumbs:empty { display: none; }
.tray-thumbs img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--radius); }
.tray-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14px; line-height: 1.35; }
.tray-text strong { font-weight: 600; font-size: 15px; }
.tray-status { font-size: 14px; }
.tray-status.is-sent { color: var(--accent); font-weight: 600; }
.tray-status.is-warn { color: var(--warn); }
.tray.is-over [data-tray-count] { color: var(--warn); }
.is-offline .unsaved-note { display: none !important; }
.unsaved-note { display: none; color: var(--warn); } .is-unsaved .unsaved-note { display: inline; } .is-unsaved .saved { display: none; }
.tray-link { white-space: nowrap; align-self: flex-start; padding: 2px 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.tray-link[hidden] { display: none; }
.saved { color: var(--muted); } .saved::before { content: "✓ "; }
.saved[hidden], .tray-status[hidden] { display: none; }
[data-look] .send[hidden] { display: none; }
@media (max-width: 640px) {
  .tray-thumbs { display: none; }
  /* Phone: text on top, a full-width Send underneath, so neither wraps awkwardly. */
  .tray { left: 0; right: 0; bottom: 0; transform: none; min-width: 0; width: auto; flex-wrap: wrap; gap: 8px 10px;
    padding: 12px var(--edge) max(12px, env(safe-area-inset-bottom)); border-width: 1px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.06); }
  .at-cover .tray { transform: translateY(16px); }
  @keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
  .tray-text { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 14px; }
  .tray-text strong { flex-basis: 100%; }
  /* 44px to tap, without making the tray taller: it reaches into the row above and down to the Send button. */
  .tray-link { display: inline-flex; align-items: center; min-height: 44px; margin: -14px -8px -8px; padding: 0 8px; }
  .tray .send { flex: 1 1 100%; }
  .grid { padding-bottom: 180px; }
}

/* Viewer: the page colour all round, the photo centred with room to breathe, thin icons. */
.lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--canvas); color: var(--ink); }
.lightbox[hidden] { display: none; }
.lightbox > img { max-width: calc(100vw - 260px); max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); object-fit: contain; }
.lightbox.is-picked > img { outline: 2px solid var(--accent); outline-offset: 6px; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px; }
.lb-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lb-tools { display: flex; gap: 2px; align-items: center; min-width: 0; }
.lb-tools[hidden] { display: none; }
.lb-note, .lb-retouch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--ink); font-size: 14px; }
.lb-note:hover, .lb-retouch:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lb-note .i, .lb-retouch .i { width: 20px; height: 20px; }
.lb-note span { max-width: min(300px, 40vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-note.has-note span { font-style: italic; }
.lb-note.has-note span::before { content: "“"; } .lb-note.has-note span::after { content: "”"; }
.lb-note.has-note .i { color: var(--accent); fill: currentColor; fill-opacity: .15; }
.lb-note[hidden], .lb-retouch[hidden] { display: none; }
.lb-retouch[aria-pressed="true"] { background: #F2E6D3; color: #5E3D0E; font-weight: 600; }
.lb-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px 0 14px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font: var(--label); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.lb-pick[hidden] { display: none; }
.lb-pick-dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; }
.lb-pick-dot .i { width: 14px; height: 14px; stroke-width: 2; opacity: 0; }
.lb-pick[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.lb-pick[aria-pressed="true"] .lb-pick-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lb-pick[aria-pressed="true"] .lb-pick-dot .i { opacity: 1; }
[data-look] .lb-pick kbd { font: 500 10px var(--sans); letter-spacing: 0; padding: 1px 5px; border: 1px solid currentColor; border-radius: 3px; background: transparent; color: inherit; opacity: .6; }
@media (hover: none) { .lb-pick kbd { display: none; } }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 56px; height: 72px; color: var(--ink); opacity: .75; }
.lb-nav:hover { opacity: 1; }
.lb-nav .i { width: 30px; height: 30px; stroke-width: 1.2; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-bar { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 0 16px; font-size: 13px; color: var(--muted); }
.lb-bar [data-lb-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pos { font: var(--label); letter-spacing: .16em; }
@media (max-width: 640px) {
  .lightbox > img { max-width: 100vw; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
  .lightbox.has-tools > img { max-height: calc(100dvh - 220px); }
  .lightbox.is-picked > img { outline-offset: -2px; }
  .lb-top { padding: max(4px, env(safe-area-inset-top)) 6px 4px; }
  .lb-tools { position: fixed; left: 0; right: 0; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 26px); justify-content: center; padding: 0 8px; gap: 4px; }
  .lb-note { flex: 0 1 auto; min-width: 0; } .lb-note span { max-width: 42vw; }
  .lb-retouch { flex: none; white-space: nowrap; }
  .lb-nav { width: 44px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--canvas) 70%, transparent); opacity: .95; }
  .lb-nav .i { width: 24px; height: 24px; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
}
/* Note panel */
.lb-note-sheet { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3; width: min(560px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.lb-note-sheet[hidden] { display: none; }
.lb-note-sheet label { font: var(--label); letter-spacing: .18em; text-transform: uppercase; }
.lb-note-sheet label .hint { font: 400 13px var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 4px; }
.lb-note-sheet textarea { font: 16px/1.5 var(--sans); padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--canvas); color: var(--ink); resize: vertical; min-height: 92px; }
.lb-note-sheet textarea:focus { outline: none; border-color: var(--accent); }
.lb-note-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.lb-note-row .send { margin-left: auto; }
.lb-note-saved::before { content: "✓ "; } .lb-note-saved[hidden] { display: none; }

/* Sheets: send, list, shortcuts */
.sheet-scrim { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.sheet-scrim[hidden] { display: none; }
.sheet { width: min(760px, 100vw); max-height: 88vh; overflow: auto; padding: 32px 28px max(24px, env(safe-area-inset-bottom)); background: var(--canvas); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: up .24s var(--ease); } }
.sheet[hidden] { display: none; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font: 400 30px/1.15 var(--serif); margin: 0 0 8px; }
.sheet-sub { color: var(--muted); margin: 0 0 20px; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin-bottom: 24px; }
.sheet-grid figure { margin: 0; position: relative; }
.sheet-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sheet-grid figcaption { font-size: 12px; color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-grid .cap-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-style: italic; color: var(--ink); opacity: .85; }
.sheet-grid .cap-note::before { content: "“"; } .sheet-grid .cap-note::after { content: "”"; }
.sheet-grid .is-removed img { opacity: .4; }
.chip { position: absolute; top: 6px; left: 6px; font: 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 5px 7px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }
.chip.removed { background: #8A3B2E; color: #fff; }
.chip.retouch { left: auto; right: 6px; background: #F2E6D3; color: #5E3D0E; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.done { text-align: center; } .done p { color: var(--muted); } .done .sheet-actions { justify-content: center; }
.list-text { width: 100%; margin-bottom: 18px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; resize: vertical; }
.help-scrim { align-items: center; z-index: 70; } .help { max-width: 520px; border-radius: var(--radius); } .help h2 { margin-bottom: 18px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 22px; font-size: 15px; }
.keys dt { white-space: nowrap; } .keys dd { margin: 0; color: var(--muted); }
[data-look] kbd { font: 12px var(--sans); padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); }
@media (max-width: 640px) { .sheet { padding: 26px 18px max(18px, env(safe-area-inset-bottom)); } .sheet h2 { font-size: 26px; } .sheet-actions > * { flex: 1 1 auto; } }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: var(--radius); background: var(--ink); color: var(--canvas); font-size: 14px; text-align: center; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }

/* Message and password pages */
.message { max-width: 540px; margin: 0 auto; padding: 22vh 24px 40px; text-align: center; }
.message h1 { font: 400 clamp(30px, 5vw, 44px)/1.1 var(--serif); letter-spacing: .06em; text-transform: uppercase; margin: 14px 0 16px; overflow-wrap: anywhere; }
.message p { color: var(--muted); }
.message .eyebrow { color: var(--muted); margin: 0; }
.is-gallery .message { padding-top: 12vh; }
.gate { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 30px auto 0; }
.gate input { font: inherit; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: center; }
.gate input:focus { outline: none; border-color: var(--accent); }
.gate .admin-error { color: var(--warn); margin: 0; }
.message .hint { font-size: 14px; margin-top: 22px; }
/* Home page: "Lost your link?" (a disclosure, so it works without JS) */
.lost-link { margin-top: 18px; }
.lost-link summary { display: inline-block; padding: 10px 4px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.lost-link summary::-webkit-details-marker { display: none; }
.lost-link .gate { margin-top: 10px; }
.lost-link .gate .hint { margin: 0; }
.lost-link-sent { font-size: 14px; margin-top: 22px; overflow-wrap: anywhere; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Team access panel */
.team-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.team-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.status.status-active { background: #DCEBDD; color: #23502A; } .status.status-suspended { background: #FBE3E1; color: #9B2C22; } .status.status-invited { font-style: italic; }
.event-access { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 640px; }
.event-access-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 12px; }
.event-access-tools button { color: var(--accent); text-decoration: underline; padding: 0; font-size: 14px; }
.event-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.event-list label.check { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.event-list label[hidden] { display: none; }
.event-past { margin: 8px 0 14px; } .event-past summary { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.admin-actions form.inline { display: inline-block; margin: 0 16px 8px 0; }
.admin h1 .status { font-family: var(--sans); vertical-align: middle; }
@media (max-width: 700px) {
  .admin-nav .links { flex-wrap: wrap; gap: 6px 16px; } .admin-nav .links a, .admin-nav .links button { white-space: nowrap; }
  .admin-table.team-table, .team-table tbody, .team-table tr, .team-table td { display: block; }
  .team-table tr:first-child, .team-table td.manage { display: none; }
  .team-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .team-table tr[hidden] { display: none; } /* rows are display:block here, which beats the browser's [hidden] */
  .team-table td { border: 0; padding: 2px 0; }
  .team-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
}

/* ═══ Finals: the Finals | Proofs tabs, the download grid and viewer, the archived message ═══ */
.view-finals [data-proofs-view], .view-proofs [data-finals-view] { display: none; }
.view-proofs .finals-tools { visibility: hidden; }
[data-look] .view-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font: var(--label); letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
[data-look] .view-tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
[data-look] .view-tabs span { opacity: .7; margin-left: 3px; font-weight: 500; }
[data-look] .view-tabs span:empty { display: none; }
[data-look] .subfilters { justify-content: center; align-items: center; margin: 14px var(--edge) 0; }
.subfilters .icon-btn { margin-left: 6px; }
/* Download button on each final: the same 44px target and white ring as the pick circle. */
.dl-btn { position: absolute; top: 4px; right: 4px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.dl-btn .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.24); border: 1.5px solid #fff;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 1px 6px rgba(0,0,0,.35); transition: background .18s, transform .2s var(--ease); }
.dl-btn .i { width: 17px; height: 17px; stroke: #fff; stroke-width: 1.8; }
.dl-btn:hover .dot, .dl-btn:focus-visible .dot { background: var(--accent); border-color: #fff; transform: scale(1.06); }
.dl-btn:focus-visible { outline: none; } .dl-btn:focus-visible .dot { outline: 2px solid #fff; outline-offset: 2px; }
.ftile.no-preview .open { display: grid; place-items: center; background: var(--wash); }
.tile-file { padding: 12px; font: 500 13px/1.4 var(--sans); color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.ftray .tray-text strong { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.ftray .tray-status { color: var(--muted); }
.ftray .send .i { width: 18px; height: 18px; }
.lb-download { text-decoration: none; }
.lb-download .i { width: 18px; height: 18px; }
.lb-file { margin: 0; padding: 0 24px; text-align: center; color: var(--muted); }
.lb-file[hidden], .lightbox > img[hidden] { display: none; }
.archived-msg a { color: var(--accent); }
.is-gallery .finals-view .message { padding-top: 10vh; }
@media (max-width: 760px) {
  [data-look] .view-tabs { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
  [data-look] .view-tabs a { padding: 0 12px; letter-spacing: .12em; }
  .top-spacer { display: none; }
}

/* Finals in the admin */
.finals-status { margin: 4px 0; font-size: 14px; }
.retention-line { margin: 4px 0 10px; }
.status.s-f-delivered, .status.s-f-ready { background: #DCE5F2; color: #1F3A5F; }
.status.s-f-downloaded { background: #DCEBDD; color: #23502A; }
.status.s-f-archived { background: #F6E3C6; color: #6A4510; }
.status.s-f-deleted, .status.s-f-not-delivered { background: var(--line); color: var(--muted); }
.finals-thumbs.is-archived img { opacity: .5; }
.finals-thumbs a { display: block; }
.finals-thumbs .final-meta { margin: 2px 0 0; }
/* Per-final Remove / Delete forever: under the caption (not over the photo), a 44px target */
.final-act { display: block; margin: 6px 0 0; }
details.final-act > summary { min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; padding: 0 14px; border-radius: 8px; cursor: pointer; }
details.danger.final-act > summary { border: 1px solid #E8C4BC; }
details.final-act form { max-width: 520px; }
.finals-thumbs figure:has(details.final-act[open]) { grid-column: 1 / -1; }
.finals-thumbs figure:has(details.final-act[open]) > :is(a, .no-preview) { max-width: 180px; }
form.final-act { display: inline-block; margin: 0 6px 0 0; } form.final-act button { min-height: 44px; }
.removed-finals li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.removed-finals li details.final-act { margin: 0; }
.no-preview { display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; background: var(--line); color: var(--muted); font: 600 15px/1.2 var(--sans); text-align: center; }
.finals-uploader .drop { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
fieldset.retention-choice input[type=date] { min-width: 0; width: auto; }
.finals-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 14px; }
.finals-actions form.inline, .finals-actions details.confirm-send { margin: 0; }

/* ═══ Admin: event header, buttons, menus, drop overlay ═══ */
.admin a.btn, .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.admin a.btn-primary, .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); opacity: .92; }
.btn-small { min-height: 30px; padding: 3px 12px; font-size: 13px; }
.btn .hint { font-size: 13px; }
.crumb { margin: 18px 0 0; }
.page-head, .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.page-head h1, .section-head h2 { margin-bottom: 8px; }
.event-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 6px; }
.event-head h1 { margin: 0; }
.event-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.event-state form.inline { margin: 0; }
.event-state .status { font-size: 13px; padding: 4px 10px; }
.event-tools { margin-left: auto; display: flex; gap: 8px; }
.event-meta { margin: 4px 0 10px; }
.ev-open { background: #DCEBDD; color: #23502A; } .ev-locked { background: #F6E3C6; color: #6A4510; } .ev-archived { background: var(--line); color: var(--ink); }
.guest-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; margin: 4px 0 10px; }
.guest-tools details.confirm-send { margin: 0; }
.guest-tools details.confirm-send summary { min-height: 36px; display: inline-flex; align-items: center; box-sizing: border-box; padding: 6px 14px; }
.export-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.drop strong .drop-kind { font: 400 15px var(--sans); color: var(--muted); }
/* Menus: <details data-menu> with a panel under the button (a sheet from the bottom on phones) */
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; } details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > summary { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
details.menu[open] > summary.btn-primary { background: var(--accent); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 360px; max-width: calc(100vw - 32px); display: flex; flex-direction: column;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06); text-align: left; }
.admin a.menu-item, .menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; text-align: left; font-size: 14px; }
.menu-item strong { font-weight: 500; }
.menu-item .hint { line-height: 1.4; }
.menu-item:hover, .menu-item:focus-visible { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-form { width: 400px; padding: 16px; }
.new-event-form { display: flex; flex-direction: column; gap: 12px; }
.new-event-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.new-event-form fieldset.limit-choice label { font-size: 14px; color: var(--ink); }
.new-event-form .buttons, .new-event-form .hint { margin: 0; }
.empty-card { max-width: 560px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-card h2 { margin-top: 0; }
@media (max-width: 640px) {
  .menu-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-width: none; max-height: 75vh; overflow: auto; }
  .event-tools { margin-left: 0; }
  .menu-item, .admin a.menu-item { min-height: 44px; justify-content: center; }
}
/* Finals folded away on a selects event until someone has sent */
details.finals-fold { margin: 18px 0 8px; }
details.finals-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; list-style: none;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px; color: var(--muted); }
details.finals-fold > summary::-webkit-details-marker { display: none; }
details.finals-fold[open] > summary { display: none; }
/* Upload plan: loose photos, and files that won't upload */
.plan-note { padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); }
.plan-note p { margin: 4px 0; }
.plan-skipped { font-size: 13px; color: var(--muted); }
/* The whole page is a drop target (admin.js) */
.drop-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent); outline: 3px dashed var(--accent); outline-offset: -12px; }
.drop-overlay[hidden] { display: none; }
.drop-overlay-card { display: flex; flex-direction: column; gap: 6px; max-width: min(460px, calc(100vw - 48px)); padding: 22px 28px; text-align: center;
  background: var(--surface); border-radius: 16px; box-shadow: 0 18px 48px rgba(0,0,0,.18); }
.drop-overlay-card strong { font: 500 22px var(--serif); }
.drop-overlay-card span { color: var(--muted); font-size: 14px; }
