/* Face Gallery — quiet, editorial, lots of air. */
:root {
  --bg: #f8f6f2;
  --paper: #ffffff;
  --ink: #1b1a18;
  --ink-2: #57534d;
  --muted: #8f8a82;
  --line: #e4dfd7;
  --accent: #1b1a18;
  --danger: #a5402d;
  --serif: 'Cormorant Garamond', 'Noto Serif Thai', 'Noto Serif Myanmar', Georgia, serif;
  --sans: 'Inter', 'IBM Plex Sans Thai', 'Noto Sans Myanmar', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.eyebrow {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 9vw, 104px);
  line-height: 1.02;
  letter-spacing: -.01em;
}
.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.15;
}
.lede { color: var(--ink-2); max-width: 34em; }
.small { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---------- frame ---------- */
.topbar {
  display: flex; align-items: center; justify-content: center;
  height: 72px; padding: 0 var(--gutter);
}
.topbar a { text-decoration: none; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 620px; margin: 0 auto; }
main { flex: 1; }
footer {
  padding: 72px var(--gutter) 40px;
  text-align: center;
}
.rule { height: 1px; background: var(--line); border: 0; margin: 0 auto; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 24px 0 0; }
.hero-cover {
  margin: 0 auto;
  width: 100%;
  max-width: 1240px;
  aspect-ratio: 3 / 2;
  background: #ebe6de;
  overflow: hidden;
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-cover img.in { opacity: 1; }
.hero-text { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.hero-text .display { margin: 18px 0 20px; }
@media (max-width: 640px) { .hero-cover { aspect-ratio: 4 / 5; } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--bg);
  font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease), opacity .25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; }
.link {
  background: none; border: 0; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--ink); padding: 4px 0;
}
.link.muted { color: var(--muted); border-color: var(--line); }

.field { display: block; margin-bottom: 22px; text-align: left; }
.field > span { display: block; margin-bottom: 8px; }
.input {
  width: 100%; height: 50px; padding: 0 2px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; outline: none;
  font-size: 17px; font-weight: 300;
  transition: border-color .2s;
}
.input:focus { border-color: var(--ink); }
.input.center { text-align: center; letter-spacing: .3em; font-size: 22px; }

.check { display: flex; gap: 14px; align-items: flex-start; text-align: left; cursor: pointer; }
.check input { appearance: none; flex: none; width: 18px; height: 18px; margin-top: 4px; border: 1px solid var(--ink); background: transparent; cursor: pointer; display: grid; place-content: center; }
.check input:checked::after { content: ''; width: 10px; height: 10px; background: var(--ink); }

.status { min-height: 1.6em; color: var(--ink-2); font-size: 14px; }
.status.error { color: var(--danger); }
.spinner { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--muted); border-top-color: var(--ink); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -1px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- finder ---------- */
.panel { text-align: center; padding-top: 8px; padding-bottom: 24px; }
.panel .title { margin: 14px 0 14px; }
.panel .lede { margin: 0 auto 36px; }
.actions { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 32px 0 18px; }
@media (max-width: 520px) { .actions { grid-template-columns: 1fr; } }
.consent { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }

.selfie-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.selfie-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; filter: grayscale(.2); }

