@font-face {
  font-family: Anton;
  src: url('/assets/fonts/anton-latin.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url('/assets/fonts/nunito-latin-var.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f8f6f1;
  --ink-strong: #fffdfa;
  --muted: rgba(248, 246, 241, .68);
  --faint: rgba(248, 246, 241, .46);
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .29);
  --world: #0c1422;
  --surface: rgba(9, 15, 27, .76);
  --surface-solid: #101a2a;
  --surface-soft: rgba(18, 27, 43, .74);
  --glass-ink: rgba(7, 16, 28, .42);
  --glass-rim: rgba(220, 232, 242, .28);
  --glass-warm: rgba(239, 164, 122, .2);
  --message-in: rgba(239, 243, 248, .9);
  --message-in-ink: #242a33;
  --message-out: #2f7cf6;
  --coral: #ec7655;
  --sage: #aeb995;
  --sky: #6f91be;
  --danger: #ff9d8c;
  --success: #aee0c5;
  --display: Anton, Impact, sans-serif;
  --body: Nunito, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --utility: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --header-h: 68px;
  --ease-film: cubic-bezier(.22, .78, .2, 1);
}

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 520ms; animation-timing-function: var(--ease-film); }

.cinema-world { view-transition-name: hatchpix-world; }
.site-header { view-transition-name: hatchpix-header; }

body[data-theme="light"] {
  color-scheme: light;
  --surface: rgba(25, 29, 34, .7);
  --surface-solid: #f4f0e8;
  --surface-soft: rgba(247, 244, 238, .88);
  --line: rgba(255, 255, 255, .22);
  --message-in: rgba(249, 249, 247, .94);
  --message-in-ink: #242526;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--world);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--world);
  font-family: var(--body);
  text-rendering: optimizeLegibility;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
label[for],
a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

button:focus-visible,
input:focus-visible,
label:has(input:focus-visible),
a:focus-visible {
  outline: 3px solid #9ec5ff;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cinema-world {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: var(--world);
}

.cinema-plate,
.cinema-motion,
.cinema-scrim,
.send-light,
.cinema-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cinema-plate {
  object-fit: cover;
  object-position: center;
  transform: scale(1.018);
  transition: opacity 850ms var(--ease-film), filter 850ms var(--ease-film);
  animation: carriageDrift 14s ease-in-out infinite alternate;
}

.cinema-motion {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.018);
  transition: opacity 900ms var(--ease-film);
}

.cinema-motion.is-active.is-ready {
  opacity: 1;
}

.cinema-plate-dark {
  opacity: 1;
}

.cinema-plate-light {
  opacity: 0;
}

body[data-theme="light"] .cinema-plate-dark {
  opacity: 0;
}

body[data-theme="light"] .cinema-plate-light {
  opacity: 1;
}

.cinema-scrim {
  background:
    linear-gradient(90deg, rgba(4, 8, 15, .84) 0%, rgba(4, 8, 15, .55) 24%, rgba(4, 8, 15, .14) 44%, rgba(4, 8, 15, .05) 76%, rgba(4, 8, 15, .24) 100%),
    linear-gradient(180deg, rgba(3, 6, 12, .42) 0%, transparent 27%, transparent 62%, rgba(3, 6, 12, .66) 100%);
  transition: opacity 850ms var(--ease-film);
}

body[data-theme="light"] .cinema-scrim {
  opacity: .82;
  background:
    linear-gradient(90deg, rgba(12, 14, 18, .74) 0%, rgba(12, 14, 18, .48) 25%, rgba(12, 14, 18, .08) 48%, rgba(12, 14, 18, .02) 80%, rgba(12, 14, 18, .18) 100%),
    linear-gradient(180deg, rgba(10, 12, 16, .36) 0%, transparent 30%, transparent 64%, rgba(10, 12, 16, .62) 100%);
}

.cinema-grain {
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.send-light {
  left: -35%;
  width: 28%;
  opacity: 0;
  transform: skewX(-12deg);
  background: linear-gradient(90deg, transparent, rgba(247, 225, 188, .42), rgba(116, 164, 233, .28), transparent);
  filter: blur(22px);
}

.send-light.is-crossing {
  animation: sendLight 1050ms var(--ease-film) both;
}

@keyframes carriageDrift {
  from { transform: scale(1.018) translate3d(-.12%, 0, 0); }
  to { transform: scale(1.023) translate3d(.12%, -.08%, 0); }
}

@keyframes sendLight {
  0% { left: -35%; opacity: 0; }
  18% { opacity: .75; }
  72% { opacity: .45; }
  100% { left: 116%; opacity: 0; }
}

.site-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 26vw) 1fr auto;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 clamp(18px, 3vw, 52px);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(5, 8, 14, .58), rgba(5, 8, 14, .08));
}

.wordmark {
  color: var(--ink-strong);
  font-size: 1.06rem;
  font-weight: 950;
  letter-spacing: .24em;
  text-decoration: none;
}

.wordmark span {
  color: var(--coral);
}

.sequence-label {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-family: var(--utility);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sequence-label strong {
  color: #fff;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .8rem;
}

.utility-nav {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.utility-nav a {
  color: rgba(255, 255, 255, .72);
  font-family: var(--utility);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}

.utility-nav a:hover {
  color: #fff;
}

.truth-badge,
.access-pill {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-family: var(--utility);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.access-pill {
  min-height: 31px;
  padding: 0 .8rem;
  border: 1px solid rgba(236, 118, 85, .65);
  border-radius: 999px;
  background: rgba(8, 13, 23, .46);
}

.access-pill.is-ready {
  border-color: rgba(174, 224, 197, .52);
  color: var(--success);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, .7);
  background: transparent;
}

.sound-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: rgba(255, 255, 255, .66);
  background: rgba(5, 8, 15, .34);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.sound-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .48);
  transform: translateY(-1px);
}

.sound-toggle[aria-pressed="true"] {
  color: #fff;
  border-color: rgba(174, 224, 197, .48);
  background: rgba(29, 68, 59, .42);
  box-shadow: 0 0 18px rgba(174, 224, 197, .12);
}

.sound-toggle svg {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sound-speaker {
  fill: currentColor;
  stroke: none;
}

.sound-waves,
.sound-slash {
  transform-origin: center;
  transition: opacity 160ms ease, transform 220ms var(--ease-film);
}

.sound-waves {
  opacity: 0;
  transform: scale(.72);
}

.sound-slash {
  opacity: 1;
}

.sound-toggle[aria-pressed="true"] .sound-waves {
  opacity: 1;
  transform: scale(1);
}

.sound-toggle[aria-pressed="true"] .sound-slash {
  opacity: 0;
  transform: scale(.72);
}

.theme-toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(5, 8, 15, .42);
}

.theme-toggle-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f6f1e8;
  box-shadow: 0 0 12px rgba(255, 245, 215, .38);
  transition: transform 420ms var(--ease-film);
}

body[data-theme="light"] .theme-toggle-track i {
  transform: translateX(16px);
}

.experience {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 27vw) minmax(0, 1fr);
  height: calc(100dvh - var(--header-h));
  min-height: 0;
  transition: grid-template-columns 720ms var(--ease-film);
}

.story-panel {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden auto;
  padding: clamp(34px, 5.2vh, 64px) clamp(24px, 3.7vw, 62px) clamp(24px, 3.1vh, 42px);
  border-right: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(90deg, rgba(5, 9, 16, .4), rgba(5, 9, 16, .06));
  transition: padding 720ms var(--ease-film), background 720ms var(--ease-film), border-color 720ms var(--ease-film), opacity 220ms ease, transform 520ms var(--ease-film), filter 220ms ease;
}

.step-kicker {
  display: flex;
  align-items: center;
  gap: .72rem;
  margin: 0 0 clamp(24px, 3.2vh, 38px);
  color: rgba(255, 255, 255, .74);
  font-family: var(--utility);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.step-kicker span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 50%;
}

.story-panel h1 {
  max-width: 9ch;
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(3.15rem, 4.25vw, 5.2rem);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-shadow: 0 14px 44px rgba(0, 0, 0, .28);
}

.story-panel h1 span {
  display: block;
}

.story-panel h1 .accent {
  color: var(--coral);
}

.hero-copy {
  max-width: 27rem;
  margin: clamp(22px, 3.5vh, 36px) 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(.94rem, 1.08vw, 1.1rem);
  font-weight: 650;
  line-height: 1.42;
}

.subject-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 180px);
  margin-top: clamp(22px, 3vh, 34px);
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(4, 8, 15, .24);
}

.subject-switch button {
  min-height: 34px;
  padding: 0 .8rem;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  font-size: .77rem;
  font-weight: 800;
}

