/* ==========================================================================
   Party Album
   Base components and desktop/tablet layout
   ========================================================================== */

.pa-page {
  --pa-bg: #07080d;
  --pa-bg-soft: #120711;
  --pa-surface: rgba(255, 255, 255, 0.065);
  --pa-surface-strong: rgba(25, 5, 13, 0.9);
  --pa-panel: #160711;
  --pa-border: rgba(255, 243, 223, 0.14);
  --pa-border-strong: rgba(255, 226, 155, 0.34);
  --pa-text: #fff3df;
  --pa-text-muted: rgba(255, 243, 223, 0.74);
  --pa-text-soft: rgba(255, 243, 223, 0.58);
  --pa-gold: #ffe29b;
  --pa-gold-deep: #c9a84c;
  --pa-red: #c51635;
  --pa-red-strong: #ff4a63;
  --pa-navy: #07182f;
  --pa-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  --pa-radius-sm: 14px;
  --pa-radius-md: 20px;
  --pa-radius-lg: 28px;
  --pa-page-x: max(22px, calc((100vw - 1180px) / 2));
  --pa-font-display: "DM Serif Display", Georgia, serif;
  --pa-font-body:
    "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --pa-font-stamp: "Bebas Neue", Impact, sans-serif;
  --pa-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.07'/%3E%3C/svg%3E");

  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  overflow-x: clip;
  background:
    radial-gradient(
      circle at 14% 10%,
      rgba(255, 74, 99, 0.14),
      transparent 28%
    ),
    radial-gradient(
      circle at 88% 4%,
      rgba(255, 226, 155, 0.12),
      transparent 26%
    ),
    linear-gradient(135deg, #17030b 0%, #090c16 48%, var(--pa-navy) 100%);
  color: var(--pa-text);
  font-family: var(--pa-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.pa-page *,
.pa-page *::before,
.pa-page *::after {
  box-sizing: border-box;
}

.pa-page a {
  color: inherit;
  text-decoration: none;
}

.pa-page button,
.pa-page input {
  font: inherit;
}

.pa-page button {
  cursor: pointer;
}

.pa-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: var(--pa-grain);
  background-size: 256px 256px;
  opacity: 0.022;
  mix-blend-mode: overlay;
  animation: pa-grain-shift 0.16s steps(1) infinite;
}

@keyframes pa-grain-shift {
  0% {
    background-position: 0 0;
  }
  25% {
    background-position: -18px 12px;
  }
  50% {
    background-position: 14px -20px;
  }
  75% {
    background-position: -8px -12px;
  }
  100% {
    background-position: 0 0;
  }
}

.pa-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--pa-gold);
  font-family: var(--pa-font-stamp);
  font-size: 13px;
  letter-spacing: 0.18em;
  line-height: 1.25;
  text-transform: uppercase;
}

.pa-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  flex: 0 0 28px;
  background: currentColor;
  opacity: 0.7;
}

.pa-main-button,
.pa-ghost-button,
.pa-toolbar-button,
.pa-submit-button,
.pa-empty-album button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.pa-main-button,
.pa-toolbar-button,
.pa-submit-button,
.pa-empty-album button {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(
      135deg,
      var(--pa-red-strong) 0%,
      var(--pa-red) 58%,
      #8d102b 100%
    );
  color: #fff8ef;
  box-shadow:
    0 18px 52px rgba(197, 22, 53, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pa-main-button:hover,
.pa-toolbar-button:hover,
.pa-submit-button:hover,
.pa-empty-album button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 68px rgba(197, 22, 53, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.pa-ghost-button {
  border: 1px solid rgba(255, 243, 223, 0.22);
  background: rgba(255, 255, 255, 0.075);
  color: var(--pa-text);
  backdrop-filter: blur(12px);
}

.pa-ghost-button:hover {
  border-color: rgba(255, 243, 223, 0.42);
  transform: translateY(-2px);
}

.pa-photo-card:focus-visible,
.pa-main-button:focus-visible,
.pa-ghost-button:focus-visible,
.pa-toolbar-button:focus-visible,
.pa-header-button:focus-visible,
.pa-logout-button:focus-visible,
.pa-submit-button:focus-visible,
.pa-floating-add:focus-visible,
.pa-empty-album button:focus-visible,
.pa-close-button:focus-visible,
.pa-lightbox-close:focus-visible,
.pa-lightbox-nav:focus-visible {
  outline: 3px solid rgba(255, 226, 155, 0.78);
  outline-offset: 3px;
}

/* Header
   ========================================================================== */

.pa-event-header {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100vw - 28px), 1180px);
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--pa-border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 36%),
    rgba(10, 10, 13, 0.76);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 32px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(1.5);
  transform: translateX(-50%);
  transition:
    background 0.28s ease,
    transform 0.28s ease,
    border-color 0.28s ease;
}

