/* The story at /start: one stage the size of a phone, six screens that fill it. The stage wears
   the chosen design (the [data-theme] variables of story.css), so nothing here names a colour of
   a design; only the dark room around the stage on a wide screen has colours of its own. */

[hidden] { display: none !important; }

.start-page {
  --room: #170811; --ui: 'Rubik', 'Heebo', system-ui, sans-serif;
  height: 100dvh; display: grid; place-items: center; overflow: hidden; background: var(--room);
}
.stage {
  position: relative; width: min(100vw, 430px); height: 100dvh; overflow: hidden; isolation: isolate;
  background-color: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.5; direction: rtl;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: color .5s ease, background-color .8s ease;
}
@media (min-width: 520px) and (min-height: 640px) {
  .stage { height: min(100dvh - 32px, 880px); border-radius: 36px; box-shadow: 0 40px 90px -40px #000; }
}
.stage::before { content: ''; position: absolute; inset: 0; z-index: 0; background: var(--sky); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- the living background ---------- */
/* Three soft lights in the design's own confetti colours (set by start.js), drifting slowly. */
.bg { position: absolute; inset: -10%; z-index: 0; filter: blur(52px); opacity: .5; }
.blob { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--c1, var(--accent)); animation: drift 14s ease-in-out infinite alternate; transition: background-color .9s ease; }
.blob.b1 { top: -6%; right: -14%; }
.blob.b2 { bottom: -4%; left: -18%; background: var(--c2, var(--accent-2)); animation-duration: 18s; animation-direction: alternate-reverse; }
.blob.b3 { top: 40%; left: 26%; width: 42%; background: var(--c3, var(--accent)); animation-duration: 22s; }
@keyframes drift { to { transform: translate3d(14%, 10%, 0) scale(1.18); } }
/* A new design spreads over the stage from the point that was touched: this layer already
   wears it, and grows as a circle; the stage takes the design while it is covered. */
.flood { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--sky); background-color: var(--bg); clip-path: circle(0 at 50% 50%); transition: opacity .45s ease; }
.flood.go { transition: clip-path .75s cubic-bezier(.6, 0, .2, 1), opacity .45s ease; clip-path: circle(150% at var(--fx) var(--fy)); }
#dust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* ---------- progress, back, home ---------- */
.bars { position: absolute; top: max(14px, env(safe-area-inset-top)); inset-inline: 18px; z-index: 6; display: flex; gap: 6px; }
.bars i { position: relative; flex: 1; height: 4px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--ink) 13%, transparent); }
.bars i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: right;
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .6s cubic-bezier(.2, .9, .2, 1), background-color .5s;
}
.bars i.on::after { transform: scaleX(1); }
.back, .home-link, .acc-link, .mine-close {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.back, .home-link, .acc-link { position: absolute; top: calc(max(14px, env(safe-area-inset-top)) + 14px); z-index: 6; }
.back { inset-inline-start: 12px; }
.home-link { inset-inline-end: 12px; color: var(--accent); }
.acc-link { inset-inline-start: 12px; color: var(--accent); }
.acc-link svg { width: 23px; height: 23px; }
.back:not([hidden]) ~ .acc-link { display: none; }
.back svg, .mine-close svg { width: 20px; height: 20px; }
.home-link svg { width: 24px; height: 24px; }

/* ---------- a screen, and how its parts arrive ---------- */
.scr {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: calc(max(14px, env(safe-area-inset-top)) + 66px) 22px max(26px, env(safe-area-inset-bottom)); text-align: center; overflow: hidden auto;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 26%, transparent) transparent;
  visibility: hidden; opacity: 0; transform: translateY(-18px) scale(.98); filter: blur(8px);
  transition: opacity .35s ease, transform .45s ease, filter .35s ease, visibility 0s .45s;
}
.scr.on { visibility: visible; opacity: 1; transform: none; filter: none; transition-delay: 0s; }
/* Each part comes up out of a blur into focus, one after the other (--i is its turn). */
.scr.on .in { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 85ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.96); filter: blur(10px); } }
/* The titles speak in the welcome's own voice, the Rubik of its buttons; the designs' typefaces
   stay with the sites offered. */
