/* Delivered gallery (public/gallery/index.html) — styles.
   Every colour and font comes from the gallery's Theme (applyTheme in
   gallery.js sets these variables); the defaults below are "cinema", the
   film-studio look: near-black page, cream photo card, Cormorant Garamond
   headings over Jost. Text laid over photos (hero, panels, lock screen) is
   always white on a darkened image, whatever the theme. */

* { box-sizing: border-box; }

:root {
  --bg: #0c0b0a;
  --card: #efe9df;          /* the panel the photos sit on */
  --card-ink: #1d1a16;
  --ink: #f2ede5;
  --muted: #8f887e;
  --rule: rgba(242, 237, 229, 0.14);
  --accent: #f2ede5;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --display-weight: 400;
  --display-style: normal;
  --display-case: none;
  --display-tracking: normal;
  --body: "Jost", "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --heart: #d9475a;
  --bar-h: 58px;
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  /* A surface a step off the page (the films list), in any theme. */
  --surface: rgba(127, 127, 127, 0.08);
  --surface: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --card-rule: rgba(0, 0, 0, 0.1);
  --card-rule: color-mix(in srgb, var(--card-ink) 12%, transparent);
}

/* Only body paints the background, so overscroll matches too. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 400; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---- Type ---------------------------------------------------------------- */
.display {
  font-family: var(--display); font-weight: var(--display-weight);
  font-style: var(--display-style); text-transform: var(--display-case);
  letter-spacing: var(--display-tracking); line-height: 1.05; margin: 0;
  overflow-wrap: anywhere;
}
/* The "&" in the couple's names, a touch of italic. */
.amp { font-style: italic; font-weight: inherit; padding: 0 0.08em; }
/* Small widely-tracked capitals ("FOUR FILMS", "14 AUGUST 2026"). */
.caps {
  font-family: var(--body); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.34em; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

/* ---- Boot ---------------------------------------------------------------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 5; transition: opacity 0.5s ease; }
.boot span { width: 64px; height: 1px; background: var(--ink); opacity: 0.4; animation: g-breathe 1.8s ease-in-out infinite; }
html:not(.booting) .boot { opacity: 0; pointer-events: none; }
@keyframes g-breathe { 0%, 100% { opacity: 0.12; transform: scaleX(0.6); } 50% { opacity: 0.5; transform: scaleX(1); } }

/* ---- Top bar ------------------------------------------------------------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.bar.away { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.bar-names { font-size: 21px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar nav { display: flex; gap: 26px; flex-shrink: 0; }
.bar nav a { text-decoration: none; opacity: 0.6; padding: 6px 0; border-bottom: 1px solid transparent; transition: opacity 0.2s, border-color 0.2s; }
.bar nav a:hover { opacity: 1; }
.bar nav a.on { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 420px) { .bar-names { font-size: 18px; } .bar nav { gap: 18px; } .bar nav a { letter-spacing: 0.26em; } }

/* ---- Views --------------------------------------------------------------- */
.view.enter { animation: g-view-in 0.6s var(--ease) both; }
@keyframes g-view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Photo backdrops (hero, panels, lock screen): fades and settles in. */
.bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease, transform 2.6s var(--ease);
}
.bg-img.in { opacity: 1; transform: none; }

/* ---- Landing: hero ------------------------------------------------------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; color: var(--on-photo, #fff); background: #111; background: var(--stage-bg, #111); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.12) 38%, rgba(0,0,0,0.18) 62%, rgba(0,0,0,0.55) 100%); background: linear-gradient(180deg, color-mix(in srgb, var(--deep, #000) 32%, transparent) 0%, color-mix(in srgb, var(--deep, #000) 12%, transparent) 38%, color-mix(in srgb, var(--deep, #000) 18%, transparent) 62%, color-mix(in srgb, var(--deep, #000) 55%, transparent) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 0 28px; max-width: 1100px; }
.hero-title { font-size: clamp(46px, 9.5vw, 128px); line-height: 0.98; text-shadow: 0 2px 30px rgba(0,0,0,0.25); text-shadow: 0 2px 30px color-mix(in srgb, var(--deep, #000) 25%, transparent); }
.hero-sub { margin: 26px 0 0; font-size: 13px; letter-spacing: 0.46em; padding-left: 0.46em; text-shadow: 0 1px 14px rgba(0,0,0,0.55); text-shadow: 0 1px 14px color-mix(in srgb, var(--deep, #000) 55%, transparent); }
.hero-company { position: absolute; z-index: 1; top: calc(28px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; opacity: 0.85; }
.hero-company img { max-height: 34px; max-width: 160px; margin: 0 auto; filter: brightness(0) invert(1); opacity: 0.9; }
.scroll-cue {
  position: absolute; z-index: 1; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%;
  width: 1px; height: 56px; margin-left: -0.5px; overflow: hidden; background: rgba(255,255,255,0.25); background: color-mix(in srgb, var(--on-photo, #fff) 25%, transparent);
}
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: #fff; background: var(--on-photo, #fff); animation: g-cue 2.4s var(--ease) infinite; }
@keyframes g-cue { 0% { top: -100%; } 60%, 100% { top: 100%; } }
/* Hero text rises in once the cover is up. */
.hero .rise { opacity: 0; transform: translateY(14px); transition: opacity 1.1s ease, transform 1.4s var(--ease); }
.hero.ready .rise { opacity: 1; transform: none; }
.hero.ready .hero-sub.rise { transition-delay: 0.25s; }

/* The gallery's note, between the hero and the panels. */
.note { padding: clamp(72px, 12vw, 140px) 28px; text-align: center; }
.note p { max-width: 640px; margin: 0 auto; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.5; font-style: italic; white-space: pre-line; }
.note .rule { width: 1px; height: 44px; background: var(--rule); margin: 0 auto 34px; }