.pa-event-header.is-scrolled {
  border-color: rgba(255, 226, 155, 0.22);
  background: rgba(18, 4, 12, 0.9);
  transform: translateX(-50%) translateY(-2px);
}

.pa-brand {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
}

.pa-brand-mark,
.pa-auth-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 226, 155, 0.42);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(145deg, #2b0715, #17040c);
  color: var(--pa-gold);
  font-family: var(--pa-font-display);
  font-size: 20px;
  box-shadow: inset 0 0 24px rgba(255, 226, 155, 0.09);
}

.pa-brand strong {
  display: block;
  max-width: min(42vw, 360px);
  overflow: hidden;
  color: var(--pa-text);
  font-family: var(--pa-font-stamp);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pa-brand small {
  display: block;
  margin-top: 3px;
  color: var(--pa-gold-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.pa-header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.pa-header-link,
.pa-header-button,
.pa-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pa-header-link {
  padding: 0 12px;
  color: var(--pa-text-muted);
}

.pa-header-link:hover {
  color: var(--pa-text);
}

.pa-header-button {
  padding: 0 18px;
  border: 1px solid rgba(255, 226, 155, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(
      135deg,
      var(--pa-red-strong) 0%,
      var(--pa-red) 62%,
      #891129 100%
    );
  color: #fff8ef;
  box-shadow:
    0 14px 34px rgba(197, 22, 53, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pa-logout-button {
  padding: 0 14px;
  border: 1px solid rgba(255, 243, 223, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 243, 223, 0.72);
}

.pa-header-button:hover,
.pa-logout-button:hover {
  transform: translateY(-1px);
}

.pa-logout-button:hover {
  border-color: rgba(255, 226, 155, 0.28);
  color: var(--pa-text);
  background: rgba(255, 255, 255, 0.065);
}

/* Hero
   ========================================================================== */

.pa-event-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 118px var(--pa-page-x) 64px;
  background:
    linear-gradient(
      90deg,
      rgba(7, 8, 12, 0.94) 0%,
      rgba(20, 4, 11, 0.72) 42%,
      rgba(7, 8, 12, 0.46) 100%
    ),
    radial-gradient(
      circle at 76% 24%,
      rgba(255, 226, 155, 0.2),
      transparent 30%
    ),
    radial-gradient(circle at 22% 78%, rgba(255, 74, 99, 0.2), transparent 32%),
    var(--pa-hero-image, linear-gradient(135deg, #17030b, var(--pa-navy)));
  background-position: center;
  background-size: auto, auto, auto, cover;
}

.pa-event-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7, 8, 12, 0.82) 0%,
      transparent 24%,
      rgba(7, 8, 12, 0.78) 100%
    ),
    linear-gradient(90deg, rgba(7, 8, 12, 0.7), transparent 62%);
}

.pa-event-hero::after {
  content: "";
  position: absolute;
  top: -18%;
  left: -10%;
  z-index: 2;
  width: 42vw;
  height: 136%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 226, 155, 0.05) 45%,
    rgba(255, 226, 155, 0.12) 50%,
    rgba(255, 226, 155, 0.05) 55%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: pa-beam 8s ease-in-out infinite;
}

@keyframes pa-beam {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(0) rotate(-5deg);
  }
  50% {
    opacity: 0.85;
    transform: translateX(90vw) rotate(-5deg);
  }
}

.pa-hero-shade,
.pa-spotlight {
  display: none;
}

.pa-hero-inner {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  min-height: calc(100svh - 178px);
}

.pa-event-hero-content,
.pa-hero-collage {
  animation: pa-hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pa-hero-collage {
  animation-delay: 0.12s;
}

@keyframes pa-hero-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pa-event-hero h1,
.pa-album-toolbar h2,
.pa-upload-panel h2,
.pa-empty-album h3,
.pa-auth-card h1 {
  margin: 0;
  color: var(--pa-text);
  font-family: var(--pa-font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.pa-event-hero h1 {
  max-width: 920px;
  font-size: clamp(70px, 9vw, 138px);
  line-height: 0.86;
  text-wrap: balance;
}

.pa-event-hero h1 span,
.pa-event-hero h1 em,
.pa-album-toolbar h2 em,
.pa-upload-panel h2 em,
.pa-auth-card h1 em {
  color: var(--pa-gold);
  font-style: italic;
}

.pa-event-hero h1 span {
  display: block;
  text-shadow: 0 0 72px rgba(255, 226, 155, 0.28);
}

.pa-hero-text {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 243, 223, 0.8);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 300;
  line-height: 1.62;
}

.pa-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Hero collage
   ========================================================================== */

.pa-hero-collage {
  position: relative;
  min-height: 560px;
  perspective: 1400px;
}

.pa-collage-card {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: var(--pa-panel);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: pa-float var(--float-dur, 7s) ease-in-out infinite
    var(--float-delay, 0s);
  transition:
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
}

.pa-collage-card::before,
.pa-collage-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pa-collage-card::before {
  background: linear-gradient(0deg, rgba(7, 8, 10, 0.66), transparent 38%);
}

.pa-collage-card::after {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    transparent 42%
  );
}

.pa-collage-card:hover {
  z-index: 20;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 226, 155, 0.3);
}

.pa-collage-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pa-collage-card:hover .pa-collage-img {
  transform: scale(1.04);
}

@keyframes pa-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

.pa-collage-card-1 {
  left: 14%;
  top: 5%;
  z-index: 4;
  width: 58%;
  height: 56%;
  transform: rotate(-3.5deg);
  --float-dur: 7.2s;
  --float-delay: 0s;
}
.pa-collage-card-2 {
  right: 0;
  top: 2%;
  z-index: 3;
  width: 40%;
  height: 33%;
  transform: rotate(6.5deg);
  --float-dur: 6.8s;
  --float-delay: -1.2s;
}
.pa-collage-card-3 {
  left: 0;
  bottom: 8%;
  z-index: 5;
  width: 44%;
  height: 35%;
  transform: rotate(4.5deg);
  --float-dur: 7.5s;
  --float-delay: -2.4s;
}
.pa-collage-card-4 {
  right: 6%;
  bottom: 4%;
  z-index: 6;
  width: 47%;
  height: 41%;
  transform: rotate(-5.5deg);
  --float-dur: 6.5s;
  --float-delay: -3.6s;
}
.pa-collage-card-5 {
  left: 4%;
  top: 2%;
  z-index: 2;
  width: 30%;
  height: 26%;
  opacity: 0.85;
  transform: rotate(-8deg);
  --float-dur: 8s;
  --float-delay: -4.5s;
}
.pa-collage-card-6 {
  right: 26%;
  bottom: 0;
  z-index: 1;
  width: 31%;
  height: 26%;
  opacity: 0.8;
  transform: rotate(8.5deg);
  --float-dur: 7.8s;
  --float-delay: -5.2s;
}

.pa-collage-empty {
  position: absolute;
  inset: 8% 0 6%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 226, 155, 0.26);
  border-radius: var(--pa-radius-lg);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  backdrop-filter: blur(18px);
}

.pa-collage-empty span {
  color: var(--pa-gold);
  font-size: 48px;
}

.pa-collage-empty strong {
  font-family: var(--pa-font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 0.95;
}

.pa-collage-empty small {
  color: var(--pa-text-muted);
  font-size: 14px;
}

/* Album
   ========================================================================== */

.pa-album-section {
  position: relative;
  overflow: hidden;
  padding: 24px var(--pa-page-x) 104px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 226, 155, 0.08),
      transparent 26%
    ),
    linear-gradient(180deg, #120711 0%, var(--pa-navy) 100%);
  color: var(--pa-text);
}

.pa-album-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 226, 155, 0.7),
    transparent
  );
  opacity: 0.32;
}

