:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --space-1:0.25rem;--space-2:0.5rem;--space-3:0.75rem;--space-4:1rem;
  --space-6:1.5rem;--space-8:2rem;--space-10:2.5rem;--space-12:3rem;--space-16:4rem;
  --radius-sm:0.375rem;--radius-md:0.5rem;--radius-lg:0.75rem;--radius-xl:1rem;--radius-full:9999px;
  --transition-interactive:180ms cubic-bezier(0.16,1,0.3,1);
  --font-display:'Cabinet Grotesk','Georgia',serif;
  --font-body:'Satoshi','Helvetica Neue',sans-serif;
}
[data-theme="dark"] {
  --color-bg:#0d0b10;
  --color-surface:#161320;
  --color-surface-2:#1e1a2a;
  --color-surface-offset:#252030;
  --color-divider:#2e2840;
  --color-border:#3a3350;
  --color-text:#ede8ff;
  --color-text-muted:#9b90c0;
  --color-text-faint:#5a5270;
  --color-primary:#c084fc;
  --color-primary-hover:#a855f7;
  --color-primary-highlight:#3b2060;
  --color-gold:#f0c060;
  --shadow-sm:0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md:0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg:0 12px 40px oklch(0 0 0 / 0.5);
}
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-font-smoothing:antialiased; scroll-behavior:smooth; }
body {
  min-height:100dvh;
  font-family:var(--font-body);
  font-size:var(--text-base);
  color:var(--color-text);
  background:var(--color-bg);
  overflow-x:hidden;
}
img, video { display:block; max-width:100%; height:auto; }

/* ── HERO ── */
.hero {
  position:relative;
  min-height:100dvh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center;
  padding:var(--space-8) var(--space-4);
  overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 10%, oklch(0.55 0.28 300 / 0.25), transparent),
    radial-gradient(ellipse 50% 50% at 80% 80%, oklch(0.55 0.28 340 / 0.2), transparent),
    radial-gradient(ellipse 60% 40% at 60% 20%, oklch(0.65 0.22 60 / 0.1), transparent);
}
.hero-content { position:relative; z-index:1; max-width:700px; }
.hero-emoji { font-size:clamp(3rem,8vw,5rem); display:block; margin-bottom:var(--space-4); animation:bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.hero h1 {
  font-family:var(--font-display);
  font-size:var(--text-3xl);
  font-weight:800;
  line-height:1.1;
  margin-bottom:var(--space-4);
  background:linear-gradient(135deg in oklch, var(--color-primary), var(--color-gold));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.hero-subtitle {
  font-size:var(--text-lg);
  color:var(--color-text-muted);
  max-width:55ch;
  margin:0 auto var(--space-8);
  line-height:1.6;
}
.scroll-hint {
  position:absolute; bottom:var(--space-8); left:50%; transform:translateX(-50%);
  color:var(--color-text-faint); font-size:var(--text-xs); letter-spacing:0.1em;
  text-transform:uppercase; z-index:1;
  display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
  animation:fadepulse 2s ease-in-out infinite;
}
@keyframes fadepulse { 0%,100%{opacity:0.4} 50%{opacity:1} }
.scroll-hint svg { animation:arrowbounce 1.5s ease-in-out infinite; }
@keyframes arrowbounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }

/* ── CONFETTI ── */
.confetti-container { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:100; }
.confetti-piece {
  position:absolute;
  width:8px; height:14px;
  border-radius:2px;
  animation:confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform:translateY(-20px) rotate(0deg); opacity:1; }
  100% { transform:translateY(110vh) rotate(720deg); opacity:0; }
}

/* ── SECTION ── */
.section { padding:clamp(var(--space-10), 6vw, var(--space-16)) var(--space-4); }
.section-title {
  font-family:var(--font-display);
  font-size:var(--text-xl);
  font-weight:800;
  text-align:center;
  margin-bottom:var(--space-8);
  color:var(--color-text);
}
.section-title span { color:var(--color-primary); }
.container { max-width:1100px; margin:0 auto; }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border:2px dashed var(--color-border);
  border-radius:var(--radius-xl);
  padding:var(--space-12) var(--space-8);
  text-align:center;
  cursor:pointer;
  background:var(--color-surface);
  transition:border-color var(--transition-interactive), background var(--transition-interactive);
  margin-bottom:var(--space-8);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color:var(--color-primary);
  background:color-mix(in oklch, var(--color-primary) 6%, var(--color-surface));
}
.upload-zone input[type="file"] { display:none; }
.upload-icon { font-size:2.5rem; margin-bottom:var(--space-4); }
.upload-zone p { color:var(--color-text-muted); font-size:var(--text-sm); }
.upload-zone strong { color:var(--color-primary); }
.btn {
  display:inline-flex; align-items:center; gap:var(--space-2);
  padding:var(--space-3) var(--space-6);
  border-radius:var(--radius-full);
  font-family:var(--font-body);
  font-size:var(--text-sm);
  font-weight:600;
  cursor:pointer;
  transition:all var(--transition-interactive);
  border:none;
}
.btn-primary {
  background:var(--color-primary);
  color:#0d0b10;
}
.btn-primary:hover { background:var(--color-primary-hover); transform:translateY(-1px); box-shadow:var(--shadow-md); }
.btn-ghost {
  background:transparent;
  color:var(--color-text-muted);
  border:1px solid var(--color-border);
}
.btn-ghost:hover { color:var(--color-text); border-color:var(--color-primary); }

