@import "tailwindcss";

@property --depth-arc-progress {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --ink: #17201d;
  --muted: #66706b;
  --paper: #f1f0e8;
  --paper-deep: #e8e5d9;
  --glass: rgba(250, 249, 243, 0.72);
  --line: rgba(24, 32, 29, 0.12);
  --sky: #5596bd;
  --coral: #df7557;
  --amber: #c99222;
  --mint: #4d9b78;
  --violet: #8066b5;
  --teal: #278f91;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--font-geist-sans), Arial, sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(29, 43, 38, 0.6);
  outline-offset: 4px;
}

.engine-shell {
  position: relative;
  min-height: 100dvh;
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.84), transparent 34%),
    linear-gradient(145deg, #f4f2e9 0%, #ecebe2 48%, #e9e5d9 100%);
}

.engine-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.22;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(
      circle at 12% 24%,
      rgba(23, 32, 29, 0.09) 0 0.55px,
      transparent 0.7px 4px
    ),
    repeating-linear-gradient(
      112deg,
      transparent 0 7px,
      rgba(255, 255, 255, 0.14) 8px 9px
    );
}

.ambient {
  position: absolute;
  z-index: -1;
  width: 44vw;
  height: 44vw;
  border-radius: 48% 52% 58% 42%;
  filter: blur(85px);
  opacity: 0.22;
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.ambient--one {
  top: -24vw;
  left: -12vw;
  background: var(--mint);
}

.ambient--two {
  right: -18vw;
  bottom: -28vw;
  background: var(--coral);
  animation-delay: -8s;
}

.interpretation {
  position: absolute;
  z-index: 12;
  top: 28px;
  left: 50%;
  width: min(430px, calc(100vw - 220px));
  transform: translateX(-50%);
  animation: interpretation-arrive 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

.invite-gate {
  position: relative;
  display: grid;
  min-height: 100dvh;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.84), transparent 34%),
    linear-gradient(145deg, #f4f2e9 0%, #ecebe2 48%, #e9e5d9 100%);
}

.invite-gate__form {
  position: relative;
  z-index: 2;
  width: min(420px, calc(100vw - 48px));
}

.invite-gate__form label {
  display: block;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 510;
  letter-spacing: -0.045em;
}

.invite-gate__control {
  display: flex;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(250, 249, 244, 0.84);
  box-shadow: 0 24px 80px rgba(32, 38, 35, 0.12);
  backdrop-filter: blur(24px);
}

.invite-gate__control input {
  min-width: 0;
  padding: 0 20px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-gate__control button {
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.invite-gate__control button:disabled {
  opacity: 0.22;
  cursor: default;
}

.invite-gate__form p {
  min-height: 20px;
  margin: 12px 20px 0;
  color: var(--coral);
  font-size: 14px;
}

.engine-reset {
  position: fixed;
  z-index: 20;
  top: 30px;
  right: 32px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.engine-reset:hover {
  color: var(--ink);
  background: var(--paper);
  transform: rotate(-16deg);
}

.engine-reset:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.interpretation__text {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(252, 251, 246, 0.36);
  color: #626b66;
  cursor: text;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  backdrop-filter: blur(10px);
  transition:
    background 180ms ease,
    color 180ms ease;
}

.interpretation__text:hover {
  background: rgba(252, 251, 246, 0.72);
  color: var(--ink);
}

.interpretation form {
  display: grid;
  padding: 7px 7px 7px 16px;
  grid-template-columns: 1fr 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(30, 38, 35, 0.1);
  border-radius: 22px;
  background: rgba(252, 251, 246, 0.9);
  box-shadow: 0 12px 42px rgba(28, 34, 31, 0.1);
  backdrop-filter: blur(22px);
}

.interpretation textarea {
  width: 100%;
  max-height: 74px;
  padding: 4px 0;
  overflow-y: auto;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.interpretation form button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 15px;
}

.interpretation form button:disabled {
  cursor: default;
  opacity: 0.14;
}

.context-field {
  position: absolute;
  inset: 10vh 4vw 18vh;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.field-glow {
  position: absolute;
  width: min(68vw, 820px);
  height: min(68vw, 820px);
  border: 1px solid rgba(26, 36, 32, 0.055);
  border-radius: 50%;
}

.field-glow::before,
.field-glow::after {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(26, 36, 32, 0.045);
  border-radius: 50%;
}

.field-glow::after {
  inset: 28%;
}

.active-orbital-system {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.active-orbital-system__orbit {
  --active-orbit-size: min(64vw, 82vh, 720px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--active-orbit-size);
  height: var(--active-orbit-size);
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--system-color) 62%, transparent);
  box-shadow:
    inset 0 0 90px color-mix(in srgb, var(--system-color) 9%, transparent),
    0 0 32px color-mix(in srgb, var(--system-color) 8%, transparent);
  transform: translate(-50%, -50%);
  animation: active-orbit-one 18s ease-in-out infinite alternate;
}

.depth-transition {
  --radius: min(32vw, 41vh, 360px);
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: calc(var(--radius) * 2);
  height: calc(var(--radius) * 2);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.depth-current {
  --radius: min(32vw, 41vh, 360px);
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 1px solid color-mix(in srgb, var(--node-color) 76%, white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--node-color) 86%, white);
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--node-color) 11%, transparent),
    0 0 22px color-mix(in srgb, var(--node-color) 42%, transparent);
  pointer-events: none;
  transform:
    translate(-50%, -50%)
    rotate(-164deg)
    translateX(var(--radius));
  transition: opacity 140ms ease;
}

.depth-current.is-transitioning {
  opacity: 0;
}

.depth-transition::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 50%;
  background: conic-gradient(
    from -74deg,
    color-mix(in srgb, var(--system-color) 72%, white)
      0deg var(--depth-arc-progress),
    transparent var(--depth-arc-progress) 360deg
  );
  filter: drop-shadow(
    0 0 7px color-mix(in srgb, var(--system-color) 28%, transparent)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 3px),
    #000 calc(100% - 2px)
  );
  animation: depth-transition-arc var(--transition-duration) linear both;
}

