/* photos.seoyeondennis.party — wedding-web design tokens + the printed
   card's layout language. Lemon paper, black ink, one wordmark. */

:root {
  --paper: #d6dd52;
  --paper-tint: #e2e6a3;
  --violet: #5b4978;
  --violet-deep: #3f3155;
  --ink: #16161a;
  --ink-soft: #2f2c33;
  --rule: rgba(22, 22, 26, 0.18);
  --rule-strong: rgba(22, 22, 26, 0.85);
  --shadow: 0 1px 0 rgba(22, 22, 26, 0.06), 0 12px 28px rgba(63, 49, 85, 0.12);

  --font-display: "PP Editorial Old", "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-serif-fallback: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.8rem, 0.76rem + 0.18vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.25vw, 1.1rem);
  --step-1:  clamp(1.1rem, 1rem + 0.4vw, 1.3rem);

  --container: 42rem;
  --container-wide: 68rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --section-gap: clamp(4rem, 9vw, 8rem);
}

/* ---------------- FONTS ---------------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
/* PP Editorial Old lives in editorial.css — only loaded post-gate
   (restricted trial license, same rule as the wedding site). */

/* ---------------- RESET ---------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--violet-deep); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--violet-deep); color: var(--paper); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

h1 { font-family: var(--font-display); font-weight: 200; margin: 0; line-height: 1; }
.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 200;
  font-feature-settings: "liga";
  font-variant-ligatures: common-ligatures;
}

/* ---------------- LANGUAGE TOGGLE ---------------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-body); font-size: var(--step--1);
  color: var(--ink); letter-spacing: 0.02em;
}
.lang-toggle-link {
  color: inherit; text-decoration: none; opacity: 0.5;
  transition: color 200ms, opacity 200ms; white-space: nowrap;
  /* generous tap area for thumbs without changing the visual weight */
  padding: 1em 0.2em;
}
.lang-toggle-link.is-active { font-weight: 600; opacity: 1; }
.lang-toggle-link:hover { color: var(--violet-deep); opacity: 1; text-decoration: none; }
.lang-toggle-sep { opacity: 0.35; }
.lang-toggle-fixed { position: fixed; top: 1rem; right: 1rem; z-index: 50; }
@media (min-width: 720px) { .lang-toggle-fixed { top: 1.5rem; right: 1.5rem; } }

/* ---------------- GHOST PILL ---------------- */
.ghost-pill {
  display: inline-flex; align-items: center; gap: 0.85em;
  padding: 1.05em 2.2em; min-height: 48px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-family: var(--font-body); font-size: var(--step--1);
  letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background 200ms, color 200ms, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.ghost-pill:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.ghost-pill:active { transform: translateY(0); }
.ghost-pill[disabled] { opacity: 0.35; pointer-events: none; }
.ghost-pill-lg { padding: 1.2em 2.6em; }

/* ---------------- LOCK SCREEN ---------------- */
.lock {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.25rem; position: relative; text-align: center;
}
.lock .lang-toggle {
  position: absolute; top: clamp(1.25rem, 3vw, 2.5rem);
  left: 50%; transform: translateX(-50%);
}
.lock-inner { width: 100%; max-width: 28rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.eyebrow {
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); margin: 0;
}
.lock-wordmark {
  font-family: var(--font-serif-fallback);
  font-style: italic; font-weight: 400;
  font-size: clamp(3rem, 2.4rem + 2.5vw, 4.6rem);
  color: var(--ink); line-height: 1.05;
  margin: 0.1em 0 0.5em;
}
.lock-flower { display: flex; justify-content: center; color: var(--ink); }
.lock-flower svg { width: clamp(2.75rem, 1.5rem + 4vw, 4rem); height: auto; }
.lock-form { display: flex; flex-direction: column; width: 100%; gap: 0.75rem; }
.lock-form input[type="password"] {
  width: 100%; padding: 0.95em 1.1em; min-height: 48px;
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink); font-size: var(--step-0); text-align: center; letter-spacing: 0.06em;
  transition: border-color 200ms, background 200ms;
}
.lock-form input[type="password"]::placeholder { color: var(--ink); opacity: 0.45; }
.lock-form input[type="password"]:focus-visible { border-color: var(--violet-deep); background: rgba(91, 73, 120, 0.08); }
.lock-form .ghost-pill { width: 100%; justify-content: center; }
.lock-error { margin: 0; color: var(--violet-deep); font-size: var(--step--1); letter-spacing: 0.05em; animation: shake 320ms ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ---------------- STREAM PAGE ---------------- */
.stream {
  position: relative;
  /* the gallery runs almost edge to edge; the reading blocks stay narrow */
  --frame: min(120rem, 98vw);
  max-width: var(--frame);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}

/* Corner crop marks, like the printed card. */
.crop { position: fixed; width: 18px; height: 18px; z-index: 40; pointer-events: none; }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--ink); }
.crop::before { width: 100%; height: 1px; }
.crop::after { width: 1px; height: 100%; }
.crop-tl { top: 18px; left: 18px; }
.crop-tl::before { top: 0; left: 0; } .crop-tl::after { top: 0; left: 0; }
.crop-tr { top: 18px; right: 18px; }
.crop-tr::before { top: 0; right: 0; } .crop-tr::after { top: 0; right: 0; }
.crop-bl { bottom: 18px; left: 18px; }
.crop-bl::before { bottom: 0; left: 0; } .crop-bl::after { bottom: 0; left: 0; }
.crop-br { bottom: 18px; right: 18px; }
.crop-br::before { bottom: 0; right: 0; } .crop-br::after { bottom: 0; right: 0; }

