/* ==========================================================
   hadir. — UI/UX Revision 2026
   Visual direction: soft motion, glass, rounded camera UI,
   minimal guest entry, and a consistent modern gallery.
========================================================== */

:root {
  --hadir-bg: #09090d;
  --hadir-panel: rgba(22, 22, 28, .76);
  --hadir-panel-strong: rgba(12, 12, 17, .92);
  --hadir-white: #f7f6f3;
  --hadir-muted: rgba(247, 246, 243, .58);
  --hadir-line: rgba(255, 255, 255, .12);
  --hadir-lilac: #d8d1ff;
  --hadir-blush: #e7c8d3;
}

body {
  background: var(--hadir-bg);
  color: var(--hadir-white);
}

.control-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.control-icon.dots-icon { fill: currentColor; stroke: none; }

/* ---------- Shared living background ---------- */
#splash-screen,
#welcome-screen {
  isolation: isolate;
  overflow: hidden;
  background: #0c0c11;
}

#splash-screen::before,
#welcome-screen::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -24%;
  background:
    radial-gradient(circle at 23% 22%, rgba(255,255,255,.52) 0 3%, rgba(220,219,232,.30) 11%, transparent 29%),
    radial-gradient(circle at 78% 72%, rgba(191,177,255,.40), transparent 28%),
    radial-gradient(circle at 30% 82%, rgba(224,187,203,.30), transparent 24%),
    radial-gradient(circle at 72% 27%, rgba(162,180,206,.24), transparent 25%),
    linear-gradient(145deg, #b7b6bc 0%, #5d5d68 24%, #1a1a21 53%, #777483 76%, #c6c1cf 100%);
  background-size: 140% 140%, 135% 135%, 150% 150%, 145% 145%, 180% 180%;
  filter: blur(22px) saturate(.78) brightness(.72);
  transform: scale(1.12);
  animation: hadirAmbient 13s ease-in-out infinite alternate;
}

#splash-screen::after,
#welcome-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7,7,11,.14), rgba(7,7,11,.46)),
    radial-gradient(ellipse at center, transparent 18%, rgba(7,7,10,.24) 74%, rgba(7,7,10,.46));
  pointer-events: none;
}

@keyframes hadirAmbient {
  0% { transform: scale(1.12) translate3d(-2%, -1%, 0) rotate(-1deg); background-position: 0% 15%, 100% 100%, 0% 100%, 100% 0%, 0% 50%; }
  48% { transform: scale(1.18) translate3d(2%, 1%, 0) rotate(1.2deg); background-position: 18% 0%, 82% 82%, 25% 75%, 72% 14%, 54% 50%; }
  100% { transform: scale(1.14) translate3d(-1%, 2%, 0) rotate(-.5deg); background-position: 8% 22%, 95% 74%, 12% 90%, 86% 8%, 100% 52%; }
}

/* ---------- Opening ---------- */
#splash-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}

#splash-screen .splash-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  animation: hadirSplashIn 1.15s cubic-bezier(.22,1,.36,1) both;
}

.splash-powered {
  color: rgba(255,255,255,.58);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

#splash-screen .brand-text {
  margin: 0;
  color: rgba(255,255,255,.94);
  font-family: var(--font-sans);
  font-size: clamp(38px, 12vw, 56px);
  font-weight: 680;
  letter-spacing: -.075em;
  line-height: .96;
  text-shadow: 0 12px 34px rgba(0,0,0,.25);
}

@keyframes hadirSplashIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---------- Welcome / Guest Entry ---------- */
#welcome-screen {
  align-items: stretch;
  justify-content: center;
  overflow-y: auto;
}

#welcome-screen.show { display: block; }

#welcome-screen .welcome-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 26px) 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
  display: flex;
  flex-direction: column;
  text-align: left;
  animation: none;
}

.welcome-brand {
  align-self: flex-start;
  color: rgba(255,255,255,.84);
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: 1;
}

.welcome-main {
  margin-top: clamp(92px, 18vh, 165px);
  max-width: 390px;
}

#welcome-screen .welcome-event-name {
  margin: 0 0 13px;
  color: rgba(255,255,255,.68);
  font-family: var(--font-sans);
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
}

#welcome-screen .welcome-content h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(44px, 12vw, 62px);
  font-weight: 500;
  line-height: .97;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 14px 40px rgba(0,0,0,.22);
}

#welcome-screen .login-card {
  margin-top: auto;
  padding-top: 52px;
  gap: 10px;
}

#welcome-screen .guest-name-label {
  padding-left: 3px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: .02em;
  text-transform: none;
}

#welcome-screen .guest-name-input {
  height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 19px;
  background: rgba(16,16,22,.38);
  color: #fff;
  font-size: 16px;
  font-weight: 520;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.10);
  backdrop-filter: blur(18px) saturate(1.1);
}

#welcome-screen .guest-name-input:focus {
  border-color: rgba(255,255,255,.42);
  background: rgba(19,19,25,.52);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}

#welcome-screen .guest-name-input::placeholder { color: rgba(255,255,255,.34); }

#welcome-screen .login-btn.primary-guest {
  height: 58px;
  border-radius: 19px;
  border: 0;
  background: rgba(250,249,247,.96);
  color: #111116;
  font-size: 14px;
  font-weight: 720;
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
}

#welcome-screen .login-btn.primary-guest:hover { background: #fff; transform: translateY(-1px); }
#welcome-screen .join-error { min-height: 16px; color: #ffd0c9; text-align: left; padding-left: 3px; }
#welcome-screen .backend-status.live { display: none !important; }
#welcome-screen .backend-status.demo,
#welcome-screen .backend-status.error {
  margin: auto 0 -35px;
  border-color: rgba(255,255,255,.12);
  background: rgba(12,12,18,.42);
  backdrop-filter: blur(14px);
}

.welcome-powered {
  margin: 11px 0 0;
  color: rgba(255,255,255,.34);
  font-size: 10px;
  text-align: center;
}
.welcome-powered strong { color: rgba(255,255,255,.62); font-weight: 650; }
#welcome-screen .install-app-btn { margin-top: 10px; }

/* ---------- Camera / Viewfinder ---------- */
#camera-view {
  background: #08080b;
}

#camera-view .app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 9px calc(env(safe-area-inset-bottom, 0px) + 9px);
  gap: 8px;
  background:
    radial-gradient(circle at 85% 4%, rgba(216,209,255,.08), transparent 28%),
    #08080b;
}

#camera-view .viewfinder-card {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 29px;
  overflow: hidden;
  background: #030304;
  box-shadow: 0 18px 44px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
}

#camera-view .viewfinder-card::after {
  border-radius: 29px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.045);
}

#camera-view .topbar {
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  left: 21px;
  right: 21px;
  min-height: 40px;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 9px;
  pointer-events: none;
}

#camera-view .topbar > * { pointer-events: auto; }

#camera-view .icon-btn,
#camera-view .topbar-flash,
#camera-view .flip-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: rgba(11,11,15,.42);
  color: rgba(255,255,255,.90);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.18);
  backdrop-filter: blur(16px) saturate(1.2);
}

#camera-view .topbar-flash { padding: 0; font-size: inherit; letter-spacing: 0; }
#camera-view .topbar-flash.on { color: #fff3b4; background: rgba(97,83,27,.32); }

#camera-view .event-title-wrap {
  justify-self: center;
  width: fit-content;
  max-width: min(64vw, 270px);
  padding: 7px 13px 6px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(10,10,14,.28);
  backdrop-filter: blur(14px);
}

#camera-view .event-title {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#camera-view .event-sub {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(255,255,255,.52);
  font-size: 8.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#camera-view .top-right-stack {
  align-self: start;
  gap: 6px;
}

#camera-view .card-scrim-top {
  height: 155px;
  background: linear-gradient(to bottom, rgba(0,0,0,.50), rgba(0,0,0,.12) 65%, transparent);
}

#camera-view .odometer-wrap { display: none; }
#camera-view .film-stamp { display: none; }

#camera-view .control-panel {
  flex: 0 0 auto;
  width: 100%;
  min-height: 148px;
  padding: 10px 17px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 27px;
  background:
    linear-gradient(150deg, rgba(34,34,41,.96), rgba(14,14,18,.98) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 36px rgba(0,0,0,.18);
}

#camera-view .zoom-row {
  margin: 0 0 7px;
}

#camera-view .zoom-pill {
  gap: 1px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
}