.h { margin: 0; font-family: var(--ui); font-weight: 800; font-size: clamp(2.1rem, 10.5vw, 2.75rem); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.h.sm { font-size: clamp(1.7rem, 8vw, 2rem); }
.h .w { display: block; }
.h .acc { color: var(--accent); }
.h.sm .acc { display: inline-block; }
.h.sm .acc::after { height: 5px !important; margin-top: 4px !important; }
.scr.on .acc::after { content: ''; display: block; height: 6px; margin-top: 6px; border-radius: 6px; background: var(--accent); transform: scaleX(0); transform-origin: right; animation: draw .7s 1s cubic-bezier(.2, .9, .2, 1) forwards; }
@keyframes draw { to { transform: scaleX(1); } }
.sub { margin: 0; font-size: 1rem; color: var(--soft); text-wrap: balance; }
.cta {
  position: relative; flex-shrink: 0; height: 58px; padding: 0 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--btn-bg, var(--ink)); color: var(--btn-ink, var(--bg)); font-family: var(--ui); font-weight: 800; font-size: 1.125rem;
  transition: transform .15s ease, background-color .5s, color .5s;
}
.cta:active { transform: scale(.94); }
.cta::before { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; animation: ring 2.2s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.22); opacity: 0; } }
.cta:disabled { opacity: .6; cursor: default; }
.link { flex-shrink: 0; height: 44px; padding: 0 12px; border: 0; background: none; color: var(--soft); font: 500 .95rem var(--font-body); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.stage :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- 1: the welcome, real sites turning ---------- */
/* Three little phones, each a ready site in its own design (its [data-theme]): a photo with the
   age on it, the name in the design's typeface, its button. The left one comes to the front, the
   front one goes right; they lean a little towards the finger. */
.deck { position: relative; width: 100%; height: 250px; flex-shrink: 0; }
.ph-hold {
  position: absolute; top: 6px; left: 50%; width: 136px; margin-left: -68px; z-index: 1;
  transition: transform .8s cubic-bezier(.2, .85, .25, 1), opacity .5s ease, filter .6s ease;
}
.ph-hold[data-slot='0'] { transform: translate(-82%, 22px) rotate(-9deg) scale(.8); z-index: 1; filter: brightness(.94); }
.ph-hold[data-slot='1'] { transform: translate(0, 0) rotate(-1.5deg) scale(1); z-index: 3; }
.ph-hold[data-slot='2'] { transform: translate(82%, 26px) rotate(8deg) scale(.8); z-index: 2; filter: brightness(.94); }
.ph-hold.is-wrap { transition: none; opacity: 0; transform: translate(-120%, 30px) rotate(-14deg) scale(.6); }
.phone {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 7px 11px; overflow: hidden; border-radius: 24px;
  background: var(--sky); background-color: var(--bg); color: var(--ink);
  box-shadow: 0 0 0 5px var(--card), 0 26px 44px -22px color-mix(in srgb, #000 70%, transparent), 0 0 0 6px color-mix(in srgb, #000 8%, transparent);
  transform: translate(calc(var(--px, 0) * 8px), calc(var(--py, 0) * 6px));
  animation: bob 5s ease-in-out infinite alternate; transition: background-color .4s ease;
}
.ph-hold:nth-child(2) .phone { animation-duration: 6.4s; }
.ph-hold:nth-child(3) .phone { animation-duration: 5.6s; animation-direction: alternate-reverse; }
@keyframes bob { to { translate: 0 -10px; } }
.ph-pic { position: relative; width: 100%; height: 118px; margin-bottom: 4px; border-radius: 17px; overflow: hidden; background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.ph-pic img { width: 100%; height: 100%; object-fit: cover; }
.ph-age {
  position: absolute; bottom: 6px; inset-inline-start: 6px; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px;
  background: var(--btn-bg, var(--accent)); color: var(--btn-ink, #fff); font: 800 .82rem var(--ui); box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .55);
}
.ph-top { font: 500 .58rem var(--font-body); color: var(--soft); }
.ph-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.25rem; line-height: 1.1; color: var(--accent); }
.ph-btn { margin-top: 4px; padding: 4px 13px; border-radius: 999px; background: var(--btn-bg, var(--accent)); color: var(--btn-ink, #fff); font: 700 .6rem var(--ui); }
.ph-dot { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .8; animation: ph-fall 3.2s linear infinite; }
.ph-dot.d1 { left: 18%; animation-delay: -.4s; }
.ph-dot.d2 { left: 58%; background: var(--accent-2); border-radius: 50%; animation-delay: -1.6s; }
.ph-dot.d3 { left: 84%; animation-delay: -2.5s; }
@keyframes ph-fall { from { top: -8px; transform: rotate(0); } to { top: 104%; transform: rotate(320deg); } }

/* the way in: an arrow on the main button, and the other ways as pills of glass */
.cta.has-ic { display: inline-flex; align-items: center; gap: 10px; padding: 0 26px 0 30px; }
.cta.has-ic svg { width: 21px; height: 21px; animation: cta-nudge 2.2s ease-in-out 1.6s infinite; }
@keyframes cta-nudge { 0%, 60%, 100% { translate: 0 0; } 30% { translate: -4px 0; } }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--card) 55%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  color: var(--ink); font: 600 .9rem var(--font-body);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent), inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 10px 22px -14px color-mix(in srgb, var(--ink) 60%, transparent);
  transition: transform .15s ease;
}
.pill:active { transform: scale(.95); }
.pill svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- 2: who the site is about ---------- */
.who { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  aspect-ratio: 1 / .96; display: grid; place-content: center; justify-items: center; gap: 10px; border: 0; border-radius: 28px; cursor: pointer;
  background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--ink); font-family: var(--ui); font-weight: 700; font-size: 1.03rem;
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent), inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 16px 30px -22px color-mix(in srgb, var(--ink) 60%, transparent);
  transition: transform .18s ease, box-shadow .3s;
}
.tile:active { transform: scale(.94); }
.tile[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--accent), inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 16px 30px -22px color-mix(in srgb, var(--ink) 60%, transparent); }
.tile img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--card), 0 10px 20px -12px color-mix(in srgb, var(--ink) 70%, transparent); }
.tile b { font-size: 2.6rem; line-height: 1.2; font-weight: 400; }

