/* Shared Guest Event upload experience for Single Event and Business Guest galleries. */

.guest-upload-page{background:var(--theme-background-paint,var(--theme-background))}
@media(min-width:900px){html:has(body.guest-upload-page:not(.owner-upload-page)){zoom:1}}

/* Public QR/upload landing page: one viewport, cover behind, welcome panel docked at the bottom. */
.guest-upload-page:not(.owner-upload-page){
  --guest-panel-height:clamp(250px,33dvh,330px);
  height:100dvh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  overscroll-behavior:none
}
.guest-upload-page:not(.owner-upload-page) .event-topbar{
  position:relative;
  z-index:60;
  flex:0 0 auto
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-hero{
  position:relative;
  flex:1 1 auto;
  min-height:0!important;
  height:auto!important;
  margin:0;
  overflow:hidden
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-hero.has-cover{
  min-height:0!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-hero .gallery-hero-cover{
  width:100%;
  height:100%;
  object-fit:cover
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-hero .gallery-hero-content{
  left:max(20px,calc((100vw - 1280px)/2 + 20px))!important;
  right:20px!important;
  bottom:calc(var(--guest-panel-height) + 14px)!important;
  max-width:min(650px,calc(100% - 40px))!important;
  padding:0!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main{
  position:fixed;
  z-index:70;
  left:0;
  right:0;
  bottom:0;
  width:min(640px,calc(100% - 24px));
  height:auto;
  max-height:var(--guest-panel-height);
  margin:0 auto;
  overflow:visible
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-panel{
  height:auto;
  max-height:var(--guest-panel-height);
  overflow:auto;
  padding:20px 24px calc(18px + env(safe-area-inset-bottom));
  border:1px solid var(--theme-border);
  border-bottom:0;
  border-radius:24px 24px 0 0;
  color:var(--theme-text);
  background:var(--theme-surface-paint,var(--theme-surface));
  box-shadow:0 -12px 40px rgba(17,35,29,.18)
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-panel>h2{
  margin:0;
  color:var(--theme-text);
  font-family:var(--theme-heading-font,'Fraunces',Georgia,serif);
  font-size:1.45rem;
  line-height:1.12;
  text-align:center
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-panel>.welcome-copy{
  max-width:560px;
  margin:7px auto 15px;
  color:var(--theme-muted);
  font-size:.82rem;
  line-height:1.42;
  text-align:center
}
.guest-upload-page:not(.owner-upload-page) .upload-form{
  display:grid;
  gap:10px
}
.guest-upload-page:not(.owner-upload-page) .guest-name-entry{margin:0}
.guest-upload-page:not(.owner-upload-page) .guest-name-entry label{
  display:block;
  margin:0 0 5px;
  color:var(--theme-text);
  font-size:.76rem;
  font-weight:850
}
.guest-upload-page:not(.owner-upload-page) .guest-name-entry input{
  width:100%;
  min-height:45px;
  padding:9px 12px;
  border:1px solid var(--theme-border);
  border-radius:12px;
  color:var(--theme-control-text,var(--theme-text));
  background:var(--theme-control-background,var(--theme-surface));
  font:inherit;
  font-size:.86rem
}
.guest-upload-page:not(.owner-upload-page) .guest-name-entry .field-hint{
  display:block;
  margin-top:4px;
  color:var(--theme-muted);
  font-size:.66rem;
  line-height:1.35
}
.guest-upload-page:not(.owner-upload-page) .dropzone{
  position:relative;
  min-height:54px;
  margin:0;
  overflow:hidden;
  border:1px solid var(--theme-primary);
  border-radius:999px;
  color:var(--theme-button-text,#fff);
  background:linear-gradient(135deg,var(--theme-primary),var(--theme-primary-dark,var(--theme-primary)));
  box-shadow:0 7px 18px color-mix(in srgb,var(--theme-primary) 22%,transparent)
}
.guest-upload-page:not(.owner-upload-page) .dropzone>div{
  min-height:54px;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  align-content:center;
  align-items:center;
  column-gap:9px;
  padding:7px 16px 7px 19px;
  text-align:left
}
.guest-upload-page:not(.owner-upload-page) .dropzone-icon{
  grid-row:1/3;
  display:grid;
  place-items:center
}
.guest-upload-page:not(.owner-upload-page) .dropzone-icon svg{width:22px;height:22px}
.guest-upload-page:not(.owner-upload-page) .dropzone strong{font-size:.83rem;line-height:1.15}
.guest-upload-page:not(.owner-upload-page) .dropzone strong+span{
  color:color-mix(in srgb,var(--theme-button-text,#fff) 78%,transparent);
  font-size:.62rem;
  line-height:1.2
}
.guest-upload-page:not(.owner-upload-page) .dropzone input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer
}
.guest-upload-page:not(.owner-upload-page) .site-footer,
.guest-upload-page:not(.owner-upload-page) .event-signoff{display:none!important}

/* Compact success popup shown after a completed guest upload. */
.guest-upload-success{
  position:fixed;
  inset:0;
  z-index:9000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(8,20,17,.66);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px)
}
.guest-upload-success[hidden]{display:none!important}
.guest-upload-success-card{
  width:min(410px,100%);
  display:grid;
  justify-items:center;
  gap:9px;
  padding:24px 22px 22px;
  border:1px solid var(--theme-border);
  border-radius:22px;
  color:var(--theme-text);
  background-color:#fff;
  background-image:linear-gradient(var(--theme-surface),var(--theme-surface));
  box-shadow:0 22px 70px rgba(0,0,0,.34);
  text-align:center
}
.guest-upload-success-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:var(--theme-button-text,#fff);
  background:var(--theme-primary-paint,var(--theme-primary));
  font-size:1.55rem;
  font-weight:900;
  box-shadow:0 8px 20px color-mix(in srgb,var(--theme-primary) 25%,transparent)
}
.guest-upload-success-card .eyebrow{
  margin:1px 0 -2px;
  color:var(--theme-primary);
  font-size:.66rem
}
.guest-upload-success-card h2{
  margin:0;
  color:var(--theme-text);
  font-family:var(--theme-heading-font,'Fraunces',Georgia,serif);
  font-size:1.3rem;
  line-height:1.18
}
.guest-upload-success-card>p:not(.eyebrow){
  margin:0;
  color:var(--theme-muted);
  font-size:.78rem;
  line-height:1.45
}
.guest-upload-success-actions{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:7px
}
.guest-upload-success-actions .button{
  min-width:0;
  min-height:42px;
  display:grid;
  place-items:center;
  padding:8px 12px;
  text-decoration:none
}
body.guest-upload-success-open{overflow:hidden!important}
body.guest-upload-success-open .guest-upload-main{pointer-events:none!important}

@media(max-width:420px){
  .guest-upload-success{padding:16px}
  .guest-upload-success-card{padding:21px 17px 18px;border-radius:20px}
  .guest-upload-success-actions{grid-template-columns:1fr}
}

/* File review/upload modal. */
.guest-upload-modal{
  position:fixed;
  inset:0;
  z-index:300;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(8,20,17,.52);
  backdrop-filter:blur(5px)
}
.guest-upload-modal[hidden]{display:none!important}
.guest-upload-modal-card{
  width:min(620px,100%);
  max-height:min(760px,90dvh);
  display:grid;
  align-content:start;
  gap:14px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:0 20px 20px;
  border:1px solid var(--theme-border);
  border-radius:24px;
  color:var(--theme-text);
  background:var(--theme-surface-paint,var(--theme-surface));
  box-shadow:0 24px 80px rgba(0,0,0,.32)
}
.guest-upload-modal-header{
  position:sticky;
  z-index:4;
  top:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 -20px;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--theme-border);
  background:color-mix(in srgb,var(--theme-surface) 96%,transparent);
  backdrop-filter:blur(12px)
}
.guest-upload-modal-header .eyebrow{margin:0 0 2px;color:var(--theme-primary);font-size:.67rem}
.guest-upload-modal-header h2{
  margin:0;
  color:var(--theme-text);
  font-family:var(--theme-heading-font,'Fraunces',Georgia,serif);
  font-size:1.25rem;
  line-height:1.15
}
.guest-upload-modal-close{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 36px;
  padding:0;
  border:1px solid var(--theme-border);
  border-radius:50%;
  color:var(--theme-text);
  background:var(--theme-control-background,var(--theme-surface));
  cursor:pointer
}
.guest-upload-modal-close .gallery-ui-icon{width:17px;height:17px}

.guest-uploading-as{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:baseline;
  gap:2px 7px;
  padding:9px 11px;
  border:1px solid var(--theme-border);
  border-radius:12px;
  background:color-mix(in srgb,var(--theme-primary) 4%,var(--theme-surface))
}
.guest-uploading-as>span{color:var(--theme-muted);font-size:.7rem}
.guest-uploading-as>strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--theme-text);
  font-size:.8rem
}
.guest-uploading-as>small{
  grid-column:1/-1;
  color:var(--theme-muted);
  font-size:.66rem;
  line-height:1.35
}

.guest-selected-summary{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:10px;
  border:1px solid var(--theme-border);
  border-radius:14px;
  background:color-mix(in srgb,var(--theme-primary) 4%,var(--theme-surface))
}
.guest-selected-summary[hidden]{display:none!important}
.guest-selected-thumbnails{display:flex;align-items:center;min-width:0}
.guest-selected-thumb,.guest-selected-more{
  width:44px;height:44px;flex:0 0 44px;
  overflow:hidden;
  margin-left:-7px;
  border:2px solid var(--theme-surface);
  border-radius:8px;
  background:color-mix(in srgb,var(--theme-primary) 10%,var(--theme-surface))
}
.guest-selected-thumb:first-child{margin-left:0}
.guest-selected-thumb img,.guest-selected-thumb video{width:100%;height:100%;display:block;object-fit:cover}
.guest-selected-more{display:grid;place-items:center;color:var(--theme-text);font-size:.7rem;font-weight:900}
.guest-selected-copy{display:grid;gap:2px;min-width:0}
.guest-selected-copy strong{font-size:.79rem}
.guest-selected-copy small{color:var(--theme-muted);font-size:.68rem}
.guest-selected-summary .button{min-height:36px;padding:6px 9px;font-size:.7rem;white-space:normal}
.guest-selected-summary.is-new-selection{animation:guest-selected-outline 1.15s ease-out}
@keyframes guest-selected-outline{
  0%{border-color:var(--theme-border);box-shadow:0 0 0 0 transparent}
  32%{border-color:var(--theme-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 26%,transparent)}
  100%{border-color:var(--theme-border);box-shadow:0 0 0 8px transparent}
}
.guest-caption-invite{grid-column:1/-1;color:var(--theme-primary)!important;font-size:.66rem!important;font-weight:750;line-height:1.3}
.guest-selected-summary .guest-caption-review-button{
  border-color:var(--theme-accent);
  color:var(--theme-text);
  background:var(--theme-accent-paint,var(--theme-accent));
  font-size:.77rem;
  font-weight:850
}
.guest-selected-summary .guest-caption-review-button:hover,
.guest-selected-summary .guest-caption-review-button:focus-visible{
  filter:brightness(.97);
  box-shadow:0 5px 14px color-mix(in srgb,var(--theme-accent) 26%,transparent)
}
.guest-selected-thumb[role="button"],.guest-selected-more[role="button"],.guest-review-preview[role="button"]{cursor:pointer}
.guest-selected-thumb[role="button"]:focus:not(:focus-visible),
.guest-selected-more[role="button"]:focus:not(:focus-visible),
.guest-review-preview[role="button"]:focus:not(:focus-visible){outline:none}
.guest-selected-thumb[role="button"]:focus-visible,
.guest-selected-more[role="button"]:focus-visible,
.guest-review-preview[role="button"]:focus-visible{
  outline:2px solid var(--theme-accent);
  outline-offset:2px
}
.guest-selected-thumb.has-caption,.guest-review-preview.has-caption{outline:2px solid var(--theme-accent);outline-offset:1px}
.guest-selected-thumb.has-caption::after,.guest-review-preview.has-caption::after{
  content:'✓';
  position:absolute;
  right:3px;
  bottom:3px;
  display:grid;
  place-items:center;
  width:17px;
  height:17px;
  border-radius:50%;
  color:var(--theme-text);
  background:var(--theme-accent-paint,var(--theme-accent));
  font-size:.62rem;
  font-weight:900
}
.guest-selected-thumb{position:relative}

.guest-upload-modal .field{margin:0}
.guest-upload-modal .field>label,
.guest-upload-modal .field .field-label-with-tip{color:var(--theme-text);font-size:.76rem;font-weight:800}
.guest-upload-modal .field select{
  width:100%;
  min-height:43px;
  color:var(--theme-control-text,var(--theme-text));
  background:var(--theme-control-background,var(--theme-surface));
  border-color:var(--theme-border)
}

.guest-file-review{
  padding:12px;
  border:1px solid var(--theme-border);
  border-radius:16px;
  background:color-mix(in srgb,var(--theme-primary) 3%,var(--theme-surface))
}
.guest-file-review[hidden]{display:none!important}
.guest-review-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px
}
.guest-review-heading>div{display:grid;gap:2px}
.guest-review-heading strong{font-size:.84rem}
.guest-review-heading small{color:var(--theme-muted);font-size:.68rem;line-height:1.4}
.guest-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.guest-review-item{
  content-visibility:auto;
  contain-intrinsic-size:auto 250px;
  min-width:0;
  display:grid;
  gap:6px;
  padding:7px;
  border:1px solid var(--theme-border);
  border-radius:12px;
  background:var(--theme-surface-paint,var(--theme-surface))
}
.guest-review-preview{
  position:relative;
  aspect-ratio:4/3;
  overflow:hidden;
  border-radius:8px;
  background:color-mix(in srgb,var(--theme-primary) 8%,var(--theme-surface))
}
.guest-review-preview img,.guest-review-preview video{width:100%;height:100%;display:block;object-fit:cover}
.guest-review-item input{
  width:100%;
  min-width:0;
  min-height:37px;
  padding:7px 9px;
  border:1px solid var(--theme-border);
  border-radius:9px;
  color:var(--theme-control-text,var(--theme-text));
  background:var(--theme-control-background,var(--theme-surface));
  font:inherit;
  font-size:.72rem
}
.guest-review-actions{display:flex;align-items:center;justify-content:space-between;gap:7px}
.guest-review-counter{color:var(--theme-muted);font-size:.63rem}
/* Remove sits on the photo as a small round ×, so it is easy to find and never mistaken for text. */
.guest-review-item{position:relative}
.guest-review-remove{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
  border:0;
  border-radius:50%;
  color:#fff;
  background:rgba(17,24,22,.68);
  box-shadow:0 1px 4px rgba(0,0,0,.3);
  cursor:pointer
}
.guest-review-remove svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}
.guest-review-remove:hover,.guest-review-remove:focus-visible{background:#b4233c}
/* A file taken back: faded, with its state where the caption count was. */
.guest-review-item.is-removed .guest-review-preview{opacity:.35;filter:grayscale(1)}
.guest-review-item.is-removed .guest-review-remove{display:none}
.guest-review-item.is-removed .guest-review-counter{color:#b4233c;font-weight:700}
.guest-upload-modal .upload-consent{
  margin:0;
  color:var(--theme-muted);
  font-size:.7rem;
  line-height:1.42
}
.guest-upload-modal .upload-consent input{accent-color:var(--theme-primary)}
.guest-upload-modal .upload-progress{margin:0}
.guest-upload-modal .upload-submit{
  width:100%;
  min-height:46px;
  margin:0;
  font-size:.84rem
}
body.guest-upload-modal-open{overflow:hidden!important}
body.guest-upload-modal-open .guest-upload-dock-tab{
  visibility:hidden!important;
  pointer-events:none!important
}

/* Full-screen upload review: swipe through selected media and caption in context. */
.guest-caption-viewer{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#fff;
  background:#070a09
}
.guest-caption-viewer[hidden]{display:none!important}
body.guest-caption-viewer-open{overflow:hidden!important}
.guest-caption-viewer-header{
  position:absolute;
  z-index:4;
  top:max(12px,env(safe-area-inset-top));
  left:16px;
  right:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  pointer-events:none
}
.guest-caption-viewer-header strong{
  padding:7px 11px;
  border-radius:999px;
  background:#0008;
  font-size:.75rem
}
.guest-caption-viewer-header button{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #ffffff35;
  border-radius:50%;
  color:#fff;
  background:#111b;
  font-size:1.7rem;
  line-height:1;
  cursor:pointer;
  pointer-events:auto
}
.guest-caption-viewer-stage{
  width:100vw;
  height:100dvh;
  display:grid;
  place-items:center
}
.guest-caption-viewer-stage img,.guest-caption-viewer-stage video{
  display:block;
  width:100%;
  height:100%;
  max-width:100vw;
  max-height:100dvh;
  object-fit:contain
}
.guest-caption-viewer-nav{
  position:absolute;
  z-index:4;
  top:50%;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  transform:translateY(-50%);
  border:1px solid #ffffff45;
  border-radius:50%;
  color:#fff;
  background:#111a;
  font-size:2rem;
  cursor:pointer
}
.guest-caption-viewer-nav:disabled{opacity:.25}
.guest-caption-viewer-prev{left:14px}.guest-caption-viewer-next{right:14px}
.guest-caption-viewer-panel{
  position:absolute;
  z-index:5;
  left:50%;
  bottom:max(14px,env(safe-area-inset-bottom));
  width:min(620px,calc(100vw - 28px));
  transform:translateX(-50%);
  padding:10px 12px 8px;
  border:1px solid color-mix(in srgb,var(--theme-accent) 48%,#fff);
  border-radius:17px;
  color:var(--theme-text);
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 32px #0006;
  backdrop-filter:blur(10px)
}
.guest-caption-viewer-panel label{display:grid;gap:5px}
.guest-caption-viewer-panel label>span{color:var(--theme-accent);font-size:.7rem;font-weight:850}
.guest-caption-viewer-panel label small{font-weight:600}
.guest-caption-viewer-panel textarea{
  width:100%;
  min-height:54px;
  max-height:88px;
  resize:none;
  padding:7px 9px;
  border:1px solid var(--theme-border);
  border-radius:10px;
  color:var(--theme-text);
  background:#fff;
  font:italic 650 .9rem/1.3 'DM Sans',system-ui,sans-serif
}
.guest-caption-viewer-meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:5px;
  color:var(--theme-muted);
  font-size:.66rem
}
.guest-caption-viewer-meta [data-caption-viewer-count]{margin-right:auto;font-weight:800}
.guest-caption-viewer-meta button{
  padding:2px 4px;
  border:0;
  color:#b4233c;
  background:transparent;
  font:inherit;
  font-weight:800;
  cursor:pointer
}
@media(max-width:700px){
  .guest-caption-viewer-nav{display:none}
  .guest-caption-viewer-panel{bottom:max(8px,env(safe-area-inset-bottom));width:calc(100vw - 16px);padding:8px 10px 7px;border-radius:15px}
  .guest-caption-viewer-panel textarea{min-height:50px;font-size:.86rem}
}

/* Business owner upload remains a normal management page. */
.owner-upload-page .guest-upload-main{
  position:relative;
  z-index:8;
  width:min(100% - 28px,760px);
  margin:-34px auto 60px
}
.owner-upload-page .guest-upload-panel{
  padding:28px;
  border:1px solid var(--theme-border);
  border-radius:24px;
  background:var(--theme-surface-paint,var(--theme-surface));
  box-shadow:0 18px 48px rgba(17,35,29,.15)
}
.owner-upload-page .guest-upload-panel>h2{
  margin:0 0 12px;
  font-family:var(--theme-heading-font,'Fraunces',Georgia,serif);
  text-align:center
}
.owner-upload-page .upload-form{display:grid;gap:15px}
.owner-upload-page .dropzone{position:relative;min-height:90px;border:1px dashed var(--theme-primary);border-radius:16px}
.owner-upload-page .dropzone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.owner-upload-page .dropzone>div{min-height:90px;display:grid;place-content:center;text-align:center;padding:14px}
.owner-upload-page .guest-upload-complete{padding:12px;border-radius:12px;background:color-mix(in srgb,var(--theme-primary) 6%,var(--theme-surface))}

@media(max-width:700px){
  .guest-upload-page:not(.owner-upload-page){
    --guest-panel-height:clamp(250px,35dvh,315px)
  }
  .guest-upload-page:not(.owner-upload-page) .guest-upload-hero .gallery-hero-content{
    left:18px!important;
    right:18px!important;
    bottom:calc(var(--guest-panel-height) + 18px)!important;
    max-width:calc(100% - 36px)!important
  }
  .guest-upload-page:not(.owner-upload-page) .guest-upload-main{
    width:calc(100% - 16px)
  }
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel{
    padding:16px 14px calc(13px + env(safe-area-inset-bottom));
    border-radius:21px 21px 0 0
  }
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel>h2{font-size:1.25rem}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel>.welcome-copy{margin-bottom:12px;font-size:.75rem}
  .guest-upload-page:not(.owner-upload-page) .guest-name-entry input{min-height:42px;font-size:.82rem}
  .guest-upload-page:not(.owner-upload-page) .guest-name-entry .field-hint{font-size:.63rem}
  .guest-upload-page:not(.owner-upload-page) .dropzone,
  .guest-upload-page:not(.owner-upload-page) .dropzone>div{min-height:50px}
  .guest-upload-page:not(.owner-upload-page) .dropzone>div{padding:6px 13px 6px 16px}
  .guest-upload-page:not(.owner-upload-page) .dropzone strong{font-size:.78rem}
  .guest-upload-page:not(.owner-upload-page) .dropzone strong+span{font-size:.59rem}

  .guest-upload-modal{
    place-items:end center;
    padding:0;
    background:rgba(8,20,17,.42)
  }
  .guest-upload-modal-card{
    width:100%;
    max-height:88dvh;
    padding:0 14px calc(14px + env(safe-area-inset-bottom));
    border-left:0;
    border-right:0;
    border-bottom:0;
    border-radius:22px 22px 0 0
  }
  .guest-upload-modal-header{margin:0 -14px;padding:15px 14px 12px}
  .guest-upload-modal-header h2{font-size:1.1rem}
  .guest-selected-summary{grid-template-columns:auto minmax(0,1fr);gap:8px}
  .guest-selected-summary .button{grid-column:1/-1;width:100%}
  .guest-selected-thumb,.guest-selected-more{width:37px;height:37px;flex-basis:37px}
  .guest-review-grid{gap:7px}
  .guest-review-item{padding:6px}

  /* Match Gallery Timescales mobile text hierarchy. */
  .guest-upload-modal-header .eyebrow{font-size:.76rem}
  .guest-upload-modal-header h2{font-size:1.2rem}
  .guest-uploading-as>span,
  .guest-uploading-as>small,
  .guest-selected-copy small,
  .guest-review-heading small,
  .guest-review-counter{font-size:.76rem;line-height:1.42}
  .guest-uploading-as>strong,
  .guest-selected-copy strong,
  .guest-review-heading strong,
  .guest-upload-modal .field>label,
  .guest-upload-modal .field .field-label-with-tip{
    font-size:.9rem
  }
  .guest-selected-summary .button,
  .guest-upload-modal .field select,
  .guest-review-item input,
  .guest-upload-modal .upload-consent,
  .guest-upload-modal .upload-submit{
    font-size:.82rem
  }
}

@media(max-height:700px){
  .guest-upload-page:not(.owner-upload-page){--guest-panel-height:clamp(230px,39dvh,280px)}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel>.welcome-copy{margin-bottom:9px}
  .guest-upload-page:not(.owner-upload-page) .guest-name-entry .field-hint{display:none}
}

/* Welcome dock uses the same simple bottom-sheet proportions as the gallery filter panel. */
.guest-upload-page:not(.owner-upload-page){--guest-panel-height:290px}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main{
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:min(640px,100vw)!important;
  max-height:none!important;
  margin:0 auto!important;
  overflow:visible!important;
  transform:none!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-panel{
  max-height:none!important;
  overflow:visible!important;
  padding:18px 18px calc(16px + env(safe-area-inset-bottom))!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:22px 22px 0 0!important;
  box-shadow:0 -18px 52px rgba(17,35,29,.16)!important
}
.guest-file-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-picker{
  width:100%;
  min-height:48px
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-picker-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-picker-icon svg{
  width:19px;
  height:19px
}
.guest-upload-page:not(.owner-upload-page) .guest-picker-note{
  display:block;
  margin:-3px 0 0;
  color:var(--theme-muted);
  font-size:.7rem;
  line-height:1.3;
  text-align:center
}
@media(max-width:700px){
  .guest-upload-page:not(.owner-upload-page){--guest-panel-height:285px}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-main{width:100vw!important}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel{
    padding:16px 16px calc(14px + env(safe-area-inset-bottom))!important
  }
}
@media(max-height:700px){
  .guest-upload-page:not(.owner-upload-page){--guest-panel-height:255px}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel{
    padding-top:13px!important;
    padding-bottom:calc(11px + env(safe-area-inset-bottom))!important
  }
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel>.welcome-copy{margin-bottom:8px!important}
  .guest-upload-page:not(.owner-upload-page) .guest-name-entry .field-hint{display:none!important}
}


/* Configurable cover sticker and welcome-panel decoration. */
.guest-upload-page:not(.owner-upload-page) .guest-upload-hero .gallery-hero-content{z-index:5!important}
.guest-upload-sticker{position:absolute;z-index:4;width:clamp(120px,24vw,220px);max-height:38%;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 3px 8px rgba(0,0,0,.12))}
.guest-upload-sticker-size-small{width:clamp(95px,18vw,165px);max-height:31%}
.guest-upload-sticker-size-medium{width:clamp(120px,24vw,220px);max-height:38%}
.guest-upload-sticker-size-large{width:clamp(150px,29vw,275px);max-height:45%}
.guest-upload-sticker-desktop-top-left{top:24px;left:max(16px,calc((100% - 1280px)/2));right:auto;bottom:auto;transform:none}
.guest-upload-sticker-desktop-top-center{top:24px;left:50%;right:auto;bottom:auto;transform:translateX(-50%)}
.guest-upload-sticker-desktop-top-right{top:24px;left:auto;right:max(16px,calc((100% - 1280px)/2));bottom:auto;transform:none}
.guest-upload-sticker-desktop-center-left{top:50%;left:max(16px,calc((100% - 1280px)/2));right:auto;bottom:auto;transform:translateY(-50%)}
.guest-upload-sticker-desktop-center-center{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%)}
.guest-upload-sticker-desktop-center-right{top:50%;left:auto;right:max(16px,calc((100% - 1280px)/2));bottom:auto;transform:translateY(-50%)}
.guest-upload-sticker-desktop-bottom-left{top:auto;left:max(16px,calc((100% - 1280px)/2));right:auto;bottom:24px;transform:none}
.guest-upload-sticker-desktop-bottom-center{top:auto;left:50%;right:auto;bottom:24px;transform:translateX(-50%)}
.guest-upload-sticker-desktop-bottom-right{top:auto;left:auto;right:max(16px,calc((100% - 1280px)/2));bottom:24px;transform:none}
.event-gallery-page .gallery-album-hero:has(.gallery-hero-media-count) .guest-upload-sticker-desktop-bottom-right{bottom:74px}
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-center-left,
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-center-center,
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-center-right{top:calc((100% - var(--guest-panel-height))/2)}
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-bottom-left,
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-bottom-center,
.guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-desktop-bottom-right{bottom:calc(var(--guest-panel-height) + 24px)}
.guest-upload-panel.has-panel-decoration{isolation:isolate}
.guest-upload-panel-decoration{position:absolute!important;z-index:0!important;top:0;right:0;width:min(44%,235px);height:78%;object-fit:contain;object-position:top right;pointer-events:none;user-select:none}
.guest-upload-panel.has-panel-decoration>*:not(.guest-upload-panel-decoration){position:relative;z-index:1}
@media(max-width:700px){
  .guest-upload-sticker{right:auto;width:clamp(105px,31vw,165px);max-height:33%}
  .guest-upload-sticker-size-small{width:clamp(82px,24vw,128px);max-height:27%}
  .guest-upload-sticker-size-medium{width:clamp(105px,31vw,165px);max-height:33%}
  .guest-upload-sticker-size-large{width:clamp(126px,38vw,198px);max-height:40%}
  .guest-upload-sticker-mobile-top-left{top:18px;left:13px;right:auto;bottom:auto;transform:none}
  .guest-upload-sticker-mobile-top-center{top:18px;left:50%;right:auto;bottom:auto;transform:translateX(-50%)}
  .guest-upload-sticker-mobile-top-right{top:18px;left:auto;right:13px;bottom:auto;transform:none}
  .guest-upload-sticker-mobile-center-left{top:50%;left:13px;right:auto;bottom:auto;transform:translateY(-50%)}
  .guest-upload-sticker-mobile-center-center{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%)}
  .guest-upload-sticker-mobile-center-right{top:50%;left:auto;right:13px;bottom:auto;transform:translateY(-50%)}
  .guest-upload-sticker-mobile-bottom-left{top:auto;left:13px;right:auto;bottom:18px;transform:none}
  .guest-upload-sticker-mobile-bottom-center{top:auto;left:50%;right:auto;bottom:18px;transform:translateX(-50%)}
  .guest-upload-sticker-mobile-bottom-right{top:auto;left:auto;right:13px;bottom:18px;transform:none}
  .event-gallery-page .gallery-album-hero:has(.gallery-hero-media-count) .guest-upload-sticker-mobile-bottom-right{bottom:82px}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-center-left,
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-center-center,
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-center-right{top:calc((100% - var(--guest-panel-height))/2)}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-bottom-left,
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-bottom-center,
  .guest-upload-page:not(.owner-upload-page) .guest-upload-sticker-mobile-bottom-right{bottom:calc(var(--guest-panel-height) + 20px)}
  .guest-upload-panel-decoration{width:42%;max-width:190px;height:74%}
}

/* Event welcome screen dock and header modes. */
.guest-upload-page:not(.owner-upload-page) .guest-upload-eyebrow{
  position:relative;
  z-index:2;
  margin:0 0 8px!important;
  line-height:1.2
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main{
  max-height:none!important;
  transition:transform .42s cubic-bezier(.22,.8,.25,1)
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main.is-collapsed{
  transform:translateY(calc(100% - var(--guest-dock-peek,72px)))!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main.is-open{
  transform:none!important
}
.guest-upload-dock-tab{
  position:relative;
  touch-action:pan-x;
  user-select:none;
  -webkit-user-select:none;
  z-index:3;
  width:100%;
  min-height:96px;
  display:block;
  padding:28px 18px 13px;
  border:0;
  border-radius:22px 22px 0 0;
  color:var(--theme-text);
  background:transparent;
  box-shadow:none;
  font:inherit;
  text-align:center;
  cursor:pointer
}
.guest-upload-dock-tab-copy{
  min-width:0;
  display:grid;
  gap:4px;
  justify-items:center
}
.guest-upload-dock-tab-copy strong{
  max-width:100%;
  overflow:visible;
  color:var(--theme-text);
  font-family:var(--theme-heading-font,'Fraunces',Georgia,serif);
  font-size:1.45rem;
  font-weight:700;
  line-height:1.12;
  text-overflow:clip;
  white-space:normal;
  overflow-wrap:anywhere
}
.guest-upload-dock-tab-copy small{
  max-width:100%;
  overflow:visible;
  color:var(--theme-muted);
  font-size:.82rem;
  line-height:1.42;
  text-overflow:clip;
  white-space:normal;
  overflow-wrap:anywhere
}
.guest-upload-dock-indicator{
  position:absolute;
  top:5px;
  left:50%;
  width:50px;
  height:16px;
  transform:translateX(-50%);
  color:color-mix(in srgb,var(--theme-primary-readable,var(--theme-primary)) 82%,var(--theme-text));
  transition:width .22s ease,height .22s ease,background .22s ease
}
.guest-upload-dock-indicator::before,
.guest-upload-dock-indicator::after{
  content:'';
  position:absolute;
  top:8px;
  width:28px;
  height:3px;
  border-radius:999px;
  background:currentColor
}
.guest-upload-dock-indicator::before{
  left:50%;
  transform-origin:right center;
  transform:translateX(-100%) rotate(-28deg)
}
.guest-upload-dock-indicator::after{
  left:50%;
  transform-origin:left center;
  transform:rotate(28deg)
}
.guest-upload-main.is-open .guest-upload-dock-indicator{
  top:10px;
  width:38px;
  height:4px;
  border-radius:999px;
  background:color-mix(in srgb,var(--theme-muted) 45%,transparent)
}
.guest-upload-main.is-open .guest-upload-dock-indicator::before,
.guest-upload-main.is-open .guest-upload-dock-indicator::after{display:none}
.guest-upload-page:not(.owner-upload-page) .guest-upload-main .guest-upload-panel{
  overflow:hidden!important;
  padding:0!important;
  border:1px solid var(--theme-border)!important;
  border-bottom:0!important;
  border-radius:22px 22px 0 0!important;
  background:var(--theme-surface)!important;
  box-shadow:0 -18px 52px rgba(17,35,29,.16)!important
}
.guest-upload-page:not(.owner-upload-page) .guest-upload-panel-body{
  position:relative;
  z-index:1;
  padding:0 18px calc(16px + env(safe-area-inset-bottom))
}
@keyframes guest-dock-nudge{
  0%,100%{transform:translateY(0)}
  28%{transform:translateY(-7px)}
  50%{transform:translateY(1px)}
  72%{transform:translateY(-3px)}
}
.guest-upload-dock-tab.guest-dock-nudge{animation:guest-dock-nudge .82s ease both}

/* Nothing below the upload dock should consume viewport height on the welcome screen. */
.guest-upload-page:not(.owner-upload-page)>.white-label-contact,
.guest-upload-page:not(.owner-upload-page)>.service-invite,
.guest-upload-page:not(.owner-upload-page)>.event-signoff,
.guest-upload-page:not(.owner-upload-page)>.site-footer,
.guest-upload-page:not(.owner-upload-page)>.gallery-service-footer{
  display:none!important
}

/* Header display is scoped to the welcome/upload screen only. */
.guest-header-transparent .event-topbar,
.guest-header-floating .event-topbar{
  position:fixed!important;
  z-index:95!important;
  top:0;
  left:0;
  right:0;
  width:100%
}
.guest-header-transparent .event-topbar{
  background:color-mix(in srgb,var(--theme-header,var(--theme-surface)) 50%,transparent)!important;
  border-bottom-color:color-mix(in srgb,var(--theme-border) 55%,transparent)!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px)
}
.guest-header-floating .event-topbar{
  padding-top:max(12px,env(safe-area-inset-top))!important;
  border-bottom:0!important;
  background:transparent!important
}
.guest-header-floating .event-topbar .brand{display:none!important}
.guest-header-floating .event-topbar-inner{justify-content:flex-end!important}
.guest-header-floating .event-nav a,
.guest-header-floating .event-nav button{
  border:1px solid color-mix(in srgb,var(--theme-border) 55%,transparent)!important;
  color:var(--theme-header-text,var(--theme-text))!important;
  background:color-mix(in srgb,var(--theme-header,var(--theme-surface)) 72%,transparent)!important;
  box-shadow:0 5px 18px rgba(10,25,20,.12);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px)
}

/* The settings preview iframe is scaled to a phone/desktop mock. Chromium can
   retain a stale compositor layer when a fixed backdrop-filter header changes
   between Standard/Transparent/Floating inside that transformed iframe, which
   looks like two headers stacked on top of the cover. The preview does not
   scroll as a public page does, so absolute positioning is visually equivalent
   here and avoids the fixed-layer duplication. */
.settings-live-preview-surface.guest-header-transparent .event-topbar,
.settings-live-preview-surface.guest-header-floating .event-topbar{
  position:absolute!important;
  transform:none!important;
  backface-visibility:hidden
}
.settings-live-preview-surface.guest-header-transparent .event-topbar,
.settings-live-preview-surface.guest-header-floating .event-topbar,
.settings-live-preview-surface.guest-header-floating .event-nav a,
.settings-live-preview-surface.guest-header-floating .event-nav button{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important
}

/* Preserve the normal header + cover boundary. navigation.js measures the existing
   cover and standard header in CSS pixels, including inside a scaled live preview.
   Never replace the cover with a viewport-based height or a guessed header size. */
.event-gallery-page.guest-header-transparent .gallery-album-hero.has-cover[data-gallery-overlay-height],
.event-gallery-page.guest-header-floating .gallery-album-hero.has-cover[data-gallery-overlay-height]{
  min-height:var(--gallery-overlay-cover-height)!important
}

/* Top-positioned text and stickers must clear overlaid header/buttons. The body
   selector outweighs the standard hero spacing rules that follow. */
body.guest-header-transparent.cover-text-desktop-top .guest-upload-hero .gallery-hero-content,
body.guest-header-floating.cover-text-desktop-top .guest-upload-hero .gallery-hero-content,
body.event-gallery-page.guest-header-transparent.cover-text-desktop-top .gallery-hero .gallery-hero-content,
body.event-gallery-page.guest-header-floating.cover-text-desktop-top .gallery-hero .gallery-hero-content{
  top:clamp(86px,11vh,118px)!important
}
body.guest-header-transparent .guest-upload-sticker-desktop-top-left,
body.guest-header-transparent .guest-upload-sticker-desktop-top-center,
body.guest-header-transparent .guest-upload-sticker-desktop-top-right,
body.guest-header-floating .guest-upload-sticker-desktop-top-left,
body.guest-header-floating .guest-upload-sticker-desktop-top-center,
body.guest-header-floating .guest-upload-sticker-desktop-top-right{
  top:clamp(86px,11vh,118px)!important
}

@media(max-width:700px){
  .guest-upload-dock-tab{
    min-height:92px;
    padding:27px 14px 11px
  }
  .guest-upload-dock-tab-copy{gap:4px}
  .guest-upload-dock-tab-copy strong{font-size:1.25rem;line-height:1.12}
  .guest-upload-dock-tab-copy small{font-size:.75rem;line-height:1.42}
  .guest-upload-dock-indicator{top:4px;width:46px}
  .guest-upload-dock-indicator::before,
  .guest-upload-dock-indicator::after{top:8px;width:26px}
  .guest-upload-main.is-open .guest-upload-dock-indicator{top:9px;width:36px}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel-body{
    padding:0 14px calc(13px + env(safe-area-inset-bottom))
  }
  .guest-header-floating .event-topbar{padding:9px 0 0!important}
  .guest-header-floating .event-nav{gap:6px}
  .guest-header-floating .event-nav a,
  .guest-header-floating .event-nav button{
    min-height:36px!important;
    padding:6px 10px!important;
    font-size:.76rem!important
  }
  body.guest-header-transparent.cover-text-mobile-top .guest-upload-hero .gallery-hero-content,
  body.guest-header-floating.cover-text-mobile-top .guest-upload-hero .gallery-hero-content,
  body.event-gallery-page.guest-header-transparent.cover-text-mobile-top .gallery-hero .gallery-hero-content,
  body.event-gallery-page.guest-header-floating.cover-text-mobile-top .gallery-hero .gallery-hero-content{
    top:76px!important
  }
  body.guest-header-transparent .guest-upload-sticker-mobile-top-left,
  body.guest-header-transparent .guest-upload-sticker-mobile-top-center,
  body.guest-header-transparent .guest-upload-sticker-mobile-top-right,
  body.guest-header-floating .guest-upload-sticker-mobile-top-left,
  body.guest-header-floating .guest-upload-sticker-mobile-top-center,
  body.guest-header-floating .guest-upload-sticker-mobile-top-right{
    top:74px!important
  }
}

/* Keep the upload review dialog attached to the viewport when the welcome dock is open. */
@media (min-width:761px){
  .guest-upload-page:not(.owner-upload-page) .guest-upload-main.is-open{transform:none!important}
  .guest-upload-page:not(.owner-upload-page) .guest-upload-panel{max-height:min(690px,calc(100dvh - 100px))!important;overflow-y:auto!important;overscroll-behavior:contain}
  .guest-upload-modal-card{max-height:calc(100dvh - 36px);overflow-y:auto}
}

/* Keep desktop upload review attached to the bottom edge, with its own scroll area. */
@media (min-width:761px){.guest-upload-modal{place-items:end center;padding:18px 18px 0}.guest-upload-modal-card{width:min(780px,100%);max-height:calc(100dvh - 36px);border-radius:24px 24px 0 0;padding-bottom:max(20px,env(safe-area-inset-bottom));overflow-y:auto}}


/* Guest upload dialog controls: maintain contrast on dark/custom themes. */
.guest-upload-modal-close{
  color:#17211e!important;
  background:#fff!important;
  border-color:color-mix(in srgb,#17211e 18%,transparent)!important;
}
.guest-upload-modal-close .gallery-ui-icon{
  color:#17211e!important;
  stroke:#17211e!important;
}
.guest-upload-success-actions .button-secondary{
  color:var(--theme-control-text,var(--theme-text))!important;
  background:var(--theme-control-background,var(--theme-surface))!important;
  border-color:var(--theme-border)!important;
}
.guest-upload-modal .button,
.guest-upload-success-actions .button{
  font-size:.95rem!important;
  font-weight:800!important;
}
@media(max-width:700px){
  .guest-upload-modal .button,
  .guest-upload-success-actions .button{
    font-size:.92rem!important;
  }
}

.guest-selected-thumb.is-preview-loading::before,.guest-review-preview.is-preview-loading::before{
  content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 25%,color-mix(in srgb,var(--theme-primary) 8%,#fff) 42%,transparent 58%);animation:guest-preview-loading 1.1s linear infinite
}
@keyframes guest-preview-loading{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.selection-preview-fallback{width:100%;height:100%;display:grid;place-content:center;gap:2px;padding:8px;text-align:center;color:var(--theme-muted);background:color-mix(in srgb,var(--theme-primary) 5%,var(--theme-surface))}
.selection-preview-fallback strong{font-size:.64rem;line-height:1.15;color:var(--theme-text)}
.selection-preview-fallback small{font-size:.54rem;line-height:1.2;color:var(--theme-muted)}
.guest-selected-thumb .selection-preview-fallback small{display:none}
.guest-selected-thumb .selection-preview-fallback strong{font-size:0}
.guest-selected-thumb .selection-preview-fallback strong::after{content:'Photo';font-size:.58rem}
.guest-caption-viewer-unavailable{display:grid;place-content:center;gap:8px;width:min(420px,85vw);padding:24px;text-align:center;color:#fff}
.guest-caption-viewer-unavailable strong{font:700 1.2rem/1.2 'Fraunces',Georgia,serif}
.guest-caption-viewer-unavailable span{font:.9rem/1.4 system-ui,sans-serif;color:#d8dedb}


/* Once the review modal is open, the welcome dock must stop being a transformed containing block.
   Otherwise mobile browsers position the fixed review modal inside the short welcome dock and the
   consent/upload action dock ends up below the visible viewport. */
body.guest-upload-modal-open .guest-upload-main{
  transform:none!important
}

/* Review modal: preserve the original scrolling sheet. Only the final consent + submit
   controls stay pinned to the bottom; upload progress remains in the normal content flow. */
.guest-upload-modal-body{display:contents}
@media (min-width:701px){
  /* Desktop review lists can contain dozens of images. Keep the consent and
     upload button in view inside the scrollable dialog, just as on mobile. */
  .guest-upload-modal-card{padding-bottom:0!important}
  .guest-upload-action-dock{
    position:sticky;
    z-index:6;
    bottom:0;
    display:grid;
    gap:10px;
    margin:0 -20px;
    padding:12px 20px 16px;
    border-top:1px solid var(--theme-border);
    background:color-mix(in srgb,var(--theme-surface) 97%,transparent);
    box-shadow:0 -10px 26px rgba(0,0,0,.08);
    backdrop-filter:blur(12px)
  }
}
@media (max-width:700px){
  .guest-upload-modal-card{
    max-height:88dvh!important;
    height:auto!important;
    display:grid!important;
    align-content:start!important;
    gap:14px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    padding:0 14px 0!important
  }
  .guest-upload-action-dock{
    position:sticky;
    z-index:6;
    bottom:0;
    display:grid;
    gap:10px;
    margin:0 -14px;
    padding:12px 14px calc(14px + env(safe-area-inset-bottom));
    border-top:1px solid var(--theme-border);
    background:color-mix(in srgb,var(--theme-surface) 97%,transparent);
    box-shadow:0 -10px 26px rgba(0,0,0,.08);
    backdrop-filter:blur(12px)
  }
  /* Captions stay open while files upload; only removing a file is off once it may already be sent. */
}

/* The permission tick sits with the name, so uploads can start the moment photos are picked. */
.guest-consent-early{display:flex;gap:10px;align-items:flex-start;margin:4px 0 14px;font-size:.84rem;line-height:1.4;color:var(--theme-muted,#5f6b66);text-align:left}
.guest-consent-early input{flex:0 0 auto;width:20px;height:20px;margin:1px 0 0;accent-color:var(--theme-primary)}
.guest-consent-early a{color:inherit}
/* Files can still be taken back while uploading and after; the upload warning goes once done. */
body.guest-is-upload-done .upload-warning{display:none!important}
.guest-review-item input:disabled,[data-caption-viewer-input]:disabled{opacity:.55;background:transparent;cursor:not-allowed}

/* Guest Upload page polish: buttons and controls match the gallery layouts (assets/css/gallery-layouts.css):
 * 44px+ pill buttons, the same weights, primary/secondary styles and theme colours. No layout changes. */
html body.guest-upload-page:not(.owner-upload-page) .client-gallery-header-actions .gallery-header-link,
html body.guest-upload-page:not(.owner-upload-page) .client-gallery-header-actions .gallery-share-button{min-height:44px!important;height:auto!important;padding-inline:16px;font-weight:700}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-picker{min-height:52px;gap:9px;border-radius:999px;font-weight:800}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-picker:focus-visible,
html body.guest-upload-page:not(.owner-upload-page) .upload-submit:focus-visible,
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-success-actions .button:focus-visible,
html body.guest-upload-page:not(.owner-upload-page) .guest-caption-review-button:focus-visible{outline:3px solid var(--theme-accent,#c6a56f);outline-offset:2px}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-main input[type="text"],
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-main select{min-height:48px;padding-inline:14px;border:1px solid var(--theme-border);border-radius:12px;color:var(--theme-control-text,var(--theme-text));background:var(--theme-control-background,var(--theme-surface));font-size:16px}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-main input[type="text"]:focus,
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-main select:focus{border-color:color-mix(in srgb,var(--theme-primary) 58%,var(--theme-border));outline:2px solid color-mix(in srgb,var(--theme-primary) 22%,transparent);outline-offset:0}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-main input[type="checkbox"]{width:22px;height:22px;flex:0 0 22px;accent-color:var(--theme-primary);cursor:pointer}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-modal-close{width:44px;height:44px;flex-basis:44px}
html body.guest-upload-page:not(.owner-upload-page) .guest-caption-review-button{min-height:44px;padding-inline:18px;border-radius:999px;font-weight:800}
html body.guest-upload-page:not(.owner-upload-page) .guest-review-heading .selection-link{min-height:44px;padding-inline:12px;border-radius:999px}
html body.guest-upload-page:not(.owner-upload-page) .upload-submit{min-height:52px;border-radius:999px;font-weight:800}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-success-actions .button{min-height:48px;border-radius:999px;font-weight:800}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-success-actions .button-secondary{color:var(--theme-primary);background:var(--theme-surface);border:1px solid var(--theme-border)}
html body.guest-upload-page:not(.owner-upload-page) .progress-wrap{height:10px;border-radius:999px}
html body.guest-upload-page:not(.owner-upload-page) .progress-bar{border-radius:inherit}
@media(prefers-reduced-motion:reduce){html body.guest-upload-page:not(.owner-upload-page) .progress-bar{transition:none}}

/* "Leave a message": a written note without a photo (assets/js/guest-message.js). Theme colours throughout. */
html body.guest-upload-page:not(.owner-upload-page) .guest-message-open{width:100%;min-height:46px;gap:8px;margin-top:10px;border-radius:999px;font-weight:700}
.guest-message-open svg{width:19px;height:19px;flex:none}
.guest-message-dialog{width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid var(--theme-border);border-radius:22px;color:var(--theme-text);background:var(--theme-surface,#fff);box-shadow:0 24px 70px rgba(0,0,0,.28);overflow:auto}
.guest-message-dialog::backdrop{background:rgba(6,12,10,.5);backdrop-filter:blur(2px)}
.guest-message-sheet{display:grid;gap:8px;padding:22px 20px 20px}
.guest-message-sheet[hidden]{display:none}
.guest-message-sheet h2{margin:0;color:var(--theme-text);font-family:var(--theme-heading-font,inherit);font-size:1.4rem}
.guest-message-intro,.guest-message-done p{margin:0 0 6px;color:var(--theme-muted);font-size:.9rem;line-height:1.45}
.guest-message-label{margin-top:4px;color:var(--theme-text);font-size:.84rem;font-weight:700}
html body.guest-upload-page .guest-message-dialog input[type="text"],
html body.guest-upload-page .guest-message-dialog textarea{width:100%;min-height:48px;padding:11px 14px;border:1px solid var(--theme-border);border-radius:12px;color:var(--theme-control-text,var(--theme-text));background:var(--theme-control-background,var(--theme-surface));font:inherit;font-size:16px;box-sizing:border-box}
.guest-message-dialog textarea{min-height:130px;resize:vertical;line-height:1.45}
.guest-message-dialog input:focus,.guest-message-dialog textarea:focus{outline:3px solid color-mix(in srgb,var(--theme-accent,#c6a56f) 55%,transparent);outline-offset:1px}
.guest-message-count{justify-self:end;margin-top:-4px;color:var(--theme-muted);font-size:.75rem}
.guest-message-consent{margin:0;color:var(--theme-muted);font-size:.8rem;line-height:1.4}
.guest-message-error{margin:0;padding:9px 12px;border-radius:10px;color:#8a1f1f;background:#fdeceb;font-size:.85rem}
.guest-message-error[hidden]{display:none}
.guest-message-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
.guest-message-actions .button{min-height:46px;border-radius:999px;padding-inline:20px;font-weight:700}
@media(max-width:520px){.guest-message-dialog{margin:auto auto 0;width:100%;max-width:none;border-radius:22px 22px 0 0}.guest-message-actions .button{flex:1}}
.guest-message-sheet{text-align:left}
.guest-message-done{text-align:center}
.guest-message-done .guest-message-actions{justify-content:center}
