/* Live event feed — real-time public gallery. Self-contained (own tokens) so it can be served alone on
   live.<domain>. Dark page, white Polaroid cards; branding accent/bg injected by live.js from meta. */
:root {
  color-scheme: dark;
  --accent: #6c63ff;
  --bg: #0b0b14;
  --text: #f1f5f9;
  --muted: #94a3b8;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 700px at 12% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(900px 600px at 112% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* Header */
.lf-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.8rem;
  padding: calc(0.7rem + env(safe-area-inset-top)) clamp(0.9rem, 3vw, 1.6rem) 0.7rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 72%, transparent));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lf-logo { max-height: 40px; max-width: 130px; object-fit: contain; }
.lf-title { font-size: clamp(1.05rem, 3.4vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.lf-sub { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; display: flex; align-items: center; gap: 0.35rem; }
.lf-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 0 rgba(255,77,94,0.7); animation: lfPulse 1.6s infinite; }
@keyframes lfPulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,94,0.6); } 70% { box-shadow: 0 0 0 7px rgba(255,77,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); } }

/* Layout + grid */
.lf-app { max-width: 1200px; margin: 0 auto; padding: clamp(0.8rem, 3vw, 1.4rem) clamp(0.6rem, 3vw, 1.6rem) calc(2rem + env(safe-area-inset-bottom)); }
.lf-center { min-height: 62dvh; display: flex; align-items: center; justify-content: center; }
.lf-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.14); border-top-color: var(--accent); animation: lfSpin 0.8s linear infinite; }
@keyframes lfSpin { to { transform: rotate(360deg); } }
.lf-grid { columns: 2; column-gap: clamp(0.5rem, 2vw, 0.9rem); }
@media (min-width: 620px) { .lf-grid { columns: 3; } }
@media (min-width: 900px) { .lf-grid { columns: 4; } }
@media (min-width: 1150px) { .lf-grid { columns: 5; } }
.lf-empty { color: var(--muted); text-align: center; padding: 3.5rem 1rem; line-height: 1.6; }

/* Polaroid card */
.lf-card {
  break-inside: avoid; margin: 0 0 clamp(0.5rem, 2vw, 0.9rem); background: #fff; color: #1a1a24;
  border-radius: 8px; padding: 8px 8px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.4); transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.lf-card:hover { transform: rotate(0deg) scale(1.02); box-shadow: 0 14px 36px rgba(0,0,0,0.5); }
.lf-photo { border-radius: 4px; overflow: hidden; cursor: pointer; background: #eef0f4; line-height: 0; }
.lf-photo img { width: 100%; height: auto; display: block; }
/* Deter casual saving/dragging off the live feed (downloads live in the gated photo book). */
.lf-photo img, .lf-lb-img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lf-cap { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.25rem 0.6rem; }
.lf-name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; }
.lf-heart {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.25rem; border: none; background: #f1f2f6; color: #1a1a24;
  border-radius: 999px; padding: 0.28rem 0.6rem; font-size: 0.9rem; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lf-heart:active { transform: scale(0.9); }
.lf-heart.on { background: #ffe3ea; color: #e0244b; }
.lf-heart-ico { font-size: 1rem; line-height: 1; }
.lf-heart.pop .lf-heart-ico { animation: lfPop 0.35s ease; }
@keyframes lfPop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.lf-new { animation: lfDrop 0.55s cubic-bezier(0.2,0.8,0.2,1); }
@keyframes lfDrop { from { opacity: 0; transform: translateY(-14px) rotate(0deg) scale(0.96); } to { opacity: 1; } }

/* Lightbox */
.lf-lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(4,4,10,0.95); display: flex; align-items: center; justify-content: center; }
.lf-lightbox[hidden] { display: none; }
.lf-lb-inner { margin: 0; background: #fff; padding: 10px 10px 0; border-radius: 10px; max-width: 94vw; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.lf-lb-img { max-width: min(90vw, 640px); max-height: 68dvh; border-radius: 5px; display: block; }
.lf-lb-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.3rem 0.7rem; color: #1a1a24; }
.lf-lb-name { flex: 1 1 auto; font-weight: 700; font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; font-size: 1.05rem; }
.lf-lb-close { position: absolute; top: calc(0.7rem + env(safe-area-inset-top)); right: 1rem; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.3rem; cursor: pointer; }
.lf-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: none; background: rgba(255,255,255,0.1); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lf-lb-prev { left: 0.6rem; } .lf-lb-next { right: 0.6rem; }
@media (max-width: 520px) { .lf-lb-nav { width: 40px; height: 40px; font-size: 1.5rem; } }

/* Root PIN prompt */
.lf-gate { min-height: 82dvh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.lf-gate-card { width: min(94vw, 420px); background: color-mix(in srgb, #16162a 90%, transparent); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.45); padding: clamp(1.6rem, 6vw, 2.4rem); text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lf-gate-logo { max-height: 74px; max-width: 62%; object-fit: contain; margin-bottom: 1rem; }
.lf-gate-badge { font-size: 2.6rem; margin-bottom: 0.6rem; }
.lf-gate-title { font-size: clamp(1.35rem, 5vw, 1.7rem); font-weight: 800; margin: 0 0 0.3rem; letter-spacing: -0.02em; }
.lf-gate-sub { color: var(--muted); margin: 0 0 1.4rem; line-height: 1.5; }
.lf-gate-form { display: flex; flex-direction: column; gap: 0.85rem; }
.lf-pin-input { width: 100%; text-align: center; font-size: 2.2rem; font-weight: 800; letter-spacing: 0.6em; text-indent: 0.6em;
  padding: 0.75rem 0.5rem; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.12); background: #12121f; color: var(--text);
  outline: none; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.lf-pin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.lf-gate-btn { font-size: 1.05rem; font-weight: 800; padding: 0.95rem 1.4rem; border: none; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; }
.lf-gate-btn:active { transform: scale(0.98); }
.lf-gate-btn[disabled] { opacity: 0.55; }
.lf-gate-err { color: #fca5a5; font-size: 0.92rem; min-height: 1.1em; }
