@font-face {
  font-family: "Avenir Kiduna";
  src: url("./assets/fonts/avenir-book.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Avenir Kiduna";
  src: url("./assets/fonts/avenir-heavy.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Goudy Kiduna";
  src: url("./assets/fonts/goudy-heavyface.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --deep: #060304;
  --field: #0a0604;
  --ground: #1c140d;
  --raised: #271b11;
  --raised-2: #33251a;
  --cream: #fff6d5;
  --cream-muted: #e0d3c4;
  --camel: #c19a6b;
  --quiet: #8f8175;
  --sky: #03ccd9;
  --gold: #eaaa00;
  --alliance: #b99ae8;
  --program: #4fb6d8;
  --project: #d97b2e;
  --relationship: #8fe6c6;
  --community: #62c192;
  --body: "Avenir Kiduna", Avenir, sans-serif;
  --display: "Goudy Kiduna", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--deep);
  color: var(--cream);
}

body,
button,
input {
  font-family: var(--body);
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 1px solid var(--sky);
  outline-offset: 3px;
}

::selection {
  color: var(--deep);
  background: var(--sky);
}

.field-shell,
.v2-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 46% 47%, rgb(90 46 8 / 15%), transparent 35%),
    radial-gradient(circle at 11% 8%, rgb(3 204 217 / 6%), transparent 25%),
    radial-gradient(circle at 87% 65%, rgb(143 230 198 / 4%), transparent 24%),
    linear-gradient(132deg, #060304 0%, #0a0604 52%, #080504 100%);
}

.field-shell::before,
.v2-shell::before {
  content: "";
  position: absolute;
  z-index: -4;
  inset: 0;
  pointer-events: none;
  opacity: 0.76;
  background-image:
    radial-gradient(circle at 6% 27%, #fff6d5 0 1px, transparent 1.8px),
    radial-gradient(circle at 17% 63%, #eaaa00 0 1px, transparent 2px),
    radial-gradient(circle at 31% 14%, #c19a6b 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 47% 20%, #fff6d5 0 1px, transparent 1.8px),
    radial-gradient(circle at 60% 8%, #03ccd9 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 73% 35%, #fff6d5 0 0.8px, transparent 1.5px),
    radial-gradient(circle at 86% 52%, #eaaa00 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 94% 17%, #fff6d5 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 77% 86%, #8fe6c6 0 0.7px, transparent 1.5px),
    radial-gradient(circle at 39% 88%, #fff6d5 0 1.1px, transparent 2px),
    radial-gradient(circle at 55% 69%, #c19a6b 0 0.7px, transparent 1.6px);
}

.field-shell::after,
.v2-shell::after {
  content: "";
  position: absolute;
  z-index: 80;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 150px rgb(0 0 0 / 58%),
    inset 0 0 0 1px rgb(193 154 107 / 15%);
  background: repeating-linear-gradient(
    0deg,
    rgb(255 255 255 / 0.007) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: screen;
}

.ambient-aurora,
.v2-aurora {
  position: absolute;
  z-index: -3;
  inset: -30%;
  pointer-events: none;
  opacity: 0.5;
  filter: blur(95px);
  background:
    radial-gradient(ellipse at 22% 42%, rgb(234 170 0 / 14%), transparent 28%),
    radial-gradient(ellipse at 66% 37%, rgb(185 154 232 / 8%), transparent 23%),
    radial-gradient(ellipse at 78% 69%, rgb(143 230 198 / 9%), transparent 25%),
    radial-gradient(ellipse at 48% 72%, rgb(217 123 46 / 8%), transparent 20%);
  animation: aurora-breathe 14s ease-in-out infinite alternate;
}

.grain,
.v2-grain {
  position: absolute;
  z-index: 75;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background:
    repeating-radial-gradient(circle at 13% 17%, #fff 0 0.35px, transparent 0.6px 4px),
    repeating-radial-gradient(circle at 71% 83%, #fff 0 0.25px, transparent 0.5px 5px);
  mix-blend-mode: soft-light;
}

/* Original Field */

.topbar {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(22px, 3vw, 42px) clamp(22px, 3.2vw, 52px);
  pointer-events: none;
}

.field-heading,
.top-actions {
  pointer-events: auto;
}

.return-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 7px;
  color: var(--sky);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.return-line::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  box-shadow: 0 0 9px currentColor;
}

.field-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(31px, 3vw, 50px);
  line-height: 0.94;
  text-shadow: 0 0 24px rgb(255 246 213 / 11%);
}

.top-actions {
  display: flex;
  gap: 10px;
}

.bob-pill,
.balance-pill {
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid rgb(193 154 107 / 32%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(39 27 17 / 82%), rgb(10 6 4 / 90%));
  box-shadow: inset 0 1px rgb(255 246 213 / 5%), 0 10px 32px rgb(0 0 0 / 28%);
  backdrop-filter: blur(16px);
}

.bob-pill {
  gap: 9px;
  padding: 4px 13px 4px 4px;
  color: var(--cream-muted);
  font-size: 10px;
}

.bob-pill img {
  width: 32px;
  height: 32px;
  border: 1px solid var(--camel);
  border-radius: 50%;
  object-fit: cover;
}

.balance-pill {
  gap: 10px;
  min-width: 142px;
  padding: 0 15px;
}

.balance-star {
  width: 10px;
  height: 10px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%);
}

.balance-pill strong {
  font-family: var(--display);
  font-size: 17px;
}

.balance-pill small {
  margin-left: auto;
  color: var(--quiet);
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field-viewport {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
}

.field-world {
  position: absolute;
  inset: 0;
  transform: scale(var(--field-zoom, 1));
  transform-origin: center;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.connection-map {
  position: absolute;
  z-index: 1;
  inset: 2% -1% -3%;
  width: 102%;
  height: 101%;
  overflow: visible;
  pointer-events: none;
}

.connection {
  fill: none;
  vector-effect: non-scaling-stroke;
  opacity: 0.38;
  transition: opacity 280ms ease, filter 280ms ease, stroke-width 280ms ease;
}

.connection.is-active {
  opacity: 0.98;
  filter: drop-shadow(0 0 5px currentColor);
}

.orbit-line {
  color: var(--gold);
  stroke: currentColor;
  stroke-width: 0.12;
}

.orbit-line.secondary {
  color: var(--camel);
  stroke: currentColor;
  stroke-dasharray: 0.9 1.6;
}

.braid-line {
  color: var(--relationship);
  stroke: currentColor;
  stroke-width: 0.12;
}

.braid-line.secondary {
  color: var(--sky);
  stroke: currentColor;
  stroke-dasharray: 1.4 1.1;
}

.anchor-line {
  color: var(--camel);
  stroke: currentColor;
  stroke-width: 0.12;
}

.crossing-line {
  color: var(--program);
  stroke: currentColor;
  stroke-width: 0.11;
}

.crossing-line.secondary {
  color: var(--relationship);
}

.connection-point {
  fill: var(--cream);
  opacity: 0.9;
  filter: drop-shadow(0 0 3px var(--cream));
}

.anchor-diamond {
  fill: var(--field);
  stroke: var(--gold);
  stroke-width: 0.12;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(45deg);
}

.relation-tag {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgb(193 154 107 / 48%);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
}

.relation-tag.active {
  color: var(--cream-muted);
  text-shadow: 0 0 8px currentColor;
}

.relation-tag.orbit {
  top: 14%;
  left: 37%;
}

.relation-tag.anchor {
  top: 57%;
  left: 13%;
}

.relation-tag.braid {
  top: 42%;
  left: 71%;
}

.relation-tag.crossing {
  top: 76%;
  left: 56%;
}

.realm-node {
  --realm-color: var(--gold);
  position: absolute;
  z-index: 6;
  top: var(--y);
  left: var(--x);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 280px;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.sigil-wrap {
  position: relative;
  flex: 0 0 auto;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--realm-color) 44%, transparent));
  transition: transform 430ms cubic-bezier(0.16, 1, 0.3, 1), filter 430ms ease;
}

.sigil-wrap::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid color-mix(in srgb, var(--realm-color) 37%, transparent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 250ms ease, transform 430ms ease;
}

.realm-node:hover .sigil-wrap,
.realm-node.is-selected .sigil-wrap {
  transform: scale(1.08);
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--realm-color) 72%, transparent))
    drop-shadow(0 0 36px color-mix(in srgb, var(--realm-color) 26%, transparent));
}

.realm-node:hover .sigil-wrap::before,
.realm-node.is-selected .sigil-wrap::before {
  opacity: 1;
  transform: scale(1);
}

.sigil {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.pulse {
  position: absolute;
  z-index: -1;
  inset: 18%;
  border: 1px solid color-mix(in srgb, var(--realm-color) 48%, transparent);
  border-radius: 50%;
  opacity: 0;
}

.realm-node.is-selected .pulse {
  animation: signal-pulse 2.8s ease-out infinite;
}

.node-copy {
  min-width: 112px;
  text-shadow: 0 2px 10px var(--deep), 0 0 16px var(--deep);
}

.node-type {
  display: block;
  margin-bottom: 3px;
  color: var(--realm-color);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.node-name {
  display: block;
  color: color-mix(in srgb, var(--realm-color) 69%, var(--cream));
  font-family: var(--display);
  font-size: clamp(15px, 1.32vw, 23px);
  line-height: 1;
}

.realm-node:hover .node-name,
.realm-node.is-selected .node-name {
  color: var(--cream);
  text-shadow: 0 0 13px color-mix(in srgb, var(--realm-color) 60%, transparent);
}

.node-status {
  display: block;
  margin-top: 5px;
  color: var(--quiet);
  font-size: 8px;
}

.ally-node {
  position: absolute;
  z-index: 8;
  top: 80%;
  left: 19%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.ally-portrait {
  width: 64px;
  height: 64px;
  padding: 4px;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--cream) 42%, var(--camel));
  box-shadow: 0 0 0 2px var(--deep), 0 0 0 3px rgb(234 170 0 / 60%), 0 0 24px rgb(234 170 0 / 24%);
  transition: transform 260ms ease;
}

.ally-node:hover .ally-portrait,
.ally-node.is-selected .ally-portrait {
  transform: scale(1.08);
}

.ally-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ally-copy {
  display: grid;
  gap: 2px;
}

.ally-copy strong {
  font-family: var(--display);
  font-size: 17px;
}

.ally-copy small {
  color: var(--camel);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail-card {
  --detail-color: var(--gold);
  position: absolute;
  z-index: 30;
  bottom: clamp(22px, 3vw, 42px);
  left: clamp(22px, 3.2vw, 52px);
  width: min(330px, calc(100vw - 44px));
  padding: 16px 18px 14px;
  border: 1px solid rgb(193 154 107 / 28%);
  border-radius: 15px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--detail-color) 10%, transparent), transparent 62%),
    linear-gradient(150deg, rgb(28 20 13 / 84%), rgb(6 3 4 / 93%));
  box-shadow: inset 0 1px rgb(255 246 213 / 4%), 0 20px 55px rgb(0 0 0 / 36%);
  backdrop-filter: blur(20px);
}

.detail-topline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.detail-type {
  color: var(--detail-color);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.detail-live {
  color: var(--quiet);
  font-size: 7px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
}

.detail-card p {
  margin: 6px 0 13px;
  color: var(--quiet);
  font-size: 10px;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-actions button {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.enter-button {
  border: 1px solid color-mix(in srgb, var(--detail-color) 65%, var(--cream));
  color: var(--deep);
  background: color-mix(in srgb, var(--detail-color) 72%, var(--cream));
}

.inspect-button {
  border: 1px solid rgb(193 154 107 / 30%);
  background: rgb(6 3 4 / 44%);
}

.field-controls {
  position: absolute;
  z-index: 35;
  right: clamp(22px, 3.2vw, 52px);
  bottom: clamp(22px, 3vw, 42px);
  display: flex;
  gap: 8px;
}

.control-group {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 4px;
  border: 1px solid rgb(193 154 107 / 26%);
  border-radius: 10px;
  background: rgb(10 6 4 / 80%);
  backdrop-filter: blur(14px);
}

.control-group button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.legend-toggle {
  padding: 0 11px;
  color: var(--camel);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.control-button {
  width: 30px;
  font-size: 17px;
}

.zoom-label {
  min-width: 42px;
  color: var(--quiet);
  font-size: 8px;
  text-align: center;
}

.relations-panel {
  position: absolute;
  z-index: 34;
  right: clamp(22px, 3.2vw, 52px);
  bottom: calc(clamp(22px, 3vw, 42px) + 48px);
  width: 266px;
  padding: 14px;
  border: 1px solid rgb(193 154 107 / 25%);
  border-radius: 13px;
  opacity: 0;
  background: linear-gradient(150deg, rgb(28 20 13 / 91%), rgb(6 3 4 / 95%));
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(18px);
}

.relations-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.relations-panel h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 17px;
}

.grammar-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.grammar-item {
  padding: 8px;
  border: 1px solid rgb(193 154 107 / 16%);
  border-radius: 8px;
  background: rgb(6 3 4 / 30%);
}

.grammar-item strong {
  display: block;
  font-family: var(--display);
  font-size: 12px;
}

.grammar-item small {
  color: var(--quiet);
  font-size: 6px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* V2 */

.v2-shell {
  min-height: 680px;
}

.v2-studio-bar {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 66px;
  padding: 0 20px;
  border-bottom: 1px solid rgb(193 154 107 / 24%);
  background: linear-gradient(180deg, rgb(18 12 7 / 96%), rgb(10 6 4 / 90%));
  box-shadow: 0 12px 38px rgb(0 0 0 / 28%);
  backdrop-filter: blur(20px);
}

.v2-brand {
  display: block;
  width: 118px;
}

.v2-brand img {
  display: block;
  width: 100%;
}

.v2-studio-controls {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(260px, 1.6fr) minmax(130px, 0.65fr) auto;
  gap: 8px;
  min-width: 0;
}

.v2-studio-select {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  height: 40px;
  padding: 4px 22px 4px 10px;
  border: 1px solid rgb(193 154 107 / 27%);
  border-radius: 6px;
  background: rgb(39 27 17 / 62%);
}

.v2-studio-select::after {
  content: "⌄";
  position: absolute;
  top: 10px;
  right: 8px;
  color: var(--camel);
}

.v2-studio-select small {
  color: var(--camel);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.v2-studio-select strong {
  overflow: hidden;
  margin-top: 4px;
  color: var(--cream-muted);
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-stories,
.v2-design-kit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.v2-stories {
  padding: 0 13px;
  border: 1px solid rgb(193 154 107 / 28%);
  background: rgb(39 27 17 / 60%);
}

.v2-design-kit {
  padding: 0 14px;
  color: var(--deep);
  background: var(--sky);
}

.v2-stage {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 72fr) minmax(320px, 28fr);
  height: calc(100dvh - 66px);
}

.v2-field {
  --v2-field-opacity: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid rgb(3 204 217 / 22%);
  opacity: var(--v2-field-opacity);
  transition: opacity 240ms ease;
}

.v2-field-intro {
  position: absolute;
  z-index: 28;
  top: 20px;
  left: 22px;
  display: flex;
  gap: 18px;
  max-width: 62%;
  padding: 10px 12px;
  border: 1px solid rgb(193 154 107 / 18%);
  border-radius: 10px;
  background: rgb(6 3 4 / 48%);
  backdrop-filter: blur(15px);
}

.v2-version {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--sky);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.v2-field-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(19px, 1.7vw, 27px);
  line-height: 1;
}

.v2-field-intro p {
  margin: 4px 0 0;
  color: var(--quiet);
  font-size: 8px;
  line-height: 1.45;
}

.v2-field-guidance {
  max-width: 240px;
  padding-left: 12px;
  border-left: 1px solid rgb(3 204 217 / 30%);
}

.v2-world {
  position: absolute;
  z-index: 2;
  inset: 18% 0 0;
  transform: scale(var(--v2-zoom, 1));
  transform-origin: 52% 56%;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.v2-region {
  position: absolute;
  z-index: 0;
  border: 1px solid rgb(193 154 107 / 20%);
  border-radius: 50%;
  pointer-events: none;
}

.v2-region::after {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: inherit;
  background: radial-gradient(ellipse, rgb(193 154 107 / 4%), transparent 69%);
}

.v2-region span {
  position: absolute;
  top: -10px;
  left: 14%;
  color: rgb(193 154 107 / 56%);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.v2-care {
  top: 31%;
  left: 13%;
  width: 46%;
  height: 46%;
  border-color: rgb(217 123 46 / 24%);
  transform: rotate(7deg);
}

.v2-place {
  top: 49%;
  left: 51%;
  width: 43%;
  height: 36%;
  border-color: rgb(143 230 198 / 24%);
  transform: rotate(4deg);
}

.v2-formation {
  top: 17%;
  left: 14%;
  width: 28%;
  height: 22%;
  border-color: rgb(3 204 217 / 26%);
}

.v2-culture {
  top: 20%;
  left: 72%;
  width: 24%;
  height: 22%;
  border-color: rgb(185 154 232 / 25%);
}

.v2-connections {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.v2-connection {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-width: 0.75;
  opacity: 0.2;
  transition: opacity 240ms ease, stroke-width 240ms ease, filter 240ms ease;
}

.v2-connection.is-active {
  stroke-width: 1.15;
  opacity: 0.94;
  filter: drop-shadow(0 0 4px currentColor);
}

.v2-warm {
  color: var(--project);
  stroke: currentColor;
}

.v2-cool {
  color: var(--sky);
  stroke: currentColor;
}

.v2-mint {
  color: var(--relationship);
  stroke: currentColor;
}

.v2-violet {
  color: var(--alliance);
  stroke: currentColor;
  stroke-dasharray: 2 2.6;
}

.v2-current-path {
  color: var(--gold);
  stroke: currentColor;
  stroke-dasharray: 2.2 2.8;
}

.v2-star-point {
  fill: var(--cream);
  opacity: 0.8;
  filter: drop-shadow(0 0 3px var(--cream));
}

.v2-node {
  --v2-color: var(--gold);
  position: absolute;
  z-index: 8;
  top: var(--v2-y);
  left: var(--v2-x);
  display: grid;
  justify-items: center;
  width: max-content;
  max-width: 150px;
  padding: 0;
  border: 0;
  text-align: center;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.v2-sigil-shell {
  position: relative;
  display: block;
  width: var(--v2-size);
  height: var(--v2-size);
  border-radius: 50%;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--v2-color) 42%, transparent));
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 420ms ease;
}

.v2-sigil-shell::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid color-mix(in srgb, var(--v2-color) 48%, transparent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 240ms ease, transform 400ms ease;
}

.v2-node:hover .v2-sigil-shell,
.v2-node.is-selected .v2-sigil-shell {
  transform: scale(1.09);
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--v2-color) 70%, transparent))
    drop-shadow(0 0 34px color-mix(in srgb, var(--v2-color) 25%, transparent));
}

.v2-node:hover .v2-sigil-shell::before,
.v2-node.is-selected .v2-sigil-shell::before {
  opacity: 1;
  transform: scale(1);
}

.v2-sigil-shell img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.v2-signal {
  position: absolute;
  z-index: -1;
  inset: 18%;
  border: 1px solid color-mix(in srgb, var(--v2-color) 48%, transparent);
  border-radius: 50%;
  opacity: 0;
}

.v2-node.is-selected .v2-signal {
  animation: signal-pulse 2.8s ease-out infinite;
}

.v2-glyph {
  position: absolute;
  right: 0;
  bottom: 7%;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border: 1px solid color-mix(in srgb, var(--v2-color) 70%, var(--cream));
  border-radius: 50%;
  color: var(--cream);
  font-size: 9px;
  background: var(--field);
  box-shadow: 0 0 9px color-mix(in srgb, var(--v2-color) 50%, transparent);
}

.v2-node-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: -1px;
  text-shadow: 0 2px 10px var(--deep);
}

.v2-node-copy strong {
  color: color-mix(in srgb, var(--v2-color) 58%, var(--cream));
  font-family: var(--display);
  font-size: clamp(10px, 0.9vw, 14px);
  line-height: 1;
  white-space: nowrap;
}

.v2-node-copy small {
  color: var(--quiet);
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.v2-current-realm {
  position: absolute;
  z-index: 29;
  top: 106px;
  left: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: min(325px, 40%);
  min-width: 270px;
  height: 70px;
  padding: 6px 9px 6px 6px;
  border: 1px solid rgb(193 154 107 / 25%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 50%, rgb(234 170 0 / 9%), transparent 50%),
    rgb(10 6 4 / 70%);
  backdrop-filter: blur(18px);
}

.v2-current-sigil {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 12px rgb(234 170 0 / 32%));
  transition: transform 240ms ease;
}

.v2-current-sigil:hover,
.v2-current-sigil.is-selected {
  transform: scale(1.08);
}

.v2-current-sigil img {
  width: 100%;
  height: 100%;
}

.v2-current-realm div {
  display: grid;
  gap: 3px;
}

.v2-current-realm small {
  color: var(--sky);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.v2-current-realm strong {
  font-family: var(--display);
  font-size: 21px;
}

.v2-inspect-button {
  height: 31px;
  padding: 0 11px;
  border: 1px solid rgb(234 170 0 / 38%);
  border-radius: 999px;
  color: var(--cream-muted);
  font-size: 8px;
  font-weight: 800;
  background: rgb(39 27 17 / 62%);
  cursor: pointer;
}

.v2-navigation-card,
.v2-compute-card,
.v2-actions-card,
.v2-inspection {
  border: 1px solid rgb(193 154 107 / 23%);
  background: linear-gradient(150deg, rgb(28 20 13 / 81%), rgb(6 3 4 / 91%));
  box-shadow: inset 0 1px rgb(255 246 213 / 4%), 0 18px 44px rgb(0 0 0 / 31%);
  backdrop-filter: blur(18px);
}

.v2-navigation-card {
  position: absolute;
  z-index: 28;
  top: 187px;
  left: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: min(325px, 40%);
  min-width: 270px;
  min-height: 61px;
  padding: 8px 10px;
  border-radius: 10px;
}

.v2-panel-dots {
  grid-column: 1 / -1;
  color: var(--quiet);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.v2-navigation-card strong {
  color: var(--camel);
  font-size: 8px;
}

.v2-navigation-card button {
  justify-self: end;
  height: 25px;
  padding: 0 10px;
  border: 1px solid rgb(3 204 217 / 45%);
  border-radius: 999px;
  color: var(--cream-muted);
  font-size: 7px;
  background: rgb(3 204 217 / 10%);
  cursor: pointer;
}

.v2-compute-card {
  position: absolute;
  z-index: 30;
  top: 20px;
  right: 20px;
  width: 215px;
  min-height: 178px;
  padding: 11px 12px;
  border-radius: 12px;
}

.v2-panel-heading,
.v2-compute-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v2-panel-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid rgb(193 154 107 / 14%);
}

.v2-panel-heading strong,
.v2-panel-heading span {
  color: var(--camel);
  font-size: 8px;
}

.v2-compute-value {
  margin-top: 12px;
}

.v2-compute-value small {
  color: var(--gold);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.v2-compute-value strong {
  font-size: 11px;
}

.v2-compute-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0 12px;
}

.v2-compute-card dl div {
  display: grid;
  gap: 3px;
}

.v2-compute-card dt,
.v2-compute-card dd {
  margin: 0;
  font-size: 7px;
}

.v2-compute-card dt {
  color: var(--quiet);
}

.v2-compute-card dd {
  color: var(--camel);
}

.v2-compute-card a {
  display: block;
  padding-top: 10px;
  border-top: 1px solid rgb(193 154 107 / 14%);
  color: var(--sky);
  font-size: 8px;
  text-decoration: none;
}

.v2-actions-card {
  position: absolute;
  z-index: 30;
  top: 211px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 215px;
  height: 38px;
  padding: 0 11px;
  border-color: rgb(234 170 0 / 35%);
  border-radius: 999px;
}

.v2-actions-card span,
.v2-actions-card strong {
  color: var(--quiet);
  font-size: 7px;
}

.v2-actions-card strong {
  color: var(--cream-muted);
}

.v2-inspection {
  --v2-detail-color: var(--gold);
  position: absolute;
  z-index: 31;
  bottom: 23px;
  left: 22px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.15fr) auto;
  align-items: center;
  gap: 14px;
  width: min(585px, calc(100% - 175px));
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 0 50%, color-mix(in srgb, var(--v2-detail-color) 10%, transparent), transparent 44%),
    linear-gradient(150deg, rgb(28 20 13 / 84%), rgb(6 3 4 / 93%));
}

.v2-inspection .v2-detail-heading {
  display: grid;
  gap: 4px;
}

.v2-inspection .v2-detail-heading span {
  color: var(--v2-detail-color);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.v2-inspection h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
}

.v2-inspection dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.v2-inspection dl div {
  display: grid;
  gap: 3px;
}

.v2-inspection dt,
.v2-inspection dd {
  margin: 0;
  font-size: 7px;
}

.v2-inspection dt {
  color: var(--quiet);
}

.v2-inspection dd {
  color: var(--cream-muted);
}

.v2-inspection .v2-current-copy {
  margin: 0;
  color: var(--quiet);
  font-size: 8px;
}

.v2-enter {
  height: 31px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--v2-detail-color) 52%, var(--cream));
  border-radius: 999px;
  color: var(--cream);
  font-size: 7px;
  font-weight: 800;
  background: color-mix(in srgb, var(--v2-detail-color) 14%, var(--deep));
  cursor: pointer;
  white-space: nowrap;
}

.v2-zoom {
  position: absolute;
  z-index: 32;
  right: 20px;
  bottom: 23px;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 4px;
  border: 1px solid rgb(193 154 107 / 25%);
  border-radius: 9px;
  background: rgb(10 6 4 / 82%);
  backdrop-filter: blur(14px);
}

.v2-zoom button {
  width: 29px;
  height: 29px;
  border: 0;
  color: var(--cream);
  font-size: 17px;
  background: transparent;
  cursor: pointer;
}

.v2-zoom span {
  min-width: 42px;
  color: var(--quiet);
  font-size: 7px;
  text-align: center;
}

.v2-pan-hint {
  position: absolute;
  z-index: 22;
  right: 20px;
  bottom: 67px;
  margin: 0;
  color: rgb(143 129 117 / 54%);
  font-size: 6px;
}

.v2-ki {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 23px 19px;
  background:
    radial-gradient(circle at 0 0, rgb(3 204 217 / 8%), transparent 29%),
    linear-gradient(160deg, rgb(9 40 42 / 52%), rgb(10 6 4 / 90%) 42%);
  box-shadow: inset 1px 0 rgb(3 204 217 / 11%);
  backdrop-filter: blur(24px);
}

.v2-ki::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background: linear-gradient(transparent, var(--sky) 22% 72%, transparent);
  box-shadow: 0 0 12px rgb(3 204 217 / 34%);
}

.v2-ki-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v2-ki-header img {
  width: 53px;
  height: 53px;
  filter: drop-shadow(0 0 11px rgb(3 204 217 / 23%));
}

.v2-ki-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 39px;
}

