/* Living Current production layer — generated surfaces are implementation assets. */

:root {
  --paper: #d8ccb8;
  --paper-light: #f7f0e4;
  --paper-deep: #baaa90;
  --mineral-edge: rgba(232, 221, 201, 0.34);
  --mineral-shadow: rgba(4, 11, 15, 0.66);
}

html {
  background: #c9baa3;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 16%, rgba(247, 240, 228, 0.88), transparent 28rem),
    radial-gradient(circle at 86% 76%, rgba(156, 134, 101, 0.42), transparent 34rem),
    linear-gradient(135deg, #e7ddcd, #c2b298 62%, #a79375);
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    repeating-linear-gradient(112deg, transparent 0 18px, rgba(23, 41, 52, 0.06) 19px 20px),
    repeating-radial-gradient(circle at 25% 10%, transparent 0 14px, rgba(13, 23, 28, 0.045) 15px 16px);
  mix-blend-mode: multiply;
}

.ambient-map {
  opacity: 0.15;
  background-image: url("assets/living-current/living-current-background.png");
  background-position: center;
  background-size: cover;
  filter: grayscale(0.2) sepia(0.12) contrast(0.84);
  mix-blend-mode: multiply;
}

.ambient-current {
  width: min(54vw, 720px);
  height: auto;
  object-fit: contain;
  opacity: 0.28;
  border: 0;
  filter: drop-shadow(0 12px 28px rgba(13, 23, 28, 0.35));
}

.ambient-current--one {
  top: 5%;
  left: -8vw;
  transform: rotate(18deg);
}

.ambient-current--two {
  right: -10vw;
  bottom: 4%;
  transform: rotate(-8deg);
}

.pilot-shell {
  isolation: isolate;
  display: grid;
  height: 100svh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  width: min(100%, 560px);
  background:
    linear-gradient(180deg, rgba(13, 23, 28, 0.56), rgba(13, 23, 28, 0.92) 34%, #0d171c 100%),
    url("assets/living-current/living-current-background.png") center top / 100% auto no-repeat,
    #0d171c;
  border-inline: 1px solid rgba(247, 240, 228, 0.24);
  box-shadow:
    0 36px 110px rgba(23, 31, 31, 0.5),
    inset 0 0 0 1px rgba(197, 149, 54, 0.1);
}

.pilot-shell::before,
.pilot-shell::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.pilot-shell::before {
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 14rem, rgba(13, 23, 28, 0.7) 27rem, rgba(13, 23, 28, 0.98) 52rem),
    repeating-linear-gradient(130deg, transparent 0 26px, rgba(185, 236, 243, 0.018) 27px 28px);
}

.pilot-shell::after {
  top: 104px;
  right: -86px;
  width: 280px;
  aspect-ratio: 1;
  opacity: 0.14;
  background: url("assets/living-current/topographic-flourish.png") center / contain no-repeat;
  transform: rotate(32deg);
}

.pilot-header {
  position: relative;
  min-height: 82px;
  padding: 14px 20px 12px;
  background:
    linear-gradient(180deg, rgba(13, 23, 28, 0.96), rgba(13, 23, 28, 0.74)),
    url("assets/living-current/living-current-background.png") center 7% / cover;
  border-bottom: 1px solid rgba(232, 221, 201, 0.2);
  box-shadow: 0 12px 36px rgba(4, 9, 12, 0.3);
  backdrop-filter: blur(20px) saturate(1.15);
}

.pilot-shell.is-focus-mode .pilot-header {
  display: none;
}

.brand-lockup {
  gap: 12px;
}

.brand-spark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.42));
}

.brand-spark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  color: var(--paper-light);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-current {
  color: var(--current);
  font-size: 8px;
  letter-spacing: 0.34em;
}

.pilot-badge {
  color: var(--mineral);
  background: rgba(23, 41, 52, 0.72);
  border-color: rgba(197, 149, 54, 0.34);
}

.pilot-menu > summary {
  color: var(--paper-light);
  background: rgba(247, 240, 228, 0.08);
  border-color: rgba(247, 240, 228, 0.18);
}