#camera-view .zoom-opt {
  min-width: 43px;
  padding: 6px 10px;
  color: rgba(255,255,255,.48);
  font-size: 11px;
}

#camera-view .zoom-opt.active {
  background: rgba(248,247,244,.94);
  color: #121217;
}

#camera-view .shutter-row {
  min-height: 84px;
  padding-top: 5px;
  border-top: 0;
}

#camera-view .side-control.left {
  align-items: center;
  justify-content: flex-start;
}

#camera-view .quota-summary {
  max-width: none;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.58);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#camera-view .quota-summary strong {
  color: rgba(255,255,255,.94);
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}

#camera-view .shutter-stack {
  display: grid;
  justify-items: center;
  gap: 6px;
}

#camera-view .shutter {
  width: 66px;
  height: 66px;
  border: 4px solid rgba(255,255,255,.18);
  background: rgba(251,250,248,.98);
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 4px rgba(216,209,255,.20), 0 10px 28px rgba(0,0,0,.28);
}

#camera-view .shutter:active { transform: scale(.92); }

#camera-view .capture-mode-label {
  color: rgba(255,255,255,.48);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .14em;
}

#camera-view .side-control.right { gap: 9px; }
#camera-view .mini-gallery { width: 42px; height: 42px; }
#camera-view .mini-gallery .stack-img,
#camera-view .mini-gallery .stack-empty {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

#camera-view .capture-preview {
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 72px;
  border-radius: 11px;
  overflow: hidden;
  padding: 3px;
}

/* ---------- Gallery ---------- */
#gallery-view {
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 2%, rgba(216,209,255,.10), transparent 29%),
    radial-gradient(circle at 2% 28%, rgba(231,200,211,.07), transparent 25%),
    #09090d;
  color: var(--hadir-white);
}

#gallery-view .page {
  position: relative;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 30px);
}

#gallery-view .gallery-topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  margin: 0 -2px 18px;
  padding: 3px 2px 7px;
  background: linear-gradient(to bottom, rgba(9,9,13,.92), rgba(9,9,13,.55), transparent);
  backdrop-filter: blur(8px);
}

#gallery-view .gallery-wordmark {
  color: rgba(255,255,255,.88);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -.055em;
  text-transform: none;
}

#gallery-view .gallery-hero {
  align-items: center;
  margin-bottom: 14px;
  padding: 19px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 40px rgba(0,0,0,.12);
  backdrop-filter: blur(18px);
}

#gallery-view .gallery-eyebrow {
  margin-bottom: 8px;
  color: rgba(216,209,255,.78);
  font-size: 8px;
  letter-spacing: .13em;
}

#gallery-view .gallery-title {
  max-width: 290px;
  color: #fff;
  font-size: clamp(32px, 9.2vw, 44px);
  line-height: .98;
}

#gallery-view .gallery-meta {
  margin-top: 13px;
  color: rgba(255,255,255,.48);
  font-size: 10px;
}

#gallery-view .gallery-meta span:nth-child(2) { background: rgba(216,209,255,.72); }

#gallery-view .avatar-thumb {
  width: 62px;
  height: 76px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 17px;
  transform: rotate(2deg);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}

#gallery-view .gallery-tabs {
  margin-bottom: 9px;
  padding: 4px;
  border-color: rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

#gallery-view .gallery-tab {
  padding: 11px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,.47);
}

#gallery-view .gallery-tab.active {
  background: rgba(249,248,246,.96);
  color: #111116;
}

#gallery-view .action-row {
  grid-template-columns: 44px 44px 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

#gallery-view .action-btn {
  height: 44px;
  border-radius: 16px;
  border-color: rgba(255,255,255,.09);
}

#gallery-view .action-btn.ghost { background: rgba(255,255,255,.055); }
#gallery-view .action-btn.primary { background: rgba(249,248,246,.96); }

#gallery-view .gallery-collection {
  padding-top: 15px;
  border-color: rgba(255,255,255,.07);
}

#gallery-view .collection-heading { margin-bottom: 11px; }

#gallery-view .photo-grid {
  gap: 8px;
}

#gallery-view .photo-card {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  overflow: hidden;
  background: #17171c;
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}

#gallery-view .photo-card-0,
#gallery-view .photo-card-3 { border-radius: 22px; }

#gallery-view .photo-tag {
  bottom: 10px;
  left: 11px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  background: rgba(8,8,12,.28);
  color: rgba(255,255,255,.86);
  backdrop-filter: blur(8px);
}

#gallery-view .empty-state {
  padding: 64px 24px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
}

#gallery-view .empty-state-mark { color: rgba(216,209,255,.72); }
#gallery-view .empty-state strong { font-size: 25px; }

/* ---------- Sheets / Settings ---------- */
.sheet {
  border-color: rgba(255,255,255,.10);
  border-radius: 30px 30px 0 0;
  background: linear-gradient(145deg, rgba(36,36,43,.98), rgba(15,15,20,.99));
}
.powered-by-row strong { color: rgba(255,255,255,.78); }

/* ---------- Smaller phones ---------- */
@media (max-height: 720px) {
  .welcome-main { margin-top: 58px; }
  #welcome-screen .login-card { padding-top: 34px; }
  #camera-view .control-panel { min-height: 132px; padding-top: 7px; padding-bottom: 8px; }
  #camera-view .shutter-row { min-height: 74px; }
  #camera-view .shutter { width: 60px; height: 60px; }
  #camera-view .quota-summary strong { font-size: 25px; }
}

@media (max-width: 360px) {
  #camera-view .event-title-wrap { max-width: 55vw; }
  #camera-view .quota-summary span { display: none; }
  #gallery-view .gallery-hero { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #splash-screen::before,
  #welcome-screen::before { animation: none !important; }
}

/* =========================================================
   hadir. Camera Engine v2 + Gallery v2
   ========================================================= */

/* Gallery cards are presentation crops only. Full/original files are untouched. */
#gallery-view .photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#gallery-view .photo-card,
#gallery-view .photo-card-0,
#gallery-view .photo-card-1,
#gallery-view .photo-card-2,
#gallery-view .photo-card-3,
#gallery-view .photo-card-4 {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: rgba(255,255,255,.055);
}

#gallery-view .photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Flash button means armed/on; the hardware light is not kept on continuously. */
#camera-view .topbar-flash.on {
  color: #fff6c7;
  background: rgba(151,123,30,.32);
  box-shadow: inset 0 0 0 1px rgba(255,239,164,.18);
}

#camera-view .topbar-flash:disabled {
  opacity: .32;
  cursor: not-allowed;
}

/* Pre-capture screen flash fallback (primarily useful for front camera). */
#camera-view .capture-flash.pre-fire {
  opacity: .92;
  transition: opacity 70ms linear;
}

/* Lens pills only contain capabilities that the browser/device exposes. */
#camera-view .zoom-pill:has(.zoom-opt:only-child) {
  min-width: 54px;
}

#camera-view .zoom-opt {
  min-width: 40px;
}

/* ---------- Camera Engine v5.2: tap focus + unified review ---------- */
#camera-view .focus-ring {
  position: absolute;
  z-index: 18;
  width: 70px;
  height: 70px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.28);
  border: 1.5px solid rgba(255,255,255,.92);
  border-radius: 17px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.24), 0 4px 18px rgba(0,0,0,.12);
  transition: opacity .18s ease, transform .22s cubic-bezier(.22,1,.36,1), border-color .18s ease;
}
#camera-view .focus-ring::before,
#camera-view .focus-ring::after,
#camera-view .focus-ring span::before,
#camera-view .focus-ring span::after {
  content: "";
  position: absolute;
  background: currentColor;
  color: rgba(255,255,255,.94);
}
#camera-view .focus-ring::before { width: 1px; height: 9px; left: 50%; top: -5px; }
#camera-view .focus-ring::after { width: 1px; height: 9px; left: 50%; bottom: -5px; }
#camera-view .focus-ring span::before { width: 9px; height: 1px; top: 50%; left: -5px; }
#camera-view .focus-ring span::after { width: 9px; height: 1px; top: 50%; right: -5px; }
#camera-view .focus-ring.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#camera-view .focus-ring.focused { border-color: rgba(255,255,255,.96); }
#camera-view .focus-ring.unsupported { border-style: dashed; opacity: .72; }