.v2-focus-control {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.v2-focus-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--quiet);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v2-focus-control strong {
  color: var(--sky);
}

.v2-focus-control input {
  width: 100%;
  accent-color: var(--sky);
}

.v2-ki-copy {
  position: relative;
  margin-top: 42px;
  padding-left: 18px;
  border-left: 1px solid rgb(3 204 217 / 51%);
}

.v2-ki-copy p {
  margin: 0;
  color: var(--cream-muted);
  font-size: clamp(12px, 1.1vw, 16px);
  line-height: 1.52;
}

.v2-ki-copy strong {
  display: block;
  margin-top: 18px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.55;
}

.v2-ki-selection {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3px 10px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid rgb(193 154 107 / 18%);
  border-radius: 10px;
  background: rgb(6 3 4 / 29%);
}

.v2-ki-selection small {
  grid-column: 1 / -1;
  color: var(--sky);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.v2-ki-selection strong {
  font-family: var(--display);
  font-size: 18px;
}

.v2-ki-selection span {
  color: var(--quiet);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v2-ki-bottom {
  margin-top: auto;
}

.v2-prompt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.v2-prompt-buttons button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgb(193 154 107 / 26%);
  border-radius: 999px;
  color: var(--cream-muted);
  font-size: 7px;
  background: rgb(10 6 4 / 49%);
  cursor: pointer;
}

.v2-message-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 5px;
  min-height: 50px;
  padding: 5px;
  border: 1px solid rgb(193 154 107 / 27%);
  border-radius: 10px;
  background: rgb(6 3 4 / 56%);
}

