/*
 * Prompt frame. Vertical position is --whatimado-frame-top (25vh on desktop).
 * bottom: 0 keeps the frame on the floor, so a higher top makes a taller frame.
 */
whatimado-frame {
  display: block;
  position: absolute;
  left: var(--v2-center-gutter);
  right: var(--v2-center-gutter);
  top: var(--whatimado-frame-top, 25vh);
  bottom: 0;
  width: var(--v2-frame-w);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  z-index: 4;
  box-sizing: border-box;
  transition: top var(--v2-hero-motion-duration) var(--v2-hero-motion-ease);
  will-change: top;
  isolation: isolate;
}

/* Desktop: fill the center column so the glass meets the rail gap, not a centered 720px box. */
@media (min-width: 901px) {
  .v2-main > whatimado-frame {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  /*
   * Landing on laptop heights: 25vh leaves too little band for the map, its titles, and
   * Path Finder. The kicker and map band read this body-level default; chat snaps read :root.
   */
  body.v2-app[data-phase="open"]:not(.is-hero-dismissing) {
    --whatimado-frame-top-default: max(25vh, 16.5rem);
    --v2-kicker-top: calc(var(--whatimado-frame-top-default) - var(--v2-kicker-reserve));
  }

  body.v2-app[data-phase="open"]:not(.is-hero-dismissing) .v2-main > whatimado-frame {
    top: max(var(--whatimado-frame-top, 25vh), var(--whatimado-frame-top-default));
  }
}

whatimado-frame.is-dragging,
whatimado-frame.is-gliding,
whatimado-frame.is-settling {
  transition: none;
  will-change: top;
}

whatimado-frame.is-docked .whatimado-frame__inner {
  box-shadow:
    var(--v2-frame-shadow),
    0 calc(8px + var(--v2-frame-elevation, 0) * 16px) calc(24px + var(--v2-frame-elevation, 0) * 20px)
      rgba(0, 0, 0, calc(0.18 + var(--v2-frame-elevation, 0) * 0.22));
  will-change: transform;
}

whatimado-frame .whatimado-frame__drag-rail {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  margin: 0;
  padding: 0.4rem 0 0.2rem;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

whatimado-frame:not(.is-docked) .whatimado-frame__drag-rail {
  display: none;
}

whatimado-frame .whatimado-frame__drag-grip {
  display: block;
  width: clamp(2.75rem, 12vw, 3.5rem);
  height: 4px;
  border-radius: var(--v2-radius-pill);
  background: rgba(66, 255, 240, 0.28);
  box-shadow: 0 0 10px rgba(46, 232, 214, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

whatimado-frame.is-docked .whatimado-frame__drag-rail:hover .whatimado-frame__drag-grip,
whatimado-frame.is-docked .whatimado-frame__drag-rail:focus-visible .whatimado-frame__drag-grip {
  background: rgba(125, 255, 239, 0.55);
  transform: scaleX(1.06);
  box-shadow: 0 0 14px rgba(46, 232, 214, 0.32);
}

whatimado-frame.is-dragging .whatimado-frame__drag-grip {
  background: rgba(125, 255, 239, 0.72);
  transform: scaleX(1.12);
}

whatimado-frame .whatimado-frame__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-shell-radius);
  box-shadow: var(--v2-frame-shadow);
  overflow: hidden;
}

/* Internal regions stay transparent — single glass layer on __inner shows the map through */
whatimado-frame .whatimado-frame__inner > * {
  background-color: transparent;
}

whatimado-frame .whatimado-frame__body-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

whatimado-frame .whatimado-frame__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.85rem clamp(0.85rem, 2.5vw, 1.25rem) var(--v2-composer-content-gap);
  padding-right: clamp(1.1rem, 2.8vw, 1.35rem);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  background: transparent;
}

whatimado-frame .whatimado-frame__body-content {
  min-height: 100%;
  will-change: transform;
  background: transparent;
}

whatimado-frame .whatimado-frame__body-content.is-spring-back {
  transition: transform 0.48s cubic-bezier(0.34, 1.45, 0.64, 1);
}

whatimado-frame .whatimado-frame__scroll-rail {
  position: absolute;
  top: calc(var(--v2-frame-radius) + 0.35rem);
  right: 0.45rem;
  bottom: 0.45rem;
  width: 6px;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
  border-radius: var(--v2-radius-pill);
}

whatimado-frame .whatimado-frame__scroll-rail[hidden] {
  display: none;
}

whatimado-frame .whatimado-frame__scroll-thumb {
  width: 100%;
  height: var(--whatimado-scroll-thumb-h);
  min-height: 1.75rem;
  border-radius: var(--v2-radius-pill);
  background: var(--v2-teal-dim);
  transform: translateY(0);
  transform-origin: center center;
  will-change: transform, height;
}

whatimado-frame.is-scrollable .whatimado-frame__body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--v2-scroll-bottom-reserve);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 2.75rem,
    #000 calc(100% - var(--v2-scroll-bottom-reserve)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 2.75rem,
    #000 calc(100% - var(--v2-scroll-bottom-reserve)),
    transparent 100%
  );
}