.masthead { text-align: center; padding-top: 1rem; }
.wordmark { font-size: clamp(3rem, 2rem + 5vw, 6rem); color: var(--ink); }
.kicker {
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.22em; text-transform: lowercase;
  color: var(--ink); margin: 1.1rem 0 0;
}
.rule {
  width: 12rem; border: 0; border-top: 1px solid var(--rule-strong);
  margin: 2.5rem auto;
}

/* ---------------- UPLOAD (the numbered steps, like the card) ---------------- */
.upload { max-width: var(--container); margin: 0 auto; }
.step {
  font-family: var(--font-body); font-size: var(--step-0); font-weight: 500;
  letter-spacing: 0.06em; color: var(--ink);
  margin: 3rem 0 1.5rem; text-align: center;
}
.step:first-child { margin-top: 0; }
.step-num { font-weight: 600; }

.dropzone {
  border: 1px dashed var(--rule-strong);
  border-radius: 2px;
  padding: 3rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  text-align: center;
  transition: background 200ms, border-color 200ms;
}
.dropzone.is-over { background: rgba(22, 22, 26, 0.05); }
.dropzone.has-files { border-style: solid; border-color: var(--rule); }
.dropzone-label { margin: 0; color: var(--ink-soft); font-size: var(--step--1); letter-spacing: 0.04em; }
.dropzone-files { margin: 0; font-size: var(--step--1); color: var(--ink); }

/* Note + name — writing on the card: bottom rule only. */
.pen-fields { display: flex; flex-direction: column; gap: 1.5rem; }
.pen-fields input {
  width: 100%; min-height: 44px; background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-strong);
  border-radius: 0; padding: 0.7em 0.1em;
  font-size: var(--step-0);
  transition: border-color 200ms;
}
.pen-fields input#note-input { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); }
.pen-fields input::placeholder { color: var(--ink); opacity: 0.6; }
.lock-form input[type="password"]::placeholder { color: var(--ink); opacity: 0.6; }
.dropzone-label { opacity: 1; }
.pen-fields input:focus-visible { border-bottom-color: var(--violet-deep); outline: none; }

.upload-actions {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  margin-top: 2.5rem;
}
.abort-btn {
  font-size: var(--step--1); letter-spacing: 0.08em; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 0.18em;
}
.progress {
  width: 100%; height: 2px; background: var(--rule); margin-top: 1.5rem;
  border-radius: 2px; overflow: hidden;
}
.progress span {
  display: block; height: 100%; width: 0%;
  background: var(--ink); transition: width 180ms linear;
}
.upload-feedback { margin: 1rem 0 0; text-align: center; font-size: var(--step--1); letter-spacing: 0.06em; color: var(--ink-soft); }
.upload-feedback.is-thanks { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--ink); }

/* ---------------- GRID (JS masonry, row-major = newest first) --------------
   CSS multi-column can't split a tall item, so one 100-photo batch used to
   collapse the whole page into a single column. Grid + JS row spans keeps
   chronological left-to-right order at any tile height. */
