:root {
  --green: #2f6b3a;
  --green-dark: #234f2b;
  --cream: #faf6ee;
  --ink: #24291f;
  --muted: #6b7264;
  --border: #e2ddce;
  --danger: #b3392c;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px calc(60px + env(safe-area-inset-bottom));
}

.hero { text-align: center; margin-bottom: 24px; }
.hero-emoji { font-size: 40px; margin-bottom: 6px; }
.hero h1 { margin: 0 0 4px; font-size: 26px; color: var(--green-dark); }
.subtitle { margin: 0 0 12px; font-weight: 600; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.lead { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.5; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 36px 16px;
  margin-top: 20px;
  border: 2px dashed var(--green);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.dropzone:active { background: #f1f4ea; }
.dropzone-icon { font-size: 34px; }
.dropzone-text { font-weight: 700; color: var(--green-dark); font-size: 16px; margin-top: 6px; }
.dropzone-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.preview-grid:empty { display: none; }
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-item .video-badge {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  padding: 2px 5px; border-radius: 4px;
}
.preview-item .remove-btn {
  position: absolute; top: 3px; right: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}

.consent-box {
  margin-top: 20px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.consent-label input[type="checkbox"] {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--green);
}
.link-btn {
  background: none; border: none; padding: 0; margin-left: 2px;
  color: var(--green-dark); font-weight: 600; text-decoration: underline;
  font-size: inherit; cursor: pointer;
}

.submit-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { opacity: .45; cursor: not-allowed; }
.submit-btn.secondary { background: var(--green-dark); margin-top: 14px; }

.progress-wrap { margin-top: 20px; }
.progress-bar { height: 10px; background: #e7e2d3; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--green); transition: width .2s; }
.progress-text { text-align: center; margin-top: 8px; font-size: 13px; color: var(--muted); }

.success-msg { text-align: center; margin-top: 24px; }
.success-icon { font-size: 40px; }
.success-msg p { font-weight: 600; }

.error-msg {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: #fbe9e6; color: var(--danger); font-size: 14px; font-weight: 600;
}

.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.footer a { color: var(--muted); text-decoration: underline; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal[hidden] { display: none; }
.modal-content {
  background: #fff; border-radius: 18px 18px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative;
}
.modal-content h2 { margin-top: 4px; font-size: 18px; color: var(--green-dark); }
.modal-content p { font-size: 14px; line-height: 1.6; color: var(--ink); }
.modal-close {
  position: absolute; top: 14px; right: 14px; border: none; background: #eee;
  width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer;
}

@media (min-width: 640px) {
  .page { padding-top: 40px; }
}
