/* Picpoint app pages. The look is shared with the landing page: see brand.css. */
/* Colours, fonts and the wordmark come from brand.css (loaded first). Only app-specific tokens live here. */
:root {
  --bg: var(--pp-tint);
  --card: #FFFFFF;
  --text: var(--ink);
  --line-strong: var(--pp-line-strong);
  --soft: var(--pp-tint);
  --accent-text: var(--pp-on-teal);
  --accent-tint: var(--pp-teal-tint);
  --ok: var(--pp-teal-deep);
  --ok-tint: var(--pp-teal-tint);
  --danger: #B42318;
  --danger-tint: #FDE8E6;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 32px; }
.wrap.narrow { max-width: 480px; }
.wrap.guest { max-width: 480px; }

header.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; min-height: 64px; padding: 8px 0;
}
.brand { display: inline-flex; align-items: baseline; gap: 14px; color: var(--text); text-decoration: none; }
.brand .wordmark { font-size: 1.05rem; }
.brand .tag { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pp-cap); }

h1 { font-size: 2rem; line-height: 1.14; font-weight: 300; letter-spacing: -0.025em; margin: 0 0 8px; }
h2 { font-size: 1.125rem; font-weight: 400; letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 1rem; font-weight: 500; margin: 24px 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.lead { color: var(--muted); font-size: 1rem; margin-bottom: 18px; }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px;   /* flat: no border, no shadow */
}