#camera-view .photo-review {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  overflow: auto;
  background:
    radial-gradient(circle at 80% 0%, rgba(191,177,255,.08), transparent 30%),
    #08080b;
  transition: opacity .18s ease, visibility .18s ease;
}
#camera-view .photo-review.open { visibility: visible; opacity: 1; pointer-events: auto; }
#camera-view .photo-review-shell {
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 10px calc(env(safe-area-inset-bottom, 0px) + 12px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}
#camera-view .photo-review-topbar {
  min-height: 58px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 21px;
  background: rgba(24,24,30,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter: blur(16px) saturate(1.1);
}
#camera-view .photo-review-brand {
  color: rgba(255,255,255,.94);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.055em;
}
#camera-view .photo-review-heading { min-width: 0; display: grid; gap: 2px; }
#camera-view .photo-review-heading strong {
  overflow: hidden;
  color: rgba(255,255,255,.90);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#camera-view .photo-review-heading span {
  color: rgba(255,255,255,.42);
  font-size: 9px;
}
#camera-view .photo-review-heading b { color: rgba(255,255,255,.82); font-weight: 700; }
#camera-view .photo-review-film {
  position: static;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.58);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
#camera-view .photo-review-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 29px;
  background: #030304;
  box-shadow: 0 18px 44px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.04);
}
#camera-view #photo-review-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #030304;
}
#camera-view .photo-review-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.06), transparent 24%, transparent 75%, rgba(0,0,0,.12));
}
#camera-view .photo-review-panel {
  padding: 14px 14px 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 27px;
  background: linear-gradient(150deg, rgba(34,34,41,.96), rgba(14,14,18,.98) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 36px rgba(0,0,0,.18);
}
#camera-view .photo-review-kicker {
  margin: 0 0 11px;
  color: rgba(255,255,255,.50);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: .02em;
  text-align: center;
}
#camera-view .photo-review-actions {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.6fr);
  gap: 10px;
}
#camera-view .review-action {
  min-height: 58px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 19px;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
#camera-view .review-action svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#camera-view .review-action span {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
}
#camera-view .review-delete {
  width: auto;
  height: auto;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.86);
}
#camera-view .review-keep {
  width: auto;
  height: auto;
  border: 0;
  background: rgba(250,249,247,.97);
  color: #111116;
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
}
#camera-view .review-keep svg { width: 19px; height: 19px; stroke-width: 1.9; }
#camera-view .review-action:active { transform: scale(.975); }
#camera-view .review-action:disabled { opacity: .45; cursor: wait; }
#camera-view .review-queue-hint {
  margin: 10px 2px 0;
  color: rgba(255,255,255,.30);
  font-size: 8.5px;
  line-height: 1.35;
  text-align: center;
}
@media (max-height: 700px) {
  #camera-view .photo-review-shell { gap: 7px; padding-top: calc(env(safe-area-inset-top, 0px) + 7px); }
  #camera-view .photo-review-topbar { min-height: 50px; }
  #camera-view .photo-review-panel { padding-top: 10px; padding-bottom: 10px; }
  #camera-view .review-action { min-height: 52px; }
}

/* ---------- Camera Engine v5.2: upload popup ---------- */
.global-upload-progress {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  right: 12px;
  z-index: 1000;
  min-height: 58px;
  padding: 11px 13px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(21,21,26,.90);
  color: rgba(255,255,255,.94);
  box-shadow: 0 14px 38px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  font: inherit;
  text-align: left;
  opacity: 0;
  transform: translateY(-18px) scale(.985);
  pointer-events: none;
  transition: opacity .22s ease, transform .28s cubic-bezier(.22,1,.36,1);
}
.global-upload-progress[hidden] { display: none !important; }
.global-upload-progress.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.global-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.2;
}
.global-upload-progress-head strong {
  flex: 0 0 auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.52);
}
.global-upload-progress-track {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}
.global-upload-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(250,249,247,.96);
  transition: width .16s linear;
}
.global-upload-progress.failed { border-color: rgba(255,110,110,.22); cursor: pointer; }
.global-upload-progress.failed .global-upload-progress-bar { background: #ff7777; }
.global-upload-progress.offline .global-upload-progress-bar { background: #d4ad63; }
.global-upload-progress.complete .global-upload-progress-bar { background: #72d19e; }
@media (min-width: 600px) {
  .global-upload-progress { left: 50%; right: auto; width: min(440px, calc(100vw - 24px)); transform: translate(-50%, -18px) scale(.985); }
  .global-upload-progress.is-visible { transform: translate(-50%, 0) scale(1); }
}



/* ---------- Camera header composition refinement v5.2.1 ---------- */
#camera-view .topbar {
  display: block;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 18px;
  right: 18px;
  min-height: 48px;
  pointer-events: none;
}

#camera-view .camera-context-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 50px;
  min-width: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18,18,24,.58), rgba(8,8,12,.38));
  box-shadow: 0 10px 28px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  pointer-events: auto;
}

#camera-view .camera-context-bar .context-close-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 0;
  background: rgba(255,255,255,.055);
  box-shadow: none;
}

#camera-view .camera-context-bar .context-close-btn:active {
  background: rgba(255,255,255,.11);
}

#camera-view .camera-context-bar .event-title-wrap {
  justify-self: stretch;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: center;
}

#camera-view .camera-context-bar .event-title {
  font-size: 13.5px;
  font-weight: 680;
  line-height: 1.12;
  text-shadow: 0 1px 8px rgba(0,0,0,.52);
}

#camera-view .camera-context-bar .event-sub {
  margin-top: 2px;
  font-size: 8.5px;
  line-height: 1.1;
  color: rgba(255,255,255,.58);
  text-shadow: 0 1px 7px rgba(0,0,0,.48);
}

#camera-view .context-balance-spacer {
  width: 38px;
  height: 38px;
  pointer-events: none;
}

#camera-view .top-right-stack {
  position: absolute;
  top: 0;
  right: 0;
  align-self: auto;
  pointer-events: auto;
}

@media (max-width: 380px) {
  #camera-view .topbar { left: 14px; right: 14px; }
  #camera-view .camera-context-bar { right: 47px; }
  #camera-view .camera-context-bar .event-title { font-size: 12.5px; }
  #camera-view .camera-context-bar .event-sub { font-size: 8px; }
}


/* ---------- Camera header composition refinement v5.2.2 ----------
   Close, event identity, and flash are separate elements sharing the same top alignment. */
#camera-view .topbar {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: start;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 18px;
  right: 18px;
  min-height: 40px;
  gap: 9px;
  pointer-events: none;
}

#camera-view .camera-context-bar,
#camera-view .context-balance-spacer {
  display: none !important;
}

#camera-view .topbar-close-btn {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  width: 40px;
  height: 40px;
  min-width: 40px;
  pointer-events: auto;
}

#camera-view .topbar > .event-title-wrap {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: center;
  width: fit-content;
  max-width: min(58vw, 250px);
  min-width: 0;
  margin: 0;
  padding: 6px 12px 5px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  background: rgba(10,10,14,.34);
  box-shadow: 0 7px 20px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  text-align: center;
  pointer-events: auto;
}

#camera-view .topbar > .event-title-wrap .event-title {
  font-size: 13px;
  font-weight: 680;
  line-height: 1.12;
}

#camera-view .topbar > .event-title-wrap .event-sub {
  margin-top: 2px;
  font-size: 8.25px;
  line-height: 1.08;
  color: rgba(255,255,255,.58);
}

#camera-view .top-right-stack {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

#camera-view .top-right-stack > :first-child {
  margin-top: 0;
}

@media (max-width: 380px) {
  #camera-view .topbar {
    top: calc(env(safe-area-inset-top, 0px) + 5px);
    left: 14px;
    right: 14px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 7px;
  }
  #camera-view .topbar-close-btn { width: 38px; height: 38px; min-width: 38px; }
  #camera-view .topbar > .event-title-wrap { max-width: 57vw; padding: 6px 10px 5px; }
  #camera-view .topbar > .event-title-wrap .event-title { font-size: 12.5px; }
  #camera-view .topbar > .event-title-wrap .event-sub { font-size: 8px; }
}