/* ---------------- GRID ----------------
   One photo per cell, uniform and cropped (object-fit), so the spacing between
   photographs is perfectly consistent. Originals are never touched — the crop is
   CSS only, and the full photograph is always available in the lightbox.
   Photographs sit in black and white on the lemon paper (as on the invitation);
   colour returns on hover and in full-screen view. */
/* Collage: a small set of tile shapes (big / wide / tall / single) packed
   `dense` into a grid whose row height equals the column width, so every gap in
   the composition is exactly the same. Photographs are cropped to fill their
   shape (CSS only — the originals are untouched and the lightbox shows everything). */
.grid {
  --gap: clamp(0.4rem, 0.7vw, 0.8rem);
  --cols: 2;
  --unit: calc((var(--frame) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  /* break out of the text column: the collage runs edge to edge */
  margin-inline: calc(-1 * var(--gutter));
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: var(--unit);
  gap: var(--gap);   /* no `dense`: the shape blocks fill every row, and the
                        visual order stays the chronological order */
}
@media (min-width: 560px)  { .grid { --cols: 3; } }
@media (min-width: 900px)  { .grid { --cols: 4; } }
@media (min-width: 1300px) { .grid { --cols: 5; } }
@media (min-width: 1750px) { .grid { --cols: 6; } }

.tile.shape-wide { grid-column: span 2; }
.tile.shape-tall { grid-row: span 2; }
.tile.shape-big  { grid-column: span 2; grid-row: span 2; }
@media (max-width: 559px) {
  /* on two columns a "tall" tile would be a lonely sliver — keep it single */
  .tile.shape-tall { grid-row: span 1; grid-column: span 1; }
}

.grid-empty {
  grid-column: 1 / -1;
  margin: 2rem 0;
  text-align: center; color: var(--ink-soft);
  font-size: var(--step--1); letter-spacing: 0.06em;
}

.tile {
  position: relative;
  min-height: 0;
  isolation: isolate;              /* keep the multiply contained (WebKit-safe) */
  border-radius: 2px;
  /* the paper behind the photograph is what the multiply blend lands on */
  background: var(--paper);
  overflow: hidden;
  /* reveals as it enters the viewport (see app.js IntersectionObserver) */
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 520ms cubic-bezier(0.2, 0, 0, 1), transform 520ms cubic-bezier(0.2, 0, 0, 1);
}
.tile.is-visible { opacity: 1; transform: none; }
.tile-media { position: absolute; inset: 0; }
.tile img, .tile video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1);
  transition: filter 420ms cubic-bezier(0.2, 0, 0, 1), transform 480ms cubic-bezier(0.2, 0, 0, 1);
}
/* The paper itself, laid over the photograph: `multiply` with the lemon makes the
   highlights the paper and keeps the shadows ink — the invitation's ink-on-paper
   look. Painting it as an overlay (rather than blending the image) means the tint
   can be *animated*: opacity fades to 0 as a photo lights up, so nothing pops. */
.tile-tint {
  position: absolute; inset: 0;
  background: var(--paper);
  mix-blend-mode: multiply;
  opacity: 1;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.2, 0, 0, 1);
}
.tile:hover img, .tile:focus-within img { filter: grayscale(0); transform: scale(1.02); }
.tile:hover .tile-tint, .tile:focus-within .tile-tint { opacity: 0; }
@media (hover: none) {
  /* no hover on a phone: colour arrives in the full-screen view instead… */
  .tile:hover img { filter: grayscale(1); transform: none; }
  .tile:hover .tile-tint { opacity: 1; }
}
/* …and in the photographs inside the middle band of the screen, which follow the
   scroll (app.js: updateFocus). Lit tiles fade in and out rather than popping. */
.tile.is-focus img, .tile.is-focus:hover img,
.tl-thumb.is-focus img, .tl-thumb.is-focus:hover img { filter: grayscale(0); transform: none; }
.tile.is-focus .tile-tint, .tile.is-focus:hover .tile-tint,
.tl-thumb.is-focus .tile-tint, .tl-thumb.is-focus:hover .tile-tint { opacity: 0; }

