:root {
  color-scheme: dark;
  --ink: #151113;
  --paper: #f9f2e9;
  --cream: #fffaf2;
  --rose: #ff91b5;
  --red: #a82435;
  --blue: #8fe5ff;
  --green: #7fe3b0;
  --violet: #c6b9ff;
  --font-ui: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-label: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-display: "Arial Black", "Segoe UI Black", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(126, 81, 72, 0.22), transparent 30%),
    radial-gradient(circle at 80% 90%, rgba(41, 53, 83, 0.28), transparent 34%),
    #0c090b;
  color: var(--cream);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  min-height: 100dvh;
  padding: 18px;
  place-items: center;
}

.app-frame {
  position: relative;
  width: min(1280px, 100%);
  height: min(800px, calc(100dvh - 36px));
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: #8f7667;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}

.camera-feed,
.demo-bg,
.effect-layer,
.color-grade,
.film-grain,
.start-screen,
.loading-screen,
.review-screen {
  position: absolute;
  inset: 0;
}

.camera-feed {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scaleX(-1) scale(1.015);
  transition: opacity 0.55s ease;
}

.camera-feed.back-camera {
  transform: scale(1.015);
}

.stage.camera-live .camera-feed {
  opacity: 1;
}

.demo-bg {
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 63% 20%, rgba(255, 252, 228, 0.98), transparent 28%),
    radial-gradient(ellipse at 18% 38%, rgba(255, 229, 205, 0.72), transparent 40%),
    linear-gradient(135deg, #c8ab98 0%, #e2c3ac 37%, #9c7969 72%, #413d40 100%);
  transition: opacity 0.45s ease, filter 0.45s ease;
}

.stage.camera-live .demo-bg {
  opacity: 0;
}

.room-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  mix-blend-mode: screen;
}

.glow-one {
  top: -12%;
  right: 6%;
  width: 38%;
  height: 72%;
  background: rgba(255, 251, 227, 0.94);
  transform: rotate(11deg);
}

.glow-two {
  bottom: -25%;
  left: -8%;
  width: 60%;
  height: 75%;
  background: rgba(255, 219, 198, 0.5);
}

.demo-figure {
  position: absolute;
  left: 50%;
  bottom: -13%;
  width: 34%;
  height: 73%;
  border-radius: 46% 46% 22% 22%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 15%, rgba(74, 54, 52, 0.5), transparent 22%),
    linear-gradient(160deg, rgba(255, 245, 230, 0.7), rgba(239, 216, 199, 0.24) 58%, rgba(114, 87, 78, 0.35));
  filter: blur(18px);
  opacity: 0.75;
}

.demo-figure::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 44%;
  height: 34%;
  border-radius: 50% 50% 44% 44%;
  background: rgba(100, 73, 67, 0.13);
  content: "";
  filter: blur(24px);
  transform: translateX(-50%);
}

.demo-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 26, 24, 0.15), transparent 24%, transparent 72%, rgba(25, 17, 19, 0.42)),
    radial-gradient(ellipse at center, transparent 43%, rgba(28, 18, 20, 0.26) 100%);
}

.effect-layer {
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.color-grade {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(41, 26, 30, 0.11), transparent 26%, transparent 70%, rgba(31, 19, 23, 0.44)),
    radial-gradient(circle at 50% 45%, transparent 42%, rgba(66, 40, 42, 0.18) 100%);
  mix-blend-mode: multiply;
}

.film-grain {
  z-index: 4;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.brand-layer {
  position: absolute;
  z-index: 7;
  top: clamp(20px, 3vw, 36px);
  left: clamp(20px, 3.5vw, 44px);
  pointer-events: none;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.24);
}