/* ── GALLERY ── */
.gallery-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(min(260px,100%),1fr));
  gap:var(--space-4);
}
.media-card {
  background:var(--color-surface);
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  transition:transform var(--transition-interactive), box-shadow var(--transition-interactive);
  cursor:pointer;
  position:relative;
}
.media-card:hover { transform:translateY(-4px) scale(1.01); box-shadow:var(--shadow-lg); }
.media-card img, .media-card video {
  width:100%; aspect-ratio:4/3; object-fit:cover;
}
.media-card .remove-btn {
  position:absolute; top:var(--space-2); right:var(--space-2);
  background:oklch(0.15 0 0 / 0.75);
  color:#fff;
  border:none; border-radius:var(--radius-full);
  width:28px; height:28px;
  display:flex; align-items:center; justify-content:center;
  font-size:1rem; cursor:pointer;
  opacity:0; transition:opacity var(--transition-interactive);
}
.media-card:hover .remove-btn { opacity:1; }
.media-card .type-badge {
  position:absolute; bottom:var(--space-2); left:var(--space-2);
  background:oklch(0.15 0 0 / 0.7);
  color:var(--color-text-muted);
  font-size:var(--text-xs); padding:2px 8px;
  border-radius:var(--radius-full);
}

/* ── LIGHTBOX ── */
.lightbox {
  display:none; position:fixed; inset:0; z-index:200;
  background:oklch(0 0 0 / 0.92);
  align-items:center; justify-content:center;
  padding:var(--space-4);
}
.lightbox.open { display:flex; }
.lightbox-inner { position:relative; max-width:90vw; max-height:90vh; }
.lightbox-inner img, .lightbox-inner video {
  max-width:90vw; max-height:85vh;
  border-radius:var(--radius-lg);
  object-fit:contain;
}
.lightbox-close {
  position:absolute; top:-14px; right:-14px;
  background:var(--color-primary); color:#0d0b10;
  border:none; border-radius:var(--radius-full);
  width:36px; height:36px;
  font-size:1.2rem; cursor:pointer; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.lightbox-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  background:oklch(0.3 0.1 300 / 0.6);
  color:#fff; border:none; border-radius:var(--radius-full);
  width:44px; height:44px; font-size:1.4rem;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background var(--transition-interactive);
}
.lightbox-nav:hover { background:var(--color-primary); color:#0d0b10; }
.lightbox-prev { left:-56px; }
.lightbox-next { right:-56px; }
@media (max-width:600px) {
  .lightbox-prev { left:var(--space-2); }
  .lightbox-next { right:var(--space-2); }
}

/* ── MESSAGE CARD ── */
.message-card {
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:var(--radius-xl);
  padding:var(--space-8);
  text-align:center;
  max-width:600px;
  margin:0 auto var(--space-12);
  position:relative;
  overflow:hidden;
}
.message-card::before {
  content:'';
  position:absolute; inset:0;
  background:radial-gradient(ellipse at top, oklch(0.55 0.28 300 / 0.07), transparent 70%);
}
.message-card p {
  position:relative; z-index:1;
  font-size:var(--text-lg);
  line-height:1.8;
  color:var(--color-text-muted);
  font-style:italic;
}
.message-card .author {
  position:relative; z-index:1;
  margin-top:var(--space-4);
  color:var(--color-primary);
  font-weight:600;
  font-size:var(--text-sm);
  letter-spacing:0.05em;
  text-transform:uppercase;
}
#messageText { display:none; }
#editMessage { font-family:var(--font-body); width:100%; min-height:120px; padding:var(--space-4); background:var(--color-surface-offset); color:var(--color-text); border:1px solid var(--color-border); border-radius:var(--radius-lg); resize:vertical; font-size:var(--text-base); }
#editMessage:focus { outline:2px solid var(--color-primary); }

/* ── EDIT MODE BANNER ── */
.edit-banner {
  position:fixed; bottom:var(--space-4); left:50%; transform:translateX(-50%);
  background:var(--color-surface-2);
  border:1px solid var(--color-border);
  border-radius:var(--radius-full);
  padding:var(--space-3) var(--space-6);
  display:flex; align-items:center; gap:var(--space-4);
  z-index:50;
  box-shadow:var(--shadow-lg);
  font-size:var(--text-sm);
  color:var(--color-text-muted);
  white-space:nowrap;
}

/* ── EMPTY STATE ── */
.empty-state {
  display:flex; flex-direction:column; align-items:center;
  padding:var(--space-16) var(--space-8);
  color:var(--color-text-muted); text-align:center;
}
.empty-state .icon { font-size:3rem; margin-bottom:var(--space-4); }
.empty-state p { max-width:36ch; }

/* ── FOOTER ── */
.footer { padding:var(--space-8) var(--space-4); text-align:center; color:var(--color-text-faint); font-size:var(--text-xs); border-top:1px solid var(--color-divider); }

/* Fade-in scroll reveals */
.fade-in { opacity:1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity:0;
    animation:reveal-fade linear both;
    animation-timeline:view();
    animation-range:entry 0% entry 60%;
  }
  @keyframes reveal-fade { to { opacity:1; } }
}

@media (max-width:600px) {
  .btn { padding:var(--space-3) var(--space-4); }
  .gallery-grid { grid-template-columns:repeat(2, 1fr); gap:var(--space-2); }
}
