:root {
  --pink: #ff5792;
  --pink-deep: #e2346f;
  --green: #123d2b;
  --green-soft: #1f6b45;
  --cream: #fff8ee;
  --card: #ffffff;
  --line: #eadfce;
  --muted: #5b6d62;
  --error: #c62040;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top {
  position: relative;
  width: 100%;
  max-width: 560px;
}

body.compact .top, body.compact footer { display: none; }
body.compact main { margin-top: 0; padding-top: max(8px, env(safe-area-inset-top)); }

.band {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.lang {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(18, 61, 43, 0.2);
}

.lang button {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--pink);
  color: #fff;
}

main {
  width: 100%;
  max-width: 560px;
  padding: 0 16px 24px;
  margin-top: -8px;
  flex: 1;
}

.step { text-align: center; }
.step[hidden] { display: none; }

h1, h2 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 8px 0 8px;
}

h1 { font-size: clamp(28px, 8.5vw, 40px); color: var(--pink); }
h2 { font-size: 22px; }

.lead { font-size: 18px; font-weight: 600; margin: 0 0 22px; }
.fine { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin: 8px 0; }

.notice {
  background: #fff1c9;
  border: 1px solid #f0d78a;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.error {
  color: var(--error);
  font-weight: 700;
  font-size: 14.5px;
  margin: 10px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background-color 0.15s ease, opacity 0.15s;
  user-select: none;
}

.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--pink); color: #fff; box-shadow: 0 6px 18px rgba(255, 87, 146, 0.35); }
.btn.primary:hover { background: var(--pink-deep); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn.link { background: none; color: var(--green-soft); padding: 6px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.btn.big { width: 100%; padding: 18px 22px; font-size: 18px; }

.btn:focus-visible, input:focus-visible, .lang button:focus-visible {
  outline: 3px solid var(--green-soft);
  outline-offset: 2px;
}

/* ---------- crop ---------- */

.frame {
  position: relative;
  margin: 14px auto 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  touch-action: none;
  cursor: grab;
  box-shadow: 0 10px 30px rgba(18, 61, 43, 0.25);
  user-select: none;
  -webkit-user-select: none;
}

.frame:active { cursor: grabbing; }

.frame canvas, .frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.frame-overlay { pointer-events: none; }

.zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto 16px;
  font-weight: 900;
  font-size: 20px;
}

.zoom input { flex: 1; accent-color: var(--pink); }

.row { display: flex; gap: 10px; }
.row .btn { flex: 1; padding-left: 10px; padding-right: 10px; }

/* ---------- details ---------- */

form { text-align: left; }

.preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 14px;
}

.preview-row img {
  width: 72px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(18, 61, 43, 0.25);
  background: #000;
}

.preview-row h2 { margin: 0 0 2px; }

fieldset.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 14px;
  margin: 0 0 12px;
}

fieldset.card.must { border-color: #f4b6cb; background: #fff5f8; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--pink);
}

.handles { margin-top: 8px; }
.handles[hidden] { display: none; }

.handle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 8px;
  background: #fff;
  overflow: hidden;
}

.handle:focus-within { border-color: var(--green-soft); box-shadow: 0 0 0 2px rgba(31, 107, 69, 0.18); }

.handle .pf {
  flex: none;
  width: 92px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.handle .at { color: var(--muted); font-weight: 700; }

.handle input, #email {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 12px 10px 12px 2px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--green);
  background: transparent;
  outline: none;
}

#emailWrap { margin-top: 10px; }

#email {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  background: #fff;
}

#email:focus { border-color: var(--green-soft); }

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: 12px 0 0;
}

.progress div {
  height: 100%;
  width: 0;
  background: var(--pink);
  transition: width 0.2s ease;
}

/* ---------- done ---------- */

.done-badge {
  width: 84px;
  height: 84px;
  margin: 18px auto 6px;
  border-radius: 50%;
  background: var(--green-soft);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 900;
}

.follow {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.follow-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 15px;
  margin: 0 0 12px;
}

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

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 6px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.08s ease;
}

.social:hover { background: var(--green-soft); }
.social:active { transform: scale(0.98); }
.social:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.social svg { width: 18px; height: 18px; flex: none; }

footer {
  width: 100%;
  max-width: 560px;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
}