.brand-pill {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  padding: 4px 11px 5px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(248, 246, 244, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.brand-pill span {
  color: #ffbdd3;
  font-size: 14px;
}

.brand-title {
  margin: 10px 0 0 -2px;
  opacity: 0;
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.95;
  transform: translateY(10px);
  transition: opacity 0.65s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-frame.reveal-title .brand-title {
  opacity: 1;
  transform: translateY(0);
}

.top-tools {
  position: absolute;
  z-index: 9;
  top: clamp(18px, 2.6vw, 30px);
  right: clamp(18px, 2.6vw, 30px);
  display: flex;
  gap: 9px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(20, 16, 18, 0.24);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  place-items: center;
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  background: rgba(20, 16, 18, 0.44);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.icon-button svg path:first-child {
  fill: rgba(255, 255, 255, 0.08);
}

.icon-button.is-muted svg path:last-child {
  opacity: 0;
}

.icon-button.is-muted::after {
  position: absolute;
  width: 19px;
  height: 1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  content: "";
  transform: rotate(-42deg);
}

.word-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.word-label {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  font-family: var(--font-label);
  font-size: clamp(20px, 2.85vw, 38px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 3px 14px rgba(41, 21, 28, 0.2);
  transform: translate(-50%, -100%) rotate(var(--rotation, 0deg)) scale(var(--scale, 1));
  transform-origin: 50% 100%;
  transition: opacity 0.2s ease;
  will-change: left, top, transform;
}

.word-label.is-visible {
  opacity: 1;
  animation: labelFloat 2.8s ease-in-out infinite;
}

.word-love {
  color: #a71d32;
  --rotation: -4deg;
}

.word-i {
  color: #9bedff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.2vw, 44px);
  --rotation: -2deg;
}

.word-you {
  color: #d6b8ff;
  --rotation: 2deg;
}

@keyframes labelFloat {
  0%,
  100% {
    transform: translate(-50%, -100%) rotate(var(--rotation, 0deg)) scale(var(--scale, 1));
  }
  50% {
    transform: translate(-50%, calc(-100% - 8px)) rotate(calc(var(--rotation, 0deg) + 1.5deg)) scale(var(--scale, 1));
  }
}

.status-chip {
  position: absolute;
  z-index: 8;
  top: clamp(68px, 8vw, 100px);
  right: clamp(18px, 2.8vw, 34px);
  display: flex;
  max-width: 220px;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(22, 17, 20, 0.25);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-5px);
  backdrop-filter: blur(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-frame.is-running .status-chip {
  opacity: 1;
  transform: translateY(0);
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffb65d;
  box-shadow: 0 0 0 4px rgba(255, 182, 93, 0.12);
}

.status-chip.is-tracking .status-dot {
  background: #78efb0;
  box-shadow: 0 0 0 4px rgba(120, 239, 176, 0.12);
}

.gesture-hint {
  position: absolute;
  z-index: 7;
  bottom: clamp(150px, 13vw, 178px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 999px;
  background: rgba(20, 15, 18, 0.27);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  backdrop-filter: blur(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gesture-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hand-icon {
  display: grid;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  place-items: center;
}

.hand-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.bottom-bar {
  position: absolute;
  z-index: 9;
  right: clamp(20px, 3.8vw, 46px);
  bottom: clamp(20px, 3.5vw, 34px);
  left: clamp(20px, 3.8vw, 46px);
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(80px, 1fr);
  align-items: end;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-frame.is-running .bottom-bar {
  opacity: 1;
  transform: translateY(0);
}

.watermark {
  display: flex;
  justify-self: start;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.music-mark {
  display: grid;
  width: 33px;
  height: 33px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(17, 12, 15, 0.22);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  place-items: center;
  transform: rotate(-7deg);
  backdrop-filter: blur(10px);
}

.watermark strong,
.watermark small {
  display: block;
  line-height: 1.2;
}

.watermark strong {
  font-size: 13px;
  letter-spacing: 0.08em;
}

.watermark small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.spell-track-wrap {
  display: flex;
  width: min(430px, 46vw);
  flex-direction: column;
  justify-self: center;
  align-items: center;
  gap: 8px;
  transform: translateY(8px);
}

.spell-track {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.55vw, 7px);
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: rgba(24, 18, 20, 0.3);
  box-shadow: 0 9px 30px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.spell-step {
  display: grid;
  min-width: 102px;
  height: 48px;
  grid-template-columns: 9px 1fr;
  grid-template-rows: 14px 1fr;
  gap: 0 7px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.spell-step:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.spell-step.is-speaking {
  animation: stepSpeak 0.62s cubic-bezier(0.18, 0.82, 0.32, 1);
}

.spell-step.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.17);
}

.spell-step.is-next {
  border-color: color-mix(in srgb, var(--word-accent), transparent 54%);
  box-shadow:
    inset 0 0 18px color-mix(in srgb, var(--word-accent), transparent 92%),
    0 0 18px color-mix(in srgb, var(--word-accent), transparent 86%);
  animation: nextStep 1.8s ease-in-out infinite;
}

.spell-step[data-word="i"] {
  --word-accent: #91e7ff;
}

.spell-step[data-word="love"] {
  --word-accent: #ff93b4;
}

.spell-step[data-word="you"] {
  --word-accent: #d8baff;
}

.finger-dot {
  width: 7px;
  height: 7px;
  grid-row: 1 / span 2;
  border-radius: 50%;
  background: var(--word-accent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--word-accent), transparent 82%),
    0 0 12px color-mix(in srgb, var(--word-accent), transparent 24%);
}

.spell-step small {
  align-self: end;
  color: rgba(255, 255, 255, 0.52);
  font-size: 8px;
  line-height: 1;
}

.spell-step strong {
  align-self: start;
  color: var(--word-accent);
  font-family: var(--font-label);
  font-size: 16px;
  font-style: italic;
  line-height: 1.05;
}

.spell-step[data-word="i"] strong {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.spell-plus {
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}

.spell-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.26);
  white-space: nowrap;
}

.spell-caption b {
  color: rgba(255, 255, 255, 0.93);
  font-family: var(--font-label);
  font-size: 10px;
  font-style: italic;
  font-weight: 800;
}

.voice-wave {
  display: inline-flex;
  height: 11px;
  align-items: center;
  gap: 2px;
}

.voice-wave i {
  width: 1.5px;
  height: 4px;
  border-radius: 2px;
  background: #ffb3c7;
  animation: voiceWave 0.9s ease-in-out infinite;
}

.voice-wave i:nth-child(2) {
  animation-delay: -0.28s;
}

.voice-wave i:nth-child(3) {
  animation-delay: -0.55s;
}

@keyframes voiceWave {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 10px;
  }
}

@keyframes stepSpeak {
  0% {
    transform: translateY(0) scale(1);
  }
  34% {
    transform: translateY(-5px) scale(1.045);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes nextStep {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--word-accent), transparent 66%);
  }
  50% {
    border-color: color-mix(in srgb, var(--word-accent), transparent 28%);
  }
}

.capture-button {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: transform 0.2s ease;
}

.capture-button:hover {
  transform: scale(1.04);
}

.capture-button:active {
  transform: scale(0.94);
}

.capture-ring {
  position: absolute;
  inset: 2px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.capture-core {
  display: grid;
  width: 59px;
  height: 59px;
  border-radius: 50%;
  background: rgba(252, 248, 243, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  place-items: center;
  transition: width 0.15s ease, height 0.15s ease;
}

.capture-button:active .capture-core {
  width: 52px;
  height: 52px;
}

.capture-core svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #a52c48;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.reset-button {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(18, 13, 16, 0.22);
  color: rgba(255, 255, 255, 0.83);
  cursor: pointer;
  font-size: 11px;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease;
}

.reset-button:hover {
  background: rgba(18, 13, 16, 0.45);
}

.reset-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.spoken-layer {
  position: absolute;
  z-index: 18;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spoken-word {
  position: absolute;
  color: var(--spoken-color, #fff);
  font-family: var(--font-label);
  font-size: clamp(58px, 10vw, 142px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.8;
  opacity: 0;
  text-shadow:
    0 3px 0 rgba(255, 255, 255, 0.8),
    0 14px 38px rgba(24, 17, 21, 0.3),
    0 0 44px color-mix(in srgb, var(--spoken-color, #fff), transparent 38%);
  transform: translate(-50%, -50%) scale(0.5) rotate(var(--spoken-rotation, -4deg));
  animation: spokenWord 1.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

.spoken-word--i {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

@keyframes spokenWord {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.45) rotate(var(--spoken-rotation, -4deg));
  }
  14% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.08) rotate(var(--spoken-rotation, -4deg));
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -66%) scale(1) rotate(var(--spoken-rotation, -4deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -104%) scale(0.98) rotate(var(--spoken-rotation, -4deg));
  }
}

.phrase-celebration {
  position: absolute;
  z-index: 21;
  inset: 0;
  display: grid;
  visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 49%, rgba(255, 161, 188, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(24, 14, 20, 0.1), rgba(26, 13, 19, 0.44));
  opacity: 0;
  pointer-events: none;
  place-content: center;
  text-align: center;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.phrase-celebration.is-visible {
  visibility: visible;
  opacity: 1;
}

.phrase-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(42vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 190, 209, 0.28);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgba(255, 182, 204, 0.045),
    0 0 0 100px rgba(255, 182, 204, 0.028),
    0 0 0 170px rgba(255, 182, 204, 0.018);
  transform: translate(-50%, -50%) scale(0.7);
}

.phrase-celebration.is-visible .phrase-rings {
  animation: phraseRings 2.8s ease-out both;
}

.phrase-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(255, 142, 176, 0.16);
  font-family: Georgia, serif;
  font-size: min(42vw, 420px);
  line-height: 1;
  text-shadow: 0 0 55px rgba(255, 112, 158, 0.3);
  transform: translate(-50%, -50%) scale(0.4) rotate(-11deg);
}

.phrase-celebration.is-visible .phrase-heart {
  animation: phraseHeart 2.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.phrase-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.phrase-celebration h2 {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 2.1vw, 30px);
  margin: 0;
  color: #fff9f1;
  font-family: var(--font-label);
  font-size: clamp(58px, 10vw, 146px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.9;
  text-shadow:
    0 4px 0 rgba(255, 255, 255, 0.58),
    0 22px 55px rgba(42, 13, 25, 0.23);
}

.phrase-celebration h2 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) scale(0.7) rotate(-5deg);
}

.phrase-celebration.is-visible h2 span {
  animation: phraseWordIn 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.phrase-celebration.is-visible h2 span:nth-child(1) {
  color: #a9efff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  animation-delay: 0.08s;
}

.phrase-celebration.is-visible h2 span:nth-child(2) {
  color: #ff9ab9;
  animation-delay: 0.23s;
}

.phrase-celebration.is-visible h2 span:nth-child(3) {
  color: #e0c7ff;
  animation-delay: 0.38s;
}

.phrase-caption {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

@keyframes phraseRings {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes phraseHeart {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(-11deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-4deg);
  }
  100% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(1.08) rotate(3deg);
  }
}

@keyframes phraseWordIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(-2deg);
  }
}

.capture-flash {
  position: absolute;
  z-index: 20;
  inset: 0;
  background: #fff9ec;
  opacity: 0;
  pointer-events: none;
}

.capture-flash.is-flashing {
  animation: cameraFlash 0.52s ease-out;
}

@keyframes cameraFlash {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
  }
}

.ink-splash {
  position: absolute;
  z-index: 19;
  top: 25%;
  right: 23%;
  bottom: 22%;
  left: 23%;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 42% 45%, rgba(132, 22, 33, 0.86) 0 16%, transparent 42%),
    radial-gradient(ellipse at 58% 35%, rgba(151, 25, 37, 0.72) 0 12%, transparent 38%),
    radial-gradient(ellipse at 55% 63%, rgba(93, 14, 25, 0.75) 0 13%, transparent 44%);
  filter: blur(13px) saturate(1.2);
  mix-blend-mode: multiply;
  transform: scale(0.6) rotate(-6deg);
}

.ink-splash.is-visible {
  animation: inkReveal 1.35s ease both;
}

@keyframes inkReveal {
  0% {
    opacity: 0;
    transform: scale(0.55) rotate(-9deg);
  }
  22% {
    opacity: 0.82;
  }
  55% {
    opacity: 0.68;
  }
  100% {
    opacity: 0;
    transform: scale(1.18) rotate(2deg);
  }
}

.toast {
  position: absolute;
  z-index: 25;
  bottom: 38px;
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(16, 13, 15, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 10px);
  backdrop-filter: blur(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.start-screen {
  z-index: 30;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(24, 18, 19, 0.58), rgba(54, 37, 37, 0.06) 60%, rgba(33, 26, 31, 0.22)),
    radial-gradient(circle at 74% 26%, rgba(255, 241, 215, 0.24), transparent 30%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.start-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 17, 19, 0.2), transparent 70%);
  backdrop-filter: saturate(0.9);
}

.start-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(28px, 7vw, 96px);
  width: min(570px, 52%);
  transform: translateY(-50%);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.63);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.eyebrow span {
  display: grid;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: #ffd1dd;
  font-size: 13px;
  place-items: center;
}

.start-kicker {
  margin: 26px 0 1px;
  color: rgba(255, 255, 255, 0.73);
  font-family: var(--font-display);
  font-size: clamp(21px, 2.5vw, 31px);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.start-copy h2 {
  margin: 0;
  color: #fffdf9;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.8vw, 78px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.97;
  text-shadow: 0 7px 24px rgba(35, 20, 25, 0.2);
}

.start-copy h2 em {
  color: #ffbacd;
  font-family: var(--font-label);
  font-size: 0.58em;
  font-style: italic;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.start-description {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.75;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.save-button,
.again-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  gap: 10px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 251, 246, 0.94);
  box-shadow: 0 12px 32px rgba(25, 16, 20, 0.16);
  color: #2b2023;
  font-size: 14px;
  font-weight: 700;
}

.primary-button:hover,
.save-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(25, 16, 20, 0.22);
}

.primary-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.camera-dot {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff8eae;
}

.camera-dot::after {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.secondary-button {
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  background: rgba(21, 17, 19, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.secondary-button:hover {
  background: rgba(21, 17, 19, 0.4);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.privacy-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.start-sticker {
  position: absolute;
  z-index: 2;
  font-family: var(--font-label);
  font-style: italic;
  font-weight: 900;
  opacity: 0.88;
  filter: drop-shadow(0 3px 12px rgba(20, 13, 16, 0.22));
  animation: stickerDrift 4.5s ease-in-out infinite;
}

.sticker-one {
  top: 19%;
  right: 20%;
  color: #9f2033;
  font-size: clamp(20px, 2.5vw, 34px);
  transform: rotate(7deg);
}

.sticker-two {
  top: 29%;
  right: 8%;
  color: var(--blue);
  font-size: clamp(16px, 2vw, 28px);
  animation-delay: -1.4s;
  transform: rotate(9deg);
}

.sticker-three {
  right: 24%;
  bottom: 18%;
  color: #ffa8c2;
  font-size: clamp(55px, 8vw, 105px);
  opacity: 0.2;
  animation-delay: -2.7s;
  transform: rotate(-10deg);
}

@keyframes stickerDrift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

.loading-screen {
  z-index: 34;
  display: grid;
  visibility: hidden;
  background: rgba(21, 17, 19, 0.27);
  opacity: 0;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-screen.is-visible {
  visibility: visible;
  opacity: 1;
}

.loading-card {
  width: min(340px, calc(100% - 40px));
  padding: 28px 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(25, 20, 22, 0.7);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  text-align: center;
  backdrop-filter: blur(22px);
}

.tracking-loader {
  position: relative;
  width: 92px;
  height: 72px;
  margin: 0 auto 17px;
}

.tracking-loader span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: landmarkPulse 1.3s ease-in-out infinite;
}

.tracking-loader span:nth-child(1) {
  bottom: 6px;
  left: 41px;
}

.tracking-loader span:nth-child(2) {
  top: 30px;
  left: 10px;
  animation-delay: 0.15s;
}

.tracking-loader span:nth-child(3) {
  top: 8px;
  left: 27px;
  animation-delay: 0.3s;
}

.tracking-loader span:nth-child(4) {
  top: 2px;
  left: 47px;
  animation-delay: 0.45s;
}

.tracking-loader span:nth-child(5) {
  top: 21px;
  right: 8px;
  animation-delay: 0.6s;
}

.tracking-loader::before,
.tracking-loader::after {
  position: absolute;
  height: 1px;
  background: rgba(255, 255, 255, 0.36);
  content: "";
  transform-origin: left center;
}

.tracking-loader::before {
  bottom: 10px;
  left: 14px;
  width: 63px;
  transform: rotate(-18deg);
}

.tracking-loader::after {
  top: 12px;
  left: 30px;
  width: 49px;
  transform: rotate(34deg);
}

@keyframes landmarkPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(0.8);
  }
  50% {
    background: #ffd4e1;
    box-shadow: 0 0 0 7px rgba(255, 175, 202, 0.08);
    transform: scale(1.25);
  }
}

.loading-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.loading-detail {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.text-button {
  margin-top: 20px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-button:hover {
  color: #fff;
}

.review-screen {
  z-index: 35;
  display: grid;
  visibility: hidden;
  overflow: auto;
  background: #07101b;
  opacity: 0;
  place-items: center;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.review-screen.is-visible {
  visibility: visible;
  opacity: 1;
}

.review-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 38%, rgba(90, 166, 174, 0.17), transparent 26%),
    radial-gradient(circle at 76% 28%, rgba(143, 61, 93, 0.19), transparent 25%),
    linear-gradient(142deg, #0a1623, #0a1019 65%, #111322);
}

.review-backdrop::before {
  position: absolute;
  top: 8%;
  left: -1%;
  color: rgba(255, 255, 255, 0.025);
  content: "to lilian";
  font-family: var(--font-display);
  font-size: clamp(80px, 17vw, 230px);
  font-weight: 900;
  letter-spacing: -0.08em;
  white-space: nowrap;
  transform: rotate(-8deg);
}

.review-backdrop::after {
  position: absolute;
  right: -8%;
  bottom: -12%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(255, 255, 255, 0.016),
    0 0 0 160px rgba(255, 255, 255, 0.012);
  content: "";
}

.review-content {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(920px, calc(100% - 48px));
  grid-template-columns: minmax(300px, 0.92fr) minmax(290px, 1fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: 32px 0;
}

.review-heading {
  grid-column: 2;
  align-self: end;
}

.review-badge {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(135, 235, 214, 0.3);
  border-radius: 999px;
  color: #8de9d7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.review-heading h2 {
  margin: 14px 0 7px;
  color: #f9f5ee;
  font-size: clamp(29px, 3.6vw, 46px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.review-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

.review-heading p span {
  margin: 0 6px;
}

.photo-shell {
  position: relative;
  grid-row: 1 / span 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transform: rotate(-1.2deg);
}

.photo-shell img {
  display: block;
  width: 100%;
  max-height: min(58vh, 500px);
  object-fit: contain;
  background: #21191a;
}

.photo-brand {
  position: absolute;
  top: 18px;
  left: 19px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 999px;
  background: rgba(18, 14, 17, 0.25);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  backdrop-filter: blur(11px);
}

.photo-brand span {
  color: #ffc0d3;
}

.review-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.save-button {
  gap: 9px;
  padding: 0 20px;
  border: 1px solid #f9f3e9;
  background: #f9f3e9;
  color: #101821;
  font-size: 13px;
  font-weight: 700;
}

.again-button {
  gap: 8px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.again-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.save-button svg,
.again-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.review-tip {
  grid-column: 2;
  align-self: start;
  margin: -6px 0 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 10px;
}

@media (max-aspect-ratio: 1 / 1) {
  .app-shell {
    padding: 0;
  }

  .app-frame {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .start-copy {
    top: auto;
    right: 24px;
    bottom: max(42px, calc(env(safe-area-inset-bottom) + 28px));
    left: 24px;
    width: auto;
    transform: none;
  }

  .start-copy h2 {
    font-size: clamp(43px, 12vw, 68px);
  }

  .start-description {
    margin-top: 18px;
  }

  .start-actions {
    margin-top: 24px;
  }

  .sticker-one {
    top: 15%;
    right: 15%;
  }

  .sticker-two {
    top: 21%;
    right: 8%;
  }

  .sticker-three {
    top: 12%;
    right: 42%;
    bottom: auto;
  }

  .review-content {
    width: min(460px, calc(100% - 34px));
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 32px 0 max(28px, env(safe-area-inset-bottom));
  }

  .review-heading,
  .review-actions,
  .review-tip,
  .photo-shell {
    grid-column: 1;
    grid-row: auto;
  }

  .review-heading {
    order: 1;
  }

  .photo-shell {
    order: 2;
    max-height: 49dvh;
    transform: rotate(-0.7deg);
  }

  .photo-shell img {
    max-height: 49dvh;
  }

  .review-actions {
    order: 3;
  }

  .review-tip {
    order: 4;
    margin-top: -10px;
  }

  .review-heading h2 {
    margin-top: 10px;
    font-size: clamp(27px, 8vw, 36px);
  }

  .save-button,
  .again-button {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .brand-layer {
    top: max(20px, env(safe-area-inset-top));
  }

  .brand-title {
    font-size: 36px;
  }

  .top-tools {
    top: max(18px, env(safe-area-inset-top));
  }

  .status-chip {
    top: calc(max(18px, env(safe-area-inset-top)) + 50px);
    right: 18px;
    font-size: 10px;
  }

  .bottom-bar {
    right: 18px;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    left: 18px;
    min-height: 40px;
  }

  .spell-track-wrap {
    position: absolute;
    bottom: 57px;
    left: 50%;
    width: calc(100vw - 28px);
    transform: translateX(-50%);
  }

  .spell-track {
    gap: 3px;
    padding: 4px;
    border-radius: 19px;
  }

  .spell-step {
    min-width: 0;
    height: 42px;
    flex: 1 1 0;
    padding: 4px 6px;
    border-radius: 14px;
  }

  .spell-step small {
    font-size: 7px;
  }

  .spell-step strong {
    font-size: 14px;
  }

  .spell-plus {
    font-size: 9px;
  }

  .spell-caption {
    max-width: 100%;
    justify-content: center;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .capture-button {
    width: 67px;
    height: 67px;
  }

  .capture-core {
    width: 52px;
    height: 52px;
  }

  .watermark strong {
    font-size: 11px;
  }

  .watermark small {
    font-size: 9px;
  }

  .music-mark {
    width: 29px;
    height: 29px;
    font-size: 19px;
  }

  .reset-button {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-self: end;
    justify-content: center;
  }

  .reset-button span {
    display: none;
  }

  .gesture-hint {
    bottom: 146px;
    max-width: calc(100% - 34px);
    font-size: 10px;
    white-space: nowrap;
  }

  .word-label {
    font-size: clamp(19px, 6.3vw, 29px);
  }

  .phrase-celebration h2 {
    flex-wrap: wrap;
    max-width: 92vw;
    gap: 2px 14px;
    font-size: clamp(56px, 18vw, 90px);
    line-height: 0.92;
  }

  .phrase-heart {
    font-size: 70vw;
  }

  .spoken-word {
    font-size: clamp(64px, 19vw, 100px);
  }

  .start-copy .eyebrow {
    font-size: 9px;
  }

  .start-copy h2 {
    letter-spacing: -0.065em;
  }

  .start-description {
    font-size: 12px;
  }

  .start-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media (max-height: 620px) and (max-aspect-ratio: 1 / 1) {
  .start-kicker {
    margin-top: 15px;
  }

  .start-copy h2 {
    font-size: 40px;
  }

  .start-description {
    display: none;
  }

  .start-actions {
    margin-top: 18px;
  }

  .privacy-note {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