.depth-transition.is-paused::before,
.depth-transition.is-paused i {
  animation-play-state: paused;
}

.depth-transition i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 13px;
  height: 13px;
  border: 1px solid color-mix(in srgb, var(--system-color) 72%, white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--system-color) 82%, white);
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--system-color) 10%, transparent),
    0 0 24px color-mix(in srgb, var(--system-color) 58%, transparent);
  animation: depth-transition-travel var(--transition-duration) linear both;
}

.depth-transition i::before {
  position: absolute;
  bottom: 7px;
  left: 5px;
  width: 2px;
  height: 44px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--system-color) 48%, transparent),
    transparent
  );
  transform: rotate(2deg);
  transform-origin: bottom center;
}

.context-node--depth.is-next {
  animation:
    node-arrive 650ms cubic-bezier(0.23, 1, 0.32, 1) both,
    next-depth-charge var(--transition-duration) ease-in-out both;
}

.context-node--depth.is-next.is-paused {
  animation-play-state: paused;
}

.neighbour-system {
  --nudge-x: 0px;
  --nudge-y: 0px;
  position: absolute;
  z-index: 2;
  width: 270px;
  height: 270px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.neighbour-system.is-colliding {
  animation: neighbour-system-nudge 14s ease-in-out var(--collision-delay) infinite;
}

.neighbour-system--slot-1 {
  top: -150px;
  right: -120px;
  --nudge-x: -54px;
  --nudge-y: 48px;
}

.neighbour-system--slot-2 {
  top: 20%;
  left: -175px;
  --nudge-x: 68px;
  --nudge-y: 4px;
}

.neighbour-system--slot-3 {
  top: 39%;
  right: -180px;
  --nudge-x: -72px;
  --nudge-y: -3px;
}

.neighbour-system--slot-4 {
  bottom: -165px;
  left: -120px;
  --nudge-x: 54px;
  --nudge-y: -48px;
}

.neighbour-system--slot-5 {
  right: -125px;
  bottom: -170px;
  --nudge-x: -52px;
  --nudge-y: -46px;
}

.neighbour-system__orbit {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--system-color) 58%, transparent);
  border-radius: 50%;
  transition:
    border-color 240ms ease,
    filter 240ms ease;
}

