/* ============================================================
   Booth Wedding — style.css  ·  "Sage Grove" design
   Anchored on the wedding color #5F8575.
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */

:root {
  /* Existing names kept (app.js / markup depend on them) — values repointed to Sage Grove */
  --color-dominant:    #F4F1EA;  /* warm cream surface */
  --color-secondary:   #ECE7DB;  /* warm neutral fill */
  --color-accent:      #5F8575;  /* sage (the wedding color) */
  --color-accent-dark: #43604F;  /* deep pine */
  --color-accent-muted:#B7C0BC;  /* muted line */
  --color-text:        #283029;  /* deep charcoal-green */
  --color-placeholder: #94A09A;
  --color-border:      #C9CFC9;
  --color-destructive: #B23B2E;
  --color-error-bg:    #F6ECEA;

  /* New Sage Grove tokens */
  --cream:      #F4F1EA;
  --card:       #FBFAF5;
  --sage-soft:  #D6E3DB;
  --sand:       #C7B299;
  --subtext:    #5A625C;

  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 9999px;
  --shadow: 0 8px 28px rgba(67, 96, 79, 0.10);
}

/* ── Reset / Base ───────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  min-height: 100vh;
  color: var(--color-text);
  font-family: 'Mulish', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { touch-action: manipulation; font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Keyframe Library ───────────────────────────────────────── */

@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes screenSlideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kenburns { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes shimmer  { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }
@keyframes breathe  { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* ── Screen Toggle ──────────────────────────────────────────── */

.screen { display: none; }
.screen.active { display: block; }

#screen-file.active,
#screen-progress.active,
#screen-confirm.active,
#screen-already-uploaded.active {
  animation: screenSlideUp 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Layout ─────────────────────────────────────────────────── */

main {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
}

.content { padding: 4px var(--space-lg) 40px; }
.content--top { padding-top: 36px; }
.content--center {
  padding-top: 40px;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.footnote {
  text-align: center;
  color: var(--color-accent);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: var(--space-lg);
  opacity: 0.7;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero-wrap {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 380px;
  overflow: hidden;
  animation: fadeIn 700ms ease both;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  display: block;
  animation: kenburns 10s ease-out forwards;
}

.hero-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--cream) 2%, rgba(244,241,234,0.5) 22%, transparent 52%);
}

.hero-cap {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  z-index: 2;
  padding: 0 var(--space-lg);
}

.couple-script {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 32px;
  color: var(--color-accent-dark);
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0.4px;
}

.couple-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: var(--space-sm) 0 0;
}

/* ── Landing entrance (staggered) ───────────────────────────── */

#screen-landing.active .laurel    { animation: fadeUp 420ms 140ms cubic-bezier(0.22,1,0.36,1) both; }
#screen-landing.active .text-display { animation: fadeUp 420ms 220ms cubic-bezier(0.22,1,0.36,1) both; }
#screen-landing.active .subhead   { animation: fadeUp 400ms 290ms cubic-bezier(0.22,1,0.36,1) both; }
#screen-landing.active .divider   { animation: fadeIn 380ms 360ms ease both; }
#screen-landing.active .card      { animation: fadeUp 420ms 420ms cubic-bezier(0.22,1,0.36,1) both; }

/* ── Botanical accents ──────────────────────────────────────── */

.laurel {
  display: block;
  width: 112px;
  margin: var(--space-sm) auto 0;
  opacity: 0.92;
}
.laurel--sm { width: 88px; margin: 0 auto var(--space-sm); }

/* Centered couple photo on the locked / "coming soon" screen */
.locked-photo {
  display: block;
  width: 210px;
  height: 210px;
  max-width: 60vw;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-sm) 0 var(--space-lg);
}
.divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent-muted), transparent);
}
.divider-sprig { width: 30px; height: 30px; object-fit: contain; }

/* ── Brand mini (inner screens) ─────────────────────────────── */

.brand-mini {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--color-accent-dark);
  text-align: center;
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.2;
}

/* ── Typography ─────────────────────────────────────────────── */

.text-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 33px;
  font-weight: 600;
  line-height: 1.12;
  text-align: center;
  margin: var(--space-sm) 0 var(--space-sm);
  color: var(--color-text);
}

.text-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text);
}
.text-heading--center { text-align: center; }

.text-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--color-accent-dark);
}

.text-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  margin: 0;
  color: var(--color-text);
}

.subhead {
  text-align: center;
  margin: 0 auto var(--space-lg);
  color: var(--subtext);
  max-width: 320px;
}