.subject-switch button[aria-pressed="true"] {
  color: #171717;
  background: #f5f1ea;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.choose-photo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 310px);
  min-height: 64px;
  margin-top: 14px;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, .72);
  color: #fff;
  background: linear-gradient(105deg, rgba(12, 21, 36, .94), rgba(17, 31, 52, .84));
  box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.choose-photo:hover {
  transform: translateY(-2px);
  border-color: #fff;
  background: linear-gradient(105deg, rgba(19, 33, 55, .98), rgba(27, 48, 78, .9));
}

.choose-photo svg {
  width: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.source-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: .8rem;
  width: min(100%, 330px);
  margin-top: 20px;
  padding: .62rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 16px;
  background: rgba(7, 12, 21, .58);
  backdrop-filter: blur(12px);
}

.source-card img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 11px;
}

.source-card strong,
.source-card span {
  display: block;
}

.source-card strong {
  overflow: hidden;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card span {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .68rem;
}

.source-card button,
.style-summary button {
  border: 0;
  border-bottom: 1px solid currentColor;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  font-size: .68rem;
  font-weight: 800;
}

.style-summary {
  width: min(100%, 310px);
  margin-top: 18px;
  padding: .8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.style-summary span,
.style-summary strong {
  display: block;
}

.style-summary span {
  color: var(--faint);
  font-family: var(--utility);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.style-summary strong {
  margin-top: .25rem;
  color: #fff;
  font-size: .94rem;
}

.access-form {
  width: min(100%, 330px);
  margin-top: 18px;
  padding: 1rem;
  border: 1px solid rgba(236, 118, 85, .5);
  border-radius: 16px;
  background: rgba(9, 15, 27, .74);
  backdrop-filter: blur(14px);
}

.access-form > label {
  display: block;
  margin-bottom: .5rem;
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.access-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
}

.access-form input,
.access-form button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .22);
}

.access-form input {
  min-width: 0;
  padding: 0 .75rem;
  border-radius: 10px 0 0 10px;
  background: rgba(255, 255, 255, .08);
}

.access-form button {
  padding: 0 .8rem;
  border-radius: 0 10px 10px 0;
  color: #111;
  background: var(--coral);
  font-weight: 900;
}

.access-form p {
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

.commitment {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.commitment p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: .68rem;
  line-height: 1.45;
}

.commitment p:first-child {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-family: var(--utility);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.commitment p + p {
  margin-top: .55rem;
}

.commitment .price-teaser {
  margin-top: .72rem;
}

.price-teaser a {
  color: rgba(255, 255, 255, .86);
  font-weight: 850;
  text-decoration-color: rgba(236, 118, 85, .75);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.commitment .is-error,
.access-form .is-error {
  color: var(--danger);
}

.commitment i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 13px rgba(236, 118, 85, .72);
}

.chat-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 62px auto minmax(0, 1fr) auto auto auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: clamp(12px, 2vh, 20px) clamp(18px, 2.7vw, 46px) clamp(12px, 2vh, 20px) 0;
  overflow: hidden;
  border: 1px solid var(--glass-rim);
  border-radius: 24px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .045), transparent 28%, transparent 72%, rgba(239, 164, 122, .03)),
    linear-gradient(180deg, rgba(7, 16, 28, .42), rgba(7, 16, 28, .12) 28%, rgba(7, 16, 28, .2));
  box-shadow:
    inset 1px 0 rgba(255, 239, 220, .13),
    inset 0 1px rgba(255, 255, 255, .11),
    inset 0 0 90px rgba(2, 7, 14, .16),
    inset 0 -34px 80px rgba(2, 7, 14, .14),
    0 24px 80px rgba(0, 0, 0, .16);
  -webkit-backdrop-filter: blur(3px) saturate(.94);
  backdrop-filter: blur(3px) saturate(.94);
  transition: margin 720ms var(--ease-film), border-color 520ms var(--ease-film), box-shadow 520ms var(--ease-film), background 520ms var(--ease-film), opacity 220ms ease, transform 520ms var(--ease-film), filter 220ms ease;
}

.chat-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, .075), transparent 17%, transparent 70%, rgba(255, 210, 174, .045)),
    radial-gradient(circle at 74% 48%, rgba(111, 145, 190, .08), transparent 40%);
  opacity: .54;
  pointer-events: none;
}

.chat-stage > *,
.drawer-heading,
.composer-field {
  min-width: 0;
}

body.is-photo-handoff .story-panel {
  view-transition-name: hatchpix-photo-rail;
}

body.is-photo-handoff .chat-stage {
  view-transition-name: hatchpix-photo-chat;
}

body.is-photo-handoff .sequence-label {
  view-transition-name: hatchpix-photo-sequence;
}

body.is-photo-handoff .experience,
body.is-photo-handoff .story-panel,
body.is-photo-handoff .chat-stage,
body.is-photo-handoff .chat-lane {
  transition: none !important;
}

::view-transition-old(root) {
  animation: none;
  opacity: 0;
}

::view-transition-new(root) {
  animation: none;
}

::view-transition-group(hatchpix-photo-rail),
::view-transition-group(hatchpix-photo-chat) {
  animation-duration: 760ms;
  animation-timing-function: var(--ease-film);
  animation-fill-mode: both;
}

::view-transition-group(hatchpix-photo-sequence) {
  animation-duration: 420ms;
  animation-timing-function: var(--ease-film);
  animation-fill-mode: both;
}

::view-transition-old(hatchpix-photo-rail),
::view-transition-old(hatchpix-photo-chat),
::view-transition-old(hatchpix-photo-sequence),
::view-transition-new(hatchpix-photo-rail),
::view-transition-new(hatchpix-photo-chat),
::view-transition-new(hatchpix-photo-sequence) {
  mix-blend-mode: normal;
}

::view-transition-old(hatchpix-photo-rail) {
  animation: photoHandoffOld 240ms ease-out both;
}

::view-transition-new(hatchpix-photo-rail) {
  animation: photoHandoffNew 560ms 120ms var(--ease-film) both;
}

::view-transition-old(hatchpix-photo-chat) {
  animation: photoHandoffChatOld 360ms ease-out both;
}

::view-transition-new(hatchpix-photo-chat) {
  animation: photoHandoffChatNew 620ms 80ms var(--ease-film) both;
}

::view-transition-old(hatchpix-photo-sequence) {
  animation: photoHandoffOld 160ms ease-out both;
}

::view-transition-new(hatchpix-photo-sequence) {
  animation: photoHandoffNew 300ms 100ms var(--ease-film) both;
}

body.is-photo-fallback-exit .story-panel {
  opacity: .16;
  filter: blur(3px);
  transform: translate3d(-6px, 0, 0);
}

body.is-photo-fallback-exit .chat-stage {
  opacity: .72;
  filter: blur(1.5px);
  transform: scale(.996);
}

body.is-photo-fallback-enter .source-card,
body.is-photo-fallback-enter .attachment-preview {
  animation: photoHandoffNew 560ms 80ms var(--ease-film) both;
}

@keyframes photoHandoffOld {
  to {
    opacity: 0;
    filter: blur(3px);
    transform: translate3d(-5px, 0, 0);
  }
}

