/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fredoka-latin-c7301cae.woff2") format("woff2");
}

/* Shared semantic colors: components use these rather than fixed text/surface
   colors, so new components inherit both themes automatically. */
:root {
  --color-text: #111;
  --color-success: #229647;
  --color-link: #bd2e6d;
  --color-muted: #7a5a6a;
  --color-canvas: #fffafd;
  --color-surface: #fff;
  --color-tint: #fff0f7;
  --color-border-soft: #ffd1e5;
  --color-hero-background: linear-gradient(135deg, #fff0f7, #fff7df);
  --font-size-small: 12px;
  --font-size-base: 16px;
  --font-size-medium: 20px;
  --font-size-large: 28px;
  --font-size-display: 48px;
  --font-size-hero: 64px;

  color: var(--color-text);
  background: #fff7df;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.no-wrap {
  white-space: nowrap;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 214, 102, 0.38), transparent 30%),
    linear-gradient(160deg, #fff7df 0%, #dff5ef 50%, #f8e6ff 100%);
}

button,
input {
  font: inherit;
}

/* Text links are recognizable by default; component classes retain their own styling. */
:where(a[href]), .text-link {
  color: var(--color-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
}
:where(a[href]):hover, .text-link:hover { text-decoration-thickness: 2px; }
:where(a[href]):focus-visible, .text-link:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 4px;
  border-radius: 2px;
}

.home-page,
.signup-page {
  min-height: 100vh;
  background: var(--color-canvas);
  color: var(--color-text);
}

.home-header {
  width: min(100%, 1200px);
  height: 92px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signup-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: 112px;
  height: auto;
  padding: 24px 48px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  border-bottom: 2px solid #ffd1e5;
  background: var(--color-canvas);
}

