:root {
  color-scheme: dark;
  --text: #f7efde;
  --muted: rgba(247, 239, 222, 0.7);
  --button-bg: rgba(13, 12, 11, 0.76);
  --button-border: rgba(247, 239, 222, 0.2);
  --button-hover: rgba(247, 239, 222, 0.12);
  --overlay-panel: rgba(8, 7, 6, 0.72);
  --overlay-stroke: rgba(247, 239, 222, 0.1);
  --progress-track: rgba(247, 239, 222, 0.14);
  --progress-fill: #f7efde;
  --progress-glow: rgba(247, 239, 222, 0.32);
  --result-error: #f0b0a0;
  --result-stored: #f7efde;
  --result-duplicate: #ffd9b0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: "Manrope", sans-serif;
  background: #090807;
  color: var(--text);
}

body[data-blur-breach="detected"] .mosaic-tint {
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0.32), rgba(8, 8, 7, 0.6)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 26%);
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.intro-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(180deg, #f5ecda 0%, #ece0cb 100%);
  transition:
    opacity 700ms ease,
    filter 700ms ease,
    visibility 0ms linear 700ms;
}

.intro-loader.is-leaving {
  opacity: 0;
  filter: blur(24px);
  visibility: hidden;
}

.intro-loader-spinner {
  width: 60px;
  aspect-ratio: 1;
  --g: conic-gradient(from -90deg at 10px 10px, #000 90deg, #0000 0);
  background: var(--g), var(--g), var(--g);
  background-size: 50% 50%;
  animation: intro-loader-spin 1s infinite;
}

.mosaic-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mosaic-grid {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mosaic-width, 100vw);
  height: var(--mosaic-height, 100vh);
  transform: translate(-50%, -50%) scale(1.16);
  filter: blur(28px) saturate(0.96) contrast(1.06);
  transform-origin: center;
  will-change: transform, filter;
  animation:
    mosaic-grid-float 18s ease-in-out infinite alternate,
    mosaic-grid-roll 28s ease-in-out infinite alternate;
}

.mosaic-tile {
  position: absolute;
  overflow: hidden;
  background: #111010;
  contain: layout paint size style;
  transform: translate3d(0, 0, 0) scale(1);
  animation:
    mosaic-tile-float var(--tile-drift-duration, 18s) ease-in-out infinite alternate,
    mosaic-tile-sway var(--tile-sway-duration, 20s) ease-in-out infinite alternate;
  animation-delay: var(--tile-drift-delay, 0s);
  will-change: transform, filter;
  transition:
    transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 760ms ease,
    box-shadow 760ms ease;
}

.mosaic-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 52%);
  mix-blend-mode: screen;
  opacity: 0.4;
  pointer-events: none;
  animation: mosaic-tile-glow var(--tile-glow-duration, 10s) ease-in-out infinite alternate;
}

.mosaic-tile.is-swapping {
  z-index: 6;
  filter: brightness(1.08) saturate(1.08);
  box-shadow: 0 34px 92px rgba(0, 0, 0, 0.34);
  transform: translate3d(0, 0, 0) scale(1.065);
}

.mosaic-tile.is-pulsing::after {
  animation:
    mosaic-tile-glow var(--tile-glow-duration, 14s) ease-in-out infinite alternate,
    mosaic-tile-flare 900ms ease;
}

.mosaic-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: translate3d(var(--drift-x, 0px), var(--drift-y, 0px), 0) rotate(var(--media-rotate, 0deg))
    scale(var(--media-scale, 1.05));
  transform-origin: center;
  transition:
    opacity 620ms ease,
    filter 860ms ease,
    transform 1160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mosaic-media.is-current {
  z-index: 1;
}

.mosaic-media.is-entering,
.mosaic-media.is-exiting {
  will-change: transform, opacity, filter;
}

.mosaic-media.is-entering {
  z-index: 2;
  opacity: 0;
  filter: blur(62px) brightness(0.66) saturate(0.72);
  transform: translate3d(var(--float-x, 0px), var(--float-y, 0px), 0) rotate(calc(var(--media-rotate, 0deg) * -1.4))
    scale(1.6);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.48);
}

.mosaic-media.is-entering.is-live {
  opacity: 1;
  filter: blur(0) brightness(1);
  transform: translate3d(var(--drift-x, 0px), var(--drift-y, 0px), 0) rotate(var(--media-rotate, 0deg))
    scale(var(--media-scale, 1.05));
}

