:root {
  color-scheme: dark;
  --void: #07090f;
  --void-soft: #0a0e16;
  --panel: rgba(9, 15, 23, 0.94);
  --panel-raised: rgba(13, 22, 32, 0.96);
  --line: #17333b;
  --line-bright: #245663;
  --text: #d8f4f2;
  --text-soft: #9bbfc0;
  --muted: #58777b;
  --cyan: #69e6e1;
  --cyan-dim: #2d8f91;
  --green: #3ddc84;
  --green-dim: #206b4b;
  --red: #ff3b30;
  --red-dim: #7a2728;
  --gold: #e2bb62;
  --blue: #7ec8ff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Noto Sans Mono", monospace;
  --header-height: 78px;
  font-family: var(--mono);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 940px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--text);
}

body {
  background:
    radial-gradient(circle at 72% 28%, rgba(28, 72, 82, 0.12), transparent 28%),
    radial-gradient(circle at 18% 76%, rgba(42, 30, 71, 0.12), transparent 32%),
    var(--void);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(155, 237, 234, 0.7) 4px
  );
  mix-blend-mode: screen;
}

.eyebrow {
  display: block;
  margin: 0 0 5px;
  color: var(--cyan-dim);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #47676b;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.language-switcher button {
  padding: 2px 1px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  transition: color 140ms ease;
}

.language-switcher button:hover,
.language-switcher button:focus-visible,
.language-switcher button[aria-pressed="true"] {
  color: var(--cyan);
}

.terminal-panel {
  background:
    linear-gradient(180deg, rgba(25, 54, 61, 0.08), transparent 50px),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px rgba(120, 224, 220, 0.035);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 61px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header.compact {
  min-height: 52px;
  padding: 10px 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: #e9ffff;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.04em;
}

h2 {
  margin: 0;
  color: #dffafa;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

h3 {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.primary-button,
.ghost-button,
.icon-button,
.map-control,
.action-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line-bright);
  border-radius: 2px;
  background: rgba(31, 72, 80, 0.18);
  color: var(--text);
  font-size: 11px;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease, opacity 130ms ease;
}

.primary-button {
  border-color: #2e8584;
  background: rgba(43, 142, 139, 0.28);
  color: #e6ffff;
}

.primary-button:not(:disabled):hover,
.action-button:not(:disabled):hover {
  border-color: var(--cyan);
  background: rgba(58, 175, 171, 0.23);
}

.ghost-button:not(:disabled):hover,
.icon-button:not(:disabled):hover,
.map-control:not(:disabled):hover {
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.icon-button {
  min-height: 29px;
  padding: 5px 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
}

button:disabled {
  cursor: not-allowed;
  border-color: #24363a;
  background: rgba(31, 41, 44, 0.25);
  color: #536568;
  opacity: 0.72;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 2px;
  background: #080d13;
  color: var(--text);
  caret-color: var(--cyan);
}

input,
select {
  min-height: 37px;
  padding: 7px 9px;
}

textarea {
  resize: vertical;
  padding: 10px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #415d61;
}

label {
  color: var(--text-soft);
  font-size: 11px;
}

.login-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(7, 9, 15, 0.74), rgba(7, 9, 15, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(69, 171, 170, 0.035) 64px),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(69, 171, 170, 0.035) 64px);
}

.login-layer::before {
  content: "";
  position: absolute;
  width: min(720px, 78vw);
  aspect-ratio: 1;
  border: 1px solid rgba(80, 199, 196, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(80, 199, 196, 0.018),
    0 0 0 180px rgba(80, 199, 196, 0.012);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: min(620px, 92vw);
  margin: auto;
  padding: 39px 42px 35px;
  border: 1px solid var(--line-bright);
  background: rgba(7, 13, 20, 0.96);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px rgba(122, 226, 221, 0.07);
}

.login-language-switcher {
  position: absolute;
  right: 17px;
  bottom: 12px;
}

.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--cyan-dim);
}

.login-card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.login-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 26px;
  border: 1px solid #2e777b;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  transform: rotate(45deg);
}

.login-mark::first-line {
  transform: rotate(-45deg);
}

.login-copy {
  max-width: 460px;
  margin-bottom: 24px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.75;
}

.token-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 8px;
}

.token-row .primary-button {
  min-width: 96px;
}

.login-status {
  min-height: 18px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.login-status.error {
  color: #ff7b73;
}

.login-status.connecting::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 1px 1px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: signalBlink 900ms infinite;
}

.login-status.success {
  color: var(--green);
}

.login-view {
  min-height: 93px;
}

.gate-loading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 19px 0 22px;
  border-top: 1px solid rgba(36, 86, 99, 0.45);
  border-bottom: 1px solid rgba(36, 86, 99, 0.28);
  color: #55777a;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.gate-loading-signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gate-loading-signal i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan-dim);
  box-shadow: 0 0 8px rgba(105, 230, 225, 0.28);
  animation: authProbe 1.15s ease-in-out infinite;
}

.gate-loading-signal i:nth-child(2) { animation-delay: 140ms; }
.gate-loading-signal i:nth-child(3) { animation-delay: 280ms; }

@keyframes authProbe {
  0%, 70%, 100% { opacity: 0.2; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-3px); }
}

.oauth-login-button {
  position: relative;
  display: grid;
  min-height: 76px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  overflow: hidden;
  border: 1px solid #358d8a;
  background:
    linear-gradient(90deg, rgba(50, 153, 149, 0.19), rgba(30, 80, 86, 0.07)),
    #091219;
  color: #e8ffff;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.oauth-login-button::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(105, 230, 225, 0.08), transparent 60%);
  content: "";
  transform: translateX(-100%);
  transition: transform 520ms ease;
}

.oauth-login-button:hover,
.oauth-login-button:focus-visible {
  border-color: var(--cyan);
  background-color: #0c1820;
  box-shadow: 0 0 32px rgba(105, 230, 225, 0.1);
}

.oauth-login-button:hover::before,
.oauth-login-button:focus-visible::before {
  transform: translateX(100%);
}

.oauth-provider-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(105, 230, 225, 0.55);
  border-radius: 50%;
  background: rgba(4, 9, 14, 0.75);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.oauth-login-button > span:nth-child(2),
.oauth-login-button small,
.oauth-login-button strong {
  position: relative;
  z-index: 1;
  display: block;
}

.oauth-login-button small {
  margin-bottom: 7px;
  color: #4b777b;
  font-size: 7px;
  letter-spacing: 0.14em;
}

.oauth-login-button strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.oauth-login-button > i {
  position: relative;
  z-index: 1;
  color: var(--cyan);
  font-size: 18px;
  font-style: normal;
  transition: transform 150ms ease;
}

.oauth-login-button:hover > i,
.oauth-login-button:focus-visible > i {
  transform: translateX(4px);
}

.advanced-access {
  margin-top: 15px;
  border-top: 1px solid rgba(36, 86, 99, 0.32);
}

.advanced-access summary {
  padding: 13px 2px 5px;
  color: #527175;
  font-size: 9px;
  list-style: none;
  cursor: pointer;
  transition: color 140ms ease;
}

.advanced-access summary::-webkit-details-marker { display: none; }

.advanced-access summary::before {
  display: inline-block;
  margin-right: 8px;
  color: var(--cyan-dim);
  content: "+";
}

.advanced-access[open] summary::before { content: "−"; }

.advanced-access summary:hover,
.advanced-access summary:focus-visible {
  color: var(--cyan);
}

.advanced-token-form {
  margin-top: 9px;
  padding: 14px;
  border: 1px solid rgba(33, 76, 85, 0.58);
  background: rgba(5, 10, 16, 0.64);
}

.advanced-token-form > p {
  margin-bottom: 12px;
  color: #506d71;
  font-size: 8px;
  line-height: 1.65;
}

.claim-form {
  display: grid;
  gap: 8px;
}

.claim-form label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 3px;
}

.claim-form label span {
  color: #466367;
  font-size: 8px;
}

.claim-form textarea {
  min-height: 72px;
  resize: none;
}

.awakening-button {
  position: relative;
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 20px;
  margin-top: 8px;
  padding: 13px 48px 13px 16px;
  overflow: hidden;
  border: 1px solid #a36d39;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(166, 88, 35, 0.2), rgba(72, 44, 28, 0.08)),
    #14100d;
  color: #f2ddc2;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.awakening-button:hover:not(:disabled),
.awakening-button:focus-visible:not(:disabled) {
  border-color: #e6a561;
  box-shadow: 0 0 28px rgba(220, 123, 57, 0.12);
}

.awakening-button span,
.awakening-button strong {
  grid-column: 1;
}

.awakening-button span {
  color: #8f6746;
  font-size: 7px;
  letter-spacing: 0.13em;
}

.awakening-button strong {
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.awakening-button i {
  position: absolute;
  right: 18px;
  color: #d58c4e;
  font-size: 18px;
  font-style: normal;
}

.canon-arrival {
  padding: 18px;
  border: 1px solid rgba(171, 126, 69, 0.34);
  background: linear-gradient(120deg, rgba(127, 76, 35, 0.1), transparent 62%);
}

.canon-route {
  display: grid;
  width: 124px;
  grid-template-columns: 9px 1fr 9px;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
}

.canon-route span {
  width: 9px;
  height: 9px;
  border: 1px solid #b4773d;
  border-radius: 50%;
}

.canon-route span:first-child {
  background: #ce7545;
  box-shadow: 0 0 9px rgba(206, 117, 69, 0.48);
}

.canon-route span:last-child {
  border-color: #51928f;
  background: #2c615f;
  box-shadow: 0 0 9px rgba(105, 230, 225, 0.24);
}

.canon-route i {
  height: 1px;
  background: linear-gradient(90deg, #9a693c, #315e5d);
}

.canon-arrival > strong {
  color: #e9dbc7;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 18px;
  font-weight: 500;
}

.canon-arrival > p {
  margin: 10px 0 17px;
  color: #817566;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 11px;
  line-height: 1.75;
}

.canon-arrival > a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.canon-arrival > a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}

.account-hud {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
}

.login-layer > .account-hud {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 3;
}

.account-menu {
  position: relative;
}

.account-menu > summary {
  display: grid;
  min-height: 38px;
  grid-template-columns: 27px minmax(0, auto) 8px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--line-bright);
  background: rgba(7, 14, 21, 0.94);
  list-style: none;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.account-menu > summary::-webkit-details-marker { display: none; }

.account-menu > summary:hover,
.account-menu > summary:focus-visible,
.account-menu[open] > summary {
  border-color: var(--cyan-dim);
  background: #0a151d;
}

.account-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #37636a;
  border-radius: 50%;
  background: #0e2028;
  color: var(--cyan);
  font-size: 10px;
}

.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-name {
  max-width: 118px;
  overflow: hidden;
  color: #cbe2e1;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu > summary > i {
  width: 6px;
  height: 6px;
  border-right: 1px solid #52757a;
  border-bottom: 1px solid #52757a;
  font-style: normal;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.account-menu[open] > summary > i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  width: 220px;
  padding: 10px;
  border: 1px solid var(--line-bright);
  background: rgba(5, 11, 17, 0.985);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62);
}

.account-menu-panel > p {
  margin: 0 0 9px;
  padding: 4px 4px 11px;
  border-bottom: 1px solid var(--line);
}

.account-menu-panel > p span,
.account-menu-panel > p strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-language-switcher {
  width: 100%;
  justify-content: flex-end;
  padding: 0 8px 9px;
  border-bottom: 1px solid var(--line);
}

.account-menu-panel > p span {
  color: #47676b;
  font-size: 6px;
  letter-spacing: 0.14em;
}

.account-menu-panel > p strong {
  margin-top: 7px;
  color: #d7eeec;
  font-size: 10px;
  font-weight: 550;
}

.account-menu-action {
  width: 100%;
  min-height: 31px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: #78989a;
  font-size: 8px;
  text-align: left;
}

.account-menu-action:hover:not(:disabled),
.account-menu-action:focus-visible:not(:disabled) {
  background: rgba(47, 110, 116, 0.16);
  color: #d8f4f2;
}

.top-actions > .account-hud {
  margin-left: 2px;
}

/* ---------- Agent-first front door ---------- */

.landing-layer {
  display: block;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 74% 8%, rgba(32, 115, 117, 0.18), transparent 28%),
    radial-gradient(circle at 10% 34%, rgba(69, 45, 105, 0.14), transparent 30%),
    linear-gradient(rgba(7, 9, 15, 0.72), rgba(7, 9, 15, 0.97)),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(69, 171, 170, 0.035) 64px),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(69, 171, 170, 0.035) 64px),
    var(--void);
}

.landing-layer::before {
  position: fixed;
  top: -420px;
  right: -260px;
  width: 920px;
  border-color: rgba(80, 199, 196, 0.075);
  box-shadow:
    0 0 0 105px rgba(80, 199, 196, 0.014),
    0 0 0 240px rgba(80, 199, 196, 0.008);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(36, 86, 99, 0.55);
  background: rgba(6, 10, 16, 0.88);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(15px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.landing-brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #307278;
  background: rgba(21, 61, 68, 0.22);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(45deg);
}

.landing-brand > span:last-child,
.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand strong {
  color: #eaffff;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.landing-brand small {
  margin-top: 4px;
  color: #41666a;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.landing-owner-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
}

.owner-signin-button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border: 1px solid #294950;
  background: rgba(7, 14, 21, 0.76);
  color: #78999b;
  font-size: 8px;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.owner-signin-button:hover,
.owner-signin-button:focus-visible {
  border-color: var(--cyan-dim);
  background: #0a151d;
  color: var(--cyan);
}

.owner-signin-mark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #315860;
  border-radius: 50%;
  color: #6c9799;
  font-size: 6px;
  font-weight: 800;
}

.landing-language-switcher {
  font-size: 8px;
}

.landing-owner-controls > .account-hud {
  position: static;
}

.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0 78px;
}

.landing-hero {
  max-width: 1060px;
  padding: 0 0 92px;
}

.landing-hero .eyebrow {
  margin-bottom: 19px;
  color: #4fa8a8;
  font-size: 9px;
}

.landing-hero h1 {
  max-width: 1040px;
  margin: 0;
  color: #efffff;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: clamp(48px, 6.4vw, 84px);
  font-weight: 450;
  line-height: 0.99;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 0 48px rgba(105, 230, 225, 0.08);
}

.landing-hero-copy {
  max-width: 720px;
  margin: 31px 0 0;
  color: #8fb2b3;
  font-size: 14px;
  line-height: 1.7;
}