@keyframes photoHandoffNew {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(8px, 0, 0);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes photoHandoffChatOld {
  to {
    opacity: 0;
    filter: blur(2px);
    transform: scale(.998);
  }
}

@keyframes photoHandoffChatNew {
  from {
    opacity: .72;
    filter: blur(1px);
    transform: scale(1.002);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

body[data-theme="light"] .chat-stage {
  --glass-rim: rgba(255, 255, 255, .36);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .08), transparent 30%, transparent 72%, rgba(239, 164, 122, .045)),
    linear-gradient(180deg, rgba(10, 17, 28, .36), rgba(10, 17, 28, .1) 30%, rgba(10, 17, 28, .18));
}

body[data-state="generating"] .chat-stage {
  border-color: rgba(158, 197, 255, .42);
  box-shadow:
    inset 1px 0 rgba(255, 246, 232, .16),
    inset 0 1px rgba(255, 255, 255, .14),
    inset 0 -34px 80px rgba(2, 7, 14, .2),
    0 0 62px rgba(47, 124, 246, .09),
    0 24px 80px rgba(0, 0, 0, .2);
}

body[data-state="complete"] .chat-stage {
  border-color: rgba(239, 164, 122, .38);
}

.chat-stage.is-refracting {
  animation: chatGlassRefraction 1050ms var(--ease-film) both;
}

@keyframes chatGlassRefraction {
  0%, 100% { filter: brightness(1); }
  42% {
    filter: brightness(1.08);
    box-shadow:
      inset 1px 0 rgba(255, 246, 232, .22),
      inset 0 1px rgba(255, 255, 255, .18),
      inset 0 -34px 80px rgba(2, 7, 14, .16),
      0 0 74px rgba(111, 145, 190, .16),
      0 24px 80px rgba(0, 0, 0, .2);
  }
}

.chat-stage.is-dragging::after {
  content: "Drop your photo into the conversation";
  position: absolute;
  z-index: 40;
  inset: 74px 18px 92px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 255, 255, .72);
  border-radius: 24px;
  color: #fff;
  background: rgba(12, 20, 34, .78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px);
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.4vw, 2.4rem);
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.chat-header {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 0 1.15rem;
  border-bottom: 1px solid rgba(220, 232, 242, .22);
  background: linear-gradient(180deg, rgba(7, 12, 21, .68), rgba(7, 12, 21, .32));
  box-shadow: inset 0 1px rgba(255, 255, 255, .075), 0 14px 32px rgba(2, 7, 14, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.reply-route {
  --route-progress: 0%;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(330px, 1.1fr);
  align-items: center;
  gap: clamp(.8rem, 2vw, 2rem);
  min-height: 64px;
  padding: .52rem 1.15rem .56rem;
  border-bottom: 1px solid rgba(220, 232, 242, .16);
  background:
    linear-gradient(90deg, rgba(11, 20, 34, .82), rgba(11, 20, 34, .5)),
    rgba(7, 12, 21, .4);
  box-shadow: 0 12px 30px rgba(2, 7, 14, .08), inset 0 1px rgba(255, 255, 255, .035);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.reply-route[data-route-index="1"] { --route-progress: 25%; }
.reply-route[data-route-index="2"] { --route-progress: 50%; }
.reply-route[data-route-index="3"] { --route-progress: 75%; }

.reply-route-copy {
  min-width: 0;
}

.reply-route-copy > span,
.reply-route-copy > strong,
.reply-route-copy > p {
  display: block;
}

.reply-route-copy > span {
  color: rgba(255, 255, 255, .46);
  font-family: var(--utility);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.reply-route-copy > strong {
  margin-top: .08rem;
  color: #fff;
  font-size: .76rem;
  font-weight: 850;
}

.reply-route-copy > p {
  overflow: hidden;
  margin: .1rem 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: .58rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-route ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reply-route ol::before,
.reply-route ol::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 12.5%;
  height: 1px;
  pointer-events: none;
}

.reply-route ol::before {
  right: 12.5%;
  background: rgba(255, 255, 255, .2);
}

.reply-route ol::after {
  z-index: 1;
  width: var(--route-progress);
  background: linear-gradient(90deg, var(--message-out), var(--coral));
  box-shadow: 0 0 12px rgba(239, 164, 122, .32);
  transition: width 520ms var(--ease-film);
}

.reply-route li {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: .2rem;
  color: rgba(255, 255, 255, .42);
  font-family: var(--utility);
  font-size: .48rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.reply-route li i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(8, 15, 26, .92);
  color: rgba(255, 255, 255, .58);
  font-style: normal;
  transition: color 300ms ease, border-color 300ms ease, background 300ms ease, box-shadow 300ms ease, transform 300ms var(--ease-film);
}

.reply-route li.is-done {
  color: rgba(255, 255, 255, .72);
}

.reply-route li.is-done i {
  border-color: rgba(92, 151, 246, .82);
  color: #fff;
  background: var(--message-out);
}

.reply-route li.is-current {
  color: #fff;
}

.reply-route li.is-current i {
  border-color: rgba(239, 164, 122, .95);
  color: #18191b;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 164, 122, .12), 0 0 18px rgba(239, 164, 122, .24);
  transform: scale(1.06);
}

body[data-theme="light"] .reply-route {
  border-bottom-color: rgba(255, 255, 255, .34);
  background: linear-gradient(90deg, rgba(25, 35, 49, .76), rgba(25, 35, 49, .46));
}

.contact-avatar,
.message-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7495c4, #4e6f9d);
  box-shadow: 0 6px 20px rgba(15, 32, 56, .24);
}

.contact-avatar {
  width: 38px;
  height: 38px;
  font-size: .92rem;
  font-weight: 800;
}

.chat-header div strong,
.chat-header div span {
  display: block;
}

.chat-header div strong {
  color: #fff;
  font-size: 1rem;
}

.chat-header div span {
  color: rgba(255, 255, 255, .56);
  font-size: .68rem;
}

.chat-info {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 12, 21, .18);
  font-family: Georgia, serif;
  font-size: .82rem;
  font-weight: 800;
}

.sample-scene-switch {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 .58rem;
  min-width: 150px;
  max-width: 210px;
  min-height: 40px;
  margin-left: auto;
  padding: .38rem .48rem .38rem .7rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  color: #fff;
  background: rgba(7, 12, 21, .2);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.sample-scene-switch:hover {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-1px);
}

.sample-scene-switch span,
.sample-scene-switch strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-scene-switch span {
  color: rgba(255, 255, 255, .46);
  font-family: var(--utility);
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.sample-scene-switch strong {
  margin-top: .08rem;
  font-size: .68rem;
}

.sample-scene-switch i {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .08);
  font-size: .78rem;
  font-style: normal;
}

body:not([data-state="sample"]) .sample-scene-switch {
  display: none;
}

.chat-context {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-family: var(--utility);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.chat-context i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(174, 224, 197, .68);
}

.chat-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden auto;
  padding: clamp(16px, 2.2vh, 28px) clamp(24px, 4vw, 68px) 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .24) transparent;
  mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 12px), transparent 100%);
}

.chat-lane {
  width: min(100%, 820px);
  min-height: 100%;
  margin: 0 auto;
  transition: width 720ms var(--ease-film);
}

.chat-date {
  width: fit-content;
  margin: 0 auto clamp(16px, 2.5vh, 26px);
  padding: .28rem .62rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: rgba(255, 255, 255, .66);
  background: rgba(4, 9, 16, .28);
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: .55rem;
}

.sample-thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 8px;
}

.sample-chat-message {
  display: flex;
  align-items: flex-end;
  gap: .42rem;
  width: 100%;
  margin-top: 7px;
  transform-origin: 0 100%;
}

.sample-chat-message.is-grouped {
  margin-top: 2px;
}

.sample-chat-message.is-outgoing {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-left: 22%;
  transform-origin: 100% 100%;
}

.sample-chat-message.is-incoming {
  padding-right: 22%;
}

.sample-chat-message.is-entering.is-incoming {
  animation: messageArrive .4s cubic-bezier(.18, .88, .25, 1.18) both;
}

.sample-chat-message.is-entering.is-outgoing {
  animation: sampleOutgoingArrive .4s cubic-bezier(.18, .88, .25, 1.18) both;
}

.sample-chat-message.is-entering.is-outgoing.is-from-composer {
  animation: messageFromComposer .58s cubic-bezier(.18, .88, .22, 1.12) both;
}

.sample-message-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(224, 236, 249, .56);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7898c5, #53739f);
  box-shadow: 0 2px 8px rgba(7, 20, 38, .18), inset 0 1px rgba(255, 255, 255, .16);
  font-size: .54rem;
  font-weight: 780;
}

.sample-message-avatar.is-placeholder {
  visibility: hidden;
}