.pilot-menu__surface {
  color: var(--ink-950);
  background:
    linear-gradient(rgba(247, 240, 228, 0.93), rgba(232, 221, 201, 0.96)),
    url("assets/living-current/primary-button-slab.png") center / cover;
  border-color: rgba(13, 23, 28, 0.34);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

.hatch-rail {
  padding: 14px 20px 12px;
  background: rgba(13, 23, 28, 0.72);
  border-bottom-color: rgba(232, 221, 201, 0.12);
  backdrop-filter: blur(16px);
}

.hatch-rail__label,
.hatch-rail__count {
  color: var(--mineral);
}

.hatch-rail__track {
  gap: 7px;
}

.hatch-rail__segment {
  height: 5px;
  background: rgba(247, 240, 228, 0.13);
  border: 1px solid rgba(247, 240, 228, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hatch-rail__segment.is-complete {
  background: linear-gradient(90deg, var(--gold), #f2d898 45%, var(--current));
  box-shadow: 0 0 12px rgba(185, 236, 243, 0.35);
}

.pilot-screen {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0;
  scrollbar-width: none;
}

.pilot-screen::-webkit-scrollbar {
  display: none;
}

.screen {
  min-height: 100%;
  gap: 18px;
  padding: 26px 22px calc(28px + var(--safe-bottom));
}

.screen::before {
  position: absolute;
  z-index: -1;
  top: 7rem;
  left: -12%;
  width: 124%;
  height: 28rem;
  pointer-events: none;
  content: "";
  opacity: 0.09;
  background: url("assets/living-current/topographic-flourish.png") center / contain no-repeat;
  filter: saturate(0.72);
}

.eyebrow {
  color: #d9b968;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.display-title {
  max-width: 12ch;
  margin-top: -3px;
  color: var(--paper-light);
  font-size: clamp(46px, 11vw, 66px);
  line-height: 0.94;
  letter-spacing: -0.052em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.46);
}

.display-title--small {
  max-width: 16ch;
  font-size: clamp(35px, 8.4vw, 49px);
  line-height: 0.98;
}

.lead {
  max-width: 42ch;
  color: #e4d9c6;
  font-size: 17px;
  line-height: 1.56;
}

.body-copy,
.simulation-note,
.saved-note {
  color: rgba(247, 240, 228, 0.78);
}

.welcome-signal {
  position: relative;
  display: grid;
  min-height: 168px;
  place-items: center;
  overflow: hidden;
  margin: 4px -22px -6px;
}

.welcome-signal__current {
  position: absolute;
  width: 118%;
  opacity: 0.86;
  filter: drop-shadow(0 0 24px rgba(185, 236, 243, 0.2));
}

.welcome-signal__core {
  position: relative;
  z-index: 1;
  width: 122px;
  height: 122px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  animation: core-breathe 4.8s var(--ease-settle) infinite;
}

.welcome-signal span {
  position: absolute;
  z-index: 2;
  bottom: 5px;
  color: var(--mineral);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.27em;
}

.beacon {
  position: relative;
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 4px;
  min-height: 236px;
  overflow: hidden;
  padding: 0;
  color: var(--ink-950);
  background:
    linear-gradient(135deg, rgba(247, 240, 228, 0.98), rgba(215, 199, 174, 0.96)),
    url("assets/living-current/primary-button-slab.png") center / cover;
  border: 1px solid rgba(247, 240, 228, 0.58);
  border-radius: 28px 12px 28px 12px;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(13, 23, 28, 0.12);
}

.beacon::after {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 86px;
  height: 86px;
  content: "";
  opacity: 0.2;
  background: url("assets/living-current/panel-corner.png") center / contain no-repeat;
  transform: rotate(90deg);
}

.beacon__portrait {
  position: relative;
  align-self: stretch;
  min-height: 236px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 41, 52, 0.12), rgba(13, 23, 28, 0.72)),
    url("assets/living-current/living-current-background.png") center / cover;
}

.beacon__art {
  position: absolute;
  z-index: 2;
  right: -7%;
  bottom: 2px;
  width: 122%;
  height: 98%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.48));
}