/* Data Platform v1: graceful event expiry + privacy-aware analytics consent */
.event-ended-screen {
  display:none; min-height:100dvh; padding:24px; align-items:center; justify-content:center;
  background:radial-gradient(circle at 50% 18%,rgba(170,135,92,.16),transparent 34%),#0b0b0d;
  color:#f5f2ee;
}
.event-ended-card { width:min(520px,100%); padding:34px 26px; text-align:center; border:1px solid rgba(255,255,255,.1); border-radius:28px; background:rgba(22,22,24,.88); box-shadow:0 28px 70px rgba(0,0,0,.3); }
.event-ended-brand { display:block; font-family:Georgia,serif; font-size:28px; margin-bottom:34px; }
.event-ended-eyebrow { color:#d8b882; font-size:10px; font-weight:800; letter-spacing:.18em; }
.event-ended-card h2 { margin:12px 0 12px; font-family:Georgia,serif; font-size:clamp(30px,8vw,46px); font-weight:500; line-height:1.05; }
.event-ended-card p { color:rgba(255,255,255,.58); line-height:1.65; }
.event-ended-tagline { margin-top:34px; font-size:12px; letter-spacing:.08em; color:rgba(255,255,255,.72); }
.analytics-consent { position:fixed; z-index:4000; left:50%; bottom:max(18px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(560px,calc(100% - 28px)); padding:16px; gap:14px; align-items:center; border:1px solid rgba(255,255,255,.12); border-radius:18px; background:rgba(20,20,22,.96); color:#f5f2ee; box-shadow:0 24px 60px rgba(0,0,0,.4); backdrop-filter:blur(18px); }
.analytics-consent:not([hidden]) { display:flex; }
.analytics-consent strong { font-size:13px; }
.analytics-consent p { margin:5px 0 0; color:rgba(255,255,255,.55); font-size:11px; line-height:1.45; }
.analytics-consent-actions { display:flex; gap:8px; flex:0 0 auto; }
.analytics-consent button { border:1px solid rgba(255,255,255,.12); border-radius:10px; min-height:38px; padding:0 12px; background:rgba(255,255,255,.05); color:#f5f2ee; font-weight:700; }
#analytics-consent-yes { background:#f3eee7; color:#171515; }
@media(max-width:560px){ .analytics-consent { align-items:stretch; flex-direction:column; } .analytics-consent-actions { justify-content:flex-end; } }

.event-ended-screen.show { display:flex; }

/* =======================================================
   Brand Voice v1 — minimal editorial copy
======================================================= */
#splash-screen .splash-content{gap:0;max-width:320px;padding:0 26px}
.splash-brand-line{margin:24px 0 0;color:rgba(255,255,255,.78);font-family:var(--font-display);font-size:clamp(18px,5vw,24px);font-weight:450;line-height:1.22;letter-spacing:-.025em;text-wrap:balance}
.splash-product-line{margin-top:14px;color:rgba(255,255,255,.38);font-size:9px;font-weight:600;letter-spacing:.10em;text-transform:uppercase}

#welcome-screen .welcome-guest-line{margin:24px 0 0;max-width:300px;color:rgba(255,255,255,.54);font-family:var(--font-sans);font-size:12px!important;font-weight:500;line-height:1.55;letter-spacing:-.005em}

.camera-brand-whisper{height:0;position:relative;z-index:8;margin:0 auto;top:15px;color:rgba(255,255,255,.0);font-size:10px;font-weight:550;letter-spacing:.02em;text-align:center;pointer-events:none;transform:translateY(-4px);transition:opacity .55s ease,transform .55s ease,color .55s ease;opacity:0}
.camera-brand-whisper.show{opacity:1;color:rgba(255,255,255,.54);transform:translateY(0)}

#gallery-view .gallery-brand-line{margin:17px 0 0;max-width:260px;color:rgba(255,255,255,.58);font-family:var(--font-display);font-size:12px;line-height:1.45;letter-spacing:-.015em}
#gallery-view .gallery-brand-line span{color:rgba(216,209,255,.78);font-family:var(--font-sans);font-size:9px;font-weight:650;letter-spacing:.035em}

@media(max-width:430px){
  .splash-brand-line{font-size:20px}
  #welcome-screen .welcome-guest-line{margin-top:20px;font-size:11px!important}
  #gallery-view .gallery-brand-line{font-size:11px}
}

/* =========================================================
   hadir. Gallery Layout Refinement v2.7
   ========================================================= */
#gallery-view .gallery-brand-line{
  margin:12px 0 0;
  max-width:280px;
  color:rgba(255,255,255,.54);
  font-size:11px;
  line-height:1.55;
  letter-spacing:-.01em;
}
#gallery-view .gallery-brand-line span{display:block;color:rgba(255,255,255,.78)}

#gallery-view .gallery-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  margin-bottom:12px;
}

#gallery-view .gallery-action-row{
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  grid-template-areas:
    "quick upload"
    "capture capture";
  gap:10px;
  align-items:stretch;
  margin-bottom:24px;
}
#gallery-view .gallery-quick-actions{
  grid-area:quick;
  display:grid;
  grid-template-columns:repeat(2,40px);
  gap:8px;
}
#gallery-view .gallery-action-row .upload-action{grid-area:upload}
#gallery-view .gallery-action-row .capture-action{grid-area:capture}
#gallery-view .gallery-action-row .action-btn{
  min-width:0;
  white-space:nowrap;
}
#gallery-view .gallery-action-row .compact-action{
  width:40px;
  height:44px;
  padding:0;
}
#gallery-view .gallery-action-row .upload-action,
#gallery-view .gallery-action-row .capture-action{
  height:44px;
  padding:0 16px;
  justify-content:center;
  border-radius:16px;
  font-size:13px;
  font-weight:650;
  letter-spacing:-.01em;
}
#gallery-view .gallery-action-row .upload-action{
  background:rgba(255,255,255,.055);
  color:rgba(255,255,255,.88);
}
#gallery-view .gallery-action-row .capture-action{
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}

#gallery-view .gallery-collection{
  min-height:220px;
}
#gallery-view .collection-heading{
  margin-bottom:14px;
}
#gallery-view .empty-state{
  min-height:220px;
  align-content:center;
  justify-items:center;
  gap:10px;
  padding:40px 26px;
  text-align:center;
}
#gallery-view .empty-state-mark{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border-radius:50%;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.09);
  font-size:24px;
  line-height:1;
}
#gallery-view .empty-state strong{
  max-width:240px;
  font-size:21px;
  line-height:1.12;
  letter-spacing:-.03em;
}
#gallery-view .empty-state p{
  max-width:250px;
  color:rgba(255,255,255,.58);
  font-size:12px;
}

@media (max-width: 390px){
  #gallery-view .gallery-action-row{
    grid-template-columns:1fr;
    grid-template-areas:
      "quick"
      "upload"
      "capture";
  }
  #gallery-view .gallery-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #gallery-view .gallery-action-row .compact-action,
  #gallery-view .gallery-action-row .upload-action,
  #gallery-view .gallery-action-row .capture-action{
    width:100%;
  }
}

/* =========================================================
   hadir. Guest UI Polish v2.8
   ========================================================= */
#gallery-view .gallery-hero{
  margin-bottom:16px;
}
#gallery-view .gallery-meta{
  flex-wrap:wrap;
  row-gap:6px;
}
#gallery-view .gallery-brand-line{
  margin-top:12px;
  max-width:270px;
  color:rgba(255,255,255,.53);
  font-size:10.5px;
  line-height:1.55;
}
#gallery-view .gallery-brand-line span{color:rgba(255,255,255,.76)}
#gallery-view .collection-heading span:first-child{
  color:rgba(255,255,255,.88);
  font-size:12px;
  font-weight:680;
  letter-spacing:-.01em;
}

#camera-view .photo-review-panel{
  padding:15px 15px 14px;
}
#camera-view .photo-review-kicker{
  margin-bottom:12px;
  color:rgba(255,255,255,.46);
  font-size:10px;
  letter-spacing:.01em;
}
#camera-view .review-queue-hint{
  max-width:250px;
  margin-left:auto;
  margin-right:auto;
  color:rgba(255,255,255,.38);
  font-size:9px;
  line-height:1.45;
}

.sheet-title{
  letter-spacing:-.02em;
}
.sheet-note{
  color:rgba(255,255,255,.58);
  line-height:1.55;
}
.sheet-quota{
  color:rgba(255,255,255,.72);
}
.sheet-btn{
  min-height:48px;
  font-weight:650;
  letter-spacing:-.01em;
}
.sheet-btn.done{
  color:#111116;
}

/* =========================================================
   hadir. Camera Focus Honesty v2.9
   ========================================================= */
#camera-view .focus-status {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 17;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(7,7,10,.34);
  color: rgba(255,255,255,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  pointer-events: none;
}
#camera-view .focus-status span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.50);
}
#camera-view .focus-status b {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
#camera-view .focus-status[data-mode="tap"] {
  color: rgba(255,255,255,.88);
  border-color: rgba(255,255,255,.16);
}
#camera-view .focus-status[data-mode="tap"] span {
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