.pa-album-toolbar {
  position: sticky;
  top: 78px;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 0 18px;
}

.pa-album-toolbar-copy {
  min-width: 0;
}

.pa-album-toolbar .pa-kicker {
  margin-bottom: 10px;
}

.pa-album-toolbar h2 {
  font-size: clamp(46px, 6.5vw, 86px);
  line-height: 0.9;
}

.pa-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pa-toolbar-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 243, 223, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pa-text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.pa-toolbar-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Photo wall
   ========================================================================== */

.pa-photo-wall {
  position: relative;
  z-index: 2;
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(8px, 1.1vw, 16px);
  margin-top: 100px;
}

.pa-photo-card {
  position: relative;
  display: block;
  grid-column: span 3;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  background: var(--pa-panel);
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.pa-photo-card:nth-child(12n + 1) {
  grid-column: span 6;
  grid-row: span 2;
  aspect-ratio: auto;
}
.pa-photo-card:nth-child(12n + 4),
.pa-photo-card:nth-child(12n + 9) {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}
.pa-photo-card:nth-child(12n + 6) {
  grid-column: span 3;
  grid-row: span 2;
  aspect-ratio: auto;
}
.pa-photo-card:nth-child(12n + 11) {
  grid-column: span 5;
  aspect-ratio: 16 / 9;
}

.pa-photo-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pa-photo-card::before,
.pa-photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pa-photo-card::before {
  background: linear-gradient(180deg, transparent 34%, rgba(5, 6, 8, 0.58));
}

.pa-photo-card::after {
  border: 1px solid rgba(255, 226, 155, 0.26);
  border-radius: inherit;
}

.pa-photo-card:hover {
  z-index: 5;
  border-color: rgba(255, 226, 155, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 226, 155, 0.16),
    0 28px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(-4px) scale(1.008) !important;
}

.pa-photo-card:hover::before,
.pa-photo-card:hover::after {
  opacity: 1;
}

.pa-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.25s ease;
}