.beacon__current {
  position: absolute;
  z-index: 1;
  left: -25%;
  bottom: -2%;
  width: 160%;
  opacity: 0.72;
  filter: drop-shadow(0 0 12px rgba(185, 236, 243, 0.28));
  transform: rotate(-14deg);
}

.beacon__copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 24px 23px 25px 18px;
}

.beacon__eyebrow {
  color: #77581d;
  letter-spacing: 0.26em;
}

.beacon h2 {
  margin-top: 5px;
  color: var(--ink-950);
  font-family: var(--display);
  font-size: clamp(24px, 6vw, 31px);
  line-height: 1.02;
  letter-spacing: -0.034em;
}

.beacon p:last-child {
  margin-top: 10px;
  color: #3e4b50;
  font-size: 13px;
  line-height: 1.48;
}

.action-stack {
  gap: 12px;
  margin-top: 4px;
}

.signal-button {
  position: relative;
  isolation: isolate;
  min-height: 66px;
  overflow: hidden;
  padding: 12px 26px;
  color: var(--ink-950);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(180deg, #f1e7d7 0%, #ddcdb4 48%, #c7b18d 100%);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(77, 57, 28, 0.28);
  font-size: 16px;
  letter-spacing: 0.015em;
  transition: transform 160ms var(--ease-settle), filter 160ms ease, box-shadow 160ms ease;
}

.signal-button::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0.42;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.44), transparent 34%, rgba(91, 66, 32, 0.12) 76%, transparent);
  pointer-events: none;
}

.signal-button > * {
  position: relative;
  z-index: 1;
}

.signal-button:hover {
  color: var(--ink-950);
  filter: brightness(1.05) saturate(1.03);
  transform: translateY(-2px);
}

.signal-button:disabled {
  color: rgba(13, 23, 28, 0.46);
  filter: saturate(0.45);
  cursor: default;
  opacity: 0.64;
  transform: none;
}

.signal-button:active {
  filter: brightness(0.98);
  transform: translateY(1px) scale(0.985);
  box-shadow:
    0 6px 13px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(77, 57, 28, 0.35);
}

.signal-button--secondary {
  color: var(--paper-light);
  background:
    linear-gradient(180deg, rgba(247, 240, 228, 0.08), transparent),
    linear-gradient(180deg, #263b45, #15252d);
  border: 1px solid rgba(185, 236, 243, 0.24);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(247, 240, 228, 0.12);
}

.signal-button--secondary:hover {
  color: white;
  background-color: transparent;
}

.button-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #77581d;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(13, 23, 28, 0.14);
  border-radius: 999px;
}

.signal-button--secondary .button-icon {
  color: var(--gold);
  background: rgba(13, 23, 28, 0.22);
  border-color: rgba(197, 149, 54, 0.3);
}

.system-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.button-icon .system-icon {
  width: 18px;
  height: 18px;
}

.app-tabbar {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: calc(68px + var(--safe-bottom));
  padding: 7px 12px calc(7px + var(--safe-bottom));
  background:
    linear-gradient(180deg, rgba(22, 39, 48, 0.94), rgba(8, 17, 22, 0.99)),
    url("assets/living-current/living-current-background.png") center bottom / cover;
  border-top: 1px solid rgba(232, 221, 201, 0.16);
  box-shadow: 0 -18px 38px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(1.08);
}

.app-tabbar[hidden] {
  display: none;
}

.app-tab {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 5px 8px;
  color: rgba(232, 221, 201, 0.58);
  background: transparent;
  border: 0;
  border-radius: 16px 7px 16px 7px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-settle);
}

.app-tab:hover:not(:disabled) {
  color: var(--paper-light);
  background: rgba(247, 240, 228, 0.05);
}

.app-tab:active:not(:disabled) {
  transform: scale(0.97);
}

.app-tab.is-active {
  color: var(--current);
  background: linear-gradient(180deg, rgba(185, 236, 243, 0.09), rgba(185, 236, 243, 0.025));
}