.neighbour-system__orbit--outer {
  inset: 8px;
  border-bottom-color: transparent;
  border-left-color: color-mix(in srgb, var(--system-color) 14%, transparent);
  transform: rotate(-18deg);
}

.neighbour-system__orbit--inner {
  inset: 48px;
  border-top-color: transparent;
  border-right-color: color-mix(in srgb, var(--system-color) 18%, transparent);
  transform: rotate(23deg);
}

.neighbour-system:hover .neighbour-system__orbit {
  border-color: color-mix(in srgb, var(--system-color) 82%, transparent);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--system-color) 24%, transparent));
}

.neighbour-system__glimpse {
  position: absolute;
  z-index: 2;
  width: 158px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--system-color) 38%, transparent);
  border-radius: 18px;
  background: rgba(250, 249, 243, 0.82);
  box-shadow: 0 10px 30px rgba(27, 35, 32, 0.09);
  color: #3f4945;
  font-size: 11px;
  font-weight: 520;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.neighbour-system.can-glimpse .neighbour-system__glimpse {
  animation: neighbour-glimpse 14s ease-in-out var(--collision-delay) infinite;
}

.neighbour-system--slot-1 .neighbour-system__glimpse,
.neighbour-system--slot-3 .neighbour-system__glimpse,
.neighbour-system--slot-5 .neighbour-system__glimpse {
  top: 56%;
  right: 188px;
}

.neighbour-system--slot-2 .neighbour-system__glimpse,
.neighbour-system--slot-4 .neighbour-system__glimpse {
  top: 44%;
  left: 188px;
}

.neighbour-system.can-glimpse:hover .neighbour-system__glimpse {
  opacity: 1;
}

.system-impact {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 1px solid color-mix(in srgb, var(--system-color) 72%, white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--system-color) 72%, white);
  opacity: 0;
  pointer-events: none;
}

.system-impact.is-active {
  animation: system-impact 14s ease-out var(--collision-delay) infinite;
}

.system-impact--slot-1 {
  top: 6%;
  right: 23%;
}

.system-impact--slot-2 {
  top: 38%;
  left: 18%;
}

.system-impact--slot-3 {
  top: 52%;
  right: 17%;
}

.system-impact--slot-4 {
  bottom: 4%;
  left: 25%;
}

.system-impact--slot-5 {
  right: 25%;
  bottom: 3%;
}

.context-node {
  position: absolute;
  z-index: 2;
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 650ms cubic-bezier(0.23, 1, 0.32, 1),
    opacity 450ms ease,
    background 250ms ease;
}

.context-node--depth {
  --radius: min(32vw, 41vh, 360px);
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--node-color) 48%, transparent);
  background: color-mix(in srgb, var(--node-color) 18%, white);
  box-shadow:
    inset 0 0 18px color-mix(in srgb, var(--node-color) 12%, transparent),
    0 0 0 8px color-mix(in srgb, var(--node-color) 7%, transparent),
    0 10px 34px color-mix(in srgb, var(--node-color) 15%, transparent);
  opacity: 0.78;
  transform:
    translate(-50%, -50%)
    rotate(var(--depth-angle))
    translateX(var(--radius));
  animation: node-arrive 650ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

.context-node--depth:hover {
  background: color-mix(in srgb, var(--node-color) 30%, white);
  opacity: 1;
  transform:
    translate(-50%, -50%)
    rotate(var(--depth-angle))
    translateX(var(--radius))
    scale(1.1);
}

