/* Page-level additions on top of framecap.css (the design skin). Tokens only. */
[hidden] { display: none !important; }
.fc .fc-stack > * + * { margin-top: var(--fc-s4); }
.fc .fc-stack > .fc-h1 { margin-top: var(--fc-s2); }
.fc-shot { cursor: default; }
.fc-shot[data-status="failed"] { cursor: pointer; }
.fc-shot[data-state="lost"] .fc-shot__badge { white-space: normal; text-align: center; line-height: 1.2; }

/* host */
.hl-form { max-width: 400px; }
.hd-bar { flex-wrap: wrap; gap: var(--fc-s3); }
.hd-event { display: flex; align-items: center; gap: var(--fc-s3); min-width: 0; }
.hd-event__sep { width: 1px; height: 20px; background: var(--fc-line-2); flex: none; }
.hd-layout { display: grid; gap: var(--fc-s5); margin-top: var(--fc-s5); }
.hd-side > * + * { margin-top: var(--fc-s4); }
.hd-unit { font-size: 16px; letter-spacing: 0; margin-left: 2px; }
.hd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fc-s3) var(--fc-s5); }
.hd-actions .fc-link { min-height: 48px; display: inline-flex; align-items: center; }
.hd-album-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--fc-s4); margin-bottom: var(--fc-s4); }
.hd-filter { width: 100%; }
.hd-select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23cbb894' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.hd-dialog-actions { display: flex; flex-direction: column-reverse; gap: var(--fc-s3); margin-top: var(--fc-s5); }
.hd-lb { grid-template-rows: auto 1fr auto; background: var(--fc-bg-deep); }
.hd-lb__caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 var(--fc-s2); }
.hd-lb img { max-height: calc(100dvh - 190px); }
.hd-lb__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--fc-s2); padding: 12px 12px calc(12px + var(--fc-safe-b)); color: var(--fc-dark-ink); }
.hd-lb__foot .fc-btn--secondary { color: var(--fc-ink); border-color: var(--fc-line-2); }
.hd-lb__mid { display: flex; gap: var(--fc-s2); }
.fc-album li { position: relative; }
.fc-album li[data-hidden="true"] img { opacity: .3; filter: grayscale(1) brightness(.6); }
.fc-album li[data-hidden="true"]::after { content: "Hidden from guests"; position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(14,10,7,.88); color: var(--fc-paper); white-space: nowrap; pointer-events: none; z-index: 2; }
.fc-album li[data-hidden="true"] button::after, .fc-album li[data-hidden="true"] a::after { content: none; }
@media (min-width: 560px) {
  .hd-filter { width: 240px; }
  .hd-dialog-actions { flex-direction: row; justify-content: flex-end; }
}
@media (min-width: 768px) {
  .hd-layout { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); align-items: start; gap: var(--fc-s6); }
}

/* ===== v2 golden hour film: page rules ===== */
/* Landing: the invite, reprinted as the first print */
#landing > section.fc-stack {
  position: relative; text-align: center; color: var(--fc-paper-ink);
  background: radial-gradient(120% 80% at 30% 0%, #f6e3c4, transparent 60%), radial-gradient(90% 70% at 100% 100%, #ead6b2, transparent 70%), var(--fc-paper);
  padding: 40px 24px 34px; border-radius: 2px; box-shadow: var(--fc-print-shadow);
  outline: 1px solid var(--fc-paper-ink); outline-offset: -12px;
}
#landing > section.fc-stack::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(122,82,50,.7); pointer-events: none; }
#landing > section.fc-stack .fc-eyebrow { color: var(--fc-paper-ink); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
#landing > section.fc-stack .fc-h1 { color: var(--fc-paper-ink); font-size: clamp(34px, 10vw, 44px); margin-top: 14px; }
#landing > section.fc-stack .fc-lead { color: #5e3f26; font-size: 16px; margin: 18px auto 0; max-width: 26em; }
#landing .fc-spacer:first-of-type { flex-grow: .4; }
#event-date { font: 500 16px/1 var(--fc-display); letter-spacing: .08em; color: var(--fc-muted); }

/* Capture: the shots grid reads as a stack of prints */
#shots-empty { margin: 0; padding: 18px; border: 1px dashed var(--fc-line-2); border-radius: var(--fc-r-md); text-align: center; }
#shots:empty { display: none; }
#capture .fc-bar { position: sticky; top: 0; z-index: 6; background: rgba(24,18,13,.94); margin: 0 -20px; padding: 0 20px; }

/* Album locked: prints still face-down, developing */
#locked .fc-h1 { margin-top: 6px; }
#locked .fc-counter__label { font-size: 16px; }
#locked::after {
  content: ""; display: block; order: -1; width: 52%; aspect-ratio: 4/5; margin: 8px auto 20px;
  background:
    repeating-linear-gradient(-28deg, transparent 0 18px, rgba(122,82,50,.12) 18px 19px),
    var(--fc-paper-back);
  box-shadow: 6px 6px 0 -1px #d3bd95, 12px 12px 0 -2px #c8b186, var(--fc-print-shadow);
  transform: rotate(-3deg); border-radius: 2px;
}
#locked { display: flex; flex-direction: column; }
#locked[hidden] { display: none !important; }
#open .fc-h2 { font-size: 32px; }

/* Host */
#login > .fc-stack .fc-h1 { margin-top: 4px; }
.hd-side .fc-card .fc-h2 { font-size: 24px; }
#reveal-button { margin-top: 20px; }
#greeting { white-space: nowrap; flex: none; }
#capture .fc-logo { font-size: 16px; }
.fc-bar > a.fc-link { white-space: nowrap; min-height: 48px; display: inline-flex; align-items: center; flex: none; }
#logout { min-height: 48px; display: inline-flex; align-items: center; color: var(--fc-ink); text-decoration: underline; text-underline-offset: 3px; }

/* guest page: a photo under "Your photos" opens large when tapped */
.fc-shots .fc-shot { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fc-shots .fc-shot:focus-visible { outline: 2px solid var(--fc-paper); outline-offset: 3px; }

/* photo viewer: never wider than the screen, however large the photo */
.fc-lightbox { grid-template-columns: minmax(0, 1fr); }
.fc-lightbox__bar > .fc-mono { flex: none; white-space: nowrap; }
/* host header: the logo keeps its width so the couple's names wrap beside it */
.hd-event .fc-logo { flex: none; }
.hd-event > h1 { min-width: 0; }
/* three small tiles across on a phone: a shorter label fits the tile */
@media (max-width: 599px) { .fc-album li[data-hidden="true"]::after { content: "Hidden"; } }
/* host viewer on a narrow phone: both buttons and both arrows fit */
@media (max-width: 400px) {
  .hd-lb__foot { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .hd-lb__mid { min-width: 0; gap: 4px; }
  .hd-lb__mid .fc-btn { min-width: 0; padding-left: 12px; padding-right: 12px; font-size: 14px; white-space: nowrap; }
}
/* names are never cut: a long guest name wraps beside the couple's names */
#greeting { white-space: normal; flex: 0 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
#capture .fc-bar > .fc-logo { flex: 1 0 50%; min-width: 0; }
/* album: cards far down the pile are let go so a long album scrolls smoothly */
#open #grid > li.is-past { position: relative; top: auto; }
#open #grid > li.is-past > button, #open #grid > li.is-past > a { animation: none; }
