@font-face {
  font-family: Inter;
  src: url('/assets/inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #f9f9f9;
  --ink: #161616;
  --muted: #555557;
  --subtle: #efefef;
  --accent: #e5fa67;
  --app-width: 428px;
  --edge: clamp(19px, 5.6vw, 27px);
  font: 1rem/1.45 Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--surface);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #285cd1; outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell {
  position: relative;
  display: grid;
  grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr);
  width: min(100%, var(--app-width));
  height: 100svh;
  height: 100dvh;
  min-height: 455px;
  margin-inline: auto;
  padding-block: max(11px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
  background: var(--surface);
}
.splash {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--surface);
  pointer-events: none;
  animation: splash-out .84s ease both;
}
.splash-lockup {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -.048em;
}
.splash-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 100px;
  height: 82px;
}
.splash-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 65px;
  aspect-ratio: 1;
  border-radius: 20px;
  color: var(--accent);
  background: var(--ink);
  box-shadow: 0 8px 24px #1a20372d;
  rotate: -7deg;
  animation: splash-mark-in .51s cubic-bezier(.2,.8,.28,1.3) both;
}
.splash-mark .icon { width: 32px; height: 32px; }
.splash-petal {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 24px;
  height: 33px;
  border-radius: 48% 50% 40% 56%;
  background: #f36ea8;
  transform: rotate(-39deg);
  animation: splash-petal-in .44s .12s cubic-bezier(.2,.8,.28,1.25) both;
}
.splash-petal:nth-child(2) {
  inset: auto 5px 2px auto;
  background: #72b6fe;
  transform: rotate(39deg);
  animation-delay: .17s;
}
@keyframes splash-out {
  0%, 65% { opacity: 1; visibility: visible; }
  99% { visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes splash-mark-in { from { opacity: 0; transform: scale(.48) rotate(24deg); } }
@keyframes splash-petal-in { from { opacity: 0; scale: .28; } }
.masthead {
  position: relative;
  display: grid;
  place-items: center;
  margin-inline: var(--edge);
  min-height: 48px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: none;
  font-size: .875rem;
  font-weight: 580;
  letter-spacing: -.045em;
}
.brand-mark { display: grid; place-items: center; }
.brand-mark .icon { width: 16px; height: 16px; }
.back {
  position: absolute;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--subtle);
}
.back:hover, .secondary:hover { background: #e3e3e3; }

.workspace {
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  gap: clamp(12px, 2.5dvh, 24px);
  min-height: 0;
}
.stage {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  container-type: size;
}
.stage[data-mode="upload"] { margin-inline: var(--edge); }

.sample {
  position: relative;
  width: min(100%, 104cqh);
  height: min(100%, 104cqw);
}
.sample-art { position: absolute; inset: 0; pointer-events: none; }
.bloom {
  position: absolute;
  top: 49%;
  left: 50%;
  width: 91%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-9deg);
  border-radius: 47% 53% 43% 57% / 47% 41% 59% 53%;
  background: radial-gradient(ellipse at 29% 64%, #ffdd98 0, #fff1d5 25%, transparent 60%),
    radial-gradient(ellipse at 76% 47%, #82c9ff 0, #c2ddff 46%, transparent 68%),
    linear-gradient(140deg, #e0eeff, #bcceff 61%, #ffc9eb);
  animation: hero-bloom .95s cubic-bezier(.18,.78,.24,1) both;
}
@supports (clip-path: shape(from 50% 6%, line to 90% 40%, close)) {
  .bloom {
    border-radius: 0;
    clip-path: shape(from 50% 6%,
      curve to 71% 28% with 62% 5% / 67% 12%,
      curve to 93% 27% with 78% 23% / 89% 19%,
      curve to 84% 55% with 99% 34% / 91% 48%,
      curve to 95% 76% with 93% 61% / 99% 69%,
      curve to 65% 81% with 91% 88% / 75% 85%,
      curve to 49% 98% with 61% 92% / 54% 98%,
      curve to 30% 79% with 40% 96% / 33% 88%,
      curve to 6% 73% with 20% 84% / 9% 81%,
      curve to 16% 50% with 1% 66% / 8% 55%,
      curve to 13% 27% with 10% 44% / 7% 34%,
      curve to 35% 30% with 20% 19% / 28% 24%,
      curve to 50% 6% with 38% 16% / 43% 8%,
      close);
  }
}
.sample-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 89%;
  height: 55%;
  border: 1px dashed #5782b23d;
  border-right-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  animation: hero-orbit .85s .2s cubic-bezier(.18,.78,.24,1) both;
}
.petals {
  position: absolute;
  z-index: 3;
  width: 17%;
  aspect-ratio: 1;
  filter: drop-shadow(2px 0 white) drop-shadow(-2px 0 white) drop-shadow(0 2px white) drop-shadow(0 -2px white);
  background:
    radial-gradient(ellipse 30% 32% at 50% 27%, currentColor 97%, transparent),
    radial-gradient(ellipse 31% 30% at 28% 65%, currentColor 97%, transparent),
    radial-gradient(ellipse 31% 30% at 72% 65%, currentColor 97%, transparent),
    radial-gradient(circle at 50% 55%, currentColor 31%, transparent 32%);
  transform: rotate(var(--tilt));
  animation: hero-sticker .63s var(--enter) cubic-bezier(.2,.78,.34,1.28) both;
}
.petals-pink { --tilt: -22deg; --enter: .35s; top: 15%; left: 9%; color: #f40b77; }
.petals-blue { --tilt: 23deg; --enter: .52s; right: 7%; bottom: 13%; color: #069df2; }
.sample-camera {
  --tilt: 13deg;
  --enter: .52s;
  position: absolute;
  z-index: 3;
  top: 12%;
  right: 15%;
  display: grid;
  place-items: center;
  width: 12%;
  aspect-ratio: 1;
  border: 2px solid white;
  border-radius: 31%;
  background: var(--accent);
  color: #27330e;
  box-shadow: 0 3px 10px #26391d20;
  transform: rotate(var(--tilt));
  animation: hero-sticker .65s var(--enter) cubic-bezier(.2,.78,.34,1.28) both,
    hero-sticker-float 1.2s 1.3s cubic-bezier(.45,.05,.55,.95) 2 alternate;
}
.sample-camera .icon { width: 59%; height: 59%; }
.sample-spark {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  opacity: .9;
  animation: hero-twinkle .9s var(--enter) cubic-bezier(.2,.78,.34,1) 3 alternate backwards;
}
.sample-spark-lime { --enter: .73s; width: 5%; right: 6%; top: 36%; color: #c0df34; }
.sample-spark-blue { --enter: 1s; width: 6%; left: 14%; bottom: 12%; color: #458cf0; }
.sample-spark .icon { width: 100%; height: auto; aspect-ratio: 1; }
.print {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44%;
  aspect-ratio: 1919 / 2560;
  overflow: hidden;
  border: clamp(2px, 1.2cqh, 5px) solid white;
  border-radius: clamp(4px, 2cqh, 10px);
  box-shadow: 0 4px 14px #10213e20, 0 14px 26px #10213e23;
  background: #174d99;
  transform: var(--placement);
  animation: hero-print .8s var(--enter) cubic-bezier(.19,.79,.21,1) both;
}
.print-back {
  --placement: translate(-12%, -52%) rotate(16deg);
  --turn: -20deg;
  --enter: .11s;
  z-index: 1;
  width: 40%;
}
.print-front {
  --placement: translate(-83%, -45%) rotate(-10deg);
  --turn: 14deg;
  --enter: .25s;
  z-index: 2;
}
.artwork { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.avatar { position: absolute; left: 20.32%; top: 31.75%; width: 59.42%; height: 43.98%; object-fit: cover; }

@keyframes hero-bloom {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-19deg) scale(.77); }
}
@keyframes hero-orbit {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-35deg) scale(.88); }
}
@keyframes hero-print {
  from { opacity: 0; transform: translateY(13%) var(--placement) rotate(var(--turn)) scale(.82); }
  70% { opacity: 1; transform: translateY(-2%) var(--placement) rotate(-2deg) scale(1.025); }
}
@keyframes hero-sticker {
  from { opacity: 0; transform: translateY(15%) rotate(calc(var(--tilt) - 20deg)) scale(.54); }
}
@keyframes hero-sticker-float {
  from { transform: rotate(var(--tilt)); }
  to { transform: translateY(-13%) rotate(calc(var(--tilt) + 7deg)); }
}
@keyframes hero-twinkle {
  from { opacity: .3; transform: rotate(-15deg) scale(.47); }
}

.controls { min-width: 0; padding-inline: var(--edge); }
.panel { animation: panel-in .25s ease-out both; }
h1 {
  margin: 0;
  font-size: clamp(1.95rem, 9.1vw, 2.65rem);
  font-weight: 560;
  letter-spacing: -.058em;
  line-height: 1.07;
  text-wrap: balance;
}
#welcome-title { text-wrap: initial; }
.panel p {
  max-width: 34ch;
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: clamp(.84rem, 3.7vw, .96rem);
  line-height: 1.5;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  padding: 9px 14px;
  border: 0;
  border-radius: 99px;
  text-decoration: none;
  text-align: center;
  font-size: .875rem;
  font-weight: 590;
  transition: background .18s ease, transform .18s ease;
}
.button:active { transform: scale(.98); }
.primary { color: white; background: #151515; }
.primary:hover { background: #303030; }
.secondary { color: var(--ink); background: var(--subtle); }
.welcome-actions { display: flex; gap: 8px; }
.welcome-actions .button { flex: 1; }
.privacy { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--muted); font-size: .72rem; }
.privacy .icon { width: 13px; height: 13px; }
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 5px 0;
  border: 0;
  color: var(--ink);
  background: none;
  font-size: .84rem;
  font-weight: 570;
}
.text-button .icon { width: 16px; height: 16px; }
.text-button:hover, .credit:hover { text-decoration: underline; text-underline-offset: 3px; }
#again { width: 100%; margin-top: 3px; }
.empty-stage { display: grid; place-items: center; width: 100%; height: 100%; padding: 12px 0; }
.upload-target {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  width: 100%;
  height: min(100%, 285px);
  padding: 10px;
  border: 1px dashed #a6a6aa;
  border-radius: 29px;
  color: var(--ink);
  background: #f2f2f3;
  text-align: center;
  transition: background .18s, border-color .18s;
}
.upload-target:hover, .stage.drag-over .upload-target { background: #edf2ff; border-color: #4575bf; }
.upload-target strong { font-size: .98rem; font-weight: 585; }
.upload-target > span:last-child { color: var(--muted); font-size: .82rem; }
.upload-art {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  width: clamp(38px, 19cqh, 62px);
  aspect-ratio: 1;
  border-radius: 19px;
  background: #dceaff;
  color: #142c48;
  transform: rotate(-9deg);
}
.upload-art > .icon { width: 52%; height: 52%; }
.upload-art span { position: absolute; right: -5px; bottom: -4px; display: grid; place-items: center; width: 20px; aspect-ratio: 1; border: 2px solid #f2f2f3; border-radius: 50%; background: var(--accent); color: #161616; }
.upload-art span .icon { width: 10px; height: 10px; }
.canvas-wrap {
  width: min(calc(100cqw - 40px), 69cqh, 275px);
  aspect-ratio: 1919 / 2560;
  outline: 4px solid white;
  border-radius: 7px;
  box-shadow: 0 9px 25px #14274425;
  background: #174d99;
  animation: panel-in .25s ease-out both;
}
.canvas-wrap canvas, .canvas-wrap img { display: block; width: 100%; height: 100%; border-radius: 7px; }
.canvas-wrap canvas { cursor: grab; touch-action: none; }
.canvas-wrap canvas:active { cursor: grabbing; }
.result-wrap { animation: reveal .38s cubic-bezier(.2,.8,.24,1) both; }
.crop-settings { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; min-height: 34px; color: var(--muted); font-size: .83rem; font-weight: 500; }
.crop-settings input { flex: 1; min-width: 30px; accent-color: #242424; }
.crop-settings .text-button { min-height: 36px; padding: 0 2px; white-space: nowrap; }
.panel .error { margin-block: 5px 10px; color: #a81740; font-size: .82rem; }
footer { display: grid; place-items: center; padding: clamp(8px, 2.3dvh, 22px) var(--edge) 0; }
.credit { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; color: #4e4e50; text-decoration: none; font-size: .73rem; font-weight: 520; }

.sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, var(--app-width));
  max-width: none;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 33px 33px 0 0;
  padding: 0;
  background: white;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 -12px 70px #14141422;
}
.sheet[open] { animation: sheet-up .43s cubic-bezier(.16,1,.3,1) both; }
.sheet::backdrop { background: #20251e68; animation: backdrop-in .24s ease both; }
.sheet-content {
  max-height: calc(100dvh - 34px);
  overflow: auto;
  border-radius: inherit;
  padding: clamp(24px, 4.8dvh, 46px) var(--edge) max(17px, env(safe-area-inset-bottom));
}
.sheet-close {
  position: absolute;
  z-index: 1;
  top: -19px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 4px solid #d2d4cc;
  border-radius: 50%;
  color: #252527;
  background: white;
}
.sheet-close:hover { background: #f1f3ec; }
.sheet-close .icon { width: 15px; height: 15px; }
.sheet-art {
  position: relative;
  display: none;
  place-items: center;
  isolation: isolate;
  width: 160px;
  height: clamp(96px, 15dvh, 122px);
  margin: 0 auto 11px;
}
.sheet[data-mode="upload"] .sheet-photo,
.sheet[data-mode="loading-photo"] .sheet-photo,
.sheet[data-mode="generating"] .sheet-frame,
.sheet[data-mode="thanks"] .sheet-thanks { display: grid; }
.sheet-photo::before, .sheet-frame::before, .sheet-thanks::before {
  position: absolute;
  z-index: -1;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0f4ff;
  content: "";
}
.sheet-photo-back, .sheet-photo-front {
  position: absolute;
  display: grid;
  place-items: center;
  width: 59px;
  height: 70px;
  border: 3px solid white;
  border-radius: 11px;
  box-shadow: 0 5px 13px #24334a22;
}
.sheet-photo-back {
  translate: 12px -2px;
  rotate: 17deg;
  background: #a5c7ff;
  animation: photo-card-back .58s cubic-bezier(.22,.8,.33,1.22) both;
}
.sheet-photo-front {
  translate: -11px 3px;
  rotate: -12deg;
  color: #332140;
  background: #ffe1ef;
  animation: photo-card-front .6s cubic-bezier(.22,.8,.33,1.22) both;
}
.sheet-photo-front .icon, .sheet-frame-photo .icon { width: 28px; height: 28px; }
.sheet-photo-arrow {
  position: absolute;
  right: 38px;
  bottom: 14%;
  display: grid;
  place-items: center;
  width: 35px;
  aspect-ratio: 1;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 3px 10px #2930282b;
  animation: photo-ready .72s .11s cubic-bezier(.2,.8,.28,1.25) both;
}
.sheet[data-mode="loading-photo"] .sheet-photo-arrow { animation: photo-lift .54s ease-in-out infinite alternate; }
.sheet-photo-arrow .icon { width: 16px; height: 16px; }
.sheet-photo-spark, .sheet-frame-spark, .thanks-spark {
  position: absolute;
  width: 17px;
  height: 17px;
  animation: sheet-twinkle .78s .14s ease both;
}
.sheet-photo-spark { top: 12%; left: 17px; color: #ee458c; }
.sheet-frame-photo {
  display: grid;
  place-items: center;
  width: 63px;
  height: 70px;
  border: 3px solid white;
  border-radius: 10px;
  color: #29446e;
  background: linear-gradient(145deg, #bbdcff, #e4e8fb);
  animation: frame-photo-in .74s cubic-bezier(.2,.75,.22,1) both;
}
.sheet-frame-guides {
  position: absolute;
  width: 76px;
  height: 84px;
  animation: frame-guides-in .68s cubic-bezier(.18,.78,.3,1) both;
}
.sheet-frame-guides i { position: absolute; width: 18px; height: 18px; border: 3px solid #23292c; }
.sheet-frame-guides i:nth-child(1) { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 7px 0 0; }
.sheet-frame-guides i:nth-child(2) { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 7px 0 0; }
.sheet-frame-guides i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 7px; }
.sheet-frame-guides i:nth-child(4) { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 7px; }
.sheet-frame-scan {
  position: absolute;
  width: 63px;
  height: 3px;
  border-radius: 99px;
  background: #9bc220;
  box-shadow: 0 0 11px #a7ce5299;
  animation: frame-scan .77s .1s ease-in-out both;
}
.sheet-frame-spark { top: 13%; right: 16px; color: #8aab20; }
.sheet-thanks::before { background: #f7ffdc; }
.sheet-medallion {
  display: grid;
  place-items: center;
  width: 66px;
  aspect-ratio: 1;
  border: 5px solid #f1ffa9;
  border-radius: 37% 45% 35% 42%;
  color: #242d13;
  background: var(--accent);
  box-shadow: 0 0 0 5px #f2fbc9;
  rotate: -8deg;
  animation: celebrate .58s cubic-bezier(.21,.82,.27,1.28) both;
}
.sheet-medallion .icon { width: 31px; height: 31px; stroke-width: 2.2; }
.confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 10px;
  border-radius: 2px;
  background: var(--color, #bfd94b);
  transform: translate(var(--x), var(--y)) rotate(var(--angle));
  animation: confetti .8s cubic-bezier(.14,.74,.3,1) both;
}
.confetti:nth-of-type(1) { --x: -63px; --y: -30px; --angle: -24deg; --color: #ed658d; }
.confetti:nth-of-type(2) { --x: 55px; --y: -37px; --angle: 36deg; --color: #69aafa; animation-delay: 40ms; }
.confetti:nth-of-type(3) { --x: -62px; --y: 31px; --angle: 52deg; --color: #7ab9ff; animation-delay: 70ms; }
.confetti:nth-of-type(4) { --x: 52px; --y: 29px; --angle: -38deg; --color: #ef8cb6; }
.confetti:nth-of-type(5) { --x: -37px; --y: -49px; --angle: 39deg; --color: #e0b44a; animation-delay: 70ms; }
.confetti:nth-of-type(6) { --x: 65px; --y: -3px; --angle: 61deg; animation-delay: 40ms; }
.thanks-spark { bottom: 9%; left: 25%; width: 14px; height: 14px; color: #819b1c; }

.sheet h2 { margin: 0; font-size: clamp(1.65rem, 7vw, 2rem); font-weight: 550; letter-spacing: -.06em; line-height: 1.08; }
#sheet-copy { width: min(100%, 32ch); margin: 9px auto clamp(15px, 3dvh, 25px); color: var(--muted); font-size: .88rem; }
#sheet-copy.sheet-error { color: #a81740; }
.sheet.drag-over .sheet-content { background: #f6f8ff; }
.loader { position: relative; overflow: hidden; height: 4px; width: min(128px, 65%); margin: 0 auto 10px; border-radius: 99px; background: #e9edda; }
.loader span { position: absolute; inset: 0 auto 0 0; width: 45%; border-radius: 99px; background: #748c19; animation: loading .94s ease-in-out infinite; }
.sheet-actions { display: grid; justify-items: stretch; }
.sheet-contact { margin-top: 14px; color: var(--muted); font-size: .82rem; }
.sheet-contact p { margin: 0; }
.sheet-contact a { display: inline-block; padding: 6px 4px; color: var(--ink); font-weight: 620; text-underline-offset: 3px; }
.sheet-credit { justify-self: center; margin-top: 8px; }

@keyframes sheet-up { from { transform: translateY(105%); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes photo-card-back { from { opacity: 0; transform: translate(-11px, 7px) rotate(-20deg); } }
@keyframes photo-card-front { from { opacity: 0; transform: translate(11px, 7px) rotate(16deg); } }
@keyframes photo-ready { from { opacity: 0; transform: translateY(6px) scale(.65); } }
@keyframes photo-lift { to { transform: translateY(-5px); } }
@keyframes sheet-twinkle { from { opacity: 0; transform: rotate(-35deg) scale(.2); } 70% { transform: rotate(14deg) scale(1.16); } }
@keyframes frame-photo-in { from { opacity: 0; transform: translate(-17px, 8px) scale(.8) rotate(-13deg); } }
@keyframes frame-guides-in { from { opacity: 0; transform: scale(1.33); } }
@keyframes frame-scan { 0% { opacity: 0; transform: translateY(-26px); } 24%, 74% { opacity: 1; } 100% { opacity: 0; transform: translateY(24px); } }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(235%); } }
@keyframes celebrate { from { opacity: 0; transform: scale(.35) rotate(38deg); } }
@keyframes confetti { from { opacity: 0; transform: translate(0, 0) rotate(0) scale(.35); } }

@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px) scale(.96) rotate(-2deg); } }

@media (min-width: 500px) and (min-height: 600px) {
  :root { background: #e9e9e9; }
  body { display: grid; place-items: center; min-height: 100dvh; padding: 16px 0; }
  .shell {
    height: min(calc(100dvh - 32px), 890px);
    padding-top: 14px;
    border: 1px solid #fff;
    border-radius: 36px;
    box-shadow: 0 10px 40px #25252515;
  }
  .sheet { width: min(100%, calc(var(--app-width) - 2px)); margin-bottom: max(17px, calc((100dvh - 890px) / 2 + 1px)); border-radius: 33px; }
}
@media (max-height: 640px) {
  .masthead { min-height: 44px; }
  .workspace { gap: 8px; }
  h1 { font-size: clamp(1.85rem, 8.3vw, 2.23rem); }
  .panel p { margin-block: 7px 11px; }
}
@media (orientation: landscape) and (max-height: 499px) {
  .shell { min-height: 0; }
  .workspace { gap: 6px; }
  h1 { font-size: clamp(1.45rem, 6dvh, 1.9rem); }
  #welcome-title br { display: none; }
  .panel p { margin-block: 5px 8px; }
  .button { min-height: 39px; }
  .sheet-content { padding-top: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  *, *::before, *::after, .sheet::backdrop { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