/* ---------- 3: whose birthday: the name, the age, בן או בת ---------- */
/* A frame with an inset shadow, an icon at the start and the words written from the start: a
   field to type in, not a button to press. */
.fields { display: flex; gap: 10px; width: 100%; flex-shrink: 0; }
.field {
  display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 15px; border-radius: 18px; cursor: text; color: var(--soft);
  background: color-mix(in srgb, var(--card) 70%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  border: 1.5px solid color-mix(in srgb, var(--ink) 16%, transparent);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 10px 22px -16px color-mix(in srgb, var(--ink) 60%, transparent); transition: border-color .2s, box-shadow .2s, color .2s;
}
.field svg { flex: none; width: 21px; height: 21px; }
.field:focus-within {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 1.5px 0 rgba(255, 255, 255, .8);
}
.field.is-name { flex: 1; min-width: 0; }
.field.is-age { flex: 0 0 108px; }
.field input {
  flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; text-align: start; color: var(--ink);
  font: 600 1.125rem var(--font-body); caret-color: var(--accent); -webkit-user-select: text; user-select: text;
}
.field input:focus { outline: none; }
.field input::placeholder { color: color-mix(in srgb, var(--soft) 85%, transparent); opacity: 1; font-weight: 500; }

/* ---------- 4: the sites that fit ---------- */
/* One at a time, large, in its own design (ringed in its accent, its name in its typeface, a photo
   of whom it is for); the next peeks at the left and the one before at the right, a little
   smaller and darker. Big round arrows at the sides turn them, the dots under them count. */
.scr.is-suggest { justify-content: flex-start; gap: 14px; }
.flip { position: relative; width: calc(100% + 44px); margin-inline: -22px; flex-shrink: 0; height: clamp(300px, 56dvh, 480px); overflow: hidden; touch-action: pan-y; outline: none; }
.flip-track { position: absolute; inset: 0; }
.scr.on .flip-track { animation: sug-in .7s cubic-bezier(.2, 1.2, .4, 1) .25s both; }
@keyframes sug-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.flip-card {
  position: absolute; inset: 8px 15% 18px; display: grid; align-content: end; padding: 0; overflow: hidden; border: 0; border-radius: 26px;
  cursor: pointer; text-align: start; background: var(--sky); background-color: var(--bg); color: #fff;
  box-shadow: 0 22px 40px -22px color-mix(in srgb, #000 75%, transparent);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.05), opacity .35s ease, filter .35s ease;
}
.flip-card:not(.is-on) { filter: brightness(.78) saturate(.85); }
.flip-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flip-card.is-on img { animation: sug-drift 16s ease-in-out infinite alternate; }
@keyframes sug-drift { to { transform: scale(1.1) translate(-2%, 1%); } }
.flip-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10, 2, 8, .74) 100%); }
.flip-card::before { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--accent); pointer-events: none; }
.flip-name {
  position: relative; z-index: 1; padding: 18px 20px; font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.5rem, 6.6vw, 1.95rem); line-height: 1.12;
  color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); text-wrap: balance;
}
.flip-play {
  position: absolute; z-index: 1; top: 44%; left: 50%; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--btn-bg, var(--accent)); color: var(--btn-ink, #fff); font-size: 1.25rem; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
  transition: opacity .3s ease;
}
.flip-card.is-on .flip-play { animation: sug-pulse 2.2s ease-in-out infinite; }
.flip-card:not(.is-on) .flip-play { opacity: 0; }
@keyframes sug-pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent), 0 8px 18px -8px rgba(0, 0, 0, .6); } }

