@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --royal: #1a3c8f;
  --royal-mid: #2952b8;
  --royal-light: #3b6de6;
  --royal-dim: rgba(26,60,143,.07);
  --royal-tint: rgba(26,60,143,.12);
  --bg: #ffffff;
  --surface: #f5f7fb;
  --surface-alt: #eef1f8;
  --border: #dfe3ed;
  --border-light: #eceff5;
  --text: #141828;
  --text-secondary: #6b7189;
  --text-tertiary: #9da2b3;
  --danger: #d6293e;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(20,24,40,.06), 0 1px 2px rgba(20,24,40,.04);
  --shadow-md: 0 4px 12px rgba(20,24,40,.07), 0 1px 3px rgba(20,24,40,.05);
  --shadow-lg: 0 10px 32px rgba(20,24,40,.10), 0 2px 6px rgba(20,24,40,.04);
  --shadow-fab: 0 6px 24px rgba(26,60,143,.28), 0 2px 6px rgba(26,60,143,.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { height: 100%; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.5rem; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  cursor: pointer; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--royal) 0%, var(--royal-mid) 50%, var(--royal-light) 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,60,143,.2);
  position: relative; overflow: hidden;
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 6px 20px rgba(26,60,143,.3);
  transform: translateY(-1px);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: shimmer 3s ease-in-out infinite;
}
.btn-secondary {
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border);
  transition: transform .2s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn-secondary:hover {
  background: var(--surface); border-color: var(--royal); color: var(--royal);
  box-shadow: 0 2px 10px rgba(26,60,143,.08);
}
.btn-small { padding: .45rem .85rem; font-size: .8rem; border-radius: var(--radius-xs); }

.icon-btn {
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, transform .2s;
}
.icon-btn:hover { background: var(--royal-dim); color: var(--royal); transform: scale(1.08); }

/* ============================================================
   LANDING — animated gradient
   ============================================================ */
.landing {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #e8edf8 25%, #f0f3fa 50%, #dce4f5 75%, #ffffff 100%);
  background-size: 400% 400%;
  animation: gradientDrift 12s ease infinite;
  position: relative;
}
.landing::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(26,60,143,.04) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(59,109,230,.05) 0%, transparent 50%);
  pointer-events: none;
}
.landing-card {
  width: 100%; max-width: 400px;
  position: relative; z-index: 1;
  animation: contentSlideUp .7s ease-out;
}
.logo { text-align: center; margin-bottom: 2.5rem; }
.logo svg { animation: logoFloat 4s ease-in-out infinite; }
.logo h1 {
  font-size: 1.85rem; font-weight: 700; margin-top: .6rem;
  letter-spacing: -.03em; color: var(--royal);
  animation: contentSlideUp .7s ease-out .1s both;
}
.tagline {
  color: var(--text-secondary); font-size: .9rem; margin-top: .3rem; font-weight: 400;
  animation: contentSlideUp .7s ease-out .2s both;
}
.form-section h2 {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); margin-bottom: .6rem; font-weight: 600;
}
.input-group { display: flex; gap: .5rem; }
.input-group input {
  flex: 1; padding: .8rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.85); color: var(--text);
  font-family: var(--font); font-size: .95rem; outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.input-group input::placeholder { color: var(--text-tertiary); }
.input-group input:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px var(--royal-dim);
  background: #fff;
}
.divider {
  display: flex; align-items: center; gap: 1rem; margin: 2rem 0;
  color: var(--text-tertiary); font-size: .78rem; font-weight: 500;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.landing-info {
  margin: 2.5rem 0;
  animation: contentSlideUp .7s ease-out .3s both;
}
.landing-info svg { animation: logoFloat 5s ease-in-out infinite; }
.landing-msg { color: var(--text-secondary); font-size: .95rem; margin-top: .75rem; font-weight: 400; }

/* ============================================================
   EVENT HEADER — gradient underline
   ============================================================ */
.event-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: none;
  box-shadow: 0 1px 0 var(--border-light);
}
.event-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--royal), var(--royal-light), var(--royal));
  background-size: 200% 100%;
  animation: gradientSlide 4s ease infinite;
  opacity: .3;
}
.event-header h1 {
  flex: 1; font-size: 1.05rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--royal);
}

/* ============================================================
   TAB BAR
   ============================================================ */