.success-body { text-align: center; color: var(--subtext); }

.upload-summary {
  text-align: center;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--space-md);
}
.upload-summary:empty { display: none; }

/* ── Card ───────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(95, 133, 117, 0.10);
  padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + var(--space-xs));
}

/* ── Form ───────────────────────────────────────────────────── */

.names-row { display: flex; gap: var(--space-md); margin-bottom: var(--space-md); }
.names-row .form-group { flex: 1; margin: 0; }
.form-group { margin-bottom: var(--space-md); }

input[type="text"] {
  height: 52px;
  padding: 0 var(--space-md);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 400;
  font-family: inherit;
  color: var(--color-text);
  width: 100%;
  display: block;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

input[type="text"]::placeholder { color: var(--color-placeholder); }

input[type="text"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

/* ── Primary Button (sage pill) ─────────────────────────────── */

.btn-primary {
  height: 56px;
  width: 100%;
  background: var(--color-accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  box-shadow: 0 6px 18px rgba(95, 133, 117, 0.32);
  transition: box-shadow 200ms ease, transform 150ms ease, background-color 200ms ease, filter 200ms ease;
}
.btn-primary .btn-ico { width: 18px; height: 18px; }
.btn-primary:not(:disabled):hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.btn-primary:not(:disabled):active { transform: scale(0.985); box-shadow: 0 2px 8px rgba(95,133,117,0.25); }
.btn-primary:disabled {
  background: var(--color-accent-muted);
  cursor: not-allowed; pointer-events: none; box-shadow: none;
}

/* ── Upload card ────────────────────────────────────────────── */

.upload-card { display: flex; flex-direction: column; align-items: center; text-align: center; }

.upload-halo {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--sage-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-lg);
}
.upload-halo svg { width: 34px; height: 34px; }

.btn-file-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: 52px;
  width: 100%;
  background: var(--color-secondary);
  border: 1px solid var(--sand);
  color: var(--color-accent-dark);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--r-full);
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 200ms ease, transform 150ms ease;
}
.btn-file-picker .btn-ico { width: 18px; height: 18px; }
.btn-file-picker:hover { background: #fff; transform: translateY(-1px); }
.btn-file-picker:active { transform: translateY(0); }

.upload-help {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--subtext);
  margin: var(--space-md) var(--space-sm) var(--space-lg);
}

.file-count { margin-top: var(--space-sm); min-height: 1.4em; color: var(--subtext); font-size: 14px; }

.upload-card .btn-upload, .upload-card #btn-upload { margin-top: 0; }

/* ── Stepper ────────────────────────────────────────────────── */

.stepper {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.stepper .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.stepper .dot--on { background: var(--color-accent); }
.stepper-label {
  margin-left: var(--space-sm);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-accent); opacity: 0.75;
}

/* ── Progress Bar ───────────────────────────────────────────── */

.progress-track {
  height: 12px;
  background: var(--color-secondary);
  border-radius: var(--r-full);
  width: 100%;
  overflow: hidden;
  margin-top: var(--space-md);
  box-shadow: inset 0 1px 3px rgba(95, 133, 117, 0.15);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage-soft) 0%, var(--color-accent) 50%, var(--sage-soft) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-full);
  width: 0%;
  transition: width 0.1s linear;
  animation: shimmer 1.8s ease-in-out infinite;
}

#screen-progress.active .text-heading {
  animation:
    fadeUp 400ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both,
    breathe 2.4s 700ms ease-in-out infinite;
}

/* ── Error Panel ────────────────────────────────────────────── */