.v2-message-box input {
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  color: var(--cream);
  font-size: 10px;
  background: transparent;
}

.v2-message-box button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--sky);
  background: transparent;
  cursor: pointer;
}

.v2-message-box .v2-send {
  color: var(--cream);
  background: rgb(3 204 217 / 17%);
}

.v2-message-box .v2-send:disabled {
  color: var(--quiet);
  background: rgb(3 204 217 / 7%);
}

@keyframes aurora-breathe {
  from {
    transform: translate3d(-1%, -1%, 0) scale(0.98);
  }
  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.03);
  }
}

@keyframes signal-pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.65);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@media (max-width: 1120px) {
  .v2-design-kit,
  .v2-field-guidance {
    display: none;
  }

  .v2-studio-bar {
    grid-template-columns: 120px 1fr;
  }

  .v2-stage {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .v2-compute-card,
  .v2-actions-card {
    width: 196px;
  }

  .node-status {
    display: none;
  }
}

@media (max-width: 850px) {
  html,
  body {
    overflow: auto;
  }

  .v2-shell {
    min-width: 800px;
    min-height: 1200px;
  }

  .v2-studio-select:nth-child(2),
  .v2-stories {
    display: none;
  }

  .v2-studio-controls {
    grid-template-columns: 1fr 1fr;
  }

  .v2-stage {
    grid-template-columns: 1fr;
    height: auto;
  }

  .v2-field {
    height: 700px;
  }

  .v2-ki {
    min-height: 500px;
  }
}

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