/* New Transport WEB: brand kit in fonts/new-transport/ (SVG). For Chrome/Edge, add matching
   .woff2 files in the same folder and list them before the svg line in each @font-face src. */
@font-face {
  font-family: "New Transport WEB";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    local("New Transport WEB"),
    url("fonts/new-transport/NewTransport-RegularWEB.svg#font") format("svg");
}

@font-face {
  font-family: "New Transport WEB";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src:
    local("New Transport WEB Italic"),
    url("fonts/new-transport/NewTransport-ItalicWEB.svg#font") format("svg");
}

@font-face {
  font-family: "New Transport WEB";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src:
    local("New Transport WEB Light Italic"),
    url("fonts/new-transport/NewTransport-LightItalicWEB.svg#font") format("svg");
}

@font-face {
  font-family: "New Transport WEB";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src:
    local("New Transport WEB Medium"),
    url("fonts/new-transport/NewTransport-MediumWEB.svg#font") format("svg");
}

@font-face {
  font-family: "New Transport WEB";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src:
    local("New Transport WEB Medium"),
    url("fonts/new-transport/NewTransport-MediumWEB.svg#font") format("svg");
}

@font-face {
  font-family: "New Transport WEB";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    local("New Transport WEB Bold"),
    url("fonts/new-transport/NewTransport-BoldWEB.svg#font") format("svg");
}

:root {
  --sand: #edeae7;
  --pattern-size: 280px;
  --pattern-url: url("assets/images/Nuna_ProductPatterns_Strollers_Full.png");
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #e8e4e0;
  --content-max: 430px;
  --text: #111c49;
  --muted: #4a5475;
  --muted-light: #6b7394;
  --accent: #111c49;
  --nuna-soft: rgba(17, 28, 73, 0.08);
  --peer-bar: #3d4d8f;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(17, 28, 73, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --scrollbar-size: 6px;
  --scrollbar-thumb: rgba(17, 28, 73, 0.32);
  --scrollbar-thumb-hover: rgba(17, 28, 73, 0.52);
  --scrollbar-track: transparent;
  --font-body: "New Transport WEB", "Helvetica Neue", Helvetica, Arial, "Liberation Sans",
    sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-frame {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--safe-top) 0 0;
  background: var(--bg);
  overflow: hidden;
}

@media (min-width: 768px) {
  html {
    min-height: 100%;
    background-color: var(--sand);
    background-image: var(--pattern-url);
    background-repeat: repeat;
    background-size: var(--pattern-size) auto;
    background-position: center top;
    background-blend-mode: screen;
  }

  body {
    background: transparent;
  }

  .app-frame {
    position: relative;
    z-index: 1;
    box-shadow:
      -1px 0 0 rgba(17, 28, 73, 0.06),
      1px 0 0 rgba(17, 28, 73, 0.06),
      0 0 48px rgba(17, 28, 73, 0.04);
  }
}

.app-header {
  padding: 1rem 1.25rem 0.75rem;
  flex-shrink: 0;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.header-brand__logo {
  display: block;
  width: auto;
  height: 1.35rem;
  max-width: 5.5rem;
}

.header-row--nav[hidden] {
  display: none;
}

.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--surface2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(17, 28, 73, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-switcher__trigger .fa-globe {
  font-size: 0.95rem;
}

.lang-switcher__trigger:hover {
  border-color: rgba(17, 28, 73, 0.35);
}

.lang-switcher__trigger:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 9.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lang-switcher__menu[hidden] {
  display: none;
}

.lang-switcher__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-switcher__option:hover,
.lang-switcher__option.is-active {
  background: var(--nuna-soft);
  color: var(--accent);
}

.lang-switcher__option:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
  margin-top: 0.65rem;
}

.back-header {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.step-dots {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid rgba(17, 28, 73, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}

.step-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
}

.step-dot.is-done {
  background: var(--peer-bar);
  border-color: var(--peer-bar);
  opacity: 0.85;
}

.app-main {
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem 1rem;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.screen-stage {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  view-transition-name: app-screen;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.screen-stage::-webkit-scrollbar {
  width: var(--scrollbar-size);
}

.screen-stage::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  margin: 0.35rem 0;
}

.screen-stage::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.screen-stage::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

.app-main.is-welcome {
  padding-bottom: 0;
}

.app-main.is-welcome .screen-stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-main.is-transitioning .screen-stage {
  overflow: hidden;
  contain: paint;
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}

.welcome-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.welcome-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 1rem 0;
}

.app-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  padding: 0.75rem 1.25rem calc(0.75rem + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 88%, rgba(255, 255, 255, 0.96));
  border-top: 1px solid var(--surface2);
  box-shadow: 0 -6px 20px rgba(17, 28, 73, 0.05);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-inner.is-row {
  flex-direction: row;
  gap: 0.65rem;
}

.footer-inner.is-row .btn-secondary {
  flex: 0 0 auto;
}

.footer-inner.is-row .btn-primary {
  flex: 1;
}

h1,
.h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  margin: 0 0 0.75rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2,
.h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0 0 0.65rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

.lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 1.25rem;
}

.welcome-hero {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--surface2);
  background: var(--surface);
}