.sample-chat-bubble {
  position: relative;
  width: fit-content;
  max-width: min(100%, 450px);
  margin: 0;
  padding: .48rem .74rem;
  border: 1px solid transparent;
  border-radius: 16.5px;
  font-size: clamp(.76rem, .84vw, .87rem);
  font-weight: 560;
  line-height: 1.28;
  letter-spacing: -.008em;
  box-shadow: 0 3px 10px rgba(2, 8, 16, .1), inset 0 1px rgba(255, 255, 255, .2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sample-chat-message.is-incoming .sample-chat-bubble {
  color: var(--message-in-ink);
  border-color: rgba(255, 255, 255, .42);
  background: var(--message-in);
  -webkit-backdrop-filter: blur(12px) saturate(.88);
  backdrop-filter: blur(12px) saturate(.88);
}

.sample-chat-message.is-outgoing .sample-chat-bubble {
  color: #fff;
  border-color: rgba(255, 255, 255, .13);
  background: var(--message-out);
  box-shadow: 0 3px 10px rgba(14, 72, 164, .2), inset 0 1px rgba(255, 255, 255, .15);
}

.sample-chat-message.is-incoming.is-group-continuation .sample-chat-bubble {
  border-top-left-radius: 6px;
}

.sample-chat-message.is-incoming:not(.is-group-end) .sample-chat-bubble {
  border-bottom-left-radius: 6px;
}

.sample-chat-message.is-outgoing.is-group-continuation .sample-chat-bubble {
  border-top-right-radius: 6px;
}

.sample-chat-message.is-outgoing:not(.is-group-end) .sample-chat-bubble {
  border-bottom-right-radius: 6px;
}

.sample-chat-message.is-incoming.is-group-end .sample-chat-bubble {
  border-bottom-left-radius: 8px;
}

.sample-chat-message.is-outgoing.is-group-end .sample-chat-bubble {
  border-bottom-right-radius: 8px;
}

.sample-chat-message.is-group-end .sample-chat-bubble::after,
.sample-incoming-row .message::after,
.sample-reaction-row .message::after {
  content: "";
  position: absolute;
  bottom: -1px;
  width: 13px;
  height: 13px;
  background: var(--message-in);
  clip-path: path("M 13 0 L 13 13 C 8 13 3 12.5 0 10.5 C 6.5 9.2 8.8 5.5 9.5 0 Z");
  filter: drop-shadow(0 2px 2px rgba(2, 8, 16, .06));
}

.sample-chat-message.is-incoming.is-group-end .sample-chat-bubble::after,
.sample-incoming-row .message::after,
.sample-reaction-row .message::after {
  left: -7px;
}

.sample-chat-message.is-outgoing.is-group-end .sample-chat-bubble::after {
  right: -7px;
  background: var(--message-out);
  transform: scaleX(-1);
}

.sample-chat-photo {
  position: relative;
  width: clamp(128px, 14vw, 178px);
  margin: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .94);
  border-radius: 19px 19px 19px 7px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.sample-chat-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sample-chat-photo figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: .2rem .42rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, .92);
  background: rgba(7, 12, 21, .58);
  font-size: .52rem;
  font-weight: 850;
  letter-spacing: .04em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sample-chat-message.is-outgoing small {
  flex: 0 0 100%;
  margin: -1px 5px 1px 0;
  color: rgba(255, 255, 255, .52);
  font-size: .58rem;
  text-align: right;
}

.incoming-row {
  margin-left: 0;
}

.sample-typing-row,
.sample-incoming-row,
.sample-reaction-row {
  gap: .42rem;
  padding-right: 22%;
  margin-top: 7px;
  transform-origin: 0 100%;
}

.sample-incoming-row.is-entering .message,
.sample-reaction-row.is-entering .message,
.sample-incoming-row.is-entering .message-avatar,
.sample-reaction-row.is-entering .message-avatar {
  animation: messageArrive .46s cubic-bezier(.18, .88, .25, 1.18) both;
}

.sample-reaction-row {
  margin-top: clamp(16px, 2.2vh, 24px);
}

.sample-reaction-row .message {
  max-width: min(100%, 450px);
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 18px 18px 18px 7px;
  background: var(--message-in);
  box-shadow: 0 3px 10px rgba(2, 8, 16, .1), inset 0 1px rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(12px) saturate(.88);
  backdrop-filter: blur(12px) saturate(.88);
  animation: messageArrive .4s cubic-bezier(.18, .88, .25, 1.18) both;
}

.typing-bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(39, 43, 52, .52);
  animation: typingPulse 1s ease-in-out infinite;
}

.typing-bubble i:nth-child(2) {
  animation-delay: .14s;
}

.typing-bubble i:nth-child(3) {
  animation-delay: .28s;
}

.message-avatar {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-color: rgba(224, 236, 249, .56);
  background: linear-gradient(145deg, #7898c5, #53739f);
  box-shadow: 0 2px 8px rgba(7, 20, 38, .18), inset 0 1px rgba(255, 255, 255, .16);
  font-size: .54rem;
  font-weight: 780;
}

.message {
  position: relative;
  width: fit-content;
  max-width: min(100%, 450px);
  margin: 0;
  padding: .48rem .74rem;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 16.5px 16.5px 16.5px 7px;
  font-size: clamp(.76rem, .84vw, .87rem);
  font-weight: 560;
  line-height: 1.28;
  letter-spacing: -.008em;
  box-shadow: 0 3px 10px rgba(2, 8, 16, .1), inset 0 1px rgba(255, 255, 255, .2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-backdrop-filter: blur(12px) saturate(.88);
  backdrop-filter: blur(12px) saturate(.88);
}

.incoming-message {
  color: var(--message-in-ink);
  background: var(--message-in);
}

.sample-reply {
  position: relative;
  isolation: isolate;
  width: clamp(142px, 14vw, 184px);
  margin: clamp(14px, 2vh, 22px) 3% 0 auto;
  transform: rotate(-.4deg);
  transform-origin: 80% 70%;
  animation: stickerIdle 4.4s ease-in-out infinite;
}

.sample-reply.is-entering {
  animation:
    stickerSend .76s cubic-bezier(.16, .9, .2, 1.22) both,
    stickerIdle 4.4s ease-in-out .76s infinite;
}

.sample-reply.is-awaiting-flight {
  opacity: 0;
  animation: none;
}

.sticker-send-ghost {
  position: fixed;
  z-index: 90;
  margin: 0;
  pointer-events: none;
  transform-origin: center;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .2));
  will-change: top, left, width, height, transform, filter, opacity;
}

.sticker-send-ghost .sample-sticker-image {
  width: 100%;
  height: 100%;
}

.sample-reply::before,
.generated-reply::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18% 0 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 145, 190, .2), rgba(8, 15, 26, .06) 50%, transparent 72%);
  filter: blur(16px);
}

.sample-sticker-art {
  position: relative;
  aspect-ratio: 1;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sample-sticker-media {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .19));
}

.sample-sticker-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.motion-badge {
  display: none;
}