/* A focus ring is now success-only. No dashed "fake focus" state. */
#camera-view .focus-ring.unsupported { display: none !important; }

/* =========================================================
   hadir. Typography Refinement v3.0
   Quiet brand voice, logo-aligned sans typography
   ========================================================= */
html, body, button, input, select, textarea {
  font-family: var(--font-sans);
}

/* Splash: brand promise should whisper, not shout. */
#splash-screen .splash-content {
  max-width: 300px;
  padding-inline: 28px;
}
.splash-brand-line {
  max-width: 248px;
  margin: 18px auto 0;
  color: rgba(255,255,255,.66);
  font-family: var(--font-brand);
  font-size: clamp(13px,3.7vw,15px);
  font-weight: 500;
  line-height: 1.52;
  letter-spacing: -.012em;
}
.splash-product-line {
  margin-top: 10px;
  color: rgba(255,255,255,.32);
  font-family: var(--font-brand);
  font-size: 7.5px;
  font-weight: 650;
  letter-spacing: .115em;
}

/* Guest welcome: keep the experience line compact and calm. */
#welcome-screen .welcome-content h2,
#welcome-screen .welcome-main h2 {
  font-family: var(--font-brand);
  font-size: clamp(29px,8.4vw,38px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.045em;
}
#welcome-screen .welcome-guest-line {
  max-width: 250px;
  margin-top: 16px;
  color: rgba(255,255,255,.48);
  font-family: var(--font-brand);
  font-size: 10.5px !important;
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: 0;
}

/* Camera copy is intentionally almost invisible until needed. */
.camera-brand-whisper {
  font-family: var(--font-brand);
  font-size: 8.5px;
  font-weight: 550;
  letter-spacing: .01em;
}

/* Gallery: event title remains editorial, brand quote becomes secondary metadata. */
#gallery-view .gallery-title {
  font-family: var(--font-brand);
  font-size: clamp(27px,7.8vw,35px);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -.045em;
}
#gallery-view .gallery-brand-line {
  max-width: 245px;
  margin-top: 9px;
  color: rgba(255,255,255,.46);
  font-family: var(--font-brand);
  font-size: 9.5px;
  font-weight: 480;
  line-height: 1.62;
  letter-spacing: 0;
}
#gallery-view .gallery-brand-line span {
  margin-top: 1px;
  color: rgba(255,255,255,.68);
  font-family: var(--font-brand);
  font-size: 8.5px;
  font-weight: 620;
  letter-spacing: .01em;
}
#gallery-view .empty-state strong {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 620;
  line-height: 1.2;
}
.sheet-title {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 650;
}

/* Event ended: retain emotion without becoming a poster headline. */
.event-ended-brand {
  margin-bottom: 24px;
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.045em;
}
.event-ended-card h2 {
  margin: 10px 0;
  font-family: var(--font-brand);
  font-size: clamp(22px,6vw,28px);
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: -.035em;
}
.event-ended-card p {
  font-size: 11px;
  line-height: 1.7;
}
.event-ended-tagline {
  margin-top: 24px;
  font-size: 9px;
  letter-spacing: .025em;
}

@media (max-width:430px) {
  .splash-brand-line { font-size: 13px; }
  #welcome-screen .welcome-guest-line { font-size: 10px !important; }
  #gallery-view .gallery-brand-line { font-size: 9px; }
}

/* =======================================================
   Splash refinement v3.1 — slower, quieter, more cinematic
======================================================= */
#splash-screen{
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
#splash-screen .splash-content{
  gap:0;
  max-width:310px;
  padding:0 28px 82px;
  animation:none;
}
#splash-screen .brand-text{display:none}

.splash-brand-line{
  position:relative;
  margin:0;
  max-width:272px;
  color:transparent;
  font-family:var(--font-brand);
  font-size:clamp(14px,4vw,16px);
  font-weight:520;
  line-height:1.55;
  letter-spacing:-.012em;
}
.splash-brand-line .brand-reveal,
.splash-product-line.brand-reveal,
.splash-footer .brand-reveal{
  display:block;
  opacity:0;
  clip-path:inset(0 100% 0 0);
  animation:brandRevealLeft .9s cubic-bezier(.22,1,.36,1) forwards;
}
.splash-brand-line .line-one{animation-delay:.28s}
.splash-brand-line .line-two{animation-delay:.72s}
.splash-product-line.brand-reveal{
  margin-top:14px;
  color:rgba(255,255,255,.34);
  font-family:var(--font-brand);
  font-size:7.5px;
  font-weight:650;
  letter-spacing:.14em;
  text-transform:uppercase;
  animation-delay:1.28s;
}
.splash-brand-line .line-one,
.splash-brand-line .line-two{color:rgba(255,255,255,.72)}

.splash-brand-line::after{
  content:"";
  position:absolute;
  inset:-8px -20px;
  background:linear-gradient(90deg, rgba(255,255,255,0) 8%, rgba(255,255,255,.02) 26%, rgba(255,255,255,.20) 48%, rgba(255,255,255,.02) 70%, rgba(255,255,255,0) 92%);
  transform:translateX(-135%);
  filter:blur(14px);
  pointer-events:none;
  animation:splashLightSweep 1.9s ease-out .42s 1 forwards;
}

.splash-footer{
  position:absolute;
  left:0;
  right:0;
  bottom:34px;
  z-index:2;
  display:grid;
  justify-items:center;
  gap:3px;
  padding:0 20px;
  text-align:center;
}
.splash-powered-label{
  color:rgba(255,255,255,.28);
  font-family:var(--font-brand);
  font-size:8px;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  animation-delay:1.62s;
}
.splash-powered-brand{
  color:rgba(255,255,255,.67);
  font-family:var(--font-brand);
  font-size:15px;
  font-weight:720;
  letter-spacing:-.04em;
  animation-delay:1.9s;
}

@keyframes brandRevealLeft{
  0%{opacity:0;clip-path:inset(0 100% 0 0);transform:translateY(3px)}
  100%{opacity:1;clip-path:inset(0 0 0 0);transform:translateY(0)}
}
@keyframes splashLightSweep{
  0%{opacity:0;transform:translateX(-140%)}
  15%{opacity:1}
  100%{opacity:.0;transform:translateX(140%)}
}

@media(max-width:430px){
  #splash-screen .splash-content{padding-bottom:88px}
  .splash-brand-line{font-size:14px}
  .splash-powered-brand{font-size:14px}
}

/* =======================================================
   Camera layout refinement v3.2 — fuller viewfinder + stronger dock
======================================================= */
#camera-view {
  width: 100vw;
  min-height: 100dvh;
  background: #07080c;
}
#camera-view .app {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 84% 8%, rgba(216,209,255,.08), transparent 26%),
    #08080b;
}
#camera-view .viewfinder-card {
  flex: 1 1 auto;
  width: 100%;
  min-height: calc(100dvh - 188px - env(safe-area-inset-bottom, 0px));
  border-radius: 0;
}
#camera-view .control-panel {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border-top: 1px solid rgba(255,255,255,.09);
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(18,18,22,.96), rgba(9,10,14,.98));
  box-shadow: 0 -12px 30px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
#camera-view .zoom-row {
  margin-bottom: 10px;
}
#camera-view .zoom-pill {
  background: rgba(255,255,255,.085);
  border: 1px solid rgba(255,255,255,.06);
}
#camera-view .shutter-row {
  min-height: 92px;
  padding-top: 12px;
  gap: 12px;
  grid-template-columns: minmax(118px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
}
#camera-view .side-control.left,
#camera-view .side-control.right {
  min-height: 72px;
}
#camera-view .side-control.left {
  align-items: center;
}
#camera-view .quota-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  min-width: 116px;
  min-height: 58px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  color: rgba(255,255,255,.54);
}
#camera-view .quota-summary strong {
  color: rgba(255,255,255,.94);
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 720;
}
#camera-view .quota-summary span {
  display: block;
  color: rgba(255,255,255,.60);
  font-size: 9px;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#camera-view .shutter-stack {
  display: grid;
  justify-items: center;
  gap: 5px;
}
#camera-view .capture-mode-label {
  color: rgba(255,255,255,.44);
  font-size: 10px;
  letter-spacing: .08em;
}
#camera-view .flip-btn,
#camera-view .mini-gallery {
  width: 46px;
  height: 46px;
}
#camera-view .mini-gallery .stack-img,
#camera-view .mini-gallery .stack-empty {
  width: 42px;
  height: 42px;
}
#camera-view .shutter {
  width: 72px;
  height: 72px;
}
@media (max-width: 430px) {
  #camera-view .viewfinder-card {
    min-height: calc(100dvh - 176px - env(safe-area-inset-bottom, 0px));
  }
  #camera-view .control-panel {
    padding-inline: 14px;
    border-radius: 22px 22px 0 0;
  }
  #camera-view .shutter-row {
    grid-template-columns: minmax(108px, 1fr) auto minmax(84px, 1fr);
    gap: 10px;
  }
  #camera-view .quota-summary {
    min-width: 108px;
    min-height: 54px;
    padding: 9px 10px 9px 12px;
  }
  #camera-view .quota-summary strong { font-size: 17px; }
}
#camera-view, #gallery-view {
  max-width: none;
  margin: 0;
  box-shadow: none;
}