.mosaic-media.is-exiting {
  z-index: 1;
  opacity: 0;
  filter: blur(52px) brightness(0.6) saturate(0.68);
  transform: translate3d(calc(var(--drift-x, 0px) * -1.35), calc(var(--drift-y, 0px) * -1.35), 0)
    rotate(var(--media-exit-rotate, 0deg)) scale(0.42);
}

.mosaic-blur {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 7, 0.12);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.18);
}

.mosaic-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0.18), rgba(8, 8, 7, 0.48)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 26%);
}

.centerpiece {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.15rem;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  pointer-events: none;
}

.notice-stack {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 3vw, 2rem);
  width: min(360px, calc(100vw - 2rem));
  display: grid;
  gap: 0.85rem;
  pointer-events: auto;
}

.notice-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(247, 239, 222, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 11, 10, 0.84), rgba(12, 11, 10, 0.72));
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  text-align: left;
}

.notice-card-offer {
  background:
    linear-gradient(180deg, rgba(66, 38, 23, 0.92), rgba(25, 16, 12, 0.76)),
    radial-gradient(circle at top right, rgba(255, 212, 151, 0.16), transparent 36%);
}

.notice-card-update {
  background:
    linear-gradient(180deg, rgba(22, 34, 42, 0.9), rgba(10, 15, 20, 0.76)),
    radial-gradient(circle at top right, rgba(178, 227, 255, 0.12), transparent 36%);
}

.notice-pill,
.notice-card strong,
.notice-card p,
.notice-link {
  display: block;
}

.notice-pill {
  width: fit-content;
  margin-bottom: 0.55rem;
  padding: 0.32rem 0.56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notice-card strong {
  font-size: 1rem;
}

.notice-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.notice-link {
  width: fit-content;
  margin-top: 0.8rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.notice-link:hover {
  text-decoration: underline;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4.5rem, 15vw, 10rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.upload-control {
  pointer-events: auto;
}

.upload-button,
.upload-overlay-close {
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.95rem 1.7rem;
  background: var(--button-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.upload-button:hover,
.upload-overlay-close:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
  border-color: rgba(247, 239, 222, 0.3);
}

.upload-button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: stretch;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.7), rgba(8, 7, 6, 0.92)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 34%);
  backdrop-filter: blur(24px);
}

.upload-overlay[hidden] {
  display: none;
}

.upload-overlay-shell {
  display: grid;
  align-content: center;
  gap: 2rem;
  width: 100%;
  min-height: 100%;
  padding: clamp(1.2rem, 3vw, 3rem);
  overflow: auto;
}

.upload-overlay-head {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  text-align: center;
}

.upload-overlay-head p,
.upload-overlay-head h2,
.upload-overlay-summary {
  margin: 0;
}

.upload-overlay-head p {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.upload-overlay-head h2 {
  margin-top: 0.3rem;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.94;
}

.upload-overlay-summary {
  max-width: 42rem;
  justify-self: center;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.upload-overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  gap: 1.6rem;
  justify-content: center;
  align-content: center;
  min-height: min(62vh, 100%);
}

.upload-card {
  display: grid;
  gap: 1.15rem;
  align-content: start;
  width: min(100%, 340px);
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 36px;
  background: rgba(10, 9, 8, 0.32);
  border: 1px solid rgba(247, 239, 222, 0.08);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.22);
  animation: upload-card-rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.upload-card.is-processing {
  border-color: rgba(247, 239, 222, 0.14);
}

.upload-card.is-stored {
  border-color: rgba(247, 239, 222, 0.16);
}

.upload-card.is-duplicate {
  border-color: rgba(255, 217, 176, 0.22);
}

.upload-card.is-error {
  border-color: rgba(240, 176, 160, 0.2);
}

.upload-frame {
  --progress-angle: 0deg;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 36px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  transform: translateZ(0);
}

.upload-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 5px;
  background:
    conic-gradient(
      from -90deg,
      rgba(255, 244, 220, 0.98) 0deg,
      rgba(247, 239, 222, 0.96) var(--progress-angle),
      rgba(247, 239, 222, 0.16) var(--progress-angle),
      rgba(247, 239, 222, 0.16) 360deg
    );
  filter: drop-shadow(0 0 16px var(--progress-glow));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.upload-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(247, 239, 222, 0.12);
  pointer-events: none;
}

.upload-frame-inner {
  position: absolute;
  inset: 5px;
  overflow: hidden;
  border-radius: 31px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 42%),
    #141311;
}