.signup-back {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 44px;
  margin-block: auto;
  left: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.kid-header-logout {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 44px;
  margin-block: auto;
  right: 48px;
  display: inline-flex;
  align-items: center;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.kid-header-logout:hover {
  color: #8f1f50;
}

.signup-back-arrow {
  font-size: var(--font-size-large);
  line-height: 0.8;
  transform: translateY(-1px);
}

.signup-back:hover {
  color: #8f1f50;
}

.signup-back:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.signup-nav-title {
  max-width: 820px;
  margin: 0;
  color: var(--color-text);
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-size: var(--font-size-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
}

.signup-pet-heart {
  color: #ff4f9a;
}

.signup-nav-pet {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transform: translate(-50%, 82%);
}

.signup-nav-pet--named {
  cursor: default;
}

.signup-nav-pet--approval {
  cursor: pointer;
}

.signup-nav-pet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 5px 3px rgba(17, 17, 17, 0.12));
  transform-origin: center bottom;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-nav-pet-bubble {
  position: absolute;
  top: 58%;
  left: 104%;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  filter: none;
}

.signup-nav-pet-bubble::before {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 14px;
  height: 16px;
  background: #111;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  content: "";
  transform: translateY(-50%);
}

.signup-nav-pet--namer .signup-nav-pet-bubble {
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px) scale(0.92);
  transform-origin: left center;
  transition:
    opacity 140ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-nav-pet--namer.is-nudging .signup-nav-pet-bubble,
.signup-nav-pet--namer.is-talking .signup-nav-pet-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.signup-nav-pet:focus-visible {
  border-radius: 50%;
  outline: 3px solid rgba(255, 79, 154, 0.35);
  outline-offset: 4px;
}

.signup-nav-pet.is-talking img {
  animation: signup-pet-talk 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-nav-pet.is-nudging img {
  animation: signup-pet-nudge 820ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes signup-pet-talk {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  35% {
    transform: translateY(-5px) rotate(-3deg);
  }

  70% {
    transform: translateY(-2px) rotate(3deg);
  }
}

@keyframes signup-pet-nudge {
  0%,
  100% {
    transform: translate(0, 0) rotate(0) scale(1);
  }

  12% {
    transform: translate(-6px, -2px) rotate(-6deg) scale(1.02);
  }

  24% {
    transform: translate(6px, -4px) rotate(6deg) scale(1.03);
  }

  36% {
    transform: translate(-5px, -3px) rotate(-5deg) scale(1.03);
  }

  48% {
    transform: translate(5px, -5px) rotate(5deg) scale(1.04);
  }

  66% {
    transform: translate(0, -10px) rotate(0) scale(1.07);
  }

  82% {
    transform: translate(0, 1px) rotate(0) scale(0.99);
  }
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.home-app-icon {
  display: block;
  width: 44px;
  height: 44px;
}

.home-logotype {
  display: block;
  width: 104px;
  height: auto;
  fill: #ff4f9a;
  transform: translateY(-2px);
}

.signup-main {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 32px 120px;
}

.signup-selected-main {
  min-height: calc(100dvh - 112px - 108px);
  padding: 104px 32px 24px;
  display: grid;
  place-items: center;
}

turbo-frame#signup_waiting_status {
  display: block;
  width: min(100%, 860px);
}

.signup-name-form {
  width: min(100%, 526px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 12px;
  transform: translateY(clamp(-64px, -7vh, -32px));
}

.signup-name-form input {
  width: 100%;
  min-height: 136px;
  padding: 30px 24px;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-display);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  outline: none;
  box-shadow: 5px 5px 0 #ff783e;
}

.signup-name-form input::placeholder {
  color: #b6aeb2;
}

.signup-name-form input:focus {
  outline: 4px solid rgba(255, 79, 154, 0.22);
  outline-offset: 3px;
}

.kid-identity-main,
.kid-identity-form {
  width: 100%;
}

.kid-identity-name-form {
  gap: 24px;
}

.kid-identity-name-form h2 {
  max-width: 680px;
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.kid-identity-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  justify-self: start;
}

.kid-identity-back:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.kid-identity-chooser {
  width: min(100%, 640px);
  margin: 0 auto;
  transform: translateY(clamp(-64px, -7vh, -32px));
}

.kid-identity-cards {
  width: min(100%, 520px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.kid-identity-card-form {
  margin: 0;
  display: grid;
}

.kid-identity-card {
  appearance: none;
  width: 100%;
  min-height: 88px;
  padding: 18px 24px;
  display: grid;
  place-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  border: 3px solid #ff4f9a;
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 0 #ff783e;
  overflow-wrap: anywhere;
}

.kid-identity-new {
  display: table;
  margin: 40px auto 0;
  padding: 12px 22px;
  min-height: 44px;
  border: 1px solid var(--color-link);
  border-radius: 999px;
  color: var(--color-link);
  background: transparent;
  font-size: var(--font-size-base);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.kid-identity-new:hover {
  background: var(--color-tint);
}

.kid-identity-new:focus-visible {
  outline: 3px solid var(--color-link);
  outline-offset: 4px;
}

.kid-identity-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #ff783e;
}

.kid-identity-card:focus-visible {
  outline: 4px solid rgba(255, 79, 154, 0.3);
  outline-offset: 3px;
}

.signup-phone-form,
.signup-pet-name-form {
  gap: 24px;
}

.signup-parent-form {
  width: 100%;
}

.signup-phone-prompt,
.text-primary {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.signup-phone-alert {
  margin: 0;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.signup-phone-why {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px dashed currentColor;
  background: transparent;
  color: var(--color-link);
  font: inherit;
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.signup-phone-why:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.signup-phone-why[aria-expanded="true"] {
  color: #ff4f9a;
}

body.is-modal-open {
  overflow: hidden;
}

.form-checkbox {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.form-checkbox input {
  position: absolute;
  appearance: none;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.form-checkbox-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 3px 3px 0 #ff783e;
  transition: background 140ms ease, transform 140ms ease;
}

.form-checkbox-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 140ms ease, transform 140ms ease;
}

.form-checkbox input:checked + .form-checkbox-mark {
  background: #ff4f9a;
}

.form-checkbox input:checked + .form-checkbox-mark svg {
  opacity: 1;
  transform: scale(1);
}

.form-checkbox input:focus-visible + .form-checkbox-mark {
  outline: 4px solid rgba(255, 79, 154, 0.22);
  outline-offset: 4px;
}

.form-checkbox:active .form-checkbox-mark {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #ff783e;
}

.form-checkbox-label {
  padding-top: 2px;
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.35;
}

.form-checkbox-label a {
  color: var(--color-link);
  font-weight: 850;
  text-underline-offset: 3px;
}

.signup-phone-consent {
  width: min(100%, 526px);
  margin-top: 6px;
}

.signup-phone-why-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100vw;
  height: 100dvh;
  padding: 40px 28px;
  background: var(--color-canvas);
  color: var(--color-text);
  text-align: center;
  animation: signup-phone-why-in 180ms ease-out;
}

.signup-phone-why-modal p {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.35;
}

.signup-phone-why-modal p + p {
  max-width: 32ch;
  color: var(--color-link);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.2;
}

.signup-phone-why-dismiss {
  width: min(100%, 420px);
  min-height: 72px;
  margin-top: 12px;
  font-size: var(--font-size-large);
}

@keyframes signup-phone-why-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.signup-waiting-content {
  text-align: center;
  transform: translateY(clamp(-64px, -7vh, -32px));
}

.signup-waiting-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1.5px solid color-mix(in srgb, #bd2e6d 35%, white);
  border-radius: 999px;
  background: color-mix(in srgb, #bd2e6d 8%, white);
  color: var(--color-link);
  font-size: var(--font-size-small);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.signup-waiting-content[data-waiting-phase="sending"] .signup-waiting-badge {
  animation: signup-waiting-pulse 1.4s ease-in-out infinite;
}

.signup-waiting-content[data-waiting-phase="failed"] .signup-waiting-badge {
  border-color: color-mix(in srgb, #8a2b2b 40%, white);
  background: color-mix(in srgb, #8a2b2b 8%, white);
  color: #8a2b2b;
}

@keyframes signup-waiting-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

.signup-waiting-content h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-display);
  font-weight: 900;
  line-height: 1.12;
}

.signup-waiting-body {
  margin: 0;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 700;
}

.signup-code-form {
  width: 100%;
}

.signup-code-main {
  width: min(100%, 526px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.signup-code-input {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.signup-code-form input {
  width: 100%;
  min-height: 136px;
  margin-top: 14px;
  padding: 30px 24px;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-display);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.14em;
  text-align: center;
  outline: none;
  box-shadow: 5px 5px 0 #ff783e;
}

.signup-code-form input::placeholder {
  color: #b6aeb2;
}

.signup-code-form input:focus {
  outline: 4px solid rgba(255, 79, 154, 0.22);
  outline-offset: 3px;
}

.signup-code-form.is-invalid .signup-code-main {
  animation: signup-code-reject 420ms ease-in-out;
}

@keyframes signup-code-reject {
  0%,
  100% {
    transform: translate(0, clamp(-64px, -7vh, -32px));
  }

  20% {
    transform: translate(-14px, clamp(-64px, -7vh, -32px));
  }

  40% {
    transform: translate(12px, clamp(-64px, -7vh, -32px));
  }

  60% {
    transform: translate(-8px, clamp(-64px, -7vh, -32px));
  }

  80% {
    transform: translate(5px, clamp(-64px, -7vh, -32px));
  }
}

.signup-code-alert {
  margin: 0;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
}


.signup-pet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signup-pet {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 14px 14px 10px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 6px;
  border: 2px solid #ffd1e5;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    border-width 160ms ease,
    box-shadow 160ms ease;
}

.signup-pet img {
  display: block;
  width: min(100%, 132px);
  height: 100%;
  min-height: 0;
  object-fit: contain;
  pointer-events: none;
  transform-origin: center bottom;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-pet-name {
  font-size: var(--font-size-base);
  font-weight: 800;
  line-height: 1.1;
}

.signup-pet-speech {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px) scale(0.92);
  transform-origin: center bottom;
  transition:
    opacity 140ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-pet-speech::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: var(--color-text);
  content: "";
  transform: translateX(-50%);
}

.signup-pet.is-speaking .signup-pet-speech {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.signup-pet.is-selected {
  border-width: 5px;
  border-color: #ff4f9a;
  box-shadow: 5px 5px 0 #ff783e;
}

.signup-pet.is-selected img {
  transform: scale(1.06);
}

.signup-pet:focus-visible {
  outline: 4px solid rgba(255, 79, 154, 0.3);
  outline-offset: 3px;
}

.signup-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 2px solid #ffd1e5;
  background: var(--color-canvas);
}

.signup-pet-confirm {
  grid-column: 2;
  min-width: 260px;
  min-height: 78px;
  margin: 0;
  padding: 16px 30px;
  display: block;
  border: 3px solid #ff4f9a;
  border-radius: 999px;
  background: var(--color-tint);
  color: var(--color-text);
  cursor: pointer;
  font-size: var(--font-size-medium);
  font-weight: 800;
  box-shadow: 5px 5px 0 #ff783e;
  transition:
    opacity 160ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.signup-pet-confirm:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #ff783e;
}

.signup-pet-confirm:disabled {
  cursor: default;
  opacity: 0.35;
  box-shadow: none;
}

.signup-pet-confirm:focus-visible {
  outline: 4px solid rgba(255, 79, 154, 0.3);
  outline-offset: 3px;
}

.signup-action-brand {
  width: 64px;
  display: block;
  grid-column: 3;
  justify-self: end;
  opacity: 0.55;
}

.signup-action-brand svg {
  display: block;
  width: 100%;
  height: auto;
  fill: #ff4f9a;
}

.signup-action-brand:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .signup-nav-pet:hover img {
    transform: translateY(-3px) scale(1.05);
  }

  .signup-pet:hover img {
    transform: translateY(-5px) scale(1.08);
  }

  .signup-pet.is-selected:hover img {
    transform: translateY(-5px) scale(1.1);
  }
}

.public-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
  text-decoration: none;
}

.home-header-login:hover {
  color: #8f1f50;
}

.home-header-signup,
.home-primary-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ff4f9a;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.home-header-signup {
  min-height: 44px;
  padding: 8px 18px;
  font-size: var(--font-size-base);
}

.home-hero {
  width: min(100%, 1200px);
  min-height: calc(100svh - 280px);
  margin: 0 auto;
  padding: 36px 32px 64px;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 680px;
  margin: 0;
  color: var(--color-text);
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.home-hero-copy .hero-text {
  margin-bottom: 18px;
}

.home-hero-tagline {
  margin: 0 0 32px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 700;
}

.home-primary-signup {
  min-height: 62px;
  padding: 14px 30px;
  background: var(--color-tint);
  box-shadow: 5px 5px 0 #ff783e;
  font-size: var(--font-size-medium);
}

.home-hero-action {
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-pet-stack {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.home-pet-character {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  filter: drop-shadow(0 3px 2px rgba(17, 17, 17, 0.16));
  transform-origin: center bottom;
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms ease;
}

.home-pet-character + .home-pet-character {
  margin-left: -16px;
}

.home-pet {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.home-pet-speech {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(0.92);
  transform-origin: center bottom;
  transition:
    opacity 140ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-pet-speech::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: var(--color-text);
  content: "";
  transform: translateX(-50%);
}

.home-pet-character.is-speaking .home-pet-speech {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.home-pet-character:focus-visible {
  border-radius: 50%;
  outline: 2px solid #ff4f9a;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .home-pet-character:hover {
    z-index: 10;
    filter: drop-shadow(0 7px 5px rgba(17, 17, 17, 0.2));
    transform: translateY(-8px) scale(1.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .signup-pet,
  .signup-pet img,
  .signup-pet-speech,
  .signup-pet-confirm,
  .home-pet-character,
  .home-pet-speech,
  .signup-nav-pet--namer .signup-nav-pet-bubble {
    transition: none;
  }

  .home-pet-character:hover {
    transform: none;
  }

  .signup-nav-pet.is-talking img,
  .signup-nav-pet.is-nudging img {
    animation: none;
  }
}

@media (max-width: 760px) {
  .home-header {
    height: 84px;
    padding: 20px;
  }

  .home-logotype {
    width: 92px;
  }

  .home-app-icon {
    width: 40px;
    height: 40px;
  }

  .signup-header {
    min-height: 88px;
    height: auto;
    padding: 18px 20px;
  }

  .signup-nav-title {
    font-size: var(--font-size-large);
  }

  .signup-back {
    left: 20px;
    gap: 5px;
    font-size: var(--font-size-medium);
  }

  .kid-header-logout {
    right: 20px;
    font-size: var(--font-size-medium);
  }

  .signup-back-arrow {
    font-size: var(--font-size-large);
  }

  .signup-main {
    padding: 24px 20px 112px;
  }

  .signup-selected-main {
    min-height: calc(100dvh - 88px - 100px);
    padding: 72px 20px 20px;
  }

  .signup-nav-pet {
    width: 84px;
    height: 84px;
  }

  .signup-nav-pet-bubble {
    top: calc(100% + 10px);
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 9px 12px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    /* Keep centering separate from the talking/nudging transform animation. */
    translate: -50% 0;
    transform-origin: center top;
  }

  .signup-nav-pet--namer .signup-nav-pet-bubble {
    transform-origin: center top;
  }

  .signup-nav-pet-bubble::before {
    top: -7px;
    left: 50%;
    width: 16px;
    height: 8px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
  }

  .signup-name-form {
    gap: 10px;
  }

  .signup-phone-form,
  .signup-pet-name-form {
    gap: 28px;
  }

  .signup-name-form input {
    min-height: 116px;
    padding: 24px 12px;
    font-size: var(--font-size-large);
  }

  .signup-phone-prompt,
  .text-primary {
    font-size: var(--font-size-medium);
  }

  .signup-waiting-content h2 {
    font-size: var(--font-size-large);
  }

  .signup-waiting-body {
    font-size: var(--font-size-medium);
  }

  .signup-pet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .signup-pet {
    padding: 10px 10px 8px;
  }

  .signup-pet img {
    width: min(100%, 96px);
  }

  .signup-pet-name {
    font-size: var(--font-size-small);
  }

  .signup-pet-speech {
    top: 7px;
    padding: 6px 8px;
    font-size: var(--font-size-small);
  }

  .signup-pet-confirm {
    min-width: 240px;
    min-height: 70px;
    padding: 14px 22px;
    font-size: var(--font-size-medium);
  }

  .signup-action-bar:has(.signup-action-brand) {
    row-gap: 12px;
  }

  .signup-action-brand {
    display: block;
    width: 52px;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    opacity: 0.65;
  }

  .signup-main:has(.signup-action-brand):not(.signup-selected-main) {
    padding-bottom: 140px;
  }

  .signup-selected-main:has(.signup-action-brand) {
    min-height: calc(100dvh - 88px - 128px);
  }

  .home-hero {
    min-height: auto;
    padding: 52px 20px 72px;
  }

  .hero-text {
    font-size: var(--font-size-display);
  }

  .home-hero-copy {
    width: 100%;
    text-align: center;
  }

  .home-hero-copy .hero-text {
    margin: 0 auto 16px;
  }

  .home-hero-tagline {
    margin-bottom: 28px;
    font-size: var(--font-size-medium);
  }

  .home-hero-action {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .home-hero-action .home-primary-signup {
    display: flex;
    width: 100%;
  }

  .home-hero-action .home-pet-character {
    width: clamp(48px, 14vw, 56px);
    height: clamp(48px, 14vw, 56px);
  }

  .home-hero-action .home-pet-character + .home-pet-character {
    margin-left: -10px;
  }

  .home-pet-character {
    width: 32px;
    height: 32px;
  }

  .home-pet-character + .home-pet-character {
    margin-left: -12px;
  }

  .home-pet-speech {
    bottom: calc(100% + 6px);
    padding: 5px 7px;
    font-size: var(--font-size-small);
  }

}

@media (max-width: 360px) {
  .home-header {
    padding-inline: 16px;
  }

  .home-brand {
    gap: 8px;
  }

  .home-app-icon {
    width: 34px;
    height: 34px;
  }

  .home-logotype {
    width: 72px;
  }

  .public-header-actions {
    gap: 4px;
  }

  .home-header-login {
    min-height: 40px;
    padding-inline: 8px;
    font-size: var(--font-size-base);
  }

  .home-header-signup {
    padding-inline: 12px;
    font-size: var(--font-size-base);
  }


  .home-primary-signup {
    padding-inline: 18px;
    font-size: var(--font-size-medium);
  }

  .home-pet-character {
    width: 28px;
    height: 28px;
  }

  .home-pet-character + .home-pet-character {
    margin-left: -13px;
  }
}

.design-page {
  min-height: 100vh;
  background: var(--color-canvas);
  color: var(--color-text);
}

.parent-page {
  --parent-background: #fffaf7;
  --parent-frame: #e85f2d;

  min-height: 100vh;
  background: var(--parent-background);
  color: var(--color-text);
}

.parent-page .public-header {
  position: sticky;
  min-height: 112px;
  padding: 24px 48px;
  border-bottom-color: #ffd1e5;
  background: rgba(255, 250, 247, 0.96);
}

.parent-profile-header {
  min-height: 112px;
  padding: 24px 48px;
}

.parent-header-pet {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform: translate(-50%, 82%);
}

.parent-header-pet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 5px 3px rgba(17, 17, 17, 0.12));
}

.parent-header-pet-bubble {
  position: absolute;
  top: 58%;
  left: 104%;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.parent-header-pet-bubble::before {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 14px;
  height: 16px;
  background: #111;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  content: "";
  transform: translateY(-50%);
}

.parent-header-pet.is-talking img {
  animation: signup-pet-talk 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.parent-header-pet:focus-visible {
  border-radius: 50%;
}

.parent-header-label {
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.parent-header-brand {
  position: absolute;
  top: 50%;
  right: 48px;
  z-index: 2;
  width: 72px;
  display: block;
  opacity: 0.65;
  transform: translateY(-50%);
}

.parent-header-brand svg {
  display: block;
  width: 100%;
  height: auto;
  fill: #ff4f9a;
}

.parent-header-brand:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.parent-header-title {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: min(92vw, 720px);
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-display);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.parent-page .design-header-label,
.parent-account-identifier,
.parent-continue p {
  color: var(--color-link);
}

.parent-account-identifier {
  font-size: var(--font-size-base);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.parent-page a:focus-visible,
.parent-page button:focus-visible,
.parent-page input:focus-visible {
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.parent-continue {
  min-height: calc(100svh - 84px);
  padding: 48px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.parent-continue p {
  margin: 0 0 16px;
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.parent-continue h1 {
  max-width: 780px;
  margin: 0;
  font-size: var(--font-size-display);
  font-weight: 900;
  line-height: 1.12;
}

.parent-continue span {
  margin-top: 20px;
  color: #766b70;
  font-size: var(--font-size-medium);
  font-weight: 700;
}

.parent-continue--first-profile {
  min-height: calc(100dvh - 112px - 108px);
  padding: 104px 32px 24px;
  place-content: stretch;
  place-items: stretch;
}

.parent-first-profile {
  width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
}

.parent-profile-name-form {
  width: min(100%, 526px);
  display: grid;
  justify-items: center;
  gap: 24px;
  transform: translateY(clamp(-64px, -7vh, -32px));
}

.parent-profile-back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 -8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-link);
  font: inherit;
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  justify-self: start;
}

.parent-profile-back:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.parent-first-profile h1 {
  max-width: 680px;
  margin: 0;
  color: var(--color-text);
  color: var(--color-text);
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1.15;
}

.parent-profile-name-form input {
  width: 100%;
  min-height: 136px;
  padding: 30px 24px;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-display);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  outline: none;
  box-shadow: 5px 5px 0 #ff783e;
}

.parent-profile-name-form input::placeholder {
  color: #b6aeb2;
}

.parent-profile-action-bar {
  z-index: 30;
  border-top-color: var(--color-link);
  background: var(--parent-background);
}

.parent-profile-action-bar .signup-pet-confirm {
  min-width: 300px;
  border-color: var(--color-link);
  background: var(--color-tint);
  box-shadow: 5px 5px 0 #ff783e;
}

.parent-profile-action-bar .signup-pet-confirm:active:not(:disabled) {
  box-shadow: 2px 2px 0 #ff783e;
}

.parent-page--choose {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.parent-continue--choose-profile {
  flex: 1 1 auto;
  min-height: 0;
  padding: 120px 32px 40px;
  place-content: start stretch;
  place-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.parent-choose-profile {
  width: min(100%, 640px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  align-content: start;
}

.parent-kid-cards {
  width: min(100%, 520px);
  display: grid;
  gap: 16px;
}

.parent-kid-card-form {
  margin: 0;
  display: grid;
}

.parent-kid-card {
  appearance: none;
  width: 100%;
  min-height: 88px;
  padding: 18px 24px;
  display: grid;
  place-items: center;
  border: 3px solid #ff4f9a;
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: 5px 5px 0 #ff783e;
  overflow-wrap: anywhere;
}

.parent-kid-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #ff783e;
}

.parent-kid-or {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.parent-kid-or-rule {
  flex: 1 1 0;
  align-self: center;
  width: auto;
  height: 1px;
  min-height: 1px;
  max-height: 1px;
  margin: 0;
  border: 0;
  background: #e8cfc0;
}

.parent-kid-or-label {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  color: #b8957f;
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1;
}

.parent-kid-card--new {
  min-height: 88px;
  border-style: dashed;
  background: var(--color-tint);
  color: var(--color-link);
  text-decoration: none;
  box-shadow: none;
}

.parent-kid-card--new:active {
  transform: none;
  box-shadow: none;
}

.parent-request-card {
  width: min(100%, 660px);
  margin-top: 10px;
  padding: 36px;
  display: grid;
  justify-items: center;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 7px 7px 0 #ff783e;
}

.parent-request-card--message {
  padding-top: 48px;
  padding-bottom: 48px;
}

.parent-request-pet {
  width: 132px;
  height: 132px;
  margin-bottom: 24px;
  object-fit: contain;
  filter: drop-shadow(0 5px 3px rgba(17, 17, 17, 0.12));
}

.parent-request-card h1 {
  max-width: 560px;
  font-size: var(--font-size-display);
  line-height: 1.12;
}

.parent-request-card span {
  margin-top: 16px;
}

.parent-request-actions {
  width: 100%;
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-request-actions form {
  margin: 0;
}

.parent-request-approve,
.parent-request-deny {
  width: 100%;
  min-height: 64px;
  padding: 14px 22px;
  border: 3px solid #ff4f9a;
  border-radius: 999px;
  cursor: pointer;
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.parent-request-approve {
  background: #ff4f9a;
  color: #fff;
}

.parent-request-deny {
  background: transparent;
  color: var(--color-text);
}

.parent-request-approve:active,
.parent-request-deny:active {
  transform: translateY(2px);
}

.public-nav {
  display: contents;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 84px;
  padding: 18px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #ffd1e5;
  background: rgba(255, 250, 253, 0.96);
  backdrop-filter: blur(12px);
}

.public-header.is-menu-open {
  z-index: 50;
  background: var(--color-canvas);
  backdrop-filter: none;
}

.public-header-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-link);
  cursor: pointer;
}

.public-header-menu-icon {
  display: block;
  width: 28px;
  height: 28px;
}

.public-header-menu-icon--close,
.public-header-menu[aria-expanded="true"] .public-header-menu-icon--open {
  display: none;
}

.public-header-menu[aria-expanded="true"] .public-header-menu-icon--close {
  display: block;
}

.public-header-menu:hover {
  color: #8f1f50;
}

.public-header-menu:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(255, 79, 154, 0.3);
  outline-offset: 4px;
}

.public-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 112px 28px 40px;
  background: var(--color-canvas);
}

.public-nav-overlay[hidden] {
  display: none !important;
}

.public-nav-overlay-links {
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  gap: 28px;
}

.public-nav-overlay .public-nav-overlay-login {
  min-height: 56px;
  font-size: var(--font-size-large);
}

.public-nav-overlay-signup {
  width: 100%;
  min-height: 72px;
  font-size: var(--font-size-large);
}

@media (min-width: 761px) {
  .public-nav-overlay {
    display: none !important;
  }
}

.design-header-label {
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.design-intro,
.design-section {
  padding-right: clamp(20px, 6vw, 96px);
  padding-left: clamp(20px, 6vw, 96px);
}

.design-intro {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 88px;
  padding-bottom: 88px;
}

.design-kicker {
  margin: 0 0 14px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.design-intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: var(--font-size-display);
  font-weight: 900;
  line-height: 0.98;
}

.design-section {
  padding-top: 72px;
  padding-bottom: 80px;
  border-top: 2px solid #ffd1e5;
}

.design-section--tint {
  background: var(--color-tint);
}

.design-section > :not(.design-section-heading) {
  width: min(100%, 1120px);
  margin-right: auto;
  margin-left: auto;
}

.design-section-heading {
  width: min(100%, 1120px);
  margin: 0 auto 42px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.design-section-heading p {
  margin: 0;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 900;
}

.design-section-heading h2 {
  margin: 0;
  font-size: var(--font-size-large);
  font-weight: 900;
}

.design-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 56px;
  align-items: center;
}

.design-brand-lockup {
  min-height: 220px;
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 3px solid #ff4f9a;
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 7px 7px 0 #ff783e;
}

.design-brand-icon {
  width: clamp(80px, 11vw, 132px);
  height: auto;
}

.design-brand-type {
  width: min(58%, 330px);
  height: auto;
  fill: #ff4f9a;
}

.design-brand-assets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.design-brand-assets > div {
  min-height: 132px;
  padding: 20px;
  display: grid;
  place-items: center;
  gap: 12px;
  border-bottom: 2px solid #ffd1e5;
}

.design-brand-assets img,
.design-brand-assets svg {
  width: 72px;
  height: 72px;
  object-fit: contain;
  fill: #111;
}

.design-brand-assets span {
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
}

.design-brand-assets .design-wordmark-asset {
  grid-column: 1 / -1;
}

.design-brand-assets .design-wordmark-asset svg {
  width: 180px;
  height: auto;
}

.design-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.design-swatch {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  align-items: center;
}

.design-swatch > span {
  grid-row: 1 / 3;
  width: 76px;
  aspect-ratio: 1;
  border: 2px solid rgba(17, 17, 17, 0.12);
  border-radius: 50%;
  background: var(--swatch);
}

.design-swatch strong {
  align-self: end;
  font-size: var(--font-size-base);
}

.design-swatch code {
  align-self: start;
  color: #766b70;
  font-size: var(--font-size-base);
}

.design-type-specimens {
  display: grid;
}

.design-type-specimens > div {
  padding: 34px 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  border-bottom: 2px solid #ffd1e5;
}

.design-type-specimens > div:first-child {
  padding-top: 0;
}

.design-type-specimens > div > span,
.design-pet-stack-specimen > span {
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
}

.design-type-specimens p {
  margin: 0;
  text-align: left;
}

.design-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.design-button-row button {
  font: inherit;
}

.design-button-row .signup-pet-confirm {
  width: auto;
}

.design-back-link {
  position: static;
  transform: none;
}

.design-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.design-checkbox-row {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.design-checkbox-row .form-checkbox {
  max-width: 560px;
}

.design-form-specimen {
  width: 100%;
  transform: none;
}

.design-form-specimen label {
  justify-self: start;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
}

.design-pet-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.design-visible-pet-speech {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.design-pet-details {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: center;
}

.design-pet-stack-specimen {
  display: grid;
  gap: 28px;
  justify-items: start;
}

.design-pet-stack-specimen .home-pet-stack {
  margin: 0;
}

.design-speech-specimen {
  min-height: 180px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-speech-specimen img {
  flex: 0 0 auto;
}

.design-speech-bubble {
  position: relative;
  max-width: 360px;
  margin-left: 22px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.design-speech-bubble::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 16px;
  height: 18px;
  background: #111;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  content: "";
  transform: translateY(-50%);
}

.design-nav-specimens,
.design-action-bars {
  display: grid;
  gap: 28px;
}

.design-home-nav,
.design-signup-nav {
  position: relative;
  min-height: 96px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #ffd1e5;
  border-radius: 8px;
  background: var(--color-canvas);
}

.design-signup-nav {
  justify-content: center;
}

.design-signup-nav strong {
  font-size: var(--font-size-large);
  font-weight: 900;
}

.design-nav-back {
  position: absolute;
  left: 28px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
}

.design-action-bar {
  position: relative;
  padding-bottom: 14px;
  border-right: 2px solid #ffd1e5;
  border-bottom: 2px solid #ffd1e5;
  border-left: 2px solid #ffd1e5;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .parent-page .public-header,
  .parent-profile-header {
    min-height: 88px;
    padding: 18px 20px;
    align-items: center;
    justify-content: center;
  }

  .parent-profile-header .parent-header-label,
  .parent-profile-header .parent-header-brand {
    display: none;
  }

  .parent-profile-header .parent-header-title {
    max-width: calc(100vw - 24px);
    font-size: var(--font-size-large);
  }

  .parent-continue {
    min-height: calc(100svh - 72px);
  }

  .parent-continue h1 {
    font-size: var(--font-size-display);
  }

  .parent-continue span {
    font-size: var(--font-size-medium);
  }

  .parent-request-card {
    padding: 28px 20px;
  }

  .parent-continue--first-profile {
    min-height: calc(100dvh - 88px - 96px);
    padding: 88px 20px 24px;
  }

  .parent-continue--choose-profile {
    padding: 132px 20px 32px;
  }

  .parent-kid-card {
    min-height: 76px;
    padding: 16px 20px;
    font-size: var(--font-size-large);
  }

  .parent-kid-card--new {
    min-height: 68px;
  }

  .parent-header-pet {
    width: 84px;
    height: 84px;
    transform: translate(-50%, 82%);
  }

  .parent-header-pet-bubble {
    top: calc(100% + 10px);
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 9px 12px;
    font-size: var(--font-size-small);
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    transform: translateX(-50%);
  }

  .parent-header-pet-bubble::before {
    top: -7px;
    left: 50%;
    width: 16px;
    height: 8px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
  }

  .parent-header-label {
    font-size: var(--font-size-base);
  }

  .parent-account-identifier {
    font-size: var(--font-size-base);
  }

  .parent-profile-name-form {
    gap: 28px;
  }

  .parent-first-profile h1 {
    font-size: var(--font-size-medium);
  }

  .parent-profile-name-form input {
    min-height: 116px;
    padding: 24px 14px;
    font-size: var(--font-size-large);
  }

  .parent-profile-action-bar .signup-pet-confirm {
    min-width: 240px;
    min-height: 68px;
    font-size: var(--font-size-medium);
  }

  .parent-request-pet {
    width: 104px;
    height: 104px;
    margin-bottom: 20px;
  }

  .parent-request-card h1 {
    font-size: var(--font-size-large);
  }

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

  .public-header {
    min-height: 72px;
    padding: 14px 20px;
  }

  .public-header:has(.public-header-menu) .public-header-actions,
  .public-header:has(.public-header-menu) .portal-header-actions,
  .public-header:has(.public-header-menu) .public-header-logout {
    display: none;
  }

  .public-header-menu {
    display: inline-flex;
  }

  .public-nav-overlay {
    padding-top: 96px;
  }

  .design-intro {
    padding-top: 56px;
    padding-bottom: 60px;
  }

  .design-intro h1 {
    font-size: var(--font-size-display);
  }

  .design-section {
    padding-top: 52px;
    padding-bottom: 60px;
  }

  .design-section-heading {
    margin-bottom: 32px;
  }

  .design-section-heading h2 {
    font-size: var(--font-size-large);
  }

  .design-brand-row,
  .design-field-row,
  .design-pet-details,
  .design-checkbox-row {
    grid-template-columns: 1fr;
  }

  .design-brand-lockup {
    min-height: 160px;
    padding: 24px;
    gap: 18px;
  }

  .design-brand-assets {
    gap: 14px;
  }

  .design-swatches {
    grid-template-columns: 1fr;
  }

  .design-type-specimens > div {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .design-button-row {
    gap: 24px;
  }

  .design-button-row > * {
    max-width: 100%;
  }

  .design-pet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-speech-specimen {
    padding: 20px 0;
    flex-direction: column;
    gap: 16px;
  }

  .design-speech-bubble {
    max-width: calc(100vw - 64px);
    margin: 0;
  }

  .design-speech-bubble::before {
    top: -7px;
    left: 50%;
    width: 16px;
    height: 8px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
  }

  .design-home-nav,
  .design-signup-nav {
    min-height: 84px;
    padding: 16px;
  }

  .design-signup-nav strong {
    font-size: var(--font-size-large);
  }

  .design-nav-back {
    left: 16px;
    font-size: var(--font-size-base);
  }

  .design-action-bar .signup-pet-confirm {
    min-width: 200px;
    max-width: 200px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #fff5ee;
    --color-link: #e8a0b8;
    --color-muted: #d6c2c8;
    --color-canvas: #241c21;
    --color-surface: #34282e;
    --color-tint: #3b2d34;
    --color-border-soft: #674c58;
    --color-hero-background: var(--color-tint);
    --night-background: #241c21;
    --night-surface: #34282e;
    --night-surface-raised: #3b2d34;
    --night-border: #674c58;
    --night-text: #fff5ee;
    --night-muted: #d6c2c8;
    --night-rose: #e8a0b8;
    --night-rose-bright: #f0b7c9;
    --night-peach: #d99a78;

    color: var(--night-text);
    background: var(--night-background);
    color-scheme: dark;
  }

  body,
  .home-page,
  .signup-page,
  .design-page,
  .parent-page {
    background: var(--night-background);
    color: var(--night-text);
  }

  .public-header,
  .signup-header,
  .signup-action-bar {
    border-color: var(--night-border);
    background: rgba(36, 28, 33, 0.96);
  }

  .public-header.is-menu-open {
    background: var(--night-background);
  }

  .public-header-menu {
    color: var(--night-rose);
  }

  .public-header-menu:hover {
    color: var(--night-rose-bright);
  }

  .public-nav-overlay {
    background: var(--night-background);
  }

  .signup-nav-title,
  .parent-header-title,
  .hero-text,
  .parent-continue h1 {
    color: var(--night-text);
  }

  .design-header-label,
  .design-kicker,
  .parent-continue p,
  .design-section-heading p,
  .design-brand-assets span,
  .design-type-specimens > div > span,
  .design-pet-stack-specimen > span,
  .design-form-specimen label,
  .signup-back,
  .signup-phone-why,
  .home-hero-tagline,
  .signup-waiting-badge,
  .signup-waiting-body,
  .design-nav-back {
    color: var(--night-rose);
  }

  .signup-phone-why[aria-expanded="true"] {
    color: var(--night-rose-bright);
  }

  .signup-phone-why-modal {
    background: var(--night-background);
    color: var(--night-text);
  }

  .signup-phone-why-modal p + p {
    color: var(--night-rose);
  }

  .parent-continue span {
    color: var(--night-muted);
  }

  .parent-page {
    --parent-background: #2a2024;
    --parent-frame: #dfa181;
  }

  .parent-page .public-header {
    border-bottom-color: var(--night-border);
    background: rgba(40, 30, 34, 0.96);
  }

  .parent-page .design-header-label,
  .parent-page .parent-account-identifier,
  .parent-page .parent-continue p {
    color: var(--night-rose);
  }

  .parent-request-card,
  .parent-kid-card,
  .parent-profile-name-form input,
  .parent-profile-action-bar .signup-pet-confirm {
    border-color: var(--night-rose);
    box-shadow: 5px 5px 0 var(--night-peach);
  }

  .parent-profile-action-bar .signup-pet-confirm:disabled {
    box-shadow: none;
  }

  .parent-profile-action-bar .signup-pet-confirm:active:not(:disabled),
  .parent-kid-card:active {
    box-shadow: 2px 2px 0 var(--night-peach);
  }

  .parent-request-card {
    background: var(--night-surface);
    box-shadow: 7px 7px 0 var(--night-peach);
  }

  .parent-profile-name-form input {
    background: var(--night-surface);
    color: var(--night-text);
  }

  .parent-profile-name-form input::placeholder {
    color: #9f909c;
  }

  .parent-kid-card {
    background: var(--night-surface);
    color: var(--night-text);
  }

  .parent-kid-card--new {
    background: var(--night-surface-raised);
    color: var(--night-rose);
  }

  .parent-kid-or-rule {
    background: #5a4036;
  }

  .parent-kid-or-label {
    color: #9f7b68;
  }

  .parent-profile-action-bar {
    background: #2a2024;
  }

  .parent-profile-action-bar .signup-pet-confirm {
    background: var(--night-surface-raised);
    color: var(--night-text);
  }

  .parent-request-deny {
    color: var(--night-text);
  }

  .parent-page a:focus-visible,
  .parent-page button:focus-visible,
  .parent-page input:focus-visible {
    outline-color: rgba(232, 160, 184, 0.5);
  }

  .design-section,
  .design-type-specimens > div,
  .design-brand-assets > div {
    border-color: var(--night-border);
  }

  .design-section--tint {
    background: #2c2228;
  }

  .design-brand-lockup,
  .signup-pet,
  .signup-name-form input,
  .home-header-signup,
  .home-primary-signup,
  .signup-pet-confirm,
  .design-home-nav,
  .design-signup-nav,
  .design-action-bar {
    border-color: var(--night-rose);
    background: var(--night-surface);
    color: var(--night-text);
  }

  .design-brand-lockup,
  .signup-name-form input,
  .home-primary-signup,
  .signup-pet-confirm,
  .signup-pet.is-selected {
    box-shadow: 5px 5px 0 var(--night-peach);
  }

  .signup-pet {
    border-color: var(--night-border);
  }

  .signup-pet.is-selected {
    border-color: var(--night-rose);
    background: var(--night-surface-raised);
  }

  .signup-name-form input::placeholder {
    color: #9f909c;
  }

  .signup-name-form input:focus,
  .signup-pet:focus-visible,
  .signup-pet-confirm:focus-visible,
  .signup-back:focus-visible,
  .signup-phone-why:focus-visible,
  .signup-action-brand:focus-visible {
    outline-color: rgba(232, 160, 184, 0.46);
  }

  .signup-pet-confirm:active:not(:disabled) {
    box-shadow: 2px 2px 0 var(--night-peach);
  }

  .signup-nav-pet-bubble,
  .signup-pet-speech,
  .home-pet-speech,
  .design-speech-bubble {
    background: var(--night-text);
    color: var(--night-background);
  }

  .signup-nav-pet-bubble::before,
  .design-speech-bubble::before {
    background: var(--night-text);
  }

  .signup-pet-speech::after,
  .home-pet-speech::after {
    border-top-color: var(--night-text);
  }

  .design-brand-assets img,
  .design-brand-assets svg {
    fill: var(--night-text);
  }

  .design-swatch > span {
    border-color: rgba(255, 247, 251, 0.18);
  }

  .design-swatch code {
    color: var(--night-muted);
  }

  .signup-action-brand {
    opacity: 0.8;
  }

  .design-page .design-pet-grid li:nth-child(3n + 1) .signup-pet::before {
    position: absolute;
    top: 13px;
    right: 14px;
    z-index: 1;
    color: var(--night-rose);
    content: "Zzz";
    font-size: var(--font-size-small);
    font-weight: 900;
    line-height: 1;
    opacity: 0.75;
    transform: rotate(-7deg);
  }

  .design-page .design-pet-grid li:nth-child(3n + 1) .signup-pet img {
    filter: brightness(0.9) saturate(0.82);
  }
}

/* Chats */
.chats-page,
.chat-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-canvas);
  color: var(--color-text);
}

body:has(.chat-page) {
  overflow: hidden;
}

body:has(.chat-page) > main {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-page {
  position: fixed;
  top: var(--chat-viewport-top, 0px);
  left: 0;
  right: 0;
  flex: 1;
  min-height: 0;
  height: var(--chat-viewport-height, 100dvh);
  max-height: var(--chat-viewport-height, 100dvh);
  overflow: hidden;
}

.chats-header,
.chat-header {
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 20px 24px;
  border-bottom: 2px solid #ffd1e5;
  background: var(--color-canvas);
}

.chats-header {
  grid-template-columns: 1fr auto;
  justify-items: start;
  align-items: center;
}

.chats-title,
.chat-header-name {
  margin: 0;
  font-size: var(--font-size-large);
  font-weight: 800;
  line-height: 1;
}

.chats-list {
  flex: 1;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 8px 0 32px;
}

.chats-empty,
.chat-empty {
  margin: 48px 24px;
  color: var(--color-link);
  font-size: var(--font-size-medium);
  font-weight: 800;
  text-align: center;
}

.chats-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #ffe0ef;
}

.chats-row:active {
  background: var(--color-tint);
}

.chats-row-avatar,
.chat-header-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ff4f9a;
  background: var(--color-surface);
  display: grid;
  place-items: center;
}

.chats-row-avatar img,
.chat-header-avatar img {
  width: 120%;
  height: 120%;
  object-fit: cover;
}

.chats-row-copy {
  min-width: 0;
}

.chats-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chats-row-name {
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.2;
}

.chats-row-time {
  flex: 0 0 auto;
  color: var(--color-link);
  font-size: var(--font-size-small);
  font-weight: 700;
}

.chats-row-preview {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-header {
  position: sticky;
  top: 0;
}

.chat-back {
  left: 20px;
}

.chat-header-person {
  --chat-avatar-size: 52px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.chat-header-avatar {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
}

.chat-header-name {
  font-size: var(--font-size-medium);
}

.chat-thread {
  overflow-anchor: none;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-thread-inner {
  width: 100%;
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: min(78%, 420px);
  padding: 12px 16px;
  border-radius: 18px;
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble--mine {
  align-self: flex-end;
  background: #ff4f9a;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.chat-bubble--theirs {
  align-self: flex-start;
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid #ffd1e5;
  border-bottom-left-radius: 6px;
}

.chat-composer {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  width: 100%;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid #ffd1e5;
  background: var(--color-canvas);
}

.chat-composer-alert {
  width: min(100%, 720px);
  margin: 0 auto 8px;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 800;
  text-align: center;
}

.chat-composer-row {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.chat-composer-input {
  font-size: max(16px, var(--font-size-base));
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 3px solid #ff4f9a;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
}

.chat-composer-input:focus {
  outline: 3px solid rgba(255, 79, 154, 0.28);
  outline-offset: 2px;
}

.chat-composer-send {
  appearance: none;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #ff4f9a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 #ff783e;
}

.chat-composer-send:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #ff783e;
}

@media (max-width: 700px) {
  .chats-header,
  .chat-header {
    min-height: 76px;
    padding: 16px;
  }

  .chats-title {
    font-size: var(--font-size-large);
  }

  .chats-row {
    padding: 12px 16px;
  }

  .chats-row-avatar {
    width: 56px;
    height: 56px;
  }

  .chat-back {
    left: 12px;
  }
}

/* Each message owns its bubble and receipt, leaving room for future reactions. */
.chat-message { display: flex; flex-direction: column; max-width: min(78%, 420px); }
.chat-message--mine { align-self: flex-end; align-items: flex-end; }
.chat-message--theirs { align-self: flex-start; align-items: flex-start; }
.chat-message .chat-bubble { max-width: 100%; }
.chat-message-status { margin: 4px 3px 0; color: #827780; font-size: 12px; line-height: 1.4; text-align: right; }
.chat-message-status button { border: 0; background: transparent; color: #ae285f; font: inherit; font-weight: 700; padding: 2px 4px; margin-left: 4px; cursor: pointer; text-decoration: underline; }
.chat-composer-send:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

.chat-thinking[hidden] { display: none; }
.chat-thinking-bubble {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 15px 18px;
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  background: #eee9ed;
  min-height: 42px;
}
.chat-thinking-bubble span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9c9099;
  animation: chat-thinking-dot 1.2s ease-in-out infinite;
}
.chat-thinking-bubble span:nth-child(2) { animation-delay: 0.15s; }
.chat-thinking-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-thinking-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-thinking-bubble span { animation: none; }
}

/* Shared confirmation mark: Cubcall pink with the brand's orange offset. */
.success-mark {
  width: clamp(128px, 28vw, 176px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: #ff4f9a;
  color: #fff;
  box-shadow: 8px 8px 0 #ff783e;
}

.success-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.parent-continue--done {
  min-height: calc(100svh - 4px);
}

.parent-continue--done .success-mark {
  margin-bottom: 40px;
}

.parent-continue--done .parent-done-message {
  max-width: 440px;
  margin: 20px 0 0;
  font-weight: 600;
  line-height: 1.5;
}

.parent-continue--done .parent-done-hint {
  margin: 12px 0 0;
  color: #766b70;
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
}

.design-success-specimen {
  display: grid;
  justify-items: center;
  padding: 32px 24px;
  text-align: center;
}

.design-success-specimen h3 {
  margin: 40px 0 0;
  font-size: var(--font-size-display);
  font-weight: 900;
  line-height: 1.12;
}

.design-success-specimen p {
  margin: 20px 0 0;
  font-size: var(--font-size-medium);
  line-height: 1.5;
}

.kid-chat-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffe0ed;
  color: #ae285f;
  font-size: 50cqw;
  line-height: 1;
  font-weight: 800;
}

.chats-row-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chats-row-bottom .chats-row-preview {
  flex: 1;
  min-width: 0;
}

.chats-row--unread {
  background: var(--color-tint);
}

.chats-row--unread .chats-row-preview {
  color: #88204c;
  font-weight: 800;
}

.chats-unread-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ae285f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.home-header-parent-login {
  color: var(--color-muted);
  font-size: var(--font-size-base);
  font-weight: 600;
}


.parent-family {
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 40px 24px;
  line-height: 1.5;
}

.parent-logout {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: var(--font-size-base);
  font-weight: 800;
}

.public-header .public-header-back {
  position: static;
  margin: 0;
}

.public-header-logout {
  display: flex;
  align-items: center;
  margin: 0;
}

.public-header-logout .parent-logout {
  height: 44px;
  padding: 0;
  line-height: 1;
}

/* One app navigation frame. Offset pet buttons remain positioned against
   this header, outside its height, while their original interactions stay intact. */
.public-header.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 112px;
  min-height: 112px;
  padding: 14px 48px;
  flex-shrink: 0;
  overflow: visible;
}

.app-header > .public-header-back,
.app-header > .chats-title {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.app-header > .chats-title {
  white-space: nowrap;
}

.app-header > .public-header-center {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  min-width: 0;
  max-width: calc(100vw - 220px);
}

.app-header .signup-nav-title,
.app-header .chat-header-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Leave room for Fredoka's descenders inside the horizontal clipping box. */
.app-header .signup-nav-title {
  line-height: 1.2;
}

.app-header > .public-header-logout {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

@media (max-width: 760px) {
  .public-header.app-header {
    height: 88px;
    min-height: 88px;
    padding: 14px 20px;
  }

  .app-header > .public-header-center {
    max-width: calc(100vw - 160px);
  }

  .app-header .chat-header-person { --chat-avatar-size: 36px; }

  .app-header .chat-header-person {
    gap: 4px;
  }

  .app-header .chat-header-name {
    font-size: var(--font-size-base);
  }
}
.family-section + .family-section {
  margin-top: 40px;
}

.family-section h2 {
  margin: 0 0 16px;
  font-size: var(--font-size-large);
  font-weight: 800;
}

.family-avatar-group {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px;
  margin: 0;
  padding: 0 3px;
  list-style: none;
}

.family-avatar-group > li {
  margin-inline: -3px;
}

.family-avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid #ff4f9a;
  border-radius: 50%;
  background: var(--color-tint);
  color: var(--color-link);
  font: inherit;
  font-size: var(--font-size-large);
  font-weight: 800;
}

.family-avatar-control .family-avatar,
.family-avatar--add {
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.family-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-avatar--add {
  padding: 0;
  border-style: dashed;
  border-color: #ffd1e5;
  background: var(--parent-background, #fffafd);
  cursor: pointer;
}

.family-add-icon {
  display: block;
  width: 32px;
  height: 32px;
}

.family-avatar--add:hover,
.family-avatar-control:hover .family-avatar,
.family-avatar-control:focus-visible .family-avatar {
  transform: translateY(-2px);
}

.family-avatar--add:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.family-avatar--add:active,
.family-avatar-control:active .family-avatar {
  transform: scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
  .family-avatar-control .family-avatar,
  .family-avatar--add {
    transition: none;
  }
}

@media (max-width: 760px) {
  .family-avatar {
    width: 80px;
    height: 80px;
  }
}

@media (prefers-color-scheme: dark) {
  .family-avatar {
    border-color: var(--night-rose);
    background: var(--night-surface);
    color: var(--night-rose);
  }

  .family-avatar--add {
    border-color: var(--night-border);
  }

}

/* Parent chrome: a warm canvas and frame around shared components. */
.parent-page {
  position: relative;
  --parent-frame-width: 8px;
  background: var(--parent-background);
}

/* Reserve the space covered by the fixed frame so navigation is centered
   between its visible top edge and the header's bottom border. */
.parent-page .public-header,
.parent-page .signup-header,
.parent-page .chats-header {
  border-top: var(--parent-frame-width) solid transparent;
}

.parent-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  border: var(--parent-frame-width) solid var(--parent-frame);
  pointer-events: none;
}

@media (max-width: 760px) {
  .parent-page {
    --parent-frame-width: 0px;
  }

  /* A viewport frame crosses scrolling content when Safari's toolbar moves.
     Keep the decorative frame on desktop, with an open canvas on phones. */
  .parent-page::after {
    display: none;
  }
}

.parent-page .public-header,
.parent-page .signup-header,
.parent-page .chats-header,
.parent-page .signup-action-bar {
  background: var(--parent-background);
}

.design-parent-description {
  margin-bottom: 24px;
  font-size: var(--font-size-base);
}

.design-parent-specimen {
  min-height: 0;
  padding: 24px;
  display: grid;
  gap: 32px;
  border-radius: 8px;
}

.design-parent-waiting {
  transform: none;
}

.design-parent-specimen .design-field-row > * {
  min-width: 0;
}

#design-parent {
  scroll-margin-top: 112px;
}

.design-parent-specimen::after {
  position: absolute;
  border-radius: inherit;
}

.family-avatar-control {
  position: relative;
  display: block;
  border-radius: 50%;
  text-decoration: none;
}

.family-profile .chats-title {
  overflow-wrap: anywhere;
}

/* Keep every back link consistent, including form and design previews. */
.signup-back,
.kid-identity-back,
.parent-profile-back,
.design-nav-back {
  gap: 0;
  font-size: var(--font-size-base);
  font-weight: 800;
}

.signup-back-arrow {
  font-size: inherit;
  line-height: inherit;
  transform: none;
}

.family-profile-kind {
  margin: 24px 0 4px;
  color: var(--color-muted);
}

.family-profile-detail {
  margin-top: 12px;
}

.family-profile-form {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  max-width: 440px;
}

.family-profile-field {
  display: grid;
  gap: 8px;
}

.family-profile-field label {
  font-weight: 700;
}

.family-profile-field input,
.family-profile-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid #ff4f9a;
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
}

.family-profile-field textarea {
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.family-profile-field input[readonly] {
  border-color: #ffd1e5;
  background: transparent;
  color: inherit;
}

.family-profile-save {
  justify-self: start;
  cursor: pointer;
}

.family-profile-save:disabled {
  opacity: 0.5;
  cursor: default;
}

.family-profile-form p {
  margin: 0;
}

.family-avatar-control:hover,
.family-avatar-control:focus-visible {
  z-index: 3;
}

.family-avatar-control:focus-visible {
  outline: 3px solid #ff4f9a;
  outline-offset: 4px;
}

/* A shared, compact scale for the big onboarding fields. */
.signup-name-form input,
.signup-code-form input,
.parent-profile-name-form input {
  min-height: 76px;
  height: 76px;
  padding: 16px 20px;
  font-size: 28px;
}

.international-phone {
  --phone-border: #ff4f9a;
  --phone-shadow: #ff783e;
  --phone-surface: #fff;
  --phone-tint: #fff0f7;
  --phone-ink: var(--color-text);
  --phone-muted: #967884;
  position: relative;
  width: 100%;
  text-align: left;
  color: var(--phone-ink);
}
.international-phone:has(.phone-country-menu:not([hidden])) { z-index: 45; }
.phone-number-shell {
  display: flex;
  align-items: center;
  height: 76px;
  border: 3px solid var(--phone-border);
  border-radius: 10px;
  background: var(--phone-surface);
  box-shadow: 4px 4px 0 var(--phone-shadow);
}
.phone-number-shell:focus-within {
  outline: 4px solid rgba(255, 79, 154, 0.18);
  outline-offset: 3px;
}
.phone-country-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 78px;
  min-height: 44px;
  margin-left: 8px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #ffd1e5;
  background: transparent;
  color: var(--color-link);
  font-size: 24px;
  cursor: pointer;
}
.phone-country-trigger:not(:disabled):hover,
.phone-country-trigger[aria-expanded="true"] { background: var(--phone-tint); border-radius: 6px; }
.phone-country-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.phone-country-code { padding-left: 16px; font-size: 24px; font-weight: 600; white-space: nowrap; }
.international-phone .phone-number-shell input[type="tel"] {
  width: 100%;
  min-width: 0;
  height: 70px;
  min-height: 0;
  padding: 12px 14px 12px 8px;
  border: 0;
  border-radius: 0 8px 8px 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--phone-ink);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
}
.phone-country-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  border: 2px solid var(--phone-border);
  border-radius: 12px;
  background: var(--phone-surface);
  box-shadow: 4px 4px 0 var(--phone-shadow), 0 12px 28px #bd2e6d14;
  overflow: hidden;
}
.international-phone [hidden] { display: none !important; }
.phone-country-search { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #ffd1e5; color: var(--phone-muted); }
.international-phone .phone-country-search input {
  min-width: 0;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: var(--phone-ink);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}
.phone-country-options { padding: 6px; max-height: var(--country-list-height, min(224px, 32dvh)); overflow-y: auto; }
.phone-country-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--phone-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.phone-country-option:hover,
.phone-country-option:focus-visible,
.phone-country-option[aria-pressed="true"] { background: var(--phone-tint); }
.phone-country-option:focus-visible { outline: 2px solid var(--phone-border); outline-offset: -2px; }
.phone-country-option > span:first-child { font-size: 24px; }
.phone-option-code { margin-left: auto; color: var(--phone-muted); font-weight: 500; }
.phone-option-check { width: 16px; color: var(--color-link); visibility: hidden; }
.phone-country-option[aria-pressed="true"] .phone-option-check { visibility: visible; }
.phone-country-empty { padding: 18px; margin: 0; color: var(--phone-muted); font-size: 16px; }
@media (max-width: 760px) {
  .signup-name-form input,
  .signup-code-form input,
  .parent-profile-name-form input { min-height: 68px; height: 68px; padding: 12px 16px; font-size: 24px; }
  .phone-number-shell { height: 68px; }
  .phone-country-trigger { flex-basis: 62px; gap: 6px; padding: 0 8px; font-size: 22px; }
  .phone-country-code { padding-left: 10px; font-size: 19px; }
  .international-phone .phone-number-shell input[type="tel"] { height: 62px; font-size: 19px; padding-right: 8px; padding-left: 6px; }
}
@media (prefers-color-scheme: dark) {
  .international-phone { --phone-border: var(--night-rose); --phone-shadow: var(--night-peach); --phone-surface: var(--night-surface); --phone-tint: var(--night-surface-raised); --phone-ink: var(--night-text); --phone-muted: #bd9fac; }
}

.signup-name-form:has(.phone-country-menu:not([hidden])) {
  position: relative;
  z-index: 45;
}

.phone-country-trigger:disabled { cursor: default; }
.phone-country-trigger:disabled svg { visibility: hidden; }

.public-header-brand-group { display: flex; align-items: center; gap: 16px; }
.public-header-mobile-controls { display: none; }
.public-header-actions .language-selector-options { left: auto; right: 0; }
.language-selector { position: relative; color: var(--color-link); }
.language-selector summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
  font-size: 22px;
}
.language-selector summary::-webkit-details-marker { display: none; }
.language-selector summary:hover, .language-selector[open] summary { background: var(--color-tint); }
.language-selector[open] summary svg { transform: rotate(180deg); }
.language-selector summary:focus-visible, .language-selector-options a:focus-visible {
  outline: 3px solid #ff4f9a;
  outline-offset: 3px;
}
.language-selector-options {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 250px;
  padding: 6px;
  border: 2px solid #ff4f9a;
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 4px 4px 0 #ff783e;
}
.language-selector-options a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}
.language-selector-options a:hover, .language-selector-options a[aria-current] { background: var(--color-tint); }
.language-selector-check { margin-left: auto; color: var(--color-link); }
@media (max-width: 760px) {
  .public-header-brand-group { gap: 8px; }
  .public-header-mobile-controls { display: flex; align-items: center; gap: 8px; }
  .app-header .public-header-mobile-controls { grid-column: 3; grid-row: 1; justify-self: end; }
  .language-selector-options { left: auto; right: 0; width: 230px; }
}
@media (prefers-color-scheme: dark) {
  .language-selector { color: var(--night-rose); }
  .language-selector-options { background: var(--night-surface); border-color: var(--night-rose); box-shadow: 4px 4px 0 var(--night-peach); }
  .language-selector-options a { color: var(--night-text); }
  .language-selector summary:hover, .language-selector[open] summary,
  .language-selector-options a:hover, .language-selector-options a[aria-current] { background: var(--night-surface-raised); }
  .language-selector-check { color: var(--night-rose); }
}

.parent-login-confirm-main {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.parent-login-confirm-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
}
.parent-login-welcome {
  margin: 0;
  color: var(--color-link);
  font-size: var(--font-size-base);
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}
.parent-login-confirm-form .signup-pet-confirm { min-width: 0; max-width: 100%; padding-inline: 36px; }
@media (max-width: 760px) {
  .parent-login-confirm-main { min-height: calc(100dvh - 92px); }
}

.text-cubcall-main {
  min-height: calc(100dvh - 112px);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
@media (max-width: 760px) {
  .text-cubcall-main { min-height: calc(100dvh - 88px); }
}

.text-cubcall-link { gap: 8px; }
.text-cubcall-link img { display: block; flex-shrink: 0; }

.onboarding-main { gap: 24px; }
.onboarding-instructions { margin: 0; max-width: 400px; color: var(--color-muted); line-height: 1.5; }
.onboarding-qr {
  display: block;
  width: min(220px, 100%);
  border: 2px solid var(--color-link);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.onboarding-qr svg { display: block; width: 100%; height: auto; }
.onboarding-qr:focus-visible { outline: 3px solid var(--color-link); outline-offset: 5px; }

.copy-button { display: inline-flex; flex-direction: column; align-items: center; max-width: 100%; text-align: center; }
.copy-button-control { gap: 12px; max-width: 100%; border-radius: 14px; cursor: pointer; }
.copy-button-control span { overflow-wrap: anywhere; }
.copy-button-control svg { flex-shrink: 0; color: var(--color-muted); }
.copy-button-status { display: block; min-height: 24px; margin-top: 8px; color: var(--color-muted); }

.signup-text-invitation {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

a.signup-pet-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.button-trailing-icon { display: block; flex-shrink: 0; }

.text-invitation-options {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 100%;
}
.text-invitation-options .text-cubcall-link { white-space: nowrap; }

.signup-instruction-number { white-space: nowrap; font-variant-numeric: tabular-nums; }

.signup-display-code {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.signup-pet-question {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pet-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  transition: transform 180ms ease-out;
}
.pet-icon-image { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  .pet-icon { transition: none; transform: none !important; }
}

.signup-pet-name-input {
  position: relative;
  width: 100%;
}
.signup-input-pet {
  position: absolute;
  top: auto;
  bottom: -12px;
  right: -16px;
  z-index: 1;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.12));
}

.signup-input-pet .pet-icon { width: 76px; height: 76px; }
.signup-input-pet:focus-visible { outline: 3px solid var(--color-link); outline-offset: 4px; border-radius: 16px; }
.signup-input-pet-bubble {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--color-text);
  color: var(--color-canvas);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
.signup-input-pet.is-talking .signup-input-pet-bubble,
.signup-input-pet.is-nudging .signup-input-pet-bubble { opacity: 1; }
.signup-input-pet.is-talking img { animation: signup-pet-talk 420ms ease; }
.signup-input-pet.is-nudging img { animation: signup-pet-nudge 820ms ease; }
@media (prefers-reduced-motion: reduce) {
  .signup-input-pet img { animation: none !important; }
  .signup-input-pet-bubble { transition: none; }
}

.signup-input-pet.is-at-next {
  position: fixed;
  bottom: auto;
  right: auto;
  z-index: 30;
}

.button-with-pet { position: relative; }
.button-corner-pet {
  position: absolute;
  top: -50px;
  right: -26px;
  pointer-events: none;
}
.button-corner-pet[hidden] { display: none; }
.button-corner-pet .pet-icon { width: 76px; height: 76px; }
.signup-input-pet.is-at-next .signup-input-pet-bubble { display: none; }

.signup-input-pet .signup-pet-introduction { opacity: 1; }
.signup-pet-introduction::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -6px;
  border-top: 7px solid var(--color-text);
  border-left: 7px solid transparent;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pet-icon-image { transition: transform 160ms ease-out; }
  button.signup-input-pet:not(:disabled):not(.is-at-next):hover .pet-icon-image {
    transform: translateY(-4px);
  }
}

.signup-input-pet { cursor: default; }
button.signup-input-pet:not(:disabled):not(.is-at-next) { cursor: pointer; }
.button-corner-pet { pointer-events: auto; cursor: default; }

/* Reserve room for the fixed footer so every text-signup action stays reachable. */
.signup-selected-main.signup-inbound-main:has(.signup-action-brand) {
  min-height: calc(100dvh - 112px);
  padding: 32px 32px calc(132px + env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
  .signup-selected-main.signup-inbound-main:has(.signup-action-brand) {
    min-height: calc(100dvh - 88px);
    padding: 24px 20px calc(148px + env(safe-area-inset-bottom));
  }

  .signup-inbound-main .signup-text-invitation { gap: 16px; }
  .signup-inbound-main .onboarding-qr { width: min(176px, 100%); }
}

@media (max-width: 760px) {
  .signup-permission-main .signup-input-pet .pet-icon {
    width: 48px;
    height: 48px;
  }

  .signup-permission-main .signup-input-pet:not(.is-at-next) {
    top: auto;
    bottom: -12px;
    right: -8px;
  }

  .signup-permission-main .signup-pet-introduction {
    bottom: calc(100% + 4px);
    padding: 6px 9px;
    font-size: 12px;
    border-radius: 12px;
  }
}


/* Center the complete phone form, including consent, above the fixed footer. */
.signup-selected-main.signup-permission-main:has(.signup-action-brand) {
  min-height: calc(100dvh - 112px);
  padding: 24px 32px calc(132px + env(safe-area-inset-bottom));
  align-items: center;
}

.signup-permission-main .signup-phone-form {
  transform: none;
}

@media (max-width: 760px) {
  .signup-selected-main.signup-permission-main:has(.signup-action-brand) {
    min-height: calc(100dvh - 88px);
    padding: 24px 20px calc(148px + env(safe-area-inset-bottom));
  }
}


.signup-text-desktop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.signup-text-invitation .signup-text-mobile { display: none; }

@media (max-width: 760px) {
  .signup-text-invitation .signup-text-desktop { display: none; }
  .signup-text-invitation .signup-text-mobile { display: inline-flex; }
}

.signup-text-pet-anchor { position: relative; }
.signup-text-desktop .signup-text-pet-anchor { width: min(220px, 100%); }
.signup-text-pet {
  position: absolute;
  right: -34px;
  bottom: -20px;
  z-index: 1;
  cursor: default;
}
.signup-text-pet .pet-icon { width: 60px; height: 60px; }
.signup-text-desktop .signup-text-pet { right: -46px; bottom: -16px; }
.signup-text-desktop .signup-text-pet-anchor { margin-bottom: 12px; }
@media (max-width: 760px) {
  .signup-text-pet .pet-icon { width: 48px; height: 48px; }
  .signup-text-mobile.signup-text-pet-anchor { margin-bottom: 12px; }
  .signup-text-mobile .signup-text-pet { right: -22px; bottom: -16px; }
}

@media (min-width: 761px) {
  .signup-text-desktop { gap: 16px; }
  .signup-text-desktop .signup-text-pet-anchor { margin-bottom: 0; }
  .signup-text-desktop .copy-button-status:empty {
    min-height: 0;
    margin-top: 0;
  }
  .signup-text-invitation > .signup-phone-why { margin-top: -12px; }
}

.signup-pet-home { position: relative; width: 200px; height: 142px; }
.signup-pet-home > svg { display: block; width: 100%; height: 100%; }
.signup-pet-home-resident { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); }
.signup-pet-home-resident .pet-icon { width: 60px; height: 60px; }
.signup-home-heading { display: grid; justify-items: center; gap: 10px; }
.signup-home-heading .onboarding-instructions { max-width: none; }
@media (max-width: 760px) {
  .signup-pet-home { width: 160px; height: 114px; }
  .signup-pet-home-resident .pet-icon { width: 48px; height: 48px; }
  .signup-pet-home-resident { bottom: 7px; }
}

.adoption-form-field { width: 100%; display: grid; gap: 10px; }
.adoption-form-field > label {
  text-align: left;
  font-size: var(--font-size-medium);
  font-weight: 800;
  line-height: 1.2;
}
.signup-permission-main .adoption-name-input {
  min-height: 64px;
  padding: 16px 20px;
  font-size: var(--font-size-medium);
  text-align: left;
}
.signup-permission-main .signup-phone-form { gap: 24px; }

/* Shared non-editable input states retain readable text without the raised treatment. */
.form-field input:is([readonly], :disabled),
.signup-name-form input:is([readonly], :disabled) {
  background: color-mix(in srgb, var(--color-muted) 8%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-muted) 30%, var(--color-surface));
  color: var(--color-muted);
  box-shadow: none;
}
.form-field input:disabled,
.signup-name-form input:disabled { cursor: not-allowed; }

/* Parent-facing adoption fields use the portal's compact 48px scale. */
.signup-permission-main .adoption-form-field { gap: 8px; }
.signup-permission-main .adoption-form-field > label {
  font-size: 16px;
  font-weight: 700;
}
.signup-permission-main .adoption-name-input {
  height: 48px;
  min-height: 48px;
  padding: 10px 14px;
  border-width: 2px;
  border-radius: 12px;
  font-size: 16px;
}
:is(.signup-permission-main, .family-profile-form) .phone-number-shell {
  height: 48px;
  border-width: 2px;
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--phone-shadow);
}
:is(.signup-permission-main, .family-profile-form) .international-phone .phone-number-shell input[type="tel"] {
  height: 44px;
  font-size: 16px;
  padding: 8px 12px 8px 6px;
}
:is(.signup-permission-main, .family-profile-form) .phone-country-trigger {
  flex-basis: 56px;
  min-height: 40px;
  gap: 6px;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 20px;
}
:is(.signup-permission-main, .family-profile-form) .phone-country-code { padding-left: 10px; font-size: 16px; }
.signup-permission-main .signup-phone-form { gap: 18px; }

.form-checkbox-compact {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  min-height: 44px;
}
.form-checkbox-compact .form-checkbox-mark {
  width: 24px;
  height: 24px;
  border-width: 2px;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #ff783e;
}
.form-checkbox-compact .form-checkbox-mark svg { width: 16px; height: 16px; }
.form-checkbox-compact .form-checkbox-label {
  padding-top: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.form-checkbox-compact .form-checkbox-label a { font-weight: 700; }

.adoption-pet-summary {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: 100%;
}
.adoption-pet-portrait {
  position: relative;
  align-self: stretch;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 2px solid #ffd1e5;
  border-radius: 12px;
  background: var(--color-surface);
}
.adoption-pet-portrait img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: inherit; object-fit: contain; }
.adoption-pet-details { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 760px) {
  .adoption-pet-summary { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .adoption-pet-portrait { padding: 8px; }
}

.adoption-form { width: 100%; }
.adoption-preview-actions { display: flex; justify-content: center; margin-top: 24px; }

.adoption-confirmation {
  width: min(100%, 526px);
  display: grid;
  gap: 18px;
  text-align: left;
}
.adoption-confirmation-visual { display: grid; align-items: center; }
.adoption-confirmation-visual .onboarding-qr { width: 100%; }
.adoption-confirmation-instructions { display: grid; gap: 8px; }
.adoption-confirmation-instructions .signup-phone-prompt { font-size: 20px; text-align: left; }
.adoption-confirmation-instructions .onboarding-instructions { font-size: 16px; max-width: none; }
.adoption-confirmation > .signup-phone-why { justify-self: center; margin-top: -6px; }
.adoption-confirmation > .signup-text-mobile { justify-self: center; }
.adoption-confirmation .copy-button-status:empty { min-height: 0; margin-top: 0; }
.adoption-confirmation .adoption-name-input { width: 100%; border-style: solid; font-weight: 700; }
@media (max-width: 760px) {
  .adoption-confirmation-visual .adoption-pet-portrait { height: 100%; width: 100%; }
}

.adoption-confirmation-visual { align-self: stretch; align-items: stretch; }
.adoption-qr-frame {
  position: relative;
  justify-content: center;
  border: 2px solid var(--color-link);
  border-radius: 16px;
  background: #fff;
}
.adoption-qr-frame .onboarding-qr { border: 0; border-radius: 14px; }
.adoption-qr-pet {
  position: absolute;
  top: -22px;
  right: -14px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  pointer-events: none;
}

.signup-selected-main.signup-permission-main:has(.signup-action-brand),
.signup-selected-main.signup-inbound-main:has(.signup-action-brand) {
  align-items: start;
  align-content: start;
  padding-top: 32px;
}

.adoption-confirmation-field { display: grid; gap: 8px; }
.adoption-confirmation-label { display: flex; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 700; }
.adoption-confirmation-label .signup-phone-why { font-size: 14px; font-weight: 500; border-bottom-width: 1px; }
.adoption-confirmation-box { border: 2px solid #ff4f9a; border-radius: 12px; padding: 18px; background: var(--color-surface); }
.adoption-confirmation-pending { display: grid; gap: 14px; }
.adoption-confirmation-box .signup-phone-prompt { font-size: 18px; text-align: left; }
.adoption-confirmation-message { margin: 0; font-size: 16px; line-height: 1.4; }
.adoption-confirmation-box .signup-text-desktop { align-items: flex-start; gap: 10px; }
.adoption-confirmation-box .onboarding-instructions { font-size: 14px; }
.adoption-confirmation-box .copy-button-control { font-size: 16px; padding: 8px 12px; }
.adoption-confirmation-box .signup-text-mobile { justify-self: start; }
.adoption-confirmation-box [hidden] { display: none !important; }
.adoption-confirmation-success { margin: 0; font-size: 18px; font-weight: 700; }
.adoption-confirmation-box.is-confirmed { border-color: var(--color-muted); background: var(--color-canvas); }

.adoption-confirmation-field .adoption-confirmation-label { display: contents; }
.adoption-confirmation-label > span { display: none; }
.adoption-confirmation-label .signup-phone-why { order: 2; justify-self: start; }
.adoption-confirmation-field .adoption-confirmation-box {
  padding: 0;
  border: 0;
  background: transparent;
}
.confirmation-message-copy { display: grid; gap: 14px; }
.confirmation-message-copy p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-muted); }

.adoption-message-preview {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid color-mix(in srgb, var(--color-muted) 30%, var(--color-surface));
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-muted) 8%, var(--color-surface));
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
}

/* The final adoption step uses the same QR layout on every screen. */
.signup-selected-main.signup-scan-main {
  min-height: calc(100dvh - 112px);
  padding: 24px 20px calc(100px + env(safe-area-inset-bottom));
  align-items: center;
  align-content: center;
}
@media (max-width: 760px) {
  .signup-selected-main.signup-scan-main { min-height: calc(100dvh - 88px); }
}
.adoption-scan { display: grid; justify-items: center; gap: 28px; width: 100%; }
.adoption-scan [hidden] { display: none !important; }
.adoption-scan-code {
  position: relative;
  width: min(220px, 100%);
  padding: 8px;
  border: 1px solid #e2e3e7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px #00000010;
}
.adoption-scan-code svg { display: block; width: 100%; height: auto; }

.adoption-scan-action { display: grid; justify-items: center; gap: 18px; width: 100%; text-align: center; }
.adoption-scan-intro { display: grid; gap: 8px; }
.adoption-scan-intro .home-hero-tagline { margin: 0; }
.adoption-scan-caption { margin: 0; font-size: var(--font-size-base); font-weight: 400; line-height: 1.4; color: var(--color-muted); }
.text-secondary { margin: 0; font-size: var(--font-size-medium); font-weight: 700; line-height: 1.4; color: var(--color-link); }
.adoption-phone-panel > .copy-button { width: min(440px, 100%); }
.adoption-scan-action .copy-button-control {
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid color-mix(in srgb, var(--color-muted) 25%, var(--color-surface));
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: none;
  font-size: 16px;
}

.adoption-desktop-qr { display: grid; justify-items: center; gap: 18px; width: 100%; }
.adoption-mobile-message { display: none; }
@media (max-width: 760px) {
  .adoption-desktop-qr { display: none; }
  .adoption-mobile-message { display: block; }
}

.adoption-scan-why { font-size: 16px; font-weight: 500; border-bottom-width: 1px; }
.adoption-desktop-qr .copy-button-status:empty { min-height: 0; margin-top: 0; }

.copy-button-label { position: relative; }
.copy-button-feedback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  line-height: 1.1;
}

.adoption-message-alternative { display: grid; gap: 6px; }
.adoption-message-alternative a, .adoption-other-phone summary { color: var(--color-link); font-size: 14px; text-decoration: underline; cursor: pointer; }
.adoption-message-alternative p, .adoption-sender-hint { margin: 0; color: var(--color-muted); font-size: 14px; }
.adoption-mobile-qr { display: grid; justify-items: center; gap: 18px; padding-top: 28px; }
.adoption-mobile-qr > .copy-button { width: min(440px, 100%); }
.adoption-other-phone { width: 100%; }
@media (max-width: 760px) {
  .adoption-mobile-message { display: grid; justify-items: center; gap: 14px; width: 100%; }
}

.adoption-method-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--color-tint);
  gap: 4px;
}
.adoption-method-switch button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.adoption-method-switch button[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 4px #00000012;
}
.adoption-phone-panel { display: grid; justify-items: center; gap: 18px; width: 100%; padding-top: 12px; }
.adoption-device-panel { padding: 0 0 6px; }
.adoption-scan-action:has(.adoption-device-panel:not([hidden])) { gap: 28px; }

.adoption-method-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--color-canvas);
  border-top: 2px solid #ffd1e5;
}

/* Development Messages desktop */
.messages-lab { min-height: 100dvh; padding: 28px; background: #e9edf2; color: #202124; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.messages-lab-heading { display: flex; align-items: baseline; gap: 18px; margin-bottom: 24px; }
.messages-lab-heading h1 { font-size: 24px; margin: 0; font-weight: 700; }
.messages-lab-heading span { color: #68707c; font-size: 11px; letter-spacing: 1px; }
.messages-desktops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.messages-window { border: 1px solid #c9ced5; border-radius: 14px; overflow: hidden; background: white; box-shadow: 0 14px 36px #22334418; }
.messages-titlebar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: #f4f4f6; border-bottom: 1px solid #ddd; }
.messages-titlebar strong { font-size: 15px; }
.messages-titlebar > span { font-size: 12px; color: #70747c; }
.messages-traffic { display: flex; gap: 6px; margin-right: 8px; }
.messages-traffic i { width: 11px; height: 11px; border-radius: 50%; background: #ff6058; }
.messages-traffic i:nth-child(2) { background: #ffbd2e; }
.messages-traffic i:nth-child(3) { background: #28c840; }
.messages-workspace { display: grid; grid-template-columns: 185px minmax(0, 1fr); height: min(740px, calc(100dvh - 160px)); min-height: 420px; }
.messages-sidebar { background: #f5f5f7; border-right: 1px solid #ddd; overflow-y: auto; padding: 12px 8px; }
.messages-sidebar-heading { color: #767b84; font-size: 11px; font-weight: 600; padding: 4px 8px 14px; }
.messages-thread { display: flex; gap: 8px; align-items: center; padding: 12px 8px; border-radius: 8px; color: #333; text-decoration: none; }
.messages-thread.selected { background: #dce9fc; }
.messages-thread > span:last-child { min-width: 0; }
.messages-thread strong { font-size: 11px; display: block; }
.messages-thread small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #777; font-size: 11px; margin-top: 5px; }
.messages-contact-icon { display: grid; place-items: center; background: #b9c1cc; color: white; border-radius: 50%; width: 28px; height: 28px; flex-shrink: 0; }
.messages-conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.messages-recipient { display: flex; align-items: center; gap: 8px; padding: 14px; border-bottom: 1px solid #eee; font-size: 13px; }
.messages-recipient label { color: #85858b; }
.messages-recipient input[type=tel] { width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; color: #333; }
.messages-recipient input[type=submit] { background: transparent; border: 0; color: #087df5; font-size: 12px; cursor: pointer; }
.messages-history { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.messages-empty { text-align: center; font-size: 12px; color: #909098; margin: auto; }
.messages-empty span { display: block; margin-top: 6px; }
.messages-entry { max-width: 88%; }
.messages-entry.sent { align-self: flex-end; }
.messages-entry.received { align-self: flex-start; }
.messages-bubble { background: #e9e9eb; border-radius: 17px; padding: 10px 14px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.sent .messages-bubble { background: #087df5; color: white; }
.messages-bubble p { margin: 0; }
.messages-entry small { display: block; margin: 5px 4px 0; font-size: 10px; color: #909098; }
.sent small { text-align: right; }
.messages-composer { display: flex; align-items: end; gap: 8px; padding: 12px 14px 18px; }
.messages-composer textarea { min-width: 0; width: 100%; resize: vertical; border: 1px solid #d3d3d8; border-radius: 16px; padding: 10px 12px; font: inherit; font-size: 14px; background: white; color: #222; }
.messages-composer button { border: 0; border-radius: 50%; background: #087df5; color: white; width: 30px; height: 30px; flex-shrink: 0; font-size: 22px; cursor: pointer; margin-bottom: 4px; }
@media(max-width: 1100px) { .messages-desktops { grid-template-columns: 1fr; } }
@media(max-width: 540px) { .messages-lab { padding: 12px; } .messages-workspace { grid-template-columns: 125px minmax(0, 1fr); } .messages-contact-icon { display: none; } .messages-titlebar { padding: 0 10px; gap: 8px; } }
.messages-bubble { white-space: pre-wrap; }
.messages-bubble a { color: inherit; text-decoration: underline; }

.family-invite > .copy-button { justify-self: start; align-items: flex-start; }

.portal-header-actions { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 16px; }
.parent-page .portal-header-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; column-gap: 16px; row-gap: 8px; }
.parent-page .portal-header-actions > a, .parent-page .portal-header-actions button { white-space: nowrap; }
.portal-login-language { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
.portal-header-actions .language-selector-options,
.portal-login-language .language-selector-options { left: auto; right: 0; }
@media (max-width: 760px) {
  .portal-header-actions { gap: 8px; }
  .portal-login-language { right: 12px; }
  .parent-page .signup-header:has(.portal-login-language) .signup-nav-title { padding-inline: 64px; }
}

.public-header-parent-divider { width: 1px; height: 20px; flex-shrink: 0; background: currentColor; opacity: 0.12; margin-inline: 4px; }

.parent-inbound-content > .text-primary { margin-bottom: 28px; }

/* Safari may offer credentials on login phone fields despite autocomplete=off.
   Suppress its inline accessory only on telephone inputs. */
input[type="tel"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}
input[type="tel"]::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.family-kid-pet { display: flex; align-items: center; gap: 16px; }
.family-kid-pet img { object-fit: contain; }
/* Shared destructive actions, with explicit contrast in both themes */
:root { --color-danger: #b42332; --color-danger-hover: #921b28; --color-danger-border: #e8a1a8; --color-danger-tint: #fff4f4; }
@media (prefers-color-scheme: dark) {
  :root { --color-danger: #b42332; --color-danger-hover: #921b28; --color-danger-border: #98515c; --color-danger-tint: #352126; }
}
.danger-zone { padding: 24px; border: 1px solid var(--color-danger-border); border-radius: 18px; background: var(--color-danger-tint); display: grid; gap: 18px; }
.danger-zone h2 { margin: 0; font-size: 22px; color: var(--color-text); }
.danger-zone p { margin: 0; max-width: 48ch; color: var(--color-muted); line-height: 1.55; }
.family-kid-delete { margin-top: 40px; }
.button-danger { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; min-height: 48px; border: 2px solid var(--color-danger); border-radius: 999px; background: var(--color-danger); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; }
.button-danger:hover:not(:disabled) { background: var(--color-danger-hover); border-color: var(--color-danger-hover); }
.button-danger:focus-visible { outline: 3px solid var(--color-danger-border); outline-offset: 4px; }
.button-danger:disabled { opacity: .5; cursor: not-allowed; }

.family-kid-pets {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--color-muted);
  border-radius: 18px;
  background: var(--color-surface);
  display: grid;
  gap: 18px;
}

.family-kid-pets h2 {
  margin: 0;
  font-size: 22px;
  color: var(--color-text);
}

.avatar-upload-control { position: relative; width: fit-content; }
.avatar-upload-control input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.avatar-upload-control:focus-within .family-avatar {
  outline: 3px solid var(--color-link);
  outline-offset: 4px;
}
.avatar-camera {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-tint);
  border-radius: 50%;
  background: #ff4f9a;
  color: white;
  pointer-events: none;
}
.avatar-camera svg { width: 18px; height: 18px; }
.avatar-remove {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--color-link);
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}
.avatar-editor[aria-busy="true"] { opacity: 0.6; }

.kid-pet-badges {
  position: absolute;
  right: -2px;
  bottom: -3px;
  z-index: 2;
  display: flex;
}
.kid-pet-badge {
  display: block;
  width: 38px;
  height: 38px;
  margin-left: -10px;
  overflow: hidden;
  border: 3px solid var(--color-tint);
  border-radius: 50%;
  background: var(--color-tint);
  box-shadow: 0 1px 4px rgb(0 0 0 / 14%);
}
.kid-pet-badge img { width: 100%; height: 100%; object-fit: cover; }
.family-avatar-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 180px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #30262e;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}
.family-avatar-control:focus-visible .family-avatar-tooltip { opacity: 1; }
.family-avatar-group > li:focus-within { position: relative; z-index: 3; }
@media (hover: hover) {
  .family-avatar-control:hover .family-avatar-tooltip { opacity: 1; }
  .family-avatar-group > li:hover { position: relative; z-index: 3; }
}
.avatar-upload-control--kid .avatar-camera { top: 0; bottom: auto; }
@media (max-width: 760px) {
  .kid-pet-badge { width: 32px; height: 32px; border-width: 2px; }
}

/* Acknowledge the choice immediately while Turbo fetches the naming step. */
.signup-pet-confirm { touch-action: manipulation; }
.signup-pet-confirm[aria-busy="true"] {
  cursor: progress;
  opacity: 0.75;
}
.signup-pet-confirm[aria-busy="true"] [data-pet-picker-target="label"]::after {
  content: " …";
}

.chat-thread > button[data-chat-target="older"] {
  display: block;
  margin: 0 auto 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 18px;
  background: #f1f3f5;
  color: #505660;
  font: inherit;
  cursor: pointer;
}
.chat-thread > button[data-chat-target="older"][hidden] { display: none; }

.chat-new-messages {
  position: absolute;
  right: max(16px, calc((100% - 720px) / 2));
  bottom: calc(100% + 12px);
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid #ff4f9a;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 3px 12px #00000018;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.chat-new-messages[hidden] { display: none; }
.chat-new-messages:focus-visible { outline: 3px solid #ff4f9a; outline-offset: 3px; }

/* Reusable, side-by-side choice links */
.login-choice-main { min-height: calc(100dvh - 112px); display: flex; flex-direction: column; justify-content: center; padding: 48px 24px 100px; }
.login-choice-question { text-align: center; font-size: var(--font-size-large); font-weight: 800; line-height: 1.15; margin: 0 0 32px; }
.split-choice { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.split-choice-option { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; min-height: 280px; padding: 40px 16px; color: var(--color-text); text-decoration: none; }
.split-choice::after { content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 2px; transform: translateX(-50%); border-radius: 999px; background: linear-gradient(to bottom, transparent, var(--color-border-soft) 20%, color-mix(in srgb, var(--color-border-soft) 50%, var(--color-link)) 50%, var(--color-border-soft) 80%, transparent); pointer-events: none; }
.split-choice-option:hover { background: var(--color-tint); }
.split-choice-option:hover .split-choice-label, .split-choice-option:focus-visible .split-choice-label { color: var(--color-link); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.split-choice-option:focus-visible { outline: 3px solid var(--color-link); outline-offset: -3px; }
.split-choice-description { max-width: 24ch; font-size: var(--font-size-medium); line-height: 1.4; color: var(--color-muted); }
.split-choice-symbol { font-size: var(--font-size-display); line-height: 1; color: var(--color-link); }
.split-choice-label { font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif; font-size: var(--font-size-display); font-weight: 600; }
@media (max-width: 480px) {
  .login-choice-main { padding: 32px 16px 64px; }
  .login-choice-question { font-size: var(--font-size-medium); }
  .split-choice-label { font-size: var(--font-size-large); }
  .split-choice-description { font-size: var(--font-size-base); }
  .split-choice-option { min-height: 240px; padding: 32px 10px; }
}

.signup-action-bar--navigation { min-height: calc(88px + env(safe-area-inset-bottom)); }
.signup-action-bar--navigation .signup-action-brand { grid-row: 1; }

.form-select { position: relative; width: 100%; color: var(--color-link); }
.form-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 52px 12px 16px;
  font: inherit;
  font-size: var(--font-size-medium);
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-border-soft);
  border-radius: 12px;
  cursor: pointer;
}
.form-select select:hover { border-color: var(--color-link); }
.form-select select:focus-visible {
  border-color: var(--color-link);
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}
.form-select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.form-select select:disabled { opacity: .5; cursor: not-allowed; }
.form-select:has(select:disabled) .form-select-chevron { opacity: .5; }


/* Keep signup artwork inside the choice it describes */
.auth-choice-main { min-height: calc(100dvh - 112px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 120px; }
.auth-choice-main > .text-primary { margin-bottom: 32px; }
.auth-choice .split-choice-option { min-height: 280px; padding: 24px 16px; }
.auth-choice .split-choice-symbol { height: 84px; display: flex; align-items: center; }
.split-choice-pets { display: flex; align-items: center; justify-content: center; height: 84px; }
.split-choice-pet { display: block; width: 68px; transform: rotate(-10deg); }
.split-choice-pet:nth-child(2) { z-index: 1; margin: 0 -8px; transform: translateY(-4px); }
.split-choice-pet:last-child { transform: rotate(10deg); }
.split-choice-pet .pet-icon { width: 100%; height: 76px; }
.auth-choice .split-choice-label { font-size: var(--font-size-large); }
@media (max-width: 760px) {
  .auth-choice-main { min-height: calc(100dvh - 88px); padding: 24px 16px 110px; }
  .auth-choice .split-choice-option { min-height: 260px; padding: 20px 10px; }
  .split-choice-pet { width: 48px; }
  .split-choice-pet .pet-icon { height: 60px; }
}

/* An open, winding trail of benefits below the homepage hero */
.home-trail { width: min(100%, 1200px); margin: 0 auto; padding: 32px 32px 96px; }
.home-trail-intro { display: grid; gap: 12px; text-align: center; margin-bottom: 64px; }
.home-trail-intro .text-secondary span { display: inline-block; margin-left: 12px; }
.home-trail-stop { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.home-trail-copy { position: relative; display: grid; gap: 16px; padding: 20px 0; }
.home-trail-copy .text-primary { text-align: left; font-family: "Fredoka", ui-rounded, sans-serif; }
.home-trail-number { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border: 2px dashed var(--color-link); border-radius: 50%; color: var(--color-link); font-size: var(--font-size-medium); font-weight: 800; transform: rotate(-10deg); }
.home-trail-description { margin: 0; max-width: 440px; font-size: var(--font-size-base); line-height: 1.7; }
.home-trail-stop:nth-of-type(even) .home-trail-copy { grid-column: 2; grid-row: 1; }
.home-trail-stop:nth-of-type(even) .trail-scene { grid-column: 1; grid-row: 1; }
.home-trail-path { display: block; width: 100%; height: 160px; overflow: visible; }
.home-trail-path path { fill: none; stroke: var(--color-link); stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; opacity: .45; vector-effect: non-scaling-stroke; }
.home-trail-path--reverse { transform: scaleX(-1); }
.trail-scene { position: relative; min-width: 0; }
.trail-scene-art { position: relative; height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; isolation: isolate; }
.trail-scene-art::before { content: ""; position: absolute; inset: 12px 0; z-index: -1; background: var(--color-tint); border-radius: 43% 57% 62% 38% / 51% 43% 57% 49%; transform: rotate(-6deg); }
.trail-scene--games .trail-scene-art::before { background: var(--color-hero-background); transform: rotate(9deg); }
.trail-bubble { position: relative; max-width: 90%; padding: 16px 24px; border: 2px solid var(--color-border-soft); border-radius: 24px 24px 24px 4px; background: var(--color-surface); color: var(--color-text); font-size: var(--font-size-medium); font-weight: 700; line-height: 1.4; text-align: center; transform: rotate(-4deg); z-index: 2; }
.trail-bubble > span { color: var(--color-link); }
.trail-pet-party { display: flex; align-items: flex-end; justify-content: center; width: 100%; margin: 12px 0; }
.trail-pet-party img { width: 34%; max-width: 160px; transform: rotate(-12deg); }
.trail-pet-party img + img { margin-left: -24px; }
.trail-pet-party img:nth-child(2) { width: 40%; max-width: 190px; transform: translateY(-12px); z-index: 1; }
.trail-pet-party img:last-child { transform: rotate(12deg); }
.trail-sticker { display: inline-block; padding: 10px 18px; border: 2px solid var(--color-link); border-radius: 999px; background: var(--color-surface); color: var(--color-link); font-size: var(--font-size-base); font-weight: 700; transform: rotate(5deg); z-index: 2; text-align: center; }
.trail-scene--friends .trail-scene-art { height: auto; gap: 16px; }
.trail-scene--friends .trail-scene-art::before { content: none; }
.trail-treehouse { display: block; width: 100%; height: auto; }
.trail-notebook { position: absolute; top: 20px; left: 8%; display: grid; gap: 14px; padding: 28px 24px; width: 65%; border: 2px solid var(--color-border-soft); border-radius: 8px; background: repeating-linear-gradient(var(--color-surface) 0 31px, var(--color-border-soft) 31px 32px); font-family: "Fredoka", ui-rounded, sans-serif; font-size: var(--font-size-large); transform: rotate(-9deg); }
.trail-notebook-drawing { color: var(--color-link); white-space: nowrap; }
.trail-notebook-answer { color: var(--color-link); font-size: var(--font-size-display); }
.trail-notebook-answer > span { margin-left: 35%; }
.trail-scene-pet { width: 180px; height: 180px; object-fit: contain; }
.trail-scene--homework .trail-scene-pet { position: absolute; right: 0; bottom: 38px; transform: rotate(8deg); }
.trail-scene--homework .trail-bubble { position: absolute; bottom: 0; left: 5%; }
.trail-scene--games .trail-scene-pet { width: 210px; height: 210px; transform: rotate(-8deg); }
.trail-game-spark { position: absolute; right: 6%; top: 35%; color: var(--color-link); font-size: var(--font-size-hero); }
.trail-phone { width: 190px; min-height: 280px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; border: 3px solid var(--color-link); border-radius: 30px; background: var(--color-surface); transform: rotate(-10deg); }
.trail-phone-speaker { height: 5px; width: 45px; border-radius: 9px; background: var(--color-border-soft); }
.trail-phone-heart { color: var(--color-link); font-size: var(--font-size-display); }
.trail-phone-message { align-self: stretch; padding: 12px; background: var(--color-tint); border-radius: 12px 12px 12px 0; font-size: var(--font-size-base); }
.trail-phone-link { color: var(--color-link); font-size: var(--font-size-base); font-weight: 700; }
.trail-scene--access .trail-scene-pet { position: absolute; right: 0; bottom: 0; transform: rotate(12deg); }

@media (max-width: 760px) {
  .home-trail { padding: 24px 24px 64px; }
  .home-trail-intro { margin-bottom: 40px; }
  .home-trail-stop { grid-template-columns: 1fr; gap: 16px; }
  .home-trail-stop:nth-of-type(even) .home-trail-copy,
  .home-trail-stop:nth-of-type(even) .trail-scene { grid-column: auto; grid-row: auto; }
  .home-trail-copy { padding: 0; }
  .home-trail-path { height: 100px; margin: 16px 0; }
  .trail-scene { width: min(100%, 440px); margin: 0 auto; }
  .trail-scene-art { height: 320px; }
  .trail-bubble { padding: 12px 18px; }
  .trail-scene-pet { width: 150px; height: 150px; }
}

/* A family photo album at the end of the feature trail */
.home-story { background: var(--color-tint); border-top: 1px solid var(--color-border-soft); }
.home-story-inner { width: min(100%, 1200px); margin: 0 auto; padding: 72px 32px 96px; }
.home-story-heading { display: grid; gap: 16px; justify-items: center; text-align: center; margin-bottom: 56px; }
.home-story-intro { max-width: 540px; margin: 0; font-size: var(--font-size-base); line-height: 1.7; }
.home-story-content { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.home-story-photos { display: flex; align-items: center; padding: 12px 8px 28px; }
.home-story-photo { width: 55%; flex-shrink: 0; margin: 0; padding: 10px 10px 16px; background: var(--color-surface); border: 1px solid var(--color-border-soft); box-shadow: 0 12px 28px rgb(0 0 0 / 8%); transform: rotate(-7deg); }
.home-story-photo + .home-story-photo { width: 52%; margin-left: -7%; margin-top: 64px; transform: rotate(7deg); }
.home-story-photo img { display: block; width: 100%; height: auto; border-radius: 2px; }
.home-story-photo figcaption { padding-top: 12px; text-align: center; color: var(--color-muted); font-size: var(--font-size-small); }
.home-story-photo figcaption span { margin-left: 8px; color: var(--color-link); }
.home-story-people { display: grid; gap: 28px; }
.home-story-person > p { margin: 10px 0 0; font-size: var(--font-size-base); line-height: 1.7; }
@media (max-width: 760px) {
  .home-story-inner { padding: 48px 24px 64px; }
  .home-story-heading { margin-bottom: 24px; }
  .home-story-content { grid-template-columns: 1fr; gap: 28px; }
  .home-story-photos { max-width: 500px; width: 100%; margin: 0 auto; }
  .home-story-photo { padding: 7px 7px 12px; }
  .home-story-photo + .home-story-photo { margin-top: 40px; }
}

/* Parent updates along the feature trail */
.trail-updates-phone { transform: rotate(8deg); width: 200px; min-height: 300px; }
.trail-update-lines { display: grid; gap: 12px; width: 100%; padding: 8px; }
.trail-update-lines i { display: block; height: 8px; border-radius: 8px; background: var(--color-border-soft); }
.trail-update-lines i:last-child { width: 65%; }
.trail-update-summary { position: absolute; top: 48px; left: 0; }
.trail-update-alert { position: absolute; bottom: 24px; right: 0; transform: rotate(4deg); display: flex; align-items: center; gap: 12px; }
.trail-alert-symbol { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border: 2px solid var(--color-link); border-radius: 50%; }

/* One shared invitation after the family story */
.home-closing { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 0 24px 96px; text-align: center; }
.home-closing-trail { display: flex; flex-direction: column; align-items: center; color: var(--color-link); }
.home-closing-trail::before { content: ""; height: 64px; border-left: 3px dotted var(--color-border-soft); }
.home-closing-trail span { font-size: var(--font-size-display); line-height: 1; margin-top: 12px; }
.home-closing-pets { margin-top: 12px; }
.home-closing-pets .home-pet-character { width: 88px; height: 88px; cursor: default; }
.home-closing-pets .home-pet-character + .home-pet-character { margin-left: -22px; }
.home-closing-pets .home-pet-character:nth-child(odd) { transform: translateY(-8px) rotate(-7deg); }
.home-closing-pets .home-pet-character:nth-child(even) { transform: rotate(7deg); }
.home-closing .text-primary { max-width: 540px; font-family: "Fredoka", ui-rounded, sans-serif; }
.home-closing-description { max-width: 460px; margin: 0; font-size: var(--font-size-base); line-height: 1.7; }
.home-closing > .home-primary-signup { margin-top: 8px; }
.home-closing > .home-primary-signup:focus-visible { outline: 3px solid var(--color-link); outline-offset: 6px; }
@media (max-width: 760px) {
  .home-closing { padding-bottom: 64px; }
  .home-closing-pets .home-pet-character { width: 56px; height: 56px; }
  .home-closing-pets .home-pet-character + .home-pet-character { margin-left: -14px; }
}

.family-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.family-profile-header > turbo-frame { flex-shrink: 0; }
.family-profile-action { margin: 0 0 0 auto; min-width: 0; }
.family-profile-action .home-header-signup { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

.kid-chat-avatar-group {
  position: relative;
  display: block;
}

.kid-chat-avatar-group .chats-row-avatar {
  container-type: inline-size;
}

.kid-chat-avatar-group .chats-row-avatar img {
  width: 100%;
  height: 100%;
}

/* Unlisted pricing comparison */
.pricing-page { width: min(100%, 1120px); margin: 0 auto; padding: 48px 32px 96px; }
.pricing-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; margin-bottom: 48px; }
.pricing-intro-copy { display: grid; gap: 20px; }
.pricing-intro-copy > p:last-child { max-width: 440px; margin: 0; font-size: var(--font-size-base); line-height: 1.7; }
.pricing-intro-art { position: relative; isolation: isolate; min-width: 0; height: 320px; display: flex; align-items: center; }
.pricing-intro-art::before { content: ""; position: absolute; inset: 20px 8px; background: var(--color-hero-background); border-radius: 48% 52% 37% 63% / 52% 36% 64% 48%; transform: rotate(-8deg); z-index: -1; }
.pricing-intro-art .trail-pet-party { z-index: 1; transform: rotate(-5deg); }
.pricing-intro-art .trail-pet-party img { height: auto; }
.pricing-art-spark { position: absolute; right: 8%; top: 12px; color: var(--color-link); font-size: var(--font-size-hero); transform: rotate(12deg); }
.pricing-art-heart { position: absolute; left: 10%; top: 18px; color: var(--color-link); font-size: var(--font-size-display); transform: rotate(-15deg); }
.pricing-art-orbit { position: absolute; inset: 48px 4px 24px; border: 2px dashed var(--color-border-soft); border-radius: 50%; transform: rotate(14deg); z-index: -1; }
.pricing-table-frame { border: 2px solid var(--color-border-soft); border-radius: 24px; overflow: hidden; background: var(--color-surface); box-shadow: 0 8px 0 var(--color-tint); }
.pricing-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--font-size-base); }
.pricing-feature-column { width: 46%; }
.pricing-family-column { background: var(--color-tint); }
.pricing-caption { text-align: left; color: var(--color-muted); font-size: var(--font-size-small); padding: 16px 20px; background: var(--color-canvas); }
.pricing-table th, .pricing-table td { padding: 11px 20px; border-bottom: 1px solid var(--color-border-soft); }
.pricing-table thead th { vertical-align: top; text-align: center; padding-top: 20px; padding-bottom: 20px; border-top: 1px solid var(--color-border-soft); }
.pricing-table thead th:first-child { text-align: left; vertical-align: bottom; }
.pricing-table thead .text-secondary { display: block; }
.pricing-price { display: block; font-family: "Fredoka", ui-rounded, sans-serif; font-size: var(--font-size-display); color: var(--color-text); margin: 12px 0 4px; }
.pricing-unit { display: block; color: var(--color-muted); font-size: var(--font-size-small); font-weight: 400; }
.pricing-plan-description { display: block; margin-top: 10px; font-size: var(--font-size-base); font-weight: 400; line-height: 1.5; }
.pricing-table tbody th { text-align: left; font-weight: 400; line-height: 1.5; }
.pricing-table td { text-align: center; border-left: 1px solid var(--color-border-soft); }
.pricing-table thead th + th { border-left: 1px solid var(--color-border-soft); }
.pricing-table tbody tr:last-child > * { border-bottom: 0; }
.pricing-table .pricing-group th { background: var(--color-surface); color: var(--color-link); font-weight: 700; padding-top: 16px; padding-bottom: 10px; }
.pricing-status { color: var(--color-muted); font-size: var(--font-size-medium); }
.pricing-status--included { color: var(--color-link); font-weight: 800; }
.pricing-notes { display: grid; gap: 28px; margin-top: 48px; max-width: 680px; }
.pricing-notes p { font-size: var(--font-size-base); line-height: 1.7; margin: 8px 0 0; }
@media (max-width: 760px) {
  .pricing-page { padding: 32px 16px 64px; }
  .pricing-intro { grid-template-columns: 1fr; gap: 12px; text-align: center; margin-bottom: 28px; }
  .pricing-intro-copy { justify-items: center; gap: 16px; }
  .pricing-intro-art { width: min(100%, 380px); height: 240px; margin: 0 auto; }
  .pricing-table-frame { border-radius: 16px; }
  .pricing-feature-column { width: 44%; }
  .pricing-table th, .pricing-table td { padding: 10px 8px; }
  .pricing-table thead th { padding-inline: 8px; }
  .pricing-plan-description { font-size: var(--font-size-small); }
  .pricing-price { font-size: var(--font-size-large); }
  .pricing-table thead .text-secondary { overflow-wrap: anywhere; }
}

.outcomes-page { width: min(100%, 760px); margin: 0 auto; padding: 32px 24px 64px; }
.outcome-card { border: 1px solid var(--color-border-soft); border-radius: 20px; background: var(--color-surface); padding: 24px; margin: 24px 0; }
.outcome-detail { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.outcome-invite { width: 100%; padding: 12px; border: 1px solid var(--color-link); border-radius: 12px; font: inherit; color: var(--color-text); background: var(--color-surface); }
.outcomes-page form { margin: 16px 0; }

/* Pet science vignette with visible research citations */
.home-play { background: var(--color-surface); border-top: 1px solid var(--color-border-soft); }
.home-play-inner { max-width: 1200px; margin: 0 auto; padding: 48px 32px; }
.home-play-perspective { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.home-play-art { background: var(--color-hero-background); border-radius: 50%; }
.home-play-art img { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.home-play-copy { display: grid; gap: 20px; text-align: left; }
.home-play-copy .text-primary { text-align: left; max-width: 20ch; text-wrap: balance; }
.home-play-copy p, .home-play-copy h2 { margin: 0; }
.home-play-copy > p { font-size: var(--font-size-base); line-height: 1.6; text-wrap: pretty; }
.home-play-copy > .text-secondary { font-size: var(--font-size-medium); }
.home-play-evidence { border-top: 1px solid var(--color-border-soft); padding-top: 20px; }
.home-play-evidence a { color: var(--color-link); margin-left: 3px; }
.home-play-references { margin-top: 32px; border-top: 1px solid var(--color-border-soft); padding-top: 16px; color: var(--color-muted); font-size: var(--font-size-small); line-height: 1.6; }
.home-play-references ol { padding: 0; margin: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.home-play-references li { margin: 0; padding: 0; }
.home-play-references p { margin: 12px 0 0; text-wrap: pretty; }
@media (max-width: 760px) {
  .home-play-inner { padding: 32px 24px; }
  .home-play-perspective { grid-template-columns: 1fr; gap: 28px; }
  .home-play-art { max-width: 300px; margin: 0 auto; }
}

/* A conversation that becomes a little adventure */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.home-hero-copy { min-width: 0; }
.home-hero-action { flex-wrap: wrap; }
.home-hero-scene { position: relative; isolation: isolate; width: 100%; max-width: 480px; justify-self: center; }
.home-hero-scene::before { content: ""; position: absolute; z-index: -1; inset: 22% 0 2%; border-radius: 48% 52% 58% 42%; background: var(--color-hero-background); transform: rotate(-8deg); }
.home-hero-scene > img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 40px; }
  .home-hero-copy { text-align: center; }
  .home-hero-copy .hero-text { margin-inline: auto; }
  .home-hero-action { justify-content: center; }
  .home-hero-scene { max-width: 380px; }
}

/* Parent-first safety overview */
.safety-page { max-width: 1120px; margin: 0 auto; padding: 64px 32px; }
.safety-hero { max-width: 820px; margin-bottom: 48px; }
.safety-hero .hero-text { max-width: 820px; text-wrap: balance; }
.safety-hero > .text-secondary { margin: 0 0 20px; }
.safety-intro { max-width: 720px; margin: 28px 0 0; font-size: var(--font-size-medium); line-height: 1.6; text-wrap: pretty; }
.safety-foundation { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 32px; border: 2px solid var(--color-border-soft); border-radius: 28px; background: var(--color-hero-background); }
.safety-foundation .text-primary, .safety-footer .text-primary { text-align: left; margin: 0 0 16px; text-wrap: balance; }
.safety-page p { line-height: 1.7; }
.safety-foundation p { margin: 0; }
.safety-steps { display: grid; gap: 20px; align-content: center; list-style: none; margin: 0; padding: 0; }
.safety-steps li { display: flex; align-items: center; gap: 16px; font-weight: 700; }
.safety-step-number { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--color-surface); color: var(--color-link); border: 1px solid var(--color-link); }
.safety-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; margin: 56px 0; }
.safety-section { border-top: 1px solid var(--color-border-soft); padding-top: 20px; }
.safety-section-number { font-size: var(--font-size-small); color: var(--color-muted); }
.safety-section h2 { margin: 12px 0; }
.safety-section p { margin: 0; text-wrap: pretty; }
.safety-footer { border-top: 1px solid var(--color-border-soft); padding-top: 32px; }
.safety-footer p { max-width: 760px; }
.safety-links { display: flex; flex-wrap: wrap; gap: 16px 28px; }
@media (max-width: 760px) {
  .safety-page { padding: 40px 24px; }
  .safety-foundation { grid-template-columns: 1fr; padding: 24px; gap: 28px; }
  .safety-sections { grid-template-columns: 1fr; gap: 28px; margin: 36px 0; }
}

.pricing-intro-art--lemonade { height: auto; width: 100%; max-width: 460px; justify-self: center; }
.pricing-intro-art--lemonade > img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .pricing-intro-art--lemonade { max-width: 340px; height: auto; }
}

.home-header--safety > .public-header-center { display: flex; align-items: center; gap: 12px; position: absolute; left: 50%; transform: translateX(-50%); }
@media (max-width: 760px) {
  .home-header--safety > .public-header-center { display: none; }
}

.trail-scene--household .trail-scene-art::before { background: var(--color-hero-background); }
.trail-calendar { width: 64%; max-width: 280px; align-self: flex-start; margin-left: 8%; background: var(--color-surface); border: 3px solid var(--color-link); border-radius: 20px; overflow: hidden; transform: rotate(-9deg); }
.trail-calendar-heading { padding: 14px 16px; background: var(--color-tint); border-bottom: 2px solid var(--color-border-soft); font-size: var(--font-size-base); font-weight: 700; text-align: center; }
.trail-calendar-days { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 8px; color: var(--color-link); font-size: var(--font-size-medium); text-align: center; }
.trail-calendar-days span { padding: 4px; border-radius: 8px; background: var(--color-tint); }
.trail-household-message { align-self: flex-end; width: 72%; margin-top: -44px; transform: rotate(5deg); }
.trail-household-sticker { margin-top: 24px; transform: rotate(-3deg); }

.safety-alert-example { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; margin-top: 56px; }
.safety-alert-example .text-primary { text-align: left; text-wrap: balance; margin: 16px 0; }
.safety-alert-message { margin: 0; padding: 28px; background: var(--color-surface); border: 2px solid var(--color-border-soft); border-radius: 24px 24px 24px 6px; box-shadow: 0 6px 0 var(--color-tint); }
.safety-alert-message figcaption { font-size: var(--font-size-small); color: var(--color-muted); }
.safety-alert-message blockquote { margin: 16px 0 0; }
.safety-alert-message blockquote p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .safety-alert-example { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .safety-alert-message { padding: 24px; }
}

.design-link-examples { line-height: 1.7; }
.design-link-row { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 20px; background: var(--color-tint); border-radius: 16px; }
.design-link-hint { color: var(--color-muted); font-size: var(--font-size-small); }

.connection-link-caption { font-size: var(--font-size-small); color: var(--color-muted); }

.connection-chooser { margin-top: 24px; }
.connection-chooser > p { max-width: 640px; }
.connection-chooser-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; max-width: 760px; margin: 32px 0; }
.connection-kid-column { min-width: 0; border: 0; padding: 0; margin: 0; text-align: center; }
.connection-kid-column legend { width: 100%; padding: 0; overflow-wrap: anywhere; }
.connection-kid-list { display: grid; justify-items: center; gap: 24px; padding-top: 24px; }
.connection-kid-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; cursor: pointer; max-width: 100%; }
.connection-kid-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.connection-kid-choice input:checked + .family-avatar { outline: 4px solid var(--color-link); outline-offset: 4px; }
.connection-kid-choice input:focus-visible + .family-avatar { outline: 3px dashed var(--color-text); outline-offset: 8px; }
.connection-kid-choice input:checked ~ .connection-kid-name::after { content: " ✓"; color: var(--color-link); }
.connection-kid-name { font-weight: 700; overflow-wrap: anywhere; text-align: center; }
@media (max-width: 760px) {
  .connection-chooser-columns { gap: 24px; }
}

/* The family's central node leaves room for connected families around it. */
.parent-circle {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  padding: 48px 20px;
  min-height: 65svh;
}
.family-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border-radius: 32px;
  color: var(--color-text);
  text-decoration: none;
  transition: transform 150ms ease;
}
.family-cluster:hover { transform: translateY(-4px); }
.family-cluster:focus-visible { outline: 3px solid var(--color-link); outline-offset: 8px; }
.family-cluster-members {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 152px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.family-cluster-member { position: relative; margin: 0 -4px; }
.family-cluster-member:nth-child(even) { transform: translateY(-4px); }
.family-cluster .family-avatar { border-width: 2px; box-shadow: 0 3px 8px rgb(0 0 0 / 8%); }
.family-cluster-parents { padding-right: 12px; }
.family-cluster-parents .family-avatar { width: 56px; height: 56px; }
.family-cluster-kids { margin-top: -12px; padding-left: 12px; }
.family-cluster-kids .family-avatar { width: 42px; height: 42px; }
.family-cluster .family-add-icon { width: 20px; height: 20px; }
.family-cluster .kid-pet-badge { width: 20px; height: 20px; border-width: 2px; margin-left: -7px; }
.family-cluster-kids .family-cluster-member { z-index: 1; }
.family-cluster-caption { margin-top: 12px; color: var(--color-muted); font-size: var(--font-size-small); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .family-cluster { transition: none; } }

.family-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(360px, calc(100vw - 72px));
  min-height: min(360px, calc(100vw - 72px));
  margin: 32px 0;
}
.family-orbit-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.family-orbit-route { fill: none; stroke: var(--color-link); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; opacity: .35; }
.family-orbit-tree { position: absolute; width: 32px; height: 32px; object-fit: contain; transform: translate(-50%, -50%); pointer-events: none; }
.family-orbit-tree--1 { left: 73.333%; top: 12.222%; }
.family-orbit-tree--2 { left: 16.944%; top: 81.944%; }
.family-orbit-tree--3 { left: 84.722%; top: 72.222%; }
.family-orbit-slot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-canvas);
  color: var(--color-link);
  text-decoration: none;
  transform: translate(-50%, -50%);
}
.family-orbit-slot--1 { left: 16.667%; top: 16.667%; }
.family-orbit-slot--2 { left: 89.444%; top: 40.556%; }
.family-orbit-slot--3 { left: 32.778%; top: 90.556%; }
.family-orbit-slot--4 { left: 49%; top: 5%; }
.family-orbit-slot--5 { left: 85%; top: 82%; }
.family-orbit-connected { width: 96px; height: auto; min-height: 64px; }
.family-orbit-connected .family-cluster { padding: 4px; }
.family-orbit-connected .family-cluster:hover { transform: none; }
.family-orbit-connected .family-cluster-members { max-width: 88px; }
.family-orbit-connected .family-cluster-parents .family-avatar { width: 36px; height: 36px; font-size: var(--font-size-base); }
.family-orbit-connected .family-cluster-kids .family-avatar { width: 28px; height: 28px; font-size: var(--font-size-small); }
.family-orbit-connected .family-cluster-kids { margin-top: -8px; }
.family-orbit-connected .kid-pet-badge { width: 14px; height: 14px; }
.family-orbit:has(.family-orbit-slot--5) .family-orbit-tree--3 { left: 65%; top: 94%; }
.family-orbit-ghost { position: relative; display: block; width: 48px; height: 52px; }
.family-orbit-ghost span { position: absolute; width: 36px; height: 36px; border: 2px dashed var(--color-border-soft); border-radius: 50%; background: var(--color-canvas); }
.family-orbit-ghost span:last-child { display: grid; place-items: center; width: 28px; height: 28px; right: 0; bottom: 0; font-size: var(--font-size-base); }
.family-orbit-slot:hover .family-orbit-ghost span { border-color: var(--color-link); }
.family-orbit-slot:focus-visible { outline: 3px solid var(--color-link); outline-offset: 4px; }
.circle-share { margin-block: auto; }
.circle-share, .circle-share .text-primary, .circle-share .copy-field input { text-align: center; }
.circle-share > .family-profile-form { margin-inline: auto; }
.circle-share-hero { display: block; width: min(100%, 240px); height: auto; border-radius: 20px; margin: 0 auto 20px; }
.circle-share > p { margin-block: 12px 24px; }
.circle-share > .signup-phone-why { margin-top: 24px; }
.circle-share-action { display: flex; justify-content: center; margin-top: 32px; }
.circle-share-action > a { max-width: 100%; }
@media (max-width: 700px) {
  .circle-share { padding-block: 24px; }
  .circle-share-hero { width: 160px; margin-bottom: 16px; }
}

.copy-field { width: 100%; min-width: 0; }
.copy-field-control { position: relative; }
.copy-field-control input { padding-right: 56px; }
.copy-field-button {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  width: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-link);
  cursor: pointer;
}
.copy-field-button:hover { background: var(--color-tint); }
.copy-field-button:focus-visible { outline: 2px solid var(--color-link); outline-offset: -4px; }
.copy-field-status {
  position: absolute;
  inset: 2px 52px 2px 2px;
  display: flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: 10px 0 0 10px;
  background: var(--color-canvas);
  color: var(--color-link);
  font-weight: 700;
  pointer-events: none;
}
.copy-field-status:empty { visibility: hidden; }

.connection-page { margin-block: 0; text-align: center; }
.connection-page:has(.connection-map-form) { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
.connection-page-intro .text-primary { text-align: center; }
.connection-page-intro .circle-share-hero { width: 160px; margin: 0 auto 16px; }
.connection-map-form { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.connection-connect-all { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.connection-connect-all input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-link); cursor: pointer; }
.connection-map { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; width: 100%; }
.connection-map-column { display: flex; flex-direction: column; align-items: center; gap: 24px; min-width: 0; }
.connection-map-kid { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--color-text); font: inherit; cursor: pointer; position: relative; }
.connection-map-kid .family-avatar { width: 72px; height: 72px; }
.connection-kid-avatar { position: relative; display: block; }
.chats-current-kid .family-avatar { width: 56px; height: 56px; }
.chats-current-kid .kid-pet-badge { width: 24px; height: 24px; border-width: 2px; }
.chats-current-kid .family-avatar-tooltip { left: auto; right: calc(100% + 12px); top: 50%; bottom: auto; transform: translateY(-50%); }
.connection-map-kid[aria-pressed="true"] .family-avatar,
.connection-map-kid.connection-inspected .family-avatar,
.connection-map-kid.connection-match .family-avatar { outline: 3px solid var(--color-link); outline-offset: 5px; }
.connection-map-kid:focus-visible { outline: 2px solid var(--color-link); outline-offset: 8px; border-radius: 12px; }
.connection-map-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.connection-map-lines path { fill: none; stroke: var(--color-link); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.connection-map-lines .connection-line-outline { stroke: var(--parent-background); stroke-width: 11; opacity: 1; }
.connection-line { transition: opacity 120ms ease; }
.connection-line.is-muted { opacity: .16; }
.connection-line.is-inspected path:not(.connection-line-outline):not(.connection-line-hit) { stroke-width: 7; opacity: 1; }
.connection-map-lines .connection-line-hit { stroke: transparent; stroke-width: 22; pointer-events: stroke; cursor: pointer; }
.connection-line:focus { outline: none; }
.connection-map-lines .connection-line-poof { animation: connection-line-poof 400ms 180ms ease-out forwards; }
.connection-poof { fill: var(--color-link); opacity: 0; animation: connection-poof 400ms 180ms ease-out forwards; }
@keyframes connection-line-poof {
  to { filter: blur(2px); opacity: 0; }
}
@keyframes connection-poof {
  0% { opacity: .7; }
  100% { opacity: 0; transform: translate(var(--puff-x), var(--puff-y)); }
}
@media (prefers-reduced-motion: reduce) {
  .connection-map-lines .connection-line-poof { animation: none; opacity: 0; }
  .connection-poof { animation: none; }
}
.connection-map-form > .signup-pet-confirm { width: min(100%, 320px); }

/* A kid's home: their pet, their friends, and space to talk. */
.kid-home-workspace { flex: 1; min-height: 0; }
.kid-home-sidebar { width: min(100%, 720px); padding: 24px; }
.kid-pet-home { padding: 20px; margin-bottom: 32px; border: 2px solid var(--color-border, #ffd1e5); border-radius: 28px; background: var(--color-tint); }
.kid-pet-home h2, .kid-friends-home h2 { margin: 0 0 20px; }
.kid-pet-home .chats-row { padding: 0; border: 0; grid-template-columns: 88px minmax(0, 1fr); }
.kid-pet-home .chats-row-avatar { width: 88px; height: 88px; }
.kid-pet-home .chats-row-top { flex-wrap: wrap; }
.kid-pet-home .chats-row + .chats-row { margin-top: 24px; }
.kid-pet-home .chats-row-preview { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kid-home-caption { font-size: var(--font-size-small); font-weight: 400; color: var(--color-muted); }
.kid-pet-invitation { display: flex; align-items: center; flex-direction: column; gap: 12px; text-align: center; color: inherit; text-decoration: none; }
.kid-pet-invitation img { width: 160px; height: auto; }
.kid-conversation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kid-conversation-grid .chats-row { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 12px; border: 2px solid transparent; border-radius: 24px; text-align: center; min-width: 0; }
.kid-conversation-grid .chats-row:hover, .kid-conversation-grid .chats-row:focus-visible { background: var(--color-tint); border-color: var(--color-link); }
.kid-conversation-grid .chats-row-avatar { width: 80px; height: 80px; }
.kid-conversation-grid .chats-row-copy { width: 100%; min-width: 0; }
.kid-conversation-grid .chats-row-top { flex-direction: column; gap: 4px; }
.kid-conversation-grid .chats-row-name { max-width: 100%; overflow-wrap: anywhere; }
.kid-conversation-grid .chats-row-bottom { display: block; }
.kid-conversation-grid .chats-row-preview { font-size: var(--font-size-small); font-weight: 400; margin-top: 6px; }
.kid-conversation-grid .chats-unread-badge { position: absolute; top: 12px; right: 12px; }
.kid-conversation-grid .chats-row--unread { background: var(--color-tint); }
.kid-conversation-pane { display: none; }
@media (min-width: 1024px) {
  .kid-home-page { height: 100dvh; min-height: 0; overflow: hidden; }
  .kid-home-workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); overflow: hidden; }
  .kid-home-sidebar { overflow-y: auto; width: 100%; border-right: 2px solid #ffd1e5; margin: 0; }
  .kid-conversation-pane { display: block; height: 100%; min-height: 0; overflow: hidden; }
  .kid-conversation-welcome { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
  .kid-conversation-welcome img { width: min(280px, 70%); height: auto; margin-bottom: 24px; }
  .kid-home-workspace .chat-page { position: relative; inset: auto; height: 100%; max-height: 100%; min-height: 0; }
  .kid-home-workspace .chat-page .app-header { min-height: 80px; padding: 16px; }
  .kid-conversation-pane .public-header-back { display: none; }
  .kid-home-workspace .chat-thread { padding: 20px; }
}

/* Shared inbox: a pinned pet and recent conversations on every screen. */
.kid-home-sidebar { padding: 0; }
.kid-home-sidebar .kid-pet-home { position: sticky; top: 0; z-index: 2; margin: 0; padding: 0; border: 0; border-bottom: 2px solid var(--color-border-soft); border-radius: 0; background: var(--color-canvas); }
.kid-home-sidebar .kid-pet-home h2, .kid-home-sidebar .kid-friends-home h2 { margin: 0 12px 8px; }
.kid-home-sidebar .kid-conversation-grid { display: block; }
.kid-home-sidebar .chats-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 12px; border: 0; border-radius: 0; text-align: left; margin: 0; }
.kid-home-sidebar .chats-row + .chats-row { margin-top: 0; }
.kid-home-sidebar .chats-row-avatar { width: 52px; height: 52px; }
.kid-home-sidebar .kid-pet-badge { width: 22px; height: 22px; border-width: 2px; }
.kid-home-sidebar .chats-row-top { flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 8px; }
.kid-home-sidebar .chats-row-name { font-size: var(--font-size-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kid-home-sidebar .chats-row-bottom { display: flex; align-items: center; gap: 8px; }
.kid-home-sidebar .chats-row-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: var(--font-size-base); font-weight: 400; margin: 4px 0 0; }
.kid-home-sidebar .chats-unread-badge { position: static; flex-shrink: 0; }
.kid-home-sidebar .chats-row--unread .chats-row-preview { font-weight: 700; }
.kid-home-sidebar .chats-row--unread { background: transparent; }
.kid-home-sidebar .chats-row:hover, .kid-home-sidebar .chats-row:focus-visible { background: var(--color-tint); }
.kid-home-sidebar .chats-row.is-selected { background: var(--color-tint); box-shadow: inset 3px 0 var(--color-link); }
.kid-home-sidebar .kid-pet-invitation { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 12px; text-align: left; border-radius: 0; }
.kid-home-sidebar .kid-pet-invitation:hover { background: var(--color-tint); }
.kid-home-sidebar .kid-pet-invitation .home-pet-stack { margin-bottom: 0; }
.kid-pet-invitation .home-pet-character { width: 52px; height: 52px; }
.kid-pet-invitation .home-pet-character + .home-pet-character { margin-left: -10px; }
.kid-pet-invitation .home-pet-speech { top: calc(100% + 8px); bottom: auto; transform-origin: center top; }
.kid-pet-invitation .home-pet-speech::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #111; }
.kid-home-sidebar .kid-pet-invitation .home-pet { width: 100%; height: 100%; }
.kid-home-sidebar .kid-pet-invitation .text-primary { font-size: var(--font-size-base); text-align: left; }


@media (max-width: 1023px) {
  .kid-home-page { height: 100dvh; min-height: 0; overflow: hidden; }
  .kid-home-workspace { overflow: hidden; }
  .kid-home-sidebar { height: 100%; overflow-y: auto; }
}

.public-nav--menu-always .portal-header-actions { display: none; }
.public-nav--menu-always .public-header-mobile-controls { display: flex; align-items: center; gap: 8px; grid-column: 3; grid-row: 1; justify-self: end; }
.public-nav--menu-always .public-header-menu { display: inline-flex; }
.public-nav--menu-always .public-nav-overlay:not([hidden]) { display: flex !important; }

.chat-header-person .kid-chat-avatar-group .chats-row-avatar { width: var(--chat-avatar-size); height: var(--chat-avatar-size); }
.chat-header-person .kid-pet-badge { width: 22px; height: 22px; border-width: 2px; }
@media (max-width: 760px) {
  .chat-header-person .kid-pet-badge { width: 18px; height: 18px; }
}

.kid-pet-invitation-copy { display: grid; gap: 4px; color: inherit; text-decoration: none; }

/* Keep conversation headers consistent across pet and friend chats. */
@media (min-width: 1024px) {
  .chat-page .chat-header-person { flex-direction: row; gap: 10px; }
  .kid-home-workspace .chat-page--pet > .public-nav .public-header-back { visibility: hidden; }
}

/* Compact type scale for the kids' inbox and conversations. */
.kid-home-page, .chat-page, .kid-profile-page {
  --font-size-base: 14px;
  --font-size-medium: 16px;
  --font-size-large: 22px;
  --font-size-display: 32px;
  font-size: var(--font-size-base);
}
.kid-home-page > .public-nav > .app-header,
.kid-profile-page > .public-nav > .app-header { height: 80px; min-height: 80px; padding-block: 12px; }
.kid-home-page .chats-current-kid .family-avatar,
.kid-profile-page .chats-current-kid .family-avatar { width: 44px; height: 44px; }
.kid-home-sidebar .chats-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px; }
.kid-home-sidebar .chats-row-avatar { width: 44px; height: 44px; }
.kid-home-sidebar .kid-pet-badge { width: 18px; height: 18px; }
.kid-home-sidebar .kid-pet-invitation .home-pet-character { width: 44px; height: 44px; }
.chat-page .chat-bubble { padding: 10px 12px; }
.chat-page .chat-composer-input, .chat-page .chat-composer-send { min-height: 44px; }
.chat-page .chat-composer-input { padding: 10px 14px; }
.chat-page .chat-composer-send { font-size: var(--font-size-base); }
@media (min-width: 1024px) {
  .chat-page .chat-composer-input { font-size: var(--font-size-base); }
  .kid-home-workspace .chat-page > .public-nav .app-header { height: 64px; min-height: 64px; padding-block: 8px; }
  .chat-page .chat-header-person { --chat-avatar-size: 40px; }
}

/* Reactions stay with their message; the native dialog works with touch and keyboards. */
.chat-bubble-wrap { position: relative; max-width: 100%; min-width: 0; }
.chat-bubble-wrap:has(.chat-reaction) { margin-top: 16px; }
.chat-reactions { position: absolute; top: 0; right: -6px; transform: translateY(-50%); z-index: 1; display: flex; gap: 4px; align-items: center; }
.chat-message--mine .chat-reactions { right: auto; left: -6px; }
.chat-reaction { font: inherit; border: 1px solid var(--color-border-soft); border-radius: 999px; padding: 3px 9px; min-height: 32px; background: var(--color-canvas); cursor: pointer; color: var(--color-muted); }
.chat-reaction[aria-pressed="true"] { background: var(--color-tint); border-color: var(--color-link); }
.reaction-dialog { margin: auto; width: min(370px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 12px; border: 2px solid var(--color-border-soft); border-radius: 20px; background: var(--color-canvas); color: var(--color-text); box-shadow: 0 10px 40px #0002; }
.reaction-dialog::backdrop { background: #20101a33; }
.reaction-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reaction-dialog-heading button, .reaction-quick button, .reaction-remove { font: inherit; color: var(--color-link); border: 0; background: transparent; cursor: pointer; border-radius: 10px; min-height: 44px; min-width: 44px; }
.reaction-quick { display: flex; flex-wrap: wrap; gap: 2px; margin-block: 8px; }
.reaction-quick button { font-size: var(--font-size-large); }
.reaction-quick button:hover, .reaction-quick button[aria-pressed="true"] { background: var(--color-tint); }
.reaction-dialog emoji-picker { width: 100%; height: min(360px, 55dvh); --background: var(--color-canvas); --border-color: var(--color-border-soft); --input-font-size: var(--font-size-base); }
.reaction-feedback { font-size: var(--font-size-small); color: var(--color-muted); margin: 8px 0 0; }
.reaction-feedback:empty { display: none; }
.chat-message { position: relative; }

.chat-reactions:empty { display: none; }
.chat-bubble[role="button"] { touch-action: pan-y; -webkit-touch-callout: none; user-select: none; cursor: pointer; }
.chat-bubble[role="button"]:focus-visible { outline: 2px solid var(--color-link); outline-offset: 3px; }

/* Parent navigation uses the existing mobile menu on tablets as well. */
@media (max-width: 1024px) {
  .public-nav--menu-tablet .portal-header-actions,
  .public-nav--menu-tablet .public-header-logout { display: none; }
  .public-nav--menu-tablet .public-header-mobile-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .public-nav--menu-tablet .public-header-menu { display: inline-flex; }
  .public-nav--menu-tablet .public-nav-overlay:not([hidden]) { display: flex !important; }
}

.trail-scene--parent_control .trail-scene-art,
.trail-scene--parent_updates .trail-scene-art { height: auto; }
.trail-scene--parent_control .trail-scene-art::before,
.trail-scene--parent_updates .trail-scene-art::before { content: none; }
.trail-parent-illustration { display: block; width: 100%; height: auto; }

.push-notifications { margin: 16px 24px; }
.push-notifications button { border: 0; background: transparent; padding: 0; cursor: pointer; }

/* Keep the invitation scrollable inside the desktop conversation pane. */
.kid-conversation-pane .kid-friend-page { height: 100%; min-height: 0; overflow-y: auto; }

.notification-menu { position: relative; }
.notification-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--color-link); cursor: pointer; list-style: none; border-radius: 50%; }
.notification-bell::-webkit-details-marker { display: none; }
.notification-bell:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.notification-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); }
.notification-dot[hidden] { display: none; }
.notification-popover { position: absolute; top: calc(100% + 12px); right: 0; z-index: 30; width: min(280px, calc(100vw - 48px)); padding: 20px; border: 2px solid var(--color-border-soft); border-radius: 20px; background: var(--color-canvas); box-shadow: 0 8px 24px #0001; }
.notification-popover p { margin: 0 0 12px; }

/* Keep conversation headers beneath the inbox navigation and its popovers. */
.kid-home-workspace { position: relative; z-index: 0; isolation: isolate; }

.chat-bubble { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 4px; }
.chat-bubble p { min-width: 0; max-width: 100%; }
.chat-bubble-time { display: block; align-self: flex-end; margin-left: auto; text-align: right; font-size: var(--font-size-small); font-weight: 400; line-height: 1.2; opacity: 0.75; white-space: nowrap; }

.chat-day-separator { align-self: center; margin: 16px 0 12px; text-align: center; }
.chat-day-separator time { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--color-tint); color: var(--color-muted); font-size: var(--font-size-small); font-weight: 400; line-height: 1.4; }

.kid-chats-heading { display: flex; align-items: center; gap: 16px; }
.kid-compose { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--color-link); border-radius: 50%; }
.kid-compose:hover { background: var(--color-tint); }
.kid-compose:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }

.composition-to { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 66px; padding: 10px 20px; border-bottom: 2px solid var(--color-border-soft); position: relative; z-index: 2; }
.composition-chips { display: contents; }
.composition-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--color-tint); color: var(--color-link); font: inherit; cursor: pointer; }
.composition-chip .chats-row-avatar { width: 28px; height: 28px; }
.composition-search { flex: 1; min-width: 100px; width: 120px; border: 0; background: transparent; color: var(--color-text); font: inherit; padding: 8px; }
.composition-picker { position: absolute; top: 100%; right: 16px; width: min(320px, calc(100% - 32px)); max-height: 280px; overflow-y: auto; padding: 8px; border: 2px solid var(--color-border-soft); border-radius: 16px; background: var(--color-surface); box-shadow: 0 8px 24px #0001; }
.composition-picker .chats-row { width: 100%; border: 0; background: transparent; color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.composition-picker .chats-row[hidden] { display: none; }

.composition-add { flex-shrink: 0; border: 2px solid var(--color-link); background: var(--color-surface); cursor: pointer; }
.composition-add:hover { background: var(--color-tint); }
.composition-picker .chats-row { display: flex; align-items: center; gap: 6px; padding: 4px 10px; min-height: 36px; margin: 0; border-radius: 10px; }
.composition-picker .chats-row:hover { background: var(--color-tint); }
.composition-picker .chats-row-avatar { width: 28px; height: 28px; font-size: var(--font-size-base); flex-shrink: 0; }
.composition-picker .kid-pet-badge { width: 16px; height: 16px; }

.kid-sidebar-compose { display: flex; align-items: center; justify-content: flex-end; height: 64px; min-height: 64px; padding: 8px 16px; border-bottom: 2px solid var(--color-border-soft); }
.kid-home-sidebar .kid-pet-home { position: static; }
.composition-chip .kid-pet-badge { width: 12px; height: 12px; border-width: 1px; }
.group-chat-avatar { position: relative; display: block; width: 44px; height: 44px; flex-shrink: 0; }
.group-chat-avatar-member { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--color-link); border-radius: 50%; background: var(--color-tint); color: var(--color-link); font-size: var(--font-size-small); font-weight: 700; overflow: hidden; }
.group-chat-avatar-member img { width: 100%; height: 100%; object-fit: cover; }
.group-chat-avatar-member:nth-child(1) { top: 0; left: 0; z-index: 1; }
.group-chat-avatar-member:nth-child(2) { top: 8px; left: 16px; z-index: 2; }
.group-chat-avatar-member:nth-child(3) { top: 20px; left: 4px; z-index: 3; }

.kid-home-sidebar .kid-pet-home .chats-row { min-height: 64px; }

.composition-picker-empty { margin: 0; padding: 10px; }

/* Preserve message space above the keyboard, including installed iPhone apps. */
@media (max-width: 1023px) {
  .chat-page > .public-nav > .app-header { height: 56px; min-height: 56px; padding: 6px 16px; }
  .chat-page .chat-header-person { --chat-avatar-size: 32px; }
  .chat-page .chat-composer { padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .chat-page.chat-keyboard-open .chat-composer { padding-bottom: 8px; }
  .chat-page .chat-composer-send { padding: 10px 16px; }
  .chat-page .chat-thread { padding: 12px; }
}

/* Floating conversation controls let messages pass behind the mobile header. */
@media (max-width: 1023px) {
  .conversation-header > .public-nav > .app-header {
    height: 56px;
    min-height: 56px;
    padding: 6px 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
    pointer-events: none;
  }
  .conversation-header .public-header-back,
  .conversation-header .chat-header-person {
    pointer-events: auto;
    background: color-mix(in srgb, var(--color-canvas) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
  }
  .conversation-header .public-header-back { padding: 8px 12px; gap: 0; }
  .conversation-header .public-header-back span:not(.signup-back-arrow) { display: none; }
  .conversation-header .chat-header-person { padding: 4px 10px 4px 4px; gap: 8px; }
  .chat-page[data-controller="chat"] .chat-thread { padding-top: 68px; scroll-padding-top: 68px; }
}

.conversation-header { display: contents; }
@media (min-width: 1024px) {
  .kid-home-workspace .conversation-header .app-header { height: 64px; min-height: 64px; padding-block: 8px; }
}
.composition-to[hidden], .composition-group-heading[hidden] { display: none; }
.composition-group-heading { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--color-text); font: inherit; font-weight: 700; }
.composition-people { border: 1px solid var(--color-border-soft); border-radius: 999px; padding: 6px 12px; background: color-mix(in srgb, var(--color-canvas) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (max-width: 1023px) {
  .composition-group .composition-group-heading { flex-direction: column; gap: 4px; pointer-events: auto; }
  .composition-group .conversation-header .app-header { height: 96px; min-height: 96px; align-items: start; }
  .composition-group .chat-thread { padding-top: 108px; }
  .composition-group .composition-to:not([hidden]) { margin-top: 100px; }
}
@media (max-width: 1023px) {
  [data-controller="composition"]:not(.composition-group) .conversation-header .app-header { position: relative; background: var(--color-canvas); border-bottom: 2px solid var(--color-border-soft); pointer-events: auto; }
}
.group-chat-avatar[data-count="4"] .group-chat-avatar-member,
.group-chat-avatar[data-count="5"] .group-chat-avatar-member { width: 24px; height: 24px; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(1),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(1) { top: 0; left: 0; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(2),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(2) { top: 0; left: 20px; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(3),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(3) { top: 20px; left: 0; }
.group-chat-avatar-member:nth-child(4) { top: 20px; left: 20px; z-index: 4; }
.group-chat-avatar-member:nth-child(5) { top: 10px; left: 10px; z-index: 5; }

/* Loose bubble clusters rather than a tiled arrangement. */
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(1),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(1) { width: 27px; height: 27px; top: -2px; left: 2px; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(2),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(2) { width: 22px; height: 22px; top: 7px; left: 24px; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(3),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(3) { width: 25px; height: 25px; top: 23px; left: 15px; }
.group-chat-avatar[data-count="4"] .group-chat-avatar-member:nth-child(4),
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(4) { width: 21px; height: 21px; top: 18px; left: -4px; }
.group-chat-avatar[data-count="5"] .group-chat-avatar-member:nth-child(5) { width: 19px; height: 19px; top: -5px; left: 26px; }

.kid-home-sidebar .kid-pet-home { border-bottom: 0; }
.kid-home-sidebar .chats-row { border-bottom: 1px solid color-mix(in srgb, var(--color-border-soft) 40%, transparent); }
.kid-home-sidebar .chats-row:hover,
.kid-home-sidebar .chats-row:focus,
.kid-home-sidebar .chats-row:focus-visible { border-color: transparent; border-bottom-color: color-mix(in srgb, var(--color-border-soft) 40%, transparent); outline: none; }
.kid-home-sidebar .chats-row:focus-visible .chats-row-copy { text-decoration: underline; text-decoration-color: var(--color-link); text-underline-offset: 4px; }
.kid-home-sidebar .chats-row:hover,
.kid-home-sidebar .chats-row:hover .chats-row-copy,
.kid-home-sidebar .chats-row:hover .chats-row-name { text-decoration: none; }
