:root {
  --ux-gold: #f0cf68;
  --ux-gold-strong: #ffd96a;
  --ux-ink: #070812;
  --ux-panel: rgba(10, 12, 24, 0.96);
  --ux-panel-soft: rgba(18, 21, 38, 0.92);
  --ux-line: rgba(240, 207, 104, 0.28);
  --ux-text: #f6f1df;
  --ux-muted: #b7b2a5;
  --ux-cyan: #78e7e0;
  --ux-violet: #ad8cff;
  --ux-heart: #ff8fb7;
}

.ux-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ux-hud {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147482000;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ux-text);
}

.ux-hud button,
.ux-modal button,
.ux-drawer button,
.ux-wizard button {
  font: inherit;
}

.ux-hud-main,
.ux-hud-map,
.ux-wizard-toggle {
  border: 1px solid var(--ux-line);
  color: var(--ux-text);
  background: linear-gradient(145deg, rgba(30, 32, 51, 0.98), rgba(8, 9, 18, 0.98));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5), inset 0 0 26px rgba(240, 207, 104, 0.04);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ux-hud-main:hover,
.ux-hud-map:hover,
.ux-wizard-toggle:hover,
.ux-hud-main:focus-visible,
.ux-hud-map:focus-visible,
.ux-wizard-toggle:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 217, 106, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58), 0 0 24px rgba(240, 207, 104, 0.14);
  outline: none;
}

.ux-hud-main {
  min-width: 174px;
  padding: 11px 14px;
  border-radius: 15px;
  text-align: left;
}

.ux-hud-level {
  display: block;
  color: var(--ux-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ux-hud-xp {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ux-muted);
}

.ux-hud-progress {
  display: block;
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.ux-hud-progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ux-gold), var(--ux-cyan));
  transition: width 420ms ease;
}

.ux-hud-map,
.ux-wizard-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.ux-wizard-toggle {
  position: relative;
  overflow: visible;
  border-color: rgba(120, 231, 224, 0.36);
}

.ux-wizard-toggle img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: drop-shadow(0 0 10px rgba(240, 207, 104, 0.38));
}

.ux-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 35%, rgba(83, 58, 145, 0.22), transparent 48%),
    rgba(2, 3, 9, 0.82);
  backdrop-filter: blur(8px);
}

.ux-backdrop[hidden],
.ux-drawer[hidden],
.ux-wizard[hidden],
.ux-toast[hidden] {
  display: none !important;
}

.ux-modal {
  position: relative;
  width: min(720px, 96vw);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid rgba(240, 207, 104, 0.4);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 48px);
  color: var(--ux-text);
  background:
    radial-gradient(circle at 50% 0, rgba(240, 207, 104, 0.12), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(120, 231, 224, 0.08), transparent 38%),
    var(--ux-panel);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.75), inset 0 0 68px rgba(173, 140, 255, 0.05);
  font-family: Inter, "Segoe UI", sans-serif;
}

.ux-modal::before,
.ux-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(240, 207, 104, 0.14);
}

.ux-modal::before {
  width: 250px;
  height: 250px;
  top: -145px;
  right: -80px;
}

.ux-modal::after {
  width: 330px;
  height: 330px;
  bottom: -250px;
  left: -110px;
}

.ux-step-label {
  color: var(--ux-cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ux-modal h2 {
  margin: 12px 0 12px;
  color: var(--ux-gold-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 5vw, 50px);
  line-height: 1.03;
  text-wrap: balance;
}

.ux-modal > p,
.ux-question-copy {
  margin: 0;
  color: var(--ux-muted);
  line-height: 1.7;
  font-size: 15px;
}

.ux-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.ux-choice {
  min-height: 92px;
  padding: 16px 17px;
  border: 1px solid rgba(240, 207, 104, 0.2);
  border-radius: 16px;
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ux-choice:hover,
.ux-choice:focus-visible,
.ux-choice[aria-pressed="true"] {
  transform: translateY(-2px);
  border-color: rgba(240, 207, 104, 0.68);
  background: rgba(240, 207, 104, 0.09);
  outline: none;
}

.ux-choice strong,
.ux-choice small {
  display: block;
}

.ux-choice strong {
  color: var(--ux-gold);
  font-size: 15px;
}

.ux-choice small {
  margin-top: 6px;
  color: var(--ux-muted);
  line-height: 1.45;
}

.ux-consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 25px;
  padding: 14px 16px;
  border: 1px solid rgba(120, 231, 224, 0.18);
  border-radius: 14px;
  background: rgba(120, 231, 224, 0.045);
  color: var(--ux-muted);
  font-size: 12px;
  line-height: 1.55;
}

.ux-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--ux-gold);
}