/* Masked fade steals Android taps on the last chip row — keep chips fully hittable */
whatimado-frame.has-intake-chips.is-scrollable .whatimado-frame__body {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 2.75rem, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 2.75rem, #000 100%);
}

whatimado-frame.is-scrollable .whatimado-frame__body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

whatimado-frame.is-fade-top .whatimado-frame__body-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.75rem;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(4, 12, 14, calc(var(--v2-frame-glass-alpha) * 0.65)) 0%, transparent 100%);
}

whatimado-frame.is-scrollable .whatimado-frame__body-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--v2-scroll-bottom-reserve);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to top, rgba(4, 12, 14, calc(var(--v2-frame-glass-alpha) * 0.45)) 0%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  whatimado-frame {
    transition: none;
  }

  whatimado-frame.is-scrollable .whatimado-frame__body {
    scrollbar-width: thin;
    scrollbar-color: var(--v2-teal-dim) transparent;
  }

  whatimado-frame.is-scrollable .whatimado-frame__body::-webkit-scrollbar {
    width: 6px;
  }

  whatimado-frame.is-scrollable .whatimado-frame__body::-webkit-scrollbar-thumb {
    background: var(--v2-teal-dim);
    border-radius: var(--v2-radius-pill);
  }

  whatimado-frame.is-scrollable .whatimado-frame__body::-webkit-scrollbar-track {
    margin-top: calc(var(--v2-frame-radius) + 0.35rem);
    margin-bottom: var(--v2-scroll-bottom-reserve);
  }

  whatimado-frame .whatimado-frame__scroll-rail {
    display: none !important;
  }
}

whatimado-frame.is-docked .whatimado-frame__composer,
whatimado-frame .whatimado-frame__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  padding: 0.65rem clamp(0.85rem, 2.5vw, 1.1rem) clamp(0.85rem, 2vw, 1rem);
  border-top: 1px solid rgba(46, 232, 214, 0.08);
  background: transparent;
  margin: 0;
}

whatimado-frame .whatimado-frame__composer-input {
  flex: 1;
  min-height: 40px;
  max-height: min(40vh, 200px);
  padding: 0.55rem 1rem;
  border: 1px solid rgba(46, 232, 214, 0.32);
  border-radius: var(--v2-prompt-radius);
  background: var(--v2-frame-glass-tint);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  outline: none;
  field-sizing: content;
}

whatimado-frame .whatimado-frame__composer-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  transition: opacity 0.45s ease;
}

whatimado-frame .whatimado-frame__composer-input.is-placeholder-fading::placeholder {
  opacity: 0;
}