.sticker-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sticker-shadow { fill: rgba(18, 25, 36, .16); }
.sticker-cutline { fill: #fffaf4; }
.sticker-character,
.sticker-head,
.sticker-wave-arm,
.sticker-accent {
  transform-box: fill-box;
  transform-origin: center;
}
.pet-body,
.pet-head,
.pet-ear {
  fill: #d98b48;
  stroke: #5b4236;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pet-ear { fill: #e9a05c; }
.pet-stripe,
.pet-whisker,
.sticker-face {
  fill: none;
  stroke: #3a3131;
  stroke-width: 3.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pet-stripe { stroke: #9f5e35; stroke-width: 4; }
.pet-whisker { stroke-width: 2.4; }
.sticker-tail {
  fill: none;
  stroke: #d98b48;
  stroke-width: 14;
  stroke-linecap: round;
}
.sticker-limb {
  fill: none;
  stroke: #d98b48;
  stroke-width: 14;
  stroke-linecap: round;
}
.person-hair-back,
.person-hair,
.person-bob {
  fill: #282b36;
  stroke: #25252e;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.person-face,
.person-hand {
  fill: #efb58e;
  stroke: #513b39;
  stroke-width: 3;
}
.person-body {
  fill: #df745f;
  stroke: #593c40;
  stroke-width: 3.5;
  stroke-linejoin: round;
}
.person-shirt { fill: #2e405a; }
.person-arm {
  fill: none;
  stroke: #df745f;
  stroke-width: 15;
  stroke-linecap: round;
}
.person-leg {
  fill: none;
  stroke: #26364e;
  stroke-width: 14;
  stroke-linecap: round;
}
.person-blush { fill: rgba(205, 91, 96, .26); }
.sticker-accent {
  fill: none;
  stroke: #ef8a65;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sticker-accent.fill-accent { fill: #ef8a65; stroke: #7a4942; stroke-width: 2.4; }
.sticker-accent.fill-blue { fill: #78a9ca; stroke: #375a74; stroke-width: 2.4; }

.sample-sticker-vector.is-active .sticker-character {
  animation: vectorBreathe 1.8s ease-in-out infinite;
}
.sample-sticker-vector.is-active[data-pose="yes_nod"] .sticker-head,
.sample-sticker-vector.is-active[data-pose="yes"] .sticker-head {
  animation: vectorNod 1.2s ease-in-out infinite;
}
.sample-sticker-vector.is-active[data-pose="omw"] .sticker-character,
.sample-sticker-vector.is-active[data-pose="zoomies"] .sticker-character {
  animation: vectorRun .72s ease-in-out infinite;
}
.sample-sticker-vector.is-active[data-pose="brb"] .sticker-wave-arm {
  animation: vectorWave .72s ease-in-out infinite;
}
.sample-sticker-vector.is-active[data-pose="love_it"] .fill-accent,
.sample-sticker-vector.is-active[data-pose="love_you"] .fill-accent,
.sample-sticker-vector.is-active[data-pose="snack_tax"] .fill-accent {
  animation: vectorPulse .9s ease-in-out infinite;
}
.sample-sticker-vector.is-active[data-pose="guilty"] .sticker-character,
.sample-sticker-vector.is-active[data-pose="not_me"] .sticker-character {
  animation: vectorSway 1.25s ease-in-out infinite;
}

@keyframes vectorBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.012); }
}

@keyframes vectorNod {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  35% { transform: rotate(2deg) translateY(4px); }
  62% { transform: rotate(-1deg) translateY(-1px); }
}

@keyframes vectorRun {
  0%, 100% { transform: translate3d(-3px, 1px, 0) rotate(-2deg); }
  50% { transform: translate3d(4px, -4px, 0) rotate(2deg); }
}

@keyframes vectorWave {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(15deg); }
}

@keyframes vectorPulse {
  0%, 100% { transform: scale(.92); }
  50% { transform: scale(1.12); }
}

@keyframes vectorSway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.sample-reply figcaption {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .38rem;
  width: fit-content;
  margin: -.35rem 3% 0 auto;
  padding: .25rem .42rem .25rem .62rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  background: rgba(4, 9, 16, .54);
  font-size: .7rem;
}

.sample-reply figcaption i {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--message-out);
  font-size: .58rem;
  font-style: normal;
}

.tapback {
  position: absolute;
  top: 8%;
  right: -5%;
  bottom: auto;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: rgba(246, 246, 244, .96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
  font-size: 1rem;
}

.tapback.is-entering {
  animation: tapbackPop .44s cubic-bezier(.18, .9, .22, 1.45) both;
}

.chat-stage.is-resetting-sample .sample-incoming-row,
.chat-stage.is-resetting-sample .sample-reply,
.chat-stage.is-resetting-sample .sample-reaction-row,
.chat-stage.is-resetting-sample .sample-thread {
  opacity: 0;
  filter: blur(3px);
  transition: opacity .3s ease, filter .3s ease;
}

@keyframes messageArrive {
  from { opacity: 0; transform: translate3d(-12px, 10px, 0) scale(.92); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes sampleOutgoingArrive {
  from { opacity: 0; transform: translate3d(12px, 10px, 0) scale(.92); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes messageFromComposer {
  0% { opacity: 0; transform: translate3d(24px, 54px, 0) scale(.64); filter: blur(2px); }
  62% { opacity: 1; transform: translate3d(-3px, -2px, 0) scale(1.018); filter: blur(0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@keyframes typingPulse {
  0%, 60%, 100% { opacity: .32; transform: translateY(0); }
  30% { opacity: .88; transform: translateY(-3px); }
}

@keyframes stickerSend {
  0% { opacity: 0; transform: translate3d(48px, 34px, 0) rotate(5deg) scale(.68); filter: blur(5px); }
  58% { opacity: 1; transform: translate3d(-7px, -4px, 0) rotate(-1.5deg) scale(1.035); filter: blur(0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(-.4deg) scale(1); filter: blur(0); }
}

@keyframes tapbackPop {
  from { opacity: 0; transform: translate3d(7px, 8px, 0) scale(.25) rotate(14deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}

@keyframes stickerIdle {
  0%, 100% { transform: rotate(-.4deg) translate3d(0, 0, 0); }
  50% { transform: rotate(.2deg) translate3d(0, -4px, 0); }
}

.live-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
}

.pack-draft-marker {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  align-self: stretch;
  width: min(96%, 470px);
  margin: .15rem 1.5% .05rem auto;
  padding: .58rem .72rem;
  border: 1px solid rgba(158, 197, 255, .26);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(110deg, rgba(18, 32, 52, .72), rgba(9, 16, 28, .62));
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 12px 28px rgba(0, 0, 0, .1);
  animation: messageArrive 360ms var(--ease-film) both;
}

.pack-draft-marker > i {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(158, 197, 255, .54);
  border-radius: 50%;
  background: rgba(47, 124, 246, .2);
}

.pack-draft-marker > i::before {
  content: "✦";
  color: #bcd7ff;
  font-size: .72rem;
  font-style: normal;
}

.pack-draft-marker span,
.pack-draft-marker strong,
.pack-draft-marker small {
  display: block;
}

.pack-draft-marker span {
  color: rgba(188, 215, 255, .7);
  font-family: var(--utility);
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pack-draft-marker strong {
  margin-top: .08rem;
  font-size: .72rem;
}

.pack-draft-marker small {
  margin-top: .08rem;
  color: rgba(255, 255, 255, .55);
  font-size: .56rem;
  line-height: 1.25;
}

.pack-draft-marker[data-stage="generating"] > i {
  border-color: rgba(239, 164, 122, .74);
  background: rgba(239, 164, 122, .18);
  animation: composerGuide 1.3s ease-in-out infinite;
}

.pack-draft-marker[data-stage="complete"] {
  border-color: rgba(174, 224, 197, .32);
}

.pack-draft-marker[data-stage="complete"] > i {
  border-color: rgba(174, 224, 197, .64);
  background: rgba(174, 224, 197, .18);
}

.pack-draft-marker[data-stage="complete"] > i::before {
  content: "✓";
  color: var(--success);
}

.outgoing-photo,
.pending-reply,
.generated-reply {
  align-self: flex-end;
  margin-right: 1.5%;
}

.outgoing-photo {
  position: relative;
  width: clamp(170px, 18vw, 260px);
  padding: 5px;
  border-radius: 24px 24px 8px 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
  animation: messageArrive 520ms var(--ease-film) both;
  transition: width 420ms var(--ease-film);
}

.outgoing-photo.is-awaiting-flight {
  visibility: hidden;
  animation: none;
}

.photo-send-ghost {
  position: fixed;
  z-index: 90;
  display: block;
  margin: 0;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .3), 0 0 0 5px rgba(255, 255, 255, .82);
  transform-origin: center;
  will-change: left, top, width, height, transform, border-radius;
}

.attachment-preview {
  transition: opacity 240ms ease, transform 420ms var(--ease-film);
}

.attachment-preview.is-sending {
  opacity: .16;
  transform: scale(.94);
}

.outgoing-photo img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 19px 19px 5px 19px;
  transition: max-height 420ms var(--ease-film);
}

.outgoing-photo.is-processing::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 19px 19px 5px 19px;
  background: linear-gradient(105deg, transparent 15%, rgba(255, 255, 255, .64) 48%, transparent 78%);
  transform: translateX(-110%);
  animation: photoScan 1450ms ease-in-out infinite;
}

.photo-status {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .55rem .35rem;
  color: #20242a;
  font-size: .68rem;
  font-weight: 800;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(47, 124, 246, .26);
  border-top-color: var(--message-out);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.pending-reply {
  position: relative;
  display: flex;
  align-items: center;
  gap: .58rem;
  min-width: 105px;
  max-width: 70%;
  padding: .72rem .88rem .72rem 1rem;
  border-radius: 22px 22px 7px 22px;
  color: #fff;
  background: var(--message-out);
  box-shadow: 0 14px 32px rgba(25, 87, 180, .26);
  font-size: 1rem;
  font-weight: 800;
  animation: messageArrive 420ms var(--ease-film) both;
}

.pending-reply small {
  display: block;
  margin-left: auto;
  color: rgba(255, 255, 255, .7);
  font-size: .58rem;
  font-weight: 700;
}

.pending-reply .spinner {
  border-color: rgba(255, 255, 255, .3);
  border-top-color: #fff;
}

.pending-reply.is-morphing {
  animation: bubbleMorph 620ms var(--ease-film) both;
}

.generated-reply {
  position: relative;
  isolation: isolate;
  width: clamp(170px, 21vw, 310px);
  animation: stickerReveal 680ms var(--ease-film) both;
}

.generated-reply img {
  display: block;
  width: 100%;
  max-height: 310px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .24));
}

.generated-reply figcaption {
  margin-top: -.2rem;
  color: rgba(255, 255, 255, .72);
  font-size: .66rem;
  text-align: right;
}

@keyframes spin { to { transform: rotate(1turn); } }
@keyframes messageArrive {
  from { opacity: 0; transform: translate3d(22px, 18px, 0) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes photoScan { to { transform: translateX(110%); } }
@keyframes bubbleMorph {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  55% { opacity: .32; transform: scale(.88); filter: blur(4px); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(8px); }
}
@keyframes stickerReveal {
  0% { opacity: 0; transform: scale(.64) rotate(-5deg); filter: blur(8px); }
  64% { opacity: 1; transform: scale(1.06) rotate(1deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.choice-drawer {
  position: relative;
  z-index: 12;
  padding: .9rem 1rem .85rem;
  border-top: 1px solid rgba(255, 255, 255, .2);
  background: rgba(8, 14, 24, .86);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px) saturate(1.08);
  animation: drawerUp 430ms var(--ease-film) both;
}

body[data-theme="light"] .choice-drawer {
  color: #1b1e22;
  border-top-color: rgba(255, 255, 255, .5);
  background: rgba(247, 244, 238, .9);
}

@keyframes drawerUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.drawer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .72rem;
}

.drawer-heading span,
.drawer-heading strong {
  display: block;
}

.drawer-heading span,
.drawer-heading p {
  margin: 0;
  color: var(--faint);
  font-family: var(--utility);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body[data-theme="light"] .drawer-heading span,
body[data-theme="light"] .drawer-heading p {
  color: rgba(27, 30, 34, .56);
}

.drawer-heading strong {
  margin-top: .15rem;
  color: inherit;
  font-size: .9rem;
}

.style-strip,
.phrase-strip {
  display: flex;
  gap: .55rem;
  overflow: auto hidden;
  padding: .1rem .1rem .45rem;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
}

.style-choice {
  flex: 0 0 92px;
  padding: 4px 4px .5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 13px;
  color: inherit;
  background: rgba(255, 255, 255, .06);
  scroll-snap-align: start;
  text-align: left;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

body[data-theme="light"] .style-choice {
  border-color: rgba(25, 29, 34, .18);
  background: rgba(255, 255, 255, .62);
}

.style-choice:hover {
  transform: translateY(-2px);
}

.style-choice[aria-pressed="true"] {
  border-color: var(--coral);
  background: rgba(236, 118, 85, .14);
  box-shadow: 0 0 0 2px rgba(236, 118, 85, .16);
}

.style-choice img {
  display: block;
  width: 82px;
  height: 68px;
  object-fit: cover;
  border-radius: 9px;
}

.style-choice span {
  display: block;
  overflow: hidden;
  margin: .42rem .25rem 0;
  font-size: .66rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-filter-0 img { filter: saturate(1.18) contrast(.96) brightness(1.06); }
.preview-filter-1 img { filter: contrast(1.22) saturate(1.1); }
.preview-filter-2 img { filter: sepia(.22) saturate(.9) contrast(1.08); }
.preview-filter-3 img { filter: contrast(1.35) saturate(.8); image-rendering: pixelated; }
.preview-filter-4 img { filter: saturate(1.55) contrast(1.16); }
.preview-filter-5 img { filter: saturate(1.06) brightness(1.08) contrast(.96); }
.preview-filter-6 img { filter: saturate(1.24) hue-rotate(-8deg); }
.preview-filter-7 img { filter: contrast(1.12) saturate(.82) brightness(.94); }
.preview-filter-8 img { filter: sepia(.38) saturate(.68) brightness(1.13); }

.generated-reply.preview-filter-0 img { filter: saturate(1.18) contrast(.96) brightness(1.06) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-1 img { filter: contrast(1.22) saturate(1.1) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-2 img { filter: sepia(.22) saturate(.9) contrast(1.08) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-3 img { filter: contrast(1.35) saturate(.8) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-4 img { filter: saturate(1.55) contrast(1.16) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-5 img { filter: saturate(1.06) brightness(1.08) contrast(.96) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-6 img { filter: saturate(1.24) hue-rotate(-8deg) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-7 img { filter: contrast(1.12) saturate(.82) brightness(.94) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }
.generated-reply.preview-filter-8 img { filter: sepia(.38) saturate(.68) brightness(1.13) drop-shadow(0 16px 24px rgba(0, 0, 0, .24)); }

.phrase-choice {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 .9rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, .07);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .02em;
  scroll-snap-align: start;
}

body[data-theme="light"] .phrase-choice {
  border-color: rgba(25, 29, 34, .18);
  background: rgba(255, 255, 255, .68);
}

.phrase-choice[aria-pressed="true"] {
  border-color: var(--message-out);
  color: #fff;
  background: var(--message-out);
}

.make-pack {
  width: 100%;
  min-height: 42px;
  margin-top: .55rem;
  border: 0;
  border-radius: 12px;
  color: #171717;
  background: var(--coral);
  font-size: .76rem;
  font-weight: 950;
}

.sample-pack-drawer {
  position: absolute;
  z-index: 18;
  right: 12px;
  bottom: 102px;
  left: 12px;
  padding: .8rem .9rem .9rem;
  border: 1px solid rgba(220, 232, 242, .3);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(26, 35, 49, .91), rgba(7, 12, 21, .95)),
    rgba(7, 12, 21, .94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
  backdrop-filter: blur(24px) saturate(1.08);
}

.sample-pack-drawer.is-entering {
  animation: sampleDrawerEnter .42s cubic-bezier(.18, .88, .25, 1.08) both;
}

.sample-pack-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .65rem;
  padding: 0 .2rem;
}

.sample-pack-heading span,
.sample-pack-heading strong {
  display: block;
}

.sample-pack-heading > div > span {
  color: rgba(255, 255, 255, .48);
  font-family: var(--utility);
  font-size: .54rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sample-pack-heading strong {
  margin-top: .12rem;
  color: #fff;
  font-size: .84rem;
}

.sample-pack-heading > span {
  color: rgba(255, 255, 255, .58);
  font-size: .65rem;
  font-weight: 750;
}

.sample-pack-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .42rem;
}

.sample-pack-item {
  position: relative;
  display: grid;
  min-width: 0;
  padding: .3rem .2rem .38rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255, 255, 255, .66);
  background: rgba(255, 255, 255, .035);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.sample-pack-item:hover {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .075);
  transform: translateY(-2px);
}

.sample-pack-item.is-selected {
  border-color: rgba(239, 164, 122, .9);
  background: rgba(239, 164, 122, .13);
  box-shadow: 0 0 0 2px rgba(239, 164, 122, .14), 0 10px 24px rgba(0, 0, 0, .18);
}

.sample-pack-item.is-selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid rgba(15, 21, 31, .84);
  border-radius: 50%;
  color: #161616;
  background: var(--coral);
  font-size: .55rem;
  font-weight: 950;
}

.sample-pack-visual {
  display: block;
  width: min(100%, 66px);
  aspect-ratio: 1;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .2));
}

.sample-pack-label {
  display: none;
}

@keyframes sampleDrawerEnter {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.975); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.composer {
  position: relative;
  z-index: 13;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: end;
  gap: .65rem;
  min-height: 78px;
  margin: 0 12px 12px;
  padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom));
  border: 1px solid rgba(220, 232, 242, .2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7, 12, 21, .7), rgba(7, 12, 21, .84));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.add-button,
.send-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
}

.add-button {
  border: 1px solid rgba(255, 255, 255, .44);
  color: #fff;
  background: rgba(7, 12, 21, .34);
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.add-button.is-open {
  border-color: rgba(255, 255, 255, .7);
  color: #151a22;
  background: rgba(255, 255, 255, .92);
  transform: rotate(45deg);
}

.add-button.is-guided,
.composer-menu button.is-guided,
.send-button.is-guided {
  animation: composerGuide 1.1s cubic-bezier(.18, .88, .25, 1) infinite;
}

@keyframes composerGuide {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 164, 122, 0); }
  45% { box-shadow: 0 0 0 8px rgba(239, 164, 122, .19), 0 0 28px rgba(239, 164, 122, .18); }
}

.composer-menu {
  position: absolute;
  z-index: 22;
  bottom: calc(100% + 10px);
  left: 0;
  width: min(238px, calc(100% - 12px));
  padding: .45rem;
  border: 1px solid rgba(220, 232, 242, .28);
  border-radius: 17px;
  background: rgba(14, 21, 31, .94);
  box-shadow: 0 20px 58px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .075);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
  backdrop-filter: blur(24px) saturate(1.08);
  animation: composerMenuEnter .28s cubic-bezier(.18, .88, .25, 1.1) both;
  transform-origin: 24px calc(100% + 12px);
}

.composer-menu::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(220, 232, 242, .22);
  border-bottom: 1px solid rgba(220, 232, 242, .22);
  background: rgba(14, 21, 31, .96);
  transform: rotate(45deg);
}

.composer-menu button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .55rem .6rem;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: transparent;
  text-align: left;
}

.composer-menu button:hover {
  background: rgba(255, 255, 255, .075);
}

.composer-menu button + button {
  margin-top: .18rem;
}

.composer-menu button > span:last-child,
.composer-menu strong,
.composer-menu small {
  display: block;
}

.composer-menu strong {
  font-size: .77rem;
}

.composer-menu small {
  margin-top: .1rem;
  color: rgba(255, 255, 255, .5);
  font-size: .58rem;
}

.composer-menu-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--message-out);
  font-size: 1.15rem;
  font-weight: 900;
}

.composer-menu-photo::before {
  content: "";
  width: 18px;
  height: 14px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  background:
    radial-gradient(circle at 72% 28%, currentColor 0 1.5px, transparent 1.8px),
    linear-gradient(140deg, transparent 44%, currentColor 45% 51%, transparent 52%);
}

.composer-menu-stickers {
  color: #171717;
  background: var(--coral);
}

@keyframes composerMenuEnter {
  from { opacity: 0; transform: translate3d(-10px, 14px, 0) scale(.78); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.send-button {
  border: 0;
  color: #fff;
  background: var(--message-out);
  box-shadow: 0 9px 26px rgba(25, 87, 180, .28);
  transition: transform 180ms ease, opacity 180ms ease;
}

.send-button:not(:disabled):hover {
  transform: translateY(-2px) scale(1.03);
}

.add-button svg,
.send-button svg,
.sticker-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.composer-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 .7rem 0 1rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 25px;
  color: rgba(255, 255, 255, .58);
  background: rgba(6, 10, 18, .33);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.composer-placeholder {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: .84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-placeholder.is-demo-copy {
  position: relative;
  color: rgba(255, 255, 255, .94);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: -.005em;
}

.composer-placeholder.is-demo-copy::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 2px;
  background: #fff;
  vertical-align: -.16em;
  animation: composerCaret .72s steps(1, end) infinite;
}

.composer.is-demo-typing .composer-field {
  border-color: rgba(158, 197, 255, .76);
  background: rgba(14, 27, 47, .62);
  box-shadow: 0 0 0 3px rgba(47, 124, 246, .1), inset 0 1px rgba(255, 255, 255, .06);
}

.send-button.is-demo-ready:disabled {
  opacity: 1;
  box-shadow: 0 9px 26px rgba(25, 87, 180, .34), 0 0 0 4px rgba(47, 124, 246, .12);
}

.send-button.is-demo-press {
  animation: demoSendPress .38s cubic-bezier(.2, .78, .2, 1) both;
}

.composer.is-demo-sending .composer-field {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(6, 10, 18, .28);
}

@keyframes composerCaret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes demoSendPress {
  0% { transform: scale(1); }
  45% { transform: scale(.84); }
  100% { transform: scale(1.04); }
}

.sticker-button {
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 5px;
  border: 0;
  color: rgba(255, 255, 255, .8);
  background: transparent;
}

.attachment-preview {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .38rem 0;
  color: #fff;
}

.sticker-compose-preview {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: .52rem;
  width: 100%;
  min-width: 0;
  padding: .12rem 0;
  color: #fff;
}

.sticker-compose-thumb {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2));
}

.sticker-compose-preview span,
.sticker-compose-preview strong,
.sticker-compose-preview small {
  display: block;
  min-width: 0;
}

.sticker-compose-preview strong {
  overflow: hidden;
  font-size: .71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-compose-preview small {
  margin-top: .1rem;
  color: rgba(255, 255, 255, .54);
  font-size: .6rem;
}

.sticker-compose-preview button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font-size: 1.05rem;
}

.attachment-preview img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 11px;
}

.attachment-preview strong,
.attachment-preview span {
  display: block;
}

.attachment-preview strong {
  overflow: hidden;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview span {
  margin-top: .1rem;
  color: rgba(255, 255, 255, .58);
  font-size: .64rem;
}

.attachment-preview button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font-size: 1.05rem;
}

.completion-actions {
  position: relative;
  z-index: 14;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: .7rem;
  margin: 0 12px 12px;
  padding: .8rem 1rem;
  border: 1px solid rgba(220, 232, 242, .2);
  border-radius: 16px;
  background: rgba(7, 12, 21, .82);
  backdrop-filter: blur(18px);
}

.recovery-actions {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .7rem;
  margin: 0 12px 12px;
  padding: .85rem 1rem max(.85rem, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 157, 140, .34);
  border-radius: 16px;
  background: rgba(34, 19, 22, .9);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .2);
  backdrop-filter: blur(18px);
}

.recovery-actions strong,
.recovery-actions span {
  display: block;
}

.recovery-actions strong {
  color: #fff;
  font-size: .84rem;
}

.recovery-actions span {
  margin-top: .18rem;
  color: rgba(255, 255, 255, .65);
  font-size: .65rem;
  line-height: 1.35;
}

.recovery-actions button {
  min-height: 40px;
  padding: 0 .9rem;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 900;
}

.retry-button {
  border: 1px solid var(--coral);
  color: #171717;
  background: var(--coral);
}

.change-photo-button {
  border: 1px solid rgba(255, 255, 255, .26);
  color: #fff;
  background: transparent;
}

.completion-actions strong,
.completion-actions span {
  display: block;
}

.completion-actions strong {
  color: #fff;
  font-size: .86rem;
}

.completion-actions span {
  color: var(--muted);
  font-size: .66rem;
}

.completion-actions a,
.completion-actions button {
  min-height: 40px;
  padding: 0 .9rem;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 900;
  text-decoration: none;
}

.completion-actions a {
  display: flex;
  align-items: center;
  border: 1px solid var(--coral);
  color: #171717;
  background: var(--coral);
}

.completion-actions button {
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  background: transparent;
}

body[data-state="attached"] .sample-reply,
body[data-state="processing"] .sample-reply {
  width: clamp(150px, 18vw, 250px);
  opacity: .45;
}

body[data-state="style"] .outgoing-photo,
body[data-state="phrases"] .outgoing-photo,
body[data-state="generating"] .outgoing-photo,
body[data-state="complete"] .outgoing-photo,
body[data-state="failed"] .outgoing-photo {
  width: clamp(118px, 11vw, 152px);
}

body[data-state="style"] .outgoing-photo img,
body[data-state="phrases"] .outgoing-photo img,
body[data-state="generating"] .outgoing-photo img,
body[data-state="complete"] .outgoing-photo img,
body[data-state="failed"] .outgoing-photo img {
  max-height: 126px;
}

body[data-state="generating"] .live-messages,
body[data-state="complete"] .live-messages {
  gap: .72rem;
}

body[data-state="generating"] .generated-reply,
body[data-state="complete"] .generated-reply {
  width: clamp(158px, 17vw, 244px);
}

body[data-state="style"] .chat-scroll,
body[data-state="phrases"] .chat-scroll,
body[data-state="generating"] .chat-scroll,
body[data-state="complete"] .chat-scroll {
  padding-top: 12px;
}

body:not([data-state="sample"]) .story-panel h1,
body:not([data-state="sample"]) .hero-copy,
body:not([data-state="sample"]) .subject-switch,
body:not([data-state="sample"]) .choose-photo {
  display: none;
}

body:not([data-state="sample"]) .commitment p:not(:first-child):not(.is-error) {
  display: none;
}

body:not([data-state="sample"]) .commitment .is-error {
  display: block;
}

@media (min-width: 761px) {
  body:not([data-state="sample"]) .experience {
    grid-template-columns: clamp(160px, 13vw, 188px) minmax(0, 1fr);
  }

  body:not([data-state="sample"]) .story-panel {
    padding: clamp(22px, 3.2vh, 34px) 16px 20px;
    background: linear-gradient(90deg, rgba(5, 9, 16, .68), rgba(5, 9, 16, .24));
  }

  body:not([data-state="sample"]) .step-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: .48rem;
    margin-bottom: 14px;
    font-size: .58rem;
    line-height: 1.3;
  }

  body:not([data-state="sample"]) .source-card {
    grid-template-columns: minmax(0, 1fr);
    gap: .48rem;
    width: 100%;
    margin-top: 0;
    padding: .45rem;
    border-radius: 13px;
  }

  body:not([data-state="sample"]) .source-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 9px;
  }

  body:not([data-state="sample"]) .source-card strong {
    font-size: .68rem;
  }

  body:not([data-state="sample"]) .source-card span,
  body:not([data-state="sample"]) .source-card button {
    font-size: .58rem;
  }

  body:not([data-state="sample"]) .source-card button {
    justify-self: start;
  }

  body:not([data-state="sample"]) .style-summary {
    width: 100%;
    margin-top: 12px;
    padding: .62rem 0;
  }

  body:not([data-state="sample"]) .style-summary span {
    font-size: .52rem;
  }

  body:not([data-state="sample"]) .style-summary strong {
    font-size: .75rem;
  }

  body:not([data-state="sample"]) .access-form {
    width: 100%;
    margin-top: 12px;
    padding: .62rem;
  }

  body:not([data-state="sample"]) .access-form > div {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
  }

  body:not([data-state="sample"]) .access-form input,
  body:not([data-state="sample"]) .access-form button {
    border-radius: 9px;
  }

  body:not([data-state="sample"]) .commitment {
    padding-top: 12px;
  }

  body:not([data-state="sample"]) .commitment p:first-child {
    align-items: flex-start;
    font-size: .55rem;
    line-height: 1.35;
  }

  body:not([data-state="sample"]) .chat-stage {
    margin-right: clamp(12px, 1.5vw, 24px);
  }

  body:not([data-state="sample"]) .chat-lane {
    width: min(100%, 980px);
  }
}

@media (max-width: 1280px) {
  .site-header {
    grid-template-columns: minmax(160px, 21vw) minmax(210px, 1fr) auto;
  }

  .utility-nav {
    display: none;
  }

  .truth-badge {
    max-width: 190px;
    line-height: 1.15;
    text-align: right;
  }

  .header-actions {
    gap: .55rem;
  }
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .truth-badge {
    display: none;
  }

  .utility-nav {
    gap: .65rem;
  }

  .experience {
    grid-template-columns: minmax(235px, 31vw) minmax(0, 1fr);
  }

  .story-panel {
    padding-right: 26px;
    padding-left: 26px;
  }

  .story-panel h1 {
    font-size: clamp(3rem, 5.5vw, 4.5rem);
  }

  .chat-stage {
    margin-right: 18px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .cinema-plate {
    object-position: 62% center;
  }

  .cinema-motion {
    object-position: 62% center;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 0 16px;
    background: rgba(7, 12, 21, .76);
    backdrop-filter: blur(16px);
  }

  .sequence-label,
  .access-pill,
  .utility-nav {
    display: none;
  }

  .header-actions {
    gap: .45rem;
  }

  .truth-badge {
    display: block;
    max-width: 138px;
    font-size: .46rem;
    line-height: 1.15;
    letter-spacing: .035em;
    text-align: right;
  }

  .wordmark {
    font-size: .9rem;
  }

  .experience {
    display: flex;
    height: auto;
    min-height: auto;
    flex-direction: column;
  }

  body:not([data-state="sample"]) {
    overflow: hidden;
  }

  body:not([data-state="sample"]) .experience {
    height: calc(100dvh - 58px);
    min-height: 0;
  }

  .story-panel {
    height: auto;
    min-height: auto;
    overflow: visible;
    padding: 16px 18px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    background: linear-gradient(180deg, rgba(5, 9, 16, .5), rgba(5, 9, 16, .18));
  }

  body:not([data-state="sample"]) .story-panel {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(92px, .55fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    max-height: 42dvh;
    overflow: hidden auto;
    padding: 10px 14px;
    background: rgba(7, 12, 21, .66);
  }

  body:not([data-state="sample"]) .step-kicker {
    align-items: flex-start;
    align-self: center;
    flex-direction: column;
    gap: .35rem;
    margin: 0;
    font-size: .52rem;
    line-height: 1.2;
  }

  body:not([data-state="sample"]) .step-kicker span:first-child {
    width: 24px;
    height: 24px;
  }

  body:not([data-state="sample"]) .source-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-column: 2;
    grid-row: 1;
    gap: .45rem;
    width: 100%;
    margin: 0;
    padding: .35rem;
    border-radius: 11px;
  }

  body:not([data-state="sample"]) .source-card img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  body:not([data-state="sample"]) .source-card strong {
    font-size: .64rem;
  }

  body:not([data-state="sample"]) .source-card span,
  body:not([data-state="sample"]) .source-card button {
    font-size: .54rem;
  }

  body:not([data-state="sample"]) .style-summary,
  body:not([data-state="sample"]) .access-form,
  body:not([data-state="sample"]) .commitment {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
  }

  body:not([data-state="sample"]) .style-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .42rem 0 0;
    border-bottom: 0;
  }

  body:not([data-state="sample"]) .style-summary strong {
    margin: 0;
    font-size: .68rem;
  }

  body:not([data-state="sample"]) .access-form {
    padding: .65rem;
  }

  body:not([data-state="sample"]) .commitment {
    padding-top: 8px;
  }

  body:not([data-state="sample"]) .commitment p:first-child {
    font-size: .52rem;
  }

  body:not([data-state="sample"]) .chat-stage {
    flex: 1 1 0;
    grid-template-rows: 56px auto minmax(0, 1fr) auto auto auto;
    height: auto;
    min-height: 0;
    margin: 8px 10px 10px;
  }

  .step-kicker {
    margin-bottom: 10px;
  }

  .story-panel h1 {
    display: flex;
    max-width: none;
    flex-wrap: wrap;
    gap: 0 .16em;
    font-size: clamp(2.45rem, 11.6vw, 3.4rem);
    line-height: .92;
  }

  .hero-copy {
    margin-top: 10px;
    font-size: .9rem;
    line-height: 1.35;
  }

  .subject-switch {
    margin-top: 12px;
  }

  .choose-photo {
    min-height: 50px;
    margin-top: 10px;
  }

  .commitment {
    margin-top: 12px;
    padding-top: 12px;
  }

  .commitment p + p {
    margin-top: .32rem;
  }

  .commitment .price-teaser {
    margin-top: .45rem;
  }

  .chat-stage {
    grid-template-rows: 56px auto minmax(430px, 64vh) auto auto auto;
    height: auto;
    min-height: 680px;
    margin: 12px 10px 18px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(2px) saturate(.96);
    backdrop-filter: blur(2px) saturate(.96);
  }

  .chat-scroll {
    padding-right: 18px;
    padding-left: 18px;
  }

  .chat-context {
    display: none;
  }

  .reply-route {
    grid-template-columns: minmax(0, 1fr);
    gap: .48rem;
    min-height: 0;
    padding: .52rem .75rem .58rem;
  }

  .reply-route-copy {
    display: flex;
    align-items: baseline;
    gap: .42rem;
    min-width: 0;
  }

  .reply-route-copy > span {
    flex: 0 0 auto;
    font-size: .43rem;
  }

  .reply-route-copy > strong {
    overflow: hidden;
    margin: 0;
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reply-route-copy > p {
    display: none;
  }

  .reply-route li {
    font-size: .42rem;
  }

  .reply-route li i {
    width: 24px;
    height: 24px;
  }

  .reply-route ol::before,
  .reply-route ol::after {
    top: 11.5px;
  }

  .sample-scene-switch {
    min-width: 118px;
    max-width: 150px;
    min-height: 38px;
    padding-left: .55rem;
  }

  .sample-scene-switch strong {
    font-size: .62rem;
  }

  .sample-reply {
    width: min(39vw, 152px);
    margin-right: 5%;
  }

  .sample-chat-photo {
    width: min(43vw, 156px);
  }

  .sample-chat-message.is-outgoing {
    padding-left: 14%;
  }

  .sample-chat-message.is-incoming {
    padding-right: 14%;
  }

  .sample-typing-row,
  .sample-incoming-row,
  .sample-reaction-row {
    padding-right: 14%;
  }

  .sample-pack-drawer {
    right: 10px;
    bottom: 98px;
    left: 10px;
    padding-right: .7rem;
    padding-left: .7rem;
  }

  .sample-pack-grid {
    grid-template-columns: none;
    grid-auto-columns: 72px;
    grid-auto-flow: column;
    overflow-x: auto;
    padding: 0 1px .25rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .sample-pack-item {
    scroll-snap-align: start;
  }

  .composer-menu {
    width: min(238px, calc(100% - 4px));
  }

  .sticker-compose-preview {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .sticker-compose-thumb {
    width: 32px;
    height: 32px;
  }

  .style-choice {
    flex-basis: 86px;
  }

  .style-choice img {
    width: 76px;
    height: 62px;
  }

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

  .completion-actions > div {
    grid-column: 1 / -1;
  }

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

  .recovery-actions > div {
    grid-column: 1 / -1;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  :root {
    --header-h: 58px;
  }

  .story-panel {
    padding-top: 26px;
    padding-bottom: 18px;
  }

  .step-kicker {
    margin-bottom: 18px;
  }

  .story-panel h1 {
    font-size: clamp(2.7rem, 4.1vw, 4.3rem);
  }

  .hero-copy {
    margin-top: 16px;
  }

  .subject-switch {
    margin-top: 16px;
  }

  .choose-photo {
    min-height: 52px;
  }

  .commitment {
    padding-top: 14px;
  }

  .chat-stage {
    grid-template-rows: 54px auto minmax(0, 1fr) auto auto auto;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  .sample-reply {
    width: clamp(132px, 13vw, 166px);
  }

  .choice-drawer {
    padding-top: .65rem;
    padding-bottom: .55rem;
  }

  .reply-route-copy > p {
    display: none;
  }

  .composer {
    min-height: 66px;
    padding-top: .55rem;
    padding-bottom: .55rem;
  }
}

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

  .cinema-plate {
    transform: scale(1.018);
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