.watch-universe-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 28px;
  margin-top: 34px;
  padding: 10px 15px;
  border: 1px solid #30696e;
  background: rgba(28, 81, 84, 0.13);
  color: #bde2e0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.watch-universe-button span:last-child {
  color: var(--cyan);
  font-size: 16px;
  transition: transform 150ms ease;
}

.watch-universe-button:hover,
.watch-universe-button:focus-visible {
  border-color: var(--cyan);
  background: rgba(44, 129, 128, 0.18);
  color: #edffff;
}

.watch-universe-button:hover span:last-child,
.watch-universe-button:focus-visible span:last-child {
  transform: translateX(4px);
}

.agent-onboarding {
  padding: 35px;
  border: 1px solid #1e424b;
  background:
    linear-gradient(145deg, rgba(34, 86, 91, 0.08), transparent 38%),
    rgba(6, 12, 19, 0.83);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.28), inset 0 1px rgba(121, 226, 220, 0.035);
}

.onboarding-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 23px;
}

.onboarding-heading h2,
.landing-how h2 {
  margin-top: 2px;
  color: #edffff;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 28px;
  font-weight: 450;
  letter-spacing: 0.01em;
}

.onboarding-heading > p {
  max-width: 390px;
  margin: 0 0 2px;
  color: #638487;
  font-size: 9px;
  line-height: 1.6;
  text-align: right;
}

.access-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #1d3c44;
  background: rgba(7, 14, 21, 0.9);
  box-shadow: inset 0 1px rgba(124, 225, 221, 0.025);
}

.access-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.access-card h3 {
  margin: 0;
  color: #dff8f6;
  font-size: 13px;
  font-weight: 650;
}

.access-card-number {
  color: #356369;
  font-size: 8px;
}

.copy-setup-button {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #2d5c62;
  background: rgba(25, 66, 70, 0.14);
  color: #78a6a6;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: border-color 130ms ease, color 130ms ease, background 130ms ease;
}

.copy-setup-button:hover,
.copy-setup-button:focus-visible {
  border-color: var(--cyan-dim);
  background: rgba(43, 129, 128, 0.18);
  color: var(--cyan);
}

.access-card > p {
  margin-bottom: 13px;
  color: #69888a;
  font-size: 9px;
  line-height: 1.65;
}

.access-card pre {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid rgba(37, 79, 86, 0.66);
  background: #050a0f;
  color: #a7d8d5;
  font-size: 8px;
  line-height: 1.65;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.access-card .prompt-snippet {
  border-color: rgba(111, 82, 48, 0.46);
  color: #d8c29f;
}

.access-card .access-card-step {
  margin: 14px 0 7px;
  color: #55777a;
  font-size: 8px;
}

.protocol-note {
  display: block;
  margin-top: 8px;
  color: #3f696c;
  font-size: 7px;
}

.access-card-easiest {
  position: relative;
  margin-bottom: 12px;
  padding: 24px 25px;
  overflow: hidden;
  border-color: #9d723c;
  background:
    linear-gradient(115deg, rgba(169, 104, 45, 0.19), rgba(44, 99, 96, 0.08) 68%),
    #0b1115;
  box-shadow: inset 0 1px rgba(255, 223, 169, 0.08), 0 12px 42px rgba(0, 0, 0, 0.24);
}

.access-card-easiest::after {
  position: absolute;
  top: -55px;
  right: -30px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(226, 187, 98, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(226, 187, 98, 0.025);
  content: "";
  pointer-events: none;
}

.access-card-easiest > header {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.access-card-kicker {
  color: #b4864d;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.access-card-easiest h3 {
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 20px;
  font-weight: 450;
}

.access-card-easiest > p {
  margin: 7px 0 13px;
  color: #796d5c;
}

.access-card-easiest blockquote {
  margin: 0;
  padding: 13px 15px;
  border-left: 2px solid #d39a55;
  background: rgba(43, 29, 18, 0.4);
  color: #f0d8b8;
  font-size: 13px;
  line-height: 1.55;
}

.access-card-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.access-card-grid > .access-card {
  grid-column: span 4;
}

.access-card-grid > .access-card-frameworks {
  grid-column: 1 / -1;
}

.invite-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 2px 0;
  color: #5d797b;
  font-size: 8px;
}

.invite-note strong {
  color: #c89658;
  font-weight: 700;
}

.landing-how {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 55px;
  padding: 73px 4px 60px;
}

.landing-how ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-how li {
  min-width: 0;
  padding: 4px 24px 2px;
  border-left: 1px solid #1d3d44;
}

.landing-step-number {
  display: block;
  margin-bottom: 25px;
  color: #365c61;
  font-size: 8px;
}

.landing-how li strong {
  display: block;
  color: #d8efed;
  font-size: 12px;
}

.landing-how li p {
  margin: 10px 0 0;
  color: #607d7f;
  font-size: 8px;
  line-height: 1.7;
}

.landing-secondary-access {
  max-width: 620px;
  margin: 0 auto;
  padding-top: 25px;
  border-top: 1px solid rgba(32, 72, 80, 0.45);
}

.landing-secondary-access .advanced-access {
  margin-top: 0;
  border-top: 0;
}

.landing-access-status {
  margin-bottom: 0;
  text-align: center;
}

.owner-tools-button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #765a36;
  background: rgba(105, 66, 31, 0.14);
  color: #c6a477;
  font-size: 8px;
  line-height: 1.25;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.owner-tools-button:hover,
.owner-tools-button:focus-visible,
.owner-tools-button[aria-expanded="true"] {
  border-color: #c18d50;
  background: rgba(145, 87, 37, 0.2);
  color: #f1d4ab;
}

.top-actions .owner-tools-button {
  max-width: 126px;
  padding-right: 8px;
  padding-left: 8px;
  white-space: normal;
}

.owner-tools-panel {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 120;
  display: flex;
  width: min(470px, calc(100vw - 36px));
  max-height: calc(100vh - 90px);
  flex-direction: column;
  border: 1px solid #315d63;
  background:
    linear-gradient(150deg, rgba(44, 104, 105, 0.11), transparent 34%),
    rgba(5, 11, 17, 0.985);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.68), inset 0 1px rgba(129, 228, 222, 0.05);
}

.owner-tools-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 18px;
  border-bottom: 1px solid #1d3e46;
}

.owner-tools-header h2 {
  color: #e5f8f6;
  font-size: 15px;
}

.owner-tools-body {
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.claim-existing-section > p {
  margin-bottom: 17px;
  color: #789899;
  font-size: 9px;
  line-height: 1.7;
}

.claim-existing-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.claim-existing-form label {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #86a8a8;
  font-size: 9px;
}

.claim-existing-form .primary-button {
  min-width: 135px;
}

.owner-civs {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid #25434a;
}

.owner-civs > h3 {
  margin: 0 0 10px;
  color: #769496;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.owner-civ-list {
  display: grid;
  gap: 7px;
}

.owner-civ-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 11px 12px;
  border: 1px solid #23434a;
  background: rgba(11, 25, 31, 0.54);
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}

.owner-civ-link:hover,
.owner-civ-link:focus-visible {
  border-color: var(--cyan-dim);
  background: rgba(22, 55, 59, 0.45);
}

.owner-civ-link > span,
.owner-civ-link > strong,
.owner-civ-link > code,
.owner-civ-link > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-civ-link > span {
  color: #527477;
  font-size: 7px;
}

.owner-civ-link > strong {
  grid-column: 1;
  color: #d4ecea;
  font-size: 10px;
  font-weight: 600;
}

.owner-civ-link > code {
  grid-column: 1;
  color: #4c686b;
  font-size: 7px;
}

.owner-civ-link > small {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  color: #78aaa9;
  font-size: 8px;
}

.owner-civ-link > small i {
  color: var(--cyan);
  font-style: normal;
}

.owner-registration {
  margin-top: 27px;
  padding-top: 25px;
  border-top: 1px solid #25434a;
}

.owner-registration > header {
  margin-bottom: 19px;
}

.owner-registration > header h3 {
  margin: 6px 0 8px;
  color: #d9c5a8;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 18px;
  font-weight: 450;
}

.owner-registration > header p {
  margin: 0;
  color: #756d61;
  font-size: 8px;
  line-height: 1.6;
}

.owner-status {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 73, 81, 0.45);
}

@media (max-width: 1040px) {
  .landing-shell {
    width: min(100% - 34px, 900px);
    padding-top: 82px;
  }

  .access-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-card-grid > .access-card {
    grid-column: span 1;
  }

  .access-card-grid > .access-card-frameworks {
    grid-column: 1 / -1;
  }

  .landing-how {
    grid-template-columns: 1fr;
    gap: 35px;
  }
}

@media (max-width: 700px) {
  .landing-nav {
    padding-right: 15px;
    padding-left: 15px;
  }

  .landing-brand small,
  .landing-language-switcher {
    display: none;
  }

  .landing-owner-controls {
    gap: 8px;
  }

  .landing-shell {
    width: min(100% - 24px, 620px);
    padding: 65px 0 45px;
  }

  .landing-hero {
    padding-bottom: 65px;
  }

  .landing-hero h1 {
    font-size: clamp(40px, 12vw, 58px);
    line-height: 1.02;
  }

  .landing-hero-copy {
    font-size: 11px;
  }

  .agent-onboarding {
    padding: 16px;
  }

  .onboarding-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .onboarding-heading > p {
    text-align: left;
  }

  .access-card-grid {
    grid-template-columns: 1fr;
  }

  .access-card-grid > .access-card,
  .access-card-grid > .access-card-frameworks {
    grid-column: 1;
  }

  .landing-how ol {
    grid-template-columns: 1fr;
  }

  .landing-how li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0 10px;
    padding: 18px 10px;
    border-top: 1px solid #1d3d44;
    border-left: 0;
  }

  .landing-step-number {
    grid-row: 1 / span 2;
    margin: 2px 0 0;
  }

  .landing-how li p {
    grid-column: 2;
  }

  .owner-tools-panel {
    inset: 72px 10px 10px;
    width: auto;
    max-height: none;
  }

  .claim-existing-form {
    grid-template-columns: 1fr;
  }

  .claim-existing-form .primary-button {
    width: 100%;
  }
}

.app-shell {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.star-death-strip {
  --stellar-color: #e2bb62;
  --stellar-rgb: 226, 187, 98;
  position: relative;
  z-index: 12;
  display: grid;
  flex: 0 0 58px;
  grid-template-columns: 34px minmax(300px, 1fr) minmax(190px, auto) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 8px 18px;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--stellar-rgb), 0.6);
  background:
    linear-gradient(90deg, rgba(var(--stellar-rgb), 0.1), transparent 36%),
    rgba(11, 12, 15, 0.985);
  box-shadow: 0 7px 24px rgba(var(--stellar-rgb), 0.07);
  color: var(--stellar-color);
}

.star-death-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(112deg, transparent 0 28px, rgba(var(--stellar-rgb), 0.025) 29px 30px);
}

.star-death-strip[data-phase="swelling"] {
  --stellar-color: #ff984d;
  --stellar-rgb: 255, 119, 54;
  animation: stellarStripPulse 3.8s ease-in-out infinite;
}

.star-death-strip[data-phase="critical"] {
  --stellar-color: #ff6253;
  --stellar-rgb: 255, 59, 48;
  animation: stellarStripPulse 1.2s ease-in-out infinite;
}

.star-death-strip[data-phase="final"] {
  --stellar-color: #ff3b30;
  --stellar-rgb: 255, 43, 34;
  animation: stellarFinalFlash 0.46s steps(2, end) infinite;
}

.star-death-sigil {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.star-death-sigil::before,
.star-death-sigil::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(var(--stellar-rgb), 0.34);
  border-radius: 50%;
}

.star-death-sigil::after {
  inset: 0;
  border-style: dashed;
  opacity: 0.65;
  animation: stellarOrbit 12s linear infinite;
}

.star-death-sigil span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stellar-color);
  box-shadow: 0 0 8px rgba(var(--stellar-rgb), 0.9), 0 0 19px rgba(var(--stellar-rgb), 0.45);
}

.star-death-copy,
.star-death-remaining {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.star-death-copy .eyebrow {
  margin-bottom: 4px;
  color: rgba(var(--stellar-rgb), 0.58);
}

.star-death-copy strong,
.star-death-remaining strong,
.star-death-remaining span {
  display: block;
}

.star-death-copy strong {
  overflow: hidden;
  color: #f5e9dc;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.star-death-remaining {
  padding-left: 16px;
  border-left: 1px solid rgba(var(--stellar-rgb), 0.23);
}

.star-death-remaining span {
  color: rgba(216, 244, 242, 0.42);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.star-death-remaining strong {
  margin-top: 4px;
  color: var(--stellar-color);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ark-manifest-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-width: 138px;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--stellar-rgb), 0.55);
  background: rgba(var(--stellar-rgb), 0.08);
  color: #f7e8d4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.ark-manifest-link span {
  color: var(--stellar-color);
  font-size: 14px;
}

.ark-manifest-link:hover,
.ark-manifest-link:focus-visible {
  border-color: var(--stellar-color);
  background: rgba(var(--stellar-rgb), 0.15);
  box-shadow: 0 0 22px rgba(var(--stellar-rgb), 0.13);
  color: #ffffff;
}

.star-death-strip[data-phase="critical"] .ark-manifest-link,
.star-death-strip[data-phase="final"] .ark-manifest-link {
  background: rgba(var(--stellar-rgb), 0.18);
  box-shadow: inset 0 0 22px rgba(var(--stellar-rgb), 0.08), 0 0 16px rgba(var(--stellar-rgb), 0.12);
}

.star-death-strip[data-phase="final"] .ark-manifest-link {
  border-color: var(--stellar-color);
  color: #fff4ee;
}

@keyframes stellarStripPulse {
  0%, 100% { box-shadow: 0 7px 24px rgba(var(--stellar-rgb), 0.05); }
  50% { box-shadow: 0 7px 31px rgba(var(--stellar-rgb), 0.23), inset 0 0 26px rgba(var(--stellar-rgb), 0.035); }
}

@keyframes stellarFinalFlash {
  0%, 100% { background-color: rgba(11, 12, 15, 0.985); }
  50% { background-color: rgba(58, 9, 10, 0.92); }
}

@keyframes stellarOrbit {
  to { transform: rotate(360deg); }
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  flex: 0 0 var(--header-height);
  grid-template-columns: minmax(190px, 1.05fr) minmax(125px, 0.65fr) minmax(180px, 0.9fr) minmax(330px, 1.7fr) auto;
  align-items: stretch;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 18, 0.97);
  box-shadow: 0 5px 24px rgba(0, 0, 0, 0.24);
}