whatimado-frame .whatimado-frame__composer-send {
  flex: 0 0 auto;
  align-self: flex-end;
  width: auto;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid var(--v2-border);
  /* Horizontally flipped vs prompt boxes — square sits top-left */
  border-radius: var(--v2-btn-radius);
  background: transparent;
  color: var(--v2-teal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-sizing: border-box;
}

whatimado-frame .whatimado-frame__composer-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

whatimado-frame .whatimado-frame__composer-send:not(:disabled):hover {
  background: rgba(46, 232, 214, 0.08);
}

@keyframes v2-kicker-enter {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*
 * Home open — frame glass must not steal pointer events from the map band above it.
 * Composer/body stay interactive inside the frame column.
 */
body.v2-app[data-phase="open"] whatimado-frame {
  pointer-events: none;
}

body.v2-app[data-phase="open"] whatimado-frame .whatimado-frame__composer,
body.v2-app[data-phase="open"] whatimado-frame .whatimado-frame__composer-input,
body.v2-app[data-phase="open"] whatimado-frame .whatimado-frame__composer-send,
body.v2-app[data-phase="open"] whatimado-frame .whatimado-frame__drag-rail {
  pointer-events: auto;
}

body.v2-app[data-phase="open"] .v2-frame-kicker {
  left: 0;
  right: 0;
  width: var(--v2-frame-w);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

body.v2-app[data-phase="open"] .v2-frame-kicker:not(.is-dismissing) {
  animation: v2-kicker-enter 0.85s cubic-bezier(0.32, 0.94, 0.42, 1) both;
  animation-delay: 0.12s;
}

/* Kicker above frame — matches production home copy */
.v2-frame-kicker {
  position: absolute;
  left: var(--v2-center-gutter);
  right: var(--v2-center-gutter);
  top: var(--v2-kicker-top);
  height: var(--v2-kicker-reserve);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--v2-hero-motion-duration) var(--v2-hero-motion-ease),
    transform var(--v2-hero-motion-duration) var(--v2-hero-motion-ease),
    height var(--v2-hero-motion-duration) var(--v2-hero-motion-ease);
}

.v2-frame-kicker.is-dismissing {
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
}

.v2-frame-kicker.is-dismissing .v2-kicker-brand,
.v2-frame-kicker.is-dismissing .v2-kicker-sub {
  opacity: 0;
  transition: opacity var(--v2-hero-motion-duration) var(--v2-hero-motion-ease);
}

@media (prefers-reduced-motion: reduce) {
  body.v2-app[data-phase="open"] .v2-frame-kicker:not(.is-dismissing) {
    animation: none;
  }

  .v2-frame-kicker {
    transition: opacity 0.15s ease;
  }
}

.v2-kicker-brand {
  margin: 0;
  font-family: var(--v2-font-hero);
  font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--v2-yellow);
  filter: drop-shadow(0 0 14px rgba(245, 213, 71, 0.32));
}
.v2-kicker-brand .brand-your,
.v2-kicker-brand .brand-path,
.v2-kicker-brand .brand-finder {
  background: linear-gradient(180deg, var(--v2-yellow-bright) 0%, var(--v2-yellow) 55%, var(--v2-yellow-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v2-kicker-space {
  display: inline-block;
  width: 0.22em;
}

.v2-kicker-sub {
  margin: 0.35rem auto 0;
  max-width: 36rem;
  font-family: var(--v2-font-hero);
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.55;
  color: var(--v2-text-muted);
}

.v2-kicker-sub-br {
  display: none;
}

.v2-home-prompt {
  display: none;
}

.v2-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.v2-msg {
  max-width: 92%;
  line-height: 1.5;
  font-size: 0.9rem;
}

.v2-msg.v2-text-box {
  box-shadow: none;
}

.v2-msg--user {
  align-self: flex-end;
  padding: 0.65rem 0.95rem;
  background: var(--v2-frame-glass-tint);
  color: #ffffff;
  border-radius: var(--v2-prompt-radius);
}

.v2-msg--advisor {
  align-self: flex-start;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-response-radius);
  color: var(--v2-text);
  background: transparent;
  backdrop-filter: none;
}

.v2-msg-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--v2-teal-dim);
  margin-bottom: 0.3rem;
}

.v2-msg--typing {
  opacity: 1;
  font-style: normal;
}

.v2-msg-body--typing {
  min-height: 1.2em;
  letter-spacing: 0.02em;
}

.v2-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
  height: 1.4em;
  padding: 0 0.15em;
  vertical-align: middle;
}

.v2-msg-body--typing .v2-typing-dots {
  height: 1.6em;
  font-size: 1.15em;
  color: var(--v2-teal);
}