.context-node--depth[data-relation="history"] {
  width: 38px;
  height: 38px;
  border-color: color-mix(in srgb, var(--node-color) 72%, var(--ink));
  background: color-mix(in srgb, var(--node-color) 52%, var(--ink));
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.1),
    0 0 0 6px color-mix(in srgb, var(--node-color) 9%, transparent),
    0 10px 28px color-mix(in srgb, var(--ink) 20%, transparent);
  opacity: 0.96;
}

.context-node--placeholder {
  background: color-mix(in srgb, var(--node-color) 9%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--node-color) 24%, transparent),
    0 0 0 7px color-mix(in srgb, var(--node-color) 4%, transparent);
  opacity: 0.3;
  pointer-events: none;
  animation: depth-placeholder-pulse 1.8s ease-in-out infinite;
}

.context-node--placeholder i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--node-color) 46%, transparent);
}

.context-core {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(46vw, 560px);
  min-width: 420px;
  min-height: 320px;
  padding: 62px 66px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 46% 54% 44% 56% / 56% 45% 55% 44%;
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--core-color) 48%, white), transparent 48%),
    radial-gradient(circle at 84% 76%, color-mix(in srgb, var(--core-color) 20%, white), transparent 52%),
    var(--glass);
  box-shadow:
    0 32px 100px rgba(32, 38, 35, 0.13),
    inset 0 0 0 1px rgba(29, 37, 34, 0.035);
  backdrop-filter: blur(24px);
  animation:
    core-arrive 680ms cubic-bezier(0.16, 1, 0.3, 1) both,
    core-breathe 8s ease-in-out 800ms infinite alternate;
}

.context-core::after {
  position: absolute;
  right: -10%;
  bottom: -32%;
  width: 58%;
  height: 74%;
  content: "";
  border-radius: 50%;
  background: color-mix(in srgb, var(--core-color) 28%, transparent);
  filter: blur(28px);
  pointer-events: none;
}

.context-core__image {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  animation: breadth-image-arrive 720ms ease both;
}

.context-core__image::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(250, 249, 244, 0.9) 10%, rgba(250, 249, 244, 0.58) 58%, rgba(250, 249, 244, 0.28)),
    linear-gradient(0deg, rgba(250, 249, 244, 0.52), transparent 52%);
}

.context-core__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.92);
  transform: scale(1.02);
}

.context-core__signal {
  position: absolute;
  top: 32px;
  left: 48px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--core-color);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--core-color) 16%, transparent);
  z-index: 2;
}

.context-core__reality {
  position: relative;
  z-index: 2;
  max-width: 28ch;
  margin: 0;
  color: #26302c;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 470;
  letter-spacing: -0.042em;
  line-height: 1.08;
}

.context-core__emphasis {
  color: var(--ink);
  font-weight: 720;
}

.stay-deeper {
  position: absolute;
  z-index: 8;
  bottom: 2%;
  display: flex;
  padding: 10px 12px 10px 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--system-color) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: color-mix(in srgb, var(--ink) 76%, transparent);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 38px rgba(32, 38, 35, 0.1);
  animation: stay-deeper-window var(--transition-duration) ease both;
}

.stay-deeper i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--system-color);
  color: var(--paper);
  font-style: normal;
}

.stay-deeper:hover {
  color: var(--ink);
}