.identity-block,
.top-metric,
.resource-summary,
.top-actions {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.identity-block,
.top-metric {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 10px 16px;
}

.identity-block strong {
  overflow: hidden;
  color: #edffff;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-state {
  margin-top: 4px;
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.connection-state.degraded {
  color: var(--gold);
}

.metric-label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.top-metric strong {
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 14px;
}

.top-metric small {
  color: var(--muted);
  font-size: 9px;
}

.metric-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.progress-track {
  position: relative;
  overflow: hidden;
  height: 4px;
  background: #122126;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(105, 230, 225, 0.35);
  transition: width 260ms ease, background 180ms ease;
}

.quota-track {
  margin: 3px 0 5px;
}

.quota-metric.low .progress-fill {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(226, 187, 98, 0.35);
}

.quota-metric.low strong {
  color: var(--gold);
}

.resource-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  align-items: center;
  padding: 8px 12px;
  gap: 5px;
}

.resource-chip {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding-left: 9px;
  border-left: 2px solid var(--cyan-dim);
}

.resource-chip.crystal {
  border-color: #967bd4;
}

.resource-chip.fuel {
  border-color: #c5844f;
}

.resource-chip-copy,
.resource-chip-copy > span,
.resource-chip-copy > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-chip-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--cyan);
  opacity: 0.78;
}

.resource-chip.crystal .resource-chip-icon {
  color: #aa91e2;
}

.resource-chip.fuel .resource-chip-icon {
  color: #d69a66;
}

.resource-chip-copy > span {
  color: var(--muted);
  font-size: 9px;
}

.resource-chip-copy > strong {
  display: block;
  margin: 3px 0 1px;
  color: #e4ffff;
  font-size: 13px;
}

.resource-chip-copy > small {
  color: var(--green);
  font-size: 9px;
}

.ui-icon {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border-right: 0;
}

.observer-mode {
  padding: 6px 8px;
  border: 1px solid rgba(61, 220, 132, 0.34);
  background: rgba(61, 220, 132, 0.07);
  color: #74bd94;
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.alert-banner {
  position: relative;
  z-index: 9;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 55px;
  padding: 10px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--red);
  background: linear-gradient(90deg, rgba(104, 14, 19, 0.95), rgba(53, 12, 18, 0.96));
  box-shadow: 0 7px 28px rgba(255, 59, 48, 0.12);
  animation: alertPulse 1.55s ease-in-out infinite;
}

.alert-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 14px, rgba(255, 255, 255, 0.025) 15px 16px);
}

.alert-banner strong {
  color: #ffd8d5;
  font-size: 11px;
  letter-spacing: 0.07em;
}

.alert-list {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  color: #fff0ee;
  font-size: 11px;
  line-height: 1.35;
}

.alert-signal {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: #fff3f1;
  box-shadow: 0 0 0 5px rgba(255, 59, 48, 0.24), 0 0 14px var(--red);
  animation: signalBlink 650ms steps(2, end) infinite;
}

.command-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: 334px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 164px;
  gap: 1px;
  background: var(--line);
}

.colony-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
  border: 0;
}

.count-badge {
  display: inline-grid;
  min-width: 25px;
  height: 22px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  color: var(--cyan);
  font-size: 10px;
}

.colony-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
  padding: 8px 8px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.agent-access-card {
  flex: 0 0 auto;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(61, 220, 132, 0.07), transparent 58%),
    rgba(7, 18, 20, 0.78);
}

.agent-access-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-access-card h3 {
  margin: 0;
  color: #dff8eb;
  font-size: 11px;
}

.agent-only-badge {
  padding: 3px 5px;
  border: 1px solid rgba(61, 220, 132, 0.42);
  color: var(--green);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.agent-access-card > p {
  margin: 9px 0 8px;
  color: #8eaaa4;
  font-size: 8px;
  line-height: 1.5;
}

.agent-command-row {
  border: 1px solid rgba(46, 100, 97, 0.7);
  background: rgba(3, 9, 12, 0.86);
}

.agent-command-row code {
  display: block;
  max-height: 58px;
  padding: 8px;
  overflow: auto;
  color: #b9ded9;
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  user-select: all;
}

.agent-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 5px;
  border-top: 1px solid rgba(31, 73, 76, 0.72);
}

.agent-command-actions .ghost-button,
.agent-command-actions .icon-button {
  min-height: 25px;
  padding: 4px 7px;
  font-size: 7px;
}

.agent-token-toggle {
  display: grid;
  width: 29px;
  place-items: center;
}

.eye-glyph {
  position: relative;
  display: block;
  width: 13px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 70% 20% 70% 20%;
  transform: rotate(-45deg);
}

.eye-glyph::after {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.agent-token-toggle.revealed {
  color: var(--green);
}

.agent-access-card > small {
  display: block;
  margin-top: 7px;
  color: #4d6c69;
  font-size: 7px;
  line-height: 1.45;
}

.owner-inbox-panel {
  display: flex;
  flex: 0 1 auto;
  min-height: 68px;
  max-height: min(34vh, 280px);
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(226, 187, 98, 0.055), transparent 54%),
    rgba(8, 15, 20, 0.9);
}

.owner-inbox-panel.has-unread {
  box-shadow: inset 2px 0 rgba(226, 187, 98, 0.62);
}

.owner-inbox-header {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(29, 63, 68, 0.74);
}

.owner-inbox-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.owner-inbox-title-row h3 {
  margin: 0;
  color: #dcefed;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.owner-inbox-unread {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(226, 187, 98, 0.12), 0 0 9px rgba(226, 187, 98, 0.72);
  animation: signalBlink 1.7s ease-in-out infinite;
}

.owner-inbox-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.owner-inbox-empty {
  margin: 0;
  padding: 11px 12px 12px;
  color: #4d6c69;
  font-size: 8px;
  line-height: 1.5;
}

.owner-inbox-message {
  padding: 10px 12px 11px;
  border-top: 1px solid rgba(29, 63, 68, 0.58);
  background: rgba(5, 12, 16, 0.32);
}

.owner-inbox-message:first-child {
  border-top: 0;
}

.owner-inbox-message.flagged {
  background: linear-gradient(90deg, rgba(226, 187, 98, 0.06), rgba(5, 12, 16, 0.32) 52%);
}

.owner-inbox-message > header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.owner-inbox-tick {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(75, 133, 139, 0.66);
  border-radius: 8px;
  color: #79aeb0;
  font-size: 7px;
  line-height: 1.2;
}

.owner-inbox-flag {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 18px;
  min-height: 17px;
  place-items: center;
  padding: 1px 3px;
  border: 1px solid rgba(255, 218, 126, 0.9);
  outline: 1px solid rgba(226, 187, 98, 0.2);
  outline-offset: 1px;
  background: rgba(226, 187, 98, 0.09);
  box-shadow: 0 0 9px rgba(226, 187, 98, 0.15);
  color: #ffda7e;
  font-size: 9px;
  line-height: 1;
}

.owner-inbox-subject {
  min-width: 0;
  color: #e7f7f4;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.owner-inbox-text,
.owner-inbox-preview {
  color: #89a7a5;
  font-size: 8px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.owner-inbox-text {
  margin: 7px 0 0;
}

.owner-inbox-long-text {
  margin-top: 7px;
}

.owner-inbox-long-text summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.owner-inbox-long-text summary::-webkit-details-marker {
  display: none;
}

.owner-inbox-long-text summary:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

.owner-inbox-toggle {
  margin-left: 5px;
  color: #b99d60;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.owner-inbox-toggle::before {
  margin-right: 3px;
  content: "+";
}

.owner-inbox-toggle-expanded {
  display: none;
}

.owner-inbox-long-text[open] .owner-inbox-preview,
.owner-inbox-long-text[open] .owner-inbox-toggle-collapsed {
  display: none;
}

.owner-inbox-long-text[open] .owner-inbox-toggle-expanded {
  display: inline;
}

.owner-inbox-long-text[open] .owner-inbox-toggle-expanded::before {
  content: "−";
}

.colony-tab {
  position: relative;
  display: grid;
  min-width: 128px;
  max-width: 168px;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  padding: 8px 9px 9px;
  overflow: hidden;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.colony-tab-planet {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

.colony-tab-copy {
  min-width: 0;
}

.colony-tab-copy strong,
.colony-tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.colony-tab-copy strong {
  color: inherit;
  font-size: 10px;
  font-weight: 500;
}

.colony-tab-copy small {
  margin-top: 4px;
  color: #45656a;
  font-size: 8px;
}

.colony-tab.active {
  border-bottom-color: var(--green);
  background: rgba(61, 220, 132, 0.05);
  color: var(--text);
}

.colony-detail {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.colony-growth {
  --tier-color: #708084;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: -2px 0 13px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line);
}

.colony-growth.tier-1 {
  --tier-color: var(--cyan);
}

.colony-growth.tier-2 {
  --tier-color: var(--green);
}

.colony-growth.tier-3 {
  --tier-color: var(--gold);
}

.colony-growth.tier-4 {
  --tier-color: #ffe69a;
}

.planet-portrait {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
}

#selected-planet-canvas {
  display: block;
  width: 150px;
  height: 150px;
}

.development-summary {
  min-width: 0;
}

.development-summary .eyebrow {
  margin-bottom: 9px;
  color: color-mix(in srgb, var(--tier-color) 74%, #496468);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.tier-heading {
  display: grid;
  align-items: start;
  gap: 5px;
}

.tier-heading strong {
  color: #f2ffff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px color-mix(in srgb, var(--tier-color) 20%, transparent);
}

.tier-badge {
  justify-self: start;
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--tier-color) 62%, #17333b);
  color: var(--tier-color);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.development-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  margin-top: 13px;
  padding-top: 8px;
  border-top: 1px solid rgba(36, 86, 99, 0.52);
}

.development-score span,
.development-progress-copy {
  color: var(--muted);
  font-size: 8px;
}

.development-score strong {
  color: var(--tier-color);
  font-size: 15px;
  font-weight: 500;
}

.development-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
}

.development-progress-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.development-track {
  height: 3px;
  margin-top: 5px;
}

.development-track .progress-fill {
  background: var(--tier-color);
  box-shadow: 0 0 9px color-mix(in srgb, var(--tier-color) 42%, transparent);
}

.colony-title-row,
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.colony-title-row h3 {
  margin: 0;
  color: #ebffff;
  font-size: 15px;
}

.colony-title-row small {
  color: var(--muted);
  font-size: 9px;
}

.section-label {
  margin: 16px 0 8px;
  color: var(--cyan-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 11px;
  border: 1px solid var(--line);
}

.stock-cell {
  min-width: 0;
  padding: 8px;
  border-right: 1px solid var(--line);
}

.stock-cell:last-child {
  border-right: 0;
}

.stock-cell span,
.stock-cell strong,
.stock-cell small {
  display: block;
}

.stock-cell span {
  color: var(--muted);
  font-size: 8px;
}

.stock-cell .stock-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--cyan-dim);
}

.stock-cell:nth-child(2) .stock-label {
  color: #a48bd8;
}

.stock-cell:nth-child(3) .stock-label {
  color: #ca8d5e;
}

.stock-cell strong {
  margin: 4px 0 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
}

.stock-cell small {
  color: var(--green);
  font-size: 8px;
}

.building-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.building-card {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(20, 37, 44, 0.19);
}

.building-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.building-card-head strong {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.building-icon {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(43, 88, 96, 0.58);
  color: var(--cyan-dim);
}

.building-level {
  color: var(--cyan);
  font-size: 10px;
}

.building-requirement {
  flex: 1 1 auto;
  margin: 6px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.building-requirement.insufficient {
  color: #c58b65;
}

.research-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.research-section-label > span:last-child {
  color: var(--muted);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.research-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(89, 66, 126, 0.08), transparent 46%),
    rgba(14, 28, 35, 0.23);
}

.research-idle {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 9px;
}

.research-signal {
  width: 6px;
  height: 6px;
  border: 1px solid #6c5a8f;
  border-radius: 50%;
  background: rgba(113, 86, 157, 0.18);
}

.research-active {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(68, 50, 101, 0.13);
}

.research-active-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.research-active-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(120, 91, 166, 0.54);
  color: #b79ce4;
}

.research-active-head strong {
  overflow: hidden;
  color: #e5d8ff;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-active-head > span:last-child {
  color: #a78acb;
  font-size: 8px;
  white-space: nowrap;
}

.research-active .progress-track {
  height: 3px;
}

.research-active .progress-fill {
  background: #a686d6;
  box-shadow: 0 0 9px rgba(166, 134, 214, 0.36);
}

.research-guide {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.research-guide > span {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(92, 73, 127, 0.64);
  color: #a98bd4;
}

.research-guide strong,
.research-guide small {
  display: block;
}

.research-guide strong {
  color: #c9b8e6;
  font-size: 10px;
  font-weight: 500;
}

.research-guide small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.tech-list {
  display: grid;
}

.tech-row {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 75px;
  padding: 9px;
  border-top: 1px solid rgba(23, 51, 59, 0.72);
}

.research-active + .tech-list .tech-row:first-child,
.research-idle + .tech-list .tech-row:first-child {
  border-top: 1px solid var(--line);
}

.tech-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(82, 66, 113, 0.72);
  color: #a98bd4;
}

.tech-copy {
  min-width: 0;
}

.tech-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.tech-title strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-title span {
  color: #aa8bd5;
  font-size: 8px;
  white-space: nowrap;
}

.tech-copy p {
  margin: 4px 0 3px;
  color: #637f82;
  font-size: 7px;
  line-height: 1.45;
}

.tech-copy small {
  display: block;
  overflow: hidden;
  font-size: 7px;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.tech-cost {
  color: #8c789e;
}

.tech-cost.insufficient,
.tech-blocked {
  color: #b47c5b;
}

.queue-list,
.garrison-list {
  display: grid;
  gap: 5px;
}

.queue-item {
  padding: 8px;
  border-left: 2px solid var(--cyan-dim);
  background: rgba(16, 33, 39, 0.34);
}

.queue-item.ship-queue {
  border-left-color: #8b71c3;
}

.queue-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 9px;
}

.queue-line span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

.queue-item .progress-track {
  height: 3px;
}

.ship-form {
  display: grid;
  grid-template-columns: 32px auto minmax(0, 1fr) 60px auto;
  gap: 5px;
}

.ship-select-icon {
  display: grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid var(--line-bright);
  background: rgba(10, 22, 28, 0.74);
  color: #ad94e0;
}

.ship-weight-slot {
  display: grid;
  min-height: 32px;
  place-items: center;
}

.ship-weight-slot:empty {
  display: none;
}

.weight-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: rgba(105, 230, 225, 0.05);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.weight-badge.light,
.ship-form option.weight-light {
  color: var(--cyan);
}

.weight-badge.medium,
.ship-form option.weight-medium {
  color: var(--green);
}

.weight-badge.heavy,
.ship-form option.weight-heavy {
  color: var(--gold);
}

.ship-form select,
.ship-form input,
.ship-form button {
  min-height: 32px;
  font-size: 9px;
}

.ship-form input {
  padding: 5px;
}

.ship-hint {
  min-height: 24px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.ship-hint.insufficient {
  color: #c58b65;
}

.counter-note {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  margin: 2px 0 7px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
  white-space: nowrap;
}

.counter-note .weight-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  font-size: 7px;
}

.counter-note b {
  color: #57767a;
  font-weight: 400;
}

.garrison-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 9px;
}

.garrison-row strong {
  color: var(--text);
}

.empty-inline {
  padding: 9px;
  border: 1px dashed #1c3439;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.loading-state::after {
  content: "";
  width: 80px;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: loadingSweep 1.2s ease-in-out infinite;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  background: var(--void);
}

#star-map {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#star-map.dragging {
  cursor: grabbing;
}