.tile-open {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: transparent; border: 0; cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.tile-open:focus-visible { outline: 2px solid var(--violet-deep); outline-offset: -3px; }

.tile-pending {
  position: absolute; right: 0.5rem; bottom: 0.5rem;
  padding: 0.3em 0.7em; border-radius: 999px;
  background: var(--violet-deep); color: var(--paper);
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* every photograph states its own time */
.tile-time {
  position: absolute; left: 0.5rem; top: 0.5rem;
  padding: 0.3em 0.65em;
  border-radius: 999px;
  background: rgba(214, 221, 82, 0.9);
  color: var(--ink);
  font-size: 0.66rem; letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 240ms, transform 240ms;
  pointer-events: none;
}
.tile:hover .tile-time, .tile:focus-within .tile-time { opacity: 1; transform: none; }
@media (hover: none) { .tile-time { opacity: 0.92; transform: none; } }

/* unobtrusive uploader tag */
.tile-tag {
  position: absolute; left: 0.5rem; bottom: 0.5rem;
  max-width: calc(100% - 1rem);
  padding: 0.3em 0.65em;
  border-radius: 999px;
  background: rgba(214, 221, 82, 0.9);
  color: var(--ink);
  font-size: 0.62rem; letter-spacing: 0.08em; font-variant: small-caps;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px);
  transition: opacity 240ms, transform 240ms;
  pointer-events: none;
}
.tile:hover .tile-tag, .tile:focus-within .tile-tag { opacity: 1; transform: none; }
@media (hover: none) { .tile-tag { opacity: 0.92; transform: none; } }

/* per-photo delete (own uploads only) */
.tile-del {
  position: absolute; top: 0.35rem; right: 0.35rem; z-index: 3;
  width: 30px; height: 30px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(214, 221, 82, 0.9); color: var(--ink);
  font-size: 0.85rem; line-height: 1;
  opacity: 0; transition: opacity 220ms;
}
.tile:hover .tile-del, .tile:focus-within .tile-del { opacity: 1; }
@media (hover: none) { .tile-del { opacity: 0.85; } }
.tile-del:hover { background: var(--ink); color: var(--paper); }

.play-glyph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--paper); pointer-events: none;
}
.play-glyph svg { width: 3rem; height: 3rem; filter: drop-shadow(0 2px 10px rgba(22, 22, 26, 0.45)); }

.tile.is-processing, .tile.is-failed {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center;
  border: 1px dashed var(--rule-strong); border-radius: 2px;
  color: var(--ink-soft); font-size: var(--step--1); letter-spacing: 0.06em;
}
.tile.is-failed { border-style: solid; border-color: var(--rule); }

.stream-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 0.5rem 1.4rem; margin: 0;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: lowercase;
  color: var(--ink-soft);
}
.view-toggle { display: inline-flex; align-items: baseline; gap: 0.4em; }
.view-link {
  color: var(--ink); opacity: 0.5; text-decoration: none;
  background: none; border: 0; cursor: pointer;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: lowercase;
  padding: 1.15em 0.2em;   /* thumb-sized tap area */
  transition: opacity 200ms, color 200ms;
}
.view-link.is-active { opacity: 1; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }
.view-link:hover { opacity: 1; color: var(--violet-deep); }
.load-more { margin-top: 2.5rem; text-align: center; }

/* ---------------- THE GALLERY: days + hours ----------------
   One view. The collage reads oldest → newest, interrupted by a sticky day header
   and a small hour rule; each hour is its own `.grid`, so the shape rhythm restarts
   per group and every block still packs exactly. */
.gallery { display: block; }
.day { margin-top: clamp(2.5rem, 5vw, 4rem); }
.day:first-child { margin-top: 0; }
.day-head {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap;
  /* breaks out to the full width so it covers the photographs scrolling under it */
  margin: 0 0 1.25rem calc(-1 * var(--gutter));
  padding: 0.9rem var(--gutter) 0.7rem;
  background: var(--paper);
  border-top: 1px solid var(--rule-strong);
  font-family: var(--font-display); font-style: italic; font-weight: 200;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.05;
}
.day-kicker {
  font-family: var(--font-body); font-style: normal;
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 640px) {
  /* clear of the fixed language toggle in the top-right corner */
  .day-head { padding-right: calc(var(--gutter) + 4.5rem); }
}
.hour { margin-top: clamp(1.4rem, 3vw, 2.2rem); }
.hour-rule {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 0 0 0.8rem;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.hour-rule::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule-strong); }