/* ---- form controls ---- */
label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="date"], select {
  width: 100%; height: 44px; padding: 0 14px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 2px;
}
input:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus);
}
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.field { margin-bottom: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > .field { flex: 1 1 200px; }

/* ---- buttons: flat, square-cornered. Teal is the one thing to do next ---- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; font: inherit; font-size: 0.95rem; font-weight: 500;
  cursor: pointer; text-decoration: none; border-radius: 2px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); transition: background-color .25s ease, border-color .25s ease;
}
button:hover:not(:disabled), .btn:hover { background: var(--pp-teal-hover); border-color: var(--pp-teal-hover); }
button.secondary, .btn.secondary {
  background: transparent; color: var(--text); border-color: var(--line-strong);
}
button.secondary:hover:not(:disabled), .btn.secondary:hover { background: #fff; border-color: var(--pp-cap); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--text); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger-tint); border-color: var(--danger); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.small, .btn.small { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }
button.block, .btn.block { width: 100%; min-height: 54px; font-size: 1rem; border-radius: 2px; }
@media (max-width: 700px) {
  button.small, .btn.small { min-height: 44px; }
}

/* ---- notices and chips ---- */
.notice { padding: 12px 14px; border-radius: 2px; margin-bottom: 12px; background: var(--accent-tint); font-size: 0.92rem; }
.notice.error { background: var(--danger-tint); border: 1px solid var(--danger); color: #8E1B12; }
.notice.ok { background: var(--ok-tint); color: var(--ok); font-weight: 500; }
.hidden { display: none !important; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 500; background: #EFEFEC; color: var(--muted);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.warn { background: var(--danger-tint); color: var(--danger); }
.pill {
  display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-ink); font-size: 0.82rem; font-weight: 500; line-height: 1.3; margin-bottom: 14px;
  overflow-wrap: anywhere;
}

a { color: var(--accent-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head h2 { margin: 0; }

/* ---- sign-in: split screen. The left half is a blurred event photo, like the landing hero ---- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; min-height: 520px; background: var(--card); border-radius: var(--radius); }
.auth-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 40px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 32px;
}
.auth-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--pp-mist) url("img/hero-bg.webp") center / cover no-repeat; filter: blur(8px); transform: scale(1.1); }
.auth-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.5); }
.auth-hero .brand { color: #fff; }
.auth-hero .brand .tag { color: rgba(255, 255, 255, 0.7); }
.auth-hero h2 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 300; }
.auth-hero p { color: rgba(255, 255, 255, 0.85); max-width: 420px; margin: 0; }
.auth-arch { width: 96px; aspect-ratio: 3 / 4.2; border-color: rgba(255, 255, 255, 0.92); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form h2 { font-size: 2.2rem; letter-spacing: -0.025em; font-weight: 300; }
@media (max-width: 800px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-hero { display: none; }
  .auth-form { padding: 24px 20px; }
}

.btn.google { gap: 12px; }

/* ---- viewfinder corners: the only decoration ---- */
.vf { position: absolute; pointer-events: none; }
.vf i { position: absolute; width: 16px; height: 16px; border: 0 solid var(--focus); }
.vf i:nth-child(1) { left: 0; top: 0; border-width: 3px 0 0 3px; border-top-left-radius: 4px; }
.vf i:nth-child(2) { right: 0; top: 0; border-width: 3px 3px 0 0; border-top-right-radius: 4px; }
.vf i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 4px; }
.vf i:nth-child(4) { right: 0; bottom: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 4px; }
.vf.frame { inset: 14%; }

/* ---- studio ---- */
.studio, .studio-skel { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .studio, .studio-skel { grid-template-columns: 1fr; gap: 0; } }
.events { display: flex; flex-direction: column; gap: 10px; }
.ev {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  min-height: 56px; padding: 10px 14px; border-radius: 2px; background: #fff;
  color: var(--text); border: 1px solid var(--line); font-weight: 400;
}
.ev strong { overflow-wrap: anywhere; font-weight: 500; }
.ev:hover { border-color: var(--line-strong); }
.ev[aria-pressed="true"] { background: #fff; border: 1.5px solid var(--ink); padding: 9.5px 13.5px; }
form#create-form { border-radius: 2px; padding: 16px; margin-bottom: 14px; background: var(--soft); }
#panel-title { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
#share-note { margin-top: 12px; padding: 12px 14px; border-radius: 2px; background: var(--accent-tint); color: var(--text); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }

.drop {
  border: 1px dashed var(--pp-cap); border-radius: var(--radius); padding: 32px 16px;
  text-align: center; color: var(--muted); cursor: pointer; background: var(--soft);
}
.drop strong { color: var(--text); font-weight: 500; }
.drop.over { border-color: var(--accent); background: var(--accent-tint); }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .state { font-size: 0.88rem; font-weight: 500; color: var(--muted); text-align: right; }
.item .state.ok { color: var(--ok); }
.item .state.error { color: var(--danger); }
.bar { grid-column: 1 / -1; height: 2px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }
.item.done .bar > span { background: var(--ok); }
.item.failed .bar > span { background: var(--danger); }

/* ---- guest flow ---- */
.guest-card { padding: 18px; }
.guest-card ul { margin: 0 0 14px; padding-left: 18px; font-size: 0.92rem; }
.guest-card li { margin-bottom: 6px; }
.consent {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 2px;
  background: var(--bg); font-weight: 400; font-size: 0.95rem; margin: 0; cursor: pointer;
}
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.step-foot { margin-top: 20px; text-align: center; }
.step-foot .muted { margin-top: 12px; }
.back { margin: -8px 0 4px -8px; }

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.slot {
  background: var(--card); border-radius: var(--radius); padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.slot .preview {
  position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px dashed var(--pp-cap); background: var(--soft); font-weight: 500; font-size: 0.9rem;
}
.slot .preview.filled { border: 0; background: var(--line); }
.slot .preview .plus { font-size: 1.8rem; line-height: 1; font-weight: 300; color: var(--accent-ink); }
.slot .preview img { width: 100%; height: 100%; object-fit: cover; }
.slot .rm {
  position: absolute; right: 0; top: 0; width: 44px; min-height: 44px; padding: 0; border: 0;
  background: transparent; display: flex; align-items: center; justify-content: center;
}
.slot .rm span {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(21, 24, 30, 0.78); color: #fff;
  font-size: 1rem; line-height: 26px; text-align: center;
}
.slot .meta { padding: 0 4px 4px; }
.slot .label { font-weight: 500; font-size: 0.92rem; }
.slot .tag { margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
.slot .tag.optional { background: var(--pp-tint, #F8F8F6); color: var(--muted); border: 1px solid var(--line); }
.slot .tag.start { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.slot .hint { font-size: 0.8rem; line-height: 1.35; color: var(--muted); }
.tip {
  border-radius: var(--radius); padding: 14px; background: var(--accent-tint);
  display: flex; flex-direction: column; justify-content: center; gap: 6px; font-size: 0.82rem;
}
.tip strong { font-size: 0.92rem; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo {
  display: block; text-decoration: none; color: var(--text); background: var(--card);
  border-radius: var(--radius); overflow: hidden;
}
button.photo { padding: 0; width: 100%; min-height: 0; font: inherit; font-weight: 400; text-align: left; cursor: pointer; }

.photo .thumb { aspect-ratio: 1; background: var(--line); display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; }
.photo .thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo .cap {
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px; min-height: 44px;
  color: var(--accent-ink); font-weight: 500; font-size: 0.9rem;
}

.nomatch { text-align: center; }
.nomatch .art {
  position: relative; width: 150px; aspect-ratio: 3 / 4.2; border: 1.5px solid var(--ink); border-radius: 999px 999px 0 0; background: #fff; margin: 4px auto 24px;
}
.nomatch .art .vf { left: 38px; right: 38px; top: 54px; bottom: 54px; }
.nomatch .art .vf i { width: 22px; height: 22px; border-color: var(--accent); }
.nomatch .art b { position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; margin: -1px 0 0 -9px; border-radius: 2px; background: var(--muted); }
.tips { text-align: left; background: var(--card); border-radius: var(--radius); padding: 4px 20px; margin: 0 0 16px; list-style: none; }
.tips li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.tips li:first-child { border-top: 0; }
.tips .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-tint);
  color: var(--accent-ink); font-size: 0.8rem; font-weight: 500; display: grid; place-items: center;
}
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* ---- studio gallery ---- */
.gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.gallery .cap { color: var(--text); font-weight: 500; font-size: 0.82rem; gap: 8px; }
.gallery .cap span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery .cap .faces { flex: none; color: var(--muted); font-weight: 600; }

/* ---- photo viewer ---- */
dialog.viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; inset: 0;
  border: 0; border-radius: 0; background: #111111; color: #fff; overflow: hidden;
}
dialog.viewer[open] { display: block; }
dialog.viewer::backdrop { background: rgba(10, 12, 16, 0.78); }
.vbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; }
.vcount { font-size: 0.9rem; color: #C8C8C4; }
.vstage { position: absolute; inset: 0; display: grid; place-items: center; }
.vstage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vstage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.vmsg { color: #C8C8C4; padding: 24px; text-align: center; }
.vfoot { display: flex; justify-content: center; padding: 10px; }
.vclose, .vnav {
  min-height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.6rem; line-height: 1;
}
.vclose:hover, .vnav:hover { background: rgba(255, 255, 255, 0.24); }
/* Arrows sit over the picture, so they need their own dark backing to show on a white Drive frame too. */
.vnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  background: rgba(21, 24, 30, 0.82); border: 1px solid rgba(255, 255, 255, 0.35);
}
.vnav:hover { background: rgba(21, 24, 30, 0.96); }
.vprev { left: 10px; }
.vnext { right: 10px; }
dialog.viewer .btn.secondary { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.35); }


/* ---- adaptive guest layout --------------------------------------------------
   phone (default)  one narrow column
   tablet  >= 640px  roomier column, 3-column grids
   laptop / tablet landscape  >= 900px  two columns: explanation and actions on
   the left, the work (consent card, selfie slots, photos) on the right */
.only-wide { display: none; }
.how { list-style: none; margin: 28px 0 0; padding: 0; gap: 16px; }
.how li { display: flex; gap: 14px; align-items: flex-start; }
.how .n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-tint);
  color: var(--accent-ink); font-weight: 500; display: grid; place-items: center;
}
.how strong { display: block; font-weight: 500; }
.how span span { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 640px) {
  .wrap.guest { max-width: 700px; padding-inline: 28px; }
  h1 { font-size: 2.3rem; }
  .slots, .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .stack button.block { width: auto; min-width: 220px; }
}

@media (min-width: 900px) {
  .wrap.guest { max-width: 1160px; padding-inline: 40px; }
  h1 { font-size: 2.75rem; }
  .only-wide { display: grid; }

  .step-two {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: 64px; align-items: start; padding-top: 24px;
  }
  .step-two .step-main .card { margin-bottom: 0; }
  .step-two .step-foot { margin-top: 20px; }

  .step-selfies {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "intro slots" "intro foot"; grid-template-rows: auto 1fr;
    column-gap: 64px; padding-top: 24px;
  }
  .step-selfies .step-intro { grid-area: intro; align-self: start; }
  .step-selfies .slots { grid-area: slots; align-self: start; }
  /* the action sits under the selfies, on the right, where the eye ends up */
  .step-selfies .step-foot { grid-area: foot; align-self: start; text-align: right; margin-top: 24px; }
  .step-selfies .step-foot button.block { width: auto; min-width: 240px; }
  .step-selfies .step-foot .muted { margin-top: 12px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .step-results { padding-top: 8px; }
  .nomatch { max-width: 560px; margin-inline: auto; }
  .tips { max-width: 560px; margin-inline: auto; margin-bottom: 16px; }
}

/* "No photos found" reads best centered, at every size */
.step-results.is-empty #results-title, .step-results.is-empty #results-sub { text-align: center; }


/* ===== Brand layer: white and off-white, light sans headlines, teal eyebrow labels, flat 2px corners ===== */
/* Footer stays at the bottom of the window on short pages, and below the content on long ones. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { padding-top: 28px; width: 100%; flex: 1 0 auto; }

/* light, large, tightly set headlines */
h1, h2, .title, #panel-title { font-family: var(--sans); font-weight: 300; letter-spacing: -0.025em; line-height: 1.06; }
h1, .title { font-size: 2.4rem; margin: 0 0 12px; }
h2 { font-size: 1.6rem; margin: 0 0 14px; }
.head h2 { margin: 0; font-size: 1.5rem; }
.card h2 { font-size: 1.5rem; }
@media (min-width: 640px) { h1, .title { font-size: 2.8rem; } }
@media (min-width: 900px) { h1, .title { font-size: 3.3rem; } }
#panel-title { font-size: 2.2rem; }
/* small section labels read as the eyebrow: uppercase, spaced, deep teal */
h3 { font: 500 0.75rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-ink); margin: 28px 0 12px; }
.empty-state strong { font: 300 1.7rem/1.1 var(--sans); letter-spacing: -0.02em; }

/* white top bar and a white, minimal footer */
.site-bar { background: #fff; color: var(--ink); }
.site-foot { background: #fff; color: #7A7A7A; margin-top: auto; flex: none; border-top: 1px solid var(--line); }
.bar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px; min-height: 68px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
}
.site-foot .bar-inner { min-height: 0; padding-block: 28px; font-size: 0.9rem; }
.site-foot a { color: #7A7A7A; text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-foot .brand { color: var(--ink); }
.site-foot .foot-note { margin-right: auto; }

/* results: no confetti, just the headline */
.step-results { position: relative; }
.step-results > h1, .step-results > .lead, .pill { position: relative; z-index: 2; }

/* the studio gallery is a dense contact sheet: smaller tiles than the guest results */
.grid.gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* On the guest pages the bar and footer follow the same column widths as the page,
   so the logo lines up with the content at every screen size. */
.guest-page .bar-inner { max-width: 480px; }
@media (min-width: 640px) { .guest-page .bar-inner { max-width: 700px; padding-inline: 28px; } }
@media (min-width: 900px) { .guest-page .bar-inner { max-width: 1160px; padding-inline: 40px; } }


/* ===== Collage: true proportions, nothing cropped ===================================== */
.collage { position: relative; width: 100%; }
/* a photo card: .ctile holds the photo button (.cmain) and, on the guest gallery, an action bar (.cbar) */
.ctile {
  position: absolute; padding: 0; min-height: 0; border: 0; border-radius: 2px; overflow: hidden;
  background: #E8E8E4; cursor: zoom-in;
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity 0.7s ease var(--d, 0ms), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms), box-shadow 0.25s ease;
}
.ctile.in { opacity: 1; transform: none; }
.ctile:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16); transform: translateY(-3px); transition-delay: 0ms; }
.ctile-img { width: 100%; height: 100%; display: block; }
.ctile-img img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.ctile.loaded .ctile-img img { opacity: 1; }
.ctile .coverflag {
  position: absolute; right: 8px; top: 8px; padding: 3px 10px; border-radius: 999px;
  background: #fff; color: var(--ink); font: 500 0.72rem/1.4 var(--sans);
}
.ctile .check {
  position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: none;
  place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.ctile.is-choice { outline: 3px solid var(--accent); outline-offset: -3px; }
.ctile.is-choice .check { display: grid; }
@media (prefers-reduced-motion: reduce) {
  .ctile { opacity: 1; transform: none; transition: none; }
  .ctile-img img { transition: none; }
}

/* ===== Cover image frames ============================================================== */
.cover-frame { position: relative; overflow: hidden; background: #3A3A38; border-radius: var(--radius); isolation: isolate; }
.cover-frame img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; }
.cover-frame.cover-ready img { opacity: 1; }
.cover-main.fill { object-fit: cover; }
.cover-main.fit { object-fit: contain; z-index: 1; }
.cover-back { object-fit: cover; filter: blur(14px) brightness(0.7); transform: scale(1.1); }
.cover-small { width: 240px; aspect-ratio: 16 / 10; flex: none; }
.cover-box { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 22px; padding: 16px; border-radius: var(--radius); background: var(--soft); }
.cover-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 200px; flex: 1; }
.cover-empty { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; width: 100%; }
.cover-empty > div { display: flex; flex-direction: column; gap: 2px; }
.cover-preview .cover-frame { aspect-ratio: 16 / 7; }
.cover-preview h3 { margin-top: 24px; }
.cover-empty-preview { background: var(--soft); border: 1px dashed var(--pp-cap); }
.cover-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); z-index: 2; text-align: center; padding: 16px; }
.over { position: absolute; inset: auto 0 0 0; z-index: 3; padding: 28px 22px 18px; color: #fff; display: flex; flex-direction: column; gap: 2px; background: rgba(0, 0, 0, 0.45); }
.over-title { font: 300 clamp(1.5rem, 3.4vw, 2.4rem)/1.05 var(--sans); letter-spacing: -0.02em; }
.over-date { font-size: 0.9rem; opacity: 0.85; }
#share-cover { aspect-ratio: 16 / 7; margin: 18px 0; }

/* ===== Studio: event cards with a cover thumbnail, gallery header =============== */
.ev { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
.evthumb { flex: none; width: 46px; height: 46px; border-radius: 2px; overflow: hidden; background: var(--line); }
.evthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evtext { display: flex; flex-direction: column; min-width: 0; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gallery-head h3 { margin-bottom: 12px; }
.gallery-head button { margin-top: 16px; }
#gallery { margin-top: 4px; }

/* ===== The wizard ================================================================ */
.wizard { padding: 26px; position: relative; }
.stepper { display: flex; list-style: none; margin: 0 0 30px; padding: 0; gap: 8px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.stepper .dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); font-weight: 500; }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-left: 6px; }
.stepper li.current { color: var(--ink); }
.stepper li.current .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.stepper li.done .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper li.done:not(:last-child)::after { background: var(--ink); }
@media (max-width: 560px) { .stepper .lbl { display: none; } .stepper li.current .lbl { display: inline; } }
.wz-step h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.wz-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.wz-foot .spacer { margin-right: auto; }
.cover-pick { margin-top: 18px; }

/* ===== Slideshow controls in the viewer ======================================= */
.vtools { display: flex; align-items: center; gap: 8px; }
.vplay {
  min-height: 44px; padding: 0 18px 0 14px; gap: 10px; border-radius: 999px; font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.38);
}
.vplay:hover { background: rgba(255, 255, 255, 0.26); }
.vicon { display: inline-block; flex: none; }
.vicon.i-play { width: 0; height: 0; margin-left: 2px; border-left: 12px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.vicon.i-pause { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.vprogress { position: absolute; left: 0; right: 0; top: 0; z-index: 4; height: 3px; background: rgba(255, 255, 255, 0.16); }
.vprogress span { display: block; height: 100%; width: 0; background: var(--accent); }
@keyframes vprog { from { width: 0; } to { width: 100%; } }


/* ===== Event hero on the find page: the organizer's cover, shown whole ============ */
.event-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 190px; margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; background: #3A3A38; color: #fff; }
.event-hero .hero-image { position: absolute; inset: 0; border-radius: 0; z-index: 0; }
.event-hero:not(.has-cover) .hero-image { display: none; }
.event-hero.has-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.4); }
.hero-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 24px 26px; }
.hero-text h2 { margin: 0; font: 300 clamp(2rem, 5vw, 3.4rem)/1.04 var(--sans); letter-spacing: -0.025em; }
.hero-text span { opacity: 0.9; font-size: 0.98rem; }
@media (min-width: 640px) { .event-hero { min-height: 250px; } }
@media (min-width: 900px) { .event-hero { min-height: 320px; } }