.app-tab.is-active::before {
  position: absolute;
  top: 2px;
  width: 28px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--current), transparent);
  box-shadow: 0 0 10px rgba(185, 236, 243, 0.5);
}

.app-tab:disabled {
  color: rgba(135, 149, 155, 0.28);
  cursor: default;
}

.app-tab__icon {
  display: grid;
  place-items: center;
}

.app-tab__icon .system-icon {
  width: 21px;
  height: 21px;
}

.app-tab__label {
  overflow: hidden;
  max-width: 100%;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-tab__lock {
  position: absolute;
  top: 9px;
  right: calc(50% - 18px);
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.screen--onboarding {
  justify-content: center;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 4px;
}

.onboarding-progress > span {
  height: 4px;
  overflow: hidden;
  background: rgba(247, 240, 228, 0.1);
  border-radius: 999px;
}

.onboarding-progress > span::after {
  display: block;
  width: 100%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, var(--gold), var(--current));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-settle);
}

.onboarding-progress > span.is-active::after {
  transform: scaleX(1);
}

.onboarding-choice-list {
  display: grid;
  gap: 9px;
  margin-block: 4px 8px;
}

.onboarding-choice {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 10px 13px;
  color: var(--paper-light);
  text-align: left;
  background: linear-gradient(135deg, rgba(247, 240, 228, 0.07), rgba(23, 41, 52, 0.72));
  border: 1px solid rgba(232, 221, 201, 0.14);
  border-radius: 18px 8px 18px 8px;
  cursor: pointer;
  transition: transform 160ms var(--ease-settle), border-color 160ms ease, background-color 160ms ease;
}

.onboarding-choice:hover,
.onboarding-choice.is-selected {
  background: linear-gradient(135deg, rgba(185, 236, 243, 0.12), rgba(23, 41, 52, 0.84));
  border-color: rgba(185, 236, 243, 0.48);
}

.onboarding-choice:active {
  transform: scale(0.985);
}

.onboarding-choice__icon,
.onboarding-choice__asset {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--current);
  object-fit: contain;
  background: rgba(13, 23, 28, 0.56);
  border: 1px solid rgba(185, 236, 243, 0.16);
  border-radius: 15px 7px 15px 7px;
}

.onboarding-choice__icon .system-icon {
  width: 25px;
  height: 25px;
}

.onboarding-choice__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.onboarding-choice__copy strong {
  color: var(--paper-light);
  font-size: 14px;
  line-height: 1.2;
}

.onboarding-choice__copy small {
  overflow: hidden;
  color: rgba(232, 221, 201, 0.65);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-choice__check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: transparent;
  border: 1px solid rgba(232, 221, 201, 0.2);
  border-radius: 50%;
}

.onboarding-choice__check .system-icon {
  width: 14px;
  height: 14px;
}

.onboarding-choice.is-selected .onboarding-choice__check {
  color: var(--ink-950);
  background: var(--current);
  border-color: var(--current);
}

.promise-core {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  margin: -22px -22px -8px;
}

.screen--promise {
  gap: 14px;
  padding-top: 18px;
}

.promise-core__current {
  position: absolute;
  width: 112%;
  opacity: 0.7;
}

.promise-core__egg {
  position: relative;
  z-index: 1;
  width: 152px;
  height: 168px;
  object-fit: contain;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
  animation: core-breathe 4.8s var(--ease-settle) infinite;
}

.screen--promise .lead strong {
  color: var(--paper-light);
  font-weight: 700;
}

.promise-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  color: var(--current);
  text-align: left;
  background: rgba(185, 236, 243, 0.065);
  border-left: 2px solid rgba(185, 236, 243, 0.48);
}