.pa-photo-card:hover .pa-photo-img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.06);
}

.pa-photo-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 243, 223, 0.14);
  border-radius: 999px;
  background: rgba(12, 5, 9, 0.64);
  color: var(--pa-text);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  backdrop-filter: blur(14px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.pa-photo-overlay::before {
  content: "+";
  color: var(--pa-gold);
}

.pa-photo-card:hover .pa-photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

.pa-empty-album {
  margin-top: 100px;
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: 38px 24px;
  border: 1px solid rgba(255, 226, 155, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 226, 155, 0.12),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.018)
    );
  text-align: center;
}

.pa-empty-label {
  margin: 0 0 10px;
  color: var(--pa-gold);
  font-family: var(--pa-font-stamp);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pa-empty-album h3 {
  max-width: 680px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.92;
}

.pa-empty-album button {
  margin-top: 24px;
}

.pa-floating-add {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 160;
  display: none;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, var(--pa-red-strong), var(--pa-red));
  color: #fff8ef;
  font-size: 32px;
  line-height: 1;
  box-shadow: 0 18px 48px rgba(197, 22, 53, 0.42);
}

/* Toast
   ========================================================================== */

.pa-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 300;
  width: min(calc(100vw - 32px), 520px);
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  animation: pa-toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pa-toast.is-hiding {
  opacity: 0;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.pa-toast-success {
  background: rgba(18, 110, 64, 0.92);
}

.pa-toast-error {
  background: rgba(160, 30, 24, 0.92);
}

@keyframes pa-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Modal and upload
   ========================================================================== */

.pa-upload-modal,
.pa-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}

.pa-upload-modal[hidden],
.pa-lightbox[hidden] {
  display: none;
}

.pa-modal-backdrop,
.pa-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(18px);
}

.pa-upload-panel {
  position: relative;
  z-index: 2;
  width: min(calc(100vw - 28px), 540px);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 226, 155, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(255, 226, 155, 0.13),
      transparent 38%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(255, 74, 99, 0.16),
      transparent 42%
    ),
    rgba(25, 5, 13, 0.94);
  box-shadow: var(--pa-shadow);
  backdrop-filter: blur(18px);
  animation: pa-modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pa-modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pa-close-button,
.pa-lightbox-close,
.pa-lightbox-nav {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 243, 223, 0.16);
  border-radius: 999px;
  background: rgba(20, 4, 10, 0.62);
  color: var(--pa-text);
  backdrop-filter: blur(18px);
}

.pa-close-button {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
}

.pa-upload-panel h2 {
  max-width: 430px;
  font-size: clamp(42px, 7vw, 66px);
  line-height: 0.95;
}

.pa-modal-text {
  margin: 16px 0 22px;
  color: var(--pa-text-muted);
  font-size: 15px;
  line-height: 1.58;
}

.pa-upload-form {
  display: grid;
  gap: 14px;
}

.pa-dropzone {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 24px 16px;
  border: 1px dashed rgba(255, 226, 155, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.pa-dropzone:hover,
.pa-dropzone.is-dragging,
.pa-dropzone.is-selected {
  border-color: rgba(255, 226, 155, 0.72);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 226, 155, 0.12),
      transparent 42%
    ),
    linear-gradient(135deg, rgba(197, 22, 53, 0.18), rgba(255, 226, 155, 0.08));
}

.pa-dropzone span {
  display: block;
  color: var(--pa-text);
  font-size: 18px;
  font-weight: 800;
}