.tab-bar {
  display: flex; gap: 0; overflow-x: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
  padding: 0 .25rem;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: .75rem 1.15rem; border: none; background: none;
  color: var(--text-tertiary); font-family: var(--font); font-size: .85rem; font-weight: 600;
  cursor: pointer; border-bottom: 2.5px solid transparent;
  transition: color .25s, border-color .25s, transform .15s;
  position: relative;
}
.tab.active { color: var(--royal); border-bottom-color: var(--royal); }
.tab:hover { color: var(--text); }
.tab:active { transform: scale(.95); }

.tab-panel {
  min-height: 50vh; position: relative; z-index: 1;
  background: transparent;
  padding-bottom: calc(200px + var(--safe-bottom));
}
.photo-count {
  text-align: center; padding: .6rem; font-size: .78rem;
  color: var(--text-tertiary); font-weight: 500;
  background: transparent;
}

/* ============================================================
   PHOTO GRID
   ============================================================ */
.gallery { padding: 3px; background: transparent; }
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
}
.photo-tile {
  aspect-ratio: 1; overflow: hidden; cursor: pointer;
  position: relative; background: var(--surface);
  border-radius: var(--radius-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}
.photo-tile:hover { transform: scale(1.02); box-shadow: var(--shadow-md); z-index: 2; }
.photo-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.photo-tile:active img { transform: scale(1.08); }
.photo-tile.new { animation: tilePopIn .5s cubic-bezier(.34,1.56,.64,1); }
.photo-tile .photo-author {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 3px 7px; font-size: .62rem; color: #fff; font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   MENU LIST (user-facing)
   ============================================================ */
.menu-list { padding: .75rem; display: flex; flex-direction: column; gap: .5rem; background: transparent; }
.menu-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: .9rem 1rem;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-sm); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: itemSlideIn .4s ease both;
}
.menu-item:nth-child(1) { animation-delay: 0s; }
.menu-item:nth-child(2) { animation-delay: .05s; }
.menu-item:nth-child(3) { animation-delay: .1s; }
.menu-item:nth-child(4) { animation-delay: .15s; }
.menu-item:nth-child(5) { animation-delay: .2s; }
.menu-item:nth-child(n+6) { animation-delay: .25s; }
.menu-item-info h3 { font-size: .95rem; font-weight: 600; color: var(--text); }
.menu-item-info p { font-size: .82rem; color: var(--text-secondary); margin-top: .15rem; line-height: 1.4; }
.menu-item-price {
  font-weight: 700; color: var(--royal); white-space: nowrap;
  margin-left: 1.25rem; font-size: .88rem;
}

/* ============================================================
   TIMELINE (user-facing)
   ============================================================ */
.timeline {
  padding: 1.75rem 1rem 1.75rem 4rem;
  position: relative; background: transparent;
}
.timeline::before {
  content: ''; position: absolute; left: 2.45rem; top: 1.75rem; bottom: 1.75rem;
  width: 2px;
  background: linear-gradient(180deg, var(--royal-dim), var(--royal-tint), var(--royal-dim));
  border-radius: 1px;
}
.timeline-entry {
  position: relative; padding: .4rem 0 1.75rem 1.5rem;
  animation: itemSlideIn .5s ease both;
}
.timeline-body {
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-sm); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: .65rem .85rem;
}
.timeline-entry:nth-child(1) { animation-delay: 0s; }
.timeline-entry:nth-child(2) { animation-delay: .1s; }
.timeline-entry:nth-child(3) { animation-delay: .2s; }
.timeline-entry:nth-child(4) { animation-delay: .3s; }
.timeline-entry:nth-child(5) { animation-delay: .4s; }
.timeline-entry:nth-child(n+6) { animation-delay: .5s; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-bubble {
  position: absolute; left: -1.75rem; top: .25rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--royal);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; z-index: 1;
  box-shadow: 0 2px 10px rgba(26,60,143,.12);
  animation: bubblePop .5s cubic-bezier(.34,1.56,.64,1) both;
}
.timeline-entry:nth-child(1) .timeline-bubble { animation-delay: .05s; }
.timeline-entry:nth-child(2) .timeline-bubble { animation-delay: .15s; }
.timeline-entry:nth-child(3) .timeline-bubble { animation-delay: .25s; }
.timeline-entry:nth-child(4) .timeline-bubble { animation-delay: .35s; }
.timeline-entry:nth-child(5) .timeline-bubble { animation-delay: .45s; }
.timeline-time {
  font-size: .72rem; color: var(--royal); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.timeline-body h3 { font-size: .95rem; font-weight: 600; margin-top: .1rem; }
.timeline-desc { font-size: .82rem; color: var(--text-secondary); margin-top: .15rem; line-height: 1.45; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-tertiary);
  background: transparent;
  animation: contentSlideUp .6s ease-out;
}
.empty-state svg { margin-bottom: 1rem; opacity: .35; animation: logoFloat 5s ease-in-out infinite; }
.empty-state p { margin-bottom: .3rem; font-size: .9rem; }
.empty-state .hint { font-size: .82rem; }