.promise-note p {
  margin: 0;
  color: rgba(247, 240, 228, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.screen--welcome .beacon {
  min-height: 176px;
}

.screen--welcome .beacon__portrait {
  min-height: 176px;
}

.screen--welcome .beacon__copy {
  padding-block: 18px;
}

.screen--welcome .beacon__art {
  height: 108%;
}

.safety-list {
  gap: 10px;
}

.safety-rule {
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(247, 240, 228, 0.1), rgba(23, 41, 52, 0.8));
  border-color: rgba(232, 221, 201, 0.16);
  border-radius: 18px 8px 18px 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.safety-rule__icon {
  color: var(--gold);
  background: rgba(13, 23, 28, 0.68);
  border-color: rgba(197, 149, 54, 0.26);
}

.environment-constellation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 8px 4px;
}

.environment-constellation figure {
  display: grid;
  min-width: 0;
  place-items: center;
  margin: 0;
}

.environment-constellation__asset {
  width: min(100%, 74px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.4));
}

.environment-constellation figcaption {
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  color: var(--mineral);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.mission-intro {
  align-items: end;
}

.mission-count {
  color: var(--paper-light);
  background: rgba(13, 23, 28, 0.62);
  border-color: rgba(197, 149, 54, 0.26);
  box-shadow: inset 0 0 18px rgba(185, 236, 243, 0.08);
}

.core-step__orb {
  color: var(--mineral);
  background: #192b34;
  border-color: rgba(232, 221, 201, 0.2);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.38);
}

.core-step.is-complete .core-step__orb {
  color: var(--ink-950);
  background: var(--current);
  box-shadow: 0 0 24px rgba(185, 236, 243, 0.42);
}

.mission-slab,
.status-slab,
.trait-panel,
.workshop-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(28, 47, 58, 0.97), rgba(12, 23, 29, 0.98)),
    url("assets/living-current/living-current-background.png") center / cover;
  border: 1px solid rgba(232, 221, 201, 0.2);
  border-radius: 28px 10px 28px 10px;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(185, 236, 243, 0.035);
}

.mission-slab {
  min-height: 310px;
  padding: 94px 24px 24px;
}

.mission-slab::before {
  position: absolute;
  z-index: 1;
  right: -4px;
  bottom: -4px;
  width: 126px;
  height: 126px;
  content: "";
  opacity: 0.38;
  background: url("assets/living-current/panel-corner.png") center / contain no-repeat;
  transform: rotate(90deg);
}

.mission-slab::after {
  right: -12%;
  bottom: -18%;
  width: 84%;
  opacity: 0.34;
  background: url("assets/living-current/route-horizontal.png") center / contain no-repeat;
  transform: rotate(-8deg);
}

.mission-slab__glyph,
.mission-slab__environment {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.46));
}

.mission-slab__glyph {
  top: 20px;
  left: 22px;
  width: 62px;
  height: 62px;
}

.mission-slab__environment {
  top: 16px;
  right: 18px;
  width: 74px;
  height: 74px;
}

.mission-chip {
  position: relative;
  z-index: 2;
  min-height: 36px;
  padding: 8px 17px;
  color: var(--paper-light);
  background: url("assets/living-current/mission-chip-frame.png") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 17px rgba(0, 0, 0, 0.26);
}

.mission-slab h2 {
  position: relative;
  z-index: 2;
  max-width: 12ch;
  color: var(--paper-light);
  font-size: 36px;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.mission-slab p,
.mission-meta {
  position: relative;
  z-index: 2;
}

.route-stage {
  isolation: isolate;
  height: min(64vh, 540px);
  min-height: 430px;
  overflow: hidden;
  margin: 0 -22px;
  background: #101e25;
  border-block: 1px solid rgba(232, 221, 201, 0.2);
  border-radius: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.route-stage::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(13, 23, 28, 0.66), transparent 20%, transparent 72%, rgba(13, 23, 28, 0.74)),
    linear-gradient(90deg, rgba(13, 23, 28, 0.34), transparent 20% 80%, rgba(13, 23, 28, 0.34));
}

.route-stage__map {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
  filter: saturate(0.85) contrast(1.02) brightness(0.82);
}

.route-stage__production-current {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 50%;
  width: 42%;
  height: 84%;
  object-fit: contain;
  opacity: 0.88;
  filter: drop-shadow(0 0 20px rgba(185, 236, 243, 0.45));
  transform: translateX(-50%) rotate(4deg);
}