/* the arrows, orbs: a ring of glass around a disc in the design's button colour, the arrow in the
   button's ink, as the play sign. The glass takes whatever is under it; the disc stays clear on a
   photo, a dark scene or a light page. The designs in the editor turn with the same arrows. */
.flip-arrow {
  position: absolute; top: 50%; z-index: 20; display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  color: var(--btn-ink, #fff); transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 2px 0 rgba(255, 255, 255, .75), 0 0 0 1px rgba(0, 0, 0, .06), 0 16px 32px -14px rgba(0, 0, 0, .5);
  transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), background-color .2s ease;
}
.flip-arrow::before {
  content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--btn-bg, var(--accent));
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .55), inset 0 1.5px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .2s cubic-bezier(.3, 1.5, .5, 1);
}
@media (hover: hover) {
  .flip-arrow:hover { background-color: rgba(255, 255, 255, .32); }
  .flip-arrow:hover::before { transform: scale(1.07); }
}
.flip-arrow:active { transform: translateY(-50%) scale(.9); }
.flip-arrow.is-prev { inset-inline-start: 8px; }
.flip-arrow.is-next { inset-inline-end: 8px; }
.flip-arrow .ic { position: relative; z-index: 1; display: grid; width: 22px; height: 22px; }
.flip-arrow .ic svg { width: 100%; height: 100%; stroke-width: 2.8; }
.flip-arrow.is-prev .ic { transform: rotate(-90deg); }
.flip-arrow.is-next .ic { transform: rotate(90deg); }
/* once the sites are in, the next arrow nudges towards its side twice: they turn */
.scr.on .flip-arrow.is-next .ic { animation: flip-nudge 1s ease-in-out 1.4s 2; }
@keyframes flip-nudge { 35% { translate: -5px 0; } 70% { translate: 1px 0; } }
.flip-dots { display: flex; justify-content: center; align-items: center; gap: 7px; height: 12px; }
.flip-dots i { width: 8px; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 24%, transparent); transition: width .3s ease, background-color .3s ease; }
.flip-dots i.on { width: 24px; background: var(--accent); }
.flip-under { min-height: 12px; }