.v2-typing-dots__dot {
  display: block;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.45em currentColor;
  animation: v2-typing-dot-wave 1.2s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Negative delays start mid-cycle so the wave is already travelling on the first frame. */
.v2-typing-dots__dot:nth-child(1) {
  animation-delay: -0.6s;
}

.v2-typing-dots__dot:nth-child(2) {
  animation-delay: -0.4s;
}

.v2-typing-dots__dot:nth-child(3) {
  animation-delay: -0.2s;
}

@keyframes v2-typing-dot-wave {
  0%,
  100% {
    transform: translateY(0.28em) scale(0.8);
    opacity: 0.35;
  }

  50% {
    transform: translateY(-0.28em) scale(1);
    opacity: 1;
  }
}

@keyframes v2-typing-dot-fade {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-typing-dots__dot {
    animation-name: v2-typing-dot-fade;
  }
}

.v2-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.55rem 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--v2-teal);
  text-transform: none;
  letter-spacing: 0;
}

.v2-status.hidden {
  display: none;
}

.v2-selection {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--v2-border-dashed);
  border-radius: var(--v2-radius);
  font-size: 0.82rem;
  color: var(--v2-text-muted);
  line-height: 1.45;
  background: transparent;
}

.v2-selection__type {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--v2-teal) 80%, white);
}

.v2-selection__title {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--v2-yellow);
}

.v2-selection__tagline,
.v2-selection__why {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--v2-text);
  text-transform: none;
  letter-spacing: 0;
}

.v2-selection__why {
  color: var(--v2-text-muted);
}

.v2-missions {
  margin-top: 0.85rem;
}

.v2-next-paths {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(46, 232, 214, 0.18);
}

.v2-next-paths__title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-yellow);
}

.v2-next-paths__copy,
.v2-next-path__why {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--v2-text-muted);
}

.v2-next-paths__grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.v2-next-path,
.v2-next-path__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.v2-next-path {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(141, 149, 165, 0.45);
  border-radius: var(--v2-radius);
}

.v2-next-path.is-saved {
  border-color: rgba(245, 213, 71, 0.55);
}

.v2-next-path__save {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}

.v2-next-path__open {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(46, 232, 214, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--v2-teal);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.v2-next-path__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.v2-next-path__actions {
  margin-top: 0.55rem;
}

.v2-missions__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.v2-missions__head .v2-section-label {
  margin-bottom: 0;
}

.v2-stage {
  margin-top: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px dotted rgba(46, 232, 214, 0.42);
  border-radius: var(--v2-radius);
}

.v2-stage__label {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--v2-yellow);
}

.v2-stage__desc,
.v2-mission__text {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--v2-text-muted);
}

.v2-mission-list {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.v2-mission {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(66, 255, 240, 0.22);
}

.v2-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
}

.v2-check input {
  margin-top: 0.15rem;
  accent-color: var(--v2-yellow);
}

.v2-mission.is-done .v2-mission__title span {
  text-decoration: line-through;
  opacity: 0.7;
}

.v2-mission__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--v2-text);
}

.v2-mission-continue {
  --v2-cue-inset: 0.8rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.2rem 0 0.35rem;
  padding: 0.95rem var(--v2-cue-inset) 0.1rem;
  color: var(--v2-text-muted);
  opacity: 0.85;
  pointer-events: none;
}

/* Dashed tail that carries the mission card on toward the "?" node. */
.v2-mission-continue::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--v2-cue-inset) + 0.7rem - 0.5px);
  height: 0.95rem;
  border-left: 1px dashed color-mix(in srgb, var(--v2-teal) 60%, transparent);
}

.v2-mission-continue__node {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 1px dashed color-mix(in srgb, var(--v2-teal) 70%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--v2-teal) 8%, transparent);
  color: var(--v2-teal);
  font-family: var(--v2-font-hero);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.v2-mission-continue__copy {
  display: grid;
  gap: 0.1rem;
  font-size: 0.74rem;
  line-height: 1.3;
}

.v2-mission-continue__copy strong {
  font-family: var(--v2-font-hero);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-teal);
}

.v2-messages:empty {
  display: none;
}

.v2-possibilities {
  margin-top: 0.85rem;
}