/* ---- Landing: section panels --------------------------------------------- */
.panel {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 88vh; height: 88svh; min-height: 460px; max-height: 1000px;
  color: #fff; color: var(--on-photo, #fff); text-decoration: none; text-align: center; overflow: hidden; background: #111; background: var(--stage-bg, #111);
}
.panel + .panel { border-top: 1px solid rgba(0,0,0,0.6); border-top: 1px solid color-mix(in srgb, var(--deep, #000) 60%, transparent); }
.panel::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.38); background: color-mix(in srgb, var(--deep, #000) 38%, transparent); transition: background 0.6s ease; }
.panel:hover::after { background: rgba(0,0,0,0.3); background: color-mix(in srgb, var(--deep, #000) 30%, transparent); }
.panel .bg-img.in { transition: opacity 1.2s ease, transform 6s var(--ease); }
.panel:hover .bg-img.in { transform: scale(1.03); }
html[data-theme="cinema"] .panel.mono .bg-img { filter: grayscale(1) contrast(1.06); }
.panel-inner { position: relative; z-index: 1; padding: 0 24px; }
.panel h2 { font-size: clamp(52px, 8.5vw, 104px); }
.panel .caps { display: block; margin: 16px 0 38px; font-size: 11px; letter-spacing: 0.42em; padding-left: 0.42em; }
.btn-outline {
  display: inline-block; border: 1px solid rgba(255,255,255,0.85); border: 1px solid color-mix(in srgb, var(--on-photo, #fff) 85%, transparent); padding: 16px 36px 16px calc(36px + 0.38em);
  font-family: var(--body); font-size: 11px; text-transform: uppercase; letter-spacing: 0.38em;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.panel:hover .btn-outline, .panel:focus-visible .btn-outline { background: #fff; background: var(--on-photo, #fff); color: #111; color: var(--stage-bg, #111); border-color: #fff; border-color: var(--on-photo, #fff); }
/* Panel text rises in as it scrolls into view. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1.2s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

/* ---- Films --------------------------------------------------------------- */
.films-view { padding-top: calc(var(--bar-h) + env(safe-area-inset-top)); }
.player-wrap { max-width: 1240px; margin: 0 auto; }
.player { position: relative; padding-top: 56.25%; background: #000; overflow: hidden; }
.player video, .player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .poster { object-fit: cover; transition: opacity 0.5s ease; }
.player::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35)); pointer-events: none; transition: opacity 0.5s; }
.player.playing .poster, .player.playing::after { opacity: 0; pointer-events: none; }
.play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.8); color: #fff;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease), background 0.3s, opacity 0.4s;
}
.play svg { width: 22px; height: 22px; margin-left: 4px; }
.play:hover { transform: scale(1.06); background: rgba(255,255,255,0.14); }
.player.playing .play { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .play { width: 66px; height: 66px; margin: -33px 0 0 -33px; } .play svg { width: 18px; height: 18px; } }
@media (min-width: 900px) {
  .player-wrap { padding: 32px 40px 0; }
  .player { border-radius: 4px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6); }
  html[data-dark="false"] .player { box-shadow: 0 24px 60px -36px rgba(0,0,0,0.45); }
}

.film-head { max-width: 760px; margin: 0 auto; padding: 38px 24px 0; text-align: center; }
.film-title { font-size: clamp(34px, 5.4vw, 56px); }
.film-meta { margin-top: 14px; color: var(--muted); display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .film-head { padding: 26px 20px 0; }
  .film-meta { margin-top: 10px; }
}
.film-desc { margin: 20px auto 0; max-width: 600px; color: var(--muted); font-size: 15px; line-height: 1.75; white-space: pre-line; }
.text-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--rule); padding-bottom: 3px; transition: border-color 0.2s;
}
.text-btn:hover { border-bottom-color: var(--ink); }
.text-btn svg { width: 13px; height: 13px; }

.film-list { max-width: 860px; margin: 52px auto 0; padding: 6px 30px; border-radius: 18px; background: var(--surface); border: 1px solid var(--rule); }
.film-row {
  width: 100%; display: flex; align-items: baseline; gap: 14px; padding: 24px 0; text-align: left;
  border-top: 1px solid var(--rule);
}
.film-row:first-child { border-top: 0; }
.film-row .t { font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking);
  font-size: clamp(21px, 2.4vw, 27px); line-height: 1.2; opacity: 0.66; transition: opacity 0.25s; min-width: 0; }
.film-row .lead { flex: 1; min-width: 20px; border-bottom: 1px dotted var(--rule); transform: translateY(-6px); }
.film-row .d { color: var(--muted); flex-shrink: 0; letter-spacing: 0.18em; }
.film-row:hover .t, .film-row.on .t { opacity: 1; }
/* The film in the player: a small mark before its title. */
.film-row .mark { width: 0; margin-right: -14px; overflow: hidden; flex-shrink: 0; align-self: center; transition: width 0.3s var(--ease), margin 0.3s var(--ease); display: inline-flex; }
.film-row .mark svg { width: 9px; height: 9px; }
.film-row.on .mark { width: 16px; margin-right: 0; }
@media (max-width: 600px) { .film-list { margin: 40px 14px 0; padding: 4px 20px; border-radius: 16px; } .film-row { padding: 20px 0; } }

/* ---- Photos -------------------------------------------------------------- */
.photos-view { padding: calc(var(--bar-h) + env(safe-area-inset-top) + 12px) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
.photo-card {
  max-width: 1560px; margin: 0 auto; background: var(--card); color: var(--card-ink);
  border-radius: 20px; padding: 20px 14px 14px;
  /* A light theme's card may match the page: a hairline keeps it a card. */
  box-shadow: 0 0 0 1px var(--card-rule);
}
@media (min-width: 700px) { .photos-view { padding-left: 20px; padding-right: 20px; } .photo-card { border-radius: 26px; padding: 30px 30px 30px; } }
@media (min-width: 1200px) { .photo-card { padding: 38px 44px 44px; } }

.tabs-row { display: flex; align-items: flex-end; gap: 18px; border-bottom: 1px solid var(--card-rule); }
.tabs { display: flex; gap: 30px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 24px 0 2px;
  /* Tabs that run off the edge fade out rather than being cut. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; white-space: nowrap; padding: 6px 0 15px; opacity: 0.45; text-decoration: none; border-bottom: 1px solid transparent; margin-bottom: -1px; transition: opacity 0.2s, border-color 0.2s; }
.tab:hover { opacity: 0.8; }
.tab.on { opacity: 1; border-bottom-color: currentColor; }
.fav-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 2px 15px; text-decoration: none; flex-shrink: 0; opacity: 0.85; }
.fav-link svg { width: 17px; height: 17px; }
.fav-link.has svg { color: var(--heart); }
.fav-link .n { letter-spacing: 0.1em; }
.pop { animation: g-pop 0.4s var(--ease); }
@keyframes g-pop { 40% { transform: scale(1.3); } }

.album-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin: 30px 2px 24px; }
.album-title { font-size: clamp(34px, 5vw, 62px); }
.album-head .caps { opacity: 0.6; }
@media (min-width: 700px) { .album-head { margin: 40px 2px 32px; } }

/* Masonry: columns filled shortest-first (gallery.js), so photos read
   roughly left to right and more can be appended without reshuffling. */
/* The grid is a column of runs (.gseg); a design's wide photo or chapter
   title (pages.css) sits between two runs. */
.grid { display: flex; flex-direction: column; gap: 8px; }
.gseg { display: flex; align-items: flex-start; gap: 8px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .grid, .gseg, .col { gap: 12px; } }
.tile { position: relative; margin: 0; cursor: zoom-in; }
.tile-pic { position: relative; overflow: hidden; border-radius: 2px;
  background: rgba(0,0,0,0.06); background: color-mix(in srgb, var(--card-ink) 7%, transparent); }
/* A photo's number and caption: only the designs that want them show these (pages.css). */
.tile-meta { display: none; }
.tile .pad { display: block; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease, transform 0.9s var(--ease); }
.tile img.in { opacity: 1; }
.tile-actions { position: absolute; right: 7px; bottom: 7px; display: flex; gap: 6px; z-index: 1; }
.round {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.94); color: #141414; box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  transition: opacity 0.25s ease, transform 0.25s var(--ease), background 0.2s;
}
.round svg { width: 14px; height: 14px; }
.round:hover { background: #fff; transform: scale(1.06); }
.round.on { color: var(--heart); }
.round.busy { opacity: 0.6; pointer-events: none; }
/* A computer: the buttons appear on hover (a favourite's heart stays). */
@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.025); }
  .round { width: 36px; height: 36px; }
  .round svg { width: 16px; height: 16px; }
  .tile-actions { right: 10px; bottom: 10px; gap: 8px; }
  .tile .round { opacity: 0; transform: translateY(4px); }
  .tile:hover .round, .tile:focus-within .round, .tile .round.on { opacity: 1; transform: none; }
}
.empty { text-align: center; padding: 60px 20px 80px; opacity: 0.6; font-size: 15px; }
.sentinel { height: 1px; }

/* ---- Lightbox ------------------------------------------------------------ */
html.lb-open, html.lb-open body { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #0a0a0a; color: #f4f1ec;
  animation: g-fade 0.3s ease both;
}
html[data-dark="false"] .lb { background: var(--bg); color: var(--ink); }
@keyframes g-fade { from { opacity: 0; } }
.lb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
  padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  transition: opacity 0.3s;
}
.lb-count { opacity: 0.7; letter-spacing: 0.24em; }
.lb-tools { display: flex; gap: 4px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: rgba(127,127,127,0.16); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.on { color: var(--heart); }
.icon-btn.busy { opacity: 0.5; pointer-events: none; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); touch-action: pinch-zoom; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; will-change: transform; }
/* Every photo fills the viewer's space, whatever the file's size (--r = width / height, gallery.js setLbImage). */
.lb-stage { container-type: size; }
.lb-img.fit { width: min(100cqw, 100cqh * var(--r)); height: min(100cqh, 100cqw / var(--r)); max-width: none; max-height: none; object-fit: cover; }
@media (min-width: 900px) { .lb-stage { padding: 0 96px; } }
.lb-nav { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; z-index: 2; display: grid; place-items: center; border-radius: 50%; opacity: 0.7; transition: opacity 0.2s, background 0.2s; }
.lb-nav:hover { opacity: 1; background: rgba(127,127,127,0.16); }
.lb-nav svg { width: 26px; height: 26px; }
.lb-prev { left: max(16px, env(safe-area-inset-left)); }
.lb-next { right: max(16px, env(safe-area-inset-right)); }
@media (hover: none), (max-width: 700px) { .lb-nav { display: none; } }
.lb-caption { flex-shrink: 0; min-height: 22px; text-align: center; padding: 12px 24px calc(16px + env(safe-area-inset-bottom)); opacity: 0.7; font-size: 14px; transition: opacity 0.3s; }
/* Tap the photo: the controls step aside. */
.lb.bare .lb-top, .lb.bare .lb-caption, .lb.bare .lb-nav { opacity: 0; pointer-events: none; }

/* ---- Lock & message screens ---------------------------------------------- */
.screen {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--ink); text-align: center;
  transition: opacity 0.6s ease;
}
.screen.has-cover { background: #0b0b0b; color: #fff; color: var(--on-photo, #fff); }
.screen.out { opacity: 0; pointer-events: none; }
.screen .blur { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover;
  max-width: none; filter: blur(30px) brightness(0.5) saturate(1.1); transform: scale(1.08); opacity: 0; transition: opacity 1.2s ease; }
.screen .blur.in { opacity: 1; }
.screen-box { position: relative; width: min(440px, 100%); }
.screen h1 { font-size: clamp(42px, 9vw, 76px); }
.screen p { margin: 20px auto 0; max-width: 360px; font-size: 15px; line-height: 1.6; opacity: 0.82; }
.lock-form { margin: 34px auto 0; display: flex; border: 1px solid currentColor; border-color: rgba(127,127,127,0.6); }
.screen.has-cover .lock-form { border-color: rgba(255,255,255,0.6); border-color: color-mix(in srgb, var(--on-photo, #fff) 60%, transparent); }
.lock-form:focus-within { border-color: currentColor !important; }
.lock-form input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit;
  font: inherit; font-size: 16px; /* 16px: iOS doesn't zoom in */ padding: 15px 16px; letter-spacing: 0.04em;
}
.lock-form input::placeholder { color: inherit; opacity: 0.5; }
.lock-form button { padding: 0 22px 0 calc(22px + 0.34em); border-left: 1px solid; border-color: inherit; transition: background 0.3s, color 0.3s; }
.lock-form button:hover { background: rgba(255,255,255,0.12); background: color-mix(in srgb, var(--on-photo, #fff) 12%, transparent); }
.lock-form button:disabled { opacity: 0.5; }
.lock-msg { min-height: 22px; margin-top: 16px; font-size: 13px; opacity: 0.85; }
.shake { animation: g-shake 0.45s ease; }
@keyframes g-shake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-3px); } }
.screen-foot { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); opacity: 0.6; }
.screen .btn-outline { margin-top: 30px; border-color: currentColor; }
.screen .btn-outline:hover { background: var(--ink); color: var(--bg); }

/* ---- Footer & toast ------------------------------------------------------ */
.foot { padding: 80px 24px calc(52px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); }
/* The studio's logo above its name, cropped as an arch (round top, square base), with a hairline ring. */
.foot img { display: block; width: 46px; height: 54px; margin: 0 auto 16px; border-radius: 999px 999px 0 0; object-fit: cover; background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 4px var(--bg), 0 0 0 5px var(--rule); }
.foot .company { color: var(--ink); opacity: 0.8; }
.foot .by { font-size: 10px; letter-spacing: 0.3em; text-decoration: none; opacity: 0.75; }
.foot .by:hover { opacity: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(20,20,20,0.92); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13px;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.act { pointer-events: auto; padding: 0; }
.toast-act { padding: 13px 22px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .bg-img, .reveal, .hero .rise { transform: none !important; }
  .scroll-cue::after { display: none; }
}

/* ---- Film player controls (buildControls) ----------------------------- */
.player .vc { position: absolute; inset: 0; z-index: 3; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.player.playing .vc { opacity: 1; pointer-events: auto; }
.player.playing.idle .vc { opacity: 0; }
.player.playing.idle { cursor: none; }
.vc-hit { position: absolute; inset: 0; }
.vc-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 12px; background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0.28) 55%, transparent); }
.vc-row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.vc-gap { flex: 1; }
.vc-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; background: none; color: #fff; cursor: pointer; border-radius: 50%; opacity: 0.92; transition: opacity 0.2s, background 0.2s, transform 0.15s; -webkit-tap-highlight-color: transparent; }
.vc-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.vc-btn:active { transform: scale(0.92); }
.vc-btn svg { width: 22px; height: 22px; }
.vc-pp svg { width: 20px; height: 20px; }
.vc-btn[hidden] { display: none; }
/* Volume: the slider slides out beside the speaker on hover / focus. */
.vc-vol { display: inline-flex; align-items: center; }
.vc-vol-range { -webkit-appearance: none; appearance: none; width: 0; height: 22px; margin: 0; padding: 0; opacity: 0; background: none; cursor: pointer; outline: none; transition: width 0.25s var(--ease, ease), opacity 0.2s, margin 0.25s; }
.vc-vol:hover .vc-vol-range, .vc-vol:focus-within .vc-vol-range, .vc-vol-range:active { width: 84px; margin: 0 8px 0 2px; opacity: 1; }
.vc-vol-range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, #fff var(--v, 100%), rgba(255,255,255,0.28) var(--v, 100%)); }
.vc-vol-range::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, #fff var(--v, 100%), rgba(255,255,255,0.28) var(--v, 100%)); }
.vc-vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.4); }
.vc-vol-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.4); }
.vc-vol-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
@media (hover: none) { .vc-vol-range { display: none; } }
.vc-time { margin-left: 6px; font-family: var(--body-font, inherit); font-size: 12px; letter-spacing: 0.06em; color: rgba(255,255,255,0.82); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-scrub { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.vc-track { position: relative; width: 100%; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.22); transition: height 0.18s ease; }
.vc-scrub:hover .vc-track, .player.scrubbing .vc-track, .vc-scrub:focus-visible .vc-track { height: 5px; }
.vc-buf, .vc-fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: left center; transform: scaleX(0); will-change: transform; }
.vc-buf { background: rgba(255,255,255,0.32); }
.vc-fill { background: #fff; }
.vc-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.4); transform: scale(0); transition: transform 0.18s ease; will-change: left; }
.vc-scrub:hover .vc-knob, .player.scrubbing .vc-knob, .vc-scrub:focus-visible .vc-knob { transform: scale(1); }
.vc-tip { position: absolute; bottom: 26px; left: 0; width: 160px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.vc-scrub.hover .vc-tip, .player.scrubbing .vc-tip { opacity: 1; }
.vc-thumb { width: 160px; height: 90px; border-radius: 6px; background-color: #000; background-repeat: no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.18); }
.vc-thumb[hidden] { display: none; }
.vc-tip-time { font-size: 12px; letter-spacing: 0.06em; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.vc-flash { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,0.38); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vc-flash svg { width: 28px; height: 28px; }
.vc-flash.go { animation: vc-flash 0.6s ease; }
@keyframes vc-flash { 0% { opacity: 0.95; transform: scale(0.85); } 100% { opacity: 0; transform: scale(1.25); } }
.player.on-tv video { opacity: 0.15; }
.player:fullscreen, .player:-webkit-full-screen { padding-top: 0; width: 100%; height: 100%; border-radius: 0; }
.player:fullscreen .vc-bar { padding: 60px 32px 22px; }
.player { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Phones: a tall, cropped frame instead of a thin full-width strip (tapping
   plays full screen, where the whole film shows). */
@media (max-width: 600px) {
  .player { padding-top: 0; height: min(125vw, 68vh); height: min(125vw, 68svh); }
  .player video { object-fit: cover; }
  .player:fullscreen { height: 100%; }
  .player:fullscreen video { object-fit: contain; }
}
@media (max-width: 640px) {
  .vc-bar { padding: 30px 10px 6px; }
  .vc-btn { width: 38px; height: 38px; }
  .vc-time { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .player .vc, .vc-track, .vc-knob, .vc-tip { transition: none; }
  .vc-flash.go { animation: none; }
}

/* ---- Download all / Play all ------------------------------------------- */
.hero-dl { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 11px 22px; border: 1px solid rgba(255,255,255,0.55); color: #fff; text-decoration: none; font-size: 11px; transition: background 0.25s, border-color 0.25s; }
.hero-dl:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.hero-dl svg, .bar-dl svg, .btn-line svg, .album-dl svg { width: 15px; height: 15px; }
.bar-dl { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; padding-left: 22px; border-left: 1px solid var(--rule); }
@media (max-width: 600px) { .bar-dl .lbl { display: none; } .bar-dl { padding-left: 14px; margin-left: 2px; } }
.film-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-line { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 22px; border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent); background: none; color: var(--ink); font-size: 11px; text-decoration: none; cursor: pointer; transition: background 0.25s, border-color 0.25s; }
.btn-line:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn-line svg { width: 13px; height: 13px; }
@media (max-width: 600px) { .film-actions { margin-top: 20px; } .film-list { margin-top: 30px; } }
/* Download (more than one film): this video or all of them. */
.dl-pick { position: relative; display: inline-flex; }
.dl-toggle { background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.dl-menu { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 20; min-width: 190px; padding: 6px; border-radius: 12px;
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--rule); box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity 0.2s, transform 0.2s; }
.dl-pick.open .dl-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.dl-item { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.dl-item:hover, .dl-item:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.dl-item svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .dl-menu { transition: none; } }
/* The Download sheet + fast downloader (downloads.js, Oct 9 2026). */
.gd-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gd-card { position: relative; width: min(440px, 100%); max-height: calc(100svh - 40px); overflow: auto; padding: 30px 28px 26px; border-radius: 18px; color: var(--ink);
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--rule); box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.gd-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.gd-x:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.gd-x svg { width: 18px; height: 18px; }
.gd-k { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.gd-title { margin-top: 6px; font-size: 28px; line-height: 1.15; }
.gd-body { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.gd-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-seg button { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rule); background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.gd-seg button.on { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.gd-seg b { display: block; font-weight: 500; font-size: 14px; }
.gd-seg span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.gd-sum { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
.gd-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; }
.gd-go:hover { opacity: 0.9; }
.gd-go svg { width: 15px; height: 15px; }
.gd-note { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.gd-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.gd-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 14px; }
.gd-row:hover .gd-row-dl { opacity: 1; }
.gd-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-row-size { flex: none; font-size: 12px; color: var(--muted); }
.gd-row-dl { flex: none; width: 18px; height: 18px; opacity: 0.7; }
.gd-row-dl svg { width: 18px; height: 18px; }
.gd-prog { display: flex; flex-direction: column; gap: 10px; }
.gd-pct { font-family: var(--display); font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; }
.gd-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.gd-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.4s linear; }
.gd-speed { font-size: 14px; font-variant-numeric: tabular-nums; }
.gd-cancel { align-self: flex-start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.gd-done { display: flex; flex-direction: column; gap: 12px; }
.gd-done-k { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 26px; line-height: 1.15; }
.gd-done .gd-cancel { align-self: center; }
.gd-tick { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); }
.gd-tick svg { width: 18px; height: 18px; }
.gd-state { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-size: 12.5px; line-height: 1.5; }
.gd-safe { font-size: 12px; }
.gd-done .gd-list { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .gd-bar i { transition: none; } }
.album-head .album-dl { margin-left: auto; align-self: center; }
.album-dl .text-btn { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; opacity: 0.75; font-size: 11px; }
.album-dl .text-btn:hover { opacity: 1; }
.g-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; background: rgba(20,17,14,0.92); color: #f3eee6; font-size: 13px; letter-spacing: 0.02em; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; z-index: 60; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Up next (the last 5 seconds) ---------------------------------------- */
.upnext { position: absolute; right: 18px; bottom: 74px; z-index: 4; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 12px; background: rgba(12,10,8,0.78); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(14px) scale(0.98); pointer-events: none; transition: opacity 0.35s ease, transform 0.35s ease; max-width: min(380px, calc(100% - 36px)); }
.upnext.on { opacity: 1; transform: none; pointer-events: auto; }
.un-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #000; }
.un-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.un-go { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(0,0,0,0.28); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.un-ring { position: relative; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.un-ring svg:first-child { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
.un-ring circle { fill: none; stroke-width: 2.5; }
.un-ring .bg { stroke: rgba(255,255,255,0.28); }
.un-ring .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 0.12s linear; }
.un-ring > svg:last-child { width: 18px; height: 18px; margin-left: 2px; }
.un-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.un-label { font-size: 10px; color: rgba(255,255,255,0.7); }
.un-title { font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-close { flex: none; align-self: flex-start; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: rgba(255,255,255,0.7); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.un-close:hover { color: #fff; background: rgba(255,255,255,0.12); }
.un-close svg { width: 15px; height: 15px; }
.player.playing.idle .upnext.on { opacity: 1; }
@media (max-width: 640px) {
  .upnext { right: 10px; bottom: 62px; gap: 10px; padding: 8px; }
  .un-thumb { width: 92px; }
  .un-title { font-size: 17px; }
  .un-ring, .un-ring svg:first-child { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .upnext, .g-toast { transition: none; } }

/* A vendor's sample gallery (/testgallery/<name>): always says so. */
.g-test-ribbon { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 12px; background: #f2a981; color: #1b1410; font: 500 12.5px/1.4 system-ui, -apple-system, sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); pointer-events: none; }
.g-test-ribbon b { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11.5px; }

/* ?still=1 — a thumbnail in the New gallery studio: everything at rest. */
html.still, html.still body { overflow: hidden; }
html.still *, html.still *::before, html.still *::after { transition: none !important; animation: none !important; }
html.still .reveal, html.still .rise { opacity: 1 !important; transform: none !important; }
html.still .bar { display: none !important; }

/* ---- Theater: a playing film fills the window (gallery.js enterTheater) ---- */
html.g-theater, html.g-theater body { overflow: hidden; }
html.g-theater .bar { opacity: 0; pointer-events: none; }
html.g-theater .view.enter { animation: none; }
/* The playing film's boxes are lifted over the rest of the page too: a box that sticks (Side by Side's player column)
   or is set apart (Ambient Glow) keeps the fixed player inside its own layer, so the Download / Play on TV buttons
   beside it showed on top of the full-window film (Oct 19 2026). (pages.css's sticky still wins; it's lifted all the same.) */
html.g-theater .films-view, html.g-theater .player-wrap { position: relative; z-index: 60; }
.player.theater {
  position: fixed; inset: 0; z-index: 60; width: auto; height: auto; padding-top: 0;
  border-radius: 0; box-shadow: none; background: #000;
}
.player.theater video, .player.theater .poster { object-fit: contain; }
.player.theater .vc-bar { padding: 70px max(32px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left)); }
.theater-top { display: none; }
.player.theater .theater-top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px;
  padding: max(22px, env(safe-area-inset-top)) 32px 70px max(24px, env(safe-area-inset-left)); color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0)); pointer-events: none;
  transition: opacity 0.35s ease;
}
.player.theater.playing.idle .theater-top { opacity: 0; }
.theater-back {
  pointer-events: auto; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); transition: background 0.2s, transform 0.25s var(--ease);
}
.theater-back:hover { background: rgba(255,255,255,0.22); transform: translateX(-2px); }
.theater-back svg { width: 20px; height: 20px; }
.theater-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.theater-t { font-size: clamp(20px, 2vw, 28px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theater-name .caps { font-size: 9.5px; letter-spacing: 0.32em; opacity: 0.7; }

/* ---- Page settings (Oct 8 2026) ---------------------------------------------
   filmsLayout "wide": the phone player keeps the film's 16:9 shape instead of
   the tall cropped frame. photosLayout "grid": even squares, not masonry. */
@media (max-width: 600px) {
  html[data-films="wide"] .player { padding-top: 56.25%; height: auto; }
  html[data-films="wide"] .player video { object-fit: contain; }
  html[data-films="wide"] .player:fullscreen { padding-top: 0; height: 100%; }
}
/* --cols: the design's column count (gallery.js colCount). */
.grid.even, .grid.even .gseg { gap: 4px; }
.grid.even .gseg { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
@media (min-width: 700px) { .grid.even, .grid.even .gseg { gap: 8px; } }
.grid.even .tile-pic { border-radius: 0; }

/* filmsWeb "full": on computers the Films page's player runs edge to edge. */
@media (min-width: 900px) {
  html[data-films-web="full"] .player-wrap { max-width: none; padding: 0; }
  html[data-films-web="full"] .player:not(.theater) { border-radius: 0; box-shadow: none; }
}
/* filmsNav / photosNav "hide": that page's bar shows only itself (the names still go Home). */
/* filmsNav / photosNav "hide": that page shows no page tabs — the name (Home) and Download all only. */
html[data-view="films"][data-films-nav="hide"] .bar nav a[data-view],
html[data-films-nav="hide"] .film-ov nav a[data-view],
html[data-view="photos"][data-photos-nav="hide"] .bar nav a[data-view] { display: none; }
html[data-view="films"][data-films-nav="hide"] .bar .bar-dl,
html[data-films-nav="hide"] .film-ov .bar-dl,
html[data-view="photos"][data-photos-nav="hide"] .bar .bar-dl { margin-left: 0; padding-left: 0; border-left: 0; }

/* filmsOverlay: on the Films page the bar's name, tabs and Download all sit
   on the video (fading with the controls while it plays), not above it. */
.film-ov { display: none; }
html[data-films-overlay="on"] .film-ov {
  position: absolute; z-index: 4; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 56px max(22px, env(safe-area-inset-left));
  color: #fff; background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0)); pointer-events: none; transition: opacity 0.35s ease;
}
html[data-films-overlay="on"] .film-ov a { pointer-events: auto; color: #fff; text-decoration: none; }
.film-ov nav { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.film-ov nav a { opacity: 0.8; padding: 6px 0; }
.film-ov nav a:hover { opacity: 1; }
html[data-view="films"] .film-ov nav a[data-view="films"] { opacity: 1; border-bottom: 1px solid currentColor; }
.film-ov .bar-dl { border-left-color: rgba(255,255,255,0.3); }
.film-ov .bar-names { text-shadow: 0 1px 14px rgba(0,0,0,0.35); }
.player.playing.idle .film-ov { opacity: 0; }
.player.playing.idle .film-ov a { pointer-events: none; }
.player.theater .film-ov { display: none !important; }
html[data-view="films"][data-films-overlay="on"] .bar { display: none; }
html[data-films-overlay="on"] .films-view { padding-top: 0; }
@media (min-width: 900px) { html[data-films-overlay="on"] .player-wrap { padding-top: 0; } }
@media (max-width: 420px) { .film-ov .bar-names { font-size: 18px; } .film-ov nav { gap: 16px; } }

/* ← Home: a Netflix-style back arrow before their names (not on Home itself). */
.bar-home { display: inline-flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.bar-back {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-left: -8px; border-radius: 50%;
  transition: background 0.25s ease, transform 0.35s var(--ease);
}
.bar-back svg { width: 24px; height: 24px; stroke-width: 1.6; }
.bar-home:hover .bar-back { background: color-mix(in srgb, currentColor 10%, transparent); transform: translateX(-3px); }
.bar-home:focus-visible { outline: none; }
.bar-home:focus-visible .bar-back { outline: 1px solid currentColor; outline-offset: 2px; }
html[data-view="landing"] .bar-back { display: none; }
.film-ov .bar-back svg { filter: drop-shadow(0 1px 8px rgba(0,0,0,0.4)); }
@media (max-width: 420px) { .bar-home { gap: 8px; } .bar-back { width: 34px; height: 34px; } .bar-back svg { width: 21px; height: 21px; } }

/* ---- Slideshow (slideshow.js, Oct 13 2026) ---- */
.ss { position: fixed; inset: 0; z-index: 110; background: #050505; color: #f3eee6; opacity: 0; transition: opacity 0.4s var(--ease, ease); overflow: hidden; }
.ss.in { opacity: 1; }
.ss-stage { position: absolute; inset: 0; cursor: pointer; }
.ss-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.3s ease; }
.ss-slide.on { opacity: 1; }
.ss-slide.quick { transition-duration: 0.45s; }
.ss-slide.wash-only { opacity: 0.55; }
.ss-slide.wash-only .ss-frame { display: none; }
/* A blurred wash of the photo fills the screen behind it. */
.ss-wash { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(48px) saturate(1.15) brightness(0.55); transform: scale(1.05); }
.ss-frame { position: absolute; inset: clamp(12px, 3vh, 36px) clamp(12px, 3vw, 48px); display: flex; align-items: center; justify-content: center; container-type: size; }
/* Sized from its shape (--r = width / height, slideshow.js) to fill the frame — never smaller because the file is small.
   No will-change: the browser then draws it at its full size, so the slow drift stays sharp. */
.ss-pic { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 30px 90px rgba(0,0,0,0.55); transform-origin: center; }
.ss-pic.fit { width: min(100cqw, 100cqh * var(--r)); height: min(100cqh, 100cqw / var(--r)); max-width: none; max-height: none; object-fit: cover; }
.ss-slide.on .ss-pic { animation: var(--ss-drift, ss-dz1) var(--ss-dur, 7s) linear forwards; }
.ss-slide.dz1 { --ss-drift: ss-dz1; } .ss-slide.dz2 { --ss-drift: ss-dz2; } .ss-slide.dz3 { --ss-drift: ss-dz3; } .ss-slide.dz4 { --ss-drift: ss-dz4; }
.ss-slide.held .ss-pic { animation-play-state: paused; }
/* The drift (a gentle Ken Burns) only ever scales down from full size, so the photo is never stretched past how it was drawn. */
@keyframes ss-dz1 { from { transform: scale(0.95) translate(0.6%, 0.5%); } to { transform: scale(1) translate(0, 0); } }
@keyframes ss-dz2 { from { transform: scale(1) translate(0, 0); } to { transform: scale(0.95) translate(-0.6%, -0.4%); } }
@keyframes ss-dz3 { from { transform: scale(0.955) translate(-0.6%, 0.4%); } to { transform: scale(1) translate(0, 0); } }
@keyframes ss-dz4 { from { transform: scale(1) translate(0, 0); } to { transform: scale(0.955) translate(0.5%, -0.5%); } }
@media (prefers-reduced-motion: reduce) { .ss-slide.on .ss-pic { animation: none; } .ss-slide { transition-duration: 0.6s; } }

/* Title, chapter and end cards */
.ss-card { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.9s ease; }
.ss-card.on { opacity: 1; pointer-events: auto; }
.ss-card.intro, .ss-card.end { background: radial-gradient(ellipse at center, rgba(5,5,5,0.35), rgba(5,5,5,0.85)); }
.ss-card-in { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 560px; transform: translateY(10px); transition: transform 1.1s var(--ease, ease); }
.ss-card.on .ss-card-in { transform: none; }
.ss-kick { font-size: 10.5px; letter-spacing: 0.42em; text-transform: uppercase; opacity: 0.62; }
.ss-title { margin: 16px 0 0; font-family: var(--display); font-weight: var(--display-weight, 400); font-style: var(--display-style, normal); text-transform: var(--display-case, none);
  letter-spacing: var(--display-tracking, normal); font-size: clamp(38px, 6.5vw, 84px); line-height: 1.02; text-wrap: balance; }
.ss-card.chapter .ss-title { font-size: clamp(34px, 5.5vw, 72px); }
.ss-meta { margin-top: 16px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.55; }
.ss-paces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(480px, 100%); margin-top: 38px; }
.ss-pace { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-radius: 14px; border: 1px solid rgba(243,238,230,0.18); background: rgba(255,255,255,0.03);
  color: inherit; font: inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ss-pace b { font-family: var(--display); font-weight: var(--display-weight, 400); font-size: 22px; }
.ss-pace span { font-size: 11px; letter-spacing: 0.08em; opacity: 0.6; }
.ss-pace:hover { border-color: rgba(243,238,230,0.4); }
.ss-pace.on { border-color: #f3eee6; background: rgba(243,238,230,0.1); }
.ss-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; height: 50px; padding: 0 34px; border: 0; border-radius: 999px; background: #f3eee6; color: #111;
  font: inherit; font-size: 11.5px; letter-spacing: 0.24em; text-transform: uppercase; cursor: pointer; transition: transform 0.2s; }
.ss-go:hover { transform: scale(1.03); }
.ss-go svg { width: 14px; height: 14px; }
.ss-ghost { margin-top: 14px; padding: 6px 10px; border: 0; background: none; color: inherit; opacity: 0.6; font: inherit; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; cursor: pointer; }
.ss-ghost:hover { opacity: 1; }
.ss-acts { display: flex; flex-direction: column; align-items: center; }
.ss-tip { margin-top: 18px; font-size: 11.5px; opacity: 0.42; }

/* Controls: fade away while it plays, back on a move or tap */
.ss-ctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 18px clamp(16px, 3vw, 34px) calc(20px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0; transform: translateY(8px); transition: opacity 0.45s, transform 0.45s; pointer-events: none; }
.ss.playing.awake .ss-ctl, .ss.playing.paused .ss-ctl { opacity: 1; transform: none; pointer-events: auto; }
.ss.ended .ss-ctl { opacity: 0; pointer-events: none; }
.ss-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 5; opacity: 0.75; transition: opacity 0.4s; }
.ss.playing:not(.awake):not(.paused) .ss-x { opacity: 0; }
.ss-ctl-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ss-where { font-family: var(--display); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-count { font-size: 10.5px; letter-spacing: 0.24em; opacity: 0.6; font-variant-numeric: tabular-nums; }
.ss-ctl-c { display: flex; align-items: center; gap: 10px; }
.ss-ctl-r { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ss-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.1); color: inherit; cursor: pointer; transition: background 0.2s; }
.ss-btn:hover { background: rgba(255,255,255,0.2); }
.ss-btn svg { width: 19px; height: 19px; }
.ss-play { width: 54px; height: 54px; background: #f3eee6; color: #111; }
.ss-play:hover { background: #fff; }
.ss-play svg { width: 20px; height: 20px; }
.ss-speed { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.ss-chip { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: inherit; opacity: 0.65; font: inherit; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.ss-chip.on { opacity: 1; background: rgba(243,238,230,0.16); }
/* The thin line filling across each photo's time */
/* Kept for timing only — not shown (the user asked for no progress bar). */
.ss-prog { display: none; }
.ss-prog-i { display: block; height: 100%; width: 0; background: rgba(243,238,230,0.75); }
.ss:not(.playing) .ss-prog, .ss.ended .ss-prog { opacity: 0; }
@keyframes ss-fill { from { width: 0; } to { width: 100%; } }
.ss.waiting::after { content: ''; position: absolute; left: 50%; top: 50%; z-index: 6; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: ss-spin 0.9s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .ss-ctl { display: flex; flex-direction: column; gap: 12px; }
  .ss-ctl-l { align-items: center; text-align: center; max-width: 100%; }
  .ss-ctl-r { justify-content: center; }
  .ss-paces { gap: 8px; }
  .ss-pace b { font-size: 19px; }
  .ss-frame { inset: 10px 8px; }
}
/* Slideshow links beside Download all */
.hero-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.hero-acts .hero-dl { margin-top: 0; }
.album-dl { display: inline-flex; align-items: center; gap: 20px; }
.ss-link svg { width: 11px !important; height: 11px !important; }
@media (max-width: 600px) { .bar-ss { display: none; } }

/* The photos page keeps its place by itself when a favourite adds the tab row (gallery.js toggleFav) —
   the browser's own scroll anchoring is off here so it doesn't move it twice. */
.photos-view { overflow-anchor: none; }

/* ---- Play on TV (tv.js, Oct 13 2026) ---------------------------------------- */
.tv-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; }
.tv-btn .tv-i { display: inline-flex; }
.tv-btn .tv-i svg { width: 15px; height: 15px; }
/* In the round buttons (photo viewer, slideshow) the icon sits dead centre: their own centring wins over .tv-btn's row. */
.icon-btn.tv-btn, .ss-btn.tv-btn { display: grid; place-items: center; gap: 0; padding: 0; }
.icon-btn.tv-btn .tv-i, .ss-btn.tv-btn .tv-i { display: block; line-height: 0; }
.icon-btn.tv-btn .tv-i svg { width: 20px; height: 20px; display: block; }
.ss-btn.tv-btn .tv-i svg { width: 19px; height: 19px; display: block; }
.ss-tvlink { display: inline-flex; align-items: center; gap: 8px; }
.ss-tvlink .tv-i svg { width: 14px; height: 14px; }
.bar-tv { background: none; border-top: 0; border-right: 0; border-bottom: 0; font: inherit; color: inherit; }
@media (max-width: 600px) { .bar-tv .lbl { display: none; } }
.hero-acts .tv-btn { background: none; font: inherit; }
/* A film on the TV: shown once the browser finds one (gallery.js html.can-tv). */
.film-tv { display: none !important; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
html.can-tv .film-tv { display: inline-flex !important; }
.tv-back { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: g-fade 0.25s ease both; }
.tv-card { position: relative; width: min(440px, 100%); max-height: calc(100svh - 40px); overflow: auto; padding: 30px 28px 22px; border-radius: 18px; color: var(--ink);
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--rule); box-shadow: 0 30px 80px rgba(0,0,0,0.45); text-align: center; }
.tv-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.tv-x:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tv-x svg { width: 18px; height: 18px; }
.tv-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tv-icon svg { width: 26px; height: 26px; }
.tv-title { margin: 14px 0 0; font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style); text-transform: var(--display-case);
  letter-spacing: var(--display-tracking); font-size: 28px; line-height: 1.15; }
.tv-lead { margin: 10px auto 0; max-width: 360px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.tv-steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: tv; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.tv-steps li { counter-increment: tv; position: relative; padding: 12px 14px 12px 50px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: color-mix(in srgb, var(--ink) 6%, transparent); }
.tv-steps li::before { content: counter(tv); position: absolute; left: 14px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; }
.tv-go { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin-top: 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; }
.tv-go:hover { opacity: 0.92; }
.tv-alt { display: block; margin: 14px auto 0; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.tv-ghost { display: block; margin: 12px auto 0; padding: 6px 10px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.tv-ghost:hover { color: var(--ink); }
/* On the TV (a cast slideshow): no controls at all. */
.ss.on-tv .ss-ctl, .ss.on-tv .ss-x { display: none !important; }

/* ---- No banding (Oct 13 2026) ------------------------------------------------
   Soft gradients over dark colours step visibly on 8-bit screens. A faint,
   fine grain (--dither, grey noise at ~5%) laid over each one breaks the
   steps up without being seen as texture. */
:root {
  --dither: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 .055'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Over the picture and its shade, under the words. */
.hero::before, .panel::before, .lx-stage::before, .lx-half::before, .ss-slide::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--dither);
}
.lx-stage::before, .lx-half::before { z-index: 2; }
.ss-frame { z-index: 2; }
.tv-prep { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; text-align: left;
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
