.fm-skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 50; background: var(--fm-accent); color: #10261d !important; padding: .8rem 1rem; border-radius: 8px; }
.fm-skip-link:focus { top: 1rem; }
.fm-public-hero { min-height: 570px; }
/* Scale the painted layers instead of repainting their gradients every frame. */
.fm-public-hero .fm-fluid-spot { scale: 1; transition: scale 4s ease-in-out; }
@media (hover: hover) and (pointer: fine) {
  .fm-public-hero:has(.fm-portrait-outline:hover) .fm-fluid-spot { scale: calc(150 / var(--fm-fluid-size-number, 65)); }
}
.fm-public-hero:has(.fm-portrait-outline:focus-visible) .fm-fluid-spot { scale: calc(150 / var(--fm-fluid-size-number, 65)); }
.fm-public-hero .fm-hero-content h1 { max-width: 13ch; }
.fm-public-hero .fm-hero-footer { justify-content: flex-end; }
.fm-portrait-outline { display: grid; place-items: center; position: relative; z-index: 1; width: 180px; height: 230px; margin: 2rem auto; text-decoration: none; border-radius: 4px; }
.fm-portrait-art { position: absolute; inset: 0; pointer-events: none; }
.fm-portrait-action { position: relative; color: var(--fm-text); font-size: 20px; font-weight: 500; text-shadow: 0 1px 12px #0b1011; }
.fm-portrait-outline:hover .fm-portrait-action { color: var(--fm-accent); }
.fm-portrait-outline:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 10px; }
.fm-portrait-outline:hover .fm-focus-corner { border-color: var(--fm-accent); }
.fm-portrait-oval { position: absolute; inset: 15% 15% 10%; border: 1px solid #defbea80; border-radius: 46% 46% 48% 48%; background: radial-gradient(ellipse at 30% 30%, #d9fbc425, transparent 70%); }
.fm-portrait-oval::before { content: ""; position: absolute; inset: 10% 12%; border: 1px solid #e7fff121; border-radius: 50%; }
.fm-focus-corner { position: absolute; width: 25px; height: 25px; border: solid #e5fff0a8; border-width: 1px 0 0 1px; left: 0; top: 0; }
.fm-focus-corner:nth-of-type(2) { left: auto; right: 0; transform: rotate(90deg); }
.fm-focus-corner:nth-of-type(3) { top: auto; bottom: 0; transform: rotate(-90deg); }
.fm-focus-corner:nth-of-type(4) { left: auto; right: 0; top: auto; bottom: 0; transform: rotate(180deg); }
.fm-portrait-caption { position: absolute; left: 0; bottom: -2rem; color: #e5fff099; font: 9px monospace; letter-spacing: .17em; }
.fm-selfie-section { display: grid; gap: 2rem; border-top: 1px solid var(--fm-line); padding: 3rem 0; scroll-margin-top: 1.5rem; }
.fm-selfie-panel { min-width: 0; padding: 1.25rem; background: #111b1b; border: 1px solid var(--fm-line); border-radius: 20px; }
.fm-selfie-viewport,
.fm-page main button.fm-selfie-viewport {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3;
  color: inherit; background: #0b1314; font: inherit; text-align: left;
  cursor: pointer;
}
.fm-page main button.fm-selfie-viewport:hover { background: #0b1314; }
.fm-page main button.fm-selfie-viewport:disabled { opacity: 1; cursor: wait; }
.fm-selfie-viewport:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 4px; }
.fm-selfie-viewport video, .fm-selfie-viewport img { width: 100%; height: 100%; object-fit: contain; }
.fm-selfie-viewport video, .fm-selfie-viewport img { display: block; }
.fm-selfie-viewport video { transform: scaleX(-1); }
.fm-selfie-placeholder { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1rem; text-align: center; color: var(--fm-muted); font-size: 13px; }
.fm-camera-symbol { font-size: 50px; color: #789d8e; font-weight: 200; }
.fm-selfie-ready-overlay, .fm-selfie-search-overlay { position: absolute; inset: 0; pointer-events: none; }
.fm-selfie-ready-overlay { width: 100%; height: 100%; color: #d8f7eb; opacity: .78; }
.fm-selfie-ready-overlay circle { fill: #0b131455; stroke: currentColor; stroke-width: 1.2; }
.fm-selfie-ready-overlay text { fill: currentColor; font: 600 6px system-ui, sans-serif; }
.fm-selfie-flash { position: fixed; inset: 0; z-index: 1000; pointer-events: none; background: #fff; mask-image: radial-gradient(circle at var(--flash-x) var(--flash-y), transparent calc(var(--flash-radius) - 1px), #000 var(--flash-radius)); }
.fm-selfie-search-overlay { display: grid; place-items: center; padding: 1rem; box-sizing: border-box; background: #0b131477; color: #f0fff8; font-size: clamp(1rem, 2.8vw, 1.7rem); font-weight: 600; text-align: center; }
#selfie-status { color: var(--fm-muted); font-size: 13px; min-height: 3em; margin: 1rem 0; }
.fm-selfie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (min-width: 850px) { .fm-portrait-outline { position: absolute; width: 250px; height: 330px; margin: 0; right: 8%; top: 18%; transform: rotate(8deg); } .fm-portrait-action { transform: rotate(-8deg); } .fm-public-hero { min-height: 670px; } .fm-selfie-section { grid-template-columns: minmax(0, 1fr); gap: 4rem; padding: 4rem 2rem; } }

.fm-search-selection { margin: 1.2rem 0; border: 1px solid var(--fm-line); border-radius: 12px; padding: 1rem; min-width: 0; }
.fm-search-selection legend { padding: 0 .4rem; }
.fm-search-selection p, #search-status { font-size: 14px; color: var(--fm-muted); }
.fm-search-venues { display: flex; flex-wrap: wrap; gap: .6rem; }
.fm-search-venues label { display: flex; align-items: center; gap: .5rem; padding: .6rem; border: 1px solid var(--fm-line); border-radius: 8px; overflow-wrap: anywhere; }
.fm-search-venues input { width: 1rem; height: 1rem; accent-color: var(--fm-accent); }
.fm-search-progress { display: flex; align-items: center; gap: .7rem; padding: 1rem 0; color: var(--fm-accent); }
.fm-search-pulse { font-size: 2rem; animation: fm-search-pulse 1.4s ease-in-out infinite alternate; }
@keyframes fm-search-pulse { from { opacity: .4; transform: scale(.8); } to { opacity: 1; transform: scale(1.1); } }
.fm-search-confirmation, .fm-search-summary { padding: 1rem; margin: 1rem 0; border: 1px solid var(--fm-line); border-radius: 12px; overflow-wrap: anywhere; }
.fm-search-empty { min-width: 0; padding: clamp(1.5rem, 4vw, 3rem); background: #111b1b; border: 1px solid var(--fm-line); border-radius: 20px; text-align: center; }
.fm-search-empty[hidden] { display: none; }
.fm-search-empty p { max-width: 42rem; margin: 0 auto 1.5rem; line-height: 1.6; overflow-wrap: anywhere; }
#photo-payment-form { display: grid; gap: .65rem; max-width: 28rem; }
#photo-payment-form[hidden] { display: none; }
#photo-payment-form input, #photo-payment-form select { min-height: 44px; width: 100%; box-sizing: border-box; padding: .65rem; color: var(--fm-text); background: #111b1b; border: 1px solid var(--fm-line); border-radius: 8px; font: inherit; font-size: 16px; }
#photo-payment-form button { justify-self: start; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .fm-search-pulse { animation: none; } }

.fm-photo-gallery > section { padding: 2rem 0; border-top: 1px solid var(--fm-line); }
.fm-photo-gallery h2 { overflow-wrap: anywhere; }
.fm-photo-gallery h3 { font-size: 1rem; color: var(--fm-muted); margin-top: 1.5rem; }
.fm-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.fm-photo-grid figure { margin: 0; min-width: 0; }
.fm-photo-frame { position: relative; overflow: hidden; border-radius: 12px; background: #111b1b; }
.fm-photo-frame img { display: block; width: 100%; height: auto; }
.fm-photo-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #ffffff80; font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 600; transform: rotate(-25deg); text-shadow: 0 1px 3px #0008; }
.fm-photo-grid figcaption { color: var(--fm-muted); font-size: .85rem; padding: .6rem 0; }

.fm-photo-selection-summary { position: sticky; top: .5rem; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; padding: .8rem 1rem; background: #111b1b; border: 1px solid var(--fm-line); border-radius: 12px; box-shadow: 0 4px 20px #0005; }
#photo-selection-total { flex: 1; min-width: 8rem; font-size: .9rem; }
.fm-photo-select, .fm-photo-select-all { display: flex; align-items: center; gap: .6rem; padding: .65rem 0; cursor: pointer; font-size: .9rem; }
.fm-photo-select input, .fm-photo-select-all input { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.fm-photo-select-free input { accent-color: #55d995; }
.fm-photo-select-paid input { accent-color: #559bff; }
.fm-photo-select-free { color: #55d995; }
.fm-photo-select-paid { color: #89b9ff; }

/* Public purchase information uses the existing Motion Atlas palette. */
.fm-purchase-info { display: grid; gap: 2rem; margin-top: 3rem; padding: 3rem 0; border-top: 1px solid var(--fm-line); font-size: 16px; }
.fm-purchase-info h2 { margin: .5rem 0 1rem; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.15; font-weight: 450; letter-spacing: -.04em; }
.fm-purchase-intro > p, .fm-purchase-documents p { max-width: 68ch; color: var(--fm-soft); }
.fm-purchase-intro .fm-photo-price { margin: 1.5rem 0; color: var(--fm-text); font-size: 2.5rem; line-height: 1.3; }
.fm-photo-price span { display: block; color: var(--fm-soft); font-size: 1rem; }
.fm-purchase-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.fm-purchase-links a { display: inline-flex; align-items: center; min-height: 44px; }
.fm-purchase-intro .fm-purchase-links { flex-direction: column; align-items: flex-start; margin: 1.5rem 0; }
.fm-purchase-info a:hover, .fm-footer a:hover { color: var(--fm-accent); }
.fm-purchase-documents { min-width: 0; }
.fm-purchase-documents article { padding: 1.5rem 0; border-top: 1px solid var(--fm-line); scroll-margin-top: 2rem; }
.fm-purchase-documents h3 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.fm-purchase-notice { padding: 1rem; border-left: 2px solid var(--fm-accent); background: var(--fm-panel); }
.fm-purchase-hint { max-width: 68ch; font-size: 14px; color: var(--fm-soft); }
.fm-seller-details { margin: 1.5rem 0 0; overflow-wrap: anywhere; }
.fm-seller-details dt { color: var(--fm-muted); margin-top: 1rem; }
.fm-seller-details dd { margin: .25rem 0 0; }
.fm-public .fm-footer { font-size: 14px; }
@media (min-width: 1000px) {
  .fm-purchase-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 4rem; }
  .fm-purchase-documents article:first-child { border-top: 0; padding-top: 0; }
}