.pa-dropzone small {
  display: block;
  margin-top: 7px;
  color: var(--pa-text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.pa-dropzone input {
  display: none;
}

.pa-upload-form.is-submitting .pa-submit-button {
  opacity: 0.78;
  pointer-events: none;
}

/* Lightbox
   ========================================================================== */

.pa-lightbox {
  z-index: 500;
}

.pa-lightbox img {
  position: relative;
  z-index: 2;
  display: block;
  max-width: min(92vw, 1180px);
  max-height: 86dvh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.72);
}

.pa-lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}

.pa-lightbox-nav {
  top: 50%;
  width: 48px;
  height: 64px;
  transform: translateY(-50%);
}

.pa-lightbox-prev {
  left: 20px;
}

.pa-lightbox-next {
  right: 20px;
}

/* Auth
   ========================================================================== */

.pa-auth-page {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 18px
    max(20px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 74, 99, 0.22), transparent 34%),
    radial-gradient(
      circle at 96% 14%,
      rgba(255, 226, 155, 0.12),
      transparent 30%
    ),
    linear-gradient(180deg, #210512 0%, #0d0d18 58%, var(--pa-navy) 100%);
}

.pa-auth-page *,
.pa-auth-page *::before,
.pa-auth-page *::after {
  box-sizing: border-box;
}

.pa-auth-bg {
  position: fixed;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black 0%, transparent 86%);
}

.pa-auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 600px);
  min-width: 0;
  max-width: 100%;
  padding: 34px;
  border: 1px solid rgba(255, 226, 155, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(255, 226, 155, 0.13),
      transparent 38%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(255, 74, 99, 0.16),
      transparent 42%
    ),
    rgba(25, 5, 13, 0.92);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.pa-auth-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 16px;
  font-size: 25px;
}

.pa-auth-card h1 {
  font-size: clamp(54px, 8vw, 82px);
  line-height: 0.92;
}

.pa-auth-card h1 em {
  display: block;
}

.pa-auth-text {
  margin: 20px 0 24px;
  color: var(--pa-text-muted);
  font-size: 15px;
  line-height: 1.58;
}

.pa-auth-alert {
  margin: -6px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 74, 99, 0.26);
  border-radius: 14px;
  background: rgba(197, 22, 53, 0.14);
  color: #ffe7e7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.pa-auth-form form {
  display: grid;
  gap: 14px;
}

.pa-auth-form p {
  margin: 0;
}

.pa-auth-form label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 241, 216, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.pa-auth-form input[type="text"],
.pa-auth-form input[type="password"] {
  width: 100%;
  height: 52px;
  max-width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(255, 226, 155, 0.2);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pa-text);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.pa-auth-form input[type="text"]:focus,
.pa-auth-form input[type="password"]:focus {
  border-color: rgba(255, 226, 155, 0.56);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 226, 155, 0.08);
}

.pa-auth-form .login-remember label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  color: var(--pa-text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.pa-auth-form input[type="checkbox"] {
  accent-color: var(--pa-red);
}

.pa-auth-form input[type="submit"] {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, var(--pa-red-strong), var(--pa-red));
  color: #fff8ef;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  box-shadow:
    0 18px 52px rgba(197, 22, 53, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pa-auth-form input[type="submit"]:hover {
  box-shadow:
    0 24px 68px rgba(197, 22, 53, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

/* Responsive base
   ========================================================================== */

@media (max-width: 1120px) {
  .pa-hero-inner {
    gap: 22px;
  }

  .pa-hero-collage {
    min-height: 430px;
  }

  .pa-photo-card,
  .pa-photo-card:nth-child(12n + 1),
  .pa-photo-card:nth-child(12n + 4),
  .pa-photo-card:nth-child(12n + 6),
  .pa-photo-card:nth-child(12n + 9),
  .pa-photo-card:nth-child(12n + 11) {
    grid-column: span 4;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }

  .pa-photo-card:nth-child(8n + 1) {
    grid-column: span 8;
  }
}

@media (max-width: 920px) {
  .pa-header-link {
    display: none;
  }

  .pa-brand strong {
    max-width: 34vw;
  }
}

@media (max-width: 860px) {
  .pa-event-hero {
    min-height: auto;
    padding: 108px 16px 34px;
  }

  .pa-hero-inner {
    min-height: auto;
  }

  .pa-event-hero h1 {
    font-size: clamp(54px, 15vw, 96px);
  }

  .pa-hero-text br {
    display: none;
  }

  .pa-hero-collage {
    min-height: 340px;
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pa-page::after,
  .pa-event-hero::after,
  .pa-collage-card,
  .pa-event-hero-content,
  .pa-hero-collage,
  .pa-toast,
  .pa-upload-panel {
    animation: none !important;
  }

  .pa-page *,
  .pa-page *::before,
  .pa-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