.route-stage svg {
  z-index: 3;
  inset: 9% 10%;
  width: 80%;
  height: 82%;
  opacity: 0.54;
  mix-blend-mode: screen;
}

.route-base {
  stroke: rgba(13, 23, 28, 0.7);
}

.route-progress {
  stroke-width: 4px;
  filter: drop-shadow(0 0 8px rgba(185, 236, 243, 0.8));
}

.route-orb {
  z-index: 6;
  color: var(--ink-950);
  background: var(--gold);
  border-color: #f2d898;
  box-shadow: 0 0 0 7px rgba(185, 236, 243, 0.16), 0 0 28px rgba(185, 236, 243, 0.8);
}

.collect-pulse {
  position: absolute;
  z-index: 4;
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0.88;
  filter: drop-shadow(0 0 14px rgba(185, 236, 243, 0.28));
}

.collect-pulse--one {
  top: 20%;
  right: 13%;
}

.collect-pulse--two {
  top: 49%;
  left: 10%;
  width: 50px;
  height: 50px;
}

.collect-pulse--three {
  right: 16%;
  bottom: 13%;
  width: 44px;
  height: 44px;
}

.mission-metrics {
  position: relative;
  z-index: 6;
  margin-top: -88px;
  padding: 14px;
  background: rgba(13, 23, 28, 0.82);
  border: 1px solid rgba(232, 221, 201, 0.16);
  border-radius: 22px 8px 22px 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
}

.mission-metric strong {
  color: var(--paper-light);
  font-size: 20px;
}

.mission-metric span {
  color: var(--current);
}

.mission-dock {
  gap: 10px;
  padding: 14px 18px calc(14px + var(--safe-bottom));
  background:
    linear-gradient(180deg, rgba(13, 23, 28, 0.9), rgba(13, 23, 28, 0.99)),
    url("assets/living-current/living-current-background.png") center bottom / cover;
  border-top-color: rgba(232, 221, 201, 0.18);
  box-shadow: 0 -22px 46px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

.dock-button {
  min-height: 82px;
  color: var(--mineral);
  background: rgba(247, 240, 228, 0.045);
  border-color: rgba(247, 240, 228, 0.14);
  border-radius: 18px 8px 18px 8px;
}

.dock-button--primary {
  color: var(--ink-950);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), transparent 42%),
    linear-gradient(180deg, #f1e7d7, #d6c3a3 56%, #bfa57c);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(77, 57, 28, 0.3);
}

.dock-button__asset {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.34));
}

.dock-button--pause .dock-button__asset {
  width: 54px;
  height: 54px;
}

.dock-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pause-beacon {
  width: min(72%, 320px);
  max-height: 330px;
  object-fit: contain;
  margin: -10px auto -48px;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
}

.pause-emblem {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pause-emblem__asset {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 22px rgba(0, 0, 0, 0.46));
}

.saved-note {
  padding: 14px 18px;
  background: rgba(247, 240, 228, 0.07);
  border-color: rgba(247, 240, 228, 0.14);
}

.spark-reveal {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  margin: -14px -22px -12px;
  overflow: hidden;
}

.spark-reveal::before {
  position: absolute;
  inset: 8% 4%;
  content: "";
  background: radial-gradient(circle, rgba(197, 149, 54, 0.18), transparent 54%);
}

.spark-reveal__stage {
  position: relative;
  z-index: 2;
  width: min(70%, 300px);
  max-height: 315px;
  object-fit: contain;
  filter: drop-shadow(0 26px 36px rgba(0, 0, 0, 0.56));
  animation: spark-settle 1100ms var(--ease-settle) both;
}

.spark-reveal__current {
  position: absolute;
  z-index: 1;
  width: 116%;
  opacity: 0.75;
  filter: drop-shadow(0 0 24px rgba(185, 236, 243, 0.36));
  transform: rotate(-8deg);
}

.recap-stats {
  background: rgba(247, 240, 228, 0.07);
  border-color: rgba(232, 221, 201, 0.14);
  border-radius: 24px 8px 24px 8px;
}