/* ============================================================
   FABs
   ============================================================ */
.fab-group {
  position: fixed; bottom: calc(1.5rem + var(--safe-bottom)); right: 1.25rem;
  display: flex; flex-direction: column; align-items: center; gap: .65rem; z-index: 90;
  animation: fabEntry .5s cubic-bezier(.34,1.56,.64,1) .3s both;
}
.fab {
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .25s ease;
}
.fab:active { transform: scale(.88); }
.fab-large {
  width: 62px; height: 62px;
  background: linear-gradient(135deg, var(--royal) 0%, var(--royal-light) 100%);
  color: #fff;
  box-shadow: var(--shadow-fab);
  animation: fabPulse 3s ease-in-out infinite;
}
.fab-large:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(26,60,143,.4);
}
.fab-small {
  width: 44px; height: 44px;
  background: var(--bg); color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, color .25s ease;
}
.fab-small:hover {
  border-color: var(--royal); color: var(--royal);
  transform: scale(1.06);
}

/* ============================================================
   CAMERA OVERLAY
   ============================================================ */
.camera-overlay {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; flex-direction: column;
  animation: overlayFadeIn .25s ease;
}
.camera-overlay video { flex: 1; width: 100%; object-fit: cover; }
.camera-close-btn {
  position: absolute; top: .85rem; left: .85rem; z-index: 10;
  background: rgba(0,0,0,.45); border: none; color: #fff; border-radius: 50%;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .15s, background .15s;
}
.camera-close-btn:hover { transform: scale(1.1); background: rgba(0,0,0,.6); }
.camera-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-around;
  padding: 1.5rem 2.5rem calc(1.75rem + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.camera-btn {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform .15s, background .15s;
}
.camera-btn:hover { transform: scale(1.08); background: rgba(255,255,255,.28); }
.shutter-btn {
  width: 74px; height: 74px; border-radius: 50%;
  background: transparent; border: 4px solid #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s;
}
.shutter-btn span {
  display: block; width: 58px; height: 58px; border-radius: 50%;
  background: #fff; transition: transform .15s ease;
}
.shutter-btn:active { transform: scale(.94); }
.shutter-btn:active span { transform: scale(.78); }

/* ============================================================
   PREVIEW
   ============================================================ */
.preview-overlay {
  position: fixed; inset: 0; z-index: 210; background: #0a0c14;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: overlayFadeIn .3s ease;
}
.preview-overlay img {
  max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 6px;
  animation: previewZoomIn .35s cubic-bezier(.34,1.2,.64,1);
}
.preview-controls { display: flex; gap: 1rem; margin-top: 1.75rem; padding-bottom: var(--safe-bottom); }
.preview-controls .btn { min-width: 130px; }
.preview-controls .btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,10,20,.96);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  animation: overlayFadeIn .25s ease;
}
.lightbox img {
  max-width: 100%; max-height: 85vh; object-fit: contain;
  animation: previewZoomIn .3s cubic-bezier(.34,1.1,.64,1);
}
.lightbox-meta { color: rgba(255,255,255,.55); font-size: .78rem; margin-top: .75rem; font-weight: 500; }
.lightbox-download-btn {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(1.5rem + var(--safe-bottom));
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px;
  background: rgba(255,255,255,.95); color: #111; border: none;
  font-size: .92rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  transition: transform .15s, background .15s;
}
.lightbox-download-btn:hover { transform: translateX(-50%) scale(1.04); }
.lightbox-download-btn:active { transform: translateX(-50%) scale(.97); }
.lightbox-download-btn:disabled { opacity: .6; cursor: progress; }
.lightbox-download-btn svg { stroke: #111; }

/* ============================================================
   SHARE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(20,24,40,.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  animation: overlayFadeIn .25s ease;
}
.modal {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.75rem;
  width: 100%; max-width: 360px; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp .35s cubic-bezier(.34,1.3,.64,1);
}
.modal h2 { margin-bottom: 1.25rem; font-size: 1.15rem; font-weight: 700; color: var(--royal); }
.qr-container { margin-bottom: 1rem; }
.qr-container img { width: 200px; height: 200px; border-radius: var(--radius-sm); }
.share-code {
  font-size: 1.8rem; font-weight: 700; letter-spacing: .18em;
  color: var(--royal); margin-bottom: 1rem;
}
.share-link-row { display: flex; gap: .5rem; }
.share-link-input {
  flex: 1; padding: .55rem .8rem; font-size: .82rem; font-family: var(--font);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text); outline: none;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: calc(6rem + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--royal), var(--royal-mid));
  color: #fff;
  padding: .65rem 1.4rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  z-index: 400; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(26,60,143,.3);
  animation: toastIn .4s cubic-bezier(.34,1.56,.64,1);
}

/* ============================================================
   WELCOME OVERLAY — animated gradient
   ============================================================ */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: linear-gradient(135deg, #ffffff 0%, #e8edf8 25%, #f0f3fa 50%, #dce4f5 75%, #ffffff 100%);
  background-size: 400% 400%;
  animation: gradientDrift 12s ease infinite;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  position: relative;
}
.welcome-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(26,60,143,.05) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 70%, rgba(59,109,230,.06) 0%, transparent 45%);
  pointer-events: none;
}
.welcome-card {
  width: 100%; max-width: 420px; text-align: center;
  position: relative; z-index: 1;
}
.welcome-card svg { animation: logoFloat 4s ease-in-out infinite; }
.welcome-card h1 {
  font-size: 1.85rem; font-weight: 700; margin-top: .6rem;
  letter-spacing: -.03em; color: var(--royal);
  animation: contentSlideUp .6s ease-out .1s both;
}
.welcome-subtitle {
  color: var(--text-secondary); font-size: .95rem; margin-top: .3rem; margin-bottom: 2.25rem; font-weight: 400;
  animation: contentSlideUp .6s ease-out .2s both;
}
.instructions {
  text-align: left; margin-bottom: 2.25rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.instruction-step {
  display: flex; align-items: flex-start; gap: .85rem;
  animation: contentSlideUp .5s ease-out both;
}
.instruction-step:nth-child(1) { animation-delay: .25s; }
.instruction-step:nth-child(2) { animation-delay: .35s; }
.instruction-step:nth-child(3) { animation-delay: .45s; }
.step-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--royal), var(--royal-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(26,60,143,.25);
}
.instruction-step p { font-size: .88rem; color: var(--text-secondary); line-height: 1.5; padding-top: 3px; }
.username-form {
  text-align: left;
  animation: contentSlideUp .5s ease-out .55s both;
}
.username-form label {
  display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); margin-bottom: .65rem; font-weight: 600;
}
.error-text { color: var(--danger); font-size: .82rem; margin-top: .5rem; font-weight: 500; }