/* ---------- 6: the pictures ---------- */
/* Empty, three frames ask for pictures. Then the prints land in a pile of four across: the one
   that opens the site is twice the size, and a tap on another puts it there. */
.pics { width: 100%; flex-shrink: 1; min-height: 0; max-height: min(46dvh, 100dvh - 430px); overflow: hidden auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px 8px 12px; scrollbar-width: none; }
.pics::-webkit-scrollbar { display: none; }
.pics.is-empty { display: block; max-height: none; overflow: visible; padding: 0; }
.pic { position: relative; aspect-ratio: 4 / 5; padding: 4px; border-radius: 12px; background: var(--card); transform: rotate(var(--r, 0deg)); box-shadow: 0 14px 26px -16px color-mix(in srgb, var(--ink) 75%, transparent); }
.pic:nth-child(3n + 1) { --r: -2.5deg; }
.pic:nth-child(3n + 2) { --r: 2deg; }
.pic:nth-child(3n) { --r: -1deg; }
.pic.is-main { grid-column: span 2; grid-row: span 2; --r: -1.5deg; padding: 6px; border-radius: 16px; box-shadow: 0 0 0 3px var(--accent), 0 20px 34px -18px color-mix(in srgb, var(--ink) 75%, transparent); }
.pic-pick { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--accent) 14%, var(--card)); cursor: pointer; }
.pic-pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-tag {
  position: absolute; bottom: 10px; left: 50%; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transform: translateX(-50%);
  background: var(--btn-bg, var(--accent)); color: var(--btn-ink, #fff); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--ink) 70%, transparent); pointer-events: none;
}
.pic-tag:not([hidden]) { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.pic-tag svg { width: 17px; height: 17px; }
.pic-x {
  position: absolute; top: -8px; inset-inline-start: -8px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink); font: 700 1rem/1 var(--ui);
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--ink) 70%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
/* A print lands from above, turning, and a band of light passes over it once. */
.pic.is-new { animation: pic-land .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes pic-land { from { opacity: 0; transform: translateY(-110px) rotate(16deg) scale(1.25); } }
.pic.is-new .pic-pick::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .8) 50%, transparent 70%) 130% 0 / 260% 100% no-repeat; animation: pic-light .9s ease .35s both; pointer-events: none; }
@keyframes pic-light { to { background-position: -130% 0; } }
.frames { position: relative; display: block; width: 100%; height: 170px; flex-shrink: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.frames .fr { animation: frame-wait 2.6s ease-in-out infinite alternate; }
.frames .fr:nth-child(2) { animation-delay: -.9s; }
.frames .fr:nth-child(3) { animation-delay: -1.7s; }
@keyframes frame-wait { to { translate: 0 -8px; } }
.fr { position: absolute; top: 14px; width: 104px; height: 132px; display: grid; place-items: center; border: 6px solid var(--card); border-radius: 16px; background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent); box-shadow: 0 24px 40px -24px color-mix(in srgb, var(--ink) 70%, transparent); transform: rotate(var(--r)); }
.fr:nth-child(1) { right: 4%; --r: 8deg; }
.fr:nth-child(2) { right: calc(50% - 52px); top: 0; --r: -2deg; z-index: 1; }
.fr:nth-child(3) { left: 4%; --r: -9deg; }
.fr svg { width: 30px; height: 30px; }