.recap-stat strong {
  color: var(--paper-light);
}

.candidate-signal {
  position: relative;
  display: grid;
  min-height: 112px;
  place-items: center;
  overflow: hidden;
  margin: -4px -22px 0;
}

.candidate-signal__current {
  position: absolute;
  width: 112%;
  opacity: 0.68;
}

.candidate-signal__core {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.5));
}

.candidate-list {
  gap: 20px;
}

.candidate-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(247, 240, 228, 0.98), rgba(211, 194, 168, 0.95)),
    url("assets/living-current/primary-button-slab.png") center / cover;
  border: 1px solid rgba(247, 240, 228, 0.52);
  border-radius: 32px 10px 32px 10px;
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.4);
}

.candidate-card::before,
.home-companion::before,
.birth-card::before {
  position: absolute;
  z-index: 4;
  right: -7px;
  bottom: -7px;
  width: 116px;
  height: 116px;
  pointer-events: none;
  content: "";
  opacity: 0.5;
  background: url("assets/living-current/panel-corner.png") center / contain no-repeat;
  transform: rotate(90deg);
}

.candidate-card .companion-portrait,
.home-companion .companion-portrait,
.birth-card .companion-portrait {
  background:
    linear-gradient(180deg, rgba(23, 41, 52, 0.16), rgba(13, 23, 28, 0.86)),
    url("assets/living-current/living-current-background.png") center / cover;
  border-bottom: 1px solid rgba(197, 149, 54, 0.24);
}

.companion-portrait::after {
  opacity: 0.44;
  background-image: url("assets/living-current/route-horizontal.png");
  background-position: center 84%;
  background-repeat: no-repeat;
  background-size: 84% auto;
}

.companion-art img {
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 26px 26px rgba(0, 0, 0, 0.5));
}

.companion-portrait[data-family="veer"] .companion-art {
  inset: 8% 1% 7%;
}

.companion-portrait[data-family="sail"] .companion-art {
  inset: 3% 12% 2%;
}

.companion-portrait[data-family="tor"] .companion-art {
  inset: 4% 7% 3%;
}

.skip-link:focus {
  transform: translateY(-160%);
}

html[data-keyboard-nav="true"] .skip-link:focus-visible {
  transform: translateY(0);
}

.candidate-card__body {
  position: relative;
  z-index: 5;
  padding: 22px;
  color: var(--ink-950);
}

.candidate-card h2 {
  color: var(--ink-950);
  font-size: 38px;
}

.candidate-card p {
  color: #415057;
}

.family-tag {
  color: #5d4a26;
  background: rgba(197, 149, 54, 0.13);
  border-color: rgba(119, 88, 29, 0.24);
}

.candidate-card .signal-button--secondary {
  color: var(--paper-light);
}

.trait-panel {
  padding: 22px 18px;
}

.trait-panel__heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.trait-panel__knob {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
}

.trait-panel__label {
  margin: 0;
  color: var(--mineral);
}

.trait-button {
  position: relative;
  overflow: hidden;
  color: var(--paper-light);
  background: rgba(247, 240, 228, 0.055);
  border-color: rgba(232, 221, 201, 0.14);
  border-radius: 16px 7px 16px 7px;
}

.trait-button::before {
  position: absolute;
  top: 50%;
  left: 9px;
  width: 11px;
  height: 11px;
  content: "";
  background: url("assets/living-current/trait-knob.png") center / contain no-repeat;
  transform: translateY(-50%);
}

.trait-button strong,
.trait-button span {
  padding-left: 11px;
}

.trait-button:hover,
.trait-button.is-active {
  background: rgba(185, 236, 243, 0.12);
  border-color: rgba(185, 236, 243, 0.36);
  box-shadow: inset 0 0 22px rgba(185, 236, 243, 0.06);
}

.birth-card,
.home-companion {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(247, 240, 228, 0.98), rgba(211, 194, 168, 0.95)),
    url("assets/living-current/primary-button-slab.png") center / cover;
  border-color: rgba(247, 240, 228, 0.52);
  border-radius: 32px 10px 32px 10px;
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.4);
}