/* ===== Full-width galleries: pictures run edge to edge, not in a narrow column ===== */
.gallery-full { width: 100%; padding: 8px clamp(12px, 1.6vw, 24px) 40px; }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px 16px; }
.gallery-titles { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; min-width: 0; }
.gallery-titles h2 { overflow-wrap: anywhere; }
.gallery-bar button { flex: none; }
.gallery-titles h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.gallery-bar .vicon { margin-right: 2px; }
.gallery-none { padding: 24px 2px; }
.gallery-privacy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 36px; padding: 18px 2px 0; border-top: 1px solid var(--line); }
.gallery-privacy p { flex-basis: 100%; margin: 0; }


/* ---- the photo button inside a card ---- */
.cmain { display: block; width: 100%; height: 100%; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; cursor: zoom-in; }
.cmain:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ===== Guest photo cards: click to lift the card, a shadow rises along the bottom
   with Like, Download and Share. Click the photo again to open it large. ====== */
.ctile.active { z-index: 6; transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26); transition-delay: 0ms; }
.ctile .cbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; align-items: flex-end; gap: 8px;
  padding: 14px 10px 10px; background: rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ctile.active .cbar, .ctile:focus-within .cbar { opacity: 1; transform: none; pointer-events: auto; }
.cact {
  width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.42); backdrop-filter: blur(6px); cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.cact:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-2px) scale(1.06); }