/* =======================================================
   Camera layout refinement v3.3 — reference-led full viewfinder
======================================================= */
#camera-view {
  width: 100%;
  min-height: 100dvh;
  background: #050609;
}
#camera-view .app {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-radius: 26px;
  background: #07080b;
}
#camera-view .viewfinder-card {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 26px 26px 0 0;
  overflow: hidden;
  background: #030405;
  box-shadow: none;
}
#camera-view .viewfinder-card::after {
  border-radius: 26px 26px 0 0;
}
#camera-view .control-panel {
  position: relative;
  flex: 0 0 132px;
  width: 100%;
  min-height: 132px;
  margin: 0;
  padding: 14px 17px calc(env(safe-area-inset-bottom, 0px) + 13px);
  display: flex;
  justify-content: center;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.075);
  border-radius: 0 0 26px 26px;
  background: linear-gradient(180deg, #0b0c0f 0%, #090a0d 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

/* Zoom floats over the live image, similar to a native camera. */
#camera-view .zoom-row {
  position: absolute;
  z-index: 15;
  left: 0;
  right: 0;
  bottom: calc(132px + env(safe-area-inset-bottom, 0px) + 14px);
  margin: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
#camera-view .zoom-pill {
  pointer-events: auto;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(17,17,20,.58);
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
}
#camera-view .zoom-opt {
  min-width: 36px;
  padding: 6px 10px;
  font-size: 11px;
}

#camera-view .shutter-row {
  width: 100%;
  min-height: 88px;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: minmax(104px,1fr) auto minmax(92px,1fr);
  align-items: center;
  gap: 12px;
}
#camera-view .side-control.left,
#camera-view .side-control.right {
  min-height: 70px;
}

/* Remaining-shot counter: stronger hierarchy, less empty container chrome. */
#camera-view .quota-summary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: start;
  column-gap: 8px;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 0 0 2px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255,255,255,.58);
}
#camera-view .quota-summary strong {
  color: rgba(255,255,255,.96);
  font-family: var(--font-brand);
  font-size: 30px;
  line-height: .9;
  font-weight: 720;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
#camera-view .quota-summary span {
  display: block;
  padding-bottom: 1px;
  color: rgba(255,255,255,.72);
  font-family: var(--font-brand);
  font-size: 8px;
  line-height: 1.08;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .045em;
}

#camera-view .shutter-stack {
  display: grid;
  justify-items: center;
  gap: 5px;
}
#camera-view .shutter {
  width: 72px;
  height: 72px;
  border: 0;
  background: rgba(250,250,248,.96);
  box-shadow:
    0 0 0 3px rgba(255,255,255,.95) inset,
    0 0 0 4px rgba(117,133,255,.46),
    0 8px 24px rgba(0,0,0,.28);
}
#camera-view .capture-mode-label {
  font-size: 9px;
  color: rgba(255,255,255,.37);
}
#camera-view .side-control.right {
  gap: 12px;
}
#camera-view .flip-btn {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.10);
}
#camera-view .mini-gallery {
  width: 48px;
  height: 48px;
}
#camera-view .mini-gallery .stack-img,
#camera-view .mini-gallery .stack-empty {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

@media (max-width: 430px) {
  #camera-view .app { border-radius: 24px; }
  #camera-view .viewfinder-card,
  #camera-view .viewfinder-card::after { border-radius: 24px 24px 0 0; }
  #camera-view .control-panel {
    flex-basis: 124px;
    min-height: 124px;
    padding: 12px 14px calc(env(safe-area-inset-bottom, 0px) + 11px);
    border-radius: 0 0 24px 24px;
  }
  #camera-view .zoom-row {
    bottom: calc(124px + env(safe-area-inset-bottom, 0px) + 12px);
  }
  #camera-view .shutter-row {
    min-height: 82px;
    grid-template-columns: minmax(96px,1fr) auto minmax(82px,1fr);
    gap: 9px;
  }
  #camera-view .quota-summary strong { font-size: 28px; }
  #camera-view .quota-summary span { font-size: 7.5px; }
  #camera-view .shutter { width: 68px; height: 68px; }
}

@media (min-width: 600px) {
  #camera-view {
    display: grid;
    place-items: center;
    background: #050609;
  }
  #camera-view .app {
    height: min(100dvh, 980px);
    min-height: min(100dvh, 720px);
  }
}

/* =======================================================
   HADIR Film Engine v2.1 — clean viewfinder, post-shutter developing ritual
======================================================= */
#camera-view #video {
  filter: none !important;
}

#camera-view .film-developing {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,224,166,.08), transparent 32%),
    rgba(5,5,8,.48);
  backdrop-filter: blur(10px) saturate(.82);
  -webkit-backdrop-filter: blur(10px) saturate(.82);
  transition: opacity .18s ease, visibility .18s ease;
}
#camera-view .film-developing.show {
  opacity: 1;
  visibility: visible;
}
#camera-view .film-developing-card {
  width: min(240px, 74vw);
  padding: 20px 20px 18px;
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 23px;
  background: rgba(14,14,18,.68);
  box-shadow: 0 18px 50px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.05);
  text-align: center;
}
#camera-view .film-developing-kicker {
  color: rgba(255,255,255,.34);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#camera-view .film-developing-card strong {
  color: rgba(255,255,255,.94);
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.035em;
}
#camera-view .film-developing-status {
  min-height: 16px;
  color: rgba(255,255,255,.56);
  font-size: 10px;
  line-height: 1.4;
}
#camera-view .film-developing-track {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
#camera-view .film-developing-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,220,157,.08), rgba(255,235,197,.72), rgba(255,220,157,.08));
  animation: hadirFilmDeveloping 1.08s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes hadirFilmDeveloping {
  from { transform: translateX(-115%); }
  to { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
  #camera-view .film-developing-track i { animation-duration: 2.4s; }
}

/* =======================================================
   Camera redesign v4.4 — reference-inspired disposable layout
   Inspired by the provided composition, but branded for hadir.
======================================================= */
#camera-view {
  width: 100%;
  min-height: 100dvh;
  background: #000;
}
#camera-view .camera-inspired-shell.app {
  max-width: 520px;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
}
#camera-view .viewfinder-card {
  position: relative;
  width: calc(100% - 34px);
  margin: calc(env(safe-area-inset-top, 0px) + 18px) auto 0;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #090b10;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05) inset;
}
#camera-view .viewfinder-card::after {
  display: none;
}
#camera-view .camera-ui-topbar {
  position: absolute;
  z-index: 18;
  top: 16px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: start;
  column-gap: 10px;
  pointer-events: none;
}
#camera-view .camera-ui-topbar > * { pointer-events: auto; }
#camera-view .camera-ui-topbar .icon-btn,
#camera-view .tool-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(14,16,20,.38);
  color: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
#camera-view .camera-ui-topbar .event-title-wrap {
  justify-self: center;
  max-width: min(72vw, 280px);
  padding: 7px 14px 8px;
  border-radius: 18px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(33,36,44,.58), rgba(16,18,23,.32));
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
}
#camera-view .camera-ui-topbar .event-title {
  color: rgba(255,255,255,.96);
  font-size: 13px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -.02em;
}
#camera-view .camera-ui-topbar .event-sub {
  margin-top: 2px;
  color: rgba(255,255,255,.66);
  font-size: 9px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: .01em;
}
#camera-view .camera-lens-header {
  position: absolute;
  z-index: 17;
  top: 88px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,.98);
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.03em;
}
#camera-view .camera-frame-guide {
  position: absolute;
  z-index: 15;
  left: 14%;
  right: 14%;
  top: 152px;
  bottom: 104px;
  border-radius: 28px;
  border: 2px solid rgba(255,255,255,.86);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  pointer-events: none;
}
#camera-view .camera-lens-pill {
  position: absolute;
  z-index: 18;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(15,17,22,.46);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