.birth-card__caption,
.home-companion__caption {
  position: relative;
  z-index: 5;
  color: var(--ink-950);
  background: transparent;
}

.birth-card__caption h2,
.home-companion__caption h2 {
  color: var(--ink-950);
}

.birth-card__caption p,
.birth-card__caption small,
.home-companion__caption p {
  color: #47555a;
}

.home-companion__core {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.3));
}

.workshop-header {
  position: relative;
  z-index: 2;
  padding: 7px 0 15px;
  border-bottom-color: rgba(232, 221, 201, 0.15);
}

.workshop-header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--mineral);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.workshop-header__glyph {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.round-button {
  color: var(--paper-light);
  background: rgba(247, 240, 228, 0.07);
  border-color: rgba(247, 240, 228, 0.17);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
}

.workshop-section {
  padding: 20px 18px;
}

.workshop-section__heading p,
.combination-note {
  color: rgba(247, 240, 228, 0.68);
}

.status-slab {
  padding: 20px;
}

.pilot-footer {
  color: rgba(232, 221, 201, 0.68);
  background: rgba(13, 23, 28, 0.88);
  border-top-color: rgba(232, 221, 201, 0.12);
}

@keyframes core-breathe {
  0%, 100% { transform: scale(0.98); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55)); }
  50% { transform: scale(1.045); filter: drop-shadow(0 0 24px rgba(185, 236, 243, 0.35)) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55)); }
}

@keyframes spark-settle {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 760px) {
  body {
    padding: 26px;
  }

  .pilot-shell {
    height: calc(100svh - 52px);
    min-height: calc(100svh - 52px);
    border: 1px solid rgba(247, 240, 228, 0.42);
    border-radius: 42px 14px 42px 14px;
  }

  .pilot-header {
    border-radius: 40px 12px 0 0;
  }

  .app-tabbar {
    border-radius: 0 0 40px 12px;
  }
}

@media (max-width: 759px) {
  .pilot-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100svh;
    margin: 0;
  }
}

@media (max-width: 430px) {
  .pilot-screen {
    padding-inline: 0;
  }

  .screen {
    padding-inline: 18px;
  }

  .welcome-signal,
  .candidate-signal,
  .spark-reveal,
  .route-stage {
    margin-inline: -18px;
  }

  .display-title {
    font-size: clamp(43px, 13vw, 57px);
  }

  .display-title--small {
    font-size: clamp(34px, 10.4vw, 44px);
  }

  .beacon {
    grid-template-columns: 42% 1fr;
    min-height: 220px;
  }

  .beacon__portrait {
    min-height: 220px;
  }

  .beacon__copy {
    padding: 20px 18px 21px 12px;
  }

  .beacon h2 {
    font-size: 25px;
  }

  .beacon p:last-child {
    font-size: 12px;
  }

  .route-stage {
    min-height: 390px;
  }

  .screen--promise .promise-core {
    min-height: 172px;
    margin-top: -18px;
  }

  .screen--promise .promise-core__egg {
    width: 128px;
    height: 144px;
  }

  .screen--promise .lead {
    font-size: 15px;
    line-height: 1.45;
  }
}

@media (max-width: 350px) {
  .beacon {
    grid-template-columns: 1fr;
  }

  .beacon__portrait {
    min-height: 210px;
  }

  .beacon__art {
    width: 84%;
    right: 8%;
  }

  .beacon__copy {
    padding: 18px 20px 24px;
  }

  .environment-constellation {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-signal__core,
  .spark-reveal__stage,
  .promise-core__egg {
    animation: none;
  }

  .signal-button {
    transition-duration: 0.1s;
  }
}

@media (prefers-contrast: more) {
  .pilot-shell {
    background-color: #061015;
  }

  .lead,
  .body-copy,
  .simulation-note,
  .saved-note {
    color: #fff;
  }

  .mission-slab,
  .status-slab,
  .trait-panel,
  .workshop-section {
    border-color: var(--paper-light);
  }
}
