:root {
  --cream: #FFF6E9;
  --ink: #2B1B3D;
  --pink: #FF3D8B;
  --yellow: #FFD23F;
  --blue: #3EC5FF;
  --white: #FFFFFF;
  --error: #B4004E;
  --display: 'Fredoka', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { background: var(--cream); }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
}

h1, h2 { margin: 12px 0 0; font: 700 40px/1.05 var(--display); }
.lead { margin: 10px 0 0; font-size: 17px; line-height: 1.5; font-weight: 500; }

.pill {
  display: inline-block;
  padding: 7px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  font-size: 14px;
}

form { display: flex; flex-direction: column; gap: 18px; }
label > span { display: block; margin-bottom: 8px; font: 600 18px var(--display); }

input, textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  font: 500 17px 'DM Sans', system-ui, sans-serif;
}
textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #75688A; }
input:focus-visible, textarea:focus-visible, button:focus-visible, .file:focus-within .file-btn {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  background: var(--blue);
  border: 3px dashed var(--ink);
  border-radius: 16px;
  font: 600 17px var(--display);
  cursor: pointer;
}
.previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.previews:empty { display: none; }
.previews figure { position: relative; margin: 0; aspect-ratio: 1; }
.previews img { width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--ink); border-radius: 12px; }
.previews button {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

.trap { position: absolute; left: -9999px; }

.error { margin: 0; min-height: 1px; color: var(--error); font-weight: 700; }
.error:empty { display: none; }

.btn {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  font: 700 22px var(--display);
  cursor: pointer;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.ghost { background: var(--white); margin-top: 24px; }

.done { text-align: center; padding-top: 40px; }

.sprinkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.sprinkles i { position: absolute; width: 22px; height: 8px; border-radius: 4px; background: var(--pink); }
.sprinkles i:nth-child(1) { left: 5%; top: 12%; rotate: -30deg; background: var(--blue); }
.sprinkles i:nth-child(2) { right: 6%; top: 8%; rotate: 40deg; }
.sprinkles i:nth-child(3) { left: 4%; top: 55%; rotate: 70deg; background: var(--yellow); }
.sprinkles i:nth-child(4) { right: 5%; top: 62%; rotate: -60deg; background: var(--blue); }
.sprinkles i:nth-child(5) { left: 8%; top: 90%; rotate: 20deg; background: var(--yellow); }
.sprinkles i:nth-child(6) { right: 10%; top: 88%; width: 12px; height: 12px; border-radius: 50%; }

@media (min-width: 700px) {
  main { padding-top: 72px; gap: 36px; }
  h1, h2 { font-size: 56px; }
  .lead { font-size: 19px; }
}