#camera-view .lens-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 700;
}
#camera-view .lens-chip-primary { background: rgba(255,255,255,.12); }
#camera-view .lens-chip-zoom { background: rgba(255,255,255,.08); }
#camera-view .lens-chip-auto { color: rgba(255,255,255,.78); background: rgba(255,255,255,.04); min-width: 24px; }

#camera-view .control-panel.camera-inspired-panel {
  flex: 0 0 auto;
  width: 100%;
  min-height: 174px;
  padding: 16px 18px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  justify-content: flex-start;
}
#camera-view .tool-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin-bottom: 12px;
}
#camera-view .tool-row .tool-btn svg,
#camera-view .camera-ui-topbar .icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}
#camera-view #flash-btn.on {
  color: #fff5b7;
  border-color: rgba(255,241,170,.25);
  background: rgba(104,88,25,.36);
}
#camera-view .zoom-row {
  position: static;
  z-index: auto;
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
  pointer-events: auto;
}
#camera-view .zoom-pill {
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#camera-view .zoom-opt {
  min-width: 40px;
  padding: 7px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.70);
}
#camera-view .zoom-opt.active {
  color: rgba(18,18,20,.96);
  background: rgba(255,255,255,.92);
}
#camera-view .shutter-row {
  width: 100%;
  min-height: 90px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
}
#camera-view .side-control.left,
#camera-view .side-control.right {
  min-height: 86px;
  display: flex;
  align-items: flex-end;
}
#camera-view .side-control.left {
  justify-content: flex-start;
  gap: 12px;
}
#camera-view .side-control.right {
  justify-content: flex-end;
}
#camera-view .mini-gallery {
  order: 1;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
#camera-view .mini-gallery .stack-img,
#camera-view .mini-gallery .stack-empty {
  width: 54px;
  height: 54px;
  border-radius: 13px;
}
#camera-view .quota-summary {
  order: 2;
  display: grid;
  grid-template-columns: auto;
  justify-items: start;
  align-content: end;
  gap: 2px;
  padding: 0 0 4px;
  color: rgba(255,255,255,.76);
}
#camera-view .quota-summary strong {
  font-size: 34px;
  line-height: .88;
  letter-spacing: -.06em;
  color: rgba(255,255,255,.96);
}
#camera-view .quota-summary span {
  font-size: 8px;
  line-height: 1.06;
  letter-spacing: .06em;
  color: rgba(255,255,255,.78);
}
#camera-view .shutter-stack {
  gap: 8px;
}
#camera-view .shutter {
  width: 88px;
  height: 88px;
  background: rgba(250,250,248,.98);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.94) inset,
    0 0 0 5px rgba(255,255,255,.14),
    0 10px 24px rgba(0,0,0,.28);
}
#camera-view .capture-mode-label {
  color: rgba(255,255,255,.34);
  font-size: 10px;
  letter-spacing: .09em;
}
#camera-view .camera-brand-badge {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(99,90,255,.24), rgba(14,17,24,.84));
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
#camera-view .camera-brand-badge::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 44%);
}
#camera-view .camera-brand-badge-mark {
  position: absolute;
  top: 9px;
  left: 10px;
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.90);
}
#camera-view .camera-brand-badge-word {
  position: absolute;
  bottom: 10px;
  left: 9px;
  right: 9px;
  font-family: var(--font-brand);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  color: rgba(255,255,255,.96);
  letter-spacing: -.03em;
}
#camera-view .focus-status {
  left: 20px;
  bottom: 18px;
  z-index: 17;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(9,10,14,.36);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#camera-view .focus-status b {
  color: rgba(255,255,255,.76);
}
#camera-view .focus-ring {
  z-index: 16;
}

@media (max-width: 430px) {
  #camera-view .viewfinder-card {
    width: calc(100% - 28px);
    margin-top: calc(env(safe-area-inset-top, 0px) + 14px);
    border-radius: 26px;
  }
  #camera-view .camera-frame-guide {
    left: 13.5%;
    right: 13.5%;
    top: 142px;
    bottom: 96px;
    border-radius: 24px;
  }
  #camera-view .camera-ui-topbar .event-title-wrap {
    max-width: 62vw;
    padding: 6px 12px 7px;
  }
  #camera-view .camera-lens-header { top: 84px; }
  #camera-view .camera-lens-pill { bottom: 18px; }
  #camera-view .control-panel.camera-inspired-panel {
    min-height: 166px;
    padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  }
  #camera-view .tool-row { gap: 18px; margin-bottom: 10px; }
  #camera-view .mini-gallery { width: 56px; height: 56px; }
  #camera-view .mini-gallery .stack-img,
  #camera-view .mini-gallery .stack-empty { width: 50px; height: 50px; }
  #camera-view .quota-summary strong { font-size: 32px; }
  #camera-view .shutter { width: 84px; height: 84px; }
  #camera-view .camera-brand-badge { width: 58px; height: 58px; border-radius: 16px; }
}

/* =======================================================
   Camera Phase 2 v4.5 — proportion, icon polish, shutter motion
======================================================= */
#camera-view .camera-inspired-shell.app {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#camera-view .viewfinder-card {
  flex: 0 0 auto;
  width: min(calc(100% - 28px), calc((100dvh - 232px) * .666667));
  height: auto;
  aspect-ratio: 2 / 3;
  margin: clamp(16px, 4.6dvh, 48px) auto 0;
  border-radius: 30px;
  box-shadow:
    0 22px 48px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.055) inset;
  transition: transform 220ms cubic-bezier(.22,1,.36,1), filter 220ms ease;
}
#camera-view .viewfinder-card.capture-kick {
  transform: scale(.994);
  filter: brightness(.94);
}
#camera-view .control-panel.camera-inspired-panel {
  flex: 1 1 auto;
  min-height: 190px;
  width: min(100%, 520px);
  padding-top: 15px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  justify-content: center;
}
#camera-view .camera-frame-guide {
  left: 13.2%;
  right: 13.2%;
  top: 21%;
  bottom: 14%;
  border-width: 1.7px;
  border-radius: 26px;
  border-color: rgba(255,255,255,.88);
  box-shadow:
    0 0 0 .5px rgba(0,0,0,.10),
    0 0 24px rgba(255,255,255,.025);
}
#camera-view .camera-lens-header {
  top: 14.5%;
  font-size: 17px;
  letter-spacing: -.025em;
  text-shadow: 0 2px 16px rgba(0,0,0,.24);
}
#camera-view .camera-lens-pill {
  bottom: 3.8%;
  gap: 5px;
  padding: 5px 7px;
  background: rgba(9,10,13,.44);
  border-color: rgba(255,255,255,.075);
}
#camera-view .lens-chip {
  min-width: 31px;
  height: 29px;
  padding: 0 9px;
  font-size: 13px;
}

/* Premium icon language: lighter, quieter, closer to a dedicated camera UI. */
#camera-view .tool-row {
  gap: clamp(34px, 12vw, 64px);
  margin: 0 0 10px;
}
#camera-view .tool-row .tool-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.88);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms cubic-bezier(.22,1,.36,1);
}
#camera-view .tool-row .tool-btn:hover,
#camera-view .tool-row .tool-btn:focus-visible {
  background: rgba(255,255,255,.055);
  color: #fff;
}
#camera-view .tool-row .tool-btn:active {
  transform: scale(.90);
  background: rgba(255,255,255,.08);
}
#camera-view .tool-row .tool-btn .control-icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.55;
}
#camera-view #flash-btn.on {
  color: #fff1a8;
  background: rgba(255,226,108,.075);
}
#camera-view .camera-ui-topbar .icon-btn {
  background: rgba(8,9,12,.25);
  border-color: rgba(255,255,255,.07);
  box-shadow: none;
}
#camera-view .camera-ui-topbar .icon-btn .control-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.55;
}

/* Mechanical shutter curtain. It is visual only and never blocks capture processing. */
#camera-view .shutter-curtain {
  position: absolute;
  z-index: 34;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