/* ---------- sites already started here ---------- */
.mine {
  position: absolute; inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 8; display: grid; gap: 10px; padding: 14px;
  border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 30px 60px -20px #000; animation: rise .5s cubic-bezier(.16, 1, .3, 1) both;
}
.mine-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--ui); font-size: 1.05rem; }
.mine-close { width: 36px; height: 36px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.mine-list { display: grid; gap: 8px; }
.mine-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: inherit; text-decoration: none; }
.mine-dot { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.mine-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; text-align: start; }
.mine-state { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); font-size: .78rem; font-weight: 600; }

.toast { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 10; width: max-content; max-width: 84%; padding: 12px 18px; border-radius: 22px; background: var(--ink); color: var(--bg); font-size: .92rem; font-weight: 500; text-align: center; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .stage *, .stage *::before, .stage *::after { animation: none !important; transition: none !important; }
  .scr { filter: none; transform: none; }
  .scr.on .acc::after { transform: none; }
}

/* the age under the name: smaller, and only a number */
.field.is-age input { -moz-appearance: textfield; appearance: textfield; }
.field.is-age input::-webkit-outer-spin-button, .field.is-age input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- בן או בת, under the name and the age ---------- */
.gender { display: flex; gap: 10px; width: 100%; }
.gender button {
  flex: 1; height: 52px; border: 0; border-radius: 18px; cursor: pointer; color: var(--ink); font: 700 1.05rem var(--ui);
  background: color-mix(in srgb, var(--card) 55%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent), inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 10px 22px -16px color-mix(in srgb, var(--ink) 60%, transparent);
  transition: transform .15s ease, background-color .3s ease, color .3s ease;
}
.gender button:active { transform: scale(.95); }
.gender button[aria-pressed='true'] { background: var(--btn-bg, var(--accent)); color: var(--btn-ink, #fff); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent); }

/* ---------- whole sites, ready to send ---------- */
.ready { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-height: 62dvh; overflow-y: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.ready::-webkit-scrollbar { display: none; }
.ready-card {
  position: relative; display: grid; align-content: end; min-height: 150px; padding: 0; overflow: hidden; border: 0; border-radius: 20px; cursor: pointer; text-align: start;
  background: var(--sky); background-color: var(--bg); color: var(--ink); box-shadow: 0 14px 28px -20px color-mix(in srgb, var(--ink) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.ready-card:active { transform: scale(.95); }
.ready-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.ready-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--btn-bg) 92%, transparent) 100%); }
.ready-text { position: relative; z-index: 1; display: grid; gap: 2px; padding: 10px 12px 12px; color: var(--btn-ink); }
.ready-text b { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.12rem; line-height: 1.15; }
.ready-text span { font-size: .78rem; line-height: 1.3; opacity: .9; }

/* ---------- a ready site's opening, played on the stage before it is chosen ---------- */
.ready-play-tag {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, .45); color: #fff; font: 700 .7rem var(--ui); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ready-preview { position: absolute; inset: 0; z-index: 40; overflow: hidden; background-color: var(--bg); color: var(--ink); animation: rise .4s ease both; }
.ready-play { position: absolute; inset: 0; z-index: 1; }
.ready-play .intro { position: absolute; }
.ready-info { position: absolute; inset: 30% 24px auto; z-index: 1; display: grid; gap: 6px; text-align: center; opacity: 0; transition: opacity .6s ease; }
.ready-info b { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 2rem; line-height: 1.1; }
.ready-info span { color: var(--soft); }
.ready-preview.is-done .ready-info { opacity: 1; }
.ready-bar {
  position: absolute; inset: auto 0 0; z-index: 60; display: grid; justify-items: center; gap: 4px;
  padding: 28px 20px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.ready-bar .link { color: #fff; height: 40px; }
.ready-preview.is-done .ready-bar { background: none; }
.ready-preview.is-done .ready-bar .link { color: var(--soft); }
/* the opening's bottom parts stand above the buttons here */
.ready-preview .sc-ticker { bottom: 132px; }
.ready-preview .intro-pols { bottom: 140px; }
.ready-preview .intro-in { margin-top: -22svh; }
.ready-preview { outline: none; touch-action: pan-y; }
.ready-preview .flip-arrow { top: 42%; z-index: 70; }
.ready-preview .flip-dots { margin-bottom: 8px; }
.ready-preview .flip-dots i { background: rgba(255, 255, 255, .5); }
.ready-preview.is-done .flip-dots i { background: color-mix(in srgb, var(--ink) 24%, transparent); }
.ready-preview .flip-dots i.on { background: var(--accent); }
.ready-preview.turn-next .ready-play { animation: turn-next .5s cubic-bezier(.2, .9, .25, 1) both; }
.ready-preview.turn-prev .ready-play { animation: turn-prev .5s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes turn-next { from { opacity: 0; transform: translateX(-28%) scale(.96); } }
@keyframes turn-prev { from { opacity: 0; transform: translateX(28%) scale(.96); } }
.ph-name.is-long { font-size: .98rem; }

/* the name screen's phone: the welcome's little phone, alone and a little larger */
.me { display: grid; place-items: center; flex-shrink: 0; }
.me .phone { width: 150px; rotate: -2deg; }
.me .ph-pic { height: 128px; }
.me .ph-name { font-size: 1.4rem; }
.me .ph-name.is-long { font-size: 1.05rem; }
.me .ph-name.is-empty { color: color-mix(in srgb, var(--soft) 70%, transparent); }
.me .ph-name.is-jump { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { opacity: .3; transform: translateY(.35em) scale(.7); } }

/* the fifth tile, a couple who just married: across the width, its picture beside its words */
.who .tile:nth-child(5) { grid-column: 1 / -1; aspect-ratio: auto; grid-auto-flow: column; place-content: center; align-items: center; gap: 14px; padding: 14px; }
.who .tile:nth-child(5) img { width: 64px; height: 64px; }
.tile-face.is-wed { position: relative; display: block; }
.tile-face.is-wed i { position: absolute; bottom: -2px; inset-inline-start: -4px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card); font-style: normal; font-size: 15px; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--ink) 60%, transparent); }
.who .tile:nth-child(5) .tile-face img { width: 64px; height: 64px; }
/* in a site's preview the chuppah's "מזל טוב!" stands above the buttons */
.ready-preview .ch-mazal { bottom: 150px; }
/* After the wedding's road in the preview: the hills, the road and the car sit above the buttons. */
.ready-preview .rd-road { height: calc(24.5svh + 120px); }
.ready-preview .rd-car { bottom: calc(12svh + 112px); }
.ready-preview .rd-hills { bottom: calc(24svh + 120px); }
.ready-preview .rd-sun { top: 21svh; }

/* ---------- not a birthday and not a wedding: the events, a row of four under the five ---------- */
.events { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.ev {
  appearance: none; display: grid; justify-items: center; gap: 2px; min-height: 66px; padding: 8px 2px; border: 0; border-radius: 18px; cursor: pointer;
  background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--ink); font-family: var(--ui); font-weight: 700; font-size: .86rem; line-height: 1.15;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .8), 0 14px 26px -22px color-mix(in srgb, var(--ink) 60%, transparent); transition: transform .18s ease, box-shadow .18s ease;
}
.ev i { font-style: normal; font-size: 1.5rem; line-height: 1.25; }
.ev:active { transform: scale(.94); }
.ev[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--accent); }
@media (max-height: 760px) {
  .scr[data-s='1'] .tile { aspect-ratio: auto; padding: 10px 8px; }
  .scr[data-s='1'] .tile img { width: 64px; height: 64px; }
  .scr[data-s='1'] { gap: 12px; }
  .ev { min-height: 58px; }
}