.upload-frame-inner img,
.upload-frame-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}

.upload-frame-inner video {
  pointer-events: none;
}

.upload-kind {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.25rem 0.52rem;
  border-radius: 999px;
  background: rgba(9, 8, 7, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.upload-card-body {
  display: grid;
  gap: 0.6rem;
}

.upload-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-current-status,
.upload-note,
.upload-result {
  margin: 0;
}

.upload-step-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.upload-step {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 239, 222, 0.08);
  background: rgba(247, 239, 222, 0.04);
  color: rgba(247, 239, 222, 0.54);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.upload-step.is-active {
  border-color: rgba(247, 239, 222, 0.22);
  background: rgba(247, 239, 222, 0.14);
  color: var(--text);
  transform: translateY(-1px);
}

.upload-step.is-done {
  border-color: rgba(247, 239, 222, 0.16);
  background: rgba(247, 239, 222, 0.1);
  color: rgba(247, 239, 222, 0.88);
}

.upload-step.is-error {
  border-color: rgba(240, 176, 160, 0.28);
  background: rgba(240, 176, 160, 0.1);
  color: var(--result-error);
}

.upload-current-status {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.upload-note {
  min-height: 2.8em;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}

.upload-result {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--muted);
}

.upload-result.is-stored,
.upload-result.is-duplicate,
.upload-card.is-stored .upload-current-status,
.upload-card.is-duplicate .upload-current-status {
  color: var(--result-stored);
}

.upload-result.is-duplicate {
  color: var(--result-duplicate);
}

.upload-result.is-error {
  color: var(--result-error);
}

.upload-card.is-error .upload-current-status {
  color: var(--result-error);
}

#media-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes intro-loader-spin {
  0% {
    background-position: 0 0, 10px 10px, 20px 20px;
  }

  33% {
    background-position: -30px 0, 10px 10px, 20px 20px;
  }

  66% {
    background-position: -30px 0, -20px 10px, 20px 20px;
  }

  100% {
    background-position: -30px 0, -20px 10px, -10px 20px;
  }
}

@keyframes mosaic-grid-float {
  from {
    transform: translate(-47.6%, -52.4%) scale(1.14);
  }

  to {
    transform: translate(-52.4%, -47.6%) scale(1.22);
  }
}

@keyframes mosaic-grid-roll {
  from {
    filter: blur(26px) saturate(0.92) contrast(1.02);
  }

  to {
    filter: blur(34px) saturate(1.04) contrast(1.12);
  }
}

@keyframes mosaic-tile-float {
  from {
    transform: translate3d(calc(var(--tile-shift-x, 0px) * -0.58), calc(var(--tile-shift-y, 0px) * -0.58), 0)
      scale(calc(var(--tile-scale, 1.04) - 0.028));
  }

  to {
    transform: translate3d(var(--tile-shift-x, 0px), var(--tile-shift-y, 0px), 0) scale(var(--tile-scale, 1.04));
  }
}

@keyframes mosaic-tile-sway {
  from {
    rotate: calc(var(--tile-rotation, 0deg) * -0.6);
  }

  to {
    rotate: var(--tile-rotation, 0deg);
  }
}

@keyframes mosaic-tile-glow {
  from {
    opacity: 0.18;
  }

  to {
    opacity: 0.54;
  }
}

@keyframes mosaic-tile-flare {
  0% {
    opacity: 0.18;
  }

  35% {
    opacity: 0.58;
  }

  100% {
    opacity: 0.26;
  }
}

@keyframes upload-card-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .notice-stack {
    width: calc(100vw - 2rem);
  }

  h1 {
    font-size: clamp(4rem, 21vw, 7rem);
  }

  .upload-button {
    width: 100%;
    max-width: 13rem;
  }

  .upload-overlay-shell {
    padding: 1rem;
  }

  .upload-overlay-head {
    justify-items: stretch;
  }

  .upload-overlay-close {
    width: 100%;
  }

  .upload-overlay-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .upload-card {
    width: 100%;
  }

  .mosaic-grid {
    filter: blur(22px) saturate(0.98) contrast(1.04);
  }
}