/* ---------- results ---------- */
.results-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 56px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.results-head .tools { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.grid { columns: 3 280px; column-gap: 14px; }
.grid figure {
  break-inside: avoid; margin: 0 0 14px; cursor: zoom-in; background: #ebe6de; overflow: hidden;
}
.grid img { width: 100%; height: auto; opacity: 0; transform: scale(1.015); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.grid img.in { opacity: 1; transform: none; }
.grid figure:hover img.in { transform: scale(1.02); }
@media (max-width: 520px) { .grid { columns: 2; column-gap: 8px; } .grid figure { margin-bottom: 8px; } }

.empty { text-align: center; padding: 64px 0; color: var(--ink-2); }

.pixieset { text-align: center; padding-top: 72px; }
.pixieset .title { margin: 12px 0 24px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: grid; grid-template-rows: 64px 1fr 72px;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 60px -30px rgba(0,0,0,.25); }
.lb-nav {
  position: absolute; top: 0; bottom: 0; width: 22%; border: 0; background: none; cursor: pointer;
  font: 300 34px/1 var(--serif); color: var(--ink-2);
}
.lb-nav.prev { left: 0; text-align: left; padding-left: var(--gutter); }
.lb-nav.next { right: 0; text-align: right; padding-right: var(--gutter); }
.icon-btn { background: none; border: 0; cursor: pointer; font: 300 28px/1 var(--sans); color: var(--ink); padding: 8px; }

/* ---------- admin ---------- */
.admin main { padding-bottom: 80px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); padding: clamp(22px, 4vw, 40px); margin-bottom: 28px; }
.card h2 { margin-bottom: 26px; }
.drop {
  border: 1px dashed var(--muted); padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--ink); background: #fbfaf8; }
.progress { height: 2px; background: var(--line); margin: 18px 0 10px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s var(--ease); }
.log { font: 12px/1.6 ui-monospace, Menlo, monospace; color: var(--ink-2); max-height: 160px; overflow: auto; white-space: pre-wrap; }
.events { list-style: none; }
.events li { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.events li:last-child { border-bottom: 0; }
.events .ev-main { flex: 1; min-width: 200px; }
.events .ev-title { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.events .ev-actions { display: flex; gap: 18px; }
.done { text-align: center; }
.done .qr { width: 200px; margin: 24px auto; }
.done .qr svg { width: 100%; height: auto; }
.urlbox { font-size: 14px; word-break: break-all; padding: 12px; background: var(--bg); margin: 10px 0 18px; }
.inline { display: flex; gap: 12px; align-items: center; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }

/* ================= v2: admin views ================= */
.admin-top { justify-content: space-between; }
.admin-top nav { display: flex; gap: 22px; align-items: center; }
.admin-top nav > * { white-space: nowrap; }
@media (max-width: 760px) { .admin-top { flex-direction: column; height: auto; padding-top: 18px; padding-bottom: 10px; gap: 12px; } .admin-top nav { flex-wrap: wrap; justify-content: center; gap: 8px 18px; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 28px 0 32px; }
.display.sm { font-size: clamp(36px, 5vw, 60px); margin-top: 8px; }
.wrap-gap { flex-wrap: wrap; gap: 14px; }
.cols-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }
.input.slim { width: auto; height: 38px; font-size: 14px; }
.btn.danger, .link.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.danger-zone { border-color: #ecd3cc; }

.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 0; text-decoration: none; font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }

/* event cards */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.ev-card { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); transition: border-color .2s; }
.ev-card:hover { border-color: var(--ink); }
.ev-cover { aspect-ratio: 4 / 3; background: #ebe6de; overflow: hidden; }
.ev-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
.ev-cover img.in { opacity: 1; }
.ev-body { padding: 20px 22px 22px; }
.ev-body .ev-title { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin: 6px 0 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pill { font: 500 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 6px 8px; border: 1px solid var(--line); color: var(--ink-2); }
.pill.on { border-color: var(--ink); color: var(--ink); }
.pill.warn { border-color: #e5c9a8; color: #9a6a2c; }

/* photo manager */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pm-item { position: relative; margin: 0; background: #ebe6de; cursor: pointer; overflow: hidden; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s; aspect-ratio: 1 / 1; }
.pm-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.pm-item img.in { opacity: 1; }
.pm-item.sel { outline-color: var(--ink); }
.pm-item.sel::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 12px; }
.pm-item.is-cover::before { content: 'COVER'; position: absolute; top: 8px; left: 8px; z-index: 1; font: 500 9px/1 var(--sans); letter-spacing: .15em; padding: 5px 6px; background: var(--bg); }
.pm-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 6px; padding: 18px 8px 6px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.45)); opacity: 0; transition: opacity .2s; }
.pm-item figcaption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item:hover figcaption { opacity: 1; }

/* stats */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tile { background: var(--paper); border: 1px solid var(--line); padding: 20px; }
.tile b { display: block; font: 300 36px/1.1 var(--serif); }
.tile span { font-size: 12px; color: var(--muted); }
.stat-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; }
.stat-card { margin-bottom: 28px; }
.bars { list-style: none; margin-top: 14px; }
.bars li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; font-size: 14px; }
.bars li i { position: absolute; left: 0; top: 0; bottom: 0; background: #f0ebe3; z-index: 0; }
.bars li span { position: relative; z-index: 1; }
.bars .bv { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.daychart { display: flex; align-items: flex-end; gap: 3px; height: 140px; margin-top: 18px; }
.dc { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; gap: 1px; }
.dc i { flex: 1; min-height: 1px; }
.dc i.v, .legend i.v { background: #cfc6b8; }
.dc i.d, .legend i.d { background: var(--ink); }
.legend { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.top-grid figure { margin: 0; }
.top-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #ebe6de; opacity: 0; transition: opacity .4s; }
.top-grid img.in { opacity: 1; }
.top-grid figcaption { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font: 500 10px/1 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }

/* ================= v2: landing album grid ================= */
.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px) clamp(16px, 2.4vw, 32px); }
@media (max-width: 900px) { .albums { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .albums { grid-template-columns: 1fr; } }
.album { display: block; text-decoration: none; }
.album-cover { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #ebe6de; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity 1s var(--ease), transform 1.4s var(--ease); }
.album-cover img.in { opacity: 1; transform: none; }
.album:hover .album-cover img.in { transform: scale(1.03); }
.album-lock { position: absolute; right: 12px; bottom: 12px; font: 500 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 7px 9px; background: rgba(248,246,242,.92); }
.album h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; margin: 18px 0 6px; }
.section-head { text-align: center; padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }

/* ---------- language switcher (guest pages) ---------- */
.topbar { position: relative; }
.lang { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; gap: 2px; }
.lang button {
  background: none; border: 0; cursor: pointer; padding: 8px 7px;
  font: 400 12px/1 var(--sans); letter-spacing: .06em; color: var(--muted);
  border-bottom: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 720px) {
  .topbar:has(.lang) { flex-direction: column; height: auto; padding-top: 20px; padding-bottom: 8px; gap: 6px; }
  .lang { position: static; transform: none; }
}

/* Burmese: taller glyphs, no tracking (letter-spacing breaks Myanmar clusters) */
html[lang="my"] body { line-height: 1.95; }
html[lang="my"] :is(.btn, .link, .lede, .title, .status, .check, .toggle, .album-lock, button, label, h1, h2, h3, p, span) { letter-spacing: 0 !important; }
html[lang="my"] .title { line-height: 1.6; }
html[lang="my"] .btn { line-height: 1.5; text-transform: none; }
html[lang="my"] body { overflow-wrap: anywhere; }

/* ---------- videos ---------- */
.videos { text-align: center; padding-top: clamp(56px, 9vh, 96px); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); text-align: left; }
.video-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; margin: 18px 0 6px; }
.vthumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer; overflow: hidden; background: #e9e4dc; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.vthumb img.in { opacity: 1; }
.vthumb:hover img { transform: scale(1.02); }
.vplay { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(248, 246, 242, .92); }
.vplay::after { content: ''; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--ink); }
.vdur { position: absolute; right: 10px; bottom: 10px; font: 500 11px/1 var(--sans); letter-spacing: .08em; padding: 6px 8px; background: rgba(27, 26, 24, .72); color: #fff; }
.vactions { display: flex; gap: 24px; margin-top: 14px; }
.vplayer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #141311; color: #f3efe8; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.vplayer.open { opacity: 1; pointer-events: auto; }
.vplayer .lb-top, .vplayer .lb-bottom { padding: 14px var(--gutter); }
.vplayer .eyebrow, .vplayer .icon-btn, .vplayer .link { color: #f3efe8; }
.vp-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter); min-height: 0; }
.vp-stage iframe { width: min(1200px, 100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; background: #000; }
.vq { display: flex; gap: 4px; }
.vq button { font: 500 11px/1 var(--sans); letter-spacing: .08em; color: #f3efe8; background: transparent; border: 1px solid rgba(243, 239, 232, .28); padding: 8px 10px; cursor: pointer; }
.vq button.on { background: #f3efe8; color: #141311; border-color: #f3efe8; }
.vp-stage video { display: block; width: auto; height: auto; max-width: min(1200px, 100%); max-height: calc(100dvh - 140px); background: #000; }

/* ---------- admin: event type, cover, crop, video list ---------- */
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cover-card { text-align: center; }
.cover-preview { aspect-ratio: 3 / 2; background: #ebe6de; margin: 16px 0 18px; overflow: hidden; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.cover-preview img.in, .cover-preview img[src^="blob:"] { opacity: 1; }
.crop-modal { position: fixed; inset: 0; z-index: 80; background: rgba(20, 19, 17, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.crop-modal[hidden] { display: none; }
.crop-box { background: var(--paper); width: min(860px, 100%); max-height: 100%; overflow: auto; padding: clamp(18px, 3vw, 32px); }
.crop-stage { position: relative; margin-top: 14px; aspect-ratio: 3 / 2; overflow: hidden; background: #222; cursor: grab; touch-action: none; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-guide { position: absolute; top: 0; bottom: 0; left: 23.33%; width: 53.33%; border-left: 1px dashed rgba(255, 255, 255, .85); border-right: 1px dashed rgba(255, 255, 255, .85); pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .12); }
#cropZoom { width: 100%; }
.vgroup { margin: 26px 0 6px; }
.vgroup:first-child { margin-top: 8px; }
.vrow { display: grid; grid-template-columns: 112px minmax(0, 1fr) 150px auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vrow.is-hidden { opacity: .45; }
.vrow-thumb { aspect-ratio: 16 / 9; background: #ebe6de; overflow: hidden; }
.vrow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vrow-main .small { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow-ord { display: flex; gap: 6px; }
.vrow-ord button { font-size: 18px; padding: 2px 6px; }
.vrow-ord button:disabled { opacity: .25; }
.vrow-hide { margin: 0; white-space: nowrap; }
@media (max-width: 760px) {
  .vrow { grid-template-columns: 88px minmax(0, 1fr); }
  .vrow .vc { grid-column: 1 / -1; }
  .vrow-ord, .vrow-hide { grid-column: auto; }
}

/* ---------- guest: grouped films ---------- */
.vcat { margin: clamp(36px, 6vw, 64px) 0 22px; text-align: left; }
.vcat:first-of-type { margin-top: 0; }
.vcat h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 34px); margin-top: 8px; }
.video-card.featured { grid-column: 1 / -1; }
.video-card.featured h3 { font-size: clamp(28px, 3.4vw, 40px); }
.video-card.featured .vplay { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.video-card.featured .vplay::after { left: 34px; top: 27px; border-width: 15px 0 15px 22px; }
.video-only .videos { padding-top: clamp(24px, 4vh, 48px); }
.video-only .videos > .rule { display: none; }

/* ---------- per-file download stats ---------- */
.ftbl .frow { cursor: pointer; }
.ftbl .frow:hover td { background: #faf8f4; }
.ftbl .frow.open td { background: #f3efe8; }
.ftbl .fthumb { width: 56px; padding-right: 0; }
.ftbl .fthumb img { width: 48px; height: 36px; object-fit: cover; display: block; background: #ebe6de; }
.ftbl .fvid { display: inline-flex; width: 48px; height: 36px; align-items: center; justify-content: center; background: #ebe6de; font-size: 13px; }
.ftbl .fname { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.ftbl .flog > td { background: #faf8f4; padding: 6px 12px 16px; }
.tbl.inner { font-size: 12px; }
.tbl.inner td.vid { font-family: ui-monospace, Menlo, monospace; color: var(--muted); }

/* ---------- full gallery (client delivery) ---------- */
.gallery { padding-top: 72px; }
.gal-head { text-align: center; margin-bottom: 28px; }
.gal-head .title { margin: 12px 0 6px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; margin-bottom: 10px; scrollbar-width: none; justify-content: safe center; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--line); background: transparent; padding: 9px 16px; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s; }
.chip small { font-size: 11px; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
/* justified rows: each tile grows by its aspect ratio, so rows fill the width and stay in shooting order */
.jgrid { --row: 240px; display: flex; flex-wrap: wrap; gap: 6px; }
.jgrid::after { content: ''; flex-grow: 999; }
.jgrid figure { position: relative; overflow: hidden; background: #ebe6de; cursor: zoom-in; min-width: 0; }
.jgrid img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
.jgrid img.in { opacity: 1; }
@media (max-width: 520px) { .jgrid { --row: 120px; gap: 3px; } }
.downloads { padding-top: 72px; }
.dl-list { list-style: none; text-align: left; border-top: 1px solid var(--line); margin-bottom: 18px; }
.dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dl-list h3 { font: 400 17px/1.3 var(--sans); }
.dl-list .btn { flex: none; padding-left: 18px; padding-right: 18px; }
.dl-list .dl-note { display: block; color: var(--ink-2); }
.inline-form { display: inline; }
.lb-actions { display: inline-flex; gap: 22px; align-items: center; }

.r2-box { border: 1px solid var(--line); padding: 14px 16px; margin: 6px 0 18px; }

/* ---------- favourites ---------- */
.grid figure { position: relative; }
.heart {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.88); color: var(--ink); font-size: 18px; line-height: 36px; text-align: center;
  cursor: pointer; opacity: 0; transition: opacity .2s, transform .2s; padding: 0; box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
figure:hover .heart, .heart.on, .heart:focus-visible { opacity: 1; }
.heart.on { color: #b3423a; }
.heart:active { transform: scale(.9); }
@media (hover: none) { .heart { opacity: .9; width: 32px; height: 32px; line-height: 32px; font-size: 16px; right: 6px; bottom: 6px; } }
.fav-chip small { color: inherit; }
.fav-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; border: 1px solid var(--line); padding: 12px 16px; margin: 0 0 16px; }
.fav-bar p { margin: 0; }
.fav-tools { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.lb-fav.on { color: #e08a83; }
.fav-dlg { border: 0; padding: 36px 28px 28px; max-width: min(420px, calc(100vw - 32px)); width: 100%; background: var(--bg); color: var(--ink); text-align: center; }
.fav-dlg::backdrop { background: rgba(20,18,16,.45); }
.fav-dlg .title { margin: 10px 0 8px; }
.fav-dlg .input { margin: 18px 0 22px; width: 100%; }
.fav-dlg .inline { justify-content: center; gap: 26px; }

/* ---------- QR Live ---------- */
.live-badge { display: inline-flex; gap: 10px; align-items: center; margin: 16px 0 0; font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }
.live-badge b { color: #c0392b; font-weight: 500; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.live-wait { text-align: center; margin: 24px auto 40px; }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  border: 0; background: var(--ink); color: var(--bg); padding: 13px 22px; border-radius: 999px; font: inherit; font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22); cursor: pointer; max-width: calc(100vw - 32px);
}