.ux-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.ux-primary,
.ux-secondary {
  min-height: 48px;
  padding: 12px 19px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ux-primary {
  border: 1px solid #ffe9a7;
  color: #16110a;
  background: linear-gradient(135deg, #fff0ae, #d7aa3f);
  box-shadow: 0 10px 28px rgba(240, 207, 104, 0.2);
}

.ux-secondary {
  border: 1px solid var(--ux-line);
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.035);
}

.ux-primary:hover,
.ux-secondary:hover,
.ux-primary:focus-visible,
.ux-secondary:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(120, 231, 224, 0.45);
  outline-offset: 2px;
}

.ux-route-preview {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.ux-route-stop {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(240, 207, 104, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
}

.ux-route-stop > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ux-gold);
  background: rgba(240, 207, 104, 0.1);
  font-style: normal;
}

.ux-route-stop strong,
.ux-route-stop small {
  display: block;
}

.ux-route-stop small {
  margin-top: 3px;
  color: var(--ux-muted);
}

.ux-route-stop em {
  color: var(--ux-cyan);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ux-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 2147482600;
  width: min(520px, 100vw);
  overflow: auto;
  padding: 26px;
  color: var(--ux-text);
  background:
    radial-gradient(circle at 100% 0, rgba(173, 140, 255, 0.14), transparent 34%),
    var(--ux-panel);
  border-left: 1px solid var(--ux-line);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.62);
  font-family: Inter, "Segoe UI", sans-serif;
}

.ux-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ux-drawer h2,
.ux-wizard h3 {
  margin: 5px 0 6px;
  color: var(--ux-gold);
  font-family: Georgia, "Times New Roman", serif;
}

.ux-drawer h2 {
  font-size: 31px;
}

.ux-icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ux-line);
  border-radius: 50%;
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ux-data-note {
  margin: 16px 0;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(120, 231, 224, 0.18);
  color: var(--ux-muted);
  background: rgba(120, 231, 224, 0.04);
  font-size: 12px;
  line-height: 1.55;
}

.ux-zone {
  margin-top: 22px;
}

