:root {
  --ink: #2b1d35;
  --muted: #766a7c;
  --surface: rgba(255, 255, 255, .88);
  --line: rgba(82, 43, 96, .11);
  --pink: #ee5eae;
  --pink-dark: #cf3d93;
  --violet: #a84ed1;
  --violet-dark: #8333b4;
  --cream: #fff9fc;
  --success: #288e68;
  --shadow: 0 22px 60px rgba(81, 35, 97, .13);
  --soft-shadow: 0 12px 34px rgba(83, 42, 101, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f9f4fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f1fa; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% -8%, rgba(235, 101, 181, .19), transparent 35rem),
    radial-gradient(circle at 100% 12%, rgba(155, 76, 210, .18), transparent 30rem),
    linear-gradient(160deg, #fffafd 0%, #f7f1fb 50%, #fcf6f9 100%);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.layout-gate .app-shell {
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(100%, 720px);
}
.layout-gate .page-content {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 18px 24px;
}
.layout-gate .app-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  min-height: 70px;
  padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  background: rgba(250, 246, 252, .78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: .92rem;
  font-weight: 750;
  letter-spacing: -.02em;
}
.brand-mini img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(154, 55, 168, .18)); }
.header-spacer { width: 44px; }
.icon-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #63356f;
  background: transparent;
  cursor: pointer;
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.68);
  font-size: 1.45rem;
  box-shadow: 0 5px 15px rgba(77, 36, 92, .06);
}
.finish-form { justify-self: end; margin: 0; }
.text-button { min-height: 42px; padding: 0 4px; font-size: .82rem; font-weight: 750; }

