:root {
  --beige: #ece1cc;
  --beige-dark: #d9c7a3;
  --ivory: #fffdf8;
  --sauge: #a7bf9d;
  --sauge-dark: #7f9a72;
  --lilas: #d3c1e5;
  --lilas-dark: #b596cf;
  --gold: #c8a662;
  --text: #4b4335;
  --text-soft: #7a7160;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(120, 100, 70, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--beige) 0%, var(--ivory) 45%, #f3ece1 100%);
  overflow-x: hidden;
}

.hidden { display: none !important; }

h1, h2, .title, .eyebrow {
  font-family: 'Cormorant Garamond', serif;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
}

.screen { width: 100%; }
.screen--center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 166, 98, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 30px;
  text-align: center;
  width: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  color: var(--sauge-dark);
  margin: 0 0 6px;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}

.title {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.subtitle {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0 0 26px;
}

.form { display: flex; flex-direction: column; gap: 16px; }

.field { text-align: left; display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--sauge-dark); font-weight: 500; }
.field input {
  border: 1.5px solid var(--beige-dark);
  background: var(--ivory);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: var(--lilas-dark); }

.btn {
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: block;
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--sauge) 0%, var(--sauge-dark) 100%);
  color: #fff;
  margin-top: 6px;
  box-shadow: 0 8px 20px rgba(127, 154, 114, 0.35);
}

.btn--capture {
  background: var(--ivory);
  border: 1.5px solid var(--lilas-dark);
  color: var(--text);
  margin-bottom: 12px;
  box-shadow: 0 6px 16px rgba(181, 150, 207, 0.18);
}
.btn--capture span { display: block; }
.btn--capture-alt { border-color: var(--sauge-dark); }

.btn[disabled], .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.error {
  color: #a2524a;
  background: #fbe9e6;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 14px;
}

.topbar { text-align: center; margin-bottom: 18px; }
.hello { font-size: 17px; margin: 4px 0 0; }
.hello span { font-weight: 600; color: var(--sauge-dark); }

.quotas {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.quota-pill {
  background: var(--ivory);
  border: 1px solid var(--beige-dark);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quota-icon { font-size: 15px; }

.capture-actions { margin-bottom: 6px; }

.hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin: 4px 0 20px;
}

.uploading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--sauge-dark);
  font-size: 14px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 24px;
  margin: 10px 0 14px;
  color: var(--text);
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--beige-dark);
  box-shadow: 0 4px 10px rgba(120,100,70,0.15);
}
.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(75, 67, 53, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
}
.gallery-item .delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(75, 67, 53, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.empty {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 10px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--beige-dark);
  border-top-color: var(--sauge-dark);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.spinner--small { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Decorations florales --- */
.flowers {
  position: fixed;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  background-repeat: no-repeat;
  background-size: contain;
}
.flowers--tl { top: -50px; left: -60px; transform: rotate(-8deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><g fill='none' stroke-linecap='round'><path d='M40 160 Q30 100 55 60' stroke='%237f9a72' stroke-width='4'/><path d='M55 60 Q75 75 60 100' stroke='%237f9a72' stroke-width='3'/><path d='M45 110 Q25 120 20 140' stroke='%237f9a72' stroke-width='3'/></g><g><circle cx='55' cy='55' r='13' fill='%23d3c1e5'/><circle cx='40' cy='45' r='13' fill='%23e3d6ef'/><circle cx='70' cy='45' r='13' fill='%23e3d6ef'/><circle cx='45' cy='68' r='13' fill='%23c8a9df'/><circle cx='68' cy='68' r='13' fill='%23c8a9df'/><circle cx='55' cy='55' r='7' fill='%23c8a662'/></g><g transform='translate(15,110)'><circle cx='10' cy='10' r='9' fill='%23ece1cc'/><circle cx='0' cy='2' r='9' fill='%23fffdf8'/><circle cx='20' cy='2' r='9' fill='%23fffdf8'/><circle cx='2' cy='18' r='9' fill='%23e3d6c4'/><circle cx='18' cy='18' r='9' fill='%23e3d6c4'/><circle cx='10' cy='10' r='5' fill='%23c8a662'/></g></svg>");
}
.flowers--br { bottom: -55px; right: -60px; transform: rotate(172deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><g fill='none' stroke-linecap='round'><path d='M40 160 Q30 100 55 60' stroke='%23a7bf9d' stroke-width='4'/><path d='M55 60 Q75 75 60 100' stroke='%23a7bf9d' stroke-width='3'/><path d='M45 110 Q25 120 20 140' stroke='%23a7bf9d' stroke-width='3'/></g><g><circle cx='55' cy='55' r='13' fill='%23c8a9df'/><circle cx='40' cy='45' r='13' fill='%23d3c1e5'/><circle cx='70' cy='45' r='13' fill='%23d3c1e5'/><circle cx='45' cy='68' r='13' fill='%23b596cf'/><circle cx='68' cy='68' r='13' fill='%23b596cf'/><circle cx='55' cy='55' r='7' fill='%23c8a662'/></g><g transform='translate(15,110)'><circle cx='10' cy='10' r='9' fill='%23fffdf8'/><circle cx='0' cy='2' r='9' fill='%23ece1cc'/><circle cx='20' cy='2' r='9' fill='%23ece1cc'/><circle cx='2' cy='18' r='9' fill='%23e3d6c4'/><circle cx='18' cy='18' r='9' fill='%23e3d6c4'/><circle cx='10' cy='10' r='5' fill='%23c8a662'/></g></svg>");
}

@media (min-width: 540px) {
  .app { padding-top: 50px; }
}