@keyframes stay-deeper-window {
  0%,
  100% {
    opacity: 0;
    transform: translateY(8px);
  }

  16%,
  82% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breadth-image-arrive {
  from {
    opacity: 0;
    transform: scale(1.035);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-core.is-revealing .context-core__signal {
  animation: signal-pulse 1.3s ease-in-out infinite;
}

.context-core.is-revealing .context-core__reality::after {
  display: inline-block;
  width: 0.36em;
  height: 0.36em;
  margin-left: 0.32em;
  content: "";
  border-radius: 50%;
  background: color-mix(in srgb, var(--core-color) 72%, var(--ink));
  animation: dot-flow 1.1s ease-in-out infinite alternate;
  vertical-align: 0.08em;
}

.context-core__sources {
  position: relative;
  z-index: 2;
  display: flex;
  margin-top: 20px;
  margin-left: 24px;
  align-items: center;
  gap: 8px;
}

.context-core__sources a {
  display: block;
  width: 24px;
  height: 24px;
  color: color-mix(in srgb, var(--core-color) 48%, var(--ink));
  transition:
    transform 180ms ease,
    color 180ms ease;
}

.context-core__sources a:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.context-core__sources svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.context-field--thinking .context-core {
  opacity: 0.72;
}

.context-field--thinking .context-core__signal {
  animation: signal-pulse 1.1s ease-in-out infinite;
}

.empty-core {
  position: relative;
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  border: 1px solid rgba(23, 32, 29, 0.12);
  border-radius: 46% 54% 47% 53%;
  animation: core-breathe 7s ease-in-out infinite alternate;
}

.empty-core::before,
.empty-core::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(23, 32, 29, 0.08);
  border-radius: 50%;
}

.empty-core::before {
  inset: -35px;
}

.empty-core::after {
  inset: -74px;
}

.empty-core span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.empty-core span:nth-child(1) {
  transform: translate(-22px, -15px);
}

.empty-core span:nth-child(2) {
  background: var(--mint);
  transform: translate(25px, 6px);
}

.empty-core span:nth-child(3) {
  width: 5px;
  height: 5px;
  background: var(--violet);
  transform: translate(-8px, 28px);
}

.invitation {
  position: absolute;
  top: calc(50% + 128px);
  left: 50%;
  margin: 0;
  color: #69726d;
  font-size: 13px;
  letter-spacing: 0.015em;
  transform: translateX(-50%);
}

.composer {
  position: absolute;
  z-index: 10;
  bottom: 8vh;
  left: 50%;
  display: grid;
  width: min(620px, calc(100vw - 36px));
  min-height: 64px;
  padding: 8px 9px 8px 22px;
  grid-template-columns: 12px 1fr 48px;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(30, 38, 35, 0.1);
  border-radius: 28px 32px 30px 26px;
  background: rgba(252, 251, 246, 0.8);
  box-shadow: 0 18px 64px rgba(28, 34, 31, 0.11);
  transform: translateX(-50%);
  backdrop-filter: blur(22px);
  transition:
    width 450ms cubic-bezier(0.23, 1, 0.32, 1),
    bottom 450ms cubic-bezier(0.23, 1, 0.32, 1);
}

.composer--docked {
  bottom: 24px;
  width: min(460px, calc(100vw - 154px));
}

.composer.has-voice {
  grid-template-columns: 12px 1fr 38px 48px;
  gap: 9px;
}

.composer.is-compact {
  width: 156px;
  min-height: 54px;
  padding: 5px;
  grid-template-columns: 108px 32px;
  gap: 4px;
  border-color: rgba(30, 38, 35, 0.1);
  border-radius: 25px 29px 27px 23px;
  background: rgba(252, 251, 246, 0.86);
  box-shadow: 0 14px 42px rgba(28, 34, 31, 0.12);
}

.composer.is-compact .composer__spark,
.composer.is-compact textarea,
.composer.is-compact .composer__send {
  display: none;
}

.composer__spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(229, 141, 116, 0.12);
}

.composer textarea {
  width: 100%;
  max-height: 108px;
  padding: 12px 0;
  overflow-y: auto;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.composer textarea::placeholder {
  color: #8a928e;
}

.composer__voice {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.52;
  transition:
    background 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.composer__voice:hover {
  background: rgba(30, 38, 35, 0.06);
  opacity: 0.86;
}

.composer__voice svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.composer.is-compact .composer__voice {
  width: 108px;
  height: 44px;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  padding: 0 11px;
  border: 0;
  border-radius: 20px 24px 22px 18px;
  background: var(--ink);
  color: white;
  opacity: 1;
}

.composer.is-compact .composer__voice:hover {
  background: #27312d;
  transform: scale(1.03);
}

.composer__voice-shortcut {
  color: white;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0.58;
  white-space: nowrap;
}

.composer__keyboard {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.36;
  transition:
    background 180ms ease,
    opacity 180ms ease;
}

.composer__keyboard:hover {
  background: rgba(30, 38, 35, 0.06);
  opacity: 0.72;
}

.composer__keyboard svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.composer.is-compact .composer__keyboard {
  width: 32px;
  height: 40px;
  border: 1px solid rgba(30, 38, 35, 0.11);
  border-radius: 17px 21px 19px 16px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  opacity: 0.4;
}

.composer.is-compact .composer__keyboard:hover {
  background: rgba(30, 38, 35, 0.055);
  opacity: 0.72;
}

.composer.is-listening .composer__voice {
  background: var(--coral);
  color: white;
  opacity: 1;
  transform: scale(1.03);
}

.composer.is-listening .composer__voice::after {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: inherit;
  content: "";
  animation: listening-pulse 1.15s ease-out infinite;
}

.composer__send {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 20px;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.composer__send:hover:not(:disabled) {
  transform: translateY(-2px);
}

.composer__send:disabled {
  cursor: default;
  opacity: 0.14;
}

@keyframes listening-pulse {
  from {
    opacity: 0.8;
    transform: scale(0.82);
  }

  to {
    opacity: 0;
    transform: scale(1.18);
  }
}

.motion-controls {
  position: absolute;
  z-index: 8;
  bottom: 100px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
  animation: fade-in 500ms ease both;
}

.motion-controls > button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.motion-controls > button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.5);
}

.motion-controls > button:disabled {
  cursor: default;
  opacity: 0.22;
}

.motion-controls .motion-controls__pause {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.background-pulse {
  position: absolute;
  right: 34px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-status {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.12;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.stock-status--current {
  width: 8px;
  height: 8px;
}

.stock-status--depth::after {
  position: absolute;
  inset: -3px;
  content: "";
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0.28;
}

.stock-status--breadth {
  background: transparent;
  border: 1px solid var(--ink);
}

.stock-status.is-ready {
  opacity: 0.58;
  transform: scale(1.05);
}

.stock-status.is-working {
  opacity: 0.76;
  animation: dot-flow 1s ease-in-out infinite;
}

.stock-status.is-working:nth-child(2) {
  animation-delay: 120ms;
}

.stock-status.is-working:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes core-arrive {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(18px);
  }
}

@keyframes core-breathe {
  to {
    border-radius: 54% 46% 56% 44% / 44% 55% 45% 56%;
    transform: translateY(-5px) rotate(0.25deg);
  }
}

@keyframes node-arrive {
  from {
    opacity: 0;
  }
}

@keyframes active-orbit-one {
  to {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.015);
  }
}

@keyframes depth-transition-travel {
  from {
    opacity: 0.36;
    transform:
      translate(-50%, -50%)
      rotate(-164deg)
      translateX(var(--radius));
  }

  12% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform:
      translate(-50%, -50%)
      rotate(-56deg)
      translateX(var(--radius));
  }
}

@keyframes depth-transition-arc {
  from {
    --depth-arc-progress: 0deg;
    opacity: 0.16;
  }

  12% {
    opacity: 0.7;
  }

  to {
    --depth-arc-progress: 108deg;
    opacity: 0.82;
  }
}

@keyframes next-depth-charge {
  0% {
    filter: saturate(0.72);
    opacity: 0.62;
  }

  78% {
    filter: saturate(1);
    opacity: 0.86;
  }

  100% {
    filter: saturate(1.18);
    opacity: 1;
    transform:
      translate(-50%, -50%)
      rotate(var(--depth-angle))
      translateX(var(--radius))
      scale(1.14);
  }
}

@keyframes neighbour-system-nudge {
  0%,
  12%,
  36%,
  100% {
    transform: translate(0, 0);
  }

  20%,
  26% {
    transform: translate(var(--nudge-x), var(--nudge-y));
  }
}

@keyframes neighbour-glimpse {
  0%,
  16%,
  33%,
  100% {
    opacity: 0;
    transform: translateY(7px) scale(0.96);
  }

  21%,
  28% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes system-impact {
  0%,
  17%,
  34%,
  100% {
    opacity: 0;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--system-color) 24%, transparent);
    transform: scale(0.4);
  }

  21% {
    opacity: 0.88;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--system-color) 24%, transparent);
    transform: scale(1);
  }

  29% {
    opacity: 0;
    box-shadow: 0 0 0 28px color-mix(in srgb, var(--system-color) 0%, transparent);
    transform: scale(2.4);
  }
}