#camera-view .shutter-curtain::before,
#camera-view .shutter-curtain::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 52%;
  background: #020203;
  will-change: transform;
}
#camera-view .shutter-curtain::before {
  top: 0;
  transform: translateY(-102%);
}
#camera-view .shutter-curtain::after {
  bottom: 0;
  transform: translateY(102%);
}
#camera-view .shutter-curtain.fire {
  opacity: 1;
}
#camera-view .shutter-curtain.fire::before {
  animation: hadirShutterTop 420ms cubic-bezier(.65,0,.35,1) both;
}
#camera-view .shutter-curtain.fire::after {
  animation: hadirShutterBottom 420ms cubic-bezier(.65,0,.35,1) both;
}
@keyframes hadirShutterTop {
  0% { transform: translateY(-102%); }
  42%, 56% { transform: translateY(0); }
  100% { transform: translateY(-102%); }
}
@keyframes hadirShutterBottom {
  0% { transform: translateY(102%); }
  42%, 56% { transform: translateY(0); }
  100% { transform: translateY(102%); }
}
#camera-view .shutter {
  transition:
    transform 160ms cubic-bezier(.22,1,.36,1),
    box-shadow 200ms ease,
    opacity 180ms ease;
}
#camera-view .shutter:active {
  transform: scale(.91);
}
#camera-view .shutter.is-processing {
  animation: none;
  opacity: .92;
  transform: scale(.965);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.94) inset,
    0 0 0 7px rgba(255,255,255,.09),
    0 8px 20px rgba(0,0,0,.22);
}

/* Developing and review transitions continue the physical-camera rhythm. */
#camera-view .film-developing.show .film-developing-card {
  animation: hadirDevelopingReveal 520ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes hadirDevelopingReveal {
  from { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
#camera-view .photo-review.open .photo-review-media {
  animation: hadirReviewReveal 620ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes hadirReviewReveal {
  from { opacity: 0; transform: scale(.985); filter: blur(7px) brightness(.86); }
  to { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); }
}

@media (max-width: 430px) {
  #camera-view .viewfinder-card {
    width: min(calc(100% - 24px), calc((100dvh - 220px) * .666667));
    margin-top: clamp(12px, 3.2dvh, 28px);
    border-radius: 28px;
  }
  #camera-view .control-panel.camera-inspired-panel {
    min-height: 184px;
    padding-inline: 14px;
  }
  #camera-view .camera-frame-guide {
    left: 12.8%;
    right: 12.8%;
    border-radius: 23px;
  }
  #camera-view .camera-ui-topbar {
    top: 13px;
    left: 12px;
    right: 12px;
  }
  #camera-view .camera-ui-topbar .event-title-wrap {
    max-width: 61vw;
  }
  #camera-view .tool-row {
    gap: clamp(30px, 11vw, 50px);
  }
  #camera-view .shutter {
    width: 82px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #camera-view .shutter-curtain.fire::before,
  #camera-view .shutter-curtain.fire::after,
  #camera-view .film-developing.show .film-developing-card,
  #camera-view .photo-review.open .photo-review-media {
    animation-duration: 1ms !important;
  }
}

/* =======================================================
   Camera Control Dock Refinement v1
   - larger viewfinder after removing interactive zoom selector
   - balanced gallery / shutter / remaining-shots controls
   - vertical hadir. wordmark on the viewfinder edge
======================================================= */
#camera-view .zoom-row,
#camera-view .zoom-pill {
  display: none !important;
}

#camera-view .viewfinder-card {
  width: min(calc(100% - 20px), calc((100dvh - 178px) * .65625));
  aspect-ratio: 21 / 32;
  margin-top: clamp(10px, 2.8dvh, 24px);
}

#camera-view .camera-vertical-wordmark {
  position: absolute;
  z-index: 19;
  top: 17.5%;
  right: 9px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  color: rgba(255,255,255,.62);
  font-family: var(--font-brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -.03em;
  text-shadow: 0 2px 14px rgba(0,0,0,.34);
  pointer-events: none;
  user-select: none;
}

#camera-view .control-panel.camera-inspired-panel {
  min-height: 168px;
  padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
  justify-content: center;
}

#camera-view .tool-row {
  margin-bottom: 5px;
}

#camera-view .shutter-row {
  width: min(100%, 370px);
  min-height: 100px;
  margin-inline: auto;
  grid-template-columns: 72px minmax(92px, auto) 72px;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 7vw, 42px);
}

#camera-view .side-control.left,
#camera-view .side-control.right {
  width: 72px;
  min-height: 72px;
  align-items: center;
  justify-content: center;
}

#camera-view .mini-gallery,
#camera-view .quota-summary {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(216,184,130,.34);
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.022)),
    rgba(12,13,17,.92);
  box-shadow:
    0 12px 28px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.075);
}

#camera-view .mini-gallery {
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 160ms cubic-bezier(.22,1,.36,1), border-color 160ms ease, background 160ms ease;
}
#camera-view .mini-gallery:active {
  transform: scale(.94);
  border-color: rgba(216,184,130,.58);
}
#camera-view .mini-gallery .stack-img,
#camera-view .mini-gallery .stack-empty {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}
#camera-view .mini-gallery .stack-empty {
  position: relative;
  border: 0;
  background: rgba(255,255,255,.025);
}
#camera-view .mini-gallery .stack-empty::before {
  content: "";
  position: absolute;
  inset: 17px 14px 15px;
  border: 1.5px solid rgba(255,255,255,.74);
  border-radius: 4px;
}
#camera-view .mini-gallery .stack-empty::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 24px;
  width: 15px;
  height: 10px;
  border-left: 1.5px solid rgba(255,255,255,.74);
  border-bottom: 1.5px solid rgba(255,255,255,.74);
  transform: rotate(-45deg) skew(-8deg,-8deg);
}

#camera-view .quota-summary {
  display: grid !important;
  place-content: center;
  justify-items: center;
  gap: 3px;
  padding: 0;
  color: rgba(255,255,255,.94);
  text-align: center;
  font-family: var(--font-brand);
}
#camera-view .quota-summary strong {
  font-size: 28px;
  line-height: .9;
  font-weight: 750;
  letter-spacing: -.055em;
  color: rgba(255,255,255,.98);
}
#camera-view .quota-summary span {
  display: block;
  font-size: 8px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: .12em;
  color: rgba(216,184,130,.90);
}
#camera-view .quota-summary.is-empty {
  opacity: .66;
  border-color: rgba(255,255,255,.14);
}

#camera-view .shutter-wrap,
#camera-view .shutter-stack {
  display: grid;
  place-items: center;
}
#camera-view .shutter-stack {
  position: relative;
  gap: 0;
}
#camera-view .shutter {
  width: 88px;
  height: 88px;
}
#camera-view .capture-mode-label {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

#camera-view .camera-brand-badge,
#camera-view .brand-side {
  display: none !important;
}

@media (max-width: 430px) {
  #camera-view .viewfinder-card {
    width: min(calc(100% - 16px), calc((100dvh - 172px) * .65625));
    margin-top: clamp(8px, 2.1dvh, 18px);
    border-radius: 28px;
  }
  #camera-view .control-panel.camera-inspired-panel {
    min-height: 164px;
    padding-inline: 12px;
  }
  #camera-view .shutter-row {
    width: min(100%, 350px);
    grid-template-columns: 68px minmax(88px, auto) 68px;
    gap: clamp(15px, 6vw, 30px);
  }
  #camera-view .side-control.left,
  #camera-view .side-control.right {
    width: 68px;
    min-height: 68px;
  }
  #camera-view .mini-gallery,
  #camera-view .quota-summary {
    width: 62px;
    height: 62px;
    min-width: 62px;
    min-height: 62px;
    border-radius: 17px;
  }
  #camera-view .mini-gallery .stack-img,
  #camera-view .mini-gallery .stack-empty {
    width: 54px;
    height: 54px;
  }
  #camera-view .shutter {
    width: 84px;
    height: 84px;
  }
  #camera-view .camera-vertical-wordmark {
    right: 7px;
    font-size: 11px;
  }
}

@media (max-height: 700px) {
  #camera-view .viewfinder-card {
    width: min(calc(100% - 20px), calc((100dvh - 164px) * .65625));
    margin-top: 6px;
  }
  #camera-view .control-panel.camera-inspired-panel {
    min-height: 154px;
    padding-top: 5px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 7px);
  }
  #camera-view .tool-row { margin-bottom: 1px; }
  #camera-view .shutter-row { min-height: 92px; }
  #camera-view .shutter { width: 78px; height: 78px; }
  #camera-view .mini-gallery,
  #camera-view .quota-summary {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    border-radius: 16px;
  }
  #camera-view .quota-summary strong { font-size: 25px; }
}

