:root {
  --ink: #1a1a1a;
  --rose: #c93a6a;
  --blush: #f7e3e9;
  --paper: #fbf9f9;
  --muted: #6b6264;
  --body: #3d3436;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ece6e7; color: var(--ink); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button { -webkit-tap-highlight-color: transparent; }
input::placeholder { color: #a79fa1; font-style: italic; }

.page { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; }
.app {
  position: relative; width: 100%; max-width: 430px; min-height: 100vh; min-height: 100dvh;
  background: var(--paper); overflow: hidden; box-shadow: 0 0 40px rgba(60, 30, 40, .08);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Petals */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.petal { position: absolute; top: 0; border-radius: 100% 0 100% 0; opacity: 0; animation-name: petalFall; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes petalFall {
  0% { transform: translate(0, -40px) rotate(0deg); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(-60px, 110vh) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .petals { display: none; } }

/* Screens */
.screen { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; animation: fadeUp .45s ease; }
.screen-center { align-items: center; text-align: center; padding: 0 28px 32px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.grow { flex: 1; }

.home-top { position: relative; height: 120px; }
.home-body { display: flex; flex-direction: column; align-items: center; padding: 0 28px 32px; flex: 1; text-align: center; }
.branch { position: absolute; top: 0; width: 72%; pointer-events: none; }
.branch-left { left: 0; }
.branch-right { right: 0; opacity: .95; transform: scaleX(-1); }
.screen[data-screen="email"] .branch-left { opacity: .95; }
.branch-wide { width: 110%; max-width: none; margin: 8px -5% 0; }
.wreath { width: 78%; max-width: 300px; margin-top: -4px; }

/* Type */
.kicker { font-family: 'Poiret One', sans-serif; font-size: 20px; letter-spacing: .1em; color: var(--ink); font-weight: 400; margin: 0; }
.kicker-lg { font-size: 24px; letter-spacing: .08em; margin-top: 18px; line-height: 1.2; }
.script { font-family: 'Ms Madi', cursive; line-height: 1.05; color: var(--ink); }
.home-body .script { line-height: 1; }
.lead { font-family: Spectral, serif; font-style: italic; font-size: 17px; line-height: 1.5; color: var(--body); margin: 18px 0 0; max-width: 300px; text-wrap: pretty; }
.lead strong { font-style: normal; font-weight: 600; color: var(--ink); }
.note { margin: 0; text-align: center; font-family: Spectral, serif; font-style: italic; font-size: 14px; color: var(--muted); }
.error { margin: 0; font-family: Spectral, serif; font-style: italic; font-size: 14px; color: var(--rose); }
p.error { text-align: center; }
.field .error { margin-top: 4px; }

/* Buttons */
.actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.btn {
  width: 100%; height: 56px; font-family: 'Josefin Sans', sans-serif; font-size: 15px; letter-spacing: .18em;
  text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 0; padding: 0;
}
.btn-primary { border: none; background: var(--ink); color: #fff; }
.btn-primary:active { background: var(--rose); }
.btn-outline { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.btn-outline:active { background: var(--blush); }
.btn-progress { position: relative; overflow: hidden; }
.btn-progress:disabled { cursor: default; }
.btn-progress:disabled:active { background: var(--ink); }
.btn-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--rose); transition: width .2s; }
.btn-text { position: relative; }
.link-btn {
  border: none; background: none; padding: 8px 0; min-height: 44px; cursor: pointer;
  font-family: 'Josefin Sans', sans-serif; font-size: 13px; letter-spacing: .16em; color: var(--ink);
}

.topbar { position: relative; padding: 22px 24px 0; display: flex; }
.topbar-end { justify-content: flex-end; }
.heading { padding: 0 28px; text-align: center; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-family: 'Josefin Sans', sans-serif; font-size: 12px; letter-spacing: .18em; color: var(--muted); }
.field input {
  border: none; border-bottom: 1px solid var(--ink); background: transparent; padding: 10px 0;
  font-family: Spectral, serif; font-size: 18px; color: var(--ink); outline: none; border-radius: 0;
}
.field input:focus { border-bottom-color: var(--rose); }
.field input.invalid { border-bottom-color: var(--rose); }

/* Upload */
.upload-body { padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.picker { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 220px; border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -7px;
  background: rgba(255, 255, 255, .7); cursor: pointer; text-align: center; padding: 24px;
}
.dropzone:active { background: var(--blush); }
.plus {
  width: 54px; height: 54px; border-radius: 50%; background: var(--rose); color: #fff; display: flex;
  align-items: center; justify-content: center; font-family: 'Josefin Sans', sans-serif; font-size: 30px;
  font-weight: 300; line-height: 1; padding-top: 4px;
}
.dropzone-title { font-family: 'Josefin Sans', sans-serif; font-size: 15px; letter-spacing: .14em; color: var(--ink); }
.dropzone-hint { font-family: Spectral, serif; font-style: italic; font-size: 15px; color: var(--muted); }

.selection { display: flex; flex-direction: column; gap: 12px; }
.selection-head { display: flex; justify-content: space-between; align-items: baseline; }
.more {
  position: relative; font-family: 'Josefin Sans', sans-serif; font-size: 12px; letter-spacing: .18em;
  color: var(--rose); cursor: pointer; padding: 12px 0; margin: -12px 0;
}
.is-uploading .editable { display: none !important; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; background: #f1e8ea; overflow: hidden; }
.tile > img, .tile > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-vtop { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rose); }
.tile-dur {
  position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 5px; height: 22px;
  padding: 0 7px 0 6px; background: rgba(26, 26, 26, .78); color: #fff; font-family: 'Josefin Sans', sans-serif;
  font-size: 11px; letter-spacing: .08em; line-height: 1;
}
.tile-dur::before { content: ''; width: 0; height: 0; border-left: 7px solid #fff; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.tile-dur span { padding-top: 2px; }
.tile-shade { position: absolute; inset: 0; background: rgba(251, 249, 249, .45); }
.tile-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; background: rgba(26, 26, 26, .15); }
.tile-bar > div { height: 100%; width: 0; background: var(--rose); transition: width .2s; }
.tile-done {
  position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--rose);
  color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.tile-remove {
  position: absolute; top: 0; right: 0; width: 36px; height: 36px; border: none; background: none; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: flex-end; padding: 5px;
}
.tile-remove span {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(26, 26, 26, .75); color: #fff; font-size: 14px;
  line-height: 22px; text-align: center; display: block;
}
.tile.is-done .tile-remove { display: none; }

/* Subscribe */
.subscribe { padding: 70px 28px 32px; display: flex; flex-direction: column; flex: 1; position: relative; }
.subscribe .heading { padding: 0; }
.fields { display: flex; flex-direction: column; gap: 22px; margin-top: 34px; }
.subscribed {
  padding: 40px 28px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1;
  animation: fadeUp .5s ease;
}