/* ============================================================
   ORCHID DECORATION
   ============================================================ */
.orchid-scene {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orchid {
  position: absolute;
  bottom: 0;
}
.orchid img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 100%;
}
.orchid-1 { left: 2%; width: 150px; opacity: .3; }
.orchid-2 { right: 3%; width: 130px; opacity: .25; }
.orchid-2 img { transform: scaleX(-1); }
.orchid-3 { left: 32%; width: 100px; opacity: .18; }

.sway-1 { animation: windSway1 7s ease-in-out infinite; }
.sway-2 { animation: windSway2 9s ease-in-out infinite; }
.sway-3 { animation: windSway3 8s ease-in-out infinite; }

@keyframes windSway1 {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(1.5deg); }
  75% { transform: rotate(-1deg); }
}
@keyframes windSway2 {
  0%, 100% { transform: scaleX(-1) rotate(0deg); }
  30% { transform: scaleX(-1) rotate(-1.8deg); }
  70% { transform: scaleX(-1) rotate(1.2deg); }
}
@keyframes windSway3 {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(2deg); }
  60% { transform: rotate(-0.8deg); }
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-content { padding: 1.5rem; max-width: 640px; margin: 0 auto; }
.admin-section { margin-bottom: 2rem; }
.admin-section h2 {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); margin-bottom: .75rem; font-weight: 600;
}
.events-list { display: flex; flex-direction: column; gap: .85rem; }
.empty-hint { color: var(--text-tertiary); font-size: .88rem; text-align: center; padding: 1.5rem; }