.error-panel {
  background: var(--color-error-bg);
  border-left: 4px solid var(--color-destructive);
  padding: var(--space-md);
  border-radius: var(--r-md);
  margin-bottom: var(--space-lg);
  text-align: left;
  animation: slideInLeft 350ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.error-heading { font-size: 16px; font-weight: 700; color: var(--color-destructive); margin: 0 0 var(--space-sm) 0; }
.error-body { font-size: 14px; font-weight: 400; color: var(--color-text); margin: 0; line-height: 1.5; }

.btn-retry {
  height: 52px;
  width: 100%;
  background: var(--color-secondary);
  border: 1px solid var(--sand);
  color: var(--color-accent-dark);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-full);
  cursor: pointer;
  box-sizing: border-box;
  margin-top: var(--space-md);
  transition: background 200ms ease, transform 150ms ease;
}
.btn-retry:hover { background: #fff; transform: translateY(-1px); }
.btn-retry:active { transform: translateY(0); }

/* ── File Error Inline ──────────────────────────────────────── */

.file-error {
  background: var(--color-error-bg);
  border-left: 4px solid var(--color-destructive);
  padding: var(--space-md);
  border-radius: var(--r-md);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: var(--space-md);
  text-align: left;
}
.file-error[hidden] { display: none; }

/* ── Animated Checkmark (success) ───────────────────────────── */

.success-icon { display: flex; justify-content: center; margin-bottom: var(--space-md); }
.checkmark { width: 64px; height: 64px; }
.checkmark-circle {
  stroke: var(--color-accent); stroke-width: 2;
  stroke-dasharray: 157; stroke-dashoffset: 157; fill: none;
  animation: drawCircle 0.65s cubic-bezier(0.65, 0, 0.45, 1) 0.25s forwards;
}
.checkmark-check {
  stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48; fill: none;
  animation: drawCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.9s forwards;
}

/* ── Reduced Motion ─────────────────────────────────────────── */

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

/* ============================================================
   File Uploader — drop zone + per-file cards (integrated from
   quick-260603-rpi). Token-driven → inherits Sage Grove palette.
   ============================================================ */
@keyframes cloudFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardCollapse {
  0%   { opacity: 1; max-height: 120px; margin-bottom: var(--space-sm); padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
  100% { opacity: 0; max-height: 0;     margin-bottom: 0;               padding-top: 0;               padding-bottom: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes cardCheckCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes cardCheckPath {
  to { stroke-dashoffset: 0; }
}

/* ── Drop Zone ──────────────────────────────────────────────── */

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 160px;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-secondary);
  border: 2px dashed var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  margin-bottom: var(--space-md);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 150ms ease;
  /* Ensure it's focusable */
  outline: none;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  background: var(--color-dominant);
  border-color: var(--color-accent);
  box-shadow: 0 4px 14px rgba(95, 133, 117, 0.2);
  transform: translateY(-1px);
}

.drop-zone:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(95, 133, 117, 0.15);
}

.drop-zone.is-dragover {
  background: var(--color-dominant);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(95, 133, 117, 0.18), 0 6px 20px rgba(95, 133, 117, 0.25);
  transform: scale(1.01);
}

.drop-zone.is-dragover .icon-cloud {
  animation: cloudFloat 0.6s ease-in-out infinite;
}

/* ── Cloud Icon ─────────────────────────────────────────────── */

.icon-cloud {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  flex-shrink: 0;
  animation: cloudFloat 3s ease-in-out infinite;
}

/* ── Drop Zone Text ─────────────────────────────────────────── */

.drop-zone-primary {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0;
  line-height: 1.3;
}

.drop-zone-hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-placeholder);
  margin: 0;
  font-style: italic;
}

.picker-limit-hint {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--subtext);
  text-align: center;
  margin: var(--space-sm) 0 0 0;
  line-height: 1.4;
}

/* ── File Card List ─────────────────────────────────────────── */

.file-card-list {
  list-style: none;
  margin: 0 0 var(--space-sm) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ── File Card ──────────────────────────────────────────────── */

.file-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  animation: cardEnter 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.file-card.removing {
  animation: cardCollapse 260ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
  pointer-events: none;
}

/* ── File Thumbnail ─────────────────────────────────────────── */

.file-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-dominant);
}

.file-thumb--generic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: var(--color-dominant);
  border: 1px solid var(--color-border);
  color: var(--color-accent-muted);
  flex-shrink: 0;
}

.file-thumb--generic svg {
  width: 26px;
  height: 26px;
}

/* ── Card Meta ──────────────────────────────────────────────── */

.file-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.3;
}

.file-card-size {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-placeholder);
  margin: 0;
  line-height: 1.2;
}

/* ── Per-file Progress Bar ──────────────────────────────────── */

.file-card-bar {
  height: 6px;
  background: var(--color-dominant);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
  box-shadow: inset 0 1px 2px rgba(95, 133, 117, 0.12);
}

.file-card-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    var(--color-accent-muted) 0%,
    var(--color-accent) 50%,
    var(--color-accent-muted) 100%
  );
  background-size: 200% 100%;
  transition: width 0.12s linear;
  animation: shimmer 1.8s ease-in-out infinite;
}

.file-card-bar-fill.is-done {
  background: var(--color-accent);
  background-size: 100% 100%;
  animation: none;
  width: 100% !important;
}