.v2-path-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.v2-path-card {
  --path-accent: var(--v2-teal);
  position: relative;
  padding: 0.75rem 0.9rem;
  border: 1px dotted rgba(46, 232, 214, 0.42);
  border-radius: var(--v2-radius);
  background: transparent;
  box-shadow: 0 0 6px rgba(46, 232, 214, 0.1);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transform: translateY(0);
  transition:
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.v2-path-card::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  box-shadow:
    0 0 36px rgba(46, 232, 214, 0.26),
    0 12px 30px rgba(0, 0, 0, 0.14);
  transition: opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes v2-path-card-hover-rise {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-2px);
  }
}

@keyframes v2-path-card-hover-wobble {
  0%,
  100% {
    transform: translateY(-2px);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes v2-path-card-hover-glow-breathe {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

.v2-path-card:hover {
  border: 1px dotted rgba(46, 232, 214, 0.34);
  box-shadow: 0 0 22px rgba(46, 232, 214, 0.14);
  animation:
    v2-path-card-hover-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    v2-path-card-hover-wobble 3.2s ease-in-out 0.55s infinite;
  background: transparent;
}

.v2-path-card:hover::after {
  opacity: 0.72;
  animation: v2-path-card-hover-glow-breathe 2.8s ease-in-out infinite;
}

.v2-path-card.is-selected {
  animation: none;
  border-color: color-mix(in srgb, var(--v2-yellow) 72%, transparent);
  background: color-mix(in srgb, var(--v2-yellow) 16%, rgba(46, 232, 214, 0.08));
  box-shadow:
    0 0 16px color-mix(in srgb, var(--v2-yellow) 32%, transparent),
    0 4px 14px rgba(0, 0, 0, 0.16);
}

.v2-path-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--v2-teal);
  transition: color 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-path-card p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--v2-text-muted);
  transition: color 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-path-card.is-selected h3 {
  color: var(--v2-yellow);
}

.v2-path-card.is-selected p {
  color: var(--v2-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .v2-path-card:hover {
    animation: none;
    transform: translateY(-2px) scale(1.012);
    box-shadow:
      var(--v2-frame-shadow),
      0 0 28px rgba(46, 232, 214, 0.24),
      0 6px 18px rgba(0, 0, 0, 0.16);
  }

  .v2-path-card:hover::after {
    animation: none;
    opacity: 0.72;
  }
}

.v2-map-timeline {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  height: 2.15rem;
  margin: 0;
  padding: 0 0.35rem 0 0.7rem;
  pointer-events: auto;
  border: 1px solid rgba(245, 213, 71, 0.55);
  border-radius: var(--v2-prompt-radius);
  background: rgba(6, 10, 12, 0.72);
  box-sizing: border-box;
}

.v2-map-timeline[hidden] {
  display: none !important;
}

.v2-timeline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.v2-timeline__label {
  flex: 0 0 auto;
  color: var(--v2-yellow, #f5d547);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.v2-timeline__rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  cursor: grab;
}

.v2-timeline__rail.is-dragging {
  cursor: grabbing;
}

.v2-timeline__rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.6rem;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(6, 10, 12, 0.96), rgba(6, 10, 12, 0));
}

.v2-timeline__cutoff {
  position: absolute;
  left: -0.3rem;
  top: 50%;
  z-index: 4;
  width: 0.58rem;
  height: 0.58rem;
  margin: 0;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1.5px solid #8d95a5;
  background: #10211f;
  box-shadow: 0 0 0 3px rgba(6, 10, 12, 0.85);
  pointer-events: none;
  opacity: 0;
}

.v2-timeline__rail.is-scrolled::before,
.v2-timeline__rail.is-scrolled .v2-timeline__cutoff {
  opacity: 1;
}

.v2-timeline__link {
  flex: 0 0 2.5rem;
  align-self: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 3px;
  background-image: radial-gradient(circle, rgba(200, 208, 216, 0.9) 1.15px, transparent 1.35px);
  background-size: 8px 3px;
  background-repeat: repeat-x;
  background-position: center;
}

.v2-timeline__rail::-webkit-scrollbar {
  display: none;
}

body.v2-app .v2-timeline__stop,
body.v2-app .v2-timeline__add,
.v2-difficulty,
.v2-difficulty-offer button,
.v2-account button {
  font: inherit;
  cursor: pointer;
}

body.v2-app .v2-timeline__stop {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.32rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(183, 190, 200, 0.9);
  padding: 0.1rem 0.05rem;
}

.v2-timeline__dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  border: 1.5px solid #8d95a5;
  background: #10211f;
  box-shadow: 0 0 0 3px rgba(6, 12, 14, 0.85);
}