/* ---------------- SELECTION TRAY ---------------- */
.tray {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.4rem; margin-top: 1.25rem;
}
.tray-item {
  position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--paper-tint);
}
.tray-item img, .tray-item video { width: 100%; height: 100%; object-fit: cover; }
.tray-item .tray-kind {
  position: absolute; left: 0.25rem; bottom: 0.25rem;
  font-size: 0.55rem; letter-spacing: 0.06em; padding: 0.1em 0.35em;
  border-radius: 999px; background: rgba(214, 221, 82, 0.86); color: var(--ink);
}
.picked-info { margin: 0.9rem 0 0; font-size: var(--step--1); letter-spacing: 0.08em; color: var(--ink-soft); text-align: center; }

/* ---------------- UPLOAD SCREEN ----------------
   Its own view: big progress, big reassurance, thumbnails drifting up as they
   land. A guest dumping 100 photos needs to know nothing is lost if they wait. */
.uploading {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.uploading[hidden] { display: none; }
.uploading-inner { width: 100%; max-width: 34rem; text-align: center; }
.uploading-title { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); margin: 0.6rem 0 1.75rem; }
.uploading-bar {
  height: 4px; width: 100%; background: var(--rule); border-radius: 999px; overflow: hidden;
}
.uploading-bar span {
  display: block; height: 100%; width: 0%; background: var(--ink);
  transition: width 220ms linear;
}
.uploading-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0.9rem 0 0;
  font-size: var(--step--1); letter-spacing: 0.12em;
}
.uploading-pct { font-weight: 600; font-size: var(--step-0); }
.uploading-count { color: var(--ink-soft); }
.uploading-hint { margin: 1.5rem 0 0; font-size: var(--step--1); letter-spacing: 0.04em; color: var(--ink-soft); }
.uploading-note { margin: 1rem 0 0; font-family: var(--font-display); font-style: italic; font-size: var(--step-1); }
.uploading-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr));
  gap: 0.35rem; margin: 1.75rem 0 1.5rem;
  max-height: 9rem; overflow: hidden;
}
.strip-item {
  position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--paper-tint);
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 700ms;
}
.strip-item img, .strip-item video { width: 100%; height: 100%; object-fit: cover; }
.strip-item::after {
  content: ""; position: absolute; inset: 0; background: var(--ink); opacity: 0;
  transition: opacity 400ms;
}
.strip-item.is-done { transform: translateY(-14px) scale(0.94); opacity: 0.35; }
.strip-item.is-done::after { opacity: 0.35; }
.strip-item.is-failed::after { opacity: 0.55; }
.abort-btn {
  font-size: var(--step--1); letter-spacing: 0.08em; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 0.18em; padding: 0.8em 1em;
}