.file-card-bar-fill.is-error {
  background: var(--color-destructive);
  background-size: 100% 100%;
  animation: none;
}

/* ── Per-card Completion Check ──────────────────────────────── */

.file-card-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: none;
}

.file-card-check.visible {
  display: block;
}

.file-card-check .card-check-circle {
  stroke: var(--color-accent);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: cardCheckCircle 0.5s cubic-bezier(0.65, 0, 0.45, 1) 0.05s forwards;
}

.file-card-check .card-check-path {
  stroke: var(--color-accent);
  stroke-dasharray: 38;
  stroke-dashoffset: 38;
  animation: cardCheckPath 0.25s cubic-bezier(0.65, 0, 0.45, 1) 0.55s forwards;
}

/* ── Card Status Icons (spinner / error dot) ────────────────── */

.file-card-status {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-card-spinner {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  animation: spin 0.8s linear infinite;
  display: none;
}

.file-card.is-uploading .file-card-spinner {
  display: block;
}

.file-card-error-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-destructive);
  display: none;
}

.file-card.is-error .file-card-error-dot {
  display: block;
}

/* ── Remove Button (per-card) ───────────────────────────────── */

.btn-card-remove {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-placeholder);
  flex-shrink: 0;
  padding: 0;
  transition: color 200ms ease, background 200ms ease;
}

.btn-card-remove:hover {
  color: var(--color-destructive);
  background: var(--color-error-bg);
}

.btn-card-remove:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-card-remove svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ── File Controls Row ──────────────────────────────────────── */

.file-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 1.5em;
  margin-bottom: var(--space-md);
}

.file-count {
  margin: 0;
  color: var(--color-placeholder);
  font-size: 14px;
}

/* ── Clear All Button ───────────────────────────────────────── */

.btn-clear-all {
  background: none;
  border: none;
  padding: var(--space-xs) var(--space-sm);
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-placeholder);
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 200ms ease, background 200ms ease;
  touch-action: manipulation;
}

.btn-clear-all:hover {
  color: var(--color-destructive);
  background: var(--color-error-bg);
}

.btn-clear-all:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-clear-all[hidden] { display: none; }

/* ── Upload-locked state on #screen-file (set by setUploadingUI) ──── */
/* While uploading, the selection cannot change: hide the drop zone, the
   clear-all control and per-card remove buttons. Cards + their progress
   bars stay visible and fill live. */
#screen-file.is-uploading #drop-zone,
#screen-file.is-uploading #btn-clear-all,
#screen-file.is-uploading .btn-card-remove {
  display: none;
}


/* ── Video thumbnail tile (poster frame set inline + play badge) ── */
.file-thumb--video {
  position: relative;
  background-color: var(--color-dominant);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.file-thumb--video::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(40, 48, 41, 0.55);
}
.file-thumb--video::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateX(1px);
}

/* ── TEMP: on-screen upload error detail (remove after debugging) ── */
.error-detail {
  margin: var(--space-sm) 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-destructive);
  word-break: break-word;
}
.error-detail:empty { display: none; }

/* ── Survey (one-time guest feedback) ──────────────────────── */

#survey { margin-top: var(--space-lg); }

.survey-card {
  background: var(--card);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  text-align: left;
}

.survey-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  text-align: center;
}

.survey-question {
  margin: 0 0 var(--space-md);
}

.survey-q-text {
  font-size: 0.875rem;
  color: var(--subtext);
  margin: 0 0 var(--space-sm);
  line-height: 1.4;
}

.survey-choices {
  display: flex;
  gap: var(--space-sm);
}

.survey-choice {
  flex: 1;
  padding: 9px var(--space-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: center;
}

.survey-choice:hover {
  border-color: var(--color-accent);
  background: var(--sage-soft);
}

.survey-choice.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.survey-submit {
  width: 100%;
  margin-top: var(--space-sm);
}

.survey-submit:disabled {
  opacity: 0.45;
  cursor: default;
}

#survey-thanks { margin-top: var(--space-md); }

.survey-thanks-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  text-align: center;
  margin: 0;
  animation: fadeIn 400ms ease both;
}

/* ── Global Footer ──────────────────────────────────────────── */
.site-footer {
  padding: 0 var(--space-lg) calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.site-footer-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0 0 var(--space-md);
  opacity: 0.7;
}
.site-footer-note {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--subtext);
}
.site-footer-copy {
  margin: var(--space-md) 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  opacity: 0.75;
}