.page-content { padding: 24px 18px 28px; }
.app-footer {
  padding: 5px 20px 30px;
  color: #95899a;
  font-size: .72rem;
  text-align: center;
}
.lock-dot { color: #60ae91; font-size: .65rem; }

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 30px 24px 23px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 30px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(126, 42, 158, .98), rgba(195, 69, 163, .94) 53%, rgba(239, 100, 174, .93));
  box-shadow: 0 26px 60px rgba(128, 47, 145, .26);
}
.hero-card > *:not(.hero-glow) { position: relative; z-index: 2; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(4px); opacity: .42; }
.hero-glow-one { width: 220px; height: 220px; right: -70px; top: -100px; background: #ffb9e4; }
.hero-glow-two { width: 150px; height: 150px; left: -90px; bottom: -75px; background: #d6a5ff; }
.hero-brand {
  display: flex;
  width: 72px;
  height: 72px;
  margin: 0 0 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.47);
  border-radius: 23px;
  background: rgba(255,255,255,.21);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 14px 28px rgba(82,16,95,.2);
}
.hero-brand img { width: 62px; height: 62px; object-fit: contain; }
.eyebrow { margin: 0 0 7px; color: var(--pink-dark); font-size: .69rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.hero-card .eyebrow { color: rgba(255,255,255,.7); }
h1, h2, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(1.75rem, 7vw, 2.6rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.hero-card h1 { margin-bottom: 23px; }

.visit-details {
  display: grid;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.22);
}
.visit-details > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.visit-details small, .visit-details strong { display: block; }
.visit-details small { margin-bottom: 2px; color: rgba(255,255,255,.63); font-size: .67rem; }
.visit-details strong { overflow: hidden; font-size: .94rem; text-overflow: ellipsis; white-space: nowrap; }
.detail-icon {
  display: inline-flex;
  flex: 0 0 35px;
  width: 35px; height: 35px;
  align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
}

.action-section { padding: 34px 0 4px; }
.section-heading { margin: 0 4px 17px; }
.action-grid { display: grid; gap: 13px; }
.action-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 15px;
  align-items: center;
  min-height: 112px;
  padding: 18px 48px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.action-card:active { transform: scale(.985); }
.action-icon {
  display: inline-flex;
  width: 58px; height: 58px;
  align-items: center; justify-content: center;
  border-radius: 19px;
  font-size: 1.8rem;
}
.client-card .action-icon { color: #b5358b; background: linear-gradient(145deg, #ffe2f1, #f8cde9); }
.product-card .action-icon { color: #813db4; background: linear-gradient(145deg, #f0e0ff, #e6cff8); }
.action-copy { min-width: 0; }
.action-copy strong, .action-copy small { display: block; }
.action-copy strong { margin-bottom: 5px; font-size: 1rem; letter-spacing: -.01em; }
.action-copy small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.count-pill {
  align-self: start;
  min-width: 27px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8d4b97;
  background: #f7eaf8;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}
.arrow { position: absolute; right: 17px; bottom: 18px; color: #9d769e; font-size: 1.35rem; }
.info-strip {
  display: flex; gap: 11px; align-items: flex-start;
  margin: 20px 3px 5px;
  padding: 13px 15px;
  border: 1px solid rgba(183, 87, 171, .11);
  border-radius: 17px;
  color: #6d5d70;
  background: rgba(255,255,255,.52);
  font-size: .73rem; line-height: 1.45;
}
.info-strip span { display: inline-flex; flex: 0 0 22px; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #bc6ebb; font-weight: 800; }
.info-strip p { margin: 2px 0 0; }

.upload-head, .gallery-head { padding: 6px 3px 22px; }
.upload-head h1, .gallery-head h1 { color: #3d2948; }
.subtitle { margin: 9px 0 0; color: var(--muted); font-size: .82rem; }
.upload-card {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 27px;
  background: rgba(255,255,255,.8);
  box-shadow: var(--shadow);
}
.capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.capture-button {
  display: flex;
  min-height: 139px;
  padding: 17px 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 21px;
  cursor: pointer;
  text-align: center;
}
.capture-button strong { margin-top: 8px; font-size: .87rem; }
.capture-button small { margin-top: 4px; color: inherit; opacity: .67; font-size: .66rem; }
.capture-icon { font-size: 2rem; line-height: 1; }
.primary-capture { color: #fff; background: linear-gradient(140deg, var(--violet-dark), #bc4bbb 55%, var(--pink)); box-shadow: 0 15px 27px rgba(170, 64, 163, .22); }
.secondary-capture { color: #70417c; border-color: #ebdced; background: #fbf4fc; }
.empty-queue { padding: 29px 15px 24px; color: #998e9d; text-align: center; }
.empty-queue span { font-size: 1.6rem; color: #c0a8c3; }
.empty-queue p { margin: 7px auto 0; max-width: 280px; font-size: .73rem; line-height: 1.45; }
.photo-queue { display: grid; gap: 9px; margin: 17px 0; }
.queue-item {
  display: grid;
  grid-template-columns: 54px 1fr 34px;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
.queue-thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: #f1e8f2; }
.queue-copy { min-width: 0; }
.queue-copy strong { display: block; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.queue-copy small { display: block; margin: 3px 0 6px; color: #948898; font-size: .65rem; }
.queue-copy progress { display: block; width: 100%; height: 5px; }
.queue-remove { width: 32px; height: 32px; border: 0; border-radius: 11px; color: #9b6e99; background: #f8eef7; cursor: pointer; }
.queue-item.is-success { border-color: rgba(48, 148, 111, .25); background: #f7fffb; }
.queue-item.is-error { border-color: rgba(200, 64, 85, .25); background: #fff8f8; }
.queue-item.is-error .queue-copy small { color: #b84256; }
progress { overflow: hidden; border: 0; border-radius: 999px; background: #eee3ef; accent-color: var(--pink-dark); }
progress::-webkit-progress-bar { background: #eee3ef; border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--violet), var(--pink)); border-radius: 999px; }

.consent-box {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 11px;
  align-items: start;
  margin: 17px 0;
  padding: 15px;
  border: 1px solid #e8d9ea;
  border-radius: 18px;
  background: #fdf8fd;
  cursor: pointer;
}
.consent-box input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--violet); }
.consent-box strong, .consent-box small { display: block; }
.consent-box strong { margin-bottom: 3px; font-size: .78rem; }
.consent-box small { color: var(--muted); font-size: .67rem; line-height: 1.45; }
.overall-progress { margin: 15px 0; padding: 14px; border-radius: 16px; background: #f8edf8; }
.overall-progress div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .72rem; }
.overall-progress progress { width: 100%; height: 8px; }
.upload-hint { margin: 14px 0 0; color: #958999; font-size: .68rem; text-align: center; }

.button {
  display: inline-flex;
  min-height: 51px;
  padding: 0 19px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 17px;
  cursor: pointer;
  font-weight: 780;
  font-size: .84rem;
}
.button-full { width: 100%; }
.button-primary { color: #fff; background: linear-gradient(115deg, var(--violet-dark), var(--pink)); box-shadow: 0 13px 25px rgba(163, 62, 158, .2); }
.button-secondary { margin-top: 10px; color: #76427e; border: 1px solid #e5d5e7; background: #fbf4fb; }
.button-quiet { min-height: 43px; margin-top: 6px; color: #7e7182; background: transparent; }
.button:disabled { color: #aaa0ac; background: #eee9ef; box-shadow: none; cursor: not-allowed; }
.button-arrow { margin-left: auto; font-size: 1.15rem; }

.gallery-head { display: flex; justify-content: space-between; align-items: end; }
.large-count { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 16px; color: #a4439b; background: #f3e4f3; font-weight: 850; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-card { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: #fff; box-shadow: var(--soft-shadow); }
.photo-link { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #eaddec; }
.photo-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.photo-link:active img { transform: scale(1.02); }
.zoom-badge { position: absolute; right: 9px; top: 9px; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: rgba(48, 26, 55, .52); backdrop-filter: blur(8px); }
.photo-meta { min-width: 0; padding: 11px 38px 12px 11px; }
.photo-meta strong, .photo-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-meta strong { font-size: .7rem; }
.photo-meta small { margin-top: 4px; color: #968a99; font-size: .58rem; }
.delete-form { position: absolute; right: 8px; bottom: 9px; }
.delete-form button { width: 28px; height: 28px; border: 0; border-radius: 9px; color: #ad687e; background: #faedf2; cursor: pointer; font-size: 1.1rem; }
.empty-gallery { padding: 55px 20px; border: 1px dashed #ddcbdf; border-radius: 25px; color: #897b8c; background: rgba(255,255,255,.54); text-align: center; }
.empty-gallery span { color: #bc9ec1; font-size: 2rem; }
.empty-gallery h2 { margin: 12px 0 5px; color: #594a5d; }
.empty-gallery p { margin: 0; font-size: .78rem; }
.sticky-actions { margin-top: 20px; }

.status-card {
  width: 100%;
  margin: 8vh auto 0;
  padding: 34px 25px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 29px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  text-align: center;
}
.status-card h1 { margin: 4px 0 12px; font-size: 1.75rem; }
.status-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.58; }
.status-icon, .success-mark { display: inline-flex; width: 70px; height: 70px; margin-bottom: 21px; align-items: center; justify-content: center; border-radius: 23px; font-size: 2rem; font-weight: 700; }
.status-icon { color: #a34d78; background: #f8deeb; }
.success-mark { color: #fff; background: linear-gradient(145deg, #55b992, #319171); box-shadow: 0 16px 30px rgba(45, 143, 105, .2); }

.gate-card {
  position: relative;
  isolation: isolate;
  max-width: 550px;
  margin: 0 auto;
  overflow: hidden;
  padding: 38px 28px 26px;
  border-color: rgba(255,255,255,.9);
  border-radius: 34px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 28px 75px rgba(91, 42, 106, .16), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.gate-card::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--violet), var(--pink), #ff9ccf);
  content: "";
}
.gate-decoration {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
.gate-decoration-one {
  width: 180px;
  height: 180px;
  top: -115px;
  right: -90px;
  background: radial-gradient(circle, rgba(234,91,175,.17), transparent 68%);
}
.gate-decoration-two {
  width: 150px;
  height: 150px;
  bottom: -105px;
  left: -80px;
  background: radial-gradient(circle, rgba(151,70,203,.13), transparent 68%);
}
.gate-spinner {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  margin: 0 auto 26px;
  place-items: center;
  border-radius: 33px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(250,237,250,.92));
  box-shadow: 0 16px 34px rgba(137, 54, 143, .14), inset 0 0 0 1px rgba(194,88,173,.08);
}
.gate-spinner::before {
  position: absolute;
  inset: -7px;
  border: 3px solid rgba(169,72,192,.12);
  border-top-color: var(--pink);
  border-right-color: var(--violet);
  border-radius: 38px;
  content: "";
  animation: gate-spin 1.1s linear infinite;
}
.gate-spinner img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 23px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(161,56,154,.17));
  transition: opacity .18s ease, transform .18s ease;
}
.gate-spinner.is-error::before {
  border-color: rgba(192,72,92,.16);
  border-top-color: #ca4b65;
  animation: none;
}
.gate-spinner.is-error::after {
  position: absolute;
  inset: 17px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #b73e58;
  background: #fde9ee;
  content: "!";
  font-size: 2.1rem;
  font-weight: 800;
}
.gate-spinner.is-error img { opacity: 0; transform: scale(.82); }
.gate-spinner.is-success::before {
  border-color: rgba(52,151,112,.18);
  border-top-color: #389a74;
  animation: none;
}
.gate-spinner.is-success::after {
  position: absolute;
  inset: 17px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #58bd95, #318e6c);
  content: "✓";
  font-size: 1.9rem;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(49,142,108,.2);
}
.gate-spinner.is-success img { opacity: 0; transform: scale(.82); }
.gate-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  align-items: center;
  gap: 7px;
  color: #b13e8a;
}
.gate-eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50a984;
  box-shadow: 0 0 0 5px rgba(80,169,132,.1);
}
.gate-card h1 {
  margin: 0;
  color: #33203c;
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  line-height: 1.08;
}
.gate-card .gate-lead {
  max-width: 390px;
  margin: 11px auto 0;
  color: #77687b;
  font-size: .9rem;
  line-height: 1.55;
}
.gate-status {
  display: flex;
  max-width: 430px;
  margin: 25px auto 0;
  padding: 14px 15px;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(153,74,173,.11);
  border-radius: 18px;
  color: #65416e;
  background: linear-gradient(135deg, #fbf4fc, #f8eef9);
  text-align: left;
}
.gate-status-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #9c48b4;
  background: #fff;
  box-shadow: 0 6px 14px rgba(101,48,113,.08);
}
.gate-status-icon svg, .privacy-lock svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.gate-status-copy { min-width: 0; }
.gate-status-copy strong, .gate-status-copy small { display: block; }
.gate-status-copy strong { margin-bottom: 3px; color: #4d3255; font-size: .79rem; }
.gate-status-copy small { color: #817284; font-size: .68rem; line-height: 1.45; }
.gate-privacy {
  display: flex;
  max-width: 430px;
  margin: 12px auto 0;
  padding: 13px 15px;
  align-items: flex-start;
  gap: 11px;
  color: #726775;
  background: rgba(247,242,248,.75);
  text-align: left;
}
.privacy-lock {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 11px;
  color: #4c9a7d;
  background: #e9f6f0;
}
.gate-privacy > span:last-child { font-size: .68rem; line-height: 1.5; }
.gate-privacy strong { display: block; margin-bottom: 2px; color: #4e4351; font-size: .72rem; }
.gate-footnote { margin: 16px 0 0; color: #9a8e9d; font-size: .64rem; line-height: 1.45; }
.gate-noscript { margin-top: 16px; padding: 12px; border-radius: 14px; color: #9c3f54; background: #fff0f3; font-size: .72rem; line-height: 1.45; }
.gate-card.is-error .gate-eyebrow { color: #aa4259; }
.gate-card.is-error .gate-eyebrow > span { background: #ca5268; box-shadow: 0 0 0 5px rgba(202,82,104,.1); }
.gate-card.is-error .gate-status { border-color: rgba(192,72,92,.12); color: #9b4054; background: #fff3f5; }
.gate-card.is-error .gate-status-icon { color: #b7445b; }
.gate-card.is-success .gate-eyebrow { color: #318c6b; }
.gate-card.is-success .gate-status { border-color: rgba(52,151,112,.14); background: #effaf5; }
.gate-card.is-success .gate-status-icon { color: #318c6b; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
.privacy-note { margin-top: 20px; padding: 13px; border-radius: 15px; color: #7c6e80; background: #f7f0f8; font-size: .7rem; line-height: 1.45; }
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(calc(100% - 36px), 520px);
  padding: 13px 16px;
  border-radius: 15px;
  color: #fff;
  background: rgba(55, 35, 60, .94);
  box-shadow: 0 16px 36px rgba(44, 24, 49, .23);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: .77rem;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  .page-content { padding: 34px 30px 36px; }
  .layout-gate .page-content { padding: 46px 30px 30px; }
  .gate-card { padding: 45px 43px 30px; }
  .hero-card { padding: 36px 32px 29px; }
  .visit-details { grid-template-columns: 1.4fr .8fr; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .action-card { min-height: 178px; grid-template-columns: 58px 1fr; align-content: center; }
  .count-pill { position: absolute; top: 16px; right: 16px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