/* ---------------- LIGHTBOX ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(22, 22, 26, 0.96);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  animation: lb-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-stage img, .lb-stage video { animation: lb-media 300ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes lb-media {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: none; }
}
/* stepping to the next/previous photo slides in from the matching side */
.lb-stage.is-next img, .lb-stage.is-next video { animation: lb-next 300ms cubic-bezier(0.2, 0, 0, 1); }
.lb-stage.is-prev img, .lb-stage.is-prev video { animation: lb-prev 300ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes lb-next {
  from { opacity: 0; transform: translate3d(26px, 0, 0) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
@keyframes lb-prev {
  from { opacity: 0; transform: translate3d(-26px, 0, 0) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
.lb-caption { animation: lb-cap 300ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes lb-cap { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lb-stage.is-next img, .lb-stage.is-next video,
  .lb-stage.is-prev img, .lb-stage.is-prev video,
  .lb-caption { animation: lb-cap 180ms linear; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lb-stage img, .lb-stage video { animation: none; }
}
.lightbox[hidden] { display: none; }
.lb-stage {
  flex: 1 1 auto; margin: 0; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 2px;
}
.lb-caption {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem) calc(1rem + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper);
  font-size: 0.72rem; letter-spacing: 0.1em;
}
.lb-count { opacity: 0.65; }
.lb-who { font-variant: small-caps; letter-spacing: 0.12em; }
.lb-when { opacity: 0.95; font-variant-numeric: tabular-nums; }
.lb-note { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; letter-spacing: 0; flex: 1 1 14rem; }
.lb-actions { display: flex; gap: 1.1rem; margin-left: auto; }
.lb-action {
  color: var(--paper); text-decoration: underline; text-underline-offset: 0.2em;
  font-size: 0.72rem; letter-spacing: 0.1em; padding: 1.25em 0.15em;
}
.lb-action:hover { color: var(--paper-tint); }
.lb-close {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2;
  width: 44px; height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper); font-size: 1.1rem; background: rgba(22, 22, 26, 0.5);
}
.lb-close:hover { background: var(--violet-deep); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 84px; color: var(--paper); font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.6;
}
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
@media (max-width: 640px) {
  /* phone: no arrow chrome, swipe instead; the caption stays thumb-reachable */
  .lb-nav { display: none; }
  .lb-stage { padding: 0.5rem; }
  .lb-caption { gap: 0.35rem 0.9rem; }
  .lb-actions { margin-left: 0; }
}
body.has-lightbox { overflow: hidden; }

.footer {
  margin-top: var(--section-gap);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  color: var(--ink);
}
.footer .lock-flower svg { width: 2rem; height: auto; }
.footer-date { margin: 0; font-size: 0.72rem; letter-spacing: 0.22em; color: var(--ink-soft); }
.logout-btn {
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-soft); opacity: 0.6;
  text-decoration: underline; text-underline-offset: 0.18em;
  padding: 1.2em 0.5em;
}
.logout-btn:hover { opacity: 1; color: var(--violet-deep); }

/* ---------------- ADMIN ---------------- */
.admin { max-width: 68rem; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.admin h1 { font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem); margin-bottom: 0.5rem; }
.admin .kicker { margin: 0 0 3rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.admin-table th {
  text-align: left; font-weight: 500; letter-spacing: 0.08em; text-transform: lowercase;
  border-bottom: 1px solid var(--rule-strong); padding: 0.6em 0.8em 0.6em 0;
}
.admin-table td { border-bottom: 1px solid var(--rule); padding: 0.7em 0.8em 0.7em 0; vertical-align: top; }
.admin-table tr.is-hidden-entry td { opacity: 0.45; }
.admin-table .mini-action {
  font-size: 0.72rem; color: var(--ink); letter-spacing: 0.04em;
  text-decoration: underline; text-underline-offset: 0.18em; margin-right: 0.8em; white-space: nowrap;
}
.admin-table .mini-action:hover { color: var(--violet-deep); }
.admin-note { max-width: 18rem; font-family: var(--font-display); font-style: italic; }
.admin-error { color: var(--violet-deep); font-size: var(--step--1); animation: shake 320ms ease-in-out; }
.admin-gate .lock-form { max-width: 24rem; margin: 0 auto; }
.admin-topline { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; }
.admin-topline a { font-size: var(--step--1); }

/* ---------------- ADMIN: visibility + review ---------------- */
.admin-mode { margin: 2.5rem 0 3rem; }
.mode-options { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin: 1.25rem 0 1rem; }
.mode-option {
  border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: 0.8em 1.2em; min-height: 44px;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: lowercase;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 200ms, color 200ms;
}
.mode-option:hover { background: rgba(22, 22, 26, 0.06); }
.mode-option.is-active { background: var(--ink); color: var(--paper); }
.mode-explain { max-width: none; text-align: center; font-family: var(--font-body); font-style: normal; font-size: var(--step--1); color: var(--ink-soft); }
.admin-review { margin: 3rem 0; }
.review-actions { display: flex; gap: 0.75rem; justify-content: center; margin: 0 0 1.5rem; flex-wrap: wrap; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.9rem; }
.review-item { border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; background: var(--paper-tint); }
.review-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.review-meta { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.5rem 0.6rem 0.7rem; }
.review-meta .mini-action { text-align: left; padding: 0.4em 0; }

/* ---------------- COLOUR MODE ----------------
   Sits with the other stream controls: ink-on-paper is the default, this swaps the
   whole gallery to full colour. */
.is-colour .tile img, .is-colour .tile video,
.is-colour .tl-thumb img { filter: none; }
.is-colour .tile-tint { opacity: 0; }
.is-colour .tile:hover img, .is-colour .tile:focus-within img,
.is-colour .tl-thumb:hover img, .is-colour .tl-thumb:focus-visible img { filter: none; }