.welcome-hero.media-frame.is-loading {
  min-height: 10rem;
}

.welcome-hero.media-frame.is-loaded {
  background: var(--surface);
}

.welcome-hero__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
}

.welcome-title {
  text-align: center;
  margin: 0;
  font-size: clamp(2.59rem, 8.4vw, 3.29rem);
  line-height: 0.96;
  white-space: pre-line;
}

.welcome-disclaimer {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted-light);
  text-align: center;
  margin: 0;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--surface2);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.question-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.choice-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 48px;
}

.choice-card--with-visual {
  padding: 0;
  overflow: hidden;
}

.choice-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--surface2);
}

.choice-card-visual--placeholder {
  background: linear-gradient(152deg, var(--surface2) 0%, #d8d4cf 45%, #f2f0ed 100%);
}

.choice-card-visual--with-fa {
  background: linear-gradient(180deg, #f4f2ef 0%, var(--surface) 100%);
}

.choice-card-visual--image {
  display: block;
  padding: 0;
  min-height: 0;
  max-height: 120px;
  height: 120px;
  overflow: hidden;
  background: transparent;
}

.choice-card-visual--image.is-loading {
  background: var(--surface2);
}

.choice-card-img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: center;
}

/* Image skeleton loading */
.media-frame {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.media-frame__skeleton {
  display: none;
}

.media-frame.is-loading .media-frame__skeleton {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    110deg,
    var(--surface2) 0%,
    #ece8e4 20%,
    #f6f4f1 40%,
    var(--surface2) 60%
  );
  background-size: 220% 100%;
  animation: media-skeleton-shimmer 1.4s ease-in-out infinite;
}

.welcome-hero.is-loading .media-frame__skeleton {
  background: linear-gradient(
    110deg,
    var(--surface) 0%,
    #f4f2ef 20%,
    #faf9f7 40%,
    var(--surface) 60%
  );
  background-size: 220% 100%;
}

.media-frame__img {
  position: relative;
  z-index: 2;
  transition: opacity 0.28s ease;
}

.media-frame.is-loading .media-frame__img {
  opacity: 0;
}

.media-frame.is-loaded .media-frame__img {
  opacity: 1;
}

.media-frame.is-error .media-frame__skeleton {
  display: none;
}

.media-frame.is-error::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%236b7394' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E")
    center / 2rem no-repeat;
}

@keyframes media-skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.choice-card-fa {
  font-size: 1.9rem;
  color: var(--muted);
  opacity: 0.48;
  line-height: 1;
}

.choice-card.is-selected .choice-card-fa {
  opacity: 0.9;
  color: var(--accent);
}

.choice-card-copy {
  display: block;
}

.choice-card--with-visual .choice-card-copy {
  padding: 1rem 1.1rem 1.05rem;
}

.choice-card-label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.choice-card:hover {
  border-color: rgba(17, 28, 73, 0.35);
}

.choice-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-card.is-selected {
  border-color: var(--accent);
  background: var(--nuna-soft);
  box-shadow: var(--shadow);
}

.choice-card-desc {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.45;
}

.why-trigger {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.45rem 0.15rem;
  font-family: inherit;
  border-radius: var(--radius);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.why-trigger:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.why-trigger__icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.why-trigger__icon .fa-question {
  font-size: 0.95rem;
  line-height: 1;
}

.why-trigger__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--peer-bar);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.why-body {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary:not(:disabled):active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--surface2);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0;
}

.btn-text:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.results-intro {
  margin-bottom: 1.25rem;
}

.result-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.result-card--primary {
  border-color: rgba(17, 28, 73, 0.28);
}

.result-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--surface);
  background: var(--accent);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin: 0;
}

.result-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.result-media-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
}

.result-media-link:hover {
  opacity: 0.92;
}

.result-media-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.results-store-link {
  margin: calc(var(--space-unit) * 3) 0 0;
  text-align: center;
}

.results-store-link a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.results-store-link a:hover {
  color: var(--peer-bar);
}

.result-media--bg-pattern {
  background-color: var(--sand);
  background-image: var(--pattern-url);
  background-repeat: repeat;
  background-size: 140px auto;
  background-position: center;
  background-blend-mode: screen;
}