@keyframes depth-placeholder-pulse {
  50% {
    opacity: 0.16;
    transform:
      translate(-50%, -50%)
      rotate(var(--depth-angle))
      translateX(var(--radius))
      scale(0.82);
  }
}

@keyframes ambient-drift {
  to {
    border-radius: 59% 41% 43% 57%;
    transform: translate(8vw, 5vw) scale(1.12);
  }
}

@keyframes signal-pulse {
  50% {
    box-shadow: 0 0 0 18px color-mix(in srgb, var(--core-color) 4%, transparent);
    transform: scale(0.72);
  }
}

@keyframes dot-flow {
  50% {
    opacity: 0.72;
    transform: translateY(-3px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes interpretation-arrive {
  from {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
}

@media (max-width: 760px) {
  .interpretation {
    top: 70px;
    width: calc(100vw - 40px);
  }

  .context-field {
    inset: 8vh 0 22vh;
  }

  .context-core {
    width: calc(100vw - 54px);
    min-width: 0;
    min-height: 310px;
    padding: 56px 42px;
  }

  .context-core__reality {
    max-width: 24ch;
    font-size: clamp(25px, 8vw, 34px);
  }

  .stay-deeper {
    bottom: 0;
    max-width: calc(100vw - 72px);
  }

  .context-node--depth {
    --radius: calc(50vw - 22px);
    width: 34px;
    height: 34px;
  }

  .depth-transition {
    --radius: calc(50vw - 22px);
  }

  .depth-current {
    --radius: calc(50vw - 22px);
  }

  .active-orbital-system__orbit {
    --active-orbit-size: calc(100vw - 44px);
  }

  .neighbour-system {
    width: 190px;
    height: 190px;
  }

  .neighbour-system__orbit--inner {
    inset: 35px;
  }

  .neighbour-system--slot-1 {
    top: -116px;
    right: -88px;
  }

  .neighbour-system--slot-2 {
    top: 17%;
    left: -132px;
  }

  .neighbour-system--slot-3 {
    top: 43%;
    right: -136px;
  }

  .neighbour-system--slot-4 {
    bottom: -120px;
    left: -88px;
  }

  .neighbour-system--slot-5 {
    right: -92px;
    bottom: -122px;
  }

  .neighbour-system__glimpse {
    width: 132px;
    font-size: 10px;
  }

  .neighbour-system--slot-1 .neighbour-system__glimpse,
  .neighbour-system--slot-3 .neighbour-system__glimpse,
  .neighbour-system--slot-5 .neighbour-system__glimpse {
    right: 132px;
  }

  .neighbour-system--slot-2 .neighbour-system__glimpse,
  .neighbour-system--slot-4 .neighbour-system__glimpse {
    left: 132px;
  }

  .composer--docked {
    bottom: 84px;
    width: calc(100vw - 36px);
  }

  .motion-controls {
    bottom: 164px;
    left: 50%;
  }

  .background-pulse {
    right: 22px;
    bottom: 36px;
  }
}

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