.ux-zone-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
  color: var(--ux-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ux-node-list {
  display: grid;
  gap: 8px;
}

.ux-node {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  text-decoration: none;
}

.ux-node:hover,
.ux-node:focus-visible {
  border-color: rgba(240, 207, 104, 0.5);
  background: rgba(240, 207, 104, 0.06);
  outline: none;
}

.ux-node-orb {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #131018;
  background: linear-gradient(145deg, var(--ux-gold-strong), #856723);
  box-shadow: 0 0 16px rgba(240, 207, 104, 0.2);
}

.ux-node.unexplored .ux-node-orb {
  color: var(--ux-muted);
  background: #252839;
  box-shadow: none;
}

.ux-node-copy strong,
.ux-node-copy small {
  display: block;
}

.ux-node-copy small {
  margin-top: 3px;
  color: var(--ux-muted);
  line-height: 1.35;
}

.ux-node-state {
  color: var(--ux-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ux-node.unexplored .ux-node-state {
  color: #7f8294;
}

.ux-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ux-wizard {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 70px);
  z-index: 2147482400;
  width: min(370px, calc(100vw - 36px));
  padding: 20px;
  border: 1px solid rgba(120, 231, 224, 0.3);
  border-radius: 22px;
  color: var(--ux-text);
  background:
    radial-gradient(circle at 100% 100%, rgba(120, 231, 224, 0.1), transparent 42%),
    var(--ux-panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.66);
  font-family: Inter, "Segoe UI", sans-serif;
}

.ux-wizard-head {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
}

.ux-wizard-head img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  border: 1px solid rgba(240, 207, 104, 0.42);
}

.ux-wizard h3 {
  font-size: 19px;
}

.ux-wizard-label {
  color: var(--ux-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ux-wizard-message {
  margin: 16px 0;
  color: var(--ux-muted);
  line-height: 1.65;
  font-size: 14px;
}

.ux-wizard-actions {
  display: grid;
  gap: 8px;
}

.ux-wizard-actions button,
.ux-wizard-actions a {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(240, 207, 104, 0.16);
  border-radius: 12px;
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ux-wizard-actions button:hover,
.ux-wizard-actions a:hover,
.ux-wizard-actions button:focus-visible,
.ux-wizard-actions a:focus-visible {
  border-color: rgba(240, 207, 104, 0.55);
  outline: none;
}

.ux-guide-lock {
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #d2c9ad;
  background: rgba(173, 140, 255, 0.07);
  border: 1px solid rgba(173, 140, 255, 0.19);
  font-size: 11px;
  line-height: 1.5;
}

.ux-toast {
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 2147483000;
  transform: translateX(-50%);
  min-width: min(360px, calc(100vw - 36px));
  padding: 13px 18px;
  border: 1px solid rgba(240, 207, 104, 0.46);
  border-radius: 999px;
  color: var(--ux-text);
  background: rgba(9, 10, 20, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.62), 0 0 25px rgba(240, 207, 104, 0.12);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ux-toast b {
  color: var(--ux-gold);
}

/* Standalone Universe Map */
.ux-universe-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ux-text);
  background:
    radial-gradient(circle at 50% 12%, rgba(102, 74, 167, 0.23), transparent 28%),
    radial-gradient(circle at 18% 64%, rgba(120, 231, 224, 0.08), transparent 26%),
    #05060d;
  font-family: Inter, "Segoe UI", sans-serif;
}

.ux-universe-shell {
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 28px 0 120px;
}

.ux-universe-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ux-universe-brand {
  color: var(--ux-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.ux-universe-hero {
  max-width: 850px;
  padding: clamp(72px, 12vw, 150px) 0 58px;
}

.ux-universe-kicker {
  color: var(--ux-cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.ux-universe-hero h1 {
  margin: 15px 0;
  color: var(--ux-gold-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(45px, 9vw, 92px);
  line-height: 0.94;
  text-wrap: balance;
}

.ux-universe-hero p {
  max-width: 720px;
  color: var(--ux-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

.ux-cosmos-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ux-cosmos-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(240, 207, 104, 0.16);
  border-radius: 24px;
  color: var(--ux-text);
  background: linear-gradient(145deg, rgba(24, 27, 47, 0.9), rgba(8, 9, 18, 0.92));
}

.ux-cosmos-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -65px;
  bottom: -65px;
  border-radius: 50%;
  border: 1px solid rgba(240, 207, 104, 0.17);
  box-shadow: 0 0 55px rgba(240, 207, 104, 0.07);
}

.ux-cosmos-card:nth-child(2)::after,
.ux-cosmos-card:nth-child(5)::after {
  border-color: rgba(120, 231, 224, 0.21);
  box-shadow: 0 0 55px rgba(120, 231, 224, 0.08);
}

.ux-cosmos-card h2 {
  margin: 10px 0 9px;
  color: var(--ux-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.ux-cosmos-card p {
  color: var(--ux-muted);
  line-height: 1.6;
}

.ux-cosmos-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.ux-cosmos-links a,
.ux-universe-nav a:not(.ux-universe-brand) {
  padding: 9px 12px;
  border: 1px solid rgba(240, 207, 104, 0.18);
  border-radius: 999px;
  color: var(--ux-text);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.ux-cosmos-links a:hover,
.ux-cosmos-links a:focus-visible,
.ux-universe-nav a:not(.ux-universe-brand):hover,
.ux-universe-nav a:not(.ux-universe-brand):focus-visible {
  border-color: rgba(240, 207, 104, 0.65);
  outline: none;
}

.ux-universe-truth {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(120, 231, 224, 0.18);
  border-radius: 18px;
  color: var(--ux-muted);
  background: rgba(120, 231, 224, 0.035);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .ux-cosmos-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .ux-hud-main {
    min-width: 144px;
  }

  .ux-hud-map {
    display: none;
  }

  .ux-choice-grid,
  .ux-cosmos-grid {
    grid-template-columns: 1fr;
  }

  .ux-modal {
    border-radius: 21px;
  }

  .ux-route-stop {
    grid-template-columns: 34px 1fr;
  }

  .ux-route-stop em {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ux-hud-main,
  .ux-hud-map,
  .ux-wizard-toggle,
  .ux-choice,
  .ux-primary,
  .ux-secondary,
  .ux-hud-progress > i {
    transition: none !important;
  }
}