.event-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s ease, transform .3s ease;
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.event-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .3rem; }
.event-card-header h3 { font-size: 1rem; font-weight: 700; }
.event-card-code {
  font-family: 'DM Sans', monospace; font-size: .82rem; color: var(--royal);
  letter-spacing: .1em; font-weight: 700;
}
.event-card-meta { font-size: .78rem; color: var(--text-tertiary); margin-bottom: .5rem; font-weight: 500; }
.feature-badges { display: flex; gap: .4rem; margin-bottom: .75rem; flex-wrap: wrap; }
.feature-badge {
  font-size: .68rem; padding: .2rem .55rem; border-radius: 999px;
  background: var(--royal-dim); color: var(--royal); font-weight: 700;
  letter-spacing: .02em;
}
.feature-badge-closed { background: #fde2e2; color: #b42318; }
.event-card-closed { opacity: .75; }
.event-card-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.event-card-actions a { text-decoration: none; }
.btn-danger {
  background: #fff; color: #b42318; border: 1px solid #fca5a5;
}
.btn-danger:hover { background: #fee2e2; border-color: #f87171; }
.closed-banner {
  margin: 0 1rem 1rem; padding: .75rem 1rem;
  background: #fde2e2; color: #7f1d1d;
  border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500;
  text-align: center;
}

.qr-display {
  margin-top: .85rem; text-align: center;
  padding: 1.25rem; background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  animation: contentSlideUp .3s ease-out;
}
.qr-display img { width: 200px; height: 200px; }
.qr-url { font-size: .72rem; color: var(--text-tertiary); margin-top: .5rem; word-break: break-all; }
.poster-buttons { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .85rem; }

/* ============================================================
   EVENT EDITOR (admin)
   ============================================================ */
.event-editor {
  margin-top: 1rem; border-top: 1px solid var(--border-light); padding-top: 1rem;
  animation: contentSlideUp .35s ease-out;
}
.editor-section { margin-bottom: 1.5rem; }
.editor-section h4 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); margin-bottom: .6rem; font-weight: 600;
}
.settings-toggles { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.settings-tagline { display: flex; flex-direction: column; gap: .35rem; margin-top: .85rem; }
.settings-tagline > span { font-size: .8rem; color: var(--text-tertiary); font-weight: 500; }
.toggle-label {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; cursor: pointer; color: var(--text); font-weight: 500;
  transition: color .15s;
}
.toggle-label:hover { color: var(--royal); }
.toggle-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--royal); cursor: pointer;
}

.editor-add-row {
  display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; align-items: center;
}
.editor-input {
  flex: 1; min-width: 80px; padding: .5rem .7rem; font-size: .82rem;
  font-family: var(--font);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.editor-input:focus { border-color: var(--royal); box-shadow: 0 0 0 2px var(--royal-dim); }
.editor-input::placeholder { color: var(--text-tertiary); }

.editor-items { display: flex; flex-direction: column; gap: .3rem; }
.editor-item-row {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem .7rem; background: var(--surface); border-radius: var(--radius-xs);
  font-size: .82rem; border: 1px solid var(--border-light);
  transition: background .15s;
}
.editor-item-row:hover { background: var(--surface-alt); }
.editor-item-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-delete {
  background: none; border: none; color: var(--danger); font-size: 1.1rem;
  cursor: pointer; padding: 0 .4rem; line-height: 1; flex-shrink: 0;
  transition: opacity .15s, transform .15s;
}
.btn-delete:hover { opacity: .6; transform: scale(1.15); }

/* ============================================================
   EMOJI PICKER
   ============================================================ */
.emoji-picker { position: relative; flex-shrink: 0; }
.emoji-trigger {
  width: 42px; height: 42px; font-size: 1.3rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, transform .15s;
}
.emoji-trigger:hover { border-color: var(--royal); transform: scale(1.06); }
.emoji-popup {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem;
  z-index: 50; box-shadow: var(--shadow-lg);
  width: 268px;
  animation: modalSlideUp .25s cubic-bezier(.34,1.3,.64,1);
}
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-option {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; cursor: pointer; border-radius: var(--radius-xs);
  transition: background .12s, transform .12s;
}
.emoji-option:hover { background: var(--royal-dim); transform: scale(1.2); }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes gradientDrift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gradientSlide {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes contentSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -100% 0; }
  40%, 100% { background-position: 200% 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes tilePopIn {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes itemSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bubblePop {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fabEntry {
  from { opacity: 0; transform: scale(0) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fabPulse {
  0%, 100% { box-shadow: var(--shadow-fab); }
  50% { box-shadow: 0 6px 28px rgba(26,60,143,.35), 0 2px 8px rgba(26,60,143,.15); }
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes previewZoomIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.9); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ============================================================
   RESPONSIVE — tablet & desktop enhancements
   ============================================================ */
@media (min-width: 480px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .photo-tile { border-radius: var(--radius-sm); }
}
@media (min-width: 768px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 5px; }
  .menu-list { padding: 1rem 1.5rem; }
  .timeline { padding-left: 5rem; }
}
@media (min-width: 1200px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