.result-media--bg-soft {
  background: linear-gradient(155deg, #f0eeeb 0%, var(--nuna-soft) 45%, rgba(61, 77, 143, 0.16) 100%);
}

.result-media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.75rem;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.result-media__fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 100%;
  background: linear-gradient(145deg, var(--surface2) 0%, #d4cfc8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
}

.result-media__fallback[hidden] {
  display: none !important;
}

.result-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.result-title {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.spec-grid {
  display: grid;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.spec-grid dt {
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.spec-grid dd {
  margin: 0;
}

.bullet-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.bullet-list li {
  margin-bottom: 0.45rem;
}

.disclaimer {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--nuna-soft);
  border: 1px solid rgba(17, 28, 73, 0.2);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.disclaimer strong {
  color: var(--text);
}

.restart-wrap {
  margin-top: 1.25rem;
  text-align: center;
}

.results-promo {
  margin-top: 2rem;
  padding: 1.15rem 1.15rem 1rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(17, 28, 73, 0.22);
  background: linear-gradient(165deg, rgba(17, 28, 73, 0.04) 0%, var(--surface) 58%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-promo__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peer-bar);
}

.results-promo__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.results-promo__lead {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--muted);
}

.results-promo__media {
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
}

.results-promo__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.65rem;
  box-sizing: border-box;
}

/* Screen transitions (View Transitions API + CSS fallback) */
:root {
  --vt-duration: 0.34s;
  --vt-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes vt-slide-in-right {
  from {
    transform: translate3d(100%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes vt-slide-out-left {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes vt-slide-in-left {
  from {
    transform: translate3d(-100%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes vt-slide-out-right {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(100%, 0, 0);
  }
}

@keyframes vt-reveal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-reveal-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes vt-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

::view-transition-group(app-screen) {
  overflow: clip;
  isolation: isolate;
  background: var(--bg);
  /* Disable default size/position morph between different screen heights */
  animation: none;
}

::view-transition-image-pair(app-screen) {
  isolation: isolate;
  background: var(--bg);
  height: 100%;
  width: 100%;
  inset: 0;
}

::view-transition-old(app-screen),
::view-transition-new(app-screen) {
  animation-duration: var(--vt-duration);
  animation-timing-function: var(--vt-ease);
  mix-blend-mode: normal;
  height: 100%;
  width: 100%;
  inset: 0;
  overflow: clip;
  background: var(--bg);
  backface-visibility: hidden;
  transform-origin: center center;
}

html[data-nav="forward"]::view-transition-old(app-screen) {
  animation-name: vt-slide-out-left;
  z-index: 1;
}

html[data-nav="forward"]::view-transition-new(app-screen) {
  animation-name: vt-slide-in-right;
  z-index: 2;
}

html[data-nav="back"]::view-transition-old(app-screen) {
  animation-name: vt-slide-out-right;
  z-index: 2;
}

html[data-nav="back"]::view-transition-new(app-screen) {
  animation-name: vt-slide-in-left;
  z-index: 1;
}

html[data-nav="reveal"]::view-transition-old(app-screen) {
  animation-name: vt-reveal-out;
  z-index: 1;
}

html[data-nav="reveal"]::view-transition-new(app-screen) {
  animation-name: vt-reveal-in;
  z-index: 2;
}

html[data-nav="fade"]::view-transition-old(app-screen),
html[data-nav="fade"]::view-transition-new(app-screen) {
  animation-duration: 0.28s;
}

html[data-nav="fade"]::view-transition-old(app-screen) {
  animation-name: vt-fade-out;
  z-index: 1;
}

html[data-nav="fade"]::view-transition-new(app-screen) {
  animation-name: vt-fade-in;
  z-index: 2;
}

/* Header/footer update instantly; only the main pane slides */
html[data-nav] ::view-transition-group(root) {
  animation: none;
}

html[data-nav] ::view-transition-old(root) {
  display: none;
}

html[data-nav] ::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Fallback when View Transitions API is unavailable */
.screen-stage.screen-enter {
  animation-duration: var(--vt-duration);
  animation-timing-function: var(--vt-ease);
  animation-fill-mode: both;
}

.screen-stage.screen-enter--forward {
  animation-name: vt-slide-in-right;
}

.screen-stage.screen-enter--back {
  animation-name: vt-slide-in-left;
}

.screen-stage.screen-enter--reveal {
  animation-name: vt-reveal-in;
}

.screen-stage.screen-enter--fade {
  animation-name: vt-fade-in;
  animation-duration: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .choice-card,
  .step-dot,
  .btn-primary,
  .btn-secondary {
    transition: none;
  }

  .media-frame__skeleton {
    animation: none;
    background: var(--surface2);
  }

  .media-frame__img {
    transition: none;
  }

  .media-frame.is-loaded .media-frame__img {
    opacity: 1;
  }

  .screen-stage.screen-enter {
    animation: none;
  }

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