.cact:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cact.like[aria-pressed="true"] { background: #fff; color: #E11D48; border-color: #fff; }
.ctile .liked-mark { position: absolute; right: 9px; top: 9px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; background: #fff; color: #E11D48; }
.ctile.is-liked .liked-mark { display: grid; }
@media (prefers-reduced-motion: reduce) { .ctile.active { transform: none; } .ctile .cbar { transition: none; transform: none; } }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40; max-width: min(92vw, 520px); padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 0.95rem; text-align: center; overflow-wrap: anywhere;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ===== Full-screen viewer: controls fade away while the slideshow plays ===== */
.vfs { min-height: 44px; min-width: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.38); }
.vfs:hover { background: rgba(255, 255, 255, 0.26); }
.vbar, .vfoot, .vnav { transition: opacity 0.5s ease; }
.vbar { position: absolute; left: 0; right: 0; top: 3px; z-index: 3; padding-bottom: 10px; background: rgba(0, 0, 0, 0.45); }
.vfoot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding-top: 10px; background: rgba(0, 0, 0, 0.45); }
dialog.viewer.idle .vbar, dialog.viewer.idle .vfoot, dialog.viewer.idle .vnav { opacity: 0; pointer-events: none; }
dialog.viewer.idle { cursor: none; }
dialog.viewer.is-fullscreen { background: #000; }
.vstage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: vfade 0.6s ease both; }  /* pinned to the stage: scales to fill the screen, never cropped, never taller than the screen */
/* waiting for the next picture: the current one stays, with a small spinner */
dialog.viewer.waiting .vstage::after { content: ""; position: absolute; right: 20px; bottom: 64px; z-index: 2; width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: vspin 0.8s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
@keyframes vfade { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vstage img { animation: none; } dialog.viewer.waiting .vstage::after { animation-duration: 2.4s; } .vbar, .vfoot, .vnav { transition: none; } }


/* ===== Full-screen cover: the photo fills the whole screen, the details sit in the middle ===== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.cover {
  --g-pad: clamp(16px, 2vw, 40px);
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; text-align: center;
  min-height: 100vh; min-height: 100dvh; color: #fff;
  background-color: #3A3A38;
}
/* with no cover photo, the page opens on a blurred event photo, like the landing hero */
.cover:not(.has-cover)::before { content: ""; position: absolute; inset: 0; z-index: 0; background: #3A3A38 url("img/hero-bg.webp") center / cover no-repeat; filter: blur(8px); transform: scale(1.1); }
.cover-image { position: absolute; inset: 0; z-index: 0; border-radius: 0; background: transparent; }
.cover-image img { animation: settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cover-image .cover-back { animation: none; }
@keyframes settle { from { filter: blur(14px); transform: scale(1.08); } to { filter: blur(0); transform: scale(1); } }
.cover:not(.has-cover) .cover-image { display: none; }
.cover-shade { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.42); }  /* flat overlay: the white text always has contrast */
.cover-center { position: relative; z-index: 3; width: 100%; max-width: 980px; padding: 0 24px; }
.cover h1 { margin: 0; color: #fff; font: 300 clamp(2rem, 6.4vw, 4.6rem)/1.08 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; overflow-wrap: anywhere; animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.cover-date { margin: 16px 0 0; font: 500 clamp(0.78rem, 1.3vw, 0.98rem)/1.4 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both; }
.cover-found { margin: 10px 0 0; font: 400 clamp(0.95rem, 1.5vw, 1.15rem)/1.4 var(--sans); letter-spacing: 0.04em; opacity: 0.94; animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both; }
.cover-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s both; }
.cover-center > .cover-btn { margin-top: 30px; animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.cover-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 30px; border: 1px solid rgba(255, 255, 255, 0.92); border-radius: 0;
  background: transparent; color: #fff; font: 500 0.78rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cover-btn:hover, .cover-btn:focus-visible { background: #fff; color: var(--ink); }
.cover-btn.quiet { border-color: rgba(255, 255, 255, 0.5); }
.cover-top { position: absolute; top: 18px; right: var(--g-pad); z-index: 3; }
.cover-brand { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 3; font: 400 0.95rem/1 var(--serif); letter-spacing: 0.34em; text-transform: uppercase; opacity: 0.92; }
@media (prefers-reduced-motion: reduce) { .cover-image img, .cover h1, .cover-date, .cover-found, .cover-actions, .cover-center > .cover-btn { animation: none; } }

/* the guest welcome page: the steps start below the cover */
.guest-page .cover + .wrap { padding-top: clamp(48px, 8vw, 96px); min-height: 100vh; min-height: 100dvh; }  /* the steps fill a screen, so the cover's button can scroll them to the top */

/* ===== Photo cards: the actions also appear when the pointer rests on a photo ===== */
.ctile:hover .cbar { opacity: 1; transform: none; pointer-events: auto; }

/* ---- skeletons: quiet grey shapes in the places where content is about to appear ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skel { display: block; border-radius: 2px; background: linear-gradient(90deg, var(--line) 0%, #F4F4F1 50%, var(--line) 100%); background-size: 240% 100%; animation: skel-shimmer 1.4s ease-in-out infinite; }
@keyframes skel-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel-title { height: 26px; width: 48%; margin-bottom: 16px; }
.skel-line { height: 12px; margin-bottom: 10px; }
.skel-btns { display: flex; flex-wrap: nowrap; gap: 10px; margin: 18px 0 22px; }
.skel-btn { height: 40px; flex: 0 1 150px; min-width: 70px; }
.skel-chip { flex: none; width: 132px; height: 28px; margin-left: auto; border-radius: 999px; }
@media (max-width: 520px) { .skel-chip { width: 84px; } }
.skel-cover { height: 96px; }
.skel-ev { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.skel-ev > .skel:first-child { flex: none; width: 46px; height: 46px; }
.skel-ev .skel-ev-text { display: block; flex: 1; min-width: 0; }
.w25 { width: 25%; } .w40 { width: 40%; } .w55 { width: 55%; } .w70 { width: 70%; } .w90 { width: 90%; }
/* photo tiles: uneven heights, like the real collage */
.skel-grid { display: grid; gap: 6px; align-items: start; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.skel-grid .skel { aspect-ratio: 1; }
.skel-grid .skel:nth-child(3n+1) { aspect-ratio: 4 / 5; }
.skel-grid .skel:nth-child(3n+2) { aspect-ratio: 1; }
.skel-grid .skel:nth-child(3n) { aspect-ratio: 3 / 4; }
@media (max-width: 900px) { .skel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .skel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