.v2-timeline__name {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

body.v2-app .v2-timeline__stop.is-done {
  color: rgba(245, 213, 71, 0.95);
}

.v2-timeline__stop.is-done .v2-timeline__dot {
  background: var(--v2-yellow, #e6ff4d);
  border-color: var(--v2-yellow, #e6ff4d);
}

body.v2-app .v2-timeline__stop.is-current {
  color: #e8fff8;
}

.v2-timeline__stop.is-current .v2-timeline__dot {
  background: var(--v2-teal, #2ee8d6);
  border-color: var(--v2-teal, #2ee8d6);
  box-shadow: 0 0 0 3px rgba(46, 232, 214, 0.22);
}

body.v2-app .v2-timeline__stop.is-planned {
  opacity: 0.55;
}

body.v2-app .v2-timeline__add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0 0 0 auto;
  padding: 0 0 0.12em;
  border-radius: 50%;
  border: 1px solid rgba(215, 255, 246, 0.45);
  background: rgba(6, 10, 12, 0.9);
  color: var(--v2-text, #e8fff8);
  font-size: 1.15rem;
  line-height: 1;
  overflow: visible;
}

/* Same box as the Notes sheet button (.v2-draft-open), filled teal with dark text. */
body.v2-app .v2-difficulty {
  appearance: none;
  margin-top: 0.45rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--v2-teal);
  background: var(--v2-teal);
  color: var(--v2-bg);
  font-family: var(--v2-font-hero);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

body.v2-app .v2-difficulty:hover,
body.v2-app .v2-difficulty:focus-visible {
  border-color: var(--v2-neon-teal);
  background: var(--v2-neon-teal);
  color: var(--v2-bg);
}

.v2-mission__steps,
.v2-mission__when {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.v2-difficulty-offer,
.v2-timeline-continue {
  margin: 0.6rem 0 0.9rem;
  padding: 0.75rem 0.85rem;
}

.v2-difficulty-offer p,
.v2-timeline-continue p {
  margin: 0 0 0.55rem;
}

.v2-difficulty-offer button,
.v2-timeline-continue button {
  margin: 0 0.45rem 0.45rem 0;
  border-radius: 999px;
  border: 1px solid rgba(215, 255, 246, 0.35);
  background: transparent;
  color: inherit;
  padding: 0.35rem 0.7rem;
}

body.v2-app .v2-timeline-continue button {
  border-radius: 999px;
}

.v2-account {
  width: min(28rem, calc(100vw - 2rem));
  border: 0;
  border-radius: 18px;
  padding: 1.1rem 1.15rem 0.9rem;
  background: #071614;
  color: #e8fff8;
}

.v2-account::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.v2-account h2,
.v2-account h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.v2-account p,
.v2-account li {
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.v2-account label {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
}

.v2-account input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(215, 255, 246, 0.3);
  background: #10211f;
  color: inherit;
  padding: 0.45rem 0.55rem;
}

.v2-account__note {
  opacity: 0.75;
}

.v2-account__guest,
.v2-account__create,
.v2-account__close {
  border-radius: 999px;
  border: 1px solid rgba(215, 255, 246, 0.35);
  background: transparent;
  color: inherit;
  padding: 0.45rem 0.8rem;
}

.v2-account__create {
  background: var(--v2-yellow, #e6ff4d);
  color: #14220b;
  border-color: transparent;
}

.v2-account__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

.v2-account__link {
  border: 0;
  background: transparent;
  color: var(--v2-teal, #2ee8d6);
  padding: 0.2rem 0;
  font-size: 0.84rem;
  text-decoration: underline;
  text-decoration-color: rgba(46, 232, 214, 0.45);
  text-underline-offset: 0.2em;
}

.v2-account__link:hover,
.v2-account__link:focus-visible {
  color: #7dffef;
  text-decoration-color: currentColor;
}

#account-signin-form > .v2-account__link {
  display: block;
  margin-top: 0.4rem;
}

.v2-account form + form,
#account-imports {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(215, 255, 246, 0.16);
}