.map-hud,
.map-legend,
.map-control {
  position: absolute;
  z-index: 2;
}

.map-hud.top-left {
  top: 16px;
  left: 18px;
  pointer-events: none;
}

.map-hud span,
.map-hud strong {
  display: block;
}

.map-hud span {
  color: var(--cyan-dim);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.map-hud strong {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 400;
}

.map-legend {
  right: 13px;
  bottom: 11px;
  display: grid;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(28, 67, 75, 0.65);
  background: rgba(7, 12, 18, 0.82);
  color: var(--muted);
  font-size: 8px;
  pointer-events: none;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.legend-stars {
  padding-top: 5px;
  border-top: 1px solid rgba(41, 76, 83, 0.5);
  font-size: 7px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot,
.legend-ring {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.legend-dot.intel {
  opacity: 0.55;
}

.legend-dot.unexplored {
  opacity: 0.22;
}

.legend-ring {
  background: transparent;
  border: 1px solid var(--green);
}

.legend-ring.danger {
  border-color: var(--red);
}

.star-swatch {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffd75e;
  box-shadow: 0 0 5px currentColor;
  color: #ffd75e;
}

.star-swatch.red-dwarf { width: 5px; height: 5px; color: #ff6b4a; background: #ff6b4a; }
.star-swatch.orange-dwarf { color: #ffa04d; background: #ffa04d; }
.star-swatch.white-star { width: 7px; height: 7px; color: #f4f6ff; background: #f4f6ff; }
.star-swatch.blue-giant { width: 8px; height: 8px; color: #7ec8ff; background: #7ec8ff; }
.star-swatch.red-giant { width: 9px; height: 9px; color: #ff8866; background: #ff8866; }
.star-swatch.white-dwarf { width: 4px; height: 4px; color: #e8ecff; background: #e8ecff; }
.star-swatch.neutron { width: 4px; height: 4px; color: #d0a0ff; background: #d0a0ff; }
.star-swatch.black-hole {
  width: 8px;
  height: 8px;
  border: 1px solid #7553a1;
  background: #000;
  box-shadow: 0 0 5px rgba(104, 68, 145, 0.8);
}

.map-control {
  top: 14px;
  right: 14px;
  min-height: 28px;
  padding: 5px 8px;
  background: rgba(7, 12, 18, 0.8);
  font-size: 9px;
}

.map-tooltip {
  position: absolute;
  z-index: 11;
  width: max-content;
  max-width: 240px;
  padding: 9px 10px;
  border: 1px solid var(--line-bright);
  background: rgba(5, 10, 16, 0.96);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.44);
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.55;
  pointer-events: none;
}

.map-tooltip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 11px;
}

.system-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: min(430px, 52%);
  overflow: hidden;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 220ms ease, visibility 220ms step-end;
}

.system-drawer.open {
  visibility: visible;
  transform: translateX(0);
  transition: transform 220ms ease, visibility 0ms;
}

.drawer-header {
  padding-right: 12px;
}

.system-content {
  height: calc(100% - 61px);
  padding: 13px 14px 30px;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.system-identity {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.system-star-portrait {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(39, 73, 83, 0.45);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(76, 123, 131, 0.08) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(76, 123, 131, 0.08) 50%, transparent 50.5%),
    rgba(2, 5, 10, 0.38);
}

.system-star-portrait::before,
.system-star-portrait::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--cyan-dim);
  border-style: solid;
  content: "";
  opacity: 0.55;
  pointer-events: none;
}

.system-star-portrait::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.system-star-portrait::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.system-star-portrait canvas {
  display: block;
  width: 96px;
  height: 96px;
}

.system-identity-copy {
  min-width: 0;
}

.system-identity strong {
  display: block;
  color: #e7ffff;
  font-size: 16px;
}

.system-identity small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.stellar-class {
  display: block;
  margin-top: 5px;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.system-identity-copy p {
  margin: 8px 0 0;
  color: #7d9b9e;
  font-size: 8px;
  line-height: 1.5;
}

.intel-badge {
  align-self: start;
  padding: 4px 6px;
  border: 1px solid var(--line-bright);
  color: var(--cyan);
  font-size: 8px;
}

.intel-badge.intel {
  color: #b29be0;
}

.intel-badge.unexplored {
  color: var(--muted);
}

.intel-warning,
.incoming-detail {
  margin: 10px 0;
  padding: 9px;
  border-left: 2px solid var(--gold);
  background: rgba(91, 72, 30, 0.16);
  color: #cfb77e;
  font-size: 9px;
  line-height: 1.5;
}

.incoming-detail {
  border-left-color: var(--red);
  background: rgba(104, 18, 22, 0.2);
  color: #ffaaa5;
}

.planet-list,
.detected-fleets {
  display: grid;
  gap: 6px;
}

.planet-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(19, 34, 41, 0.24);
}

.planet-thumbnail {
  display: block;
  width: 56px;
  height: 56px;
}

.planet-card-copy {
  min-width: 0;
}

.planet-head,
.planet-colony,
.planet-unclaimed,
.fleet-detected-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.planet-head strong {
  color: var(--text-soft);
  font-size: 10px;
}

.planet-head span {
  color: var(--muted);
  font-size: 9px;
}

.planet-meta {
  margin: 7px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.planet-colony,
.planet-unclaimed {
  align-items: center;
  justify-content: flex-start;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 8px;
}

.planet-unclaimed {
  color: #9f936f;
}

.planet-colony .ui-icon {
  color: #75dca0;
}

.observer-note {
  margin: 14px 0 0;
  padding: 10px;
  border-left: 2px solid var(--green-dim);
  background: rgba(28, 78, 55, 0.12);
  color: #6f9783;
  font-size: 8px;
  line-height: 1.55;
}

.planet-card .action-button {
  min-height: 25px;
  padding: 4px 7px;
  font-size: 8px;
}

.scout-control {
  display: grid;
  grid-template-columns: 1fr 54px auto;
  gap: 5px;
}

.scout-control select,
.scout-control input,
.scout-control button {
  min-height: 31px;
  font-size: 9px;
}

.fleet-detected-row {
  padding: 7px 8px;
  border-left: 2px solid #4f6d73;
  background: rgba(18, 35, 41, 0.3);
  color: var(--text-soft);
  font-size: 9px;
}

.intel-snapshot {
  margin-top: 16px;
  padding-top: 2px;
  border-top: 1px dashed var(--line-bright);
}

.events-panel {
  position: absolute;
  right: 13px;
  bottom: 43px;
  z-index: 4;
  display: flex;
  width: min(355px, 40%);
  max-height: min(255px, 46%);
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.37);
}

.events-panel h2 {
  font-size: 11px;
}

.events-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.event-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 7px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(23, 51, 59, 0.68);
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.45;
}

.event-item .event-tick {
  color: var(--muted);
  font-size: 8px;
}

.event-item.danger {
  border-left: 2px solid var(--red);
  color: #ffaaa4;
}

.event-item.diplomacy {
  border-left: 2px solid var(--gold);
  color: #d7c18b;
}

.event-item.complete {
  border-left: 2px solid var(--green-dim);
  color: #94b5a5;
}

.event-item.milestone {
  border-left: 2px solid #f0c96d;
  background: linear-gradient(90deg, rgba(226, 187, 98, 0.11), transparent 76%);
  color: #ffe2a0;
  text-shadow: 0 0 12px rgba(226, 187, 98, 0.14);
}

.event-item.milestone .event-tick {
  color: #b99b5b;
}

.event-item.fresh {
  animation: eventArrive 620ms ease-out both;
}

.fleet-dock {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-column: 1 / span 2;
  grid-row: 2;
  grid-template-columns: 155px minmax(0, 1fr);
  border: 0;
}

.fleet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.fleet-header h2 {
  margin-top: 2px;
  font-size: 12px;
}

.fleet-list {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 7px;
  padding: 9px;
  overflow-x: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.fleet-list > .empty-state {
  width: 100%;
}

.fleet-card {
  display: grid;
  flex: 0 0 285px;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(15, 30, 37, 0.35);
}

.mission-icon {
  display: grid;
  width: 31px;
  height: 31px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid var(--line-bright);
  color: var(--cyan);
  font-size: 15px;
}

.mission-icon .ui-icon {
  filter: drop-shadow(0 0 4px rgba(105, 230, 225, 0.25));
}

.fleet-name {
  min-width: 0;
}

.fleet-name strong,
.fleet-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-name strong {
  color: var(--text);
  font-size: 10px;
}

.fleet-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.fleet-route {
  grid-column: 2;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-progress {
  display: grid;
  grid-column: 1 / span 2;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.fleet-progress small {
  min-width: 53px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 9, 0.76);
  backdrop-filter: blur(3px);
}

.modal-card {
  width: min(510px, 92vw);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.message-form {
  display: grid;
  gap: 8px;
  padding: 17px;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.message-form .primary-button {
  justify-self: end;
  min-width: 116px;
  margin-top: 4px;
}

.toast-region {
  position: fixed;
  right: 18px;
  top: 92px;
  z-index: 80;
  display: grid;
  width: min(390px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line-bright);
  border-left: 3px solid var(--cyan);
  background: rgba(7, 14, 21, 0.97);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.46);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.5;
  animation: toastIn 220ms ease-out both;
}

.toast.success {
  border-left-color: var(--green);
}

.toast.error {
  border-left-color: var(--red);
  color: #ffb0aa;
}

.toast.warning {
  border-left-color: var(--gold);
  color: #dec68d;
}

.toast.milestone {
  border-color: #765f2b;
  border-left-color: #ffd978;
  background: linear-gradient(110deg, rgba(54, 42, 17, 0.98), rgba(10, 16, 22, 0.98) 72%);
  color: #ffe7ad;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.46), 0 0 24px rgba(226, 187, 98, 0.12);
}

.toast.leaving {
  animation: toastOut 220ms ease-in both;
}

@keyframes alertPulse {
  0%,
  100% { filter: brightness(0.9); }
  50% { filter: brightness(1.12); }
}

@keyframes signalBlink {
  0%,
  35% { opacity: 1; }
  60%,
  100% { opacity: 0.35; }
}

@keyframes loadingSweep {
  0% { transform: translateX(-42px); opacity: 0.2; }
  50% { opacity: 1; }
  100% { transform: translateX(42px); opacity: 0.2; }
}

@keyframes eventArrive {
  from { opacity: 0; transform: translateX(10px); background: rgba(61, 220, 132, 0.1); }
  to { opacity: 1; transform: translateX(0); background: transparent; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(15px); }
}

.planet-demo-page {
  min-width: 1024px;
  height: auto;
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 7%, rgba(35, 77, 91, 0.11), transparent 28%),
    radial-gradient(circle at 82% 19%, rgba(65, 39, 91, 0.09), transparent 25%),
    linear-gradient(rgba(70, 117, 124, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 117, 124, 0.025) 1px, transparent 1px),
    #05070b;
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
}

.planet-demo-shell {
  width: min(1440px, calc(100vw - 52px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.planet-demo-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: end;
  gap: 48px;
  padding: 0 7px 27px;
  border-bottom: 1px solid var(--line);
}

.planet-demo-header h1 {
  margin: 5px 0 0;
  color: #e8ffff;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.planet-demo-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.atlas-section {
  margin-top: 62px;
}

.atlas-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  align-items: end;
  gap: 44px;
  margin-bottom: 19px;
  padding: 0 7px 14px;
  border-bottom: 1px solid var(--line);
}

.atlas-section-header h2,
.size-comparison-block h3,
.planet-family-row h3,
.icon-group h3 {
  margin: 4px 0 0;
  color: #d9eeee;
  font-weight: 500;
}

.atlas-section-header h2 {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.atlas-section-header p,
.size-comparison-block header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.atlas-index {
  color: var(--cyan-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.star-atlas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: rgba(28, 61, 69, 0.72);
}

.star-atlas-card {
  --star-accent: #ffd75e;
  --demo-tier: var(--star-accent);
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 346px;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  padding: 17px 14px 15px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--star-accent) 7%, transparent), transparent 46%),
    #070a0f;
}

.star-atlas-card::before {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 5px;
  height: 5px;
  border-top: 1px solid color-mix(in srgb, var(--star-accent) 65%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--star-accent) 65%, transparent);
  content: "";
}

.star-atlas-card canvas {
  display: block;
  width: min(275px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.star-atlas-card.featured {
  min-height: 440px;
  grid-column: span 2;
  grid-template-columns: minmax(300px, 1fr) minmax(190px, 0.55fr);
  grid-template-rows: 1fr;
  gap: 10px;
  padding: 18px 22px;
}

.star-atlas-card.featured canvas {
  width: min(410px, 100%);
}

.star-atlas-card.featured .planet-demo-label {
  align-self: end;
  width: 100%;
  margin-bottom: 34px;
}

.star-red_dwarf { --star-accent: #ff6b4a; }
.star-orange_dwarf { --star-accent: #ffa04d; }
.star-white_star { --star-accent: #f4f6ff; }
.star-blue_giant { --star-accent: #7ec8ff; }
.star-red_giant { --star-accent: #ff8866; }
.star-white_dwarf { --star-accent: #e8ecff; }
.star-neutron { --star-accent: #d0a0ff; }
.star-black_hole { --star-accent: #c487ff; }

.planet-family-list {
  border-top: 1px solid rgba(28, 61, 69, 0.72);
}

.planet-family-row {
  display: grid;
  min-height: 268px;
  grid-template-columns: 176px minmax(0, 1fr);
  border-right: 1px solid rgba(28, 61, 69, 0.72);
  border-bottom: 1px solid rgba(28, 61, 69, 0.72);
  border-left: 1px solid rgba(28, 61, 69, 0.72);
  background: rgba(7, 10, 15, 0.38);
}

.planet-family-row > header {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border-right: 1px solid rgba(28, 61, 69, 0.72);
  background: linear-gradient(145deg, rgba(21, 42, 48, 0.28), transparent 68%);
}

.planet-family-row > header span {
  color: var(--cyan-dim);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.planet-family-row h3 {
  font-size: 13px;
}

.planet-family-row > header small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.planet-family-variants {
  display: flex;
  min-width: 0;
  align-items: stretch;
}

.planet-variant-card {
  display: grid;
  min-width: 0;
  flex: 1 1 0;
  grid-template-columns: minmax(160px, 0.72fr) minmax(140px, 0.55fr);
  align-items: center;
  gap: 2px;
  padding: 12px 16px 12px 10px;
  border-right: 1px solid rgba(28, 61, 69, 0.48);
}

.planet-variant-card:last-child {
  border-right: 0;
}

.planet-variant-card canvas {
  display: block;
  width: min(210px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.size-comparison-block {
  margin-top: 24px;
  border: 1px solid rgba(31, 68, 75, 0.78);
  background: rgba(6, 11, 16, 0.48);
}

.size-comparison-block > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(31, 68, 75, 0.64);
}

.size-comparison-block h3 {
  font-size: 13px;
}

.planet-size-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planet-size-card {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(140px, 0.48fr);
  align-items: center;
  padding: 13px 18px;
  border-right: 1px solid rgba(31, 68, 75, 0.52);
}

.planet-size-card:last-child {
  border-right: 0;
}

.planet-size-card canvas {
  display: block;
  width: min(245px, 100%);
  height: auto;
}

.planet-demo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-left: 1px solid rgba(23, 51, 59, 0.72);
}

.planet-demo-card {
  --demo-tier: #708084;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 18px 10px 16px;
  border-right: 1px solid rgba(23, 51, 59, 0.72);
  border-bottom: 1px solid rgba(23, 51, 59, 0.72);
  background: rgba(7, 10, 15, 0.34);
}

.planet-demo-card.tier-1 {
  --demo-tier: var(--cyan);
}

.planet-demo-card.tier-2 {
  --demo-tier: var(--green);
}

.planet-demo-card.tier-3 {
  --demo-tier: var(--gold);
}

.planet-demo-card.tier-4 {
  --demo-tier: #ffe69a;
}

.planet-demo-card canvas {
  display: block;
  width: min(205px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.planet-demo-label {
  width: min(210px, 100%);
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(23, 51, 59, 0.52);
}

.planet-demo-label span,
.planet-demo-label strong,
.planet-demo-label small {
  display: block;
}

.planet-demo-label span {
  color: color-mix(in srgb, var(--demo-tier, var(--cyan-dim)) 68%, #496468);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.planet-demo-label strong {
  margin-top: 5px;
  color: #cfe5e4;
  font-size: 10px;
  font-weight: 500;
}

.planet-demo-label small {
  margin-top: 5px;
  overflow: hidden;
  color: #48656a;
  font-size: 7px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-atlas {
  display: grid;
  grid-template-columns: 0.72fr 1.12fr 1.36fr;
  gap: 1px;
  padding: 1px;
  background: rgba(28, 61, 69, 0.72);
}

.icon-group {
  min-width: 0;
  padding: 16px;
  background: #070a0f;
}

.icon-group h3 {
  margin-bottom: 13px;
  color: var(--cyan-dim);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.icon-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.icon-swatch {
  display: grid;
  min-width: 0;
  min-height: 105px;
  place-items: center;
  padding: 11px 7px 8px;
  border: 1px solid rgba(29, 64, 71, 0.6);
  background: rgba(16, 31, 38, 0.22);
  text-align: center;
}

.icon-swatch > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(43, 89, 97, 0.72);
  color: var(--cyan);
  box-shadow: inset 0 0 15px rgba(105, 230, 225, 0.025);
}

.icon-group:nth-child(2) .icon-swatch > span { color: #b29be0; }
.icon-group:nth-child(3) .icon-swatch > span { color: #d0ae69; }

.icon-swatch strong {
  margin-top: 8px;
  overflow: hidden;
  color: #cfe4e3;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-swatch small {
  margin-top: 3px;
  overflow: hidden;
  color: #49676b;
  font-size: 6px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  :root {
    --header-height: 72px;
  }

  .topbar {
    grid-template-columns: 185px 120px 175px minmax(280px, 1fr) auto;
  }

  .identity-block,
  .top-metric {
    padding-right: 11px;
    padding-left: 11px;
  }

  .command-grid {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .events-panel {
    width: 320px;
  }
}

@media (max-height: 760px) {
  .command-grid {
    grid-template-rows: minmax(0, 1fr) 145px;
  }

  .events-panel {
    max-height: 205px;
  }

  .fleet-dock {
    grid-template-columns: 145px minmax(0, 1fr);
  }
}

@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;
  }
}

/* ---------- Cradle exodus: ark manifest ---------- */

.manifest-document,
.manifest-page {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.manifest-page {
  position: relative;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    radial-gradient(circle at 76% 4%, rgba(147, 47, 29, 0.15), transparent 25%),
    #070706;
  background-size: 64px 64px, 64px 64px, auto, auto;
  color: #e6e0d4;
}

.manifest-page .scanlines {
  opacity: 0.022;
}

#manifest-star {
  position: fixed;
  top: clamp(-250px, -17vw, -110px);
  right: clamp(-250px, -14vw, -100px);
  z-index: 0;
  display: block;
  width: min(70vw, 920px);
  height: min(70vw, 920px);
  pointer-events: none;
  opacity: 0.39;
  filter: saturate(0.88) contrast(1.05);
  transition: opacity 500ms ease, filter 500ms ease;
}

.manifest-page[data-phase="critical"] #manifest-star,
.manifest-page[data-phase="final"] #manifest-star {
  opacity: 0.53;
  filter: saturate(1.18) contrast(1.08);
}

.manifest-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 4, 5, 0.98) 0%, rgba(3, 4, 5, 0.72) 43%, rgba(3, 4, 5, 0.1) 78%),
    linear-gradient(0deg, rgba(4, 4, 4, 0.72), transparent 34%);
}

.manifest-nav {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(100% - 64px, 1320px);
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(178, 139, 80, 0.24);
  color: #695e4d;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.manifest-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a99a7f;
  text-decoration: none;
  transition: color 150ms ease;
}

.manifest-nav a:hover,
.manifest-nav a:focus-visible {
  color: #f1cf91;
}

.manifest-nav-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.graduation-checklist {
  width: 330px;
  min-height: 66px;
  padding: 8px 10px;
  border: 1px solid rgba(178, 139, 80, 0.3);
  background: rgba(12, 11, 9, 0.8);
  letter-spacing: 0;
}

.graduation-pending {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  color: #8d7555;
  font-size: 8px;
}

.graduation-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c18a50;
  box-shadow: 0 0 10px rgba(226, 139, 75, 0.45);
  animation: signalBlink 1s ease-in-out infinite;
}

.graduation-items {
  display: grid;
  gap: 7px;
}

.graduation-item > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 13px;
  align-items: baseline;
  gap: 7px;
  color: #756958;
  font-size: 7px;
}

.graduation-item strong {
  color: #bca98b;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.graduation-item i {
  color: #453d32;
  font-size: 9px;
  font-style: normal;
  text-align: right;
}

.graduation-item.complete i {
  color: #69d39a;
  text-shadow: 0 0 8px rgba(61, 220, 132, 0.34);
}

.graduation-track {
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  background: #2b241c;
}

.graduation-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #c18148;
  box-shadow: 0 0 8px rgba(214, 129, 68, 0.25);
  transition: width 220ms ease, background 180ms ease;
}

.graduation-item.complete .graduation-track span {
  background: #55b983;
  box-shadow: 0 0 8px rgba(61, 220, 132, 0.28);
}

.graduation-checklist.graduated {
  width: auto;
  min-width: 235px;
  padding: 7px 11px;
  border-color: rgba(61, 220, 132, 0.4);
  background: rgba(21, 69, 47, 0.22);
}

.graduation-badge {
  display: grid;
  min-height: 48px;
  grid-template-columns: 25px minmax(0, 1fr);
  align-content: center;
  column-gap: 9px;
}

.graduation-badge > span {
  display: grid;
  width: 25px;
  height: 25px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid rgba(61, 220, 132, 0.52);
  border-radius: 50%;
  color: #76dfa4;
  font-size: 12px;
  box-shadow: 0 0 14px rgba(61, 220, 132, 0.1);
}

.graduation-badge strong {
  color: #a5dfbd;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.graduation-badge small {
  margin-top: 4px;
  color: #5d9274;
  font-size: 7px;
}

.manifest-shell {
  position: relative;
  z-index: 3;
  width: min(100% - 64px, 1320px);
  margin: 0 auto;
  padding: 72px 0 110px;
}

.manifest-intro {
  position: relative;
  width: min(820px, 75%);
  padding-left: 76px;
}

.manifest-intro-rule {
  position: absolute;
  top: 1px;
  bottom: 0;
  left: 0;
  width: 46px;
  border-right: 1px solid rgba(226, 187, 98, 0.31);
  color: #b4864e;
  font-size: 10px;
}

.manifest-intro-rule::before,
.manifest-intro-rule::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c78c4d;
  box-shadow: 0 0 10px rgba(226, 138, 63, 0.48);
}

.manifest-intro-rule::before { top: 0; }
.manifest-intro-rule::after { bottom: 0; }

.manifest-intro-rule span {
  display: block;
  padding-top: 2px;
  color: #cc9d5e;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.manifest-intro .eyebrow {
  margin-bottom: 15px;
  color: #a06a3b;
}

.manifest-intro h1 {
  max-width: 760px;
  margin: 0;
  color: #f5eee2;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: clamp(35px, 5.4vw, 68px);
  font-weight: 420;
  line-height: 1.13;
  letter-spacing: 0.035em;
  text-shadow: 0 2px 30px rgba(229, 135, 72, 0.1);
}

.manifest-intro > p:not(.eyebrow) {
  max-width: 620px;
  margin: 20px 0 0;
  color: #8f897c;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 14px;
  line-height: 1.9;
}

.manifest-origin-ledger {
  display: grid;
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 39px 0 0;
  border-top: 1px solid rgba(164, 126, 73, 0.25);
  border-bottom: 1px solid rgba(164, 126, 73, 0.14);
}

.manifest-origin-ledger > div {
  min-width: 0;
  padding: 13px 16px 14px 0;
}

.manifest-origin-ledger > div + div {
  padding-left: 16px;
  border-left: 1px solid rgba(164, 126, 73, 0.16);
}

.manifest-origin-ledger dt,
.manifest-origin-ledger dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifest-origin-ledger dt {
  color: #625b50;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.manifest-origin-ledger dd {
  margin-top: 6px;
  color: #d0c7b8;
  font-size: 10px;
}

.manifest-loading,
.manifest-fatal {
  width: min(720px, 100%);
  margin: 90px 0 0 76px;
  padding: 40px;
  border: 1px solid rgba(161, 122, 70, 0.25);
  background: rgba(9, 9, 9, 0.74);
}

.manifest-loading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px 17px;
}

.manifest-loading-mark {
  width: 21px;
  height: 21px;
  grid-row: 1 / 3;
  border: 1px solid #a26c40;
  border-top-color: transparent;
  border-radius: 50%;
  animation: stellarOrbit 1.2s linear infinite;
}

.manifest-loading strong {
  color: #d7c8af;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 16px;
  font-weight: 500;
}

.manifest-loading p {
  margin: 0;
  color: #625b51;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.manifest-fatal h2 {
  margin: 11px 0 14px;
  color: #e5d8c4;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 26px;
  font-weight: 440;
}

.manifest-fatal p {
  color: #b68c78;
  font-size: 11px;
  line-height: 1.7;
}

.manifest-fatal .primary-button {
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  text-decoration: none;
}

.manifest-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: start;
  gap: 18px;
  margin-top: 78px;
}

.manifest-slots {
  display: grid;
  gap: 12px;
}

.manifest-slot {
  position: relative;
  overflow: hidden;
  padding: 24px 25px 26px;
  border: 1px solid rgba(151, 121, 75, 0.23);
  background:
    linear-gradient(110deg, rgba(176, 113, 54, 0.04), transparent 40%),
    rgba(9, 10, 10, 0.9);
  box-shadow: inset 0 1px rgba(255, 225, 178, 0.025);
}

.manifest-slot::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 38px;
  height: 38px;
  border-top: 1px solid rgba(212, 153, 80, 0.38);
  border-right: 1px solid rgba(212, 153, 80, 0.38);
}

.manifest-slot-header {
  display: grid;
  grid-template-columns: 61px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.manifest-slot-number {
  display: grid;
  min-height: 47px;
  align-content: center;
  padding-right: 14px;
  border-right: 1px solid rgba(180, 134, 75, 0.2);
}

.manifest-slot-number span {
  color: #b27a43;
  font-size: 18px;
  line-height: 1;
}

.manifest-slot-number small {
  margin-top: 6px;
  color: #594f43;
  font-size: 6px;
  letter-spacing: 0.11em;
}

.manifest-slot-header .eyebrow {
  color: #725132;
}

.manifest-slot-header h2 {
  color: #e5ddd0;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 23px;
  font-weight: 440;
}

.manifest-lock,
.manifest-slot-limit {
  padding: 7px 9px;
  border: 1px solid rgba(173, 130, 72, 0.24);
  color: #89745a;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.manifest-lock {
  border-color: rgba(105, 230, 225, 0.3);
  color: #70aaa3;
  box-shadow: 0 0 17px rgba(105, 230, 225, 0.05);
}

.manifest-slot-copy {
  max-width: 680px;
  margin: 18px 0 22px 75px;
  color: #777166;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 11px;
  line-height: 1.8;
}

.knowledge-slot {
  border-color: rgba(76, 146, 143, 0.27);
  background:
    radial-gradient(circle at 85% 10%, rgba(78, 184, 175, 0.08), transparent 30%),
    linear-gradient(110deg, rgba(63, 119, 116, 0.06), transparent 40%),
    rgba(8, 11, 11, 0.92);
  box-shadow: inset 0 0 38px rgba(59, 145, 140, 0.025), 0 0 38px rgba(39, 119, 114, 0.025);
}

.knowledge-free {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: center;
  margin: 0 0 20px 75px;
  padding: 12px 14px;
  border-left: 2px solid #4b9f99;
  background: rgba(47, 119, 114, 0.08);
}

.knowledge-free > span {
  grid-row: 1 / 3;
  color: #69e6e1;
  font-family: ui-serif, Georgia, serif;
  font-size: 28px;
}

.knowledge-free strong {
  color: #a8d3cf;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.knowledge-free small {
  margin-top: 3px;
  color: #567b78;
  font-size: 8px;
}

.knowledge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 0 75px;
  padding: 1px;
  background: rgba(57, 106, 104, 0.21);
  list-style: none;
}

.knowledge-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #090d0d;
  color: #52706e;
}

.knowledge-list li.researched {
  color: #71b1ad;
}

.knowledge-list li > span {
  opacity: 0.78;
}

.knowledge-list li strong {
  overflow: hidden;
  color: #9fbab7;
  font-size: 9px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-list li.unresearched strong {
  color: #4e5b59;
}

.knowledge-list li small {
  color: #69e6e1;
  font-size: 9px;
}

.knowledge-list li.unresearched small {
  color: #40504e;
}

.escort-list,
.cargo-list {
  display: grid;
  margin-left: 75px;
  border-top: 1px solid rgba(157, 119, 69, 0.18);
}

.escort-row {
  display: grid;
  min-height: 61px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(157, 119, 69, 0.13);
}

.escort-icon,
.cargo-icon {
  display: grid;
  place-items: center;
  color: #b8864d;
}

.escort-identity,
.cargo-identity {
  min-width: 0;
}

.escort-identity strong,
.escort-identity small,
.cargo-identity strong,
.cargo-identity small {
  display: block;
}

.escort-identity strong,
.cargo-identity strong {
  overflow: hidden;
  color: #c9bead;
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.escort-identity small,
.cargo-identity small {
  margin-top: 5px;
  color: #625b50;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.escort-stepper {
  display: grid;
  grid-template-columns: 29px 39px 29px;
  align-items: center;
  border: 1px solid rgba(164, 126, 73, 0.28);
}

.escort-stepper button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  background: rgba(153, 108, 55, 0.08);
  color: #c18b51;
  font-size: 15px;
}

.escort-stepper button:hover:not(:disabled),
.escort-stepper button:focus-visible:not(:disabled) {
  background: rgba(196, 133, 60, 0.18);
  color: #f3c989;
}

.escort-stepper button:disabled {
  border: 0;
  background: transparent;
  color: #38342f;
}

.escort-stepper output {
  color: #e4d2b9;
  font-size: 11px;
  text-align: center;
}

.manifest-empty {
  padding: 26px 0;
  color: #6b6255;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 11px;
}

.cargo-row {
  display: grid;
  min-height: 68px;
  grid-template-columns: 38px minmax(112px, 0.7fr) minmax(180px, 1.3fr) 64px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(157, 119, 69, 0.13);
}

.cargo-icon.crystal { color: #9e8cc6; }
.cargo-icon.fuel { color: #c7804f; }

.cargo-row input[type="range"] {
  height: 20px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #c58a4e;
  cursor: ew-resize;
}

.cargo-row input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: #302820;
}

.cargo-row input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5px;
  border: 1px solid #dfae6b;
  border-radius: 50%;
  background: #16110d;
  appearance: none;
}

.cargo-row output {
  color: #d9c4a4;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.manifest-budget {
  margin: 23px 0 0 75px;
}

.manifest-budget > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.manifest-budget > div:first-child span {
  color: #6d6254;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.manifest-budget > div:first-child strong {
  color: #c8a978;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.manifest-budget-track {
  height: 4px;
  margin-top: 8px;
  background: #241e18;
}

.manifest-budget-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #b47c43;
  box-shadow: 0 0 10px rgba(205, 137, 62, 0.24);
  transition: width 180ms ease, background 150ms ease;
}

.manifest-budget-track[data-level="high"] span {
  background: #dc7647;
}

.manifest-budget-track[data-level="full"] span {
  background: #ff5b45;
  box-shadow: 0 0 12px rgba(255, 72, 48, 0.34);
}

.manifest-budget small {
  display: block;
  margin-top: 8px;
  color: #514b43;
  font-size: 7px;
}

.manifest-launch-rail {
  position: sticky;
  top: 18px;
  padding: 25px;
  border: 1px solid rgba(179, 132, 72, 0.32);
  background:
    linear-gradient(150deg, rgba(158, 96, 42, 0.09), transparent 36%),
    rgba(9, 9, 8, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 224, 178, 0.03);
}

.launch-rail-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(164, 121, 68, 0.19);
}

.launch-rail-heading .eyebrow {
  color: #8d5e34;
}

.launch-rail-heading h2 {
  color: #e8ded0;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 26px;
  font-weight: 440;
}

.launch-rail-route {
  display: grid;
  grid-template-columns: 9px 1fr 9px 1fr 9px;
  align-items: center;
  gap: 4px;
  margin: 24px 2px;
}

.launch-rail-route i {
  height: 1px;
  background: linear-gradient(90deg, #8a5e34, #3f3930);
}

.route-node {
  width: 9px;
  height: 9px;
  border: 1px solid #a87643;
  border-radius: 50%;
}

.route-node.cradle {
  background: #dc744c;
  box-shadow: 0 0 9px rgba(255, 91, 61, 0.5);
}

.route-node.silence {
  border-color: #4b4a4d;
  background: #070708;
}

.route-node.frontier {
  border-color: #69b8b4;
  background: #4d9692;
  box-shadow: 0 0 9px rgba(105, 230, 225, 0.32);
}

.launch-summary {
  margin: 0;
}

.launch-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(152, 116, 70, 0.12);
}

.launch-summary dt,
.launch-summary dd {
  margin: 0;
}

.launch-summary dt {
  color: #665d51;
  font-size: 8px;
}

.launch-summary dd {
  color: #c3b49f;
  font-size: 9px;
  text-align: right;
}

.launch-consequence {
  margin: 23px 0 0;
  color: #7c6e5c;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 10px;
  line-height: 1.75;
}

.launch-status {
  min-height: 34px;
  margin: 18px 0 9px;
  color: #665e53;
  font-size: 8px;
  line-height: 1.55;
}

.launch-status.error,
.rename-error {
  color: #df7667;
}

.launch-status.graduation-required {
  color: #cf9a59;
}

.launch-ark-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 82px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 16px;
  padding: 17px 47px 17px 18px;
  overflow: hidden;
  border: 1px solid #b9733e;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(148, 68, 31, 0.25), rgba(77, 35, 24, 0.13)),
    #15100d;
  color: #f1dcc0;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.launch-ark-button::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  background: linear-gradient(90deg, transparent, rgba(255, 205, 137, 0.1), transparent);
  transition: transform 600ms ease;
}

.launch-ark-button:hover:not(:disabled)::before,
.launch-ark-button:focus-visible:not(:disabled)::before {
  transform: translateX(105%);
}

.launch-ark-button:hover:not(:disabled),
.launch-ark-button:focus-visible:not(:disabled) {
  border-color: #efa45e;
  background-color: #1d120d;
  box-shadow: 0 0 28px rgba(220, 107, 44, 0.12);
}

.launch-ark-button:disabled {
  border-color: #49372b;
  background: #0d0c0b;
  color: #665b4e;
  filter: saturate(0.35);
  opacity: 0.62;
}

.launch-ark-button span,
.launch-ark-button strong {
  position: relative;
  z-index: 1;
}

.launch-ark-button span {
  grid-column: 1;
  color: #936f4e;
  font-size: 7px;
  letter-spacing: 0.11em;
}

.launch-ark-button strong {
  grid-column: 1;
  color: #f3dfc5;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 21px;
  font-weight: 460;
  letter-spacing: 0.1em;
}

.launch-ark-button i {
  position: absolute;
  right: 18px;
  color: #dc8b49;
  font-size: 20px;
  font-style: normal;
}

.launch-ark-button.busy i {
  animation: manifestLaunchWait 900ms ease-in-out infinite;
}

@keyframes manifestLaunchWait {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(5px); opacity: 1; }
}

.manifest-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(2, 3, 3, 0.88);
  backdrop-filter: blur(9px);
}

.manifest-modal-card {
  width: min(100%, 520px);
  padding: 33px;
  border: 1px solid rgba(190, 139, 76, 0.42);
  background:
    linear-gradient(145deg, rgba(166, 96, 42, 0.09), transparent 35%),
    #0a0a09;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.68);
}

.manifest-modal-card .eyebrow {
  color: #a8673b;
}

.manifest-modal-card h2 {
  margin: 14px 0;
  color: #eee2d1;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 27px;
  font-weight: 440;
  line-height: 1.35;
}

.manifest-modal-card > p {
  color: #7d7264;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 11px;
  line-height: 1.7;
}

.manifest-modal-card label {
  display: block;
  margin: 24px 0 8px;
  color: #9d8567;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.manifest-modal-card input {
  border-color: #735337;
  background: #0b0908;
  color: #f0dfc7;
}

.rename-error {
  min-height: 18px;
  margin: 10px 0 0;
  font-family: var(--mono) !important;
  font-size: 8px !important;
}

.manifest-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.success-card {
  width: min(100%, 680px);
  border-color: rgba(75, 159, 153, 0.5);
  background:
    radial-gradient(circle at 84% 9%, rgba(67, 171, 163, 0.1), transparent 28%),
    #080b0b;
}

.success-card .eyebrow {
  color: #4d9691;
}

.success-route {
  color: #7ca5a1 !important;
}

.canonical-token-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 11px;
  margin-top: 27px;
  padding: 20px;
  border: 1px solid rgba(75, 159, 153, 0.34);
  background: rgba(35, 93, 89, 0.07);
}

.canonical-token-block > span {
  grid-column: 1 / -1;
  color: #527b77;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.canonical-token-block code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #dffbf7;
  font-family: var(--mono);
  font-size: clamp(17px, 3vw, 28px);
  line-height: 1.35;
  text-shadow: 0 0 16px rgba(105, 230, 225, 0.2);
  user-select: all;
}

.canonical-token-block .ghost-button {
  align-self: center;
  border-color: #326e6b;
  color: #8dc5c0;
}

.token-once-warning {
  margin: 12px 0 24px !important;
  color: #ff6154 !important;
  font-family: var(--mono) !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.success-card .launch-ark-button {
  border-color: #377e79;
  background:
    linear-gradient(90deg, rgba(40, 122, 116, 0.2), rgba(17, 60, 58, 0.08)),
    #0b1211;
}

.success-card .launch-ark-button i {
  color: #69e6e1;
}

@media (max-width: 1040px) {
  .manifest-workspace {
    grid-template-columns: 1fr;
  }

  .manifest-launch-rail {
    position: static;
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1fr);
    gap: 0 26px;
  }

  .launch-rail-heading,
  .launch-rail-route,
  .launch-summary {
    grid-column: 1;
  }

  .launch-consequence,
  .launch-status,
  .manifest-launch-rail > .launch-ark-button {
    grid-column: 2;
  }

  .launch-consequence {
    grid-row: 1 / 3;
    margin-top: 0;
  }

  .launch-status {
    grid-row: 3;
    align-self: end;
  }

  .manifest-launch-rail > .launch-ark-button {
    grid-row: 4;
  }
}

@media (max-width: 720px) {
  #manifest-star {
    top: -80px;
    right: -130px;
    width: 520px;
    height: 520px;
    opacity: 0.23;
  }

  .manifest-vignette {
    background: linear-gradient(180deg, rgba(3, 4, 5, 0.3), rgba(3, 4, 5, 0.9) 32%, #070706 65%);
  }

  .manifest-nav,
  .manifest-shell {
    width: min(100% - 30px, 1320px);
  }

  .manifest-nav {
    align-items: stretch;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .manifest-nav-meta > span {
    display: none;
  }

  .manifest-nav-meta,
  .graduation-checklist,
  .graduation-checklist.graduated {
    width: 100%;
  }

  .manifest-shell {
    padding-top: 55px;
  }

  .manifest-intro {
    width: 100%;
    padding-left: 46px;
  }

  .manifest-intro-rule {
    width: 27px;
  }

  .manifest-origin-ledger {
    grid-template-columns: 1fr;
  }

  .manifest-origin-ledger > div + div {
    padding-left: 0;
    border-top: 1px solid rgba(164, 126, 73, 0.12);
    border-left: 0;
  }

  .manifest-loading,
  .manifest-fatal {
    margin-left: 0;
    padding: 26px;
  }

  .manifest-workspace {
    margin-top: 54px;
  }

  .manifest-slot {
    padding: 20px 16px 22px;
  }

  .manifest-slot-header {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .manifest-lock,
  .manifest-slot-limit {
    grid-column: 2;
    justify-self: start;
  }

  .manifest-slot-copy,
  .knowledge-free,
  .knowledge-list,
  .escort-list,
  .cargo-list,
  .manifest-budget {
    margin-left: 0;
  }

  .knowledge-list {
    grid-template-columns: 1fr 1fr;
  }

  .cargo-row {
    grid-template-columns: 34px minmax(0, 1fr) 56px;
    padding: 10px 0;
  }

  .cargo-row input[type="range"] {
    grid-column: 2 / -1;
    width: 100%;
  }

  .cargo-row output {
    grid-column: 3;
    grid-row: 1;
  }

  .manifest-launch-rail {
    display: block;
    padding: 21px;
  }

  .launch-consequence {
    margin-top: 23px;
  }

  .manifest-modal {
    padding: 12px;
  }

  .manifest-modal-card {
    padding: 25px 19px;
  }

  .canonical-token-block {
    grid-template-columns: 1fr;
  }

  .canonical-token-block > span {
    grid-column: auto;
  }

  .canonical-token-block .ghost-button {
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .manifest-intro h1 {
    font-size: 36px;
  }

  .knowledge-list {
    grid-template-columns: 1fr;
  }

  .escort-row {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px 0;
  }

  .escort-stepper {
    grid-column: 2;
    justify-self: start;
  }

  .manifest-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

/* ---------- The Registry: permanent graveyard ---------- */

.graveyard-document,
.graveyard-page {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.graveyard-page {
  position: relative;
  background: #030404;
  color: #c7c2b6;
}

#graveyard-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.graveyard-shroud {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -15%, transparent 0 24%, rgba(2, 3, 3, 0.28) 57%, rgba(2, 3, 3, 0.7) 100%),
    linear-gradient(180deg, rgba(3, 4, 4, 0.1), rgba(3, 4, 4, 0.66) 76%, #030404);
}

.graveyard-page .scanlines {
  opacity: 0.012;
}

.graveyard-nav {
  position: relative;
  z-index: 4;
  display: flex;
  width: min(100% - 72px, 1120px);
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(166, 143, 94, 0.13);
  color: #4d4b45;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.graveyard-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #77736a;
  text-decoration: none;
  transition: color 180ms ease;
}

.graveyard-nav a:hover,
.graveyard-nav a:focus-visible {
  color: #cbb782;
}

.graveyard-shell {
  position: relative;
  z-index: 3;
  width: min(100% - 72px, 1120px);
  margin: 0 auto;
  padding: 96px 0 112px;
}

.graveyard-loading {
  display: grid;
  min-height: 52vh;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #5f5c55;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  text-align: center;
}

.graveyard-loading span {
  color: #8f7a4f;
  font-size: 19px;
  animation: graveyardSignal 2.8s ease-in-out infinite;
}

.graveyard-loading p {
  font-size: 13px;
  letter-spacing: 0.08em;
}

@keyframes graveyardSignal {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50% { opacity: 0.82; transform: scale(1); }
}

.graveyard-live {
  display: grid;
  min-height: 60vh;
  place-items: center;
  align-content: center;
  text-align: center;
}

.graveyard-sun-mark {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 34px;
  border: 1px solid rgba(195, 147, 73, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(206, 127, 51, 0.08);
}

.graveyard-sun-mark::before {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: #b7783f;
  box-shadow: 0 0 15px rgba(216, 126, 55, 0.38);
}

.graveyard-live .eyebrow {
  color: #786a4d;
}

.graveyard-live h1 {
  margin: 12px 0 18px;
  color: #e4ddd0;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: clamp(38px, 6.4vw, 72px);
  font-weight: 400;
  letter-spacing: 0.07em;
}

.graveyard-live > p:not(.eyebrow) {
  max-width: 560px;
  color: #706c64;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 13px;
  line-height: 2;
}

.graveyard-live > a {
  margin-top: 23px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(170, 143, 89, 0.35);
  color: #a89567;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.graveyard-live > a:hover,
.graveyard-live > a:focus-visible {
  color: #dbc184;
}

.graveyard-error .eyebrow,
.graveyard-error > p:not(.eyebrow) {
  color: #8d6056;
}

.graveyard-register {
  padding-top: 18px;
}

.graveyard-monument-heading {
  display: grid;
  place-items: center;
  padding: 34px 0 100px;
  text-align: center;
}

.graveyard-monument-heading .eyebrow {
  color: #766849;
}

.graveyard-ornament {
  display: grid;
  width: min(100%, 430px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 28px 0 36px;
  color: #9a824e;
}

.graveyard-ornament i {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(171, 143, 82, 0.44));
}

.graveyard-ornament i:last-child {
  transform: scaleX(-1);
}

.graveyard-ornament span {
  font-size: 12px;
}

.graveyard-monument-heading h1 {
  max-width: 900px;
  margin: 0;
  color: #d9d4ca;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: clamp(47px, 8vw, 94px);
  font-weight: 390;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}

.graveyard-monument-heading > p:not(.eyebrow) {
  margin: 16px 0 0;
  color: #8d846f;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 16px;
  letter-spacing: 0.38em;
}

.graveyard-final-tick {
  display: grid;
  margin-top: 55px;
  gap: 8px;
}

.graveyard-final-tick span {
  color: #56534d;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.graveyard-final-tick strong {
  color: #b19c6a;
  font-size: 18px;
  font-weight: 440;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.graveyard-monument-heading blockquote {
  max-width: 630px;
  margin: 52px 0 0;
  color: #706d66;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 13px;
  font-style: normal;
  line-height: 2.1;
}

.graveyard-directory-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px 15px;
  border-bottom: 1px solid rgba(159, 137, 88, 0.2);
}

.graveyard-directory-heading span {
  color: #aaa397;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 16px;
  letter-spacing: 0.14em;
}

.graveyard-directory-heading small {
  color: #625d51;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.graveyard-civs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1px;
  background: rgba(151, 130, 84, 0.13);
}

.graveyard-stone {
  position: relative;
  min-height: 330px;
  padding: 46px 44px 38px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(148, 124, 77, 0.035), transparent 38%),
    rgba(5, 6, 6, 0.94);
}

.graveyard-stone::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(151, 129, 83, 0.22), transparent);
}

.graveyard-stone.departed {
  background:
    radial-gradient(circle at 88% 10%, rgba(190, 146, 66, 0.08), transparent 31%),
    linear-gradient(145deg, rgba(148, 124, 77, 0.05), transparent 38%),
    rgba(6, 7, 7, 0.96);
}

.graveyard-stone-index {
  position: absolute;
  top: 28px;
  right: 30px;
  color: #302f2c;
  font-family: ui-serif, Georgia, serif;
  font-size: 31px;
}

.graveyard-stone header > span {
  color: #5e5b53;
  font-size: 7px;
  letter-spacing: 0.17em;
}

.graveyard-stone h2 {
  max-width: 82%;
  margin: 14px 0 0;
  color: #c9ab67;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 420;
  line-height: 1.3;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  text-shadow: 0 0 18px rgba(193, 151, 72, 0.06);
}

.departed-inscription {
  display: inline-block;
  margin-top: 13px;
  padding: 5px 8px;
  border: 1px solid rgba(183, 146, 72, 0.27);
  color: #c8a661;
  font-size: 8px;
  font-weight: 520;
  letter-spacing: 0.08em;
}

.graveyard-stone blockquote {
  min-height: 54px;
  margin: 33px 0 30px;
  color: #77736b;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 11px;
  font-style: normal;
  line-height: 1.9;
}

.graveyard-stone dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(145, 126, 85, 0.14);
  border-bottom: 1px solid rgba(145, 126, 85, 0.1);
}

.graveyard-stone dl > div {
  min-width: 0;
  padding: 11px 10px 11px 0;
}

.graveyard-stone dl > div + div {
  padding-left: 10px;
  border-left: 1px solid rgba(145, 126, 85, 0.1);
}

.graveyard-stone dt,
.graveyard-stone dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graveyard-stone dt {
  color: #4d4b46;
  font-size: 7px;
}

.graveyard-stone dd {
  margin-top: 7px;
  color: #9b9589;
  font-size: 9px;
}

.graveyard-stone > small {
  display: block;
  margin-top: 18px;
  color: #3f3e3a;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.graveyard-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 80px 30px;
  background: #050606;
  color: #656159;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  text-align: center;
}

.graveyard-footer {
  display: flex;
  min-height: 95px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 62px;
  border-top: 1px solid rgba(155, 133, 88, 0.18);
  border-bottom: 1px solid rgba(155, 133, 88, 0.09);
  color: #4e4c47;
  font-family: ui-serif, Georgia, "Songti SC", STSong, serif;
  font-size: 10px;
}

.graveyard-footer a {
  color: #8e815e;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.graveyard-footer a:hover,
.graveyard-footer a:focus-visible {
  color: #c9aa69;
}

.graveyard-language-footer {
  position: relative;
  z-index: 4;
  display: flex;
  width: min(100% - 72px, 1120px);
  justify-content: flex-end;
  margin: 0 auto;
  padding: 18px 0 28px;
}

.graveyard-language-footer .language-switcher {
  color: #5f5a50;
}

.graveyard-language-footer .language-switcher button:hover,
.graveyard-language-footer .language-switcher button:focus-visible,
.graveyard-language-footer .language-switcher button[aria-pressed="true"] {
  color: #c9aa69;
}

@media (max-width: 760px) {
  .graveyard-nav,
  .graveyard-shell,
  .graveyard-language-footer {
    width: min(100% - 30px, 1120px);
  }

  .graveyard-nav > span {
    display: none;
  }

  .graveyard-shell {
    padding-top: 70px;
  }

  .graveyard-monument-heading {
    padding-bottom: 72px;
  }

  .graveyard-monument-heading > p:not(.eyebrow) {
    font-size: 13px;
  }

  .graveyard-civs {
    grid-template-columns: 1fr;
  }

  .graveyard-stone {
    min-height: 0;
    padding: 40px 24px 32px;
  }

  .graveyard-footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
  }
}

@media (max-width: 430px) {
  .graveyard-monument-heading h1 {
    font-size: 44px;
  }

  .graveyard-monument-heading blockquote {
    font-size: 11px;
  }

  .graveyard-stone h2 {
    max-width: 75%;
  }

  .graveyard-stone dl {
    grid-template-columns: 1fr;
  }

  .graveyard-stone dl > div + div {
    padding-left: 0;
    border-top: 1px solid rgba(145, 126, 85, 0.08);
    border-left: 0;
  }
}

/* ---------- Public observer: Sector Chronicle ---------- */

.login-observer-link {
  margin: 17px 0 -5px;
  padding-top: 14px;
  border-top: 1px solid rgba(36, 86, 99, 0.48);
  font-size: 9px;
  text-align: center;
}

.login-observer-link a {
  color: #64868a;
  text-decoration: none;
  transition: color 140ms ease;
}

.login-observer-link a:hover,
.login-observer-link a:focus-visible {
  color: var(--cyan);
}

.login-observer-link span {
  display: inline-block;
  margin: 0 5px;
  color: var(--cyan-dim);
}

.chronicle-document,
.chronicle-page {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.chronicle-document.battle-modal-open {
  overflow: hidden;
}

.chronicle-page {
  position: relative;
  background:
    radial-gradient(circle at 74% 8%, rgba(43, 101, 108, 0.12), transparent 26%),
    radial-gradient(circle at 14% 42%, rgba(83, 47, 101, 0.08), transparent 28%),
    linear-gradient(rgba(55, 103, 110, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 103, 110, 0.025) 1px, transparent 1px),
    #05080d;
  background-size: auto, auto, 64px 64px, 64px 64px, auto;
}

.chronicle-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 9% 14%, rgba(216, 244, 242, 0.32) 0 0.6px, transparent 0.8px),
    radial-gradient(circle at 88% 29%, rgba(216, 244, 242, 0.22) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 34% 81%, rgba(216, 244, 242, 0.18) 0 0.55px, transparent 0.8px);
  background-size: 137px 137px, 181px 181px, 223px 223px;
  content: "";
  pointer-events: none;
}

.chronicle-page .scanlines {
  opacity: 0.022;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 10px;
  border: 1px solid var(--cyan);
  background: #071019;
  color: var(--text);
  font-size: 10px;
  text-decoration: none;
  transform: translateY(-150%);
}

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

.chronicle-shell {
  width: min(1260px, calc(100% - 64px));
  margin: 0 auto;
}

.chronicle-masthead {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-bright);
  background:
    linear-gradient(110deg, rgba(105, 230, 225, 0.035), transparent 44%),
    rgba(4, 8, 13, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.chronicle-masthead::before,
.chronicle-masthead::after {
  position: absolute;
  border: 1px solid rgba(105, 230, 225, 0.055);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.chronicle-masthead::before {
  top: -390px;
  right: -150px;
  width: 690px;
  height: 690px;
  box-shadow: 0 0 0 70px rgba(105, 230, 225, 0.012), 0 0 0 160px rgba(105, 230, 225, 0.008);
}

.chronicle-masthead::after {
  bottom: -240px;
  left: -180px;
  width: 390px;
  height: 390px;
}

.masthead-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 30px;
}

.masthead-rail {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(36, 86, 99, 0.64);
  color: #45666a;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.universe-entry-link {
  color: #88a9aa;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 140ms ease, transform 140ms ease;
}

.universe-entry-link span {
  display: inline-block;
  margin-left: 5px;
  color: var(--cyan);
  transition: transform 140ms ease;
}

.universe-entry-link:hover,
.universe-entry-link:focus-visible {
  color: #e5ffff;
}

.universe-entry-link:hover span,
.universe-entry-link:focus-visible span {
  transform: translateX(3px);
}

.masthead-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 38px;
  padding: 48px 0 33px;
}

.masthead-title-row .eyebrow {
  margin-bottom: 11px;
  color: #438a8e;
  font-size: 9px;
  letter-spacing: 0.2em;
}

.chronicle-page .masthead-title-row h1 {
  margin: 0;
  color: #efffff;
  font-size: clamp(31px, 5.15vw, 62px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-shadow: 0 0 28px rgba(105, 230, 225, 0.08);
}

.masthead-title-row h1 span {
  display: block;
  margin-top: 12px;
  color: #628589;
  font-size: 0.26em;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.public-signal {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(50, 103, 109, 0.62);
  background: rgba(8, 18, 25, 0.72);
  color: #708e91;
  font-size: 8px;
  white-space: nowrap;
}

.public-signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #688185;
}

.public-signal[data-state="loading"] i {
  animation: signalBlink 900ms infinite;
}

.public-signal[data-state="online"] {
  border-color: rgba(61, 220, 132, 0.38);
  color: #79bd99;
}

.public-signal[data-state="online"] i {
  background: var(--green);
  box-shadow: 0 0 9px rgba(61, 220, 132, 0.62);
}

.public-signal[data-state="degraded"] {
  border-color: rgba(226, 187, 98, 0.42);
  color: #bda56d;
}

.public-signal[data-state="degraded"] i {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(226, 187, 98, 0.42);
}

.masthead-metrics {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(190px, 0.55fr) minmax(360px, 1.5fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.masthead-metrics > div,
.masthead-metrics > p {
  min-width: 0;
  min-height: 68px;
  margin: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.masthead-metrics > p {
  display: flex;
  align-items: center;
  border-right: 0;
  color: #96b1b2;
  font-family: ui-serif, Georgia, "Songti SC", serif;
  font-size: 12px;
  line-height: 1.7;
}

.masthead-metrics span,
.masthead-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masthead-metrics span {
  color: #46666a;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.masthead-metrics strong {
  margin-top: 9px;
  color: #dff8f6;
  font-size: 13px;
  font-weight: 550;
}

.chronicle-main {
  padding: 0 0 90px;
}

.observer-section {
  padding-top: 76px;
}

.editorial-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: end;
  gap: 17px;
  margin-bottom: 19px;
  padding: 0 3px 14px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  color: #284c52;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.editorial-heading .eyebrow {
  margin-bottom: 7px;
  font-size: 8px;
}

.chronicle-page .editorial-heading h2 {
  color: #e1f6f4;
  font-size: clamp(20px, 2.6vw, 29px);
  font-weight: 520;
  letter-spacing: 0.03em;
}

.editorial-heading > p {
  max-width: 460px;
  margin: 0;
  color: #5d7b7e;
  font-size: 9px;
  line-height: 1.6;
  text-align: right;
}

.chronicle-map-frame {
  position: relative;
  height: clamp(420px, 51vw, 610px);
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: #030509;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.38), 0 22px 70px rgba(0, 0, 0, 0.24);
}

.chronicle-map-frame::before,
.chronicle-map-frame::after {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-color: var(--cyan-dim);
  border-style: solid;
  content: "";
  opacity: 0.75;
  pointer-events: none;
}

.chronicle-map-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.chronicle-map-frame::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

#chronicle-map {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.map-coordinate-mark {
  position: absolute;
  z-index: 2;
  color: rgba(98, 137, 140, 0.64);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
  pointer-events: none;
}

.map-coordinate-mark.top {
  top: 15px;
  right: 18px;
}

.map-coordinate-mark.bottom {
  bottom: 15px;
  left: 18px;
}

.chronicle-map-status {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 11, 0.68);
  color: #7d999b;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  pointer-events: none;
}

.chronicle-map-status.pending {
  inset: 17px auto auto 17px;
  display: block;
  max-width: calc(100% - 34px);
  padding: 8px 10px;
  border: 1px solid rgba(226, 187, 98, 0.42);
  background: rgba(24, 20, 10, 0.88);
  color: #cbb477;
  text-align: left;
}

.chronicle-map-status.error {
  color: #e49c96;
}

.chronicle-map-legend {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 13px;
  padding: 7px 9px;
  border: 1px solid rgba(40, 83, 90, 0.62);
  background: rgba(3, 8, 13, 0.82);
  color: #617f82;
  font-size: 7px;
  pointer-events: none;
}

.chronicle-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-star,
.legend-civ-ring {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-star {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(105, 230, 225, 0.7);
}

.legend-civ-ring {
  border: 1px solid var(--gold);
  background: transparent;
}

.chronicle-map-tooltip {
  position: absolute;
  z-index: 7;
  width: min(270px, calc(100% - 16px));
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: rgba(3, 9, 14, 0.97);
  box-shadow: 0 13px 38px rgba(0, 0, 0, 0.58);
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.5;
  pointer-events: none;
}

.chronicle-map-tooltip > strong,
.chronicle-map-tooltip > span,
.chronicle-map-tooltip > em {
  display: block;
}

.chronicle-map-tooltip > strong {
  color: #e7ffff;
  font-size: 12px;
  font-weight: 600;
}

.tooltip-star-meta {
  margin-top: 4px;
  color: #58777b;
  font-size: 8px;
}

.chronicle-map-tooltip > em {
  margin-top: 9px;
  color: #6e898b;
  font-size: 8px;
  font-style: normal;
}

.chronicle-map-tooltip ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.chronicle-map-tooltip li {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.chronicle-map-tooltip li > i {
  width: 6px;
  height: 6px;
  margin-top: 3px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.chronicle-map-tooltip li b,
.chronicle-map-tooltip li small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chronicle-map-tooltip li b {
  color: #bcd5d4;
  font-size: 9px;
  font-weight: 550;
}

.chronicle-map-tooltip li small {
  margin-top: 2px;
  color: #58777b;
  font-size: 7px;
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 25px;
  padding: 0 3px 12px;
  border-bottom: 1px solid var(--line);
}

.directory-heading .eyebrow {
  font-size: 7px;
}

.chronicle-page .directory-heading h3 {
  margin: 0;
  color: #cfe6e4;
  font-size: 13px;
  font-weight: 550;
}

.directory-heading > span {
  color: #58777b;
  font-size: 8px;
}

.civ-register {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.civ-register-card {
  --civ-accent: var(--cyan);
  position: relative;
  min-width: 0;
  min-height: 155px;
  padding: 17px 17px 15px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--civ-accent) 6%, transparent), transparent 52%),
    rgba(7, 14, 20, 0.72);
}

.civ-register-card:nth-child(4n),
.civ-register-card:last-child {
  border-right: 0;
}

.civ-register-card:nth-child(n + 5) {
  border-top: 1px solid var(--line);
}

.civ-register-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 2px;
  background: var(--civ-accent);
  content: "";
  box-shadow: 0 0 9px color-mix(in srgb, var(--civ-accent) 48%, transparent);
}

.civ-register-card > span {
  color: color-mix(in srgb, var(--civ-accent) 72%, #31545a);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chronicle-page .civ-register-card h4 {
  margin: 12px 0 0;
  overflow: hidden;
  color: #dff5f3;
  font-size: 13px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.civ-register-card p {
  min-height: 35px;
  margin: 10px 0 12px;
  color: #6d898b;
  font-family: ui-serif, Georgia, "Songti SC", serif;
  font-size: 10px;
  line-height: 1.65;
}

.civ-register-card strong {
  color: var(--civ-accent);
  font-size: 8px;
  font-weight: 600;
}

.directory-empty {
  grid-column: 1 / -1;
  min-height: 105px;
  padding: 42px 24px;
  background: rgba(7, 14, 20, 0.62);
  color: #58777b;
  font-size: 9px;
  text-align: center;
}

.directory-empty.error {
  color: #be817c;
}

.chronicle-stream-section {
  padding-top: 104px;
}

.section-alert {
  margin: -3px 0 18px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(73, 56, 19, 0.14);
  color: #bba46d;
  font-size: 9px;
  line-height: 1.6;
}

.chronicle-feed {
  border-top: 1px solid var(--line-bright);
}

.chronicle-day {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 34px;
  padding: 40px 0 0;
}

.chronicle-day-marker {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 3px 0 18px;
  border-bottom: 1px solid var(--line);
}

.chronicle-day-marker span,
.chronicle-day-marker h3,
.chronicle-day-marker small {
  display: block;
}

.chronicle-day-marker span {
  color: #3d666b;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.chronicle-page .chronicle-day-marker h3 {
  margin: 10px 0 7px;
  color: #b8cfce;
  font-size: 18px;
  font-weight: 520;
}

.chronicle-day-marker small {
  color: #4e6d70;
  font-size: 8px;
}

.chronicle-day-list {
  position: relative;
  margin: 0;
  padding: 0 0 16px;
  list-style: none;
}

.chronicle-day-list::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 93px;
  width: 1px;
  background: linear-gradient(var(--line-bright), var(--line), transparent);
  content: "";
}

.chronicle-entry {
  --event-color: #789496;
  position: relative;
  display: grid;
  grid-template-columns: 73px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 91px;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(23, 51, 59, 0.72);
}

.chronicle-entry.type-battle { --event-color: #ff5b53; }
.chronicle-entry.type-diplomacy { --event-color: #e2bb62; }
.chronicle-entry.type-newborn { --event-color: #69e6e1; }
.chronicle-entry.type-colony { --event-color: #3ddc84; }
.chronicle-entry.type-milestone { --event-color: #b8d66b; }
.chronicle-entry.type-genesis { --event-color: #efffff; }

.chronicle-entry::before {
  position: absolute;
  top: 50%;
  left: 89px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border: 2px solid #071017;
  border-radius: 50%;
  background: var(--event-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--event-color) 52%, transparent);
  content: "";
  transform: translateY(-50%);
}

.chronicle-tick-badge {
  justify-self: start;
  padding: 4px 5px;
  border: 1px solid rgba(48, 86, 92, 0.72);
  color: #668487;
  font-size: 7px;
  white-space: nowrap;
}

.chronicle-type-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--event-color) 45%, #17333b);
  background: color-mix(in srgb, var(--event-color) 5%, rgba(5, 11, 17, 0.84));
  color: var(--event-color);
}

.chronicle-entry-copy {
  min-width: 0;
}

.chronicle-entry-copy > span {
  display: block;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--event-color) 72%, #58777b);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.chronicle-entry-copy p {
  margin: 0;
  color: #a8c1c0;
  font-family: ui-serif, Georgia, "Songti SC", serif;
  font-size: 13px;
  line-height: 1.7;
}

.chronicle-entry.type-battle .chronicle-entry-copy p,
.chronicle-entry.type-genesis .chronicle-entry-copy p {
  color: #d0e5e3;
}

.battle-report-button,
.chronicle-more-button {
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid #5e3537;
  background: rgba(96, 26, 29, 0.18);
  color: #e48f89;
  font-size: 9px;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.battle-report-button:hover,
.battle-report-button:focus-visible {
  border-color: #b95550;
  background: rgba(139, 39, 42, 0.24);
  color: #ffb3ae;
}

.chronicle-empty {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(7, 14, 20, 0.5);
  color: #59777a;
  font-size: 9px;
  text-align: center;
}

.chronicle-empty strong {
  color: #9eb7b7;
  font-size: 12px;
  font-weight: 550;
}

.chronicle-empty.error,
.chronicle-empty.error strong {
  color: #c68681;
}

.stream-pagination {
  display: grid;
  place-items: center;
  gap: 11px;
  padding-top: 38px;
}

.chronicle-more-button {
  min-width: 220px;
  border-color: var(--line-bright);
  background: rgba(20, 51, 58, 0.22);
  color: #8eb0b1;
}

.chronicle-more-button:hover,
.chronicle-more-button:focus-visible {
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.chronicle-more-button span {
  display: inline-block;
  margin-left: 8px;
}

.stream-pagination > span {
  color: #3f6064;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.chronicle-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 11, 0.78);
}

.chronicle-footer .chronicle-shell {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #426367;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.chronicle-language-switcher {
  margin-left: auto;
}

.battle-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(1, 4, 7, 0.91);
  backdrop-filter: blur(7px);
}

.battle-modal-shell {
  width: min(800px, 100%);
  margin: auto;
  border: 1px solid var(--line-bright);
  background: #05090e;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.74), 0 0 60px rgba(105, 230, 225, 0.045);
}

.battle-modal-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 24, 0.96);
}

.battle-modal-toolbar .eyebrow {
  font-size: 7px;
}

.chronicle-page .battle-modal-toolbar h2 {
  color: #e0f7f5;
  font-size: 13px;
  font-weight: 550;
}

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

.battle-modal-actions .primary-button,
.battle-modal-actions .icon-button {
  min-height: 31px;
}

.battle-card-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(45deg, rgba(43, 90, 96, 0.025) 25%, transparent 25% 75%, rgba(43, 90, 96, 0.025) 75%),
    #030609;
  background-size: 18px 18px;
}

.battle-card-canvas {
  display: block;
  width: min(720px, 100%);
  height: auto;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(58, 104, 110, 0.64);
  background: #05080d;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.6);
}

.battle-card-status {
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(3, 7, 11, 0.72);
  color: #789698;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.battle-card-status.error {
  color: #df918a;
}

@media (max-width: 980px) {
  .chronicle-shell {
    width: min(100% - 40px, 1260px);
  }

  .masthead-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .masthead-metrics > p {
    grid-column: 1 / -1;
    min-height: 58px;
    border-top: 1px solid var(--line);
  }

  .civ-register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .civ-register-card:nth-child(2n) {
    border-right: 0;
  }

  .civ-register-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .chronicle-shell {
    width: min(100% - 28px, 1260px);
  }

  .masthead-inner {
    padding-bottom: 19px;
  }

  .masthead-rail {
    min-height: 35px;
  }

  .masthead-rail > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .universe-entry-link {
    flex: 0 0 auto;
  }

  .masthead-title-row {
    grid-template-columns: 1fr;
    gap: 21px;
    padding: 39px 0 25px;
  }

  .public-signal {
    justify-self: start;
    margin: 0;
  }

  .masthead-metrics {
    grid-template-columns: 1fr;
  }

  .masthead-metrics > div,
  .masthead-metrics > p {
    min-height: 58px;
    border-right: 0;
  }

  .masthead-metrics > div + div,
  .masthead-metrics > p {
    border-top: 1px solid var(--line);
  }

  .masthead-metrics > p {
    grid-column: auto;
  }

  .observer-section {
    padding-top: 58px;
  }

  .editorial-heading {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .editorial-heading > p {
    grid-column: 2;
    text-align: left;
  }

  .chronicle-map-frame {
    height: 390px;
  }

  .map-coordinate-mark.top,
  .chronicle-map-legend {
    display: none;
  }

  .civ-register {
    grid-template-columns: 1fr;
  }

  .civ-register-card,
  .civ-register-card:nth-child(2n) {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .civ-register-card:first-child {
    border-top: 0;
  }

  .chronicle-stream-section {
    padding-top: 78px;
  }

  .chronicle-day {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 34px;
  }

  .chronicle-day-marker {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 11px;
  }

  .chronicle-page .chronicle-day-marker h3 {
    margin: 0;
  }

  .chronicle-day-list::before {
    left: 72px;
  }

  .chronicle-entry {
    grid-template-columns: 54px 34px minmax(0, 1fr);
    gap: 9px;
    padding: 16px 0;
  }

  .chronicle-entry::before {
    left: 68px;
  }

  .chronicle-type-icon {
    width: 31px;
    height: 31px;
  }

  .battle-report-button {
    grid-column: 3;
    justify-self: start;
  }

  .chronicle-entry-copy p {
    font-size: 12px;
  }

  .chronicle-footer .chronicle-shell {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
  }

  .chronicle-language-switcher {
    margin-left: 0;
  }

  .battle-modal-layer {
    padding: 8px;
  }

  .battle-modal-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .battle-modal-actions {
    width: 100%;
  }

  .battle-modal-actions .primary-button {
    flex: 1 1 auto;
  }

  .battle-card-stage {
    padding: 8px;
  }

  .battle-card-status {
    inset: 8px;
  }
}

@media (max-width: 430px) {
  .masthead-rail > span {
    display: none;
  }

  .masthead-rail {
    justify-content: flex-end;
  }

  .chronicle-page .masthead-title-row h1 {
    font-size: 34px;
  }

  .chronicle-map-frame {
    height: 330px;
  }

  .map-coordinate-mark.bottom {
    max-width: 68%;
    line-height: 1.4;
  }

  .directory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .chronicle-tick-badge {
    padding-right: 2px;
    padding-left: 2px;
    border-color: transparent;
  }
}